# Ansible Project

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

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

**Page:** 168

---

## [Ansible Tower installation getting failed.](https://forum.ansible.com/t/ansible-tower-installation-getting-failed/31073)

<div class="topic-metadata">

**Author:** [@Vivek1](https://forum.ansible.com/u/Vivek1)\
**Replies:** 10\
**Last updated:** [September 7, 2019, 11:37am UTC](https://forum.ansible.com/t/ansible-tower-installation-getting-failed/31073 "2019-09-07T11:37:37Z")

</div>

Hi Experts, I am trying to install Ansible tower 3.2.0 version in my Redhat machine 7.2 and getting following error. I already installed ansible version 2.8 . But tower installation is getting failed. failed: \[localhos…

---

## [Testing whether kubectl/oc context is valid](https://forum.ansible.com/t/testing-whether-kubectl-oc-context-is-valid/31215)

<div class="topic-metadata">

**Author:** [@afeller](https://forum.ansible.com/u/afeller)\
**Replies:** 0\
**Last updated:** [September 6, 2019, 11:36am UTC](https://forum.ansible.com/t/testing-whether-kubectl-oc-context-is-valid/31215 "2019-09-06T11:36:37Z")

</div>

Does anyone have a novel way to test kubectl/oc login context explicitly in a playbook to fail instead of waiting to lower in roles? I’m familiar with k8s\_auth module for handling explicit Kubernetes/OpenShift login, ho…

---

## [Ansible attach in mail module doesnt work](https://forum.ansible.com/t/ansible-attach-in-mail-module-doesnt-work/31204)

<div class="topic-metadata">

**Author:** [@Rakesh\_Parida](https://forum.ansible.com/u/Rakesh_Parida)\
**Replies:** 5\
**Last updated:** [September 6, 2019, 6:56am UTC](https://forum.ansible.com/t/ansible-attach-in-mail-module-doesnt-work/31204 "2019-09-06T06:56:32Z")

</div>

I have a code as below and i have my html files present in /tmp/sanity/ . but i am getting error as “Failed to send mail: can’t attach file” i get file not found name: list html files run\_once: true local\_action: s…

---

## [win\_updates keeps failing on some updates](https://forum.ansible.com/t/win-updates-keeps-failing-on-some-updates/31207)

<div class="topic-metadata">

**Author:** [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Replies:** 1\
**Last updated:** [September 6, 2019, 1:01am UTC](https://forum.ansible.com/t/win-updates-keeps-failing-on-some-updates/31207 "2019-09-06T01:01:05Z")

</div>

I am using win\_updates to deploy patches to machines, and I have a whole list of patches to deploy to machines in a whitelist. I am seeing an issue sometimes where the machine I try to deploy the patches to is getting D…

---

## [kubectl get nodes using context from a playbook](https://forum.ansible.com/t/kubectl-get-nodes-using-context-from-a-playbook/31164)

<div class="topic-metadata">

**Author:** [@user\_user](https://forum.ansible.com/u/user_user)\
**Replies:** 1\
**Last updated:** [September 5, 2019, 7:52pm UTC](https://forum.ansible.com/t/kubectl-get-nodes-using-context-from-a-playbook/31164 "2019-09-05T19:52:31Z")

</div>

I’m trying to fetch nodes list via ansible playbook using a context name. but its not working my playbook: cat getnodes.yaml

---

## [Sending output from a completed job via the mail module](https://forum.ansible.com/t/sending-output-from-a-completed-job-via-the-mail-module/31209)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 3\
**Last updated:** [September 5, 2019, 6:30pm UTC](https://forum.ansible.com/t/sending-output-from-a-completed-job-via-the-mail-module/31209 "2019-09-05T18:30:10Z")

</div>

We have a playbook where, once its completed, we’d like to email the stdout to certain users. Right now I am testing with the command module in the playbook as follows: name: Get job output command: curl -k -u admin:{…

---

## [Hardening SSH With Ansible](https://forum.ansible.com/t/hardening-ssh-with-ansible/31198)

<div class="topic-metadata">

**Author:** [@Jon\_Adcock](https://forum.ansible.com/u/Jon_Adcock)\
**Replies:** 17\
**Last updated:** [September 5, 2019, 6:27pm UTC](https://forum.ansible.com/t/hardening-ssh-with-ansible/31198 "2019-09-05T18:27:48Z")

</div>

I think its common practice to “harden” SSH by running the following in one of your playbooks: \` name: Disallow root SSH access lineinfile: dest: /etc/ssh/sshd\_config regexp: “^PermitRootLogin no” line: “PermitRoo…

---

## [Automation for Ansible and Jfrog  Artifactory](https://forum.ansible.com/t/automation-for-ansible-and-jfrog-artifactory/31211)

<div class="topic-metadata">

**Author:** [@Uppara\_venkat](https://forum.ansible.com/u/Uppara_venkat)\
**Replies:** 0\
**Last updated:** [September 5, 2019, 4:14pm UTC](https://forum.ansible.com/t/automation-for-ansible-and-jfrog-artifactory/31211 "2019-09-05T16:14:45Z")

</div>

Hi, I’m trying to download latest artifacts and files from Artifactory general repository in windows environment, Using window environment for that I used win\_get\_url module but here we need to provide specific file nam…

---

## [mysql\_user – create a user on a remote host from a inventory host](https://forum.ansible.com/t/mysql-user-create-a-user-on-a-remote-host-from-a-inventory-host/31210)

<div class="topic-metadata">

**Author:** [@Serge\_Zajac](https://forum.ansible.com/u/Serge_Zajac)\
**Replies:** 1\
**Last updated:** [September 5, 2019, 3:26pm UTC](https://forum.ansible.com/t/mysql-user-create-a-user-on-a-remote-host-from-a-inventory-host/31210 "2019-09-05T15:26:08Z")

</div>

Hi, I have a simple question. mysql\_user module have some requirements, One of them is Requires the PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) package on the remote host. We have installed requi…

---

## [Splitting a List into chunks](https://forum.ansible.com/t/splitting-a-list-into-chunks/31206)

<div class="topic-metadata">

**Author:** [@Spiro\_Mitsialis](https://forum.ansible.com/u/Spiro_Mitsialis)\
**Replies:** 0\
**Last updated:** [September 5, 2019, 2:15pm UTC](https://forum.ansible.com/t/splitting-a-list-into-chunks/31206 "2019-09-05T14:15:37Z")

</div>

Hi, I have a list of 200+ items (showing sample below). I need to update a database with these records using the URI module. The backend API only supports 100 records at at time. How can I loop through the URI module w…

---

## [Cannot use the pexpect module with Keybase pgp and multiple ':' characters](https://forum.ansible.com/t/cannot-use-the-pexpect-module-with-keybase-pgp-and-multiple-characters/31147)

<div class="topic-metadata">

**Author:** [@queglay](https://forum.ansible.com/u/queglay)\
**Replies:** 13\
**Last updated:** [September 5, 2019, 1:09pm UTC](https://forum.ansible.com/t/cannot-use-the-pexpect-module-with-keybase-pgp-and-multiple-characters/31147 "2019-09-05T13:09:54Z")

</div>

I’m wondering why the pexpect module is failing in this circumstance, perhaps my regex is not right, but the double ‘:’ may be messing with things as well and I’m not sure how to approach handling it. if I run- \` keyb…

---

## [How to assign set\_fact variable some value based on condition ?](https://forum.ansible.com/t/how-to-assign-set-fact-variable-some-value-based-on-condition/31205)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 2\
**Last updated:** [September 5, 2019, 12:53pm UTC](https://forum.ansible.com/t/how-to-assign-set-fact-variable-some-value-based-on-condition/31205 "2019-09-05T12:53:40Z")

</div>

MYUSER should be assigned value “wsadm” or “user1” based on the output of {{ command\_result.stdout.split(‘\\t’)\[1\] }} I tried the below however, I’m getting error when I run. My playbook looks like below: \`

---

## [\[find module\]\[mail module\] Report only file name list](https://forum.ansible.com/t/find-module-mail-module-report-only-file-name-list/31203)

<div class="topic-metadata">

**Author:** [@Tran\_Khang](https://forum.ansible.com/u/Tran_Khang)\
**Replies:** 4\
**Last updated:** [September 5, 2019, 9:22am UTC](https://forum.ansible.com/t/find-module-mail-module-report-only-file-name-list/31203 "2019-09-05T09:22:16Z")

</div>

Hi all, I’m trying combine find module and mail module to report to my email only the list of files I need that were finded in specific folder. I try many ways but always receive full output. Do anyone can help? My tas…

---

## [Need Help for REST API integration with Ansible](https://forum.ansible.com/t/need-help-for-rest-api-integration-with-ansible/30846)

<div class="topic-metadata">

**Author:** [@Rahul\_Kumar1](https://forum.ansible.com/u/Rahul_Kumar1)\
**Replies:** 7\
**Last updated:** [September 5, 2019, 5:13am UTC](https://forum.ansible.com/t/need-help-for-rest-api-integration-with-ansible/30846 "2019-09-05T05:13:35Z")

</div>

There is URI module present in Ansible which lets you invoke REST End Points and it works preety well. Currently i have lot of JSON Objects and corresponding REST end points ofcourse for each. Is it a good practice for…

---

## [playbook problem](https://forum.ansible.com/t/playbook-problem/31202)

<div class="topic-metadata">

**Author:** [@Matt\_Luk](https://forum.ansible.com/u/Matt_Luk)\
**Replies:** 0\
**Last updated:** [September 5, 2019, 4:09am UTC](https://forum.ansible.com/t/playbook-problem/31202 "2019-09-05T04:09:04Z")

</div>

I want use AWX to shut down the VM in hyper-V. powershell query: $a = Get-ClusterGroup | Where-Object {$.Name -like “server1” -and $.State -eq ‘Online’} $b = $a.OwnerNode Stop-VM -Name “vm1” -ComputerName $b …

---

## [Set SELinux to permissive mode and reboot.](https://forum.ansible.com/t/set-selinux-to-permissive-mode-and-reboot/31201)

<div class="topic-metadata">

**Author:** [@Zolvaring](https://forum.ansible.com/u/Zolvaring)\
**Replies:** 0\
**Last updated:** [September 5, 2019, 2:36am UTC](https://forum.ansible.com/t/set-selinux-to-permissive-mode-and-reboot/31201 "2019-09-05T02:36:08Z")

</div>

I’m almost positive you’d have to register the SELinux task return to get this to work, ‘reboot\_required’ is not going to exist outside of that scope, I think what you would need is:

---

## [How Alter postgres table definitions with ansible?](https://forum.ansible.com/t/how-alter-postgres-table-definitions-with-ansible/31185)

<div class="topic-metadata">

**Author:** [@simon\_read](https://forum.ansible.com/u/simon_read)\
**Replies:** 1\
**Last updated:** [September 4, 2019, 3:34pm UTC](https://forum.ansible.com/t/how-alter-postgres-table-definitions-with-ansible/31185 "2019-09-04T15:34:50Z")

</div>

We are using ansible to deploy postgres/schema/tables. We require to patch the tables and therefore require to alter the tables (e.g. add or change type of columns). There seems to be two modules related to this. postg…

---

## [Requires Help ,using Python for accessing dictionary values from yaml file](https://forum.ansible.com/t/requires-help-using-python-for-accessing-dictionary-values-from-yaml-file/31188)

<div class="topic-metadata">

**Author:** [@Pawan\_Kumar1](https://forum.ansible.com/u/Pawan_Kumar1)\
**Replies:** 8\
**Last updated:** [September 4, 2019, 2:30pm UTC](https://forum.ansible.com/t/requires-help-using-python-for-accessing-dictionary-values-from-yaml-file/31188 "2019-09-04T14:30:52Z")

</div>

Using Python script to access values from yaml dictionary & print some of the values as list . For Example - Parse the each key and extract the “product\_name”, “release\_candidate” and “version“ & Print results as list T…

---

## [Set SELinux to permissive mode and reboot.](https://forum.ansible.com/t/set-selinux-to-permissive-mode-and-reboot/31197)

<div class="topic-metadata">

**Author:** [@racke](https://forum.ansible.com/u/racke)\
**Replies:** 0\
**Last updated:** [September 4, 2019, 1:51pm UTC](https://forum.ansible.com/t/set-selinux-to-permissive-mode-and-reboot/31197 "2019-09-04T13:51:16Z")

</div>

Hello All, I need to set SELinux to permissive mode and reboot. When I run my playbook I get an error. Playbook: \> --- -name:SetSELinuxto permissive mode. selinux: policy:targeted state:permissive when:ansible\_…

---

## [open firewall for http traffic SLES 15](https://forum.ansible.com/t/open-firewall-for-http-traffic-sles-15/31193)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 2\
**Last updated:** [September 4, 2019, 8:28am UTC](https://forum.ansible.com/t/open-firewall-for-http-traffic-sles-15/31193 "2019-09-04T08:28:26Z")

</div>

sudo pip install firewall then run the playbook again

---

## [Ansible and Azure](https://forum.ansible.com/t/ansible-and-azure/31189)

<div class="topic-metadata">

**Author:** [@Lucas\_Chies](https://forum.ansible.com/u/Lucas_Chies)\
**Replies:** 3\
**Last updated:** [September 4, 2019, 8:16am UTC](https://forum.ansible.com/t/ansible-and-azure/31189 "2019-09-04T08:16:33Z")

</div>

Hello guys, I’ve a doubt … I’ve a ansible script that create an windows VM on Azure, but I already have the vnet created in and hosted in another Resource Group. I don’t know how can I create my script to put this VM i…

---

## [Looking For Advice On Convincing My Boss To Implement Ansible](https://forum.ansible.com/t/looking-for-advice-on-convincing-my-boss-to-implement-ansible/31195)

<div class="topic-metadata">

**Author:** [@Chrono\_7](https://forum.ansible.com/u/Chrono_7)\
**Replies:** 0\
**Last updated:** [September 4, 2019, 2:22am UTC](https://forum.ansible.com/t/looking-for-advice-on-convincing-my-boss-to-implement-ansible/31195 "2019-09-04T02:22:07Z")

</div>

Hello all, I’m looking for some advice on “selling” Ansible to my boss, and I figured this would be a good place to bring this up. I’m currently working at an MSP and would like to implement Ansible to help with system…

---

## [Temporarily disable Ansible from running on a host for 1 hour](https://forum.ansible.com/t/temporarily-disable-ansible-from-running-on-a-host-for-1-hour/31194)

<div class="topic-metadata">

**Author:** [@Nima\_V](https://forum.ansible.com/u/Nima_V)\
**Replies:** 1\
**Last updated:** [September 4, 2019, 12:09am UTC](https://forum.ansible.com/t/temporarily-disable-ansible-from-running-on-a-host-for-1-hour/31194 "2019-09-04T00:09:52Z")

</div>

I have Ansible running regularly via Jenkins. There are times where I want to prevent a host from running ansible temporarily. What is the best way to temporarily disable Ansible so that it does not run when Jenkins runs…

---

## [Thoughts on Dynamic Variables](https://forum.ansible.com/t/thoughts-on-dynamic-variables/31178)

<div class="topic-metadata">

**Author:** [@Cade\_Lambert](https://forum.ansible.com/u/Cade_Lambert)\
**Replies:** 6\
**Last updated:** [September 3, 2019, 4:14pm UTC](https://forum.ansible.com/t/thoughts-on-dynamic-variables/31178 "2019-09-03T16:14:01Z")

</div>

I wanted to see how you guys go about building dynamic variables. We have some playbooks/roles that require variables to be built based on various things, such as user input or other variables. I usually end up building …

---

## [Ansible - create a list from variable](https://forum.ansible.com/t/ansible-create-a-list-from-variable/31184)

<div class="topic-metadata">

**Author:** [@TheSmiths](https://forum.ansible.com/u/TheSmiths)\
**Replies:** 1\
**Last updated:** [September 3, 2019, 3:10pm UTC](https://forum.ansible.com/t/ansible-create-a-list-from-variable/31184 "2019-09-03T15:10:32Z")

</div>

Hi, I would like to create a list from parsing a variable that contains multiple ips separated by a comma. The variable: ips\_input: “,1.1.1.1/32,2.2.2.2/32,3.3.3.3/32” every item in the list should contain ip/mask. t…

---

## [Need a help to create S3 bucket using Ansible](https://forum.ansible.com/t/need-a-help-to-create-s3-bucket-using-ansible/31106)

<div class="topic-metadata">

**Author:** [@Amit\_Kulkarni](https://forum.ansible.com/u/Amit_Kulkarni)\
**Replies:** 28\
**Last updated:** [September 2, 2019, 11:03pm UTC](https://forum.ansible.com/t/need-a-help-to-create-s3-bucket-using-ansible/31106 "2019-09-02T23:03:34Z")

</div>

Hi All, Need urgent help I am getting below error while creating S3 bucket using playbook. AWS keys I have set up as Environmental variables. Let me know if I am missing anything. Below is the playbbok

---

## [Support for installing Ansible on Windows](https://forum.ansible.com/t/support-for-installing-ansible-on-windows/31129)

<div class="topic-metadata">

**Author:** [@John\_Thompson](https://forum.ansible.com/u/John_Thompson)\
**Replies:** 6\
**Last updated:** [September 2, 2019, 5:02pm UTC](https://forum.ansible.com/t/support-for-installing-ansible-on-windows/31129 "2019-09-02T17:02:35Z")

</div>

Hi, I have done some searching but can’t see if there is any update on supporting the installation of Ansible on Windows? I’d be interested to know if there are any plans? https://docs.ansible.com/ansible/latest/user\_g…

---

## [Ansible for windows](https://forum.ansible.com/t/ansible-for-windows/31093)

<div class="topic-metadata">

**Author:** [@uday1kiran](https://forum.ansible.com/u/uday1kiran)\
**Replies:** 3\
**Last updated:** [September 2, 2019, 4:58pm UTC](https://forum.ansible.com/t/ansible-for-windows/31093 "2019-09-02T16:58:03Z")

</div>

Hi, I wrote an autoit exe which will launch out application,test its functionality and store the logs in results.txt I want ansible to copy the autoit exe, a config file and our application to a vm amd launch the autoi…

---

## [chnaging all passwords on linux box](https://forum.ansible.com/t/chnaging-all-passwords-on-linux-box/31174)

<div class="topic-metadata">

**Author:** [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Replies:** 5\
**Last updated:** [August 31, 2019, 7:27pm UTC](https://forum.ansible.com/t/chnaging-all-passwords-on-linux-box/31174 "2019-08-31T19:27:54Z")

</div>

Hello All, I have a task to change all the password on a vpnbox and then give the user their password. I have been researching and think I found a way to do it, but I am not sure how I then get the password to output to…

---

## [How to pass stdout of a variable belonging to different Ansible play ?](https://forum.ansible.com/t/how-to-pass-stdout-of-a-variable-belonging-to-different-ansible-play/31176)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 5\
**Last updated:** [August 31, 2019, 8:24am UTC](https://forum.ansible.com/t/how-to-pass-stdout-of-a-variable-belonging-to-different-ansible-play/31176 "2019-08-31T08:24:03Z")

</div>

How to pass “stdout” of a variable “command\_result” belonging to Ansible Play-1 to shell module of a different Play-2? My playbook looks like below: \` name: Play 1 hosts: localhost tasks: name: “Collect Output” …

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

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