[ansible-project] Syntax for limiting to batches?

2015-11-25 Thread Marc Abramowitz
Using the "serial:" keyword so ansible can do hosts in batches. Wondering if there is support for addressing those batches - e.g.: -l dbservers@batch1 or something like that Use case is folks want to run a job to do half the nodes; then pause for manual QA; then run another job for the other

[ansible-project] {{ inventory_hostname }} variable

2015-11-25 Thread richard kappler
New to Ansible here, and have a question on using an inventory_hostname variable. I have a playbook that deploys an add-on to numerous servers, using an inventory list of IP addresses setup as so: [servers01] xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy [servers02] zzz.zzz.zzz.zzz and so on. One of the

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Joanna Delaporte
Hi Brian, Okay, but why does my play work with package, but not yum? On Nov 25, 2015 1:53 PM, "Brian Coca" wrote: > package will just call yum module, the main difference is in the > 'squashing', another check you can do to confirm this is set the env > var

Re: [ansible-project] Re: Unable to auth via ec2.py

2015-11-25 Thread Rob Wilkerson
I'm up to date running boto 2.38.0 on OS X. My OS is Yosemite, but I'd be a little shocked if that were the issue. From: Stephen Granger Reply: ansible-project@googlegroups.com Date: November 25, 2015 at 5:44:44 PM To: 

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Brian Coca
if you run the test i asked, i can confirm it will be because of argument squashing, which is an optimization that will run on yum but not on package. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Joanna Delaporte
Alright, it worked with that variable you requested. I exported the env var (it didn't work just set in the current shell): export ANSIBLE_SQUASH_ACTIONS="apt,pkgng" And ran this play: - yum: name="{{ item }}" state=present with_items: - ypbind - rpcbind The play succeeded with this

[ansible-project] Ansible-OpenStack:cannot ssh into the containers

2015-11-25 Thread kakifilip
Hi, I am trying to deploy openstack using openstack-ansible project. I am using Liberty release (tag 12.0.0). The problem i have is that Ansible is not able to SSH into the containers: *TASK: [Wait for ssh to be available] *** failed:

[ansible-project] https://github.com/ansible/ansible/issues/11692

2015-11-25 Thread Brandon Heller
Hi, I'm having some issues with ansible 2.0.0-stable (b69942a), where --start-at-task can't find the task with that name. I think a clue may be in --list-tasks, which doesn't list task names for tasks defined as meta: [output from --list-tasks]: PLAY: #5 tasks: TASK: meta

[ansible-project] Ansible Galaxy CLI is not parsing the requirements YAML file correctly

2015-11-25 Thread Yashodhan Talwar
Hi, I'm trying to solve a problem I'm having with the Ansible Galaxy CLI tool. It seems that the YAML file is being incorrectly parsed as a "basic" file, instead of YAML. Using Ansible 1.9x, I get the following error trying to install roles: ansible-galaxy install -r requirements.yml

Re: [ansible-project] Re: Unable to auth via ec2.py

2015-11-25 Thread Stephen Granger
Ansible 1.9.4 What version of boto are you using? I've noticed issues when using older versions and I'm wondering if the first bug was resolved by updating to a later version (2.38) version of boto. Assuming you are running of OS X? $ python -c "import boto; print boto.__version__" Good job on

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Joanna Delaporte
Yes, right. Sorry for my misunderstanding. I'll get back to you with a test run after I feed my kids dinner. On Nov 25, 2015 6:10 PM, "Brian Coca" wrote: > if you run the test i asked, i can confirm it will be because of > argument squashing, which is an optimization that will

Re: [ansible-project] Question about the script module

2015-11-25 Thread Tomasz Kuchta
Thanks, Brian! On Wednesday, 25 November 2015 20:05:12 UTC, Brian Coca wrote: > > yes, loops normally execute each task independently per iteration. > > -- > Brian Coca > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Toshio Kuratomi
On Wed, Nov 25, 2015 at 5:19 PM, Joanna Delaporte wrote: > Hi Toshio, > > ANSIBLE_LIBRARY is unset. > > $ ansible --version > ansible 2.0.0 > config file = /etc/ansible/ansible.cfg > configured module search path = /usr/share/ansible > > With a little investigation,

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Joanna Delaporte
Thanks! I found the paths on my machines so I could set them in my ansible.cfg file. I appreciate the tip! For reference, I found the modules dirs in these two locations on my current control hosts: /usr/local/lib/python2.7/dist-packages/ansible/modules (Ubuntu 14.04)

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Joanna Delaporte
Hi Toshio, ANSIBLE_LIBRARY is unset. $ ansible --version ansible 2.0.0 config file = /etc/ansible/ansible.cfg configured module search path = /usr/share/ansible With a little investigation, I see the long listing of /usr/share/ansible/packaging shows all files with a date of April 2014,

Re: [ansible-project] Attempting to yum install multiple packages using with_items results in Python AttributeError: 'list' object has no attribute 'split'

2015-11-25 Thread Joanna Delaporte
I have also tried the following dictionary layouts, which resulted in the same 'list object' python error: - yum: name: "{{ item }}" state: present with_items: - ypbind - rpcbind And this: - yum: name: - ypbind - rpcbind state: present Running the task with only

[ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Joanna Delaporte
Okay, so the yum module might actually be broken, because when I replaced "yum" with "package", it started working correctly. This works: - package: name="{{ item }}" state=present with_items: - ypbind - rpcbind This doesn't: - yum: name="{{ item }}" state=present with_items: -

[ansible-project] Attempting to yum install multiple packages using with_items results in Python AttributeError: 'list' object has no attribute 'split'

2015-11-25 Thread Joanna Delaporte
Good afternoon, I am attempting to install multiple packages on a CentOS 7 server. I am using 2.0.0-rc1. I keep running into a python error. I tried using a yum task in a role, using with_items like so: - yum: name={{ item }} state=present with_items: - ypbind - rpcbind I think that is

[ansible-project] Question about the script module

2015-11-25 Thread Tomasz Kuchta
Hello, If the script module is used in a loop, will it transfer the script to the remote on every iteration of the loop? Thank you, Tomek -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

Re: [ansible-project] yum module might be broken in RC1...

2015-11-25 Thread Brian Coca
package will just call yum module, the main difference is in the 'squashing', another check you can do to confirm this is set the env var ANSIBLE_SQUASH_ACTIONS="apt,pkgng", which would avoid that in yum (which is part of default list). -- Brian Coca -- You received this message because you

Re: [ansible-project] Attempting to yum install multiple packages using with_items results in Python AttributeError: 'list' object has no attribute 'split'

2015-11-25 Thread Joanna Delaporte
Hi David, Thanks. I also tried it with more indentation, with the same error result: - yum: pkg={{ item }} state=present with_items: - ypbind - rpcbind On Wednesday, November 25, 2015 at 11:46:27 AM UTC-6, David Karban wrote: > > Hi, > > if I`m looking right, it can be indentation

[ansible-project] Looping through hosts in a playbook

2015-11-25 Thread Roger Sherman
I'm working on a playbook, that will be deploying a java app to four hosts. I want it to push the app out to each node, making sure the correct directories exist to push the new version to - that's the easy part, and it can do all four of the nodes at once, no issue there. But then I want it to

[ansible-project] Re: {{ inventory_hostname }} variable

2015-11-25 Thread Roger Sherman
Hi Richard, I'm sure there's more than one way to skin a cat, here, but I set up my hosts file thusly, and it does the job: [rails] rails0 ansible_ssh_host=xxx.xxx.xxx.xxx rails1 ansible_ssh_host=xxx.xxx.xxx.xxx rails2 ansible_ssh_host=xxx.xxx.xxx.xxx I believe when doing this, you're just

[ansible-project] Re: Unable to auth via ec2.py

2015-11-25 Thread Rob Wilkerson
Well, crap. Looks like this could be related to #981 (https://github.com/ansible/ansible-modules-core/issues/981) or #1701 (https://github.com/ansible/ansible-modules-core/issues/1701). Or both. On Tuesday, November 24, 2015 at 2:03:51 PM UTC-5, Rob Wilkerson wrote: > > I thought this would be

[ansible-project] Re: Unable to auth via ec2.py

2015-11-25 Thread Rob Wilkerson
One more note on this that I just realized is that the profile only seems to fail for the ec2 module. This works: - name: Key Pair | Ensure that the appropriate keypair exists ec2_key: profile: Socrates name: "soc-{{ env_short }}" region: "{{ aws_region }}" state: present

[ansible-project] --start-at-task seems broken on 2.0.0-stable

2015-11-25 Thread Brandon Heller
[prior post had a link in the title - if a mod can delete that post, would be great, thanks!] I'm having some issues with ansible 2.0.0-stable (b69942a), where --start-at-task can't find the task with that name. I think a clue may be in --list-tasks, which doesn't list task names for tasks

Re: [ansible-project] Question about the script module

2015-11-25 Thread Brian Coca
yes, loops normally execute each task independently per iteration. -- 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

Re: [ansible-project] Attempting to yum install multiple packages using with_items results in Python AttributeError: 'list' object has no attribute 'split'

2015-11-25 Thread David Karban
Hi, if I`m looking right, it can be indentation problem, - yum: name={{ item }} state=present with_items: - ypbind - rpcbind David Karban Linux server specialist/Specialista na správu linuxových serverů www.karban.eu 2015-11-25 18:40 GMT+01:00 Joanna Delaporte

Re: [ansible-project] Re: {{ inventory_hostname }} variable

2015-11-25 Thread Brian Coca
inventory_hostname should always reflect the 'hostname alias' provided by the inventory, if you ALWAYS want the IPs use ansible_ssh_host (ansbile_host in 2.0 and above). -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] Syntax for limiting to batches?

2015-11-25 Thread Brian Coca
you could whip up something like: groups['dbservers'][:groups['dbservers']|len/2] groups['dbservers'][groups['dbservers']|len/2:] currently there is no var for tracking the split groups other than 'current one' which is play_hosts -- Brian Coca -- You received this message because you are

[ansible-project] Re: Looping through hosts in a playbook

2015-11-25 Thread Alexander Artemenko
Roger, did you try to use "with_items" ( http://docs.ansible.com/ansible/playbooks_loops.html#standard-loops)? среда, 25 ноября 2015 г., 22:24:02 UTC+3 пользователь Roger Sherman написал: > > I'm working on a playbook, that will be deploying a java app to four > hosts. I want it to push the app

[ansible-project] Is it possible to use jinja2 templates in tasks?

2015-11-25 Thread Alexander Artemenko
Hi! I'm trying to implement firewall rules management with ufw module. Idea is to have list of ports to be accessable from sources somewhere in host variables. For example, I have this in my group_vars/consul_servers: ufw_open_docker_from_sources: - {port: 8500, src: consul_agents} -

Re: [ansible-project] hipchat module problem

2015-11-25 Thread Igor Khomyakov
Hi, I'm afraid hipchat module is not very well tested with private hipchat servers. There is a chance that we've missed something here. I committed some changed to the module in regard of API V2 support so I would be happy to help you. Please drop me a line off the list. I hope I will be able to

Re: [ansible-project] Re: stuck on "Missing become password"

2015-11-25 Thread Dave Thacker
On Tuesday, November 24, 2015 at 6:53:56 PM UTC-6, Brian Coca wrote: > > become_user defaults to root, no need to specify, same with become_method: > sudo > > can you run with - and show the output? also what ansible version? > OSs involved? > > Thanks for your help, The OS is Oracle

Re: [ansible-project] Re: stuck on "Missing become password"

2015-11-25 Thread Dave Thacker
On Tuesday, November 24, 2015 at 6:53:56 PM UTC-6, Brian Coca wrote: > > become_user defaults to root, no need to specify, same with become_method: > sudo > > can you run with - and show the output? also what ansible version? > OSs involved? > > Sorry, omiited the ansible version.

[ansible-project] Some task hangs execution

2015-11-25 Thread Ivan Nunes
This task is locking up on some servers. It's not often that happens. - name: Reconfigure console shell: dpkg-reconfigure -f noninteractive console-setup -u sudo: yes tags: - newpdv - grub What I can improve on that task? Best Regards. -- You received this message because you

[ansible-project] Ansible extra modules - ec2_vpc_subnet

2015-11-25 Thread AC
Hi, I have installed ansible on centos 6 and it seems that I am getting the error : state is not legal... [user@server tasks]$ ansible-playbook -v -i /home/user/ansible/ansible_hosts /home/user/ansible/amazon_vpc.yml ERROR: state is not a legal parameter in an Ansible task or handler

Re: [ansible-project] Is it possible to use jinja2 templates in tasks?

2015-11-25 Thread Brian Coca
no, you cannot use jinja to generate tasks on the fly. you should look into the different lookups as you can combine them to create what you need in a single task. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To