[ansible-project] Is it possible to use a variable as a key in a key:value pair?

2017-05-19 Thread Dayton Jones
I'm trying to populate a file based on some default vars and I'm wondering if the following is possible (and if so, how?) because I've been unable to get it to work. given: ansible 2.3.0.0 python version = 2.7.13 (default, May 10 2017, 20:04:28) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]

[ansible-project] Updating an IAM cert

2017-05-19 Thread Josh Smift
We uploaded an IAM cert to AWS, and now need to update the certificate (the contents). On the theory that a lost of this stuff is idempotent, I thought this task, which we used to upload it in the first place, would work to update it as well: - name: configure IAM certificates iam_cert:

[ansible-project] Re: Tower and "Check Mode"?

2017-05-19 Thread Cody John
The documentation shows this for Job Type: - *Check*: Setting the type to Check does not execute the playbook, but does check the syntax, test the environment setup, and report problems. Think of this as running the playbook in dry-run mode and having it report “changed” when an

[ansible-project] Re: win_user is not repeatable

2017-05-19 Thread Trond Hindenes
Please post an issue on Ansible's github page with this info, make sure you include your Ansible version. On Friday, May 19, 2017 at 8:27:53 AM UTC+2, gary mcwilliams wrote: > > A minimal playbook > > --- > # vim: set filetype=ansible ff=unix ts=2 sw=2 ai expandtab : > # > # Playbook to

Re: [ansible-project] [WARNING]: While constructing a mapping from /etc/ansible/playbooks/touch.yml, line 2, column 3, found a duplicate dict key (tasks). Using last defined value only.

2017-05-19 Thread Anfield
Ok, nevermind. Only one instance of the tasks:, but multiple tasks underneath. Thanks! > -- 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] [WARNING]: While constructing a mapping from /etc/ansible/playbooks/touch.yml, line 2, column 3, found a duplicate dict key (tasks). Using last defined value only.

2017-05-19 Thread Anfield
Only one task for each playbook? Didnt know that > > -- 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

Re: [ansible-project] [WARNING]: While constructing a mapping from /etc/ansible/playbooks/touch.yml, line 2, column 3, found a duplicate dict key (tasks). Using last defined value only.

2017-05-19 Thread Kai Stian Olstad
On 19. mai 2017 16:38, Anfield wrote: I have the following playbook and I got the above error. This created the directory but not the file. Any ideas? --- - hosts: local tasks: - name: create a file if it doesnt exist file: path: /home/ansible/touchfile.txt state: touch

Re: [ansible-project] With_items over the loops with "when", can we write multiple "when" in one task?

2017-05-19 Thread Raj Martha
HI Coca, some reason the play skipping even though there is a "started" word in allcluster_status.stdout, can you please give me exact "when" this is what i have - name: "Starting Messaging clusters " shell: "{{ was_home }}bin/wsadmin.sh -lang jython -username {{

[ansible-project] Re: [WARNING]: While constructing a mapping from /etc/ansible/playbooks/touch.yml, line 2, column 3, found a duplicate dict key (tasks). Using last defined value only.

2017-05-19 Thread Anfield
When I comment out the directory piece and run it again, ansible will create the file > -- 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] [WARNING]: While constructing a mapping from /etc/ansible/playbooks/touch.yml, line 2, column 3, found a duplicate dict key (tasks). Using last defined value only.

2017-05-19 Thread Anfield
I have the following playbook and I got the above error. This created the directory but not the file. Any ideas? --- - hosts: local tasks: - name: create a file if it doesnt exist file: path: /home/ansible/touchfile.txt state: touch mode: 0755 tasks: - name:

Re: [ansible-project] Re: Cannot execute a command on remote machine

2017-05-19 Thread Dick Visser
It looks like your command depends on some environment vars. Can you try the shell module instead of command? That should handle it better. Dick On 18 May 2017 at 19:25, Lee Sigauke wrote: > Accidentally submitted this before I finished so just adding more details. > > shell:

[ansible-project] win_user is not repeatable

2017-05-19 Thread gary mcwilliams
A minimal playbook --- # vim: set filetype=ansible ff=unix ts=2 sw=2 ai expandtab : # # Playbook to configure the environment - hosts: createuser tasks: - name: create user run_once: true win_user: name: gary password: 'B0bP4ssw0rd123!^'