[ansible-project] hosts in ansible-pull working only for 127.0.0.1
Hi, I am trying to use ansible-pull, however when i run it it always skips the hosts with the message skippig: no hosts matched unless i use hosts: 127.0.0.1 in the local.yml file, any other host name even though it is defined in both the /etc/hosts and /etc/ansible/hosts will not work, but skips, i also tried to pass the inventory using -i hosts/pull.ini again it did not work, What am i doing wrong, or how can investigate the reason of skipping further, i am using ansible 1.5 my pull command is ansible-pull -d /tmp/mygitrepo -U MyGITURL my simple play starts with: --- - hosts : node01 connection: local kind regards Walid -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ansible-project] hosts in ansible-pull working only for 127.0.0.1
Can you please share your Ansible version, as well as the full output from ansible-pull ? On Wed, Jan 29, 2014 at 4:52 AM, Walid walid.sha...@gmail.com wrote: Hi, I am trying to use ansible-pull, however when i run it it always skips the hosts with the message skippig: no hosts matched unless i use hosts: 127.0.0.1 in the local.yml file, any other host name even though it is defined in both the /etc/hosts and /etc/ansible/hosts will not work, but skips, i also tried to pass the inventory using -i hosts/pull.ini again it did not work, What am i doing wrong, or how can investigate the reason of skipping further, i am using ansible 1.5 my pull command is ansible-pull -d /tmp/mygitrepo -U MyGITURL my simple play starts with: --- - hosts : node01 connection: local kind regards Walid -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Michael DeHaan mich...@ansibleworks.com CTO, AnsibleWorks, Inc. http://www.ansibleworks.com/ -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ansible-project] transforming data from the inventory into role parameters
On 29/01/14 12:13, Damjan Georgievski wrote: On Tuesday, January 28, 2014 11:35:41 PM UTC+1, Nick wrote: I could try and upgrade, but I suspect that wouldn't be sensible. Why not? Considered laziness. I'd like to avoid adding in dependencies which I then need to ensure are always present, when they aren't proven to be worth the effort. Just run pip install --user Jinja2 it'll install it in ~/.local/lib/ Thanks, despite what I said above, that may come in useful at some point. N -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ansible-project] AnsibleWorks is now just Ansible!
Excerpts from Michael DeHaan's message of 2014-01-28 21:08:17 -0500: When we started the company, Ansible wasn't quite available, so we named the company AnsibleWorks. We've finally arranged things so it was possible to change that, and have done so,and we're pretty excited about being able to make things simpler by dropping five letters and an extra syllable. Out of sheer curiosity, did you have to get permission from Orson Scott Card or something? -- Morgan Hamill -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[ansible-project] Ansible hangs while executing a python script
Along with ansible tasks i was calling a python script named 'rbupgrade.py'. During this python script execution anisble hangs and couldn't move further. [root@cu028 ~]# ps -ef|grep py root 19725 19588 0 09:22 pts/000:00:00 grep py root 27594 1 0 Jan26 ?00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp sf-admin 27806 1 0 Jan26 ?00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp root 29513 1 0 Jan26 ?00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp root 29623 29620 0 Jan26 ?00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp root 30469 1 0 Jan26 ?00:00:00 /bin/sh -c /usr/bin/python /root/.ansible/tmp/ansible-1390720907.78-64524173882964/command; rm -rf /root/.ansible/tmp/ansible-1390720907.78-64524173882964/ /dev/null 21 root 30488 30469 0 Jan26 ?00:00:00 /usr/bin/python /root/.ansible/tmp/ansible-1390720907.78-64524173882964/command root 30489 30488 0 Jan26 ?00:00:00 [rbupgrade.py] defunct [root@cu028 ~]# Please help me in this problem.. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ansible-project] Re: Anyone managing snmp on Ubuntu with Ansible?
Yeah, I've tried that. Didn't work. Maybe I did it wrong... Hmm... In the default snmpd.conf file that Ubuntu installs, it says NOT to put those lines in that file. So... --David Reagan On Wed, Jan 29, 2014 at 10:32 AM, Adam Morris zwack...@gmail.com wrote: Not yet, but that might be something I have to do soon... Looking at the documentation I could find it seems like that just adds two lines to two files then restarts snmpd. ## OUTPUT ## adding the following line to /var/lib/snmp/snmpd.conf: createUser snmpv3user MD5 snmpv3pass DES adding the following line to /usr/share/snmp/snmpd.conf: rouser snmpv3user If that is the case then surely there isn't any issue with using Ansible to edit the files directly and then (if changed) restart the service? Adam On Thursday, January 23, 2014 5:25:26 PM UTC-8, David Reagan wrote: Hey all, I've been looking into managing snmp via ansible. Setting the /etc/snmp/snmpd.conf file is simple enough. Just a template call. It's setting up a snmp v3 user that has me stumped. To do so, I run net-snmp-config --create-snmpv3-user, then follow the prompts. I haven't tried it yet, but according to the help text, --create-snmpv3-user [-ro] [-A authpass] [-X privpass] [-a MD5|SHA] [-x DES|AES] [username] I can just run a command to create the user directly without the prompts. That works But I've never been comfortable with running a command like that every time I run a playbook, and making some kind of init variable feels clunky to me. So, does anyone have a better idea? Anyone working on a module for snmp? -- You received this message because you are subscribed to a topic in the Google Groups Ansible Project group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/-hRkjQFmFsw/unsubscribe. To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[ansible-project] EC2 boto issue
I'm having an issue using the ec2 module with ansible, version 1.4.4 on OSX. I keep getting msg: boto required for this module I am not using virutalenv, python was installed with brew and both ansible and boto were installed with pip. I have removed and reinstalled each to be sure. Anyone know what might be wrong? thanks E. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[ansible-project] roles with pre_tasks and post_task
I have a patch locally that enables pre and post processing for roles. The directory names are pre_tasks and post_tasks, of course. The flow is: - hosts: targets roles: - role-1 - role-2 pre_tasks: - name: one tasks: - name: two post_tasks: - name: three and evaluates as: role-1:pre_tasks role-2:pre_tasks play:pre_tasks role-1:tasks role-2:tasks play:tasks role-1:post_tasks role-2:post_tasks play:post-tasks I use it to have a role nginx-frontend, then then wants to know about ofbiz-backend and php-backend, and other hosts that then have those roles. I then have the backend role notify a handler, that then updates /etc/hosts with the address found in $hostvars. I'm wondering if this makes sense to anyone else, and if it would be wanted? I haven't yet modified docsite, because I'm asking here first. The following examples show a complex backend registration system; I hit some snags with ordering, so I added the pre/post support for roles, which should allow the main-line tasks to then query for the list of backend mappings. I haven't yet modified my backend role(shown below) with this new feature. == examples:playbook.yml - hosts: targets accelerate: true gather_facts: true roles: - etckeeper - { role: nginx-frontend, when: inventory_hostname in (groups['frontend'] | default([])) } - { role: php-backend, when: inventory_hostname in (groups['php-backend'] | default([])) } - { role: mysql-backend, when: inventory_hostname in (groups['mysql-backend'] | default([])) } - { role: postgresql-backend, when: inventory_hostname in (groups['postgresql-backend'] | default([])) } - { role: ofbiz-backend, when: inventory_hostname in (groups['ofbiz-backend'] | default([])) } - { role: image-processor, when: inventory_hostname in (groups['image-processor'] | default([])) } == examples: nginx-frontend/meta.yml dependencies: - role: backend tags: ['nginx'] args: role: nginx-frontend roles: ['ofbiz-backend', 'php-backend'] == examples: php-backend/meta.yml dependencies: - role: backend tags: ['php'] args: role: php-backend roles: ['mysql-backend'] == examples: backend/tasks.yml - set_fact: host_roles: {{host_roles is defined and (host_roles.append(args.role) or host_roles) or [args.role]}} when: args.roles is defined - set_fact: wanted_roles: {{wanted_roles is defined and (wanted_roles.extend(args.roles) or wanted_roles) or args.roles}} notify: - roles-scan {{ args.role }} == examples: backend/handlers.yml - name: roles-scan {{ args.role }} when: item[1] in wanted_roles lineinfile: dest=/etc/hosts regexp='^\S+\s+.*?{{item[1]}}.universe' line='{{item[0].ansible_eth0.ipv4.address}} {{item[1]}}.universe' notify: - etckeeper commit register: roles_scan_result with_subelements: - hostvars.values() | selectattr('host_roles', 'defined') | list - 'host_roles' == -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ansible-project] uri module following redirects even after follow_redirects=no has been set
Hi Bennett, It was indeed a bug in the uri module. I've sent in a pull request which fixes the issue. https://github.com/ansible/ansible/pull/5826 Romeo On Mon, Jan 20, 2014 at 10:44 AM, bennett ponder bennettpon...@gmail.com wrote: Here's my ansible version: ansible --version ansible 1.4.4 I'm trying to get ansible to submit an http request for specific a url, and verify it gets a 301. It does not need to follow the location header and make the next http request. I figured that follow_redirects=no would solve this for me, however I see ansible make the initial http request, receive a 301, then make the next http request and get a 200 back. It then fails because I've said status_code=301, it must only care about the second http request it made. This is in my task: - name: Make sure the HTTP Request gets a 301 redirect action: uri url=http://{{ inventory_hostname }}.test.com/img/site.png status_code=301 HEADER_Host=test.site.com follow_redirects=no delegate_to: 127.0.0.1 Any help would be appreciated. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Romeo -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ansible-project] Issue with Ansible user and sudo user
you are trying to sudo from a user to himself? (preseed in both cases) -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.