[ansible-project] Re: Unable to reach to EC2 instance using dynamic inventory with a single region

2016-09-22 Thread Alexander H. Laughlin
Hi Nirav, This is a tough nut to crack. Which version of Ansible are you using? Which region is it specifically that is failing? Or is it just any region that is specified over 'any' region? Alex On Thursday, September 22, 2016 at 3:43:38 AM UTC-7, Nirav Radia wrote: > > Hi Alex, > >

[ansible-project] How to point `vars` to matching `vault_`?

2016-09-22 Thread jason . bornhoft
I'm using vault for the first time (previously used dotenv) and am following the instructions here . Specifically, the line: You should adjust the variables in the vars file to point to the

Re: [ansible-project] ios clear command expect confirm

2016-09-22 Thread Peter Sprygada
In 2.1 there is no way to handle this. We added a new capability in 2.2 (current devel branch) that will allow you to do this. The new task would look like this: - name: Clear counters connection: local tasks: - ios_command: host: "{{ inventory_hostname }}" commands:

Re: [ansible-project] How Network Modules using openssh controlpersist feature?

2016-09-22 Thread Peter Sprygada
If I want to use openssh ControlPersist function or similar feature, I can't use module_util/shell.y & basic.y, I have to write myself basc library? > Yes, it would require a completely new SSH library (or changes to paramiko) to support the same functionality as ControlPersist. The updates

[ansible-project] Re: Which of .bashrc, .profile, .bash_profile, .bash_login or .login is used?

2016-09-22 Thread Harald Kubota
I guess there is no other way. Maybe I just take it as a nudge to try to use more Ansible modules and less shell scripts. Harald -- 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

Re: [ansible-project] How do I use openSSH instead of paramiko (i.e. no connection:local) for IOS modules?

2016-09-22 Thread Peter Sprygada
The short answer is you don't. Traditional network devices that dump an authenticated session to the "CLI" effectively prevent you from being able to use OpenSSH as a programmable transport in the way that is implemented for other systems. WRT point #2. SSH connections being made by network

Re: [ansible-project] Which of .bashrc, .profile, .bash_profile, .bash_login or .login is used?

2016-09-22 Thread Harald Kubota
Thanks Kai. The explanation is very much appreciated as it sheds some light into this (for me) unexpected behavior. Harald -- 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,

Re: [ansible-project] YAML and colons -- cannot escape / quote -- need help

2016-09-22 Thread Kai Stian Olstad
On 22. sep. 2016 20:29, johhue wrote: In this case, the error string I am looking for is "has failures: true" The string I am looking for has a colon and I cannot for the life of me escape it. I have tried single quotes, double quotes, quotes around the whole thing, quotes only around the

[ansible-project] YAML and colons -- cannot escape / quote -- need help

2016-09-22 Thread johhue
Hello ... I am invoking puppet agent -t from Ansible, and since some puppet non-zero return codes are OK, I am parsing the stdout to look for errors and fail if any errors are seen. In this case, the error string I am looking for is "has failures: true" The string I am looking for has a colon

[ansible-project] JSON formatting on register value.

2016-09-22 Thread Anthony Cheng
I have a playbook that use the S3 module to list items: - name: List s3 bucket local_action: module: s3 bucket: "{{ S3_BUCKET_NAME }}" mode: list register: S3_LIST_ITEM The result I output to a file using lineinfile: name: Output to folder local_action: module: lineinfile

[ansible-project] from_json on registered variable

2016-09-22 Thread Anthony Cheng
I have a playbook that use the S3 module to list items: {code} - name: List s3 bucket local_action: module: s3 bucket: "{{ S3_BUCKET_NAME }}" mode: list register: S3_LIST_ITEM {code} The result I output to a file using lineinfile: {code} name: Output to folder local_action:

[ansible-project] Re: unable to install exchange 2016 using ansible

2016-09-22 Thread Matt Davis
There's actually a bug in pywinrm for older Pythons (eg, the one in RHEL7) that is triggered by enabling kerberos delegation. It's fixed in pywinrm 0.2.1. On Saturday, September 17, 2016 at 6:50:01 AM UTC-7, Chandra Pandey wrote: > > > I am getting below message after enable delegation , also

[ansible-project] Docker - how to exec after brining up container

2016-09-22 Thread Joaquin Menchaca
After brining up a docker container - name: Docker Container docker: name: superduper image: mycompany/superduper/"{{ git_hash_short }}" state: reloaded pull: always command: bash "{{ path_to_script }}"/wrapper.sh env: APP_ROOT: "{{ app_root }}" with docker

Re: [ansible-project] Role played on all hosts, condition "when: 'group' in group_names" not correctly evaluated

2016-09-22 Thread Brian Coca
a) you cannot make a role conditional, any 'when' is just applied to the tasks in the role b) with_ runs before when: (so you can make execution conditional by item) c) use |default({}) to skip the task and avoid the error -- Brian Coca -- You received this message because you are

[ansible-project] ansible ec2.py discovery with assume_role & MFA

2016-09-22 Thread matthieu . isoard
Hi Before using Ansible with some roles I prepared, I wanted to check the ec2.py autodiscovery script. However, all the accounts I have setup on AWS need to login to a first account which uses MFA & then assume a role before being able to do something. It appears that I cannot make it work,

[ansible-project] Re: tomcat is not getting started using ansible

2016-09-22 Thread Athul
By changing the *started* to *restarted *in the task file make the problem go away. Before: - name: Start Tomcat service: name=tomcat state=started enabled=yes After: - name: Start Tomcat service: name=tomcat state=restarted enabled=yes On Monday, 14 September 2015 17:50:06 UTC+5:30,

[ansible-project] Attempting to install elasticsearch plugins results in error "msg: implementation error: unknown type path requested for plugin_bin"

2016-09-22 Thread 'Sean Meacher' via Ansible Project
Hi, I'm attempting to automate the creation of elasticsearch nodes via ansible, using the appropriate module. in the yml I have: - name: add elasticsearch plugins elasticsearch_plugin: state=present name="license" also tried: elasticsearch_plugin: state=present

[ansible-project] Is get_url resumable ?

2016-09-22 Thread Stuart Axon
I'm converting a script uses wget -c to be able to resume download of a large file - wget -q --show-progress -c "http://somedistr/somedistro.zip; -P /tmp/myproject Can get_url resume interrupted downloads in the same way ? -- You received this message because you are subscribed to the

[ansible-project] How do I use openSSH instead of paramiko (i.e. no connection:local) for IOS modules?

2016-09-22 Thread Johann Lo
I'm trying to use the ios networking modules (ios_config, ios_template etc.) and the only way I can get them to work properly is via connection: local and passing the parameters to each task via something like this - hosts: all connection: local gather_facts: no tasks: - name: define

[ansible-project] Role played on all hosts, condition "when: 'group' in group_names" not correctly evaluated

2016-09-22 Thread Valérie P
Hi, I am using Ansible 2.2.0 to configure network devices. I have a problem with the evaluation of a condition using "when: 'group' in group_names'. The playbook is : - name: Configure topologies hosts: "{{ TOPO }}" strategy: debug vars_files: - "vars_file/{{TOPO}}.yml" roles:

[ansible-project] Re: Ansible tower setup failure

2016-09-22 Thread Oleg Ilyin
Kumar, did you solve this issue? I tried to install ansible-tower-setup-3.0.2 from scratch and got similar error. понедельник, 29 августа 2016 г., 17:24:57 UTC+3 пользователь Utsav Kumar написал: > > I downloaded the war file for ansible, and after changing the passwords in > inventory

[ansible-project] Too long inventory file location causing ansible error.

2016-09-22 Thread Jerome Lulu
if the file path of the inventory file is too long, I am getting this error. I am using ansible 2.1.1.0. Is this a bug on these release? ERROR! Unexpected Exception: 'AnsibleLoader' object has no attribute 'get_single_data' to see the full traceback, use -vvv ansible (2.1.1.0) cffi (1.8.3)

Re: [ansible-project] How to conditionally include other playbooks?

2016-09-22 Thread Tristan Muntsinger
Is there an alternative solution to get the behavior I'd like? -Tristan On Wednesday, September 21, 2016 at 5:08:35 PM UTC-7, Brian Coca wrote: > > playbooks cannot be included conditionally. > > > -- > Brian Coca > -- You received this message because you are subscribed to the Google

[ansible-project] Re: Limit hosts for nested playbook

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
I suggest you create some groups in your inventory, so instead of - hosts: all you run against - hosts: webservers (obviously webservers is just an example of a group). This is nice when reading playbooks as you instantly get a notion of what roles are needed on the different types of server

[ansible-project] Re: Which of .bashrc, .profile, .bash_profile, .bash_login or .login is used?

2016-09-22 Thread rup
> > I ran into the same issue and spent many hours trying to find out why it > wasn't using the profiles. I like your LAST test to see which profile was > being used, very clever. > I solved it by simply sourcing each profile I needed prior to the step I wanted to execute. For example: -

Re: [ansible-project] Limit hosts for nested playbook

2016-09-22 Thread Brian Coca
no -- 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+unsubscr...@googlegroups.com. To post to this group, send email to

[ansible-project] Re: reconfigure winrm via ansible?

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
Well it turns out you can. Here's a hacky playbook to tweak the timeout --- # This playbook is intended to modify winrm parameters # this is involved because changing winrm properties isn't allowed over winrm # so the play uses a scheduled task to do it - hosts: windows-boxes gather_facts:

Re: [ansible-project] Command not working on remote host through shell module or playbook

2016-09-22 Thread bablu
Can some one help here. On Wednesday, September 21, 2016 at 10:14:16 PM UTC+5:30, bablu wrote: > > > That's working. > > But I guess here i have to hard code the command. Is there any way where i > can pass any command at the run time to execute on the remote host. > > I saw the raw

Re: [ansible-project] Examples of Multiple Instances of a "thing" on a single box

2016-09-22 Thread Dick Davies
If you're talking about one httpd install with multiple vhosts, I'd have an httpd role that sets up a standard apache layout and then other roles to create .vhost files (Apaches 'Include' directive helps here). Apply the httpd role everywhere you need it and add the other roles on top. If you

[ansible-project] Ansible 1.9 - how to combine variables from different sources

2016-09-22 Thread P
Hi all, so far most of our servers were running RHEL 6. We are going to prepare some RHEL 7 servers soon and I am now trying to rewrite our playbooks to be able cope with different releases of the same OS. There is of course the "old" way of doing this like: - name: Install packages for RHEL6

Re: [ansible-project] Which of .bashrc, .profile, .bash_profile, .bash_login or .login is used?

2016-09-22 Thread Kai Stian Olstad
On 22.09.2016 11:38, Harald Kubota wrote: Thanks Kai for the reply. Unfortunately it does not solve the problem. When using /bin/sh which is a link to /bin/dash, or when using /bin/bash, it seems that none of the user's profile files is used. A shell do distinguish between a login mode and a

[ansible-project] Re: Unable to reach to EC2 instance using dynamic inventory with a single region

2016-09-22 Thread 'Nirav Radia' via Ansible Project
Hi Alex, Replacing availability zone in ec2.ini also gave me the same error: ERROR! The file inventory/ec2.py is marked as executable, but failed to execute correctly. If this is not supposed to be an executable script, correct this with `chmod -x inventory/ec2.py`. Inventory script

[ansible-project] reconfigure winrm via ansible?

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
Hi, Has anyone managed to successfully reconfigure winrm remotely via a playbook? I need to up some timeouts and increase the MaxMemoryPerShellMB I know that reconfiguring winrm is one of the things that is specifically disallowed over winrm remoting, but I imagine a scheduled task could do

[ansible-project] Re: Unable to reach to EC2 instance using dynamic inventory with a single region

2016-09-22 Thread Alexander H. Laughlin
Hi Nirav, Sorry about the lack of clarity in my suggestion. I was referring to your ec2.ini, specifically: # AWS regions to make calls to. Set this to 'all' to make request to all regions # in AWS and merge the results together. Alternatively, set this to a comma # separated list of regions.

Re: [ansible-project] Which of .bashrc, .profile, .bash_profile, .bash_login or .login is used?

2016-09-22 Thread Harald Kubota
Thanks Kai for the reply. Unfortunately it does not solve the problem. When using /bin/sh which is a link to /bin/dash, or when using /bin/bash, it seems that none of the user's profile files is used. I cannot modify /etc/pam.d/* or /etc/ssh/sshd* because everything works just fine when using

Re: [ansible-project] Re: Open Source: Usage/Licence/Community Edition?

2016-09-22 Thread Mark Janssen
Ansible is covered by the GNU GPL version 3, as seen here: https://github.com/ansible/ansible/blob/devel/COPYING If you distribute a modified version you need to release the source-code under the GPL-3 as well. Otherwise... speak to your lawyer ;) On Wed, Sep 21, 2016 at 7:54 PM, Dan

[ansible-project] Re: Unable to reach to EC2 instance using dynamic inventory with a single region

2016-09-22 Thread 'Nirav Radia' via Ansible Project
Hi Alex, 1) I am not sure I understood "placing the availability zone in the region field instead of the region" correctly. Because when I exported "us-west-2a" as AWS_DEFAULT_REGION (which my ec2.py is using to filter region), it gave me error like this: ERROR! The file inventory/ec2.py is

[ansible-project] Re: ansible asks for sudo password but local command does not

2016-09-22 Thread Mike Michel
jep, NOPASSWD: for /bin/sh did it. I don't have (or should i say "had") root on the target server. thanks Mike -- 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

[ansible-project] Re: unable to install exchange 2016 using ansible

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
The following ought to remove pykerberos and install kerberos and latest version of pywinrm. Latest version of pywinrm also needs requests-kerberos to make kerberos connections - if it doesn't get installed, install that too. Check what you have installed using 'pip list' pip uninstall

[ansible-project] Re: lookup and default value

2016-09-22 Thread fanvalt
I cannot proceed that way when using a with_items loop. I want to read parameters from a .csv file, and if the parameter does not exist , I want to set it to space. i guess the issue is that instead of comparing the parameter value to an empty list, it does test if the parameter name is empty.

[ansible-project] Re: Kerberos Delegation Issues

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
Have a look in the event logs. I suspect all you will see is 'Access is denied'. Worth looking on the network share machine (if it is an actual windows box). If it isn't a windows box I guess there will be some kind of samba share logging that you could examine too. Make sure that you are

[ansible-project] Re: win_service play fails when run without an optional parameter

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
I would definitely clean up your installation and try again - you definitely only need one version of the module. I wonder perhaps if you have a source installation or a pip installation as well as an RPM install? On Monday, September 19, 2016 at 7:16:03 PM UTC+1, Dimitri Yioulos wrote: > >