# Archives

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

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

**Page:** 288

---

## [Set variable to some value if undefined](https://forum.ansible.com/t/set-variable-to-some-value-if-undefined/30316)

<div class="topic-metadata">

**Author:** [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Replies:** 3\
**Last updated:** [May 24, 2019, 5:21pm UTC](https://forum.ansible.com/t/set-variable-to-some-value-if-undefined/30316 "2019-05-24T17:21:44Z")

</div>

Hi I have a playbook whereby I pass variables in such as install\_office == ‘y’, and I have tasks where it would only include\_tasks for a task file to install Office (for example) when install\_office == ‘y’ eg. tasks: …

---

## [New Ansible releases 2.7.11 and 2.6.17](https://forum.ansible.com/t/new-ansible-releases-2-7-11-and-2-6-17/30410)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 7:48pm UTC](https://forum.ansible.com/t/new-ansible-releases-2-7-11-and-2-6-17/30410 "2019-05-23T19:48:38Z")

</div>

Hi all- we're happy to announce that the general release of Ansible 2.7.11 and 2.6.17 are now available! How do you get it?

---

## [Import remote common playbook while running Ansible](https://forum.ansible.com/t/import-remote-common-playbook-while-running-ansible/30408)

<div class="topic-metadata">

**Author:** [@X\_W](https://forum.ansible.com/u/X_W)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 7:15pm UTC](https://forum.ansible.com/t/import-remote-common-playbook-while-running-ansible/30408 "2019-05-23T19:15:10Z")

</div>

Hi all, Does anyone know if there is a way to check out a common playbook and import that as if that is local playbooks and run it ? I have a playbook that installs and configures a component that has the concept of ma…

---

## [AWX not using specified virtual environment](https://forum.ansible.com/t/awx-not-using-specified-virtual-environment/30407)

<div class="topic-metadata">

**Author:** [@Kim\_Spasaro](https://forum.ansible.com/u/Kim_Spasaro)\
**Replies:** 2\
**Last updated:** [May 23, 2019, 5:39pm UTC](https://forum.ansible.com/t/awx-not-using-specified-virtual-environment/30407 "2019-05-23T17:39:48Z")

</div>

Context AWX version 1.0.7 I’m creating an inventory using a source script in a project I have a custom venv with the required packages for the source script Project is set to use this venv Organization is …

---

## [gcp\_compute\_instance\_template metadata](https://forum.ansible.com/t/gcp-compute-instance-template-metadata/30390)

<div class="topic-metadata">

**Author:** [@Joel\_Sherriff](https://forum.ansible.com/u/Joel_Sherriff)\
**Replies:** 2\
**Last updated:** [May 23, 2019, 5:11pm UTC](https://forum.ansible.com/t/gcp-compute-instance-template-metadata/30390 "2019-05-23T17:11:42Z")

</div>

Can’t figure out how to supply the properties.metadata key/value data for the gcp\_compute\_instance\_template playbook module using 2.8. Everything seems to be ignored. Anyone have any ideas? Thanks.

---

## [Is it possible to run Ansible against a jailed environment without python?](https://forum.ansible.com/t/is-it-possible-to-run-ansible-against-a-jailed-environment-without-python/30349)

<div class="topic-metadata">

**Author:** [@Ryan\_Bak](https://forum.ansible.com/u/Ryan_Bak)\
**Replies:** 3\
**Last updated:** [May 23, 2019, 5:01pm UTC](https://forum.ansible.com/t/is-it-possible-to-run-ansible-against-a-jailed-environment-without-python/30349 "2019-05-23T17:01:31Z")

</div>

I have a mounted image that I’m running Ansible against. Currently I’m using an sshd jail, restricting ssh to the root of the image so that Ansible can run as if the the image is a host, but I would like to remove the re…

---

## [AWX - Inventories - Can't save](https://forum.ansible.com/t/awx-inventories-cant-save/30405)

<div class="topic-metadata">

**Author:** [@Simon\_Pole](https://forum.ansible.com/u/Simon_Pole)\
**Replies:** 5\
**Last updated:** [May 23, 2019, 2:06pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405 "2019-05-23T14:06:33Z")

</div>

Hi, I’m running AWX 4 and everything seems fine but when I go to inventories and add anything in the variables box I present me with a “Failed to add new inventory. Post returned status: 400”

---

## [need to perform action on localhost in multiple host action of playbooks](https://forum.ansible.com/t/need-to-perform-action-on-localhost-in-multiple-host-action-of-playbooks/30396)

<div class="topic-metadata">

**Author:** [@Kunalsing\_Thakur](https://forum.ansible.com/u/Kunalsing_Thakur)\
**Replies:** 2\
**Last updated:** [May 23, 2019, 10:12am UTC](https://forum.ansible.com/t/need-to-perform-action-on-localhost-in-multiple-host-action-of-playbooks/30396 "2019-05-23T10:12:44Z")

</div>

Hello Ansible Team, I need to run playbook on host when puppet run done on node and then it will immediately restore the snapshot. and again it will run puppet. can we pass the control to task when second task is comple…

---

## [win\_blockinfile module](https://forum.ansible.com/t/win-blockinfile-module/23127)

<div class="topic-metadata">

**Author:** [@Alexander\_Luders](https://forum.ansible.com/u/Alexander_Luders)\
**Replies:** 4\
**Last updated:** [May 22, 2019, 5:40pm UTC](https://forum.ansible.com/t/win-blockinfile-module/23127 "2019-05-22T17:40:18Z")

</div>

Hi all, do you know of an existing Windows port of the blockinfile module? Or is anybody already working on it? If not, I’d like to go ahead and create a win\_blockinfile module. Greets, Alex

---

## [Is there a way to get the OS from AWS?](https://forum.ansible.com/t/is-there-a-way-to-get-the-os-from-aws/30398)

<div class="topic-metadata">

**Author:** [@Adam](https://forum.ansible.com/u/Adam)\
**Replies:** 4\
**Last updated:** [May 22, 2019, 2:26pm UTC](https://forum.ansible.com/t/is-there-a-way-to-get-the-os-from-aws/30398 "2019-05-22T14:26:32Z")

</div>

Hi all - I’m trying to gather facts from an ec2 instance. Specially, the operating system release (i.e. /etc/redhat-release). I can gather the info from local VMs, but Ansible doesn’t seem to return the OS when I gather…

---

## [Official Dockerfile for Ansible](https://forum.ansible.com/t/official-dockerfile-for-ansible/30392)

<div class="topic-metadata">

**Author:** [@Dongxian\_Yao](https://forum.ansible.com/u/Dongxian_Yao)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 2:23pm UTC](https://forum.ansible.com/t/official-dockerfile-for-ansible/30392 "2019-05-22T14:23:39Z")

</div>

I can’t believe Ansible don’t maintain any official Dockerfile, most of the Dockerfile on Docker Hub are very old. May I ask what Dockerfile(s) you use for your project if you are testing playbooks in Ansible with CI/CD …

---

## [Call ansible playbook/tasks from python script.](https://forum.ansible.com/t/call-ansible-playbook-tasks-from-python-script/30391)

<div class="topic-metadata">

**Author:** [@Yz\_Xyz](https://forum.ansible.com/u/Yz_Xyz)\
**Replies:** 3\
**Last updated:** [May 22, 2019, 1:36pm UTC](https://forum.ansible.com/t/call-ansible-playbook-tasks-from-python-script/30391 "2019-05-22T13:36:30Z")

</div>

I have python script and have to call ansible playbook and tasks in various phases of script execution. What is preferred way to call ansible playbook or task? I see python API was suggested to use for internal purpose …

---

## [Play book for changing few words in /etc/ssh/sshd.config](https://forum.ansible.com/t/play-book-for-changing-few-words-in-etc-ssh-sshd-config/30394)

<div class="topic-metadata">

**Author:** [@Vinu\_Vajravel](https://forum.ansible.com/u/Vinu_Vajravel)\
**Replies:** 5\
**Last updated:** [May 22, 2019, 11:08am UTC](https://forum.ansible.com/t/play-book-for-changing-few-words-in-etc-ssh-sshd-config/30394 "2019-05-22T11:08:17Z")

</div>

i want to change few words and restart ssh service , is there any playbook available ? appreciate your help. Thanks Vinu .

---

## [ImportError: cannot import name context](https://forum.ansible.com/t/importerror-cannot-import-name-context/30384)

<div class="topic-metadata">

**Author:** [@Nabil\_Boutayeb](https://forum.ansible.com/u/Nabil_Boutayeb)\
**Replies:** 4\
**Last updated:** [May 22, 2019, 8:46am UTC](https://forum.ansible.com/t/importerror-cannot-import-name-context/30384 "2019-05-22T08:46:58Z")

</div>

hello everyone:weeks ago ansible were working fine, but today, trying to execute ansible i got this message: Traceback (most recent call last): File “/usr/bin/ansible”, line 137, in from ansible import context Impor…

---

## [Looking for playbook to get uptime, disk , cpu , RAM , system load, from multiple Linux servers  in html format or csv format](https://forum.ansible.com/t/looking-for-playbook-to-get-uptime-disk-cpu-ram-system-load-from-multiple-linux-servers-in-html-format-or-csv-format/30385)

<div class="topic-metadata">

**Author:** [@Deepan\_M](https://forum.ansible.com/u/Deepan_M)\
**Replies:** 2\
**Last updated:** [May 22, 2019, 7:00am UTC](https://forum.ansible.com/t/looking-for-playbook-to-get-uptime-disk-cpu-ram-system-load-from-multiple-linux-servers-in-html-format-or-csv-format/30385 "2019-05-22T07:00:57Z")

</div>

Hello, Can someone please suggest me a playbook to get uptime, disk , cpu , RAM , system load, from multiple Linux servers – in HTML format or in CSV format. Thanks, Deepan M

---

## [How can i retrieve playbook name, play name and task name in a playbook?](https://forum.ansible.com/t/how-can-i-retrieve-playbook-name-play-name-and-task-name-in-a-playbook/30373)

<div class="topic-metadata">

**Author:** [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Replies:** 2\
**Last updated:** [May 21, 2019, 6:12pm UTC](https://forum.ansible.com/t/how-can-i-retrieve-playbook-name-play-name-and-task-name-in-a-playbook/30373 "2019-05-21T18:12:41Z")

</div>

Is there a way i can retrieve the currently used playbook name, currently running play and task name using playbook rules? I need these 3 info to send them as a parameter for an external python script which would print a…

---

## [Run job only on new or failed hosts](https://forum.ansible.com/t/run-job-only-on-new-or-failed-hosts/30388)

<div class="topic-metadata">

**Author:** [@Igor\_Turovsky](https://forum.ansible.com/u/Igor_Turovsky)\
**Replies:** 0\
**Last updated:** [May 21, 2019, 5:41pm UTC](https://forum.ansible.com/t/run-job-only-on-new-or-failed-hosts/30388 "2019-05-21T17:41:06Z")

</div>

Hello, I am looking for a way to implement the following scenario: I have generic playbook I want to run against all servers in inventory Inventory is dynamic one and it is populated once per day per scheduled AWX job…

---

## [awx API for template management](https://forum.ansible.com/t/awx-api-for-template-management/30387)

<div class="topic-metadata">

**Author:** [@renato.marcandier](https://forum.ansible.com/u/renato.marcandier)\
**Replies:** 0\
**Last updated:** [May 21, 2019, 4:40pm UTC](https://forum.ansible.com/t/awx-api-for-template-management/30387 "2019-05-21T16:40:23Z")

</div>

Hello all, Is there any documentation/demo for awx api regarding template management. I would like to check if this can be leveraged for version control/management. Regards RG

---

## [Looping over a dictionary within a dictionary](https://forum.ansible.com/t/looping-over-a-dictionary-within-a-dictionary/30386)

<div class="topic-metadata">

**Author:** [@ShadyTrainDriver](https://forum.ansible.com/u/ShadyTrainDriver)\
**Replies:** 0\
**Last updated:** [May 21, 2019, 4:16pm UTC](https://forum.ansible.com/t/looping-over-a-dictionary-within-a-dictionary/30386 "2019-05-21T16:16:43Z")

</div>

Hello, I have writte the following to check that each partition on a device of a certain type has a uuid (N.B. extended partitions used in logical partitioning scheme do not): set\_fact: partitions: “{{ partitions|de…

---

## [Question: ERROR! 'become\_user' is not a valid attribute for a TaskInclude](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383)

<div class="topic-metadata">

**Author:** [@Gaurav\_Arora](https://forum.ansible.com/u/Gaurav_Arora)\
**Replies:** 2\
**Last updated:** [May 21, 2019, 3:05pm UTC](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383 "2019-05-21T15:05:04Z")

</div>

Hi We are upgrading from Ansible 2.7 to Ansible 2.8. We have following lines which are working perfectly fine with Ansible 2.7 # tasks file for \*\*\*\* - name: Call \*\*\*\* installation tasks for {{ ansible\_distribution|upp…

---

## [Store ssh passphrase for another session.](https://forum.ansible.com/t/store-ssh-passphrase-for-another-session/30382)

<div class="topic-metadata">

**Author:** [@Veera](https://forum.ansible.com/u/Veera)\
**Replies:** 1\
**Last updated:** [May 21, 2019, 2:39pm UTC](https://forum.ansible.com/t/store-ssh-passphrase-for-another-session/30382 "2019-05-21T14:39:36Z")

</div>

I have a set of ansible client servers accessible from ansible engine using ssh-key and passphrase. When I run a ansible ad-hoc command , I have to enter passphase on each servers connections and this is repeating for a…

---

## [Is there a standard GoLang library for calling Ansible commands/playbook from GoLang code?](https://forum.ansible.com/t/is-there-a-standard-golang-library-for-calling-ansible-commands-playbook-from-golang-code/30381)

<div class="topic-metadata">

**Author:** [@apapap](https://forum.ansible.com/u/apapap)\
**Replies:** 0\
**Last updated:** [May 21, 2019, 12:51pm UTC](https://forum.ansible.com/t/is-there-a-standard-golang-library-for-calling-ansible-commands-playbook-from-golang-code/30381 "2019-05-21T12:51:38Z")

</div>

Hi, I want to know if there is any standard library for calling Ansible commands or Ansible playbook from within the GoLang code ? Please help

---

## [Multiple machine credentials when launching job](https://forum.ansible.com/t/multiple-machine-credentials-when-launching-job/30380)

<div class="topic-metadata">

**Author:** [@Juan\_A\_S](https://forum.ansible.com/u/Juan_A_S)\
**Replies:** 1\
**Last updated:** [May 21, 2019, 12:45pm UTC](https://forum.ansible.com/t/multiple-machine-credentials-when-launching-job/30380 "2019-05-21T12:45:06Z")

</div>

Is it possible to set multiple machine credentials (in the field “extra\_credentials”) when launching a job (using the API), for setting remote host and jump host keys?

---

## [Change password of remote hosts](https://forum.ansible.com/t/change-password-of-remote-hosts/30372)

<div class="topic-metadata">

**Author:** [@Kevin\_Kwon](https://forum.ansible.com/u/Kevin_Kwon)\
**Replies:** 3\
**Last updated:** [May 21, 2019, 9:36am UTC](https://forum.ansible.com/t/change-password-of-remote-hosts/30372 "2019-05-21T09:36:19Z")

</div>

Hi… Would you please let me know how can i change the account password? How can i change the password of “root” account ? How can i change the password of “user” account ? Thank you! Kevin

---

## [AWX Cluster](https://forum.ansible.com/t/awx-cluster/30364)

<div class="topic-metadata">

**Author:** [@renato.marcandier](https://forum.ansible.com/u/renato.marcandier)\
**Replies:** 4\
**Last updated:** [May 21, 2019, 6:31am UTC](https://forum.ansible.com/t/awx-cluster/30364 "2019-05-21T06:31:51Z")

</div>

Hello guys, Is there any project to create a cluster of AWX ? Regards RG

---

## [How to update AWS VPC attributes in Ansible playbook 2.8](https://forum.ansible.com/t/how-to-update-aws-vpc-attributes-in-ansible-playbook-2-8/30378)

<div class="topic-metadata">

**Author:** [@Dipak\_Jadhav](https://forum.ansible.com/u/Dipak_Jadhav)\
**Replies:** 0\
**Last updated:** [May 21, 2019, 5:07am UTC](https://forum.ansible.com/t/how-to-update-aws-vpc-attributes-in-ansible-playbook-2-8/30378 "2019-05-21T05:07:28Z")

</div>

Hello, I want to update my vpc attributes using anisble playbook. I used below code but it is not updating. I tries to create new vpc. name: Task to update vpc details ec2\_vpc\_net: dns\_support: yes dns\_hostnames: …

---

## [junos\_scp not working](https://forum.ansible.com/t/junos-scp-not-working/30363)

<div class="topic-metadata">

**Author:** [@ganeshrn](https://forum.ansible.com/u/ganeshrn)\
**Replies:** 2\
**Last updated:** [May 21, 2019, 1:59am UTC](https://forum.ansible.com/t/junos-scp-not-working/30363 "2019-05-21T01:59:42Z")

</div>

Based on the logs it seems you have not set the value of provider argument in the task. junos\_scp module requires the provider key to be set. More details refer the module documentation https://docs.ansible.com/ansible…

---

## [Ansible over SSH on Windows host type progress status needed](https://forum.ansible.com/t/ansible-over-ssh-on-windows-host-type-progress-status-needed/30074)

<div class="topic-metadata">

**Author:** [@Stefano\_Leandro](https://forum.ansible.com/u/Stefano_Leandro)\
**Replies:** 4\
**Last updated:** [May 21, 2019, 1:14am UTC](https://forum.ansible.com/t/ansible-over-ssh-on-windows-host-type-progress-status-needed/30074 "2019-05-21T01:14:22Z")

</div>

Hi Folks, I’m quite new with Ansible. I’m projecting a new one automation platform with that in a mixed large enterprise enviroment. Sadly i found that Ansible not still supporting Windows OS over SSH. so, I’m asking…

---

## [how to bypass a Cisco menu](https://forum.ansible.com/t/how-to-bypass-a-cisco-menu/30377)

<div class="topic-metadata">

**Author:** [@Pete\_Siemsen](https://forum.ansible.com/u/Pete_Siemsen)\
**Replies:** 0\
**Last updated:** [May 20, 2019, 6:09pm UTC](https://forum.ansible.com/t/how-to-bypass-a-cisco-menu/30377 "2019-05-20T18:09:32Z")

</div>

I have Ansible playbooks that use the “ios\_config” module to backup the config of my Cisco devices. Works fine on all my Ciscos except the terminal servers. This makes total sense: when I ssh to one of our terminal serv…

---

## [Error while connecting to MS SQL database using windows authentication](https://forum.ansible.com/t/error-while-connecting-to-ms-sql-database-using-windows-authentication/30376)

<div class="topic-metadata">

**Author:** [@benkteshkumar87](https://forum.ansible.com/u/benkteshkumar87)\
**Replies:** 0\
**Last updated:** [May 20, 2019, 4:28pm UTC](https://forum.ansible.com/t/error-while-connecting-to-ms-sql-database-using-windows-authentication/30376 "2019-05-20T16:28:45Z")

</div>

Hi, I am building a Jenkins pipeline to deploy SQL artifact to Microsoft SQL server(2012) using Liquibase. However it’s giving error while connecting to the database. I am using windows authentication credential to conn…

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

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