# Latest

**URL:** https://forum.ansible.com/latest.md?page=533

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

**Page:** 534

---

## [python-apt not seend from ansible](https://forum.ansible.com/t/python-apt-not-seend-from-ansible/28219)

<div class="topic-metadata">

**Author:** [@realtebo](https://forum.ansible.com/u/realtebo)\
**Replies:** 2\
**Last updated:** [August 1, 2018, 6:04am UTC](https://forum.ansible.com/t/python-apt-not-seend-from-ansible/28219 "2018-08-01T06:04:49Z")

</div>

I have python and python-apt. $ python -V Python 2.7.15rc1 $ pip list ... cut ... python-apt (1.6.2) ... cut ... But I am facing this error

---

## [Developing / Testing network\_cli connection methods](https://forum.ansible.com/t/developing-testing-network-cli-connection-methods/28217)

<div class="topic-metadata">

**Author:** [@Anthony\_Koenada](https://forum.ansible.com/u/Anthony_Koenada)\
**Replies:** 1\
**Last updated:** [August 1, 2018, 4:10am UTC](https://forum.ansible.com/t/developing-testing-network-cli-connection-methods/28217 "2018-08-01T04:10:32Z")

</div>

We’re looking to develop and test a network\_cli module for an internal platform at our company. I have gotten the connection method working by creating the necessary files, as documented in https://github.com/ansible/co…

---

## [customvalue empty with vmware dynamic inventory](https://forum.ansible.com/t/customvalue-empty-with-vmware-dynamic-inventory/27766)

<div class="topic-metadata">

**Author:** [@Samuel\_Mutel](https://forum.ansible.com/u/Samuel_Mutel)\
**Replies:** 1\
**Last updated:** [July 31, 2018, 10:28pm UTC](https://forum.ansible.com/t/customvalue-empty-with-vmware-dynamic-inventory/27766 "2018-07-31T22:28:28Z")

</div>

Hello, I would like to setup a vmware dynamic inventory with vmware\_inventory.py (available here https://github.com/ansible/ansible/tree/stable-2.6/contrib/inventory). When I execute the script, the “customvalue” field…

---

## [populate /etc/hosts from dynamic inventory](https://forum.ansible.com/t/populate-etc-hosts-from-dynamic-inventory/28189)

<div class="topic-metadata">

**Author:** [@christian.tremel](https://forum.ansible.com/u/christian.tremel)\
**Replies:** 2\
**Last updated:** [July 31, 2018, 8:12pm UTC](https://forum.ansible.com/t/populate-etc-hosts-from-dynamic-inventory/28189 "2018-07-31T20:12:03Z")

</div>

hey all, i need to populate the /etc/hosts file on the ansible server (localhost only) from dynamic inventory, alas it does not work, as the hosts/ip’s from inventory are not handled. any idea whats wrong? inventory fo…

---

## [disable "ansible in a world writeable directory" warning](https://forum.ansible.com/t/disable-ansible-in-a-world-writeable-directory-warning/28163)

<div class="topic-metadata">

**Author:** [@profhase85](https://forum.ansible.com/u/profhase85)\
**Replies:** 3\
**Last updated:** [July 31, 2018, 8:10pm UTC](https://forum.ansible.com/t/disable-ansible-in-a-world-writeable-directory-warning/28163 "2018-07-31T20:10:41Z")

</div>

I am running ansible in the gitlab ci in a docker container. I am always getting: \[WARNING\] Ansible is in a world writable directory (/builds/iam/deployment/infrastructure), ignoring it as an ansible.cfg source. (BT…

---

## [delegate\_to in combination with with\_items](https://forum.ansible.com/t/delegate-to-in-combination-with-with-items/28216)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 3\
**Last updated:** [July 31, 2018, 6:14pm UTC](https://forum.ansible.com/t/delegate-to-in-combination-with-with-items/28216 "2018-07-31T18:14:06Z")

</div>

Why doesn’t the following work? Syntax issue? or bug? \` name: Backup home dir and nagios rights shell: “cd {{ dirpath }}; getfacl -R {{ dir }} \> {{ file }}.{{ ansible\_date\_time.date }}” with\_items: { dirpath: “/home…

---

## [Repositories missing after installation of Ansible 2.6.2 on CentOSs/Ubuntu](https://forum.ansible.com/t/repositories-missing-after-installation-of-ansible-2-6-2-on-centoss-ubuntu/28215)

<div class="topic-metadata">

**Author:** [@sivel](https://forum.ansible.com/u/sivel)\
**Replies:** 0\
**Last updated:** [July 31, 2018, 4:52pm UTC](https://forum.ansible.com/t/repositories-missing-after-installation-of-ansible-2-6-2-on-centoss-ubuntu/28215 "2018-07-31T16:52:48Z")

</div>

The pip installation method does not automatically create the /etc/ansible directory. When using the pip installation method, the user is responsible for creating this directory. When using an OS package (rpm/deb) this …

---

## [What is search failing against getent\_group](https://forum.ansible.com/t/what-is-search-failing-against-getent-group/28214)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 3\
**Last updated:** [July 31, 2018, 4:29pm UTC](https://forum.ansible.com/t/what-is-search-failing-against-getent-group/28214 "2018-07-31T16:29:15Z")

</div>

I must have a syntax error or don’t understand something, but the following errors out. Am I doing this wrong? or is there something special about trying to search getent\_{group,passwd}? \` debug: var: getent\_group.db…

---

## [Ansible facts, parse values in dict](https://forum.ansible.com/t/ansible-facts-parse-values-in-dict/28192)

<div class="topic-metadata">

**Author:** [@D11](https://forum.ansible.com/u/D11)\
**Replies:** 3\
**Last updated:** [July 31, 2018, 4:13pm UTC](https://forum.ansible.com/t/ansible-facts-parse-values-in-dict/28192 "2018-07-31T16:13:57Z")

</div>

Hello, I am using setup module to generate some facts and register it to "ansible\_facts" variable, Now i want to parse "ansible\_facts" variable and remove some key value pairs, how can i parse it ? I tried different f…

---

## [can you do nested variables?](https://forum.ansible.com/t/can-you-do-nested-variables/28211)

<div class="topic-metadata">

**Author:** [@IP\_Freely](https://forum.ansible.com/u/IP_Freely)\
**Replies:** 2\
**Last updated:** [July 31, 2018, 2:37pm UTC](https://forum.ansible.com/t/can-you-do-nested-variables/28211 "2018-07-31T14:37:52Z")

</div>

I have a playbook that I need to pull a variable based on environment, Im using the following hardcoded enviroment dev currently: login\_password: “{{ mysql\_replication\_password \[‘dev’\] }}” What I would like to do is …

---

## [Not able to send email from O365](https://forum.ansible.com/t/not-able-to-send-email-from-o365/28213)

<div class="topic-metadata">

**Author:** [@misra.debasish90](https://forum.ansible.com/u/misra.debasish90)\
**Replies:** 1\
**Last updated:** [July 31, 2018, 2:37pm UTC](https://forum.ansible.com/t/not-able-to-send-email-from-o365/28213 "2018-07-31T14:37:44Z")

</div>

Hi trying to send emain through pod51024.outlook.com host but gets below error fatal: \[localhost\]: FAILED! =\> {“changed”: false, “msg”: “StartTLS is not offered on server pod51024.outlook.com:587”, “rc”: 1} please find…

---

## [How to get the "{{ playbook\_dir }}" variable directly in the python source code without passing as option](https://forum.ansible.com/t/how-to-get-the-playbook-dir-variable-directly-in-the-python-source-code-without-passing-as-option/28212)

<div class="topic-metadata">

**Author:** [@Sayed\_Anisul](https://forum.ansible.com/u/Sayed_Anisul)\
**Replies:** 0\
**Last updated:** [July 31, 2018, 2:08pm UTC](https://forum.ansible.com/t/how-to-get-the-playbook-dir-variable-directly-in-the-python-source-code-without-passing-as-option/28212 "2018-07-31T14:08:33Z")

</div>

Hello !##### Ansible has a variable “{{ playbook\_dir }}” that gives the playbook directory path. What I understand is, while running the Ansible play, the sources related to Ansible playbook are copied to a temporary loc…

---

## [Is it possible to natively convert a 3 letter country code to a 2 letter one (e.g. USA -\> US)](https://forum.ansible.com/t/is-it-possible-to-natively-convert-a-3-letter-country-code-to-a-2-letter-one-e-g-usa-us/28201)

<div class="topic-metadata">

**Author:** [@Sabrina\_Lautier](https://forum.ansible.com/u/Sabrina_Lautier)\
**Replies:** 9\
**Last updated:** [July 31, 2018, 12:32pm UTC](https://forum.ansible.com/t/is-it-possible-to-natively-convert-a-3-letter-country-code-to-a-2-letter-one-e-g-usa-us/28201 "2018-07-31T12:32:11Z")

</div>

Hi everyone, I’m migrating most of my code from python 2.7 to ansible and would like to know if there’s a way to natively convert a 3 letter country code to 2 letter one. It was really easy to do in python: \` from is…

---

## [Job Hangs and I can't delete either.](https://forum.ansible.com/t/job-hangs-and-i-cant-delete-either/28193)

<div class="topic-metadata">

**Author:** [@Daniel\_M](https://forum.ansible.com/u/Daniel_M)\
**Replies:** 3\
**Last updated:** [July 31, 2018, 12:24pm UTC](https://forum.ansible.com/t/job-hangs-and-i-cant-delete-either/28193 "2018-07-31T12:24:44Z")

</div>

Hi guys, I’ve configure a template and then when firing up the job it hangs and does not let me delete it either. When I try to delete it I get back the following error: Call to /api/v2/jobs/28/ failed. returned statu…

---

## [Installing software by exe in windows](https://forum.ansible.com/t/installing-software-by-exe-in-windows/28207)

<div class="topic-metadata">

**Author:** [@tommy.lin](https://forum.ansible.com/u/tommy.lin)\
**Replies:** 1\
**Last updated:** [July 31, 2018, 10:16am UTC](https://forum.ansible.com/t/installing-software-by-exe-in-windows/28207 "2018-07-31T10:16:09Z")

</div>

Hi all, I want to use ansible on some new Windows PC to install software. I have used win\_package, many of them are working perfectly. For example: name: ScreenCapturerRecorder win\_package: path: D:\\app\\ScreenCapt…

---

## [Yaml - Use for loop](https://forum.ansible.com/t/yaml-use-for-loop/28205)

<div class="topic-metadata">

**Author:** [@Scofield](https://forum.ansible.com/u/Scofield)\
**Replies:** 5\
**Last updated:** [July 31, 2018, 9:15am UTC](https://forum.ansible.com/t/yaml-use-for-loop/28205 "2018-07-31T09:15:19Z")

</div>

Hi, Can able to find the script “test.sh” pid and kill it using below yml code. I need to kill multiple script like test1.sh test2.sh test3.sh in single yml code like using for loop to give input Can you suggest the i…

---

## [tabs are always shown as \\t](https://forum.ansible.com/t/tabs-are-always-shown-as-t/28191)

<div class="topic-metadata">

**Author:** [@starflighter.one](https://forum.ansible.com/u/starflighter.one)\
**Replies:** 3\
**Last updated:** [July 31, 2018, 9:08am UTC](https://forum.ansible.com/t/tabs-are-always-shown-as-t/28191 "2018-07-31T09:08:42Z")

</div>

Hi, I use ansible 2.6.0. Every time in debug or variables tabs are shown as \\t. For example: on commandline: echo -e "this is \\t a test" Result: this is a test Ansible: \` command: echo -e “this is \\t a test” \` …

---

## [map along with regex\_replac](https://forum.ansible.com/t/map-along-with-regex-replac/28206)

<div class="topic-metadata">

**Author:** [@kkumaar999](https://forum.ansible.com/u/kkumaar999)\
**Replies:** 0\
**Last updated:** [July 31, 2018, 7:30am UTC](https://forum.ansible.com/t/map-along-with-regex-replac/28206 "2018-07-31T07:30:36Z")

</div>

Hi all, May I know what does the below filter does in ansible? b: “{{ a | b.stdout\_lines | select(search, ^ + (someregex) + ’ )'|map(‘regex\_replace’, ‘.\*’) | list }}”

---

## [vmware-guest](https://forum.ansible.com/t/vmware-guest/28204)

<div class="topic-metadata">

**Author:** [@Alexsey\_S](https://forum.ansible.com/u/Alexsey_S)\
**Replies:** 1\
**Last updated:** [July 31, 2018, 5:46am UTC](https://forum.ansible.com/t/vmware-guest/28204 "2018-07-31T05:46:37Z")

</div>

Was wandering if any one has ideas why vmware-guest cretes all vms on a particular host even though it is set to b e created a cluster? its not a show stopper - just curious. i.e: name: Create a VM from a template vm…

---

## [dyanamic ec2 instance](https://forum.ansible.com/t/dyanamic-ec2-instance/28200)

<div class="topic-metadata">

**Author:** [@dmukeshsai](https://forum.ansible.com/u/dmukeshsai)\
**Replies:** 1\
**Last updated:** [July 31, 2018, 5:39am UTC](https://forum.ansible.com/t/dyanamic-ec2-instance/28200 "2018-07-31T05:39:02Z")

</div>

hi, i want to launch ec2 instance and automate the install jenkins on that instance through playbook. i tried but it throws the exception,when ever we launch instance dynamic ip is generated,how do we give host name,ta…

---

## [Ansible Avocent Switch](https://forum.ansible.com/t/ansible-avocent-switch/28203)

<div class="topic-metadata">

**Author:** [@Dhiraj\_Harshe](https://forum.ansible.com/u/Dhiraj_Harshe)\
**Replies:** 0\
**Last updated:** [July 31, 2018, 1:14am UTC](https://forum.ansible.com/t/ansible-avocent-switch/28203 "2018-07-31T01:14:07Z")

</div>

I am trying to work on a scenario in which I want to access Cisco and Juniper network devices and run my ansible network modules like get facts, get config, push config commands on them through ansible. The network devic…

---

## [How to handle binary data in module output?](https://forum.ansible.com/t/how-to-handle-binary-data-in-module-output/28202)

<div class="topic-metadata">

**Author:** [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Replies:** 1\
**Last updated:** [July 30, 2018, 10:12pm UTC](https://forum.ansible.com/t/how-to-handle-binary-data-in-module-output/28202 "2018-07-30T22:12:16Z")

</div>

Hi, while working on a module, I have the problem that I need to return proper binary data (something like random bytes) to the user; the user has to register the result to use it. The user then has to process this d…

---

## [Problem connection with hosts](https://forum.ansible.com/t/problem-connection-with-hosts/26032)

<div class="topic-metadata">

**Author:** [@Antonio\_Jimenez\_Rami](https://forum.ansible.com/u/Antonio_Jimenez_Rami)\
**Replies:** 3\
**Last updated:** [July 30, 2018, 9:28pm UTC](https://forum.ansible.com/t/problem-connection-with-hosts/26032 "2018-07-30T21:28:18Z")

</div>

Hi, I have a ssh connection problem with a host when I launch a template. " “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname xxxxx: Name or service not known\\r\\n”, But when I connect from…

---

## [Can't get playbooks to work for creating yum repositories](https://forum.ansible.com/t/cant-get-playbooks-to-work-for-creating-yum-repositories/28199)

<div class="topic-metadata">

**Author:** [@Paul\_Greene](https://forum.ansible.com/u/Paul_Greene)\
**Replies:** 4\
**Last updated:** [July 30, 2018, 7:23pm UTC](https://forum.ansible.com/t/cant-get-playbooks-to-work-for-creating-yum-repositories/28199 "2018-07-30T19:23:10Z")

</div>

I want to automate yum repository configuration using an ansible playbook. For the most part, these systems won’t have internet access and need to access an internal yum repository. I initially copied the content of a y…

---

## [ansible disable warnings per task/module (selinux)](https://forum.ansible.com/t/ansible-disable-warnings-per-task-module-selinux/28197)

<div class="topic-metadata">

**Author:** [@profhase85](https://forum.ansible.com/u/profhase85)\
**Replies:** 0\
**Last updated:** [July 30, 2018, 3:57pm UTC](https://forum.ansible.com/t/ansible-disable-warnings-per-task-module-selinux/28197 "2018-07-30T15:57:33Z")

</div>

Hi @all, I am using the selinux module. Regardless if there is any change or not, I always get a warning: \[WARNING\]: SELinux state change will take effect next reboot Is there a way to disable this error message? …

---

## [\[DOCKER\] Explicited sudo command permissions. NO ALL](https://forum.ansible.com/t/docker-explicited-sudo-command-permissions-no-all/28196)

<div class="topic-metadata">

**Author:** [@Guilherme\_Xavier](https://forum.ansible.com/u/Guilherme_Xavier)\
**Replies:** 3\
**Last updated:** [July 30, 2018, 2:55pm UTC](https://forum.ansible.com/t/docker-explicited-sudo-command-permissions-no-all/28196 "2018-07-30T14:55:02Z")

</div>

SUMMARY My company work with sudo for docker operations, but my user can't become root. I just can use commands as root in form "sudo docker ps", "sudo docker run ...", "sudo docker images" etc. I can't use "sudo su -…

---

## [getting ansible results with the job api.](https://forum.ansible.com/t/getting-ansible-results-with-the-job-api/28194)

<div class="topic-metadata">

**Author:** [@Serge\_Zajac](https://forum.ansible.com/u/Serge_Zajac)\
**Replies:** 0\
**Last updated:** [July 30, 2018, 2:17pm UTC](https://forum.ansible.com/t/getting-ansible-results-with-the-job-api/28194 "2018-07-30T14:17:09Z")

</div>

hi My question is simple : how a playbook can have results that can be directly available in the api (jobs) Something like a coupe myResult1, myResult1Value myResult2, myResult2Value Example : you have to reserve an I…

---

## [Information related to Mitogen and a possible merge into ansible](https://forum.ansible.com/t/information-related-to-mitogen-and-a-possible-merge-into-ansible/28187)

<div class="topic-metadata">

**Author:** [@remyleone](https://forum.ansible.com/u/remyleone)\
**Replies:** 1\
**Last updated:** [July 30, 2018, 1:00pm UTC](https://forum.ansible.com/t/information-related-to-mitogen-and-a-possible-merge-into-ansible/28187 "2018-07-30T13:00:14Z")

</div>

Hello, I’ve contacted the Mitogen project (https://mitogen.readthedocs.io/en/stable/ansible.html) about what it would take to have their performance improvement merged into Ansible. You can get the complete discussion h…

---

## [issues with mysql\_user module, GRANT ALL not working](https://forum.ansible.com/t/issues-with-mysql-user-module-grant-all-not-working/28188)

<div class="topic-metadata">

**Author:** [@Alex\_Nutts](https://forum.ansible.com/u/Alex_Nutts)\
**Replies:** 0\
**Last updated:** [July 30, 2018, 8:55am UTC](https://forum.ansible.com/t/issues-with-mysql-user-module-grant-all-not-working/28188 "2018-07-30T08:55:14Z")

</div>

Dear community, I’d like to apply this grant: GRANT ALL PRIVILEGES ON opennebula.\* TO ‘oneadmin’ IDENTIFIED BY ‘password’ so I’m using the below listed role: # roles/mariadb/tasks/users.yml --- - name: Remove anonymou…

---

## [Can Ansible be used to Provision LDAP Accounts?](https://forum.ansible.com/t/can-ansible-be-used-to-provision-ldap-accounts/21283)

<div class="topic-metadata">

**Author:** [@tim6](https://forum.ansible.com/u/tim6)\
**Replies:** 3\
**Last updated:** [July 29, 2018, 4:02pm UTC](https://forum.ansible.com/t/can-ansible-be-used-to-provision-ldap-accounts/21283 "2018-07-29T16:02:10Z")

</div>

After exhaustive google searches I am under the impression that Ansible does not have an LDAP Module, and that LDAP is only used as input to formulate rights/permissions associated with executing whatever Ansible is conf…

[Previous page](https://forum.ansible.com/latest.md?page=532)

[Next page](https://forum.ansible.com/latest.md?page=534)
