# Ansible Project

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

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

**Page:** 252

---

## [Ansible Error: The task includes an option with an undefined variable. When Creating new folders](https://forum.ansible.com/t/ansible-error-the-task-includes-an-option-with-an-undefined-variable-when-creating-new-folders/27884)

<div class="topic-metadata">

**Author:** [@VS1](https://forum.ansible.com/u/VS1)\
**Replies:** 2\
**Last updated:** [June 27, 2018, 11:54am UTC](https://forum.ansible.com/t/ansible-error-the-task-includes-an-option-with-an-undefined-variable-when-creating-new-folders/27884 "2018-06-27T11:54:17Z")

</div>

name: Update apt cahce apt: update\_cache=yes cache\_valid\_time=3600 name: Install NFS Common on FileServer apt: name={{ item }} state=present with\_items: nfs-common name: Create webservers directory file: …

---

## [Impersonating Users on AIX](https://forum.ansible.com/t/impersonating-users-on-aix/23443)

<div class="topic-metadata">

**Author:** [@Nicholas\_Santiago](https://forum.ansible.com/u/Nicholas_Santiago)\
**Replies:** 3\
**Last updated:** [June 27, 2018, 9:59am UTC](https://forum.ansible.com/t/impersonating-users-on-aix/23443 "2018-06-27T09:59:06Z")

</div>

After getting the hang of running Ansible on our Linux environment, my team has been tasked with getting it going on AIX. In working with our AIX team, we had to get them to set up AIX to support Python 2.7.5 and a more …

---

## [Error when trying to grep something from a file](https://forum.ansible.com/t/error-when-trying-to-grep-something-from-a-file/27879)

<div class="topic-metadata">

**Author:** [@Kallu\_Srikanth](https://forum.ansible.com/u/Kallu_Srikanth)\
**Replies:** 1\
**Last updated:** [June 27, 2018, 2:03am UTC](https://forum.ansible.com/t/error-when-trying-to-grep-something-from-a-file/27879 "2018-06-27T02:03:17Z")

</div>

Hi, dpiesa@cwypatchdev:/etc/ansible\> ansible all -m command -a “cat /etc/oratab | grep -i ^AGENT | cut -f 2 -d :” vmcwy60158.prod.acxiom.net | FAILED | rc=1 \>\> cat: invalid option – ‘i’ Try \`cat --help’ for more info…

---

## [ansible playbook permisson error when running command ". oraenv"](https://forum.ansible.com/t/ansible-playbook-permisson-error-when-running-command-oraenv/27875)

<div class="topic-metadata">

**Author:** [@Kallu\_Srikanth](https://forum.ansible.com/u/Kallu_Srikanth)\
**Replies:** 5\
**Last updated:** [June 27, 2018, 1:52am UTC](https://forum.ansible.com/t/ansible-playbook-permisson-error-when-running-command-oraenv/27875 "2018-06-27T01:52:38Z")

</div>

ansible playbook permission error when running the command “. oraenv” Here is the code: setup new env command: “. /usr/local/bin/oraenv” Here is the error: TASK \[ansible-oracle-patching : command\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Access hostvars from filter plugin](https://forum.ansible.com/t/access-hostvars-from-filter-plugin/27874)

<div class="topic-metadata">

**Author:** [@Alexey\_Miasoedov](https://forum.ansible.com/u/Alexey_Miasoedov)\
**Replies:** 1\
**Last updated:** [June 26, 2018, 3:47pm UTC](https://forum.ansible.com/t/access-hostvars-from-filter-plugin/27874 "2018-06-26T15:47:17Z")

</div>

Hey there, Is the %subj% possible? if so, then how can I do this?

---

## [alternatives module loop](https://forum.ansible.com/t/alternatives-module-loop/27863)

<div class="topic-metadata">

**Author:** [@Alix\_Ak](https://forum.ansible.com/u/Alix_Ak)\
**Replies:** 3\
**Last updated:** [June 26, 2018, 3:03pm UTC](https://forum.ansible.com/t/alternatives-module-loop/27863 "2018-06-26T15:03:41Z")

</div>

name: Install java alternatives alternatives: name: “{{ item.name }}” link: “{{ item.link }}” path: “{{ item.path }}” with\_items: { name: ‘java’, link: ‘/usr/bin/java’, path: ‘/usr/share/java-1.8.0/jre1.8.0\_172/bin…

---

## [Jinja2 Extensions](https://forum.ansible.com/t/jinja2-extensions/27873)

<div class="topic-metadata">

**Author:** [@muhammed](https://forum.ansible.com/u/muhammed)\
**Replies:** 0\
**Last updated:** [June 26, 2018, 8:50am UTC](https://forum.ansible.com/t/jinja2-extensions/27873 "2018-06-26T08:50:38Z")

</div>

Hi, I’m looking for a simple example on how to achieve the functionality of django templatetags in jinja2 with ansible. Thanks in advance.

---

## [Ansible LOCAL\_TMP too many empty directories](https://forum.ansible.com/t/ansible-local-tmp-too-many-empty-directories/27872)

<div class="topic-metadata">

**Author:** [@JFH](https://forum.ansible.com/u/JFH)\
**Replies:** 1\
**Last updated:** [June 26, 2018, 8:10am UTC](https://forum.ansible.com/t/ansible-local-tmp-too-many-empty-directories/27872 "2018-06-26T08:10:53Z")

</div>

Hi, We have a project with a lot of hosts (~75) and we have an issue with tmp local directories. We launch playbook with a crontab and after each run ansible didn’t remove tmp local directories. TMP local directory ex…

---

## [User Host number 1 and 2 ip instead of the name](https://forum.ansible.com/t/user-host-number-1-and-2-ip-instead-of-the-name/27871)

<div class="topic-metadata">

**Author:** [@VS1](https://forum.ansible.com/u/VS1)\
**Replies:** 0\
**Last updated:** [June 26, 2018, 7:58am UTC](https://forum.ansible.com/t/user-host-number-1-and-2-ip-instead-of-the-name/27871 "2018-06-26T07:58:34Z")

</div>

hosts: loadbalancer sudo: yes vars: firewall\_allowed\_tcp\_ports: “22” “80” haproxy\_backend\_servers: name: 137.116.11.000 address: 137.116.11.000:80 name: 137.116.11.001 address: 137.116.11.001:80 Is there any wa…

---

## [Authentication or permission failure.](https://forum.ansible.com/t/authentication-or-permission-failure/27870)

<div class="topic-metadata">

**Author:** [@VS1](https://forum.ansible.com/u/VS1)\
**Replies:** 1\
**Last updated:** [June 26, 2018, 7:39am UTC](https://forum.ansible.com/t/authentication-or-permission-failure/27870 "2018-06-26T07:39:35Z")

</div>

Hi Guys, i try to ran a new ansible-playbook and i get this error: Before i could connect to this hosts but now TASK \[Gathering Facts\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [until: "'string' in variable.stdout"](https://forum.ansible.com/t/until-string-in-variable-stdout/27868)

<div class="topic-metadata">

**Author:** [@Rob\_Christian](https://forum.ansible.com/u/Rob_Christian)\
**Replies:** 4\
**Last updated:** [June 25, 2018, 11:52pm UTC](https://forum.ansible.com/t/until-string-in-variable-stdout/27868 "2018-06-25T23:52:40Z")

</div>

\` name: Get etcd node(s) command: export ETCDCTL\_API=3 && etcdctl endpoint health register: etcd\_nodes changed\_when: false until: “‘healthy’ in etcd\_nodes.stdout” retries: 10 delay: 10 \` Why won’t this work? Be…

---

## [Exclude string from facts](https://forum.ansible.com/t/exclude-string-from-facts/27867)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 4\
**Last updated:** [June 25, 2018, 9:04pm UTC](https://forum.ansible.com/t/exclude-string-from-facts/27867 "2018-06-25T21:04:13Z")

</div>

I have the following fact, and I would like to create a new fact that excludes ‘lo’. What is the proper way to go about this? \` “ansible\_interfaces”: \[ “lo”, “enp0s3”, “enp0s8”, “enp0s9” \], \` My latest failed at…

---

## [Ansible mail module: how to include several files in 'body' option](https://forum.ansible.com/t/ansible-mail-module-how-to-include-several-files-in-body-option/27853)

<div class="topic-metadata">

**Author:** [@Sabrina\_Lautier](https://forum.ansible.com/u/Sabrina_Lautier)\
**Replies:** 3\
**Last updated:** [June 25, 2018, 8:11pm UTC](https://forum.ansible.com/t/ansible-mail-module-how-to-include-several-files-in-body-option/27853 "2018-06-25T20:11:34Z")

</div>

Hi, I managed to include a j2 file as ‘body’ option of the ansible mail module: mail: body: “{{ lookup(‘template’, j2file) }}” , but need now to include header and footer html files (header.html and footer.html) res…

---

## [Batch/Parallel Playbook Execution](https://forum.ansible.com/t/batch-parallel-playbook-execution/27857)

<div class="topic-metadata">

**Author:** [@muhammed](https://forum.ansible.com/u/muhammed)\
**Replies:** 2\
**Last updated:** [June 25, 2018, 7:45pm UTC](https://forum.ansible.com/t/batch-parallel-playbook-execution/27857 "2018-06-25T19:45:07Z")

</div>

Hi, I would like to know if it’s possible to deploy X number of projects at a time. In my top-level play called run-deploy.yml, the project data is loaded from a json file: \`

---

## [Referencing a fact that contains a dot](https://forum.ansible.com/t/referencing-a-fact-that-contains-a-dot/27866)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 2\
**Last updated:** [June 25, 2018, 7:27pm UTC](https://forum.ansible.com/t/referencing-a-fact-that-contains-a-dot/27866 "2018-06-25T19:27:41Z")

</div>

Here is a fact list that has been returned. I wish to reference the value of net.ifnames, but due to the dot I keep getting undefined variable. What is the proper way to reference this particular fact? I have tried escap…

---

## [Ansible licensing for custom plugins/lookup/modules that import ansible modules](https://forum.ansible.com/t/ansible-licensing-for-custom-plugins-lookup-modules-that-import-ansible-modules/27865)

<div class="topic-metadata">

**Author:** [@Giuseppe\_Chiesa](https://forum.ansible.com/u/Giuseppe_Chiesa)\
**Replies:** 0\
**Last updated:** [June 25, 2018, 4:54pm UTC](https://forum.ansible.com/t/ansible-licensing-for-custom-plugins-lookup-modules-that-import-ansible-modules/27865 "2018-06-25T16:54:34Z")

</div>

Hi all, I have a question related to the licensing model. If I use Ansible for my infrastructure, and I develop additional plugins or modules (from scratch) but importing (obviously) some modules (not only the modules\_…

---

## [Running role with a specific callback plugin](https://forum.ansible.com/t/running-role-with-a-specific-callback-plugin/27856)

<div class="topic-metadata">

**Author:** [@andrew\_nguyen](https://forum.ansible.com/u/andrew_nguyen)\
**Replies:** 4\
**Last updated:** [June 25, 2018, 3:58pm UTC](https://forum.ansible.com/t/running-role-with-a-specific-callback-plugin/27856 "2018-06-25T15:58:41Z")

</div>

Hello all, Is there a way to run a role with a specific callback plugin? The plugin would only be used for that role.

---

## [how to deploy vm in DVS switch through ansible script](https://forum.ansible.com/t/how-to-deploy-vm-in-dvs-switch-through-ansible-script/27819)

<div class="topic-metadata">

**Author:** [@Umesh\_Gowda](https://forum.ansible.com/u/Umesh_Gowda)\
**Replies:** 4\
**Last updated:** [June 25, 2018, 3:49pm UTC](https://forum.ansible.com/t/how-to-deploy-vm-in-dvs-switch-through-ansible-script/27819 "2018-06-25T15:49:36Z")

</div>

hi All, Need help to deploy vm in Distributed virtual switch. Whenever i will deploy default it takes Standard port. what options we need networks: vlan: {{ vlan }} type: “static” device\_type: vmxnet3 ip: “{{ ip\_a…

---

## [ERROR! Syntax Error while loading YAML.](https://forum.ansible.com/t/error-syntax-error-while-loading-yaml/27864)

<div class="topic-metadata">

**Author:** [@VS1](https://forum.ansible.com/u/VS1)\
**Replies:** 4\
**Last updated:** [June 25, 2018, 3:38pm UTC](https://forum.ansible.com/t/error-syntax-error-while-loading-yaml/27864 "2018-06-25T15:38:32Z")

</div>

Hi Guys, I get the following error while running an ansible-playbook ERROR! Syntax Error while loading YAML. mapping values are not allowed in this context The error appears to have been in ‘/home/user/.ansible/roles…

---

## [Cisco ACI modules - proper usage](https://forum.ansible.com/t/cisco-aci-modules-proper-usage/27860)

<div class="topic-metadata">

**Author:** [@Emanuele\_Verga](https://forum.ansible.com/u/Emanuele_Verga)\
**Replies:** 0\
**Last updated:** [June 25, 2018, 10:25am UTC](https://forum.ansible.com/t/cisco-aci-modules-proper-usage/27860 "2018-06-25T10:25:48Z")

</div>

Hello, I have been dabbling with Ansible ACI modules lately, but i have a doubt on how they are supposed to be used and I hope somebody with more experience could give me some pointers. Basically my doubt is: I have n…

---

## [Schedule Playbook with crontab](https://forum.ansible.com/t/schedule-playbook-with-crontab/24968)

<div class="topic-metadata">

**Author:** [@Phil\_F](https://forum.ansible.com/u/Phil_F)\
**Replies:** 9\
**Last updated:** [June 24, 2018, 12:21pm UTC](https://forum.ansible.com/t/schedule-playbook-with-crontab/24968 "2018-06-24T12:21:05Z")

</div>

Hi, I am attempting to schedule a playbook to run every night to backup Cisco network device configs using crontab. The playbook is a simple ios\_command task executing show run on the Cisco Devices. The playbook works…

---

## [/usr/bin/python: No such file or directory](https://forum.ansible.com/t/usr-bin-python-no-such-file-or-directory/27854)

<div class="topic-metadata">

**Author:** [@Rob\_Christian](https://forum.ansible.com/u/Rob_Christian)\
**Replies:** 4\
**Last updated:** [June 22, 2018, 10:15pm UTC](https://forum.ansible.com/t/usr-bin-python-no-such-file-or-directory/27854 "2018-06-22T22:15:28Z")

</div>

Why am I getting this error? I have gather\_facts: false in my file. My file is shown below. The original is here: https://github.com/sebiwi/kubernetes-coreos \` TASK \[Gathering Facts\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [security group creation](https://forum.ansible.com/t/security-group-creation/27851)

<div class="topic-metadata">

**Author:** [@Manish\_Devasar](https://forum.ansible.com/u/Manish_Devasar)\
**Replies:** 0\
**Last updated:** [June 22, 2018, 2:57pm UTC](https://forum.ansible.com/t/security-group-creation/27851 "2018-06-22T14:57:10Z")

</div>

Hi All, I just start learning ansible. Can you help me the best way to learn it. I am using you tube tutorial and manuals. I was reading about create security group but confuse what to set in profile. Regards

---

## [using loop with a 'when'](https://forum.ansible.com/t/using-loop-with-a-when/27746)

<div class="topic-metadata">

**Author:** [@hbdhdhdhdjd](https://forum.ansible.com/u/hbdhdhdhdjd)\
**Replies:** 6\
**Last updated:** [June 22, 2018, 2:11pm UTC](https://forum.ansible.com/t/using-loop-with-a-when/27746 "2018-06-22T14:11:05Z")

</div>

I would like for ‘when’ to take the item to evaluate from the loop. How do i do it? Is it even possible?

---

## [How to move existing vm to specific folder in vcenter](https://forum.ansible.com/t/how-to-move-existing-vm-to-specific-folder-in-vcenter/27838)

<div class="topic-metadata">

**Author:** [@llmiell\_Sanimzz](https://forum.ansible.com/u/llmiell_Sanimzz)\
**Replies:** 1\
**Last updated:** [June 22, 2018, 9:28am UTC](https://forum.ansible.com/t/how-to-move-existing-vm-to-specific-folder-in-vcenter/27838 "2018-06-22T09:28:35Z")

</div>

Hi, I need to move VM to another folder,but vmware\_guest could not support this. Could you help on this? Thanks,

---

## [How to set IP Address on Windows VM When deployed it in RHEV/OVirt?](https://forum.ansible.com/t/how-to-set-ip-address-on-windows-vm-when-deployed-it-in-rhev-ovirt/27849)

<div class="topic-metadata">

**Author:** [@alexander](https://forum.ansible.com/u/alexander)\
**Replies:** 0\
**Last updated:** [June 22, 2018, 8:26am UTC](https://forum.ansible.com/t/how-to-set-ip-address-on-windows-vm-when-deployed-it-in-rhev-ovirt/27849 "2018-06-22T08:26:39Z")

</div>

Hi Experts, How to set IP address in windows vm when deploy it from template? I’m using rhev/ovirt virtualization, I know i can use cloud-init(ovirt\_vms module) for \*Nix Server. But how to do that in Windows, since wi…

---

## [Conditional role](https://forum.ansible.com/t/conditional-role/27846)

<div class="topic-metadata">

**Author:** [@Rob\_Christian](https://forum.ansible.com/u/Rob_Christian)\
**Replies:** 3\
**Last updated:** [June 22, 2018, 2:31am UTC](https://forum.ansible.com/t/conditional-role/27846 "2018-06-22T02:31:25Z")

</div>

I’m trying to modify this Ansible project and learn as I go. The role shown below is throwing errors and I’d like to clean those up, as well as make it optional. Everything in this role is concerned with installing Pytho…

---

## [Ansible-2.4.5 final released](https://forum.ansible.com/t/ansible-2-4-5-final-released/27847)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [June 22, 2018, 1:06am UTC](https://forum.ansible.com/t/ansible-2-4-5-final-released/27847 "2018-06-22T01:06:36Z")

</div>

Hi all, we're happy to announce that Ansible 2.4.5 is now available for those who have yet to upgrade to Ansible-2.5.x How do you get it?

---

## [execute commands in tcsh mode](https://forum.ansible.com/t/execute-commands-in-tcsh-mode/27843)

<div class="topic-metadata">

**Author:** [@contactmejohnthomas](https://forum.ansible.com/u/contactmejohnthomas)\
**Replies:** 0\
**Last updated:** [June 21, 2018, 10:43am UTC](https://forum.ansible.com/t/execute-commands-in-tcsh-mode/27843 "2018-06-21T10:43:02Z")

</div>

hello , I am trying to execute few commands in the server using ansible . The trick is currently we use "sudo tcsh " followed by password to switch tcsh prompt to execute the command Let me know how can i execute the …

---

## [How to set local changed flag only if remote command changes](https://forum.ansible.com/t/how-to-set-local-changed-flag-only-if-remote-command-changes/27834)

<div class="topic-metadata">

**Author:** [@Sam\_Lawton](https://forum.ansible.com/u/Sam_Lawton)\
**Replies:** 1\
**Last updated:** [June 20, 2018, 7:30pm UTC](https://forum.ansible.com/t/how-to-set-local-changed-flag-only-if-remote-command-changes/27834 "2018-06-20T19:30:30Z")

</div>

I have a simple playbook on my servers to update them, and I use another playbook with a command to run that playbook on all the remote servers. Basically I want to set it that the changed flag only occurs when there are…

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

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