[ansible-project] Inventory variable not available in hostvars

2016-08-24 Thread Douglas Hammond
I'm trying to create client configs for each host in a group. When the template is parsed the inventory set variable is not available in the template. bareos/Defaults/main.yml bareos_client_fileset: SomeFileSet bareos/tasks/main.yml - name: Install director client configs template:

[ansible-project] Random SSH unreachables using delegation in Ansible 2.1.0

2016-08-24 Thread Soren Olegnowicz
So I have a task that delegates a template deployed to one server to a different server. When this task is run on just a single server I get no errors. However if I try running this delegation task on all the servers (16 servers) it needs to be deployed to in a single play, then it will only

[ansible-project] SSH not working to client machine (ssh from command line works) - Ansible 2.1.0

2016-08-24 Thread Anfield
When I run ansible all -m ping - from the controller to the client (ubuntu) I get the following - Loaded callback minimal of type stdout, v2.0 <10.10.128.0> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 10.10.128.0 <10.10.128.2> ESTABLISH SSH CONNECTION FOR USER: None

Re: [ansible-project] Ansible documentation search function

2016-08-24 Thread Stefan Klatt
Hi Matt, thx. I'm really blind Regards Stefan Am 23.08.2016 um 22:47 schrieb Matt Martz: > There is search built into the docs page. > > Go to http://docs.ansible.com/ansible/index.html > > In the bottom right hand corner of your browser there should be a > black box that says "Search this

[ansible-project] Unable to pass ec2 variable from one ansible host to another

2016-08-24 Thread deepak . dimri2016
I want to pass "private_dns_name" of my newly created ec2 instances to some other host in my ansible play book. I have tried using set_fact module to define the variable but no luck! This is ansible playbook entries for host1 Enter code here... - name: new EC2 instance hosts: host1

[ansible-project] Re: Recording generated template configurations

2016-08-24 Thread Soren Olegnowicz
Ok guys, I got it working. Thank you for all the help! On Monday, August 22, 2016 at 11:05:54 AM UTC-4, Soren Olegnowicz wrote: > > Anybody know of a way to deploy a template to multiple servers, but have > each configuration simultaneously centralized on another server? I do not > want the

[ansible-project] Re: Ansible 2.1.0 - How to avoid dashes error with rendering templates (like my.cnf)

2016-08-24 Thread Sergio (cepxio)
Hi again, I found the problem. I did not realize from change the name of the values in template and I only changed it in the defaults file. *myisam-recover-options = {{ mysql_myisam-recover-options }}* So, I correct it and it works. Thanks! El martes, 23 de agosto de 2016, 13:03:25

Re: [ansible-project] Can I define my inventory in my playbook directory?

2016-08-24 Thread Brian Coca
inventory can be anywhere you want, it just defaults to /etc/ansible/hosts, you can set in ansible.cfg or on the command line with -i switch. group/host_vars just need to be in the same directory your inventory files are. -- Brian Coca -- You received this message because you are

[ansible-project] Can I define my inventory in my playbook directory?

2016-08-24 Thread skinnedknuckles
Management Node: - CentOs 6 - Ansible 2.1 Remote Node: - Windows 7 - Powershell 3.0 My playbooks are all saved in /home/username/playbooks. My inventory file is saved as /etc/ansible/hosts. And I also use the file etc/ansible/group_vars/windows.yml I find it a hassle to

[ansible-project] Re: Commas in Docker env option for values of environment variables?

2016-08-24 Thread pporada
James, Just in case you're still stuck on this for whatever reason, we figured out how to make this work with the docker_container module. Ansible doesn't have this documented. - name: Start Webhook docker_container: image: "company/webhook:{{microservice_webhook_tag}}" name:

[ansible-project] Re: Commas in Docker env option for values of environment variables?

2016-08-24 Thread pporada
I'm affected by this as well using the new docker_container ansible module. On Wednesday, February 18, 2015 at 1:24:20 AM UTC-5, James Webster wrote: > > I'm using Consul in combination with a service registration framework > (progrium/registrator Docker image) to play around with distributed

[ansible-project] Re: ansible-playbook command, remote host unreachable, but ssh is fine

2016-08-24 Thread jguillette
With fresh eyes on the problem today, the last response in the GitHub issue clicked for me. I was defining "user@ip" in my ansible hosts file, instead of declaring the user with the `--user=` flag in the playbook command. Solved my own problem, hopefully this helps someone else. On Tuesday,

[ansible-project] ansible become time out issue

2016-08-24 Thread hzj...@foxmail.com
hello, come accross a problem, there is this special hosts, i just cannot use ansible to become root user; here is the ouput [root@localhost ~]# ansible host1 -m raw -a 'uname -a' -u admin4A -b --become-method=su -k -K SSH password: SU password[defaults to SSH password]:

[ansible-project] Ansible playbook freezes at getting output with communicate()

2016-08-24 Thread Ahmed
I'm using Ansible to auto configure a device that has an OS similar to Cisco IOS, the below playbook works fine but every 4 or 5 times I run it, it freezes, I'm setting ANSIBLE_DEBUG=1, when it freezes, it does at the following line: *3723 1472024022.64431: getting output with

Re: [ansible-project] Ansible documentation search function

2016-08-24 Thread Brian Coca
You also have `ansible-doc` which will give you module documentation w/o the need to download anything. On Wed, Aug 24, 2016 at 5:09 AM, Marcus Franke < marcus.fra...@ssw-trading.com> wrote: > On Tue, Aug 23, 2016 at 11:21:17PM +0200, Kai Stian Olstad wrote: > > > > Thanks Matt, I don't see it,

Re: [ansible-project] Recording generated template configurations

2016-08-24 Thread Brian Coca
use `localhost` instead of the host name, unless you defined 'localhost' in your inventory it should avoid remote connections and use in the 'local' connection plugin. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] testing python / ansible modules

2016-08-24 Thread Alex Leonhardt
Hi All, I was wondering if anyone ever wrote tests for an ansible module ? I'm trying to instantiate m = AnsibleModule(argument_spec=dict()) but it keeps failing with "Error: Module unable to decode valid JSON on stdin.", before I can even call m.params = {} or something to give the

Re: [ansible-project] Module "include_vars" fails with when using "file" parameter

2016-08-24 Thread Frank Thommen
On 08/23/2016 03:38 PM, Frank Thommen wrote: Hi, when using the include_module with the "file" parameter, it fails with AttributeError: 'NoneType' object has no attribute 'startswith'. [...] Seems to have been fixed in the latest 2.2 release f. -- You received this message because

Re: [ansible-project] Ansible documentation search function

2016-08-24 Thread Marcus Franke
On Tue, Aug 23, 2016 at 11:21:17PM +0200, Kai Stian Olstad wrote: > > Thanks Matt, I don't see it, but I now why now. I use the add-on NoScript in > Firefox, and have it to disable all 3rd party javascript. > > Enabled the javascript and tested the search, but I like the built in Sphinx > search

[ansible-project] Re: Simple cisco IOS show version

2016-08-24 Thread Bharath Bharadwaj
Thank you! On Wednesday, August 24, 2016 at 3:20:15 AM UTC-4, John Barker wrote: > > I've added a comment with the the corrected playbook sample > > https://gist.github.com/privateip/11b042e569585ee9248a > > Regards, > John Barker > > On Wednesday, 10 August 2016 15:32:23 UTC+1, Bharath Bharadwaj

[ansible-project] Re: Simple cisco IOS show version

2016-08-24 Thread John Barker
I've added a comment with the the corrected playbook sample https://gist.github.com/privateip/11b042e569585ee9248a Regards, John Barker On Wednesday, 10 August 2016 15:32:23 UTC+1, Bharath Bharadwaj wrote: > > Hi All, > > I'm new to Ansible and yml, my goal is to automate a part of network >

[ansible-project] Ansible 2.1.0 docker_container module not pulling image when missing on remote host

2016-08-24 Thread ishan jain
The documentation says: *Repository path and tag used to create the container. If an image is not found or pull is true, the image will be pulled from the registry.* But a simple usage of docker_container: *- name: start docker container* * docker_container:* *name: