[ansible-project] Ansible's philosophy about running playbooks against localhost and use lot of delegate_to in roles

2016-01-18 Thread Sylvain
Hi ! I'm currently thinking what is the best way to build a complete infrastructure based on Ansible 2. For example, take an installation of WordPress which need Apache and MySQL : 1/ I have 3 standalones roles which uses for each task *delegate_to* with a variable : - role apache

Re: [ansible-project] Which variation of YAML does ansible use?

2016-01-18 Thread Matt Martz
Ansible uses pyyaml as its YAML parser. Per the pyyaml docs it is YAML 1.1. See http://pyyaml.org On Monday, January 18, 2016, Matthew Vernon wrote: > Hi, > > There are a number of different versions of YAML (1.0,1.1,1.2), and > within these versions choices that can be made

Re: [ansible-project] Can't get expect to work - The pexpect python module is required

2016-01-18 Thread jaadu
Thank you very much! On Monday, January 18, 2016 at 9:15:54 AM UTC-5, Matt Martz wrote: > > pexpect must be installed on the hosts that you are targeting. So if you > want to run a command with expect on a remote server called server1, > pexpect must be installed on server1. > > You may wish

Re: [ansible-project] [Ansible role] action level reusability and order

2016-01-18 Thread David Karban
Hi, it is actually not possible on task level, Ansible is going thru them from top to bottom. But there can be some possibilities how to do it: - (maybe) try to think about your own Execution strategy: http://docs.ansible.com/ansible/playbooks_strategies.html but really do not know, if it is

Re: [ansible-project] Ansible 2.0 not on EPEL yet

2016-01-18 Thread David Karban
Hi, it is in a epel-testing for now: yum install ansible --enablerepo=epel-testing for one time install. David Linux server specialist/Specialista na správu linuxových serverů www.karban.eu 2016-01-18 12:41 GMT+01:00 Shamim Mirzai : > Hi > > Having received the announcement

[ansible-project] error using copy module in conjunction with become and with_items

2016-01-18 Thread R.B. Boyer
This is the error: fatal: [localhost]: FAILED! => {"failed": true, "msg": "ERROR! privilege output closed while waiting for password prompt:\nBECOME-SUCCESS-adezzvrxzmmrvcjmhockfqrcaofjafii\nd463cad77a9f7ca30d2eee449d151ffec7209a6b\n" } Relevant file snippets to reproduce: # ansible.cfg

[ansible-project] Ansible 2.0 not on EPEL yet

2016-01-18 Thread Shamim Mirzai
Hi Having received the announcement email that version 2.0 is out, I'm now trying to update my version of ansible on Centos 6 and it appears that the version in EPEL is still 1.9. Here's the relevant page on RepoView: https://dl.fedoraproject.org/pub/epel/6/x86_64/repoview/ansible.html Am I

[ansible-project] Which variation of YAML does ansible use?

2016-01-18 Thread Matthew Vernon
Hi, There are a number of different versions of YAML (1.0,1.1,1.2), and within these versions choices that can be made about which tags to include and so on. Is the dialect of YAML that ansible uses defined anywhere? This isn't just pedantry, it does make a difference (e.g. to which strings are

[ansible-project] Can't get expect to work - The pexpect python module is required

2016-01-18 Thread jaadu
I am playing around with Ansible on Ubuntu 14.04 VMs and can't seem to get expect to work. I have tried installing ansible and pexpect via apt-get and pip, but keep getting the following error: fatal: [vagrant]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args":

[ansible-project] ec2 mudoles can't create ec2 instances

2016-01-18 Thread lwq Adolph
Hi, everyone: My base environment are below: - ubuntu 14.04 64bit - ansible 1.9.4 - python 2.7.9 64bit ​ I am green hand to ansible.I study ansible documentation for ec2 module http://docs.ansible.com/ansible/ec2_module.html . I want to create at least 100 ec2 instances on

[ansible-project] [Ansible role] action level reusability and order

2016-01-18 Thread Wukang Lin
Hi, all. I have review some similar topic on task reusability of ansible role and task execute order. But i still cannot get an answer to my problem. here it is: suppose i have a role named 'service_a', and I have write a set of tasks in 'service_a/tasks/tasks.yml', such like this:

[ansible-project] `run_once` used together with `when` not generating expected result

2016-01-18 Thread Qiu Yu
Hi, I have following playbook, which I expect it to run only once, on one of the `group2` hosts. site.yml --- - hosts: - group1 - group2 roles: - { role: test } roles/test/tasks/main.yml --- - include: test.yml when: inventory_hostname in groups['group2']

[ansible-project] [Ansible Roles & Task Reusability] Action level reusability and custom order execution

2016-01-18 Thread Wukang Lin
Hi, all, I have review some topics on task reuse and execution order in this forum, but i still can't get a way to solve my problem. My problem is some like this: Suppose I have a role named 'housekeeper', which will get mails from mailbox and get in house and do something. I hope I can write

[ansible-project] Re: Ansible windows kerberos issue

2016-01-18 Thread J Hawkesworth
Hi Mayur, You usually get that message when kerberos is not configured properly on your ansible controller. Please ensure you have followed the setup instructions here: http://docs.ansible.com/ansible/intro_windows.html#configuring-kerberos Without this, the ansible controller does cannot

Re: [ansible-project] Can't get expect to work - The pexpect python module is required

2016-01-18 Thread Matt Martz
pexpect must be installed on the hosts that you are targeting. So if you want to run a command with expect on a remote server called server1, pexpect must be installed on server1. You may wish to run an apt task to instal pexpect on all remote servers before trying to use the expect module. On

Re: [ansible-project] `run_once` used together with `when` not generating expected result

2016-01-18 Thread Brian Coca
run_once limits the task to run on the 'first host' in the current play, so the when only evaluates for that host, if that host is not in 'group2' it will be skipped an no other host will be evaluated. -- Brian Coca -- You received this message because you are subscribed to the Google Groups

[ansible-project] Getting pieces from a list with ansible

2016-01-18 Thread Dan C
Hi, I know I am provably misunderstanding somthing, but I am not able to find a solution to my (rather simple) problem. What I want is quite easy. I have a list and I want to get the last (or first) X elements of it: Example: - set_fact: mylist={{["l10","j82","b83","8jk","j83"]|list}} -

Re: [ansible-project] Ansible 2.0 not on EPEL yet

2016-01-18 Thread George Khan
Hi all! David, when will be ansible2 stable release and available in epel-stable? --- Best regards, Me. понедельник, 18 января 2016 г., 19:25:49 UTC+5 пользователь David Karban написал: > > Hi, > > it is in a epel-testing for now: yum install ansible > --enablerepo=epel-testing for one time

[ansible-project] Re: How to handle data common to a set of roles?

2016-01-18 Thread Yassen Damyanov
Chris, thanks; so then using task-less roles doesn't look so bad... I'll give a try to both approaches and see. Thanks again! -Y. On Thursday, December 31, 2015 at 6:52:57 PM UTC+2, chris meyers wrote: > > The task-less role is good because you can capture the dependency fully in > the role

[ansible-project] Re: multiple when condition not working in playbook

2016-01-18 Thread bablu
solved. On Sunday, January 17, 2016 at 2:25:53 AM UTC+5:30, bablu wrote: > > Hi, > > Trying to write playbook with when conditional statement. > > However, it always choose last command (/home/user//bin/) to > execute even though condition matches with another domainname. > > playbook.yml

Re: [ansible-project] `run_once` used together with `when` not generating expected result

2016-01-18 Thread Qiu Yu
On Monday, January 18, 2016 at 7:30:58 AM UTC-8, Brian Coca wrote: > > run_once limits the task to run on the 'first host' in the current > play, so the when only evaluates for that host, if that host is not in > 'group2' it will be skipped an no other host will be evaluated. > Does that mean

Re: [ansible-project] `run_once` used together with `when` not generating expected result

2016-01-18 Thread Brian Coca
This is tricky, task includes are now dynamic in 2.0. Before 2.0 the when: does not stop the include from happening, it just gets applied to each included task, in 2.0 it does that only if the when cannot be resolved with the information available at the time of the include. -- Brian Coca --

Re: [ansible-project] Which variation of YAML does ansible use?

2016-01-18 Thread Brian Coca
Currently ansible states pyyaml as a requirement w/o specifying version, unless some incompatibility appears that will continue to be the case. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

Re: [ansible-project] `run_once` used together with `when` not generating expected result

2016-01-18 Thread Qiu Yu
On Monday, January 18, 2016 at 10:49:08 AM UTC-8, Brian Coca wrote: > > This is tricky, task includes are now dynamic in 2.0. Before 2.0 the > when: does not stop the include from happening, it just gets applied > to each included task, in 2.0 it does that only if the when cannot be > resolved

Re: [ansible-project] `run_once` used together with `when` not generating expected result

2016-01-18 Thread Larry Smith
I banged my head against this same thing months ago until it finally clicked on what was going on! On Monday, January 18, 2016 at 10:30:58 AM UTC-5, Brian Coca wrote: > > run_once limits the task to run on the 'first host' in the current > play, so the when only evaluates for that host, if that

[ansible-project] Re: Ansible 2.0 -- the "new" correct way to update??

2016-01-18 Thread Larry Smith
I ended up going down the virtualenv path for this. Covers OSX as well as Linux. I went this path in order to have the ability to switch back and forth between versions in order to test functionality between 1.9.x and 2.0

Re: [ansible-project] Ansible-galaxy with http/s proxy

2016-01-18 Thread Bill WANG
Thanks, the way to install via https works for me. On Sunday, January 10, 2016 at 6:34:00 PM UTC+11, Александр Костырев wrote: > > forgot to mention! > > ansible-1.9.4-1.fc23.noarch > > cat Ansiblefile.yml > - src: jtyr.environment > path: roles > > if Ansiblefile.yml contains > > - src:

Re: [ansible-project] [Ansible 2.*] Problem with variables

2016-01-18 Thread Brian Coca
Many things in just one task. first debug only takes 1 msg= or 1 var= argument, so instead of: debug: msg={{item.user}} msg={{item.comment}} msg={{item.uid}} msg={{item.password}} should be : debug: var=item or: debug: msg="{{item.user}}, {{item,comment}}, {{item.uid}} ..." or: debug:

[ansible-project] ERROR! duplicate loop in task: - please explain why

2016-01-18 Thread Steve Kieu
Hi Team, I am trying ansible 2 and not sure why it got error below TASK [postgres : include] ** task path: /home/stevek/ansible-jumbo/roles/postgres/tasks/main.yml:10 fatal: [test-pg-all]: FAILED! => {"failed": true, "reason": "ERROR!

Re: [ansible-project] One question about the default variables of dependency roles override in ansible 2.0

2016-01-18 Thread rella . guo
Actually, I did test by setting the var of role B in vars folder of role A. Role A defines role B in meta. Override is failed. Role B would be executed before role A. So role A cannot override any vars of role B. If I want override vars of role B, I must set vars in playbook or inventory,

Re: [ansible-project] Ansible 2.x - AWS ec2_asg problem -> AttributeError: 'module' object has no attribute 'InvalidInstance'

2016-01-18 Thread Alex Leonhardt
Did you try on a vm (or in docker?) with old ansible 1.9.4? Just to prevent environmental "interference". On Tuesday, 19 January 2016, wrote: > I am running a playbook to update an existing AWS Autoscaling group and > have started to encounter an error message that I

[ansible-project] Re: Confusing "variable is undefined" error

2016-01-18 Thread Guy Knights
I still haven't found the source of this issue, and I've just discovered another variable that is showing the same behaviour. I might also mention the structure of my group_vars folder; these vars I'm having trouble with are in separate files within *inventory/group_vars/all/*. As I understand

[ansible-project] Re: Ansible 2.0 -- the "new" correct way to update??

2016-01-18 Thread Chris Short
It seems to me that the issue revolves around upgrading setuptools. I'm totally okay with uninstalling and reinstalling Ansible but I am curious about "better" ways of upgrading if people would like to share them. On Friday, January 15, 2016 at 11:29:58 AM UTC-5, Slim Slam wrote: > > As you may