Re: [ansible-project] Looking up variables in another host's host_var file

2015-10-27 Thread Joshua J. Kugler
On Monday, October 26, 2015 20:25:26 Brian Coca wrote: > hostvars is special and lazily loaded, you NEED to specify a host or > it might appear missing. I want to say thank again. It turns out the very thing I needed was documented right here:

[ansible-project] Ansible skipping the rest of the tasks after one conditional task

2015-10-27 Thread Joshua J. Kugler
So, granted, I'm rather new at Ansible, this is really not fitting my understanding of Ansible. :) I conditionally include this file: https://gist.github.com/jkugler/3c683b539575ba4f0d66 The condition that includes it is satisfied, and it is included. The first task runs (the stat to check

Re: [ansible-project] reuse conditionals

2015-10-27 Thread r144
On Monday, October 26, 2015 at 7:01:09 PM UTC+1, Brian Coca wrote: > > you can define vars that depend on the condition: > > Hi Brian, my problem is that I want to do this in the tasks/main.yml of a certain role. It seems it is not possible to define vars on the same level as the tasks: -

[ansible-project] Re: postgres_user: crypted password not working

2015-10-27 Thread r144
hello, I was not completely correct in my first post. When I supply a password that is encrypted with echo "md5`echo -n "mango" | md5sum`" I get as output the string "md5aa00faf97d042c13a59da4d27eb32358 -" If I put this string in the task, I only can login with that string as password.

[ansible-project] postgres_user: crypted password not working

2015-10-27 Thread r144
hello group, I have a set of tasks to create a postgres database and user. The strange thing is, that although it works, the supplied password is never taken as encrypted. So if I do - name: creeer gebruiker {{dbuser}} voor de database sudo: yes sudo_user: postgres

[ansible-project] Re: postgres_user: crypted password not working

2015-10-27 Thread r144
By the way: I use ansible 1.7.2 on a debian host, ubuntu target. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] Re: postgres_user: crypted password not working

2015-10-27 Thread Nigel Metheringham
The md5 command is not the same as the md5sum command - as you have found by experiment - since the md5sum command also outputs the name of the file it has just checked. Additionally if you look at the info in the ansible postgres_user you will see that the encrypted password hash needs the user

Re: [ansible-project] reuse conditionals

2015-10-27 Thread Brian Coca
you can define them in defaults/main.yml or vars/main.yml as part of the role. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[ansible-project] Re: Wrong group_var getting read?

2015-10-27 Thread esco real
Am Dienstag, 27. Oktober 2015 04:07:10 UTC+1 schrieb Francisco Reyes: > > > I would have never expected it. I expected that if a playbook did a group > from the host file that only the matching file from group_vars/GroupName > would be read. > Ok, at first the whole inventory topic in Ansible

[ansible-project] Domain / LDAP User running Ansible from a CI Server

2015-10-27 Thread David O'Brien
Hi, is anybody running Ansible from a CI Server (Teamcity, Jenkins, GoCD) using a Domain User / LDAP user to connect to a Windows machine? We are currently facing the issue of "How to automatically create / renew the kerberos ticket". How do other people tackle this? The problem is that

[ansible-project] unpredictable 'working directory' on local machine

2015-10-27 Thread Jonathan Miller
Hi, I have found that ansible is unpredictable in terms of determining the current working directory on the LOCAL machine. Invoking the same shell command as a lookup, or as a command, changes the apparent working directory. Is this expected behaviour? e.g. for the playbook given below, and

[ansible-project] group_by behaving badly?

2015-10-27 Thread ttosttos
I'm getting unexpected results from group_by when running two playbooks together. I have two groups with a host each. When I run playbook1 and playbook2 separately, playbook1 is run against host1 and playbook2 is run against host2 as expected. When I include playbook1 and playbook2 in a

Re: [ansible-project] Re: postgres_user: crypted password not working

2015-10-27 Thread r144
On Tuesday, October 27, 2015 at 12:24:34 PM UTC+1, nigelm wrote: > > The md5 command is not the same as the md5sum command - as you have found > by experiment - since the md5sum command also outputs the name of the file > it has just checked. > > Additionally if you look at the info in the

Re: [ansible-project] unpredictable 'working directory' on local machine

2015-10-27 Thread Brian Coca
just tested this against 2.0: - hosts: localhost gather_facts: False vars: third: "{{lookup('pipe', 'pwd')}}" tasks: - shell: pwd register: cwd - debug: msg={{cwd}} - debug: msg={{lookup('pipe', 'pwd')}} - debug: msg={{third}} and all 3 give the same result.

[ansible-project] Re: postgres_user: crypted password not working

2015-10-27 Thread r144
hello, I was not completely correct in my first post. When I supply a password that is encrypted with echo "md5`echo -n "mango" | md5sum`" I get as output the string "md5aa00faf97d042c13a59da4d27eb32358 -" If I put this string in the task, I only can login with that string as password.

Re: [ansible-project] unpredictable 'working directory' on local machine

2015-10-27 Thread Jonathan Miller
On Tuesday, 27 October 2015 12:17:52 UTC, Brian Coca wrote: > > just tested this against 2.0: > > - hosts: localhost > gather_facts: False > vars: > third: "{{lookup('pipe', 'pwd')}}" > tasks: > - shell: pwd > register: cwd > > - debug: msg={{cwd}} > - debug:

[ansible-project] new AWS EC2 instance created using ansible does not use SSD

2015-10-27 Thread Abey Thomas
Hi , I am trying to create EC2 instances using ansible module ec2 and the root volume gets created as "standard". I would like that to be "gp2" Below is the play that I am using - name: Launch the new EC2 Instance ec2: group: '{{ security_group }}' instance_type: '{{

Re: [ansible-project] Foreman integration with Ansible, your thoughts?

2015-10-27 Thread Daniel Lobato
On Tuesday, October 27, 2015 at 12:02:23 AM UTC+1, Brian Coca wrote: > > My first thought is that to save 'facts' create a persistent fact > caching plugin, not a callback, then it works both ways, extra facts > in foreman will be available to ansible and every time ansible gathers > facts it

Re: [ansible-project] unpredictable 'working directory' on local machine

2015-10-27 Thread Brian Coca
I see what you mean now, but not unpredictable. Lookups are always relative to the role or play. Local tasks are relative to the cwd from which you execute. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] Looking up variables in another host's host_var file

2015-10-27 Thread Joshua J. Kugler
On Tuesday, October 27, 2015 10:43:54 Josh Smift wrote: > That page *doesn't* say two of the interesting/important things about the > hostvars dict, though: (1) The one Brian just mentioned; (2) One we ran > into a little while ago, that some of the keys in hostdict aren't hosts. > Those are both

[ansible-project] Re: Issues with playbook ran getting stuck on gathering facts

2015-10-27 Thread BostonMoto
When I Ctrl-C to break out of the playbook while it's hanging on gathering hosts I get the following error. Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run()

Re: [ansible-project] Foreman integration with Ansible, your thoughts?

2015-10-27 Thread Brian Coca
no, https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/cache <= these are independent of callbacks and also allow for ansible to not only publish but retrieve. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] Re: fail_when error

2015-10-27 Thread Jason Gilfoil
So I discovered part of my trouble. The file module that I was testing with doesn't list a rc in it's output when using -v. The other issue is that the module I was trying to use this on originally was replace, which also doesn't list rc when it succeeds. - hosts: all tasks: - name:

Re: [ansible-project] Need help with Ansible /jenkins

2015-10-27 Thread Dick Davies
On 27 October 2015 at 16:21, GBANE FETIGUE wrote: > Is anybody has an idea about that error message and how to fix it > > OSError: [Errno 13] Permission denied: '/var/config' > > ​Check the remote user has sufficient permissions.​ -- You received this message because you are

[ansible-project] fail_when error

2015-10-27 Thread Jason Gilfoil
So i'm really stumped about this failed_when clause that keeps giving me errors. I was trying to use a failed_when syntax like the below which is very similar to other failed_when conditionals that i've used previously. failed_when: result.rc != 0 and result.rc != 257 However this keeps

[ansible-project] adhoc template creation

2015-10-27 Thread Ivan Ogai
I just would like to locally compile a template, a simple adhoc operation. The error is *templates are only usable in playbooks*. The command: ansible localhost -c local -i localhost, -m template -a "src=settings.py.j2 dest=/tmp/settings.j2" -- You received this message because you are

[ansible-project] install grails via ansible

2015-10-27 Thread Steve Korzinetzki
Hi, I want to install Grails (3.2.8) on an environment and just don't know where to start. First of all, I'm a grails newbie and I want to automate the environment setup for a grails application. Therefore we try to achieve this by using ansible. The Grails framework has an install

[ansible-project] Issues with playbook ran getting stuck on gathering facts

2015-10-27 Thread BostonMoto
I've been using ansible for my current project for a few months now. I have a playbook to pushout configs to a cluster of about 200 servers every 30 mins. It's been going well so far up until recently it hangs indefinitely while gathering tasks. Additional -vvv arguments have no provided any

[ansible-project] Do dynamic inventories support command line arguments?

2015-10-27 Thread george hartzell
Hi All, At http://docs.ansible.com/ansible/intro_dynamic_inventory.html, about halfway down, there's an example that reads: ansible-playbook -i 'ec2.py --profile prod' myplaybook.yml which suggests that it's possible to pass arguments to dynamic inventory programs. In real life, I can't

Re: [ansible-project] Do dynamic inventories support command line arguments?

2015-10-27 Thread Matt Martz
That should not be possible. I would say that is a bad example. On Tue, Oct 27, 2015 at 10:12 AM, george hartzell wrote: > Hi All, > At http://docs.ansible.com/ansible/intro_dynamic_inventory.html, about > halfway down, there's an example that reads: > >

[ansible-project] Need help with Ansible /jenkins

2015-10-27 Thread GBANE FETIGUE
Is anybody has an idea about that error message and how to fix it PLAY [Deploy to status servers] *** GATHERING FACTS *** ok: [172.16.21.129] TASK: [nodejs_app | Put upstart script in

Re: [ansible-project] Looking up variables in another host's host_var file

2015-10-27 Thread Brian Coca
if you just want to iterate over all the hosts, use this instead of hostvars: with_items: groups['all'] On Tue, Oct 27, 2015 at 11:46 AM, Joshua J. Kugler wrote: > On Tuesday, October 27, 2015 10:43:54 Josh Smift wrote: >> That page *doesn't* say two of the

Re: [ansible-project] Looking up variables in another host's host_var file

2015-10-27 Thread Josh Smift
BC> hostvars is special and lazily loaded, you NEED to specify a host or BC> it might appear missing. JJK> I want to say thank again. It turns out the very thing I needed was JJK> documented right here: JJK> JJK>

[ansible-project] Re: Do dynamic inventories support command line arguments?

2015-10-27 Thread esco real
You could use some wrapper script(s) as inventory source for that.. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] Need help with Ansible /jenkins

2015-10-27 Thread GBANE FETIGUE
that's wired root is the remote user it always has full permission right? On Tuesday, October 27, 2015 at 12:28:55 PM UTC-4, Dick Davies wrote: > > > > On 27 October 2015 at 16:21, GBANE FETIGUE > wrote: > >> Is anybody has an idea about that error message and how to fix it

Re: [ansible-project] Re: group_by behaving badly?

2015-10-27 Thread Brian Coca
I would actually expect that the 2nd play in playbook2 runs for any hosts that are in the precise or trusty group, this would be normal behaviour as you called group_by twice and in each case inserted a host into one of those groups. group_by does not delete existing hosts from groups. On Tue,

[ansible-project] How to get the IP Address for a Server with multiple IP Addresses

2015-10-27 Thread manderson
I'm using ansible to install a cassandra cluster. Cassandra wants ip addresses and not hostnames in it's config file. I need to get the ip address for each host. The problem is each physical server has multiple ip addresses associated with it. So I can't just get the ip address using

Re: [ansible-project] Need help with Ansible /jenkins

2015-10-27 Thread GBANE FETIGUE
I disabled all the firewall still having the same issues . I am running that ansible playbook through a Jenkins job. I don't even have /var/config . i don't why I am having permission denied. On Tuesday, October 27, 2015 at 1:04:43 PM UTC-4, Brian Coca wrote: > > almost always, selinux/apparmor

[ansible-project] Re: Dynamic deployment to AWS w/ Groups

2015-10-27 Thread Rob Wilkerson
Thanks so much, Igor. Tons of great information in there and I really appreciate the jump start. It was feeling a little bit like a paralysis of choice thing for a while there. On Monday, October 26, 2015 at 8:11:38 PM UTC-4, Igor Cicimov wrote: > > Hey Rob, > > Well you definitely need a

Re: [ansible-project] Re: group_by behaving badly?

2015-10-27 Thread ttosttos
In that case, when running playbook3, shouldn't playbook2 be run for both host1 and host2? It's only run for host1. Cheers. SA -- On Tuesday, October 27, 2015 at 10:13:31 AM UTC-7, Brian Coca wrote: > > I would actually expect that the 2nd play in playbook2 runs for any > hosts that are in

Re: [ansible-project] Need help with Ansible /jenkins

2015-10-27 Thread Brian Coca
almost always, selinux/apparmor or similar MAC can interfere with that, also NFS and/or other network filesystems. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

Re: [ansible-project] Need help with Ansible /jenkins

2015-10-27 Thread Joshua J. Kugler
On Tuesday, October 27, 2015 09:52:52 GBANE FETIGUE wrote: > that's wired root is the remote user it always has full permission right? Unless a directory is mounted over NFS and it's set to rootsquash. Or the directory has some other attribute set on it, like immutable. j > On Tuesday, October

[ansible-project] Re: group_by behaving badly?

2015-10-27 Thread ttosttos
To clarify, the unexpected behavior takes place when running playbook3: *Playbook3* - include: playbook1.yml - include: playbook2.yml On Tuesday, October 27, 2015 at 4:44:11 AM UTC-7, ttosttos wrote: > > I'm getting unexpected results from group_by when running two playbooks > together. I

Re: [ansible-project] Behaviour of the Ansible yum module with enablerepo and disablerepo

2015-10-27 Thread Toshio Kuratomi
I still have not been able to replicate this. Taking all the things that people have said on this list I just ran a test on a centos6 host: $ cat /etc/redhat-release (15:20:34) CentOS release 6.6 (Final) with ansible-1.9.2 from the epel repository. [pts/0@rhel6 ~]$ rpm -q

[ansible-project] OpenStack provision of a new instance, with the user’s persistent storage attached

2015-10-27 Thread Natan Franghieru
Hello everyone! I'm using OpenStack Kilo in a VDI project, my main difficult is to attach a user's persistent storage to the instance. It's basically the flow that is exemplified on the image: The user requests a VDI instance.

Re: [ansible-project] adhoc template creation

2015-10-27 Thread Brian Coca
This was a intended restriction as adhoc did not gather facts and templates relying on them would fail. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [ansible-project] Ansible skipping the rest of the tasks after one conditional task

2015-10-27 Thread Brian Coca
the when in the include is applied to each included task, if it also relies on the st variable it would explain what you are seeing. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Re: Domain / LDAP User running Ansible from a CI Server

2015-10-27 Thread David O'Brien
The system however would still have it in its shell history, right? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] Re: Issues with playbook ran getting stuck on gathering facts

2015-10-27 Thread BostonMoto
So it was pretty much getting stuck on any node at random, no particular order and nothing interesting seemed to be going on on those nodes in question. At any rate I decided to change my inventory files from using host name to fully qualified domain and everything worked fine after, so maybe

Re: [ansible-project] Re: Issues with playbook ran getting stuck on gathering facts

2015-10-27 Thread Brian Coca
can you check on the hosts that it gets 'stuck on'? see what the ansible process is doing. Normally this only happens when the box has resource issues or some device is causing the hang (fact gathering checks devices and proc) specially network file systems. -- Brian Coca -- You received this

[ansible-project] Re: Manage SSh-Keys

2015-10-27 Thread Larry Smith
I am using this method here that I created a few weeks ago and it works really well for me. Maybe it will work well for you too? https://github.com/mrlesmithjr/ansible-manage-ssh-keys On Wednesday, October 21, 2015 at 9:06:45 AM UTC-4, DrDth wrote: > > Hello Ansible Community, > > I'm working

[ansible-project] Re: Domain / LDAP User running Ansible from a CI Server

2015-10-27 Thread J Hawkesworth
Just wondering if setting no_log: True on your task would do the trick: http://docs.ansible.com/ansible/faq.html#how-do-i-keep-secret-data-in-my-playbook On Tuesday, October 27, 2015 at 11:44:11 AM UTC, David O'Brien wrote: > > Hi, > > is anybody running Ansible from a CI Server (Teamcity,