# Ansible Project

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

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

**Page:** 142

---

## [How to use an IF Else Statement with Ansible Playbook](https://forum.ansible.com/t/how-to-use-an-if-else-statement-with-ansible-playbook/32292)

<div class="topic-metadata">

**Author:** [@David\_Foley](https://forum.ansible.com/u/David_Foley)\
**Replies:** 3\
**Last updated:** [February 21, 2020, 11:56am UTC](https://forum.ansible.com/t/how-to-use-an-if-else-statement-with-ansible-playbook/32292 "2020-02-21T11:56:16Z")

</div>

Hi, Can Someone help with a IF Else Statment within Ansible. If i Run a a GetStatus Playbook the Register: vminfo outputs the Following: ok: \[localhost\] =\> { “vminfo”: { “changed”: false, “failed”: false, “instanc…

---

## [Creating variables from register variable in ansible](https://forum.ansible.com/t/creating-variables-from-register-variable-in-ansible/32293)

<div class="topic-metadata">

**Author:** [@Sivaraman\_P](https://forum.ansible.com/u/Sivaraman_P)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 11:35am UTC](https://forum.ansible.com/t/creating-variables-from-register-variable-in-ansible/32293 "2020-02-21T11:35:40Z")

</div>

I have the register variable which contains number of lines in stdout\_lines. With those lines I have to create variables. Is there any workaround for this. Ex: register: output output.stdout\_line contains below lines v…

---

## [Unable to create the new dashboard : 404 messageDashboard not found](https://forum.ansible.com/t/unable-to-create-the-new-dashboard-404-messagedashboard-not-found/31930)

<div class="topic-metadata">

**Author:** [@anilkumar\_panditi](https://forum.ansible.com/u/anilkumar_panditi)\
**Replies:** 4\
**Last updated:** [February 21, 2020, 8:24am UTC](https://forum.ansible.com/t/unable-to-create-the-new-dashboard-404-messagedashboard-not-found/31930 "2020-02-21T08:24:28Z")

</div>

I am trying to import a Grafana dashboard(JSON) to Grafana. Following is the ansible playbook --- - name: task to parameterise grafana template hosts: localhost become: true user: root tasks: - name: Import …

---

## [Svn migration to git using Ansible](https://forum.ansible.com/t/svn-migration-to-git-using-ansible/32290)

<div class="topic-metadata">

**Author:** [@Markus\_Rottlander](https://forum.ansible.com/u/Markus_Rottlander)\
**Replies:** 0\
**Last updated:** [February 20, 2020, 7:46pm UTC](https://forum.ansible.com/t/svn-migration-to-git-using-ansible/32290 "2020-02-20T19:46:01Z")

</div>

There are already special tools for this (e.g. svn2git). https://github.com/nirvdrum/svn2git Why reinvent the wheel?

---

## [ansible ping failure to windows host](https://forum.ansible.com/t/ansible-ping-failure-to-windows-host/32285)

<div class="topic-metadata">

**Author:** [@Yehuda\_Pinhas](https://forum.ansible.com/u/Yehuda_Pinhas)\
**Replies:** 2\
**Last updated:** [February 20, 2020, 1:49pm UTC](https://forum.ansible.com/t/ansible-ping-failure-to-windows-host/32285 "2020-02-20T13:49:36Z")

</div>

Hi guys! I have issues with ansible ping (python module validation) with Windows Server 2019 host. This is the result: \[ansible@Netauto-Dev new\_branch\]$ ansible dhcp-test -m ping -vvvv 2020-02-20 14:37:56,686 p=ansib…

---

## [Export environment variables](https://forum.ansible.com/t/export-environment-variables/31913)

<div class="topic-metadata">

**Author:** [@mark.tovey](https://forum.ansible.com/u/mark.tovey)\
**Replies:** 11\
**Last updated:** [February 20, 2020, 12:22pm UTC](https://forum.ansible.com/t/export-environment-variables/31913 "2020-02-20T12:22:40Z")

</div>

I need to export some environment variables before running a task, but it appears that setting variables with “environment” does not export them; they remain local. For test, I wrote the following simple playbook: ho…

---

## [Svn migration to git using Ansible](https://forum.ansible.com/t/svn-migration-to-git-using-ansible/32284)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 1\
**Last updated:** [February 20, 2020, 11:33am UTC](https://forum.ansible.com/t/svn-migration-to-git-using-ansible/32284 "2020-02-20T11:33:20Z")

</div>

Hi Gyalgin Is there anything ansible specific that you are looking for?

---

## [remote\_src and template\_host for template module not working for me](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32274)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 1\
**Last updated:** [February 20, 2020, 9:51am UTC](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32274 "2020-02-20T09:51:51Z")

</div>

A few issues: 1. The file /template/test.j2 needs to be available on the remote node, because you specified "remote\_src: yes". Fix this. 2. template\_host is not a valid parameter for the template task - and it is not…

---

## [remote\_src and template\_host for template module not working for me](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32282)

<div class="topic-metadata">

**Author:** [@jborean](https://forum.ansible.com/u/jborean)\
**Replies:** 0\
**Last updated:** [February 20, 2020, 8:09am UTC](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32282 "2020-02-20T08:09:23Z")

</div>

You can’t, template will only work with a source on the controller as that is where the cars are stored. Either store the template in your role/playbook or use fetch to fetch the file to the controller temporarily and th…

---

## [ansible-playbook command prompt like yes/no while connecting to managed node for the first time](https://forum.ansible.com/t/ansible-playbook-command-prompt-like-yes-no-while-connecting-to-managed-node-for-the-first-time/32281)

<div class="topic-metadata">

**Author:** [@anilkumar\_panditi](https://forum.ansible.com/u/anilkumar_panditi)\
**Replies:** 1\
**Last updated:** [February 20, 2020, 6:46am UTC](https://forum.ansible.com/t/ansible-playbook-command-prompt-like-yes-no-while-connecting-to-managed-node-for-the-first-time/32281 "2020-02-20T06:46:44Z")

</div>

Hello, All My ansible-playbook -i -vv command prompt like yes/no while connecting to managed node for the first time. How can i avoid the prompting because i have aggregated all ansible-playbook commands in a shell sc…

---

## [cannot import name PlayBook in python](https://forum.ansible.com/t/cannot-import-name-playbook-in-python/32280)

<div class="topic-metadata">

**Author:** [@Sagar\_Mujumale](https://forum.ansible.com/u/Sagar_Mujumale)\
**Replies:** 0\
**Last updated:** [February 20, 2020, 6:03am UTC](https://forum.ansible.com/t/cannot-import-name-playbook-in-python/32280 "2020-02-20T06:03:15Z")

</div>

I am trying to execute ansible playbook by python script however I am getting below error. from ansible.playbook import PlayBook ImportError: cannot import name PlayBook My script is as below, from ansible.playbook i…

---

## [win\_dns\_record](https://forum.ansible.com/t/win-dns-record/32277)

<div class="topic-metadata">

**Author:** [@kzersatz](https://forum.ansible.com/u/kzersatz)\
**Replies:** 2\
**Last updated:** [February 20, 2020, 12:38am UTC](https://forum.ansible.com/t/win-dns-record/32277 "2020-02-20T00:38:42Z")

</div>

OK, Am I missing something? or is this module requiring you to run it against the DNS server directly? I know I though powershell normally can define the DNS server I wish to execute against, but this module doesn’t lo…

---

## [Does anyone have an Interesting Ansible demo idea for a talk?](https://forum.ansible.com/t/does-anyone-have-an-interesting-ansible-demo-idea-for-a-talk/32258)

<div class="topic-metadata">

**Author:** [@Christopher\_Saunders](https://forum.ansible.com/u/Christopher_Saunders)\
**Replies:** 3\
**Last updated:** [February 19, 2020, 10:03pm UTC](https://forum.ansible.com/t/does-anyone-have-an-interesting-ansible-demo-idea-for-a-talk/32258 "2020-02-19T22:03:07Z")

</div>

I am doing a 45-minute talk on Ansible and Ansible Tower to a large group of infrastructure people at my company. The audience is mixed, some know Ansible well, others may have only heard about it. I would like to develo…

---

## [Ansible 2.10 and Project Restructuring](https://forum.ansible.com/t/ansible-2-10-and-project-restructuring/32279)

<div class="topic-metadata">

**Author:** [@sdoran](https://forum.ansible.com/u/sdoran)\
**Replies:** 0\
**Last updated:** [February 19, 2020, 9:57pm UTC](https://forum.ansible.com/t/ansible-2-10-and-project-restructuring/32279 "2020-02-19T21:57:34Z")

</div>

Greetings Ansible Community, For the 2.10 release of Ansible, we plan to restructure the ansible/ansible repository. The majority of modules and plugins will migrate to collection repositories to better enable the commu…

---

## [Ansible-vault password file not found](https://forum.ansible.com/t/ansible-vault-password-file-not-found/26932)

<div class="topic-metadata">

**Author:** [@JiElPe-Fr38](https://forum.ansible.com/u/JiElPe-Fr38)\
**Replies:** 4\
**Last updated:** [February 19, 2020, 6:57pm UTC](https://forum.ansible.com/t/ansible-vault-password-file-not-found/26932 "2020-02-19T18:57:24Z")

</div>

Dear all, I am “auto learning” ansible and currently try to understand how to use vault. To summarize things, I have created a vault.yml file in the vars directory, and included it in the main.yml task. Then, I put the…

---

## [Obfuscate password in the Ansible Vault](https://forum.ansible.com/t/obfuscate-password-in-the-ansible-vault/32275)

<div class="topic-metadata">

**Author:** [@Jeremy\_Njock](https://forum.ansible.com/u/Jeremy_Njock)\
**Replies:** 1\
**Last updated:** [February 19, 2020, 3:28pm UTC](https://forum.ansible.com/t/obfuscate-password-in-the-ansible-vault/32275 "2020-02-19T15:28:56Z")

</div>

Hi, My playbook installs Docker on a remote server, and logs in on a docker registry by using user credentials, specified by following task \` name: Log into FIS registry docker\_login: registry: my-company-docker-re…

---

## [Cannot filter with from\_json](https://forum.ansible.com/t/cannot-filter-with-from-json/32261)

<div class="topic-metadata">

**Author:** [@hieronymus](https://forum.ansible.com/u/hieronymus)\
**Replies:** 6\
**Last updated:** [February 19, 2020, 12:41pm UTC](https://forum.ansible.com/t/cannot-filter-with-from-json/32261 "2020-02-19T12:41:52Z")

</div>

Hi Team, I’m encountered some issue with set\_facts from variable with json and for this reason I’m tried to understand this. To reproduce this case I’m using the example from here : playbooks filters \` tasks shell:…

---

## [Ansible - Router ACL changes](https://forum.ansible.com/t/ansible-router-acl-changes/32266)

<div class="topic-metadata">

**Author:** [@ilayavpl](https://forum.ansible.com/u/ilayavpl)\
**Replies:** 4\
**Last updated:** [February 19, 2020, 11:55am UTC](https://forum.ansible.com/t/ansible-router-acl-changes/32266 "2020-02-19T11:55:59Z")

</div>

Router ACL Changes - Ansible playbook Execution – While updating the below Router ACL changes in router, The playbook execution status was changed, but the changes are not replicated in Router and not getting any error …

---

## [Ansible roles and tasks](https://forum.ansible.com/t/ansible-roles-and-tasks/32268)

<div class="topic-metadata">

**Author:** [@Amarnatha\_Reddy](https://forum.ansible.com/u/Amarnatha_Reddy)\
**Replies:** 1\
**Last updated:** [February 19, 2020, 11:38am UTC](https://forum.ansible.com/t/ansible-roles-and-tasks/32268 "2020-02-19T11:38:05Z")

</div>

Hi All, I am planning to implement Ansible to do some tasks as per my requirement! Need ansible project structure guidance to process mix of roles and tasks. Tasks: Deploy the .zip file into server After deploy clea…

---

## [Doubt regarding loops and conditionals](https://forum.ansible.com/t/doubt-regarding-loops-and-conditionals/32257)

<div class="topic-metadata">

**Author:** [@Nuno\_Jordao](https://forum.ansible.com/u/Nuno_Jordao)\
**Replies:** 6\
**Last updated:** [February 19, 2020, 11:37am UTC](https://forum.ansible.com/t/doubt-regarding-loops-and-conditionals/32257 "2020-02-19T11:37:18Z")

</div>

Hello, I have a doubt regarding loops and conditionals that maybe someone can make it clear to me. In the documentation is stated that: “When combining Conditionals with a loop, the when: statement is processed separa…

---

## [New tool: nanvault - the Ansible crypto utility you are looking for](https://forum.ansible.com/t/new-tool-nanvault-the-ansible-crypto-utility-you-are-looking-for/32270)

<div class="topic-metadata">

**Author:** [@Marco\_Bellaccini](https://forum.ansible.com/u/Marco_Bellaccini)\
**Replies:** 0\
**Last updated:** [February 19, 2020, 11:28am UTC](https://forum.ansible.com/t/new-tool-nanvault-the-ansible-crypto-utility-you-are-looking-for/32270 "2020-02-19T11:28:47Z")

</div>

Hi, I've just released nanvault - a smart, standalone crypto tool compatible with the Ansible Vault format. Hope you'll enjoy it: https://github.com/marcobellaccini/nanvault https://asciinema.org/a/302642 Cheers Ma…

---

## [not able to run playbook in ansible 2.9.2](https://forum.ansible.com/t/not-able-to-run-playbook-in-ansible-2-9-2/32265)

<div class="topic-metadata">

**Author:** [@Eric\_Chang](https://forum.ansible.com/u/Eric_Chang)\
**Replies:** 1\
**Last updated:** [February 19, 2020, 8:01am UTC](https://forum.ansible.com/t/not-able-to-run-playbook-in-ansible-2-9-2/32265 "2020-02-19T08:01:34Z")

</div>

I wrote a simple plabook to test ansible\_play\_name hosts: localhost tasks: name: ref playname debug: msg: ansible\_play\_name I can run the playbook in ansible 2.8 , but get an error in ansible 2.9.2 ansible 2.…

---

## [deployment failing in ansible](https://forum.ansible.com/t/deployment-failing-in-ansible/32262)

<div class="topic-metadata">

**Author:** [@Nishu\_Sinha](https://forum.ansible.com/u/Nishu_Sinha)\
**Replies:** 3\
**Last updated:** [February 18, 2020, 3:56pm UTC](https://forum.ansible.com/t/deployment-failing-in-ansible/32262 "2020-02-18T15:56:15Z")

</div>

Hi I am getting the below error when i am trying to deploy the application NCS via Jenkins using ansible scripts | | TASK \[ncs-ansible : Run install.sh\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* task path: /aut…

---

## [Ansible when logic to determine whether to use yum or dnf to install packages on ansible\_os\_family='RedHat'](https://forum.ansible.com/t/ansible-when-logic-to-determine-whether-to-use-yum-or-dnf-to-install-packages-on-ansible-os-family-redhat/32260)

<div class="topic-metadata">

**Author:** [@Donald\_Jones](https://forum.ansible.com/u/Donald_Jones)\
**Replies:** 3\
**Last updated:** [February 18, 2020, 2:51pm UTC](https://forum.ansible.com/t/ansible-when-logic-to-determine-whether-to-use-yum-or-dnf-to-install-packages-on-ansible-os-family-redhat/32260 "2020-02-18T14:51:11Z")

</div>

Hi, Up until now I’ve been making a logic decision with my ansible roles based upon the ansible\_os\_family, to run the appropriate module for yum (‘RedHat’) or apt (‘Debian’). With the introduction of CentOS 8, dnf has …

---

## [List of hosts by MacAdress + Connexion if computer is in standby](https://forum.ansible.com/t/list-of-hosts-by-macadress-connexion-if-computer-is-in-standby/32247)

<div class="topic-metadata">

**Author:** [@Test\_Deux](https://forum.ansible.com/u/Test_Deux)\
**Replies:** 3\
**Last updated:** [February 18, 2020, 12:05pm UTC](https://forum.ansible.com/t/list-of-hosts-by-macadress-connexion-if-computer-is-in-standby/32247 "2020-02-18T12:05:35Z")

</div>

Hello, I am considering using Ansible to achieve a certain goal, but as I get more informed, I feel that Ansible may not be the right tool. Unless, perhaps, I missed some information? Result sought: Use Ansible to qui…

---

## [aws\_s3 - not sure if I understand how to use](https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32259)

<div class="topic-metadata">

**Author:** [@Angel\_Rengifo\_Cancin](https://forum.ansible.com/u/Angel_Rengifo_Cancin)\
**Replies:** 1\
**Last updated:** [February 18, 2020, 4:06am UTC](https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32259 "2020-02-18T04:06:04Z")

</div>

Hello: my role for learning is: s3-create.yml \` name: Create S3 Bucket aws\_s3: bucket: my-bucket mode: create permission: private-read region: us-east-1 \` This piece of code looks good. my playbook: \` ke…

---

## [Ansible-variable containing double quotes changed](https://forum.ansible.com/t/ansible-variable-containing-double-quotes-changed/32249)

<div class="topic-metadata">

**Author:** [@Barun\_kumar](https://forum.ansible.com/u/Barun_kumar)\
**Replies:** 3\
**Last updated:** [February 18, 2020, 2:12am UTC](https://forum.ansible.com/t/ansible-variable-containing-double-quotes-changed/32249 "2020-02-18T02:12:43Z")

</div>

When I assign a variable containing double quotes to another variable the double quotes (") sometimes get converted to single quotes ('). .can you please suggest how to solve this. TASK \[asm\_pdb\_disk\_mapping : debug\] \*\*…

---

## [Unable to restart auditd service on centos7](https://forum.ansible.com/t/unable-to-restart-auditd-service-on-centos7/32251)

<div class="topic-metadata">

**Author:** [@Bala\_Mutyam](https://forum.ansible.com/u/Bala_Mutyam)\
**Replies:** 6\
**Last updated:** [February 18, 2020, 1:47am UTC](https://forum.ansible.com/t/unable-to-restart-auditd-service-on-centos7/32251 "2020-02-18T01:47:53Z")

</div>

Hi all, Anisble Version: ansible 2.7.7 I’m configuring auditd on centos7 but the auditd service is failing to restart. Handler: name: centos7 restart auditd become: yes command: service auditd restart Error: FAI…

---

## [Ansible Create vSphere Virtual Machine](https://forum.ansible.com/t/ansible-create-vsphere-virtual-machine/32252)

<div class="topic-metadata">

**Author:** [@David\_Foley](https://forum.ansible.com/u/David_Foley)\
**Replies:** 5\
**Last updated:** [February 17, 2020, 7:29pm UTC](https://forum.ansible.com/t/ansible-create-vsphere-virtual-machine/32252 "2020-02-17T19:29:04Z")

</div>

Ansible playbook fails to deploy Virtual Machine: Can’t Find Folder How can I deploy a Virtual machine without any Folders within the Cluster ?

---

## [aws\_s3 - not sure if I understand how to use](https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32255)

<div class="topic-metadata">

**Author:** [@Amit\_Kulkarni](https://forum.ansible.com/u/Amit_Kulkarni)\
**Replies:** 2\
**Last updated:** [February 17, 2020, 6:42pm UTC](https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32255 "2020-02-17T18:42:39Z")

</div>

Ansible supports S3 and all the operations supported by S3 API. You have to make sure that you have access to AWS CLI and also install python boto. This is the framework used for calling AWS API via ansible. Also make …

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

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