# Ansible Project

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

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

**Page:** 234

---

## [Source control of playbooks - how do you edit, test and perform version control....](https://forum.ansible.com/t/source-control-of-playbooks-how-do-you-edit-test-and-perform-version-control/28144)

<div class="topic-metadata">

**Author:** [@Lee\_Drew](https://forum.ansible.com/u/Lee_Drew)\
**Replies:** 9\
**Last updated:** [September 20, 2018, 2:43am UTC](https://forum.ansible.com/t/source-control-of-playbooks-how-do-you-edit-test-and-perform-version-control/28144 "2018-09-20T02:43:11Z")

</div>

I work in a Windows environment, pretty new to Ansible and keen to hear how you perform version control on your playbooks, how you edit and test them etc. Do you work in a team where you have multiple engineers editing …

---

## [How can i gather ec2 elb facts using AWX/Ansible Tower?](https://forum.ansible.com/t/how-can-i-gather-ec2-elb-facts-using-awx-ansible-tower/28606)

<div class="topic-metadata">

**Author:** [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Replies:** 0\
**Last updated:** [September 19, 2018, 2:48pm UTC](https://forum.ansible.com/t/how-can-i-gather-ec2-elb-facts-using-awx-ansible-tower/28606 "2018-09-19T14:48:54Z")

</div>

I have been following the ec2\_elb\_facts module and tried using the below example but in the debug logs i can see the aws values are completely getting ignored. How can i get this working? - hosts: localhost vars: …

---

## [catch  return code](https://forum.ansible.com/t/catch-return-code/28605)

<div class="topic-metadata">

**Author:** [@christian.tremel](https://forum.ansible.com/u/christian.tremel)\
**Replies:** 4\
**Last updated:** [September 19, 2018, 1:16pm UTC](https://forum.ansible.com/t/catch-return-code/28605 "2018-09-19T13:16:04Z")

</div>

how to i check the return code of a shell command correctly? see error below. looks like a chicken/egg situation to me…create\_oml\_users should be registerd if rc is 0…any ideas? \` shell: lsuser -R files lsam 2\>/dev/nu…

---

## [How to make my dynamic varaible more readable?](https://forum.ansible.com/t/how-to-make-my-dynamic-varaible-more-readable/28603)

<div class="topic-metadata">

**Author:** [@Julien](https://forum.ansible.com/u/Julien)\
**Replies:** 3\
**Last updated:** [September 19, 2018, 12:52pm UTC](https://forum.ansible.com/t/how-to-make-my-dynamic-varaible-more-readable/28603 "2018-09-19T12:52:30Z")

</div>

Hello everyone, Today i have this dynamic variable: grp\_name: “{%if (environment\_true == “someinfo”) and (dialog\_vm\_role|lower) != (‘someinfo’)%}IM-A-Group{%elif (dialog\_vm\_role|lower) == (‘bdd’) and (environment\_true …

---

## [s3\_ modules for DELL EMC ECS](https://forum.ansible.com/t/s3-modules-for-dell-emc-ecs/28598)

<div class="topic-metadata">

**Author:** [@mkempster22uu](https://forum.ansible.com/u/mkempster22uu)\
**Replies:** 2\
**Last updated:** [September 19, 2018, 8:09am UTC](https://forum.ansible.com/t/s3-modules-for-dell-emc-ecs/28598 "2018-09-19T08:09:13Z")

</div>

Is it possible to use any of the s3\_ and ecs\_ modules for EMC ECS? ECS uses the standard s3 API and has the same parameters such as AWS Secret Keys and Access Keys. I’ve tried using the s3\_bucket module but I get ‘Could…

---

## [Error with jinja2 templating for a conditional](https://forum.ansible.com/t/error-with-jinja2-templating-for-a-conditional/28602)

<div class="topic-metadata">

**Author:** [@Chris7](https://forum.ansible.com/u/Chris7)\
**Replies:** 1\
**Last updated:** [September 18, 2018, 10:56pm UTC](https://forum.ansible.com/t/error-with-jinja2-templating-for-a-conditional/28602 "2018-09-18T22:56:46Z")

</div>

Hello, Will someone please help me understand why this is not work? Thanks!

---

## [VNC server not running correctly with Ansible](https://forum.ansible.com/t/vnc-server-not-running-correctly-with-ansible/28600)

<div class="topic-metadata">

**Author:** [@swinickitom](https://forum.ansible.com/u/swinickitom)\
**Replies:** 0\
**Last updated:** [September 18, 2018, 5:21pm UTC](https://forum.ansible.com/t/vnc-server-not-running-correctly-with-ansible/28600 "2018-09-18T17:21:35Z")

</div>

When I start a VNC server instance with an Ansible script, the instance of the vncserver just a blank (all black) screen. It shouldn’t be an issue with vnc server as I can ssh into the server and start a vnc session myse…

---

## [for getting the prompts in between of 2 tasks in a single playbook.](https://forum.ansible.com/t/for-getting-the-prompts-in-between-of-2-tasks-in-a-single-playbook/26449)

<div class="topic-metadata">

**Author:** [@Rohit\_Mittal](https://forum.ansible.com/u/Rohit_Mittal)\
**Replies:** 1\
**Last updated:** [September 18, 2018, 4:56pm UTC](https://forum.ansible.com/t/for-getting-the-prompts-in-between-of-2-tasks-in-a-single-playbook/26449 "2018-09-18T16:56:06Z")

</div>

I have got the problem that i want some output of first task and from that data i need to put it manually by the help of prompts and after that run the 2nd task.so i achieve this playbook to be run.

---

## [edit aix stanza files](https://forum.ansible.com/t/edit-aix-stanza-files/28393)

<div class="topic-metadata">

**Author:** [@christian.tremel](https://forum.ansible.com/u/christian.tremel)\
**Replies:** 2\
**Last updated:** [September 18, 2018, 3:13pm UTC](https://forum.ansible.com/t/edit-aix-stanza-files/28393 "2018-09-18T15:13:33Z")

</div>

hi all, any way to edit so called “stanza files” in aix? i read about the blockinfile module but this seems not to be the best way to do it, since it depends on markers which will break aix configs. example of such sta…

---

## [run\_once + delegate\_to: localhost + conditional](https://forum.ansible.com/t/run-once-delegate-to-localhost-conditional/28575)

<div class="topic-metadata">

**Author:** [@aaldi](https://forum.ansible.com/u/aaldi)\
**Replies:** 1\
**Last updated:** [September 18, 2018, 3:13pm UTC](https://forum.ansible.com/t/run-once-delegate-to-localhost-conditional/28575 "2018-09-18T15:13:32Z")

</div>

I have a senario where I check for a condition on remote machines, if any of them fails the condition, I’ll create a file locally on the ansible controller and move it to any machine that failed the condition. Creating …

---

## [Connection plugin with user configuration coming from a variable](https://forum.ansible.com/t/connection-plugin-with-user-configuration-coming-from-a-variable/28591)

<div class="topic-metadata">

**Author:** [@Peter\_Horvath](https://forum.ansible.com/u/Peter_Horvath)\
**Replies:** 3\
**Last updated:** [September 18, 2018, 1:43pm UTC](https://forum.ansible.com/t/connection-plugin-with-user-configuration-coming-from-a-variable/28591 "2018-09-18T13:43:06Z")

</div>

Hi All, I am working on a custom connection plugin based on – (99% the same) – the built-in SSH connection type \[1\], which would need to take some configuration from playbook variables. Unlike the standard SSH plugin, …

---

## [Get-ScheduledTask not recognized?](https://forum.ansible.com/t/get-scheduledtask-not-recognized/28592)

<div class="topic-metadata">

**Author:** [@aaldi](https://forum.ansible.com/u/aaldi)\
**Replies:** 2\
**Last updated:** [September 18, 2018, 1:30pm UTC](https://forum.ansible.com/t/get-scheduledtask-not-recognized/28592 "2018-09-18T13:30:36Z")

</div>

I’m trying to run ansible code to execute code on a windows machine. I do that by scheduling a task as a way of ‘elevating’ as mentioned in the documentation. This has worked previously, but now I switched to working wi…

---

## [Unable to create alb with Ansible](https://forum.ansible.com/t/unable-to-create-alb-with-ansible/28597)

<div class="topic-metadata">

**Author:** [@Subrat\_Mahapatra](https://forum.ansible.com/u/Subrat_Mahapatra)\
**Replies:** 0\
**Last updated:** [September 18, 2018, 9:41am UTC](https://forum.ansible.com/t/unable-to-create-alb-with-ansible/28597 "2018-09-18T09:41:42Z")

</div>

Hi There, I am able to get the list of subnets for a VPC ID or tag name with the help of set\_fact. While using the subnets (Subnet Output of set\_fact) to create an ALB I am getting error as “load balancer cannot be att…

---

## [Help need with regards to Netscaler playbook](https://forum.ansible.com/t/help-need-with-regards-to-netscaler-playbook/28596)

<div class="topic-metadata">

**Author:** [@Balaji1](https://forum.ansible.com/u/Balaji1)\
**Replies:** 0\
**Last updated:** [September 18, 2018, 7:26am UTC](https://forum.ansible.com/t/help-need-with-regards-to-netscaler-playbook/28596 "2018-09-18T07:26:58Z")

</div>

Hello All, Do anyone know how to disable just a service group on netscaler using playbook. Thanks,

---

## [Trying Oracle database download to windows server 2012](https://forum.ansible.com/t/trying-oracle-database-download-to-windows-server-2012/28581)

<div class="topic-metadata">

**Author:** [@Isha\_G](https://forum.ansible.com/u/Isha_G)\
**Replies:** 4\
**Last updated:** [September 18, 2018, 6:25am UTC](https://forum.ansible.com/t/trying-oracle-database-download-to-windows-server-2012/28581 "2018-09-18T06:25:28Z")

</div>

Hello Jonathan, Thanks for the quick response. I am actually trying two things here: Download Oracle 12c DB on a Windows Server 2012 and I have tried it with firewall on and off but still I get the broken File. For no…

---

## [Debugging Roles vs Debugging plays](https://forum.ansible.com/t/debugging-roles-vs-debugging-plays/28594)

<div class="topic-metadata">

**Author:** [@Sloan](https://forum.ansible.com/u/Sloan)\
**Replies:** 1\
**Last updated:** [September 17, 2018, 8:34pm UTC](https://forum.ansible.com/t/debugging-roles-vs-debugging-plays/28594 "2018-09-17T20:34:06Z")

</div>

I am having issues formatting a role, I am trying to use register: and debug. Can anyone show the the formatting for debugging roles with register in ansible. This is not working in a role: name: Generate Hostnames f…

---

## [win\_package](https://forum.ansible.com/t/win-package/27251)

<div class="topic-metadata">

**Author:** [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Replies:** 8\
**Last updated:** [September 17, 2018, 1:49am UTC](https://forum.ansible.com/t/win-package/27251 "2018-09-17T01:49:33Z")

</div>

Hi, Fairly new to Ansible, but I am just finishing a fairly extensive course on Linux Academy. I have some good use cases… the first one is configuring windows VMs to have a number of packages installed automatically. C…

---

## [Using variables in handler's name and listen parameters](https://forum.ansible.com/t/using-variables-in-handlers-name-and-listen-parameters/28583)

<div class="topic-metadata">

**Author:** [@Komail\_Kanjee](https://forum.ansible.com/u/Komail_Kanjee)\
**Replies:** 0\
**Last updated:** [September 16, 2018, 9:22pm UTC](https://forum.ansible.com/t/using-variables-in-handlers-name-and-listen-parameters/28583 "2018-09-16T21:22:25Z")

</div>

Hello, I have a role which needs a dynamic handler. I defined the handler in roles/foo/handlers/main.yml as: name: {{ item.name }} shell: docker restart {{ item.name }} listen: {{ item.name }} with\_items: “{{ conf…

---

## [Connecting to a Router behind a Server](https://forum.ansible.com/t/connecting-to-a-router-behind-a-server/28582)

<div class="topic-metadata">

**Author:** [@mohamed\_ibrahim](https://forum.ansible.com/u/mohamed_ibrahim)\
**Replies:** 0\
**Last updated:** [September 16, 2018, 5:02pm UTC](https://forum.ansible.com/t/connecting-to-a-router-behind-a-server/28582 "2018-09-16T17:02:14Z")

</div>

Hi, I’m trying to create a playbook that connect to Cisco router and get some statistics. The issue faces me that the router is accessible via a server . Mean that when I want to login to the router via SSH or Telnet I…

---

## [Trying to download the Oracle db from url using win\_get\_url](https://forum.ansible.com/t/trying-to-download-the-oracle-db-from-url-using-win-get-url/28580)

<div class="topic-metadata">

**Author:** [@Isha\_G](https://forum.ansible.com/u/Isha_G)\
**Replies:** 1\
**Last updated:** [September 16, 2018, 2:13pm UTC](https://forum.ansible.com/t/trying-to-download-the-oracle-db-from-url-using-win-get-url/28580 "2018-09-16T14:13:26Z")

</div>

I am trying to download the Oracle 12c db zip file for win64 with win\_get\_url I am unable to figure out why it downloads a 5kb broken file with status as changed I am using Ansible 2.6.3

---

## [Copy lines from a file](https://forum.ansible.com/t/copy-lines-from-a-file/28579)

<div class="topic-metadata">

**Author:** [@Bilal\_ahmed](https://forum.ansible.com/u/Bilal_ahmed)\
**Replies:** 2\
**Last updated:** [September 15, 2018, 4:10pm UTC](https://forum.ansible.com/t/copy-lines-from-a-file/28579 "2018-09-15T16:10:50Z")

</div>

Hi guys, I want to copy a specific line (say last one) from a file (any log file) and email it using Ansible playbook. Which module can I use for this? Thanks in advance. BR, Bilal AHMED

---

## [included handlers in playbook with roles - not firing](https://forum.ansible.com/t/included-handlers-in-playbook-with-roles-not-firing/18847)

<div class="topic-metadata">

**Author:** [@rmullinnix](https://forum.ansible.com/u/rmullinnix)\
**Replies:** 5\
**Last updated:** [September 15, 2018, 7:56am UTC](https://forum.ansible.com/t/included-handlers-in-playbook-with-roles-not-firing/18847 "2018-09-15T07:56:45Z")

</div>

I probably have something structured wrong or it’s something simple - but I’m stuck trying to get handlers added to a playbook via include to fire. The handlers from roles that are listed in the playbook fire correctly, …

---

## [ios\_config using before to set interface range on Cisco switch](https://forum.ansible.com/t/ios-config-using-before-to-set-interface-range-on-cisco-switch/28577)

<div class="topic-metadata">

**Author:** [@Frank\_Clatterbaugh](https://forum.ansible.com/u/Frank_Clatterbaugh)\
**Replies:** 0\
**Last updated:** [September 14, 2018, 4:07pm UTC](https://forum.ansible.com/t/ios-config-using-before-to-set-interface-range-on-cisco-switch/28577 "2018-09-14T16:07:47Z")

</div>

When trying to use the before command to set an interface range on a Cisco switch it errors if I have more than one range. Both of these commands work fine from CLI. Example: Works before: interface range twoGigabitEth…

---

## [Ansible tries to connect to host that is not in inventory](https://forum.ansible.com/t/ansible-tries-to-connect-to-host-that-is-not-in-inventory/28574)

<div class="topic-metadata">

**Author:** [@Jorg\_Kastning](https://forum.ansible.com/u/Jorg_Kastning)\
**Replies:** 4\
**Last updated:** [September 14, 2018, 4:03pm UTC](https://forum.ansible.com/t/ansible-tries-to-connect-to-host-that-is-not-in-inventory/28574 "2018-09-14T16:03:03Z")

</div>

Hi, running the following ad-hoc command using a static inventory file results in one strange event: \` ansible --version ansible 2.6.3 config file = /etc/ansible/ansible.cfg configured module search path = \[u’/root/…

---

## [newbie - do something when database is not there ?](https://forum.ansible.com/t/newbie-do-something-when-database-is-not-there/28576)

<div class="topic-metadata">

**Author:** [@Eric\_Chang](https://forum.ansible.com/u/Eric_Chang)\
**Replies:** 0\
**Last updated:** [September 14, 2018, 2:50pm UTC](https://forum.ansible.com/t/newbie-do-something-when-database-is-not-there/28576 "2018-09-14T14:50:36Z")

</div>

I have a task , want to do something when a specified database is not in postgresql using command “psql --list” name: check if db exists tags: ¦ - checkdbexists ¦ - test command: “psql --list” register: dbexists …

---

## [How can I use  conditional regex as not true](https://forum.ansible.com/t/how-can-i-use-conditional-regex-as-not-true/28565)

<div class="topic-metadata">

**Author:** [@Rahul\_Gupta](https://forum.ansible.com/u/Rahul_Gupta)\
**Replies:** 2\
**Last updated:** [September 14, 2018, 8:08am UTC](https://forum.ansible.com/t/how-can-i-use-conditional-regex-as-not-true/28565 "2018-09-14T08:08:12Z")

</div>

I’m running into trouble to find the answer that how to negate the conditional with regex. Something like below: debug: msg=“{{ Hello World}}” when:- test.rc !=0 test.stderr | find (‘(No Such File or Directory)’) …

---

## [ansible connection using rsa key](https://forum.ansible.com/t/ansible-connection-using-rsa-key/28572)

<div class="topic-metadata">

**Author:** [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Replies:** 3\
**Last updated:** [September 14, 2018, 7:37am UTC](https://forum.ansible.com/t/ansible-connection-using-rsa-key/28572 "2018-09-14T07:37:43Z")

</div>

Hi All, I want to know is there any way to get connect to the remote host with ansible control server using rsa key. Instead of using user name and password I want to use rsa key for authentication. How can we do that…

---

## [Comparing checksums on a group of files](https://forum.ansible.com/t/comparing-checksums-on-a-group-of-files/27232)

<div class="topic-metadata">

**Author:** [@Hank\_Beatty](https://forum.ansible.com/u/Hank_Beatty)\
**Replies:** 1\
**Last updated:** [September 13, 2018, 11:28pm UTC](https://forum.ansible.com/t/comparing-checksums-on-a-group-of-files/27232 "2018-09-13T23:28:58Z")

</div>

Hello, I would like to compare checksums on a group of files and then copy the new file over the old file if different. Here is what I have so far: - name: Get Checksum for Old Comparison Zone Files stat: path: "{{ …

---

## [How to do rolling updates of a dynamic set of clusters in parallel?](https://forum.ansible.com/t/how-to-do-rolling-updates-of-a-dynamic-set-of-clusters-in-parallel/28569)

<div class="topic-metadata">

**Author:** [@Jamie\_Williams](https://forum.ansible.com/u/Jamie_Williams)\
**Replies:** 4\
**Last updated:** [September 13, 2018, 7:37pm UTC](https://forum.ansible.com/t/how-to-do-rolling-updates-of-a-dynamic-set-of-clusters-in-parallel/28569 "2018-09-13T19:37:19Z")

</div>

I have a deployment of multiple clusters of 4 nodes each with their own load balancer, and I want to update all the clusters in parallel, but apply rolling updates to the hosts in those clusters. This would allow me to u…

---

## [Use password protected private key for an ansible script](https://forum.ansible.com/t/use-password-protected-private-key-for-an-ansible-script/28557)

<div class="topic-metadata">

**Author:** [@Madushan\_Chathuranga](https://forum.ansible.com/u/Madushan_Chathuranga)\
**Replies:** 3\
**Last updated:** [September 13, 2018, 4:48pm UTC](https://forum.ansible.com/t/use-password-protected-private-key-for-an-ansible-script/28557 "2018-09-13T16:48:51Z")

</div>

Hi All, Is it possible to provide the password of the private key on the command line extra vars or using the inventory. In the inventory we can provide the private key but not the password? can not use --ask-pass in th…

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

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