# Ansible Project

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

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

**Page:** 279

---

## [Firewall Rules Check with Ansible](https://forum.ansible.com/t/firewall-rules-check-with-ansible/26829)

<div class="topic-metadata">

**Author:** [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Replies:** 6\
**Last updated:** [February 26, 2018, 11:05am UTC](https://forum.ansible.com/t/firewall-rules-check-with-ansible/26829 "2018-02-26T11:05:13Z")

</div>

I have a firewall with about 50 rules and constantly growing. Is there a way I can create a playbook to test whether a source host can connect to a destination host on a specific port? If that is possible I can create a…

---

## [can we install an ansible role being s3 as source?](https://forum.ansible.com/t/can-we-install-an-ansible-role-being-s3-as-source/26845)

<div class="topic-metadata">

**Author:** [@kaja\_salaam](https://forum.ansible.com/u/kaja_salaam)\
**Replies:** 1\
**Last updated:** [February 25, 2018, 11:18am UTC](https://forum.ansible.com/t/can-we-install-an-ansible-role-being-s3-as-source/26845 "2018-02-25T11:18:22Z")

</div>

can we install an ansible role being s3 as source? for ex: cat requirements.yml

---

## [Virtual Box Installation on Windows Server 2012](https://forum.ansible.com/t/virtual-box-installation-on-windows-server-2012/26820)

<div class="topic-metadata">

**Author:** [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Replies:** 2\
**Last updated:** [February 25, 2018, 10:23am UTC](https://forum.ansible.com/t/virtual-box-installation-on-windows-server-2012/26820 "2018-02-25T10:23:18Z")

</div>

Hello Everyone, I want to install virtual box on window server 2012, I wrote one playbook here below for reference,

---

## [Updating variable in Ninja for loop](https://forum.ansible.com/t/updating-variable-in-ninja-for-loop/26843)

<div class="topic-metadata">

**Author:** [@Willem\_D\_Haese](https://forum.ansible.com/u/Willem_D_Haese)\
**Replies:** 2\
**Last updated:** [February 24, 2018, 2:21pm UTC](https://forum.ansible.com/t/updating-variable-in-ninja-for-loop/26843 "2018-02-24T14:21:34Z")

</div>

Hello, I’m trying to create a new string from the keys of a dictionary in a Ninja 2 template. But the variable I’m updating in the for loop seems to reset when the for loop finishes… The following piece of template is j…

---

## [Building an ansible job to run customized CLI configurations](https://forum.ansible.com/t/building-an-ansible-job-to-run-customized-cli-configurations/26826)

<div class="topic-metadata">

**Author:** [@Jonathan\_Umpleby](https://forum.ansible.com/u/Jonathan_Umpleby)\
**Replies:** 5\
**Last updated:** [February 23, 2018, 9:41pm UTC](https://forum.ansible.com/t/building-an-ansible-job-to-run-customized-cli-configurations/26826 "2018-02-23T21:41:32Z")

</div>

So, I’m new to ansible, and I’m hoping to find ways to meet a customize-able CLI deployment scenario, where 99% of the commands are the same across devices, but a handful will be unique. I was originally thinking about …

---

## [help getting selected facts](https://forum.ansible.com/t/help-getting-selected-facts/26841)

<div class="topic-metadata">

**Author:** [@ananta.c](https://forum.ansible.com/u/ananta.c)\
**Replies:** 0\
**Last updated:** [February 23, 2018, 7:18pm UTC](https://forum.ansible.com/t/help-getting-selected-facts/26841 "2018-02-23T19:18:42Z")

</div>

Hello , I am trying to get facts ansible\_fqdn,ansible\_domain,ansible\_distribution,ansible\_distribution\_major\_version,ansible\_kernel from my all hosts, but having trouble. I tried to follow http://docs.ansible.com/ansibl…

---

## [Using new SSH password when running task](https://forum.ansible.com/t/using-new-ssh-password-when-running-task/26832)

<div class="topic-metadata">

**Author:** [@Cody\_Harlow](https://forum.ansible.com/u/Cody_Harlow)\
**Replies:** 3\
**Last updated:** [February 23, 2018, 5:28pm UTC](https://forum.ansible.com/t/using-new-ssh-password-when-running-task/26832 "2018-02-23T17:28:55Z")

</div>

So I have a role that pulls a password from a website using the uri method and I store it in a variable. I call the variable like this: varname.json.password. How can I use this password when Ansible jumps to the next pl…

---

## [How to get processeur vendor ?](https://forum.ansible.com/t/how-to-get-processeur-vendor/26471)

<div class="topic-metadata">

**Author:** [@Florent\_B](https://forum.ansible.com/u/Florent_B)\
**Replies:** 2\
**Last updated:** [February 23, 2018, 4:03pm UTC](https://forum.ansible.com/t/how-to-get-processeur-vendor/26471 "2018-02-23T16:03:36Z")

</div>

Hi, I would like to get the processor vendor of any host. I see a lot of examples over the internet using a condition like this : &#39;&quot;Intel&quot; in ansible\\\_processor\\\[0\\\]&#39; But my "ansible\_processor\[0\]" v…

---

## [for loop in jinja2](https://forum.ansible.com/t/for-loop-in-jinja2/26837)

<div class="topic-metadata">

**Author:** [@David\_Fazeli](https://forum.ansible.com/u/David_Fazeli)\
**Replies:** 2\
**Last updated:** [February 23, 2018, 2:54pm UTC](https://forum.ansible.com/t/for-loop-in-jinja2/26837 "2018-02-23T14:54:57Z")

</div>

Please explain to me how can I fix this problem? i have this file defaults/main.yml \` --- node1: ip: 1.1.1.1 node2: ip: 2.2.2.2 node3: ip: 3.3.3.3 \` Now, I want in template file ip.j2 by for loop access the IPs…

---

## [passing values while installing packages](https://forum.ansible.com/t/passing-values-while-installing-packages/26793)

<div class="topic-metadata">

**Author:** [@sureshmadapathii](https://forum.ansible.com/u/sureshmadapathii)\
**Replies:** 1\
**Last updated:** [February 23, 2018, 2:44pm UTC](https://forum.ansible.com/t/passing-values-while-installing-packages/26793 "2018-02-23T14:44:39Z")

</div>

hi All, while in stalling packages there are values we need to pass, how to pass those on commandline/runtime . ex: \[y/n\] \[db name\]: \[option 3?\]:

---

## [passing command line arguments](https://forum.ansible.com/t/passing-command-line-arguments/26838)

<div class="topic-metadata">

**Author:** [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Replies:** 0\
**Last updated:** [February 23, 2018, 2:43pm UTC](https://forum.ansible.com/t/passing-command-line-arguments/26838 "2018-02-23T14:43:31Z")

</div>

\--- - hosts: all become: yes tasks: - name: create an empty folders import\_tasks: /etc/ansible/foldercreation.yml - name: Copy rpm file to server copy: src: "{{ item }}" …

---

## [Ansible playbook --extra-var with dot in json key](https://forum.ansible.com/t/ansible-playbook-extra-var-with-dot-in-json-key/26836)

<div class="topic-metadata">

**Author:** [@Foss\_Geek](https://forum.ansible.com/u/Foss_Geek)\
**Replies:** 2\
**Last updated:** [February 23, 2018, 11:57am UTC](https://forum.ansible.com/t/ansible-playbook-extra-var-with-dot-in-json-key/26836 "2018-02-23T11:57:38Z")

</div>

Hi All, I need to pass a json file to ansible-palybook command using --extra-var (like --extra-var @/tmp/test.json). I am able to reference the variable inside playbook if the json key don’t have dot character in it. Bu…

---

## [Ansible 2.4.2 Cacshing issue](https://forum.ansible.com/t/ansible-2-4-2-cacshing-issue/26835)

<div class="topic-metadata">

**Author:** [@Kernel\_V5](https://forum.ansible.com/u/Kernel_V5)\
**Replies:** 2\
**Last updated:** [February 23, 2018, 4:17am UTC](https://forum.ansible.com/t/ansible-2-4-2-cacshing-issue/26835 "2018-02-23T04:17:36Z")

</div>

I am using Ansible 2.4.2. I am not able to Switch AWS profile with Ansible, it cached my profile information. Even I deleted .aws/credentials file, its still working smoothly. Till now I already tried those solutions a…

---

## [Multiple when statements in loop?](https://forum.ansible.com/t/multiple-when-statements-in-loop/26831)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 5\
**Last updated:** [February 23, 2018, 12:09am UTC](https://forum.ansible.com/t/multiple-when-statements-in-loop/26831 "2018-02-23T00:09:59Z")

</div>

For reference, this is a continuation of: https://groups.google.com/forum/#!topic/ansible-project/XhU9iPXjjcw Can you use multiple when statements in a loop? or is there a different way to approach this without having t…

---

## [Parsing var created with loop](https://forum.ansible.com/t/parsing-var-created-with-loop/26828)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 3\
**Last updated:** [February 22, 2018, 10:07pm UTC](https://forum.ansible.com/t/parsing-var-created-with-loop/26828 "2018-02-22T22:07:59Z")

</div>

I have the following output from a variable called directories. It was created using a loop that would run stat against two different paths. What is the proper way to reference the “stat: exists: boolean” sections of the…

---

## [Ansible multiple roles in a block with rescue/fail](https://forum.ansible.com/t/ansible-multiple-roles-in-a-block-with-rescue-fail/26830)

<div class="topic-metadata">

**Author:** [@smitconsultant2017](https://forum.ansible.com/u/smitconsultant2017)\
**Replies:** 0\
**Last updated:** [February 22, 2018, 9:34pm UTC](https://forum.ansible.com/t/ansible-multiple-roles-in-a-block-with-rescue-fail/26830 "2018-02-22T21:34:28Z")

</div>

Hi, I am trying to create a master playbook where I am including multiple roles in it. I am using block for each role in playbook along with rescue and fail section. Rescue section should perform rollback of the previou…

---

## [Ansible - use variable from another host](https://forum.ansible.com/t/ansible-use-variable-from-another-host/26827)

<div class="topic-metadata">

**Author:** [@Larry\_Bakun](https://forum.ansible.com/u/Larry_Bakun)\
**Replies:** 1\
**Last updated:** [February 22, 2018, 8:42pm UTC](https://forum.ansible.com/t/ansible-use-variable-from-another-host/26827 "2018-02-22T20:42:22Z")

</div>

I have a playbook that executes a script on a Windows box that returns a value that I have to re-use later on in my playbook after switching to the localhost. How can I access this value after switching back to localhost…

---

## [Run multiple play books according to role](https://forum.ansible.com/t/run-multiple-play-books-according-to-role/26813)

<div class="topic-metadata">

**Author:** [@ansiblekrazy](https://forum.ansible.com/u/ansiblekrazy)\
**Replies:** 3\
**Last updated:** [February 22, 2018, 5:08pm UTC](https://forum.ansible.com/t/run-multiple-play-books-according-to-role/26813 "2018-02-22T17:08:12Z")

</div>

I want to run playbooks according to role host file will contain all host:groups if role a and group a: run playbook a if role b and group b run playbook b etc Or if we give role in runtime, it will run the playboo…

---

## [How to schedule an ansible job form a command line](https://forum.ansible.com/t/how-to-schedule-an-ansible-job-form-a-command-line/26816)

<div class="topic-metadata">

**Author:** [@timothy.n.mcgibbon](https://forum.ansible.com/u/timothy.n.mcgibbon)\
**Replies:** 2\
**Last updated:** [February 22, 2018, 4:37pm UTC](https://forum.ansible.com/t/how-to-schedule-an-ansible-job-form-a-command-line/26816 "2018-02-22T16:37:50Z")

</div>

What is the command line to have Ansible schedule a job template with variables. We have some 30+ job templates and need a way to schedule the jobs at requested time. So we have an interface program that know each job te…

---

## [handlers and include\_role, import\_role](https://forum.ansible.com/t/handlers-and-include-role-import-role/26825)

<div class="topic-metadata">

**Author:** [@George\_Shuklin](https://forum.ansible.com/u/George_Shuklin)\
**Replies:** 0\
**Last updated:** [February 22, 2018, 4:29pm UTC](https://forum.ansible.com/t/handlers-and-include-role-import-role/26825 "2018-02-22T16:29:26Z")

</div>

I’ve done research on behaviour of handlers together with include/import role. https://medium.com/@george.shuklin/include-role-import-role-and-handlers-in-ansible-b32a5386a555 Short excerpt: import\_role: All handlers …

---

## [Survey of CM tools for Master thesis (HELP NEEDED, READ PLEASE)](https://forum.ansible.com/t/survey-of-cm-tools-for-master-thesis-help-needed-read-please/26817)

<div class="topic-metadata">

**Author:** [@Michal\_Hagara](https://forum.ansible.com/u/Michal_Hagara)\
**Replies:** 0\
**Last updated:** [February 21, 2018, 9:26pm UTC](https://forum.ansible.com/t/survey-of-cm-tools-for-master-thesis-help-needed-read-please/26817 "2018-02-21T21:26:19Z")

</div>

Hello everyone! Please, before you bash me (and I hope you won’t), I would like to ask you all for help. I’m writing my master thesis right now and one part of it consists of a public survey in which I’ll be evaluating…

---

## [Show clean yum output](https://forum.ansible.com/t/show-clean-yum-output/26805)

<div class="topic-metadata">

**Author:** [@Willem\_D\_Haese](https://forum.ansible.com/u/Willem_D_Haese)\
**Replies:** 6\
**Last updated:** [February 21, 2018, 6:02pm UTC](https://forum.ansible.com/t/show-clean-yum-output/26805 "2018-02-21T18:02:23Z")

</div>

Hello, I’ve been struggling with outputting yum update results in a nice way. So I start with installing some required packages and registering the output in yum\_install\_required\_output: \` name: “Install multiple req…

---

## [merge dictionary list in jinja2](https://forum.ansible.com/t/merge-dictionary-list-in-jinja2/26799)

<div class="topic-metadata">

**Author:** [@deewon](https://forum.ansible.com/u/deewon)\
**Replies:** 4\
**Last updated:** [February 21, 2018, 5:25pm UTC](https://forum.ansible.com/t/merge-dictionary-list-in-jinja2/26799 "2018-02-21T17:25:32Z")

</div>

Hi all, I’m relatively new to using ansible and hoping someone can assist with some insight around this. I’m trying to create a jinja2 template that generates authentication credentials for a database in json format I…

---

## [How to deal with APIs and short live tokens](https://forum.ansible.com/t/how-to-deal-with-apis-and-short-live-tokens/26812)

<div class="topic-metadata">

**Author:** [@marcel.liker](https://forum.ansible.com/u/marcel.liker)\
**Replies:** 0\
**Last updated:** [February 21, 2018, 12:41pm UTC](https://forum.ansible.com/t/how-to-deal-with-apis-and-short-live-tokens/26812 "2018-02-21T12:41:25Z")

</div>

Hi all, I have the following situation which I am not sure how to tackle with ansible. We have a token API to retrieve auth token using my corporate credentials. Then using this token to authenticate I call another API…

---

## [Windows - become\_method runas - password definition](https://forum.ansible.com/t/windows-become-method-runas-password-definition/26779)

<div class="topic-metadata">

**Author:** [@Jeremie\_Levy](https://forum.ansible.com/u/Jeremie_Levy)\
**Replies:** 4\
**Last updated:** [February 21, 2018, 10:42am UTC](https://forum.ansible.com/t/windows-become-method-runas-password-definition/26779 "2018-02-21T10:42:21Z")

</div>

Hello I am using successfully ansible in my windows environment with Kerberos. I am still having trouble if i want to execute a task as another user than my ansible user. For example, i want to execute specific task a…

---

## [SSL issue with get\_url module](https://forum.ansible.com/t/ssl-issue-with-get-url-module/26786)

<div class="topic-metadata">

**Author:** [@Mehul\_Ved](https://forum.ansible.com/u/Mehul_Ved)\
**Replies:** 2\
**Last updated:** [February 21, 2018, 9:44am UTC](https://forum.ansible.com/t/ssl-issue-with-get-url-module/26786 "2018-02-21T09:44:58Z")

</div>

I am trying to download a file from the repo to a server using ansible. This has been working fine on all the old machines but on a new machine, which has the same setup, it keeps giving me SSL error. My environment i…

---

## [how to add new line character in copy module to write multiple lines](https://forum.ansible.com/t/how-to-add-new-line-character-in-copy-module-to-write-multiple-lines/26807)

<div class="topic-metadata">

**Author:** [@Gopi\_Krishna](https://forum.ansible.com/u/Gopi_Krishna)\
**Replies:** 2\
**Last updated:** [February 21, 2018, 6:59am UTC](https://forum.ansible.com/t/how-to-add-new-line-character-in-copy-module-to-write-multiple-lines/26807 "2018-02-21T06:59:44Z")

</div>

Hi All, I want to write few lines into a file using copy module by line by line but it’s not happening, name: “Storing the data details” copy: content: ’ IP: xx.xx.xx.xx \\n IPV4: xx.xx.xx.xx \\n HOST\_NAME: {{host\_n…

---

## [Ansible-Playbook : httpd installation failed @client](https://forum.ansible.com/t/ansible-playbook-httpd-installation-failed-client/26809)

<div class="topic-metadata">

**Author:** [@mailtosurean](https://forum.ansible.com/u/mailtosurean)\
**Replies:** 0\
**Last updated:** [February 21, 2018, 6:48am UTC](https://forum.ansible.com/t/ansible-playbook-httpd-installation-failed-client/26809 "2018-02-21T06:48:00Z")

</div>

Hi Team, I’m facing the below error while installing httpd from control server to client via playbook script My Script:

---

## [Get info from a host, and use it in another host's template](https://forum.ansible.com/t/get-info-from-a-host-and-use-it-in-another-hosts-template/26773)

<div class="topic-metadata">

**Author:** [@Brigzzy\_Briggs](https://forum.ansible.com/u/Brigzzy_Briggs)\
**Replies:** 3\
**Last updated:** [February 20, 2018, 5:16pm UTC](https://forum.ansible.com/t/get-info-from-a-host-and-use-it-in-another-hosts-template/26773 "2018-02-20T17:16:27Z")

</div>

Hi all, I’m learning Ansible, and I’m trying to use it to template a Nagios config file. My network is 98% Debian and Ubuntu, with a FreePBX server to mix things up. There en lies the issue I’m having. When I run this c…

---

## [File copy fails with large file](https://forum.ansible.com/t/file-copy-fails-with-large-file/26803)

<div class="topic-metadata">

**Author:** [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Replies:** 0\
**Last updated:** [February 20, 2018, 5:07pm UTC](https://forum.ansible.com/t/file-copy-fails-with-large-file/26803 "2018-02-20T17:07:32Z")

</div>

Outside of Ansible, the user ansible can scp the file in 52 seconds. Using Ansible, even after upping the timeout to 105 seconds per ERROR! Timeout (12s) waiting for privilege escalation prompt: · Issue …

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

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