# Latest

**URL:** https://forum.ansible.com/latest.md?page=645

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

**Page:** 646

---

## [Ansible variable with find](https://forum.ansible.com/t/ansible-variable-with-find/24835)

<div class="topic-metadata">

**Author:** [@Anfield](https://forum.ansible.com/u/Anfield)\
**Replies:** 4\
**Last updated:** [July 3, 2017, 3:58pm UTC](https://forum.ansible.com/t/ansible-variable-with-find/24835 "2017-07-03T15:58:50Z")

</div>

Running the playbook below and wondering whats the correct syntax so I can use a variable within the find statement below This line is in question - when: p.stdout.find"{{(‘user’)}}" != -1 This would be correct withou…

---

## [complex LOOPS in playbook](https://forum.ansible.com/t/complex-loops-in-playbook/24867)

<div class="topic-metadata">

**Author:** [@Francois\_Herbet](https://forum.ansible.com/u/Francois_Herbet)\
**Replies:** 1\
**Last updated:** [July 3, 2017, 2:47pm UTC](https://forum.ansible.com/t/complex-loops-in-playbook/24867 "2017-07-03T14:47:00Z")

</div>

Hi Guys, hope someone can guide me here! i succesfully get facts from one of my network devices ansible\_facts: interfaces\_ip: GigabitEthernet0/0/0/2.1004: ipv4: 172.24.70.157: prefix\_length: 30 GigabitEthernet0/…

---

## [expected sudo prompt](https://forum.ansible.com/t/expected-sudo-prompt/24768)

<div class="topic-metadata">

**Author:** [@reapsowrepeat](https://forum.ansible.com/u/reapsowrepeat)\
**Replies:** 4\
**Last updated:** [July 3, 2017, 2:04pm UTC](https://forum.ansible.com/t/expected-sudo-prompt/24768 "2017-07-03T14:04:52Z")

</div>

Hi, I hit a snag using “become/sudo”. I can become/sudo to the root user if the prompt that is returned is as expected (I think). For example, here is the default prompt. \[sudo\] password for testuser: I think Ansible …

---

## [Backup of files](https://forum.ansible.com/t/backup-of-files/24870)

<div class="topic-metadata">

**Author:** [@Mohit\_Mahajan](https://forum.ansible.com/u/Mohit_Mahajan)\
**Replies:** 1\
**Last updated:** [July 3, 2017, 2:02pm UTC](https://forum.ansible.com/t/backup-of-files/24870 "2017-07-03T14:02:32Z")

</div>

How to take backup before editing in the file, without changing time-stamp of the file. I used “backup=yes” but the problem is that it changed the time-stamp. Thanks in advance

---

## [question on loop](https://forum.ansible.com/t/question-on-loop/24875)

<div class="topic-metadata">

**Author:** [@rake](https://forum.ansible.com/u/rake)\
**Replies:** 1\
**Last updated:** [July 3, 2017, 1:25pm UTC](https://forum.ansible.com/t/question-on-loop/24875 "2017-07-03T13:25:09Z")

</div>

I have requirement where i have to create ssh keys for user on given list of servers and collect all the key from each server and copy into all servers. Example :- node1 node2 node3 user:- webadmin create key for …

---

## [How to reformat a yaml dictionary?](https://forum.ansible.com/t/how-to-reformat-a-yaml-dictionary/24841)

<div class="topic-metadata">

**Author:** [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Replies:** 6\
**Last updated:** [July 3, 2017, 1:22pm UTC](https://forum.ansible.com/t/how-to-reformat-a-yaml-dictionary/24841 "2017-07-03T13:22:13Z")

</div>

Hello, So I have a var dictionary which stores component groups and components components\_by\_group: web: frontend\_app admin\_app database: db\_tools flyway I’d like to invert this so that I can use the component to …

---

## [Is there a difference in specifying hosts as a list vs specifying hosts as comma separated list in playbooks ?](https://forum.ansible.com/t/is-there-a-difference-in-specifying-hosts-as-a-list-vs-specifying-hosts-as-comma-separated-list-in-playbooks/24881)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 0\
**Last updated:** [July 3, 2017, 12:01pm UTC](https://forum.ansible.com/t/is-there-a-difference-in-specifying-hosts-as-a-list-vs-specifying-hosts-as-comma-separated-list-in-playbooks/24881 "2017-07-03T12:01:49Z")

</div>

Playbook: \`

---

## [Unable to install dot net framework 4.5.2 using win\_feature](https://forum.ansible.com/t/unable-to-install-dot-net-framework-4-5-2-using-win-feature/24803)

<div class="topic-metadata">

**Author:** [@arpi.89](https://forum.ansible.com/u/arpi.89)\
**Replies:** 1\
**Last updated:** [July 3, 2017, 7:31am UTC](https://forum.ansible.com/t/unable-to-install-dot-net-framework-4-5-2-using-win-feature/24803 "2017-07-03T07:31:57Z")

</div>

Hi I am facing two issues: I am trying to install Dot Net framework 4.5.2 using win\_feature: win\_feature: name: DotNet-4-5-2 state: present I am getting below error message: fatal: \[13.90.93.211\]: FAILED! =\> { …

---

## [Ansible Tower causing nginx issue after installation](https://forum.ansible.com/t/ansible-tower-causing-nginx-issue-after-installation/24879)

<div class="topic-metadata">

**Author:** [@Luvpreet\_Singh](https://forum.ansible.com/u/Luvpreet_Singh)\
**Replies:** 0\
**Last updated:** [July 3, 2017, 7:19am UTC](https://forum.ansible.com/t/ansible-tower-causing-nginx-issue-after-installation/24879 "2017-07-03T07:19:15Z")

</div>

I installed ansible tower on my server. I did not know then that ansible uses port 80 and 443. Now, my nginx server was running on port 80. I had grafana server running behind nginx. After installation of ansible to…

---

## [Ansible tower behind nginx](https://forum.ansible.com/t/ansible-tower-behind-nginx/24878)

<div class="topic-metadata">

**Author:** [@Luvpreet\_Singh](https://forum.ansible.com/u/Luvpreet_Singh)\
**Replies:** 2\
**Last updated:** [July 3, 2017, 7:01am UTC](https://forum.ansible.com/t/ansible-tower-behind-nginx/24878 "2017-07-03T07:01:16Z")

</div>

On the official page, it is said that to host ansible tower behind nginx, you need to provide headers in the /etc/tower/conf.d/remote\_host\_headers.py file. But, in my /etc/tower/ folder, there is no conf.d/remote\_host\_h…

---

## [Support aliyun in cloud modules.](https://forum.ansible.com/t/support-aliyun-in-cloud-modules/24877)

<div class="topic-metadata">

**Author:** [@Richard.W](https://forum.ansible.com/u/Richard.W)\
**Replies:** 0\
**Last updated:** [July 3, 2017, 6:08am UTC](https://forum.ansible.com/t/support-aliyun-in-cloud-modules/24877 "2017-07-03T06:08:07Z")

</div>

Hello, Aliyun is one of the largest cloud provider in china.I didn’t find any support of aliyun in cloud modules. Anyone is current working on this? If not, I would like to help with it. Thanks.

---

## [Multiple and/or conditions in when wont work](https://forum.ansible.com/t/multiple-and-or-conditions-in-when-wont-work/24855)

<div class="topic-metadata">

**Author:** [@ajay\_jiwanand](https://forum.ansible.com/u/ajay_jiwanand)\
**Replies:** 9\
**Last updated:** [July 2, 2017, 5:45pm UTC](https://forum.ansible.com/t/multiple-and-or-conditions-in-when-wont-work/24855 "2017-07-02T17:45:36Z")

</div>

I am having issues with using multiple conditions in when to validate whether or not to run a task. Basically I am using extrended variables within the ansible command to state what sort of updates I want to run like th…

---

## [Can't connect to remote host](https://forum.ansible.com/t/cant-connect-to-remote-host/24869)

<div class="topic-metadata">

**Author:** [@Rusty\_Roy](https://forum.ansible.com/u/Rusty_Roy)\
**Replies:** 1\
**Last updated:** [July 2, 2017, 3:47pm UTC](https://forum.ansible.com/t/cant-connect-to-remote-host/24869 "2017-07-02T15:47:34Z")

</div>

I can connect to the remote host via ssh, but ansible fails to connect. I’m loading the key using ssh. If I run: \` ansible vm-to-deploy-to -m ping -e “ansible\_ssh\_port=15674” -e “ansible\_ssh\_user=djeyewater” \` Resul…

---

## [Creating a playbook that installs a role - best practice](https://forum.ansible.com/t/creating-a-playbook-that-installs-a-role-best-practice/24874)

<div class="topic-metadata">

**Author:** [@Listing](https://forum.ansible.com/u/Listing)\
**Replies:** 0\
**Last updated:** [July 2, 2017, 2:31pm UTC](https://forum.ansible.com/t/creating-a-playbook-that-installs-a-role-best-practice/24874 "2017-07-02T14:31:48Z")

</div>

Hi guys, I am looking for the best way to automatically install a role from a source. I am currently using these two ways: via requirements.yml file \`

---

## [ansible  disaster！](https://forum.ansible.com/t/ansible-disaster/24873)

<div class="topic-metadata">

**Author:** [@user75](https://forum.ansible.com/u/user75)\
**Replies:** 0\
**Last updated:** [July 2, 2017, 1:54pm UTC](https://forum.ansible.com/t/ansible-disaster/24873 "2017-07-02T13:54:54Z")

</div>

\[root@Ansible ~\]# ansible agent -m copy -a ‘src=wel.txt dest=/home/wel.txt owner=root group=root mode=600’ ERROR! Attempted to read “/root/dir/wel.txt” as ini file: /root/dir/wel.txt:1: Expected key=value host variable …

---

## [NXOS modules and NXAPI transport](https://forum.ansible.com/t/nxos-modules-and-nxapi-transport/24871)

<div class="topic-metadata">

**Author:** [@Johann\_Lo](https://forum.ansible.com/u/Johann_Lo)\
**Replies:** 0\
**Last updated:** [July 2, 2017, 1:07pm UTC](https://forum.ansible.com/t/nxos-modules-and-nxapi-transport/24871 "2017-07-02T13:07:42Z")

</div>

Anyone running ansible against NXOS (latest 7.x) and using NXAPI transport? I am getting a weird issue in my lab whereby CLI transport works fine but NXAPI transport I get 1.) straight up connect fail using a login wit…

---

## [Obtain --limit parameter in playbook](https://forum.ansible.com/t/obtain-limit-parameter-in-playbook/24657)

<div class="topic-metadata">

**Author:** [@thirsch.epages](https://forum.ansible.com/u/thirsch.epages)\
**Replies:** 2\
**Last updated:** [July 1, 2017, 7:09am UTC](https://forum.ansible.com/t/obtain-limit-parameter-in-playbook/24657 "2017-07-01T07:09:37Z")

</div>

Hi, I have had twice now the use case of needing to access host vars of a specific host, without knowing the inventory hostname. I would like to suggest to be able to read the value of the --limit parameter from inside …

---

## [Using json query filter](https://forum.ansible.com/t/using-json-query-filter/24860)

<div class="topic-metadata">

**Author:** [@trg.achilles](https://forum.ansible.com/u/trg.achilles)\
**Replies:** 2\
**Last updated:** [June 30, 2017, 8:19pm UTC](https://forum.ansible.com/t/using-json-query-filter/24860 "2017-06-30T20:19:58Z")

</div>

Hello, I’m trying to determined if package is installed and what version I have the following tasks vars: cmk\_version: 1.4.0p7 name: Check if check-mk-raw package is installed yum: list: installed register: yum…

---

## [clear\_host\_errors bug?](https://forum.ansible.com/t/clear-host-errors-bug/24848)

<div class="topic-metadata">

**Author:** [@MKPhil](https://forum.ansible.com/u/MKPhil)\
**Replies:** 1\
**Last updated:** [June 30, 2017, 6:49pm UTC](https://forum.ansible.com/t/clear-host-errors-bug/24848 "2017-06-30T18:49:12Z")

</div>

I’m running Ansible 2.3.1.0 and getting some off behaviour with clear\_host\_errors - is this a bug??? Here’s a sample Playbook: \`

---

## [Reload certificates?](https://forum.ansible.com/t/reload-certificates/24865)

<div class="topic-metadata">

**Author:** [@dennis.benzinger](https://forum.ansible.com/u/dennis.benzinger)\
**Replies:** 0\
**Last updated:** [June 30, 2017, 4:03pm UTC](https://forum.ansible.com/t/reload-certificates/24865 "2017-06-30T16:03:25Z")

</div>

Hello Group, one of my roles is using get\_url to download a file from a server whose certificate is not trusted out of the box. Therefore, in an earlier step, I install the necessary CA certificates. This works fine fo…

---

## [How can i load a vars file in inventory which "prepares" a large number of variables via jinja2 expressions ?](https://forum.ansible.com/t/how-can-i-load-a-vars-file-in-inventory-which-prepares-a-large-number-of-variables-via-jinja2-expressions/24863)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 1\
**Last updated:** [June 30, 2017, 3:10pm UTC](https://forum.ansible.com/t/how-can-i-load-a-vars-file-in-inventory-which-prepares-a-large-number-of-variables-via-jinja2-expressions/24863 "2017-06-30T15:10:00Z")

</div>

For some servers in an inventory, i assign a range of ports. I want to use these ports in my playbooks while keeping them portable and compatible with any configuration. I am thinking of using variable for ports whose va…

---

## [local\_actions: copy contents from stdout issue...LARGE file?](https://forum.ansible.com/t/local-actions-copy-contents-from-stdout-issue-large-file/24812)

<div class="topic-metadata">

**Author:** [@Jon\_Williams](https://forum.ansible.com/u/Jon_Williams)\
**Replies:** 2\
**Last updated:** [June 30, 2017, 1:52pm UTC](https://forum.ansible.com/t/local-actions-copy-contents-from-stdout-issue-large-file/24812 "2017-06-30T13:52:05Z")

</div>

Hi, I am using the ‘copy content’ module to grab the contents of a file from an old version of F5 (where the copy / fetch module doesn’t work due to simplejson not being available) Here is an extract play I have put to…

---

## [Error assigning variables with Conditionals](https://forum.ansible.com/t/error-assigning-variables-with-conditionals/24861)

<div class="topic-metadata">

**Author:** [@jrvilda](https://forum.ansible.com/u/jrvilda)\
**Replies:** 4\
**Last updated:** [June 30, 2017, 1:25pm UTC](https://forum.ansible.com/t/error-assigning-variables-with-conditionals/24861 "2017-06-30T13:25:12Z")

</div>

When assigning variables under certain conditions, if there is no match, the last condition is erroneously assigned. Ej: --- - hosts: hostwin vars: # Definimos el paquete a instalar según el sistema operativo. …

---

## [Counting changes in looping tasks](https://forum.ansible.com/t/counting-changes-in-looping-tasks/24862)

<div class="topic-metadata">

**Author:** [@Cev\_Ing](https://forum.ansible.com/u/Cev_Ing)\
**Replies:** 0\
**Last updated:** [June 30, 2017, 1:20pm UTC](https://forum.ansible.com/t/counting-changes-in-looping-tasks/24862 "2017-06-30T13:20:23Z")

</div>

We do user management with Ansible. A few minutes ago I was a bit irritated by the summary Ansible generates. Although I added 15 users to a system, Ansible showed me in the summary only 1 change. The reason is, that the…

---

## [\[WARNING\]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}.](https://forum.ansible.com/t/warning-when-statements-should-not-include-jinja2-templating-delimiters-such-as-or/24856)

<div class="topic-metadata">

**Author:** [@trg.achilles](https://forum.ansible.com/u/trg.achilles)\
**Replies:** 2\
**Last updated:** [June 30, 2017, 8:17am UTC](https://forum.ansible.com/t/warning-when-statements-should-not-include-jinja2-templating-delimiters-such-as-or/24856 "2017-06-30T08:17:22Z")

</div>

Hello, I’m trying to remove jinja delimiter used in when condition. My condition tests whether partition exists on disk drive. I use variable to assign which drive to test vars: raw\_disk: ‘sdb’ task: include: lvm.…

---

## [Ansible virt module](https://forum.ansible.com/t/ansible-virt-module/24858)

<div class="topic-metadata">

**Author:** [@Shubham\_Amane](https://forum.ansible.com/u/Shubham_Amane)\
**Replies:** 0\
**Last updated:** [June 30, 2017, 5:39am UTC](https://forum.ansible.com/t/ansible-virt-module/24858 "2017-06-30T05:39:02Z")

</div>

Hi All, I implemented os provision using KVM a virsh command in virtualization. Now I want to implement using virt command in ansible. Can you suggest me how to implement os provisioning using VIRT Module?

---

## [Can't delete an EC2 route table](https://forum.ansible.com/t/cant-delete-an-ec2-route-table/24857)

<div class="topic-metadata">

**Author:** [@Yosemite\_Sam](https://forum.ansible.com/u/Yosemite_Sam)\
**Replies:** 0\
**Last updated:** [June 29, 2017, 10:11pm UTC](https://forum.ansible.com/t/cant-delete-an-ec2-route-table/24857 "2017-06-29T22:11:31Z")

</div>

Hello, I have no idea why this simple test code does not delete a route table. Hopefully, someone with fresh eyes can spot the problem. Playbook: --- - name: trythis hosts: localhost connection: local gather\_facts…

---

## [Adding Route Table Entries for NAT GW](https://forum.ansible.com/t/adding-route-table-entries-for-nat-gw/24854)

<div class="topic-metadata">

**Author:** [@Isaac\_Christoffersen](https://forum.ansible.com/u/Isaac_Christoffersen)\
**Replies:** 1\
**Last updated:** [June 29, 2017, 8:48pm UTC](https://forum.ansible.com/t/adding-route-table-entries-for-nat-gw/24854 "2017-06-29T20:48:49Z")

</div>

I’m trying to create a new Route Table that has an entry for the NAT Gateway, but the entry doesn’t seem to work. I’m basically following the example in the documentation, but while the Route table is created, there is n…

---

## [What facts does ec2\_facts actually provide?](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759)

<div class="topic-metadata">

**Author:** [@Mark\_Casey](https://forum.ansible.com/u/Mark_Casey)\
**Replies:** 4\
**Last updated:** [June 29, 2017, 8:14pm UTC](https://forum.ansible.com/t/what-facts-does-ec2-facts-actually-provide/13759 "2017-06-29T20:14:34Z")

</div>

I’ve been looking around for a while now but unlike ec2.py which lists a lot of what information it returns at the top of the file, I have no idea where to find a list of what facts ec2\_facts actually provides. Looking …

---

## [Copy a template file to a destination other than inventory .](https://forum.ansible.com/t/copy-a-template-file-to-a-destination-other-than-inventory/24847)

<div class="topic-metadata">

**Author:** [@Ray\_Cromwell](https://forum.ansible.com/u/Ray_Cromwell)\
**Replies:** 1\
**Last updated:** [June 29, 2017, 5:45pm UTC](https://forum.ansible.com/t/copy-a-template-file-to-a-destination-other-than-inventory/24847 "2017-06-29T17:45:18Z")

</div>

Hi . I have a playbook for icinga which applies the nrpe config to a list of hosts in inventory file . The problem I have is that within the same playbook I have another role which needs to copy host specific config to…

[Previous page](https://forum.ansible.com/latest.md?page=644)

[Next page](https://forum.ansible.com/latest.md?page=646)
