You mean hostvars[groups['localhost']|first.new_ips
Doesn't work!
On Monday, August 25, 2014 10:37:57 PM UTC-7, Henry Finucane wrote:
Probably something like
hostvars[groups['webservers']|first].new_ips
On Mon, Aug 25, 2014 at 10:35 PM, Imran Khan khan.im...@gmail.com
javascript: wrote:
{{hostvars[groups['localhost'].new_ips.results.stdout}}
Gives the following error: One or more undefined variables: 'dict object'
has no attribute 'localhost'
On Monday, August 25, 2014 10:37:57 PM UTC-7, Henry Finucane wrote:
Probably something like
You know what- I answered your title, not your question. If you don't
want to have to try and persist things between plays, you might have
more luck with something like this:
- hosts: myhosts
tasks:
- shell: echo things
local_action: true
register: new_ips
- shell: echo other
haha.okay! I did not want to post my whole playbook as it might get
confusing. I really do appreciate your help though. Here is a sizeable
chunk of the playbook which might make things easy (or difficult) to
understand :)
#$ cat khan.yml
---
- hosts: localhost
gather_facts: False
Hello.
Please tell me how I can use items from task condition in template. Or
other method, how I can decide my probled.
goal: I have a template for /etc/network/interfaces file. I want to set up
bond interface, which contains the parameter slaves XXX XXX XXX, where
XXX - name of interface.
I
Hello project,
Recently I've made my first submission in Ansible Galaxy:
https://galaxy.ansible.com/list#/roles/1475
Unfortunately the page above failed to render the module option table in
README.md.
It's written in raw HTML, but looks correct on GitHub:
The IndexError traceback was fixed by
https://github.com/ansible/ansible/commit/07f12539eee2faac5fe831cd31f1f0a5d3e7e661,
and I just pushed a fix for running windows modules from playbooks (
https://github.com/ansible/ansible/commit/57dee4545b3c34d1e66943def8d5e45ee95d66bd
).
The winrm
Perhaps -- it's been requested before.
Right now we're using all of our resources on the ansible core project
since I think that does the most good, though the time will come in the
future where we add more upgrades, this will likely be one of them,
provided there are good Python libraries for
Nice script, I hadn't seen that until now, but will likely start using it
for a few of my setups.
Just wanted to chime in and say that for 99% of the infrastructure I
manage, I just have on Git repo for both dev and production (and a few that
have config for dev + test + production). I usually
Hi all!
I'm trying to use the lineinfile module to configure NFS exports and I need
to put parentheses in my line argument.
If I do something like this
- name: Export the NFS directory for root
lineinfile: dest=/etc/exports
regexp='/root/nfs'
line='/root/nfs
That was exactly the problem; the `libz-dev` package was causing the false
'changed' status.
$ aptitude search libz-dev
v libz-dev-
v libz-dev:i386
For this particular problem (calling on every vm) i use a trick i found
online: only include the ansible provision call in the last vm in the
Vagrantfile in is provider section.
On Thursday, June 6, 2013 8:11:54 AM UTC-5, Peter Petrov wrote:
On Thursday, June 6, 2013 12:51:46 PM UTC+3, Gilles
Not sure what you mean. When set at play level, all tasks by default will
use that remote_user. you can override on specific tasks with different
remote_user. Of course unless hostvars override with ansible_ssh_user
--
You received this message because you are subscribed to the Google Groups
That's exactly what I did to get your changes into the mainline, so I'm
doing that again.
You want me to post feedback (if I have any) in this thread or on the pull
request?
On Tuesday, August 26, 2014 5:25:46 PM UTC-5, Trond Hindenes wrote:
Me too. I would just grab the file manually and
Lineinfile doesn't have any particular handling of a parenthesis.
I don't think I see a bug in the above, but it can be hard to use.
I recommend templates for 99.% of all use cases, above lineinfile.
Please do confirm your ansible version if you don't mind...
On Tue, Aug 26, 2014 at 9:57
Note that lookup plugins will get executed once per host, it may be better
to download it once from s3 and then load it via a lookup plugin to avoid
s3 hammering.
You could really put the file anywhere you want, though something outside
of your git directory seems wise, or otherwise configure
There it is, finally!!!
This is still using the win_msi, I'll switch to the win_package now.
I'm not sure why but I just wasn't going to be happy until I broke it.
changed: [node1.domain.com]
Traceback (most recent call last):
File
Nice,
So, Chris just tipped me about this ansible.cfg setting:
[defaults]
keep_remote_files = 1
Stick that in your /ansible/etc/ansible.cfg and re-run your playbook with
-vvv
All those temp paths Ansible uses for powershell files will now be left on
your windows system. Each folder basically
Yep.
The trick would be to set it via set_fact...
set_fact:
var: {{ lookup('pipe', 'foo') }}
And then refer to it consistently from one host via hostvars, or not care
that it was different.
On Tue, Aug 26, 2014 at 12:17 PM, Tomasz Kontusz tomasz.kont...@gmail.com
wrote:
Wouldn't the value
No, you *cannot* do what Tomas says above and then still target -i
inventory as one common infrastructure.
instead, do this.
Inside your inventory/production put all hosts under a group named
production
Inside your inventory/stage, put all hosts under a group named stage.
On Tue, Aug 26,
Perhaps there's a log to tail?
On Tue, Aug 26, 2014 at 1:42 PM, Jeff Geerling geerling...@gmail.com
wrote:
Short of adding in some regular expressions to detect whether there were
changes in the apt stdout, I'm not sure of a way that you could do this
easily—and without introducing a host
Looks like no.
You could uninstall ohai :)
On Tue, Aug 26, 2014 at 2:43 PM, kesten broughton
kesten.brough...@gmail.com wrote:
Did this ever make it into trunk?
I've hit a case where I'd like to be able to disable the automatic ohai
fact-gathering.
On Monday, March 17, 2014 11:55:07
Ansible-pull isnt a requirement, but using a push based method seems to be
difficult with our environment which has over 400 roles, and 2000+ servers
We have some users (admittedly somewhat more heterogenous to you) pushing
to 5000 nodes with one box. You will be able to increase --forks to
We'd be open to a pull request on this subject I guess.
Would it run file against the tool to figure out the type? This doesn't
map 100% to MIME types, so curious how you'd go about it.
Extensions shouldn't be made to be significant, IMHO. That's a little
old-school-windowsey.
On Tue, Aug
You're replying to an old thread from July which was a little long, so I'm
not sure what this inquiry was about.
Is this related to this odd set_fact behavior I'm encountering with
ansible 1.7.1?
Could use some help clarifying what the pronoun this refers to. Sorry,
internets make this hard
Not sure what's up wih the HTML copy/paste, but it's hard to collapse and
skim over.
If you called a fail task, and that group is reduced to size=0, Ansible is
done.
You should avoid calling a fail task if you want a handler to run later on
that host, or make sure those tasks have a failed_when:
Seeing this same issue. Is there a better fix?
On Tuesday, July 15, 2014 10:54:38 AM UTC-4, David Karnowski wrote:
I received the below error when trying to run a playbook.
I'm running your latest dev Ansible pulled from github (1.7).
I'm new to Ansible and am setting it up on my PC for
Awesome I'll give that as shot.
The biggest thing I wanted to know was how to catch the output so I can at
least try to debug it or ask for help, so that'll be huge.
I'm off for the night tonight but I'll be testing out win_package tomorrow
for sure. I'll let you know how it goes.
On Tuesday,
On 26/08/14 18:00, Michael DeHaan wrote:
Extensions shouldn't be made to be significant, IMHO. That's a little
old-school-windowsey.
That's still in very widespread use, and not only in Windows-based
environments, and it's vastly
more robust than trying to deal in potentially-colliding
I merged in support for specifying :ro/:rw a few weeks ago, and it was
included in the 1.7.1 release.
On Tue, Aug 26, 2014 at 2:26 PM, Steven Truong djatlan...@gmail.com wrote:
TASK: [echo $myhome]
**
ok: [localhost] = {
myhome: {
Seeing James did not reply to this one, just wanted to follow up.
We've discussed this a bit online, and decided the file modules need more
examples showing how this would be specified.
I find the = a bit confusing following an equals, but : might make
things more quotey, I think we can live
It's not the least bit screwy.
If you are doing key=value stuff all on one line, Ansible doesn't know what
is a string or not.
Jinja2 templating happens before values are past.
You are correct in that the long form set_fact does hold types nicely, and
is what you want.
On Tue, Aug 26, 2014
Also you actually mean this (note spacing):
- set_fact:
directories: {{ directories_output.stdout_lines }}
This is because directories is not a parameter to the task, it's passed to
the set_fact module.
On Tue, Aug 26, 2014 at 9:08 PM, Michael DeHaan mich...@ansible.com wrote:
It's
example:
- name: create /etc/network/intefaces file
template: src=xxx dest=xxx
with_items: ansible_interfaces
when: item | match(eth*)
and in template I need:
slaves eth0 eth1 eth2 ethX
вторник, 26 августа 2014 г., 19:47:21 UTC+7 пользователь Michael DeHaan
написал:
I'm not sure
Sticky bits and setuid/setgid all work as expected currently:
o+t (sticky bit)
g+s (setgid)
u+s (setuid)
The all target also works:
a=rw
As does specifying multiple targets with one operation:
ugo=rw
ugo+x
The special X mode even works, which is handy for targeting directories
only in
35 matches
Mail list logo