# Archives

**URL:** https://forum.ansible.com/c/archives/31.md?page=305

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

**Page:** 306

---

## [pick the inventory depends on my env variables ?](https://forum.ansible.com/t/pick-the-inventory-depends-on-my-env-variables/29884)

<div class="topic-metadata">

**Author:** [@Sampath\_Kumar](https://forum.ansible.com/u/Sampath_Kumar)\
**Replies:** 1\
**Last updated:** [March 14, 2019, 11:54am UTC](https://forum.ansible.com/t/pick-the-inventory-depends-on-my-env-variables/29884 "2019-03-14T11:54:50Z")

</div>

Hi All Can someone help me on how to execute the AWX template/playbook Template in such a way that it has to pick the inventory depends on my env variables ?

---

## [unable to delete line  file](https://forum.ansible.com/t/unable-to-delete-line-file/29867)

<div class="topic-metadata">

**Author:** [@Deepak\_Sharma](https://forum.ansible.com/u/Deepak_Sharma)\
**Replies:** 4\
**Last updated:** [March 14, 2019, 8:01am UTC](https://forum.ansible.com/t/unable-to-delete-line-file/29867 "2019-03-14T08:01:02Z")

</div>

this is my host file. cat /tmp/node/test.new \[masters\] 1234.abc.com \[nodes\] 453.abc.com openshift\_node\_labels,22,=“{‘region’: ‘us\_midwest’, ‘datacenter’: ‘ctc’, ‘zone’: ‘core’, ‘environment’: ‘nonprod’, ‘logging-infr…

---

## [ant to use my group\_vars variable with loops to assign variable value as argument which i want to run from playbook. for my workaround](https://forum.ansible.com/t/ant-to-use-my-group-vars-variable-with-loops-to-assign-variable-value-as-argument-which-i-want-to-run-from-playbook-for-my-workaround/29883)

<div class="topic-metadata">

**Author:** [@Atul\_Sharma](https://forum.ansible.com/u/Atul_Sharma)\
**Replies:** 0\
**Last updated:** [March 14, 2019, 7:38am UTC](https://forum.ansible.com/t/ant-to-use-my-group-vars-variable-with-loops-to-assign-variable-value-as-argument-which-i-want-to-run-from-playbook-for-my-workaround/29883 "2019-03-14T07:38:39Z")

</div>

I want to use my group\_vars variable with loops to assign variable value as argument which i want to run from playbook. for my workaround group\_vars : app.yml: clay: username\_ice: admin password\_ice: abc1234 nTurn…

---

## [help resolve warnings first role](https://forum.ansible.com/t/help-resolve-warnings-first-role/29879)

<div class="topic-metadata">

**Author:** [@Gaetano\_Giacalone](https://forum.ansible.com/u/Gaetano_Giacalone)\
**Replies:** 2\
**Last updated:** [March 14, 2019, 7:22am UTC](https://forum.ansible.com/t/help-resolve-warnings-first-role/29879 "2019-03-14T07:22:01Z")

</div>

I have this role dagman62.apache\_php it is installing apache/apr with php from source. I am registered variables and when: changed to determine if a tarball changed and needs to be UN-archived, configured, then built. I …

---

## [install.yml Fails](https://forum.ansible.com/t/install-yml-fails/29882)

<div class="topic-metadata">

**Author:** [@Sindhuja\_Koneru](https://forum.ansible.com/u/Sindhuja_Koneru)\
**Replies:** 0\
**Last updated:** [March 14, 2019, 4:21am UTC](https://forum.ansible.com/t/install-yml-fails/29882 "2019-03-14T04:21:11Z")

</div>

Hello, when i run install.yml script that is provided in the bundle, it fails saying awe-manage not found. I suppose awX-manage should be installed with the same script. How can I resolve this error? Any help/input is…

---

## [How to Restore DB from backup file](https://forum.ansible.com/t/how-to-restore-db-from-backup-file/29880)

<div class="topic-metadata">

**Author:** [@Sindhuja\_Koneru](https://forum.ansible.com/u/Sindhuja_Koneru)\
**Replies:** 2\
**Last updated:** [March 14, 2019, 3:15am UTC](https://forum.ansible.com/t/how-to-restore-db-from-backup-file/29880 "2019-03-14T03:15:32Z")

</div>

Hello, Can someone please help me here, not able to figure out why i am unable to run restore.yml that is provided in the bundle. STEP 1:- I have run backup.yml and it successfully created a tar file. STEP 2:- Then I …

---

## [How to format the inventory file for amazon ec2 hosts?](https://forum.ansible.com/t/how-to-format-the-inventory-file-for-amazon-ec2-hosts/29878)

<div class="topic-metadata">

**Author:** [@gigit1000](https://forum.ansible.com/u/gigit1000)\
**Replies:** 1\
**Last updated:** [March 13, 2019, 11:07pm UTC](https://forum.ansible.com/t/how-to-format-the-inventory-file-for-amazon-ec2-hosts/29878 "2019-03-13T23:07:04Z")

</div>

Hello, I am unable to run the example ad hoc command: ansible -m ping hosts --private-key=~/home/ec2-user/ -u ec2-user the error is: \[WARNING\]: Could not match supplied host pattern, ignoring: hosts The hostname is:…

---

## [var/fact validation](https://forum.ansible.com/t/var-fact-validation/29876)

<div class="topic-metadata">

**Author:** [@Justin\_DynamicD](https://forum.ansible.com/u/Justin_DynamicD)\
**Replies:** 0\
**Last updated:** [March 13, 2019, 8:47pm UTC](https://forum.ansible.com/t/var-fact-validation/29876 "2019-03-13T20:47:00Z")

</div>

I’ve gotten in a habit of creating a simple dictionary of expected variables when making a role so that it fails early. Something like this: \` name: “Validate Variables” vars: required\_vars: name: foo msg: “var foo…

---

## [How to install Ansible to run under Python3 on Amazon Linux?](https://forum.ansible.com/t/how-to-install-ansible-to-run-under-python3-on-amazon-linux/29870)

<div class="topic-metadata">

**Author:** [@gigit1000](https://forum.ansible.com/u/gigit1000)\
**Replies:** 4\
**Last updated:** [March 13, 2019, 8:43pm UTC](https://forum.ansible.com/t/how-to-install-ansible-to-run-under-python3-on-amazon-linux/29870 "2019-03-13T20:43:11Z")

</div>

There are directions here: https://docs.ansible.com/ansible/latest/reference\_appendices/python\_3\_support.html Which say: The easiest way to run /usr/bin/ansible under Python 3 is to install it with the Python3 version …

---

## [Ansible 2.7.8, role dependencies(github repo) in meta/main.yml are not downloaded automatically, why? still have to run ansible-galaxy install -r requirements.yml?](https://forum.ansible.com/t/ansible-2-7-8-role-dependencies-github-repo-in-meta-main-yml-are-not-downloaded-automatically-why-still-have-to-run-ansible-galaxy-install-r-requirements-yml/29872)

<div class="topic-metadata">

**Author:** [@rella.guo](https://forum.ansible.com/u/rella.guo)\
**Replies:** 1\
**Last updated:** [March 13, 2019, 7:03pm UTC](https://forum.ansible.com/t/ansible-2-7-8-role-dependencies-github-repo-in-meta-main-yml-are-not-downloaded-automatically-why-still-have-to-run-ansible-galaxy-install-r-requirements-yml/29872 "2019-03-13T19:03:50Z")

</div>

Ansible verison: 2.7.8 I define role B as Role A dependencies in meta/main.yml like this: dependencies: - { role: B, src: 'git+https://github.xxx/xxx/B.git', version: '1.0' } When I run playbook with Role A, I suppos…

---

## [newbie question and help resolving warnings](https://forum.ansible.com/t/newbie-question-and-help-resolving-warnings/29874)

<div class="topic-metadata">

**Author:** [@Gaetano\_Giacalone](https://forum.ansible.com/u/Gaetano_Giacalone)\
**Replies:** 0\
**Last updated:** [March 13, 2019, 6:14pm UTC](https://forum.ansible.com/t/newbie-question-and-help-resolving-warnings/29874 "2019-03-13T18:14:49Z")

</div>

have posted one of my first roles on galaxy, and I am getting warnings. ./galaxy/downloads/tmpQjSwNY/tasks/main.yml:40: \[E503\] Tasks that run when changed should likely be handlers If someone would be so kind as to giv…

---

## [I want to make a specific loop but don't know the way how to do it](https://forum.ansible.com/t/i-want-to-make-a-specific-loop-but-dont-know-the-way-how-to-do-it/28162)

<div class="topic-metadata">

**Author:** [@Julien](https://forum.ansible.com/u/Julien)\
**Replies:** 5\
**Last updated:** [March 13, 2019, 2:07pm UTC](https://forum.ansible.com/t/i-want-to-make-a-specific-loop-but-dont-know-the-way-how-to-do-it/28162 "2019-03-13T14:07:01Z")

</div>

Hi, Today i’m writting a play and i want to do a specific loop but i dont know to do it, here is the explanation: I’ve created a survey on Tower that is defining the {{ tma\_name }} var, this var should have one, or mul…

---

## [Strange error: Do you have azure\>=2.0.0 installed? Try \`pip install ansible\[azure\]\`- No module named containerservice](https://forum.ansible.com/t/strange-error-do-you-have-azure-2-0-0-installed-try-pip-install-ansible-azure-no-module-named-containerservice/29860)

<div class="topic-metadata">

**Author:** [@tselios.petros](https://forum.ansible.com/u/tselios.petros)\
**Replies:** 2\
**Last updated:** [March 13, 2019, 1:27pm UTC](https://forum.ansible.com/t/strange-error-do-you-have-azure-2-0-0-installed-try-pip-install-ansible-azure-no-module-named-containerservice/29860 "2019-03-13T13:27:20Z")

</div>

Hello, I am puzzled from the under subject error message. I have a very simple playbook that creates an Azure Resource Group. However, when I execute it it generates this error message. Of course, I have the latest pa…

---

## [Encrypted passwords not working, clear text does](https://forum.ansible.com/t/encrypted-passwords-not-working-clear-text-does/29869)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 2\
**Last updated:** [March 12, 2019, 9:12pm UTC](https://forum.ansible.com/t/encrypted-passwords-not-working-clear-text-does/29869 "2019-03-12T21:12:11Z")

</div>

For my credssp (windows) to work, I need ansible\_user and ansible\_password set. I can set these in plain text in a variable, and everything works fine; however, when experimenting with vars\_prompt I attempt the same thin…

---

## [Tower "loopback" jobs](https://forum.ansible.com/t/tower-loopback-jobs/29833)

<div class="topic-metadata">

**Author:** [@dmakovey](https://forum.ansible.com/u/dmakovey)\
**Replies:** 6\
**Last updated:** [March 12, 2019, 7:59pm UTC](https://forum.ansible.com/t/tower-loopback-jobs/29833 "2019-03-12T19:59:58Z")

</div>

I'm trying to write a playbook that would invoke other playbooks (to use for bulk playbook launches): roles/tower\_job

---

## [Scaling PostgreSQL to higher instance counts](https://forum.ansible.com/t/scaling-postgresql-to-higher-instance-counts/29868)

<div class="topic-metadata">

**Author:** [@Steven\_Bateman](https://forum.ansible.com/u/Steven_Bateman)\
**Replies:** 0\
**Last updated:** [March 12, 2019, 7:14pm UTC](https://forum.ansible.com/t/scaling-postgresql-to-higher-instance-counts/29868 "2019-03-12T19:14:04Z")

</div>

I’m running into challenges getting AWX scaled up in Kubernetes to higher instance counts, specifically that it is overwhelming our PostgreSQL 9.6 external database with connections. Our target instance count is 16, and …

---

## [retrieving facter\_ec2\_metadata from hostvars - can't get element in macs](https://forum.ansible.com/t/retrieving-facter-ec2-metadata-from-hostvars-cant-get-element-in-macs/29828)

<div class="topic-metadata">

**Author:** [@Chris\_Jefferies](https://forum.ansible.com/u/Chris_Jefferies)\
**Replies:** 5\
**Last updated:** [March 12, 2019, 7:03pm UTC](https://forum.ansible.com/t/retrieving-facter-ec2-metadata-from-hostvars-cant-get-element-in-macs/29828 "2019-03-12T19:03:10Z")

</div>

I can drill down into hostvars like this: \` debug: msg: “looking at interface macs: {{ hostvars\[inventory\_hostname\].facter\_ec2\_metadata.network.interfaces.macs }}” \` And I get something like this: \` ok: \[db01.dev…

---

## [AWX - Check mode reporting](https://forum.ansible.com/t/awx-check-mode-reporting/29866)

<div class="topic-metadata">

**Author:** [@smalenfant](https://forum.ansible.com/u/smalenfant)\
**Replies:** 0\
**Last updated:** [March 12, 2019, 2:33pm UTC](https://forum.ansible.com/t/awx-check-mode-reporting/29866 "2019-03-12T14:33:27Z")

</div>

Hi, We starting evaluating AWX a while back and finally upgraded to 3.0.1 last night. So far so good. Currently the Dashboard only display Green/Red depending if the playbook succeeds or fails… We would love to see “or…

---

## [Inlinefile module keep adding a line when it does exists](https://forum.ansible.com/t/inlinefile-module-keep-adding-a-line-when-it-does-exists/29838)

<div class="topic-metadata">

**Author:** [@Jean\_Carlo](https://forum.ansible.com/u/Jean_Carlo)\
**Replies:** 2\
**Last updated:** [March 12, 2019, 1:03pm UTC](https://forum.ansible.com/t/inlinefile-module-keep-adding-a-line-when-it-does-exists/29838 "2019-03-12T13:03:00Z")

</div>

Hello I want to change the configuration of vim, in order to do set mouse=r. At the beginning this line is commented by default. Using inlinefile module, I check by regexp the line commented and I replace it with the n…

---

## [Export gathering facts to .csv file](https://forum.ansible.com/t/export-gathering-facts-to-csv-file/29832)

<div class="topic-metadata">

**Author:** [@michal.misiak](https://forum.ansible.com/u/michal.misiak)\
**Replies:** 3\
**Last updated:** [March 12, 2019, 10:32am UTC](https://forum.ansible.com/t/export-gathering-facts-to-csv-file/29832 "2019-03-12T10:32:34Z")

</div>

Hello, I’m new user in Ansible technology and I have a problem with export gathering facts about host to .csv file. I would like to generate report in .csv file from ansible-playbook results. Ansible playbook reads fac…

---

## [Apt Update exclude Packages (Blacklist)](https://forum.ansible.com/t/apt-update-exclude-packages-blacklist/29861)

<div class="topic-metadata">

**Author:** [@Face\_Gaming](https://forum.ansible.com/u/Face_Gaming)\
**Replies:** 4\
**Last updated:** [March 12, 2019, 8:50am UTC](https://forum.ansible.com/t/apt-update-exclude-packages-blacklist/29861 "2019-03-12T08:50:51Z")

</div>

Hey Guys I would like to know, if its possible to exclude packages from an apt update or a blacklist for packages, which shouldn’t be updated. Thanks for your help! Greetings

---

## [Can ios\_config handle responding to two prompts in a row?](https://forum.ansible.com/t/can-ios-config-handle-responding-to-two-prompts-in-a-row/29859)

<div class="topic-metadata">

**Author:** [@ibdg](https://forum.ansible.com/u/ibdg)\
**Replies:** 3\
**Last updated:** [March 11, 2019, 10:52pm UTC](https://forum.ansible.com/t/can-ios-config-handle-responding-to-two-prompts-in-a-row/29859 "2019-03-11T22:52:13Z")

</div>

Cross posted from stackoverflow I’m setting up a root CA on a Cisco IOS router and trying to use the ios\_command module to run the command crypto pki server my-ca start. On running it, the following happens: GW1(confi…

---

## [Testing inventory plugins](https://forum.ansible.com/t/testing-inventory-plugins/29580)

<div class="topic-metadata">

**Author:** [@Josh\_R](https://forum.ansible.com/u/Josh_R)\
**Replies:** 4\
**Last updated:** [March 11, 2019, 10:48pm UTC](https://forum.ansible.com/t/testing-inventory-plugins/29580 "2019-03-11T22:48:48Z")

</div>

I’m writing an inventory plugin that gets a list of online machines from an active directory OU structure and dynamically creates groups and host details from it. However, as I write it - I’d like to be able to test the…

---

## [display\_args\_to\_stdout=true - Is it possible to suppress internal args?](https://forum.ansible.com/t/display-args-to-stdout-true-is-it-possible-to-suppress-internal-args/29744)

<div class="topic-metadata">

**Author:** [@Henning\_Juva](https://forum.ansible.com/u/Henning_Juva)\
**Replies:** 1\
**Last updated:** [March 11, 2019, 10:46pm UTC](https://forum.ansible.com/t/display-args-to-stdout-true-is-it-possible-to-suppress-internal-args/29744 "2019-03-11T22:46:57Z")

</div>

I recently upgraded to 2.7.7 from 2.4 and using display\_args\_to\_stdout=true. After upgrade many modules (like stat,command,shell etc) have started including ansible internal args into what is logged for the task on the c…

---

## [with\_items question](https://forum.ansible.com/t/with-items-question/29856)

<div class="topic-metadata">

**Author:** [@liverpudlian88](https://forum.ansible.com/u/liverpudlian88)\
**Replies:** 4\
**Last updated:** [March 11, 2019, 10:12pm UTC](https://forum.ansible.com/t/with-items-question/29856 "2019-03-11T22:12:25Z")

</div>

Hello, I am kinda new to Ansible, I would appreciate if you could assist me with a question, I am trying to do the following in a role in a playbook 1- Copy 3 zip files to a specific destination 2- Unzip only the firs…

---

## [conditionals](https://forum.ansible.com/t/conditionals/29862)

<div class="topic-metadata">

**Author:** [@Jeffrey\_Agnitsch](https://forum.ansible.com/u/Jeffrey_Agnitsch)\
**Replies:** 1\
**Last updated:** [March 11, 2019, 8:06pm UTC](https://forum.ansible.com/t/conditionals/29862 "2019-03-11T20:06:27Z")

</div>

Trying to do a conditional that when my inventory host name once converted to a string is greater than a number Inventory file server1 server2 server3 - … … … … … server205 this is the important parts of the r…

---

## [How can i run a block of playbook instructions only if they pass the specified condition?](https://forum.ansible.com/t/how-can-i-run-a-block-of-playbook-instructions-only-if-they-pass-the-specified-condition/29761)

<div class="topic-metadata">

**Author:** [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Replies:** 4\
**Last updated:** [March 11, 2019, 4:38pm UTC](https://forum.ansible.com/t/how-can-i-run-a-block-of-playbook-instructions-only-if-they-pass-the-specified-condition/29761 "2019-03-11T16:38:08Z")

</div>

I have got a playbook where i need to check if the host fact for reboot is set to true, i need to execute the rest of the instructions for that particular host in the inventory only if the reboot condition is true. Foll…

---

## [Access to variables defined in roles from python script](https://forum.ansible.com/t/access-to-variables-defined-in-roles-from-python-script/29837)

<div class="topic-metadata">

**Author:** [@wnelis294](https://forum.ansible.com/u/wnelis294)\
**Replies:** 2\
**Last updated:** [March 11, 2019, 11:43am UTC](https://forum.ansible.com/t/access-to-variables-defined-in-roles-from-python-script/29837 "2019-03-11T11:43:41Z")

</div>

I am an ansible newbie. My first non-trivial ansible project is to update / optimize the configuration of Juniper switches. The ansible modules are not run on the Juniper switch but locally on the ansible controller. The…

---

## [Process to set proxy in tower-CLI](https://forum.ansible.com/t/process-to-set-proxy-in-tower-cli/29845)

<div class="topic-metadata">

**Author:** [@RC1](https://forum.ansible.com/u/RC1)\
**Replies:** 1\
**Last updated:** [March 11, 2019, 7:06am UTC](https://forum.ansible.com/t/process-to-set-proxy-in-tower-cli/29845 "2019-03-11T07:06:24Z")

</div>

Can help fo the below issue would be appreciated. Process to set proxy in tower-CLI Thanks

---

## [aws inventory: \`hostname\_variable = tag\_Name\` not working](https://forum.ansible.com/t/aws-inventory-hostname-variable-tag-name-not-working/29858)

<div class="topic-metadata">

**Author:** [@senorsmile](https://forum.ansible.com/u/senorsmile)\
**Replies:** 1\
**Last updated:** [March 10, 2019, 11:55pm UTC](https://forum.ansible.com/t/aws-inventory-hostname-variable-tag-name-not-working/29858 "2019-03-10T23:55:49Z")

</div>

I haven’t used Ansible with AWS for a while. I am using it on a new project. I see a newer option that didn’t used to be there: hostname\_variable = tag\_Name My understanding of this variable is that it will use the Na…

[Previous page](https://forum.ansible.com/c/archives/31.md?page=304)

[Next page](https://forum.ansible.com/c/archives/31.md?page=306)
