# Ansible Project

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

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

**Page:** 169

---

## [user input problem](https://forum.ansible.com/t/user-input-problem/31182)

<div class="topic-metadata">

**Author:** [@Nicholas\_Britton](https://forum.ansible.com/u/Nicholas_Britton)\
**Replies:** 0\
**Last updated:** [August 30, 2019, 8:18pm UTC](https://forum.ansible.com/t/user-input-problem/31182 "2019-08-30T20:18:44Z")

</div>

Right now the user input will come when the user runs the main playbook. The playbook is a series of include\_tasks’s. While the inventory file contains vars but i would like the user input to help select what vars to use…

---

## [copy files between servers using a master host](https://forum.ansible.com/t/copy-files-between-servers-using-a-master-host/31181)

<div class="topic-metadata">

**Author:** [@jer8jer](https://forum.ansible.com/u/jer8jer)\
**Replies:** 0\
**Last updated:** [August 30, 2019, 7:44pm UTC](https://forum.ansible.com/t/copy-files-between-servers-using-a-master-host/31181 "2019-08-30T19:44:22Z")

</div>

My issue is pushing groups of hosts through this playbook: host1 needs to push files to host8 host4 needs to push files to host12 host7 needs to push files to host3 host9 needs to push files to host5 etc… so what s…

---

## [Cannot show output when using raw command in ansible](https://forum.ansible.com/t/cannot-show-output-when-using-raw-command-in-ansible/31173)

<div class="topic-metadata">

**Author:** [@Mac\_Kam](https://forum.ansible.com/u/Mac_Kam)\
**Replies:** 2\
**Last updated:** [August 30, 2019, 7:40am UTC](https://forum.ansible.com/t/cannot-show-output-when-using-raw-command-in-ansible/31173 "2019-08-30T07:40:02Z")

</div>

HI friends, When I use raw command in out remote router, then cannot show the output. my ansible version:2.7.5 yaml: hosts: SSR gather\_facts: no remote\_user: user tasks: name: run raw: “show port” register: r…

---

## [Is it possible to read different database Columns entries returned by SQL query in respective variables in Ansible ?](https://forum.ansible.com/t/is-it-possible-to-read-different-database-columns-entries-returned-by-sql-query-in-respective-variables-in-ansible/31172)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 6:18am UTC](https://forum.ansible.com/t/is-it-possible-to-read-different-database-columns-entries-returned-by-sql-query-in-respective-variables-in-ansible/31172 "2019-08-30T06:18:19Z")

</div>

Below is my playbook with a single SQL query that fetches 3 columns from MYSQL database. I wish to read the values returned if any in three different variables. \` name: “Fetch from Database” tags: validateA command…

---

## [Using information between Ansible playbooks](https://forum.ansible.com/t/using-information-between-ansible-playbooks/31157)

<div class="topic-metadata">

**Author:** [@pk\_s](https://forum.ansible.com/u/pk_s)\
**Replies:** 4\
**Last updated:** [August 29, 2019, 10:06pm UTC](https://forum.ansible.com/t/using-information-between-ansible-playbooks/31157 "2019-08-29T22:06:33Z")

</div>

Hi, How do i store/use information retrieved from running a playbook task later in another playbook task? I tried dumping the information in json format from the first playbook/task to a file. But then how do i read/pa…

---

## [Need to set chrony.conf to server instead of pool!](https://forum.ansible.com/t/need-to-set-chrony-conf-to-server-instead-of-pool/31170)

<div class="topic-metadata">

**Author:** [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Replies:** 0\
**Last updated:** [August 29, 2019, 8:51pm UTC](https://forum.ansible.com/t/need-to-set-chrony-conf-to-server-instead-of-pool/31170 "2019-08-29T20:51:58Z")

</div>

That is out of the scope for this list, this is about Ansible. What you are asking about is how to configure Chrony. You should search up a mailing list, a support forum for Chrony or read the man pages for Chrony.

---

## [copy files from list of hosts to another lists of hosts](https://forum.ansible.com/t/copy-files-from-list-of-hosts-to-another-lists-of-hosts/31169)

<div class="topic-metadata">

**Author:** [@jer8jer](https://forum.ansible.com/u/jer8jer)\
**Replies:** 0\
**Last updated:** [August 29, 2019, 8:01pm UTC](https://forum.ansible.com/t/copy-files-from-list-of-hosts-to-another-lists-of-hosts/31169 "2019-08-29T20:01:47Z")

</div>

hosts are 1:1 host1 → host3 host4 → host5 host9 → host11 say /etc/resolv.conf for example so fetch module first then copy module but not sure how to put these host values in an array

---

## [Importing list file ?](https://forum.ansible.com/t/importing-list-file/31105)

<div class="topic-metadata">

**Author:** [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Replies:** 7\
**Last updated:** [August 29, 2019, 5:55pm UTC](https://forum.ansible.com/t/importing-list-file/31105 "2019-08-29T17:55:37Z")

</div>

Hi I am using the win\_updates module and I want to include a list of approved patches in the whitelist option. I have the list of all my approved patches in a file already, and I would like to know if and how I can impo…

---

## [Need to set chrony.conf to server instead of pool!](https://forum.ansible.com/t/need-to-set-chrony-conf-to-server-instead-of-pool/31168)

<div class="topic-metadata">

**Author:** [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Replies:** 0\
**Last updated:** [August 29, 2019, 4:05pm UTC](https://forum.ansible.com/t/need-to-set-chrony-conf-to-server-instead-of-pool/31168 "2019-08-29T16:05:16Z")

</div>

Replace the whole file with template or file module, then you know that file will be correct. If you don't want to do that you can use lineinfile module to replace line(s).

---

## [list seen as unicode, not sure why or how to correct](https://forum.ansible.com/t/list-seen-as-unicode-not-sure-why-or-how-to-correct/31146)

<div class="topic-metadata">

**Author:** [@Nicholas\_Britton](https://forum.ansible.com/u/Nicholas_Britton)\
**Replies:** 11\
**Last updated:** [August 29, 2019, 3:48pm UTC](https://forum.ansible.com/t/list-seen-as-unicode-not-sure-why-or-how-to-correct/31146 "2019-08-29T15:48:00Z")

</div>

I am building a list with output stored from a uri call: \` name: Get hostgroup info uri: url: “{{baseurl}}views/host-groups?$query=hostGroup.storageDeviceId%20eq%20’{{ui}}'%20and%20hostGroup.hostGroupName%20in%20\[{…

---

## [Need to set chrony.conf to server instead of pool!](https://forum.ansible.com/t/need-to-set-chrony-conf-to-server-instead-of-pool/31167)

<div class="topic-metadata">

**Author:** [@racke](https://forum.ansible.com/u/racke)\
**Replies:** 0\
**Last updated:** [August 29, 2019, 3:16pm UTC](https://forum.ansible.com/t/need-to-set-chrony-conf-to-server-instead-of-pool/31167 "2019-08-29T15:16:17Z")

</div>

Hello All. I'm working with RHEL 8 and the ntp package is no longer supported and it is implemented by the chronyd daemon which is provided in the chrony package. My chrony.conf file: \> # Use public servers from the…

---

## [Aws Workspaces module missed](https://forum.ansible.com/t/aws-workspaces-module-missed/31160)

<div class="topic-metadata">

**Author:** [@Mauro\_Ferrigno](https://forum.ansible.com/u/Mauro_Ferrigno)\
**Replies:** 2\
**Last updated:** [August 29, 2019, 8:52am UTC](https://forum.ansible.com/t/aws-workspaces-module-missed/31160 "2019-08-29T08:52:25Z")

</div>

Hi @all, I need to mantain workspaces on aws but I didn’t find module to manage that, I missed something? So I can wrap aws cli client to manage workspaces on aws but I prefer to use module if possible, can someone g…

---

## [how to solve ansible ssh timeout problem](https://forum.ansible.com/t/how-to-solve-ansible-ssh-timeout-problem/31156)

<div class="topic-metadata">

**Author:** [@Mac\_Kam](https://forum.ansible.com/u/Mac_Kam)\
**Replies:** 3\
**Last updated:** [August 29, 2019, 8:22am UTC](https://forum.ansible.com/t/how-to-solve-ansible-ssh-timeout-problem/31156 "2019-08-29T08:22:17Z")

</div>

I have facing a problem of ssh timeout when using ansible. ssh user@192.168.1.1 just wait maybe 30s then prompt password to entry, but when using ansible, it will prompt unreachable for the host, how can i config in the…

---

## [No action Detected Error for localaction module](https://forum.ansible.com/t/no-action-detected-error-for-localaction-module/31162)

<div class="topic-metadata">

**Author:** [@racke](https://forum.ansible.com/u/racke)\
**Replies:** 0\
**Last updated:** [August 29, 2019, 8:18am UTC](https://forum.ansible.com/t/no-action-detected-error-for-localaction-module/31162 "2019-08-29T08:18:57Z")

</div>

I'm getting the below error for my playbook. ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path. The error appears to be in '/app/test1.yml': line 12, co…

---

## [No action Detected Error for localaction module](https://forum.ansible.com/t/no-action-detected-error-for-localaction-module/31161)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 0\
**Last updated:** [August 29, 2019, 8:17am UTC](https://forum.ansible.com/t/no-action-detected-error-for-localaction-module/31161 "2019-08-29T08:17:06Z")

</div>

The module is called local\_action - you forgot the underscore.

---

## [Restart the java application , first killing the process](https://forum.ansible.com/t/restart-the-java-application-first-killing-the-process/31126)

<div class="topic-metadata">

**Author:** [@Ravi\_Ranjan](https://forum.ansible.com/u/Ravi_Ranjan)\
**Replies:** 1\
**Last updated:** [August 29, 2019, 4:44am UTC](https://forum.ansible.com/t/restart-the-java-application-first-killing-the-process/31126 "2019-08-29T04:44:38Z")

</div>

Hi Team , I am planning to do up gradation some app and for so we need to restart the java application once my other app is upgraded and for so , i have written a playbook. can someone please help to write a play for s…

---

## [Test to see if the Drives exist](https://forum.ansible.com/t/test-to-see-if-the-drives-exist/31042)

<div class="topic-metadata">

**Author:** [@DC1](https://forum.ansible.com/u/DC1)\
**Replies:** 5\
**Last updated:** [August 28, 2019, 7:59pm UTC](https://forum.ansible.com/t/test-to-see-if-the-drives-exist/31042 "2019-08-28T19:59:02Z")

</div>

Hello, I am new to Ansible and looking for some assistance. I want to be able to run the Ansible script for changes and or additions without rebuilding the server. In my Ansible script I am using the below snippet to co…

---

## [Registering value from JSON output](https://forum.ansible.com/t/registering-value-from-json-output/31143)

<div class="topic-metadata">

**Author:** [@Cade\_Lambert](https://forum.ansible.com/u/Cade_Lambert)\
**Replies:** 7\
**Last updated:** [August 28, 2019, 5:16pm UTC](https://forum.ansible.com/t/registering-value-from-json-output/31143 "2019-08-28T17:16:53Z")

</div>

I’m trying to register the value of a JSON object only when another JSON object is equal to a certain value, but I just can’t figure out how I’d do that. For example, this is my JSON output which is registered in the va…

---

## [Delete content of FileSystem with a lot files using find and file module](https://forum.ansible.com/t/delete-content-of-filesystem-with-a-lot-files-using-find-and-file-module/31153)

<div class="topic-metadata">

**Author:** [@Alberto\_Jimenez\_Loza](https://forum.ansible.com/u/Alberto_Jimenez_Loza)\
**Replies:** 1\
**Last updated:** [August 28, 2019, 2:35pm UTC](https://forum.ansible.com/t/delete-content-of-filesystem-with-a-lot-files-using-find-and-file-module/31153 "2019-08-28T14:35:10Z")

</div>

I want to delete all files and directories in a filesystem. I have done a playbook with module find and file. I get a list of files with the module find and then I delete the list with module file and the option absent…

---

## [What pre steps are run by nxos\_command using connection: network\_cli?](https://forum.ansible.com/t/what-pre-steps-are-run-by-nxos-command-using-connection-network-cli/31154)

<div class="topic-metadata">

**Author:** [@Ian\_Barrere](https://forum.ansible.com/u/Ian_Barrere)\
**Replies:** 0\
**Last updated:** [August 28, 2019, 1:59pm UTC](https://forum.ansible.com/t/what-pre-steps-are-run-by-nxos-command-using-connection-network-cli/31154 "2019-08-28T13:59:36Z")

</div>

Hi, does anybody know what the steps are that “nxos\_command” (with connection: network\_cli) takes before running the specified command? I can’t find documentation for that. For some reason, when issuing “show archive lo…

---

## [Ansible vmware\_vm\_facts: get mac address for a specific VM and write it to existing inventory](https://forum.ansible.com/t/ansible-vmware-vm-facts-get-mac-address-for-a-specific-vm-and-write-it-to-existing-inventory/30403)

<div class="topic-metadata">

**Author:** [@Marco\_Reale](https://forum.ansible.com/u/Marco_Reale)\
**Replies:** 9\
**Last updated:** [August 28, 2019, 12:59pm UTC](https://forum.ansible.com/t/ansible-vmware-vm-facts-get-mac-address-for-a-specific-vm-and-write-it-to-existing-inventory/30403 "2019-08-28T12:59:57Z")

</div>

I have to goals with my plabook: a) get mac address from a specific VM running on vsphere b) add it to my inventory file My test environment is: -Vsphere 6.5 -Ansible 2.7 running on Centos 7.6 I have been able to m…

---

## [Ansible-playbook Stuck randomly: Empty ansible-tmp-% gets created on remote device.](https://forum.ansible.com/t/ansible-playbook-stuck-randomly-empty-ansible-tmp-gets-created-on-remote-device/31152)

<div class="topic-metadata">

**Author:** [@Sumanyu\_Nandwani](https://forum.ansible.com/u/Sumanyu_Nandwani)\
**Replies:** 0\
**Last updated:** [August 28, 2019, 12:45pm UTC](https://forum.ansible.com/t/ansible-playbook-stuck-randomly-empty-ansible-tmp-gets-created-on-remote-device/31152 "2019-08-28T12:45:11Z")

</div>

Go to this: https://github.com/ansible/ansible/issues/60087 Kindly revert back as soon as possible

---

## [playbook errors when run through Ansible tower](https://forum.ansible.com/t/playbook-errors-when-run-through-ansible-tower/31151)

<div class="topic-metadata">

**Author:** [@Shashank\_Dutt\_Jha](https://forum.ansible.com/u/Shashank_Dutt_Jha)\
**Replies:** 1\
**Last updated:** [August 28, 2019, 12:37pm UTC](https://forum.ansible.com/t/playbook-errors-when-run-through-ansible-tower/31151 "2019-08-28T12:37:15Z")

</div>

I have a task like below: name: start the service. shell: “run some command” become: yes become\_method: sudo become\_user: “usera” args: chdir: “/opt/ABC” And it works fine when I run using command ansible-playbo…

---

## [bets way to rotate ansible logs?](https://forum.ansible.com/t/bets-way-to-rotate-ansible-logs/14185)

<div class="topic-metadata">

**Author:** [@Dimon](https://forum.ansible.com/u/Dimon)\
**Replies:** 3\
**Last updated:** [August 28, 2019, 12:13pm UTC](https://forum.ansible.com/t/bets-way-to-rotate-ansible-logs/14185 "2019-08-28T12:13:25Z")

</div>

I like the fact that sticking log\_path = ./my-log.log into ansible.cfg gives me nice history of actions I can \[re\]visit later. However with larger playbooks and increased number of actions (and with increased verbosity…

---

## [ANSIBLE randomly fails to connect to hosts behind bastion](https://forum.ansible.com/t/ansible-randomly-fails-to-connect-to-hosts-behind-bastion/31150)

<div class="topic-metadata">

**Author:** [@Alberto\_Jimenez\_Loza](https://forum.ansible.com/u/Alberto_Jimenez_Loza)\
**Replies:** 1\
**Last updated:** [August 28, 2019, 11:03am UTC](https://forum.ansible.com/t/ansible-randomly-fails-to-connect-to-hosts-behind-bastion/31150 "2019-08-28T11:03:53Z")

</div>

I use a proxy to connect to some machines and therefore I use the variable ansible\_ssh\_common\_args. vars: ansible\_ssh\_common\_args: ‘-o ProxyCommand=“/usr/bin/nc --proxy-type socks5 --proxy xxxxxxxxxx:1080 %h %p”’ I fo…

---

## [How to incorporate awk command in ansible shell module](https://forum.ansible.com/t/how-to-incorporate-awk-command-in-ansible-shell-module/31148)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 5\
**Last updated:** [August 28, 2019, 7:41am UTC](https://forum.ansible.com/t/how-to-incorporate-awk-command-in-ansible-shell-module/31148 "2019-08-28T07:41:07Z")

</div>

Below is my playbook: \` name: “Collecting File details” shell: “ls -ltr {{ item }} | awk '{$2=$4=$5=”"; print $0}’ | tr ‘\\n’ ‘\\t’ | tr -s " "; with\_fileglob: “{{ playbook\_dir }}/tmpfiles/\*” \` I get syntax error …

---

## [ansible error 'first argument must be string or compiled pattern'](https://forum.ansible.com/t/ansible-error-first-argument-must-be-string-or-compiled-pattern/31132)

<div class="topic-metadata">

**Author:** [@Fae\_Az](https://forum.ansible.com/u/Fae_Az)\
**Replies:** 2\
**Last updated:** [August 28, 2019, 2:25am UTC](https://forum.ansible.com/t/ansible-error-first-argument-must-be-string-or-compiled-pattern/31132 "2019-08-28T02:25:40Z")

</div>

I have this code in my playbook: - hosts: standby remote\_user: root tasks: - name: replace hostname in config replace: path: /opt/agentd.conf regexp: #\\s+Hostname\\= replace: Hostname={{hname}…

---

## [Ansible Windows Custom Modules](https://forum.ansible.com/t/ansible-windows-custom-modules/31027)

<div class="topic-metadata">

**Author:** [@ground7612](https://forum.ansible.com/u/ground7612)\
**Replies:** 3\
**Last updated:** [August 27, 2019, 9:25pm UTC](https://forum.ansible.com/t/ansible-windows-custom-modules/31027 "2019-08-27T21:25:47Z")

</div>

Hi, I have a few short questions around the Windows Module. Is it allowed (as per the GNU license) to also customize the existing Windows Modules or only add new ones? https://github.com/ansible/ansible/tree/devel/li…

---

## [Can I run plays in parallel?](https://forum.ansible.com/t/can-i-run-plays-in-parallel/31145)

<div class="topic-metadata">

**Author:** [@Nick\_Kakouros](https://forum.ansible.com/u/Nick_Kakouros)\
**Replies:** 4\
**Last updated:** [August 27, 2019, 8:38pm UTC](https://forum.ansible.com/t/can-i-run-plays-in-parallel/31145 "2019-08-27T20:38:05Z")

</div>

I have 10 files with a play each. In total these plays provision 4 hosts. I have written a function in bash that takes as an argument the host I want to provision and calls ansible with all 10 playbooks and a -l(limit) p…

---

## [Best practice: Ansible default filename extension for its files](https://forum.ansible.com/t/best-practice-ansible-default-filename-extension-for-its-files/31141)

<div class="topic-metadata">

**Author:** [@Gilson\_Soares\_GM](https://forum.ansible.com/u/Gilson_Soares_GM)\
**Replies:** 2\
**Last updated:** [August 27, 2019, 8:22pm UTC](https://forum.ansible.com/t/best-practice-ansible-default-filename-extension-for-its-files/31141 "2019-08-27T20:22:25Z")

</div>

I’m new using Ansible but I’d like to start using best practices. I know that Ansible uses YAML syntax files, not “Ansible format”. Looking thru the docs, there are several documents using interchangeably YML and YAML. …

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

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