# Ansible Project

**URL:** https://forum.ansible.com/c/archives/ansible-project/30.md?page=257

[Latest](https://forum.ansible.com/latest.md) · [Categories](https://forum.ansible.com/categories.md) · [Tags](https://forum.ansible.com/tags.md)

**Page:** 258

---

## [Ansible vars precendence](https://forum.ansible.com/t/ansible-vars-precendence/27644)

<div class="topic-metadata">

**Author:** [@Pranay\_Nanda](https://forum.ansible.com/u/Pranay_Nanda)\
**Replies:** 1\
**Last updated:** [May 27, 2018, 6:52pm UTC](https://forum.ansible.com/t/ansible-vars-precendence/27644 "2018-05-27T18:52:20Z")

</div>

I have an Ansible playbook that I want to load custom variables for. I do not have access to the inventory but I wish to classify the variables by their host names which can be classified in groups. The jobs would be fir…

---

## [Multiple conditions not working](https://forum.ansible.com/t/multiple-conditions-not-working/27642)

<div class="topic-metadata">

**Author:** [@Pranay\_Nanda](https://forum.ansible.com/u/Pranay_Nanda)\
**Replies:** 4\
**Last updated:** [May 27, 2018, 6:12pm UTC](https://forum.ansible.com/t/multiple-conditions-not-working/27642 "2018-05-27T18:12:06Z")

</div>

I want to run few tasks in shell if they satisfy a condition. Strangely the task runs if the second condition is satisfied even though the first one fails. name: ods shell: “/something {{state}}” when: ((ods) and (not…

---

## [Setting windows host/machine name using ansible](https://forum.ansible.com/t/setting-windows-host-machine-name-using-ansible/27640)

<div class="topic-metadata">

**Author:** [@Ali\_Khawaja](https://forum.ansible.com/u/Ali_Khawaja)\
**Replies:** 2\
**Last updated:** [May 27, 2018, 12:32pm UTC](https://forum.ansible.com/t/setting-windows-host-machine-name-using-ansible/27640 "2018-05-27T12:32:00Z")

</div>

Hi, is there a way in ansible to set the name of the windows host when we are creating the ec2 instance or maybe change it afterwards? Thanks Ali

---

## [win\_domain: The specified argument 'InstallDNS' was not recognized](https://forum.ansible.com/t/win-domain-the-specified-argument-installdns-was-not-recognized/27641)

<div class="topic-metadata">

**Author:** [@Ali\_Khawaja](https://forum.ansible.com/u/Ali_Khawaja)\
**Replies:** 0\
**Last updated:** [May 27, 2018, 11:49am UTC](https://forum.ansible.com/t/win-domain-the-specified-argument-installdns-was-not-recognized/27641 "2018-05-27T11:49:14Z")

</div>

Hi, i am creating a domain controller using win\_domain. when i ran the script again, its failing every time on win\_domain command with the following error message. TASK \[Promote server as Domain Controller\] \*\*\*\*\*\*\*\*\*\*\*…

---

## [ec2 creation vs ec2 retreival: different value of registered variable](https://forum.ansible.com/t/ec2-creation-vs-ec2-retreival-different-value-of-registered-variable/27639)

<div class="topic-metadata">

**Author:** [@David\_Villasmil](https://forum.ansible.com/u/David_Villasmil)\
**Replies:** 1\
**Last updated:** [May 27, 2018, 10:12am UTC](https://forum.ansible.com/t/ec2-creation-vs-ec2-retreival-different-value-of-registered-variable/27639 "2018-05-27T10:12:51Z")

</div>

Remove all formatting please

---

## [Ansible find module , can path parameter include regex ?](https://forum.ansible.com/t/ansible-find-module-can-path-parameter-include-regex/27628)

<div class="topic-metadata">

**Author:** [@Saranya\_N](https://forum.ansible.com/u/Saranya_N)\
**Replies:** 2\
**Last updated:** [May 27, 2018, 9:25am UTC](https://forum.ansible.com/t/ansible-find-module-can-path-parameter-include-regex/27628 "2018-05-27T09:25:57Z")

</div>

Hi all , I'm trying to find files dit.xml under particular directories. Rather than mentioning the directories as a list like below Path : \[ /opt/local/version\_v1.3.1 , /opt/local/version\_v1.3.0 \] I tried /opt/local/…

---

## [Why does 'when' conditional test fail without jinja2 templating delimiters?](https://forum.ansible.com/t/why-does-when-conditional-test-fail-without-jinja2-templating-delimiters/27638)

<div class="topic-metadata">

**Author:** [@Darren\_S](https://forum.ansible.com/u/Darren_S)\
**Replies:** 2\
**Last updated:** [May 27, 2018, 7:34am UTC](https://forum.ansible.com/t/why-does-when-conditional-test-fail-without-jinja2-templating-delimiters/27638 "2018-05-27T07:34:40Z")

</div>

ansible 2.5.3 on OpenBSD 6.3 amd64 config file = /etc/ansible/ansible.cfg configured module search path = \[u'/home/dspruell/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'\] ansible python modu…

---

## [concatenate multiple results](https://forum.ansible.com/t/concatenate-multiple-results/27635)

<div class="topic-metadata">

**Author:** [@David\_Villasmil](https://forum.ansible.com/u/David_Villasmil)\
**Replies:** 2\
**Last updated:** [May 26, 2018, 6:51pm UTC](https://forum.ansible.com/t/concatenate-multiple-results/27635 "2018-05-26T18:51:21Z")

</div>

Hellos guys, I have a result from ec2\_instance\_facts, and i can get the ip addresses like: \` name: Get IP addresses from results set\_fact: inject\_ips: “{{ facts\_output | json\_query(‘instances.public\_ip\_address’) }}…

---

## [Counting and Displaying no of Successful and Failed Task in a playbook](https://forum.ansible.com/t/counting-and-displaying-no-of-successful-and-failed-task-in-a-playbook/27637)

<div class="topic-metadata">

**Author:** [@Vino\_B](https://forum.ansible.com/u/Vino_B)\
**Replies:** 0\
**Last updated:** [May 26, 2018, 1:15pm UTC](https://forum.ansible.com/t/counting-and-displaying-no-of-successful-and-failed-task-in-a-playbook/27637 "2018-05-26T13:15:26Z")

</div>

Hi All, I have a play book, i need a help on how to display no of failed and successfull task as the out always , PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Run Ansible playbook progragmatically?](https://forum.ansible.com/t/run-ansible-playbook-progragmatically/27631)

<div class="topic-metadata">

**Author:** [@Richard\_O\_Hara](https://forum.ansible.com/u/Richard_O_Hara)\
**Replies:** 3\
**Last updated:** [May 26, 2018, 12:06pm UTC](https://forum.ansible.com/t/run-ansible-playbook-progragmatically/27631 "2018-05-26T12:06:08Z")

</div>

I have a python application that calls the code below with the plan to run an Ansible playbook programmatically via the Ansible API versus using something like subprocess. The code below runs but nothing actually seems …

---

## [how to set permissions on an S3 bucket](https://forum.ansible.com/t/how-to-set-permissions-on-an-s3-bucket/27634)

<div class="topic-metadata">

**Author:** [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Replies:** 0\
**Last updated:** [May 26, 2018, 2:17am UTC](https://forum.ansible.com/t/how-to-set-permissions-on-an-s3-bucket/27634 "2018-05-26T02:17:24Z")

</div>

I can’t figure out how to set permissions on an S3 bucket after creating it. The s3 module will create a bucket (mode: create), but if I run it twice, the second time it says that the bucket already exists and does noth…

---

## [Need help to refer child group in jinja2 template file](https://forum.ansible.com/t/need-help-to-refer-child-group-in-jinja2-template-file/27612)

<div class="topic-metadata">

**Author:** [@Balaji1](https://forum.ansible.com/u/Balaji1)\
**Replies:** 1\
**Last updated:** [May 25, 2018, 6:07pm UTC](https://forum.ansible.com/t/need-help-to-refer-child-group-in-jinja2-template-file/27612 "2018-05-25T18:07:35Z")

</div>

Hello All, Please help or suggest how I can solve this problem. I will pass -e group=“1” when calling playbook. Playbook - file.yml hosts: servers\_{{group}} task: … … inventory \[servers\_grp1\] server1 \[server…

---

## [os\_recordset module not working](https://forum.ansible.com/t/os-recordset-module-not-working/27632)

<div class="topic-metadata">

**Author:** [@sriman\_dharba](https://forum.ansible.com/u/sriman_dharba)\
**Replies:** 0\
**Last updated:** [May 25, 2018, 5:56pm UTC](https://forum.ansible.com/t/os-recordset-module-not-working/27632 "2018-05-25T17:56:44Z")

</div>

Modifying subject line Hello I am using ansible 2.3.3.0 on openstack pike shade==1.28.0 ansible==2.3.3.0 python-designateclient==2.7.0 python-openstackclient==3.12.0 When i am trying to create a A record after ins…

---

## [Validate the deployment from role level](https://forum.ansible.com/t/validate-the-deployment-from-role-level/27630)

<div class="topic-metadata">

**Author:** [@BIJAY\_PARIDA](https://forum.ansible.com/u/BIJAY_PARIDA)\
**Replies:** 0\
**Last updated:** [May 25, 2018, 3:29pm UTC](https://forum.ansible.com/t/validate-the-deployment-from-role-level/27630 "2018-05-25T15:29:44Z")

</div>

Hi, I want to validate two inventories files if they contain matching string and continue with the deployment based on the validation result. I don’t want to have a pre-task at the deployment level. I want the validati…

---

## [How to supress the \* in the anisble playbook output](https://forum.ansible.com/t/how-to-supress-the-in-the-anisble-playbook-output/27625)

<div class="topic-metadata">

**Author:** [@Venkatsm\_V](https://forum.ansible.com/u/Venkatsm_V)\
**Replies:** 0\
**Last updated:** [May 25, 2018, 4:30am UTC](https://forum.ansible.com/t/how-to-supress-the-in-the-anisble-playbook-output/27625 "2018-05-25T04:30:47Z")

</div>

When we execute the ansible playbook, We have \* in screen. I would like to remove for my environment. HOw to do that ?. I tried the callback plugin suggested in https://stackoverflow.com/questions/49907174/ansible-remove…

---

## [Disabling F5 Big IP pool member from the pool list](https://forum.ansible.com/t/disabling-f5-big-ip-pool-member-from-the-pool-list/27623)

<div class="topic-metadata">

**Author:** [@Josephsimon\_Arokiara](https://forum.ansible.com/u/Josephsimon_Arokiara)\
**Replies:** 0\
**Last updated:** [May 24, 2018, 11:02pm UTC](https://forum.ansible.com/t/disabling-f5-big-ip-pool-member-from-the-pool-list/27623 "2018-05-24T23:02:47Z")

</div>

Hi All, I have been trying the below code with state - absent . it ran successffully without changing the state from enabled to disabled. I cant see any Access denied error. - name: Remove pool member from pool bigip…

---

## [WSMan does not exist.](https://forum.ansible.com/t/wsman-does-not-exist/27613)

<div class="topic-metadata">

**Author:** [@MKPhil](https://forum.ansible.com/u/MKPhil)\
**Replies:** 3\
**Last updated:** [May 24, 2018, 9:00pm UTC](https://forum.ansible.com/t/wsman-does-not-exist/27613 "2018-05-24T21:00:09Z")

</div>

I’m trying to set up a Windows 2008R2 server using the ConfigureRemotingForAnsible.ps1 script but I get the error: \` dir : Cannot find drive. A drive with the name ‘WSMan’ does not exist. At line:98 char:3 dir 'WSM…

---

## [inventory\_hostname in path to create directory with win\_file grief..](https://forum.ansible.com/t/inventory-hostname-in-path-to-create-directory-with-win-file-grief/27609)

<div class="topic-metadata">

**Author:** [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Replies:** 4\
**Last updated:** [May 24, 2018, 8:40pm UTC](https://forum.ansible.com/t/inventory-hostname-in-path-to-create-directory-with-win-file-grief/27609 "2018-05-24T20:40:05Z")

</div>

Hi, I thought I had this project nailed and then they tell me they need a directory created called: c:\\working\\hostname where hostname is the name of the computer… I thought I could use: name: make working dir win…

---

## [Nested variable](https://forum.ansible.com/t/nested-variable/27607)

<div class="topic-metadata">

**Author:** [@David\_Villasmil](https://forum.ansible.com/u/David_Villasmil)\
**Replies:** 5\
**Last updated:** [May 24, 2018, 8:35pm UTC](https://forum.ansible.com/t/nested-variable/27607 "2018-05-24T20:35:51Z")

</div>

Hello guys, I’ve got this set\_fact: hosted\_zone\_id: "{{ dns\_results | json\_query('HostedZones\[?Name==mydomain.com.\].\[Id\]') | regex\_replace ('/hostedzone/', '') }}" But i want to get the id from any of my domains, so…

---

## [powershell: not found](https://forum.ansible.com/t/powershell-not-found/27620)

<div class="topic-metadata">

**Author:** [@Nojan\_Sheybani](https://forum.ansible.com/u/Nojan_Sheybani)\
**Replies:** 5\
**Last updated:** [May 24, 2018, 7:02pm UTC](https://forum.ansible.com/t/powershell-not-found/27620 "2018-05-24T19:02:10Z")

</div>

I keep getting this error whenever I try to run a playbook. I haven’t been able to find a solution to this, can anyone help?

---

## [Ansible Json filter](https://forum.ansible.com/t/ansible-json-filter/27618)

<div class="topic-metadata">

**Author:** [@Ankur\_Gupta](https://forum.ansible.com/u/Ankur_Gupta)\
**Replies:** 0\
**Last updated:** [May 24, 2018, 6:18pm UTC](https://forum.ansible.com/t/ansible-json-filter/27618 "2018-05-24T18:18:13Z")

</div>

Hello All, I have a situation where i am trying to remove key: value from json output. but i am not getting expected result. Please help me what I am doing wrong here? "get\_ec2\_id.instances\[0\].tags": { "Name": "te…

---

## [How to set environment dynamically](https://forum.ansible.com/t/how-to-set-environment-dynamically/27616)

<div class="topic-metadata">

**Author:** [@David\_Villasmil](https://forum.ansible.com/u/David_Villasmil)\
**Replies:** 1\
**Last updated:** [May 24, 2018, 5:40pm UTC](https://forum.ansible.com/t/how-to-set-environment-dynamically/27616 "2018-05-24T17:40:50Z")

</div>

Hello Guys, So, i have a vars file with something like this: \`

---

## [Ho to use different answers for the same questions?](https://forum.ansible.com/t/ho-to-use-different-answers-for-the-same-questions/27615)

<div class="topic-metadata">

**Author:** [@user78](https://forum.ansible.com/u/user78)\
**Replies:** 1\
**Last updated:** [May 24, 2018, 1:48pm UTC](https://forum.ansible.com/t/ho-to-use-different-answers-for-the-same-questions/27615 "2018-05-24T13:48:40Z")

</div>

Hello I use ansible 2.5.2 I have this responses section in my playbook: (?i)Login: “admin\\n\\r” (?i)Password: “admin\\n\\r” (?i)#: “password\\n\\r” (?i)Enter new password: “admin123\\n\\r” (?i)Confirm new password: “admi…

---

## [os\_recordset module not working](https://forum.ansible.com/t/os-recordset-module-not-working/27614)

<div class="topic-metadata">

**Author:** [@sriman\_dharba](https://forum.ansible.com/u/sriman_dharba)\
**Replies:** 0\
**Last updated:** [May 24, 2018, 11:09am UTC](https://forum.ansible.com/t/os-recordset-module-not-working/27614 "2018-05-24T11:09:08Z")

</div>

Hello I am using ansible 2.3.3.0 on openstack pike shade==1.28.0 ansible==2.3.3.0 python-designateclient==2.7.0 python-openstackclient==3.12.0 When i am trying to create a A record after instance creation, its thro…

---

## [Can't login Aix machine by the account that was created by Ansible user module.](https://forum.ansible.com/t/cant-login-aix-machine-by-the-account-that-was-created-by-ansible-user-module/27599)

<div class="topic-metadata">

**Author:** [@shaolong\_t](https://forum.ansible.com/u/shaolong_t)\
**Replies:** 7\
**Last updated:** [May 24, 2018, 9:27am UTC](https://forum.ansible.com/t/cant-login-aix-machine-by-the-account-that-was-created-by-ansible-user-module/27599 "2018-05-24T09:27:02Z")

</div>

Hello everybody, I am using Ansible user module to create Aix machine account. I found that the new created user can’t login Aix machine. The below is my some test step; Generate a crypted password by ansible provid…

---

## [Custom facts module question - running a copy of an ansible module from the "library" dir](https://forum.ansible.com/t/custom-facts-module-question-running-a-copy-of-an-ansible-module-from-the-library-dir/27611)

<div class="topic-metadata">

**Author:** [@Taida](https://forum.ansible.com/u/Taida)\
**Replies:** 0\
**Last updated:** [May 24, 2018, 6:42am UTC](https://forum.ansible.com/t/custom-facts-module-question-running-a-copy-of-an-ansible-module-from-the-library-dir/27611 "2018-05-24T06:42:12Z")

</div>

Hello everyone, I’m trying to understand how to write custom modules. For that, I’ve copied an existing ios\_facts.py to a playbook library directory and renamed it to slb\_facts2. I thought that just copying the module …

---

## [convcert tags dict tags list?](https://forum.ansible.com/t/convcert-tags-dict-tags-list/27600)

<div class="topic-metadata">

**Author:** [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Replies:** 1\
**Last updated:** [May 24, 2018, 3:34am UTC](https://forum.ansible.com/t/convcert-tags-dict-tags-list/27600 "2018-05-24T03:34:52Z")

</div>

For some reason, the ec2\_asg module does not handle tags the same way as other modules. Most modules let you do this: tags: fred: wilma barney: betty In the ec2\_asg module, that results in an error message about not…

---

## [Ansible ping to Windows fails with credssp , “Session' object has no attribute 'merge\_environment\_settings”](https://forum.ansible.com/t/ansible-ping-to-windows-fails-with-credssp-session-object-has-no-attribute-merge-environment-settings/27583)

<div class="topic-metadata">

**Author:** [@Harshit\_Srivastava](https://forum.ansible.com/u/Harshit_Srivastava)\
**Replies:** 2\
**Last updated:** [May 23, 2018, 8:16pm UTC](https://forum.ansible.com/t/ansible-ping-to-windows-fails-with-credssp-session-object-has-no-attribute-merge-environment-settings/27583 "2018-05-23T20:16:20Z")

</div>

I have configured Ansible on my ubuntu 14.04 and my target machine is a windows server 2016, but it fails when using credssp or plain text: I tried: ansible -m win\_ping all --ask-pass -vvvvvvv Below is the output I see…

---

## [route53 alias\_hosted\_zone\_id](https://forum.ansible.com/t/route53-alias-hosted-zone-id/27605)

<div class="topic-metadata">

**Author:** [@David\_Villasmil](https://forum.ansible.com/u/David_Villasmil)\
**Replies:** 1\
**Last updated:** [May 23, 2018, 8:00pm UTC](https://forum.ansible.com/t/route53-alias-hosted-zone-id/27605 "2018-05-23T20:00:15Z")

</div>

Hello guys, I can use like: \` \>\> Create the DNS load balancer to the instances name: Creating DNS load balancer route53: command: create zone: “{{ domain }}” value: “{{ cluster }}-{{ item }}.{{ domain }}” alias:…

---

## [Find module with contains parameter not working](https://forum.ansible.com/t/find-module-with-contains-parameter-not-working/27592)

<div class="topic-metadata">

**Author:** [@Saranya\_N](https://forum.ansible.com/u/Saranya_N)\
**Replies:** 3\
**Last updated:** [May 23, 2018, 5:29pm UTC](https://forum.ansible.com/t/find-module-with-contains-parameter-not-working/27592 "2018-05-23T17:29:24Z")

</div>

I want to list ONLY Filenames dev.xml and prd.xml that contain a word called “vob.fi.ted.com". Im able to list all filenames dev.xml and prd.xml using find module but when I use contains parameter in playbook it doesn’t …

[Previous page](https://forum.ansible.com/c/archives/ansible-project/30.md?page=256)

[Next page](https://forum.ansible.com/c/archives/ansible-project/30.md?page=258)
