[ansible-project] template source file not getting from closest role

2014-12-17 Thread Steve Kieu
Hi All, I have role A and then B (dependent on A). I have sudoers.j2 in the templates folder for each role with different content. When a host with role B applied ansible run the task on role A and apply the source file which is not the one in templates folder of role B. Is it expected behav

Re: [ansible-project] How to use ec2 modules user_data field?

2014-12-17 Thread Rob White
Hi Chris, What's your approach for logging in to your Win boxes using WinRM after this step? Ansible docs direct you to configure a vars file with ansible_ssh_pass set however every ec2 instance is going to have a different password. I've created a module for using boto to get the ec2 passwor

[ansible-project] Re: win_chocolatey not a legal parameter

2014-12-17 Thread Rob White
Thanks! I saw the file was already added to the devel branch. I downloaded that branch and chocolatey module can now be called from playbook. On Wednesday, 17 December 2014 22:11:16 UTC+11, Netanel Maman wrote: > > solution: > > create this file: ansible/lib/ansible/modules/extras/windows/__i

Re: [ansible-project] Re: Crash with 'ansible-doc --list'

2014-12-17 Thread Hugo Posca
Hi Eduardo, thanks for the feedback! This problem is very strange indeed... At my work, with pip 1.5.4 and Ansible 1.8.2, "ansible-doc --list" works! Here, I have pip 1.5.6 and it doesn't work :( One strange thing here is that when I make a "pip --version", insted of simply showing the version I

[ansible-project] Re: limit/subset as variable

2014-12-17 Thread DomaNitro
Sorry i just realized there is a simlear question https://groups.google.com/forum/#!topic/ansible-project/c8bdwPtR640 On Wednesday, December 17, 2014 11:53:52 PM UTC+1, DomaNitro wrote: > > Hi, > > I have play that includes another play > > apps.yml > - name: apps.yml | provision > hosts: app

[ansible-project] limit/subset as variable

2014-12-17 Thread DomaNitro
Hi, I have play that includes another play apps.yml - name: apps.yml | provision hosts: apps include: provision.yml - name: apps.yml | common stuff hosts: apps roles: - do_common_stuff provision.yml - hosts: "{{subset_var}}" connection: local gather_facts: no pre_tasks:

[ansible-project] Re: Using Ansible on Ubuntu to stop+rm+run docker containers; getting an ssh error regarding docker socket

2014-12-17 Thread Kenneth Wolcott
Hello again; I tried a number of things and ran the script again and this time I got different output (enclosed below). Is there a bug in Ansible with ssh? Is there a bug in the Ansible docker module? Do I have an improperly configured/installed Ansible? Is Mac OS X (Yosemite), Ansib

[ansible-project] Re: URI and Until

2014-12-17 Thread Matt Hughes
The error was 'contains' isn't a method. 'find' is though. I love Ansible, but the error reporting really leaves a lot to be desired. Still have no idea what was wrong with the first example. Maybe until and when have different conditional syntaxes? On Wednesday, December 17, 2014 4:22:20 PM

[ansible-project] URI and Until

2014-12-17 Thread Matt Hughes
I have a cluster of N nodes. Cluster status is reported by http://cluster_fqdn/health/. I want to do a rolling upgrade of every node in my cluster with serial: 1. I don't want to proceed to the next node until http://cluster_fqdn/health/ reports the cluster is healthy. Trying to use ur

[ansible-project] Using Ansible on Ubuntu to stop+rm+run docker containers; getting an ssh error regarding docker socket

2014-12-17 Thread Kenneth Wolcott
Hi; I have a Mac Book Air running Yosemite that hosts a Ubuntu 14.04 (server) VirtualBox guest OS. I'm using docker 1.4.0 on the Ubuntu guest. I'm using Ansible 1.8.2 and I'm using the Ansible docker module. I'm running the ansible playbook as myself (kwolcott, not root) and trying to c

Re: [ansible-project] vmware/esx/vsphere module - planning

2014-12-17 Thread John-Paul Herold
Hey guys, I've recently been looking to control vsphere via Ansible which lead me to this thread. Noticed a couple pull requests that were before the September 26th git core-module/extra-module split by the Ansible team. Just wanted to revive this thread for those that had PRs that were closed b

Re: [ansible-project] Should tags work on includes?

2014-12-17 Thread Michael DeHaan
"That's a common logical error that I've come across too. Tags aren't called, they are only applied in playbooks, someone might be able to word that better." Unless I didn't follow, I don't think that was the above misunderstanding, but it is true that the include directive "labels" things with ta

Re: [ansible-project] Should tags work on includes?

2014-12-17 Thread Quentin Stafford-Fraser
Thanks, all... I can work around them for now. Apologies for not seeing the earlier message. I did try searching but didn't find it. Ironic, on a Google site :-) Q -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from thi

Re: [ansible-project] Should tags work on includes?

2014-12-17 Thread Stephen Granger
That's a common logical error that I've come across too. Tags aren't called, they are only applied in playbooks, someone might be able to word that better. The only way to call a tag is when running ansible playbook. I spoke to Michael after Ansible fest San Fran and he mentioned that other are h

Re: [ansible-project] Should tags work on includes?

2014-12-17 Thread Michael DeHaan
Hi, This was asked recently. Tags work on task includes, and roles. They do not currently do anything on playbook level includes. This is something we may consider after the current refactoring effort (1.9 timeframe) completes. On Wed, Dec 17, 2014 at 1:00 PM, Quentin Stafford-Fraser < quen

[ansible-project] Should tags work on includes?

2014-12-17 Thread Quentin Stafford-Fraser
Hello all... In the docs here it suggests that I should be able to add tags to an include statement like this: --- - include: site.yml tags=foo This simple playbook works fine unless I try actually doing anything with tags, like this: ansible-pla

[ansible-project] Re: variable access in a template being looped using with_items

2014-12-17 Thread Torsten Reinhard
I forgot to mention I´m using Ansible 1.6.6. solved it now after cleaning my eyes:-) Variables can be accessed within the template - if the spelling of the variable is correct. I missed one character in a very_long_variable_name_with_some_underscores - and that causes the problem. It 1st look

Re: [ansible-project] During "gathering facts", ssh encounters a situation; ansible suggests using -vvvv; where does one set this?

2014-12-17 Thread Kenneth Wolcott
Thank you, Matt. It was so obvious, and yet I couldn't see it until last night :-) I have more output now and it looks really weird; another thread for that. Thanks, Ken On Wed, Dec 17, 2014 at 5:20 AM, Matt Martz wrote: > You set it on the command line such as: > > ansible-playbook -i invento

[ansible-project] variable access in a template being looped using with_items

2014-12-17 Thread Torsten Reinhard
Hi, I have a playbook like: --- ... vars_files: - vars/stage-{{stage}}.yml - vars/extint/stage-{{stage}}.yml roles: - { role: extint, params: "{{ extint_instance }}" } ... Inside the role "extint" I have this task, processing a template in a loop ... - name: create generate

Re: [ansible-project] Either/or tasks

2014-12-17 Thread Brian Coca
not currently, what you have is what works. On Wed, Dec 17, 2014 at 6:57 AM, Jon Warbrick wrote: > Apologies if this is a FAQ, but I haven't found been able to find it > anywhere. > > I keep wanting a pattern where something happens if a variable is true and > something positively doesn't happen

Re: [ansible-project] Re: win_chocolatey not a legal parameter

2014-12-17 Thread Netanel Maman
I opened issue with explain why it's true only in theory. https://github.com/ansible/ansible-modules-extras/issues/159 On Wednesday, December 17, 2014 5:01:22 PM UTC+2, Brian Coca wrote: > > for windows modules the detected extension is .ps1 > > On Wed, Dec 17, 2014 at 6:11 AM, Netanel Maman >

Re: [ansible-project] Re: win_chocolatey not a legal parameter

2014-12-17 Thread Brian Coca
for windows modules the detected extension is .ps1 On Wed, Dec 17, 2014 at 6:11 AM, Netanel Maman wrote: > solution: > > create this file: ansible/lib/ansible/modules/extras/windows/__init__.py > make clean > make install > > -- > behind the scenes: > setuptools don't copy win_chocolatey.py to in

[ansible-project] Re: Shortcut for making Ansible groups from EC2 tags

2014-12-17 Thread Quentin Stafford-Fraser
Ah - and Matt Martz has pointed me at this pull request which says a bit more than mine did. Good stuff...! https://github.com/sivel/ansible-modules-core/commit/dcd6ab735abba283cba22d345e233b57ac47f8ac -- You received this message because you are subscribed to the Google Groups "Ansible Pro

[ansible-project] Re: Shortcut for making Ansible groups from EC2 tags

2014-12-17 Thread Quentin Stafford-Fraser
I added a note to the add_host docs about this and posted a pull request, but it was rejected on the basis that: - add_host is non persistent, it only adds hosts to the in memory inventory for the current run, also it bypasses the host loop so it does NOT run on multiple hosts. Due to

Re: [ansible-project] Cannot use add_host when using ec2.py?

2014-12-17 Thread Quentin Stafford-Fraser
This may also be useful for anyone having this problem: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/ansible-project/cpnrBRxLy0E/W-nqNgYkR2sJ -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from th

Re: [ansible-project] Ansible copy respective file with {{ item }}

2014-12-17 Thread Brian Coca
add_host allows you to add per host facts - add_host: name={{ item.hostIP }} copyfile={{ item.filename }} - copy: src={{copyfile}} ... On Wed, Dec 17, 2014 at 3:18 AM, Fazal-e-Rehman Khan wrote: > I have a yml file for variables which goes like this. > > - newHosts >- hostIP: 192.168.1.22 >

Re: [ansible-project] Ansible copy file module to Windows host fails

2014-12-17 Thread Matt Martz
Ansible 1.8.x does not support the copy module for windows hosts. A win_copy module was just merged into devel (which will become 1.9): https://github.com/ansible/ansible-modules-core/pull/384 https://github.com/ansible/ansible/pull/9611 On Tuesday, December 16, 2014, Jeffrey Liu wrote: > Hi A

Re: [ansible-project] URI module / json parsing problem with escaped doueble qoutes

2014-12-17 Thread Lucas, Sascha
Hi, From: myself Date: Tue, 16. Dec 2014 11:48 > According to http://json.org/ in the picture "string" > double quotes (quotation mark) must be escaped. So I assume it is valid > JSON. If so, there must be something wrong with the python parser? httplib2 returns the content right (backslash escap

Re: [ansible-project] During "gathering facts", ssh encounters a situation; ansible suggests using -vvvv; where does one set this?

2014-12-17 Thread Matt Martz
You set it on the command line such as: ansible-playbook -i inventory - site.yml On Monday, December 15, 2014, Kenneth Wolcott wrote: > Hi; > > During "gathering facts", ssh encounters a situation; ansible > suggests using -; where does one set this? > > I'm using bash shell to call A

Re: [ansible-project] Disable host key checking when triggering Ansible from Python app

2014-12-17 Thread Matt Martz
In the future these types of questions should probably go to ansible-devel, not ansible-project. You can do this by manipulating the "constant". import ansible.constants as C C.HOST_KEY_CHECKING = False On Wednesday, December 17, 2014, wrote: > Hello everyone, > > I'm trying to trigger Ansibl

[ansible-project] Re: Anyone seen a "Resource temporarily unavailable error"?

2014-12-17 Thread sibaprasad mahapatra
Did anybody find any solution to this error. I am having the same issue not. I am using Ansible 1.7.2 with Eucalyptus cloud. msg: Instance creation failed => InternalFailure: Not enough resources: no cluster controller is currently available to run instances. Thanks, Sp On Thursday, June 1

[ansible-project] Re: Crash with 'ansible-doc --list'

2014-12-17 Thread Eduardo Bergavera
Hi Hugo, I just updated to 1.8.2 today. It's my first time to know that there is a command like ansible-doc. My machine is Mac OS X Yosemite 10.10.1. However, the command ansible-doc --list works on my machine. Here is additional info: Pip version 1.4.1 Ansible 1.8.2 I suggest that you rem

[ansible-project] msg: Instance creation failed => InternalFailure: Not enough resources: no cluster controller is currently available to run instances.

2014-12-17 Thread sibaprasad mahapatra
Hi I am getting the following error when trying to create an instance over Eucalyptus cloud. msg: Instance creation failed => InternalFailure: Not enough resources: no cluster controller is currently available to run instances. Have anybody come across this error ever. Thanks, Sibaprasad -

[ansible-project] Applying a delay to with_items steps

2014-12-17 Thread Guido Accardo
Hi, I've been using Ansible for 5 months now and I must say I love it. My life is much more easier now! Well, I have a question for you, there is chance to apply a delay to the following task without using "do-until"?: - name: stop running processes uri: url="http://{{ api_ip }}/targe

Re: [ansible-project] Roles, tasks and composability

2014-12-17 Thread jaime . irurzun
> There will not be a task that applies roles, the "role" directive is for > this. > But, AFAIK, the "role" directive can only be applied from a playbook, not from another role. So, if the task suggested by Juho will not exist, how can you apply to a role the logic that is wrapped as another

[ansible-project] Ansible output (changed/ok)

2014-12-17 Thread wolfedale
Hi All, There is a way to control somehow the output from Ansible? The reason I'm asking is that I have a lot of problem to have on the result the real summary. The main problem I have with modules like: (SELINUX, CHKCONFIG, SERVICES and so on). Let's say I want to install Apache, add it to th

[ansible-project] Ansible copy file module to Windows host fails

2014-12-17 Thread Jeffrey Liu
Hi All, I'm running Ansible 1.8.2 on a CentOS 6.6 server. I'm trying to copy a file to a windows host, but the copy module fails. The weird thing is that I do see that it does PUT the file over to the remote windows host, but it fails when it tries to execute the powershell to rename the fil

[ansible-project] GTID Mysql replication?

2014-12-17 Thread Evan Tahler
Hi! Is there any (planned) support for GTID-based replication in the mysql-replication package ? It looks like someone starte

[ansible-project] Re: fetch does not support space in file name ?

2014-12-17 Thread Devin Christensen
Ran into this same issue today on the latest devel branch. When fetching a file with a space in the name and "fail_on_missing: true" I get the error: "the remote file does not exist". Removing the space from the filename fixes it. Here's what my task looks like: - name: fetch result files fet

[ansible-project] During "gathering facts", ssh encounters a situation; ansible suggests using -vvvv; where does one set this?

2014-12-17 Thread Kenneth Wolcott
Hi; During "gathering facts", ssh encounters a situation; ansible suggests using -; where does one set this? I'm using bash shell to call Ansible playbooks on a Mac running as a VirtualBox server and on a Ubuntu 14.04 (server) VirtualBox vm and the Ubuntu vm hosts a pair of Docker container

[ansible-project] first time user - having ssh eror while trying to run a playbook

2014-12-17 Thread Eugene Goldberg
Greetings, For my first time use of Ansible, I have attempted to run a playbook, which installs OpenStack to a local computer. My target computer has a fresh Fedora 20 install, is all up to date, and has an IP of 10.0.0.32 The computer, from which I ran this playbook is a Ubuntu 14 VM, and has an

[ansible-project] dynamically updating ansible_sudo_pass

2014-12-17 Thread Scott McWhirter
Hi all, I'm currently working on a role that resets passwords based on a new policy. This includes the user that is set up to communicate with the host over ssh. Once I reset the users password, sudo will no longer work, since the password is different. I've attempted to dynamically set it usin

Re: [ansible-project] Loop over two tasks

2014-12-17 Thread Cindy Lamm
I have as well the need to loop over a set of tasks. In my case it's about incremental updating of the schema in a database. I know there are tools like Flyway and schema-evolution-manager that would easily do the trick but they're not wished to be used in this project for different reasons. So

[ansible-project] Disable host key checking when triggering Ansible from Python app

2014-12-17 Thread pavel
Hello everyone, I'm trying to trigger Ansible run from a Python application and I can't disable host key checking. I've already tried: - passing parameter via extra_vars in the same manner as from CLI, and then transforming it into a dictionary the same way as in ansible-playbook - assembling

[ansible-project] Either/or tasks

2014-12-17 Thread Jon Warbrick
Apologies if this is a FAQ, but I haven't found been able to find it anywhere. I keep wanting a pattern where something happens if a variable is true and something positively doesn't happen if the variable is false (or unset). For example having a service running or not running. Is there any w

[ansible-project] Re: win_chocolatey not a legal parameter

2014-12-17 Thread Netanel Maman
solution: create this file: ansible/lib/ansible/modules/extras/windows/__init__.py make clean make install -- behind the scenes: setuptools don't copy win_chocolatey.py to install directory without __init__.py file. ansible detect plugin by .py extension, so win_chocolatey not detected.. On M

Re: [ansible-project] Re: cross-playbook serial?

2014-12-17 Thread Hagai Kariti
Thanks Brian, that looks like it could work. I'm not sure I like doing a small refactor for this though. Plus I still have to copy the 'role:' sections. Eh.. I'll think of something. Thanks! On Tue, Dec 16, 2014 at 9:33 PM, Brian Coca wrote: > > so I think you need 4 plays, make the tasks into th

[ansible-project] Ansible copy respective file with {{ item }}

2014-12-17 Thread Fazal-e-Rehman Khan
I have a yml file for variables which goes like this. - newHosts - hostIP: 192.168.1.22 filename: file1 - hostIP: 192.168.1.23 filename: file2 I am using add_host: {{ item.hostIP }} with_items {{ newHosts }} to add hosts on the runtime. I want to copy respective f