# Latest

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

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

**Page:** 776

---

## [How to get the command line parameters in yaml](https://forum.ansible.com/t/how-to-get-the-command-line-parameters-in-yaml/21060)

<div class="topic-metadata">

**Author:** [@maribel.barrera21](https://forum.ansible.com/u/maribel.barrera21)\
**Replies:** 0\
**Last updated:** [April 4, 2016, 4:00pm UTC](https://forum.ansible.com/t/how-to-get-the-command-line-parameters-in-yaml/21060 "2016-04-04T16:00:49Z")

</div>

I need to be able to find out what parameters are entered when running an ansible playbook and do testing. e.g. command: ansible-playbook myplaybook.yml -l eastCoastHosts Since the subhost can be specify in Jenkins job…

---

## [haw to get environement variables of remote host ansible 2.0.1](https://forum.ansible.com/t/haw-to-get-environement-variables-of-remote-host-ansible-2-0-1/21057)

<div class="topic-metadata">

**Author:** [@imed\_khaskhoussi](https://forum.ansible.com/u/imed_khaskhoussi)\
**Replies:** 4\
**Last updated:** [April 4, 2016, 3:48pm UTC](https://forum.ansible.com/t/haw-to-get-environement-variables-of-remote-host-ansible-2-0-1/21057 "2016-04-04T15:48:33Z")

</div>

I am having problems working with the environment variables of a remote host. For example, when I try {{ lookup(‘env’, ‘PATH’) }} this returns the path of my guest machine not of the remote host. How to pick up / change …

---

## [getmountfrompath and human to bytes converter filter name survey](https://forum.ansible.com/t/getmountfrompath-and-human-to-bytes-converter-filter-name-survey/21045)

<div class="topic-metadata">

**Author:** [@Yannig\_Perre](https://forum.ansible.com/u/Yannig_Perre)\
**Replies:** 2\
**Last updated:** [April 4, 2016, 3:17pm UTC](https://forum.ansible.com/t/getmountfrompath-and-human-to-bytes-converter-filter-name-survey/21045 "2016-04-04T15:17:35Z")

</div>

Hi all, Recently, I was talking with amenonsen about a PR with the aim to provide a way to convert a string into bytes. You can check it out at the following location: https://github.com/ansible/ansible/pull/12074 Here…

---

## [Command Execution Return Code "rc"](https://forum.ansible.com/t/command-execution-return-code-rc/21051)

<div class="topic-metadata">

**Author:** [@Herbie\_van\_Dalsen](https://forum.ansible.com/u/Herbie_van_Dalsen)\
**Replies:** 2\
**Last updated:** [April 4, 2016, 2:31pm UTC](https://forum.ansible.com/t/command-execution-return-code-rc/21051 "2016-04-04T14:31:54Z")

</div>

Hi there, I cannot find a way to check successful execution of the previous command before doing the next… And I have come across the mention of rc, but how to test for that? Thank you in advance H.

---

## [Ansible gets stuck during first npm install](https://forum.ansible.com/t/ansible-gets-stuck-during-first-npm-install/19883)

<div class="topic-metadata">

**Author:** [@anoop](https://forum.ansible.com/u/anoop)\
**Replies:** 2\
**Last updated:** [April 4, 2016, 11:31am UTC](https://forum.ansible.com/t/ansible-gets-stuck-during-first-npm-install/19883 "2016-04-04T11:31:52Z")

</div>

Hi, Ansible gets stuck during execution of this task name: install repo packages become: yes become\_user: deploy npm: path={{ app\_repo\_path }} state=present app\_repo\_path = /var/www/myApp I’m using ansible vers…

---

## [ansible 2.0.1 environement variables of remote host](https://forum.ansible.com/t/ansible-2-0-1-environement-variables-of-remote-host/21033)

<div class="topic-metadata">

**Author:** [@imed\_khaskhoussi](https://forum.ansible.com/u/imed_khaskhoussi)\
**Replies:** 4\
**Last updated:** [April 4, 2016, 8:23am UTC](https://forum.ansible.com/t/ansible-2-0-1-environement-variables-of-remote-host/21033 "2016-04-04T08:23:33Z")

</div>

environment variables- Hello , i use ansible to run tasks in remote machine , i want to work with variables from this remote machine . i tried to use lookup module but it return the variables of my machine to the remote …

---

## [New passwordstore (pass) lookup. Review comments welcome](https://forum.ansible.com/t/new-passwordstore-pass-lookup-review-comments-welcome/21056)

<div class="topic-metadata">

**Author:** [@pjdeelman](https://forum.ansible.com/u/pjdeelman)\
**Replies:** 0\
**Last updated:** [April 4, 2016, 7:42am UTC](https://forum.ansible.com/t/new-passwordstore-pass-lookup-review-comments-welcome/21056 "2016-04-04T07:42:18Z")

</div>

Hi all, Last weekend i decided to put some effort in creating a new ansible lookup plugin for pass for my own needs. As this is my first lookup plugin and i’d like some opinions about the plugin. Perhaps some tips and t…

---

## [How can i specify --rm with Docker run command to make sure the containers are cleaned up on exit ?](https://forum.ansible.com/t/how-can-i-specify-rm-with-docker-run-command-to-make-sure-the-containers-are-cleaned-up-on-exit/21030)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 1\
**Last updated:** [April 4, 2016, 7:01am UTC](https://forum.ansible.com/t/how-can-i-specify-rm-with-docker-run-command-to-make-sure-the-containers-are-cleaned-up-on-exit/21030 "2016-04-04T07:01:40Z")

</div>

As per the Docker docs for Docker run - https://docs.docker.com/engine/reference/run/ In the section clean up, it is mentioned that - to automatically clean up the container and remove the file system when the container…

---

## [Ansible forces me break PEP8 when writing modules](https://forum.ansible.com/t/ansible-forces-me-break-pep8-when-writing-modules/20776)

<div class="topic-metadata">

**Author:** [@dbarrosop](https://forum.ansible.com/u/dbarrosop)\
**Replies:** 10\
**Last updated:** [April 3, 2016, 6:08pm UTC](https://forum.ansible.com/t/ansible-forces-me-break-pep8-when-writing-modules/20776 "2016-04-03T18:08:43Z")

</div>

Hello, when writing ansible modules, ansible requires you to add the following line: from ansible.module\_utils. import \* which breaks PEP8. The solution is rather simple and is proposed in the following PR: https://g…

---

## [Best practices for multiple data centers and multi tenancy](https://forum.ansible.com/t/best-practices-for-multiple-data-centers-and-multi-tenancy/21023)

<div class="topic-metadata">

**Author:** [@yves.vogl](https://forum.ansible.com/u/yves.vogl)\
**Replies:** 1\
**Last updated:** [April 3, 2016, 11:10am UTC](https://forum.ansible.com/t/best-practices-for-multiple-data-centers-and-multi-tenancy/21023 "2016-04-03T11:10:45Z")

</div>

Hi, I'm a former Chef user and recently gave Ansible a try because of its lightweight and agentless approach. I'm wondering how I should structure my inventories to meet my requirements: 1. I have different customers…

---

## [How to read property files into a dictionary via Ansible](https://forum.ansible.com/t/how-to-read-property-files-into-a-dictionary-via-ansible/21046)

<div class="topic-metadata">

**Author:** [@Hairy\_Starcraft](https://forum.ansible.com/u/Hairy_Starcraft)\
**Replies:** 0\
**Last updated:** [April 2, 2016, 11:55pm UTC](https://forum.ansible.com/t/how-to-read-property-files-into-a-dictionary-via-ansible/21046 "2016-04-02T23:55:10Z")

</div>

I currently have a list of property files that I would like to merge into a single dictionary in an Ansible script. An example file: “alpha.properties”: name: Alpha something\_else: some\_other\_value ip: 167.54.97.45 …

---

## [Ansible winrm timeout](https://forum.ansible.com/t/ansible-winrm-timeout/21042)

<div class="topic-metadata">

**Author:** [@David\_O\_Brien](https://forum.ansible.com/u/David_O_Brien)\
**Replies:** 1\
**Last updated:** [April 1, 2016, 11:54pm UTC](https://forum.ansible.com/t/ansible-winrm-timeout/21042 "2016-04-01T23:54:24Z")

</div>

And another one… I have a PowerShell script that I copy to a Windows host via the win\_template module. Then I go and use the raw module to execute that script: name: Copy PowerShell script to remote host win\_tem…

---

## [Can we stop Travis from breaking on unrelated files in module PRs?](https://forum.ansible.com/t/can-we-stop-travis-from-breaking-on-unrelated-files-in-module-prs/21035)

<div class="topic-metadata">

**Author:** [@Greg\_DeKoenigsberg1](https://forum.ansible.com/u/Greg_DeKoenigsberg1)\
**Replies:** 15\
**Last updated:** [April 1, 2016, 5:18pm UTC](https://forum.ansible.com/t/can-we-stop-travis-from-breaking-on-unrelated-files-in-module-prs/21035 "2016-04-01T17:18:01Z")

</div>

One of the nice new features we've added to the PR bot is the ability to say "hey, this PR fails Travis! Therefore it needs revision. Submitter, please fix." Saves us a lot of time. But only if it's correct! Frequentl…

---

## [Ansible 2.0.2 RC2 is ready for testing](https://forum.ansible.com/t/ansible-2-0-2-rc2-is-ready-for-testing/21043)

<div class="topic-metadata">

**Author:** [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Replies:** 0\
**Last updated:** [April 1, 2016, 4:01pm UTC](https://forum.ansible.com/t/ansible-2-0-2-rc2-is-ready-for-testing/21043 "2016-04-01T16:01:15Z")

</div>

Hi all, we’re happy to announce that the first release candidate for 2.0.2 is now available for testing. This updated release candidate fixes several bugs from RC1, as well as fixes a few additional bugs we wanted to in…

---

## [Ansible lineinfile not working as expected (newbie question)](https://forum.ansible.com/t/ansible-lineinfile-not-working-as-expected-newbie-question/21026)

<div class="topic-metadata">

**Author:** [@Boyd\_J](https://forum.ansible.com/u/Boyd_J)\
**Replies:** 2\
**Last updated:** [April 1, 2016, 3:55pm UTC](https://forum.ansible.com/t/ansible-lineinfile-not-working-as-expected-newbie-question/21026 "2016-04-01T15:55:25Z")

</div>

I’m learning Ansible for a new project, and I’m stuck on what looks like a basic issue. Using lineinfile with backrefs and \\1 doesn’t work for me. Simplified playbook to comment out a line starting with “This”:

---

## [postgresql\_user module failed to authenticate as postgres when set ansible\_become](https://forum.ansible.com/t/postgresql-user-module-failed-to-authenticate-as-postgres-when-set-ansible-become/21028)

<div class="topic-metadata">

**Author:** [@Cuong\_Nguyen1](https://forum.ansible.com/u/Cuong_Nguyen1)\
**Replies:** 3\
**Last updated:** [April 1, 2016, 2:25pm UTC](https://forum.ansible.com/t/postgresql-user-module-failed-to-authenticate-as-postgres-when-set-ansible-become/21028 "2016-04-01T14:25:12Z")

</div>

Hi guys, I have a task to create postgresql user as follow: \` name: Create database user postgresql\_user: \> name=“{{ db\_user }}” password=“{{ db\_pass }}” encrypted=yes role\_attr\_flags=“NOSUPERUSER,NOCREATEDB,NOC…

---

## [ansible hosts and hosts\_vars usage](https://forum.ansible.com/t/ansible-hosts-and-hosts-vars-usage/21034)

<div class="topic-metadata">

**Author:** [@Tom\_Hanstra](https://forum.ansible.com/u/Tom_Hanstra)\
**Replies:** 1\
**Last updated:** [April 1, 2016, 9:20am UTC](https://forum.ansible.com/t/ansible-hosts-and-hosts-vars-usage/21034 "2016-04-01T09:20:38Z")

</div>

Can someone give me a more complete example of how to tie together ansible hosts file and the hosts\_var directory? My ansible hosts file is getting out of hand and I want to break it up better. I use variables for vario…

---

## [Bootstrapping FreeBSD with Ansible 2.0: RAW module does not work anymore?](https://forum.ansible.com/t/bootstrapping-freebsd-with-ansible-2-0-raw-module-does-not-work-anymore/20523)

<div class="topic-metadata">

**Author:** [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Replies:** 8\
**Last updated:** [April 1, 2016, 8:58am UTC](https://forum.ansible.com/t/bootstrapping-freebsd-with-ansible-2-0-raw-module-does-not-work-anymore/20523 "2016-04-01T08:58:55Z")

</div>

Hi everyone, I found some nice articles how to bootstrap FreeBSD machines with ansible, as they lack a python install by default. Seems bootstrapping pkg and installing python seems to be enough. http://lampros.chaid…

---

## [Error in yum module](https://forum.ansible.com/t/error-in-yum-module/21032)

<div class="topic-metadata">

**Author:** [@Mario\_Polario](https://forum.ansible.com/u/Mario_Polario)\
**Replies:** 1\
**Last updated:** [April 1, 2016, 2:11am UTC](https://forum.ansible.com/t/error-in-yum-module/21032 "2016-04-01T02:11:30Z")

</div>

Hi! I installed ansible-1.9.4-1.el7.noarch from EPEL repository on RHEL 7.2. I have several test servers to manage. I tried simple playbook:

---

## [Ansible winrm problem](https://forum.ansible.com/t/ansible-winrm-problem/21031)

<div class="topic-metadata">

**Author:** [@David\_O\_Brien](https://forum.ansible.com/u/David_O_Brien)\
**Replies:** 3\
**Last updated:** [April 1, 2016, 1:35am UTC](https://forum.ansible.com/t/ansible-winrm-problem/21031 "2016-04-01T01:35:22Z")

</div>

Hi guys, I’m spinning up EC2 instances on AWS and I’m getting the following error: \`

---

## [python api on windows](https://forum.ansible.com/t/python-api-on-windows/21029)

<div class="topic-metadata">

**Author:** [@Huan\_He](https://forum.ansible.com/u/Huan_He)\
**Replies:** 2\
**Last updated:** [March 31, 2016, 11:12pm UTC](https://forum.ansible.com/t/python-api-on-windows/21029 "2016-03-31T23:12:22Z")

</div>

I am able to run the below cmd ansible windows -m raw -u Administrator -c winrm -a “dir” with group\_vars/windows.yml ansible\_user: Administrator ansible\_password: xxxxx ansible\_port: 5986 ansible\_connection: winrm …

---

## [Ansible docker module: expose multiple \<IPv4\>:\<port\>:\<port\> combos at once](https://forum.ansible.com/t/ansible-docker-module-expose-multiple-ipv4-port-port-combos-at-once/21036)

<div class="topic-metadata">

**Author:** [@Walter\_Dolce](https://forum.ansible.com/u/Walter_Dolce)\
**Replies:** 1\
**Last updated:** [March 31, 2016, 10:41pm UTC](https://forum.ansible.com/t/ansible-docker-module-expose-multiple-ipv4-port-port-combos-at-once/21036 "2016-03-31T22:41:38Z")

</div>

Hello Ansiblers! I was trying to think of a way to expose multiple ports in a row by using the docker module (http://docs.ansible.com/ansible/docker\_module.html) but I can’t think of anything except looping through the …

---

## [use environment variables of the remote host](https://forum.ansible.com/t/use-environment-variables-of-the-remote-host/21037)

<div class="topic-metadata">

**Author:** [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Replies:** 0\
**Last updated:** [March 31, 2016, 9:35pm UTC](https://forum.ansible.com/t/use-environment-variables-of-the-remote-host/21037 "2016-03-31T21:35:54Z")

</div>

after fact gathering, the ansible\_env variable is populated with the target host’s environment vars.

---

## [Ansible Vault](https://forum.ansible.com/t/ansible-vault/21022)

<div class="topic-metadata">

**Author:** [@Mark\_Matthews](https://forum.ansible.com/u/Mark_Matthews)\
**Replies:** 13\
**Last updated:** [March 31, 2016, 2:39pm UTC](https://forum.ansible.com/t/ansible-vault/21022 "2016-03-31T14:39:09Z")

</div>

Hi I am am trying to setup Ansible vault and running into errors. In my /etc/ansible/group\_vars folder I have muliple vars files for specific server groups in the host files. These vars files (winservers.yml) have the …

---

## [How can you set multiple hosts on the same machine with dynamic inventories](https://forum.ansible.com/t/how-can-you-set-multiple-hosts-on-the-same-machine-with-dynamic-inventories/21020)

<div class="topic-metadata">

**Author:** [@ryangrannell](https://forum.ansible.com/u/ryangrannell)\
**Replies:** 4\
**Last updated:** [March 31, 2016, 9:42am UTC](https://forum.ansible.com/t/how-can-you-set-multiple-hosts-on-the-same-machine-with-dynamic-inventories/21020 "2016-03-31T09:42:23Z")

</div>

Hi, I’m currently setting up two VMs that are accessible behind a single domain name but on different ports. I cannot figure out how to specifiy host-vars seperately for each host. My aim is to allow ansible to SSH int…

---

## [How to pass inventory information to modules](https://forum.ansible.com/t/how-to-pass-inventory-information-to-modules/21025)

<div class="topic-metadata">

**Author:** [@Miroslav\_Hudec](https://forum.ansible.com/u/Miroslav_Hudec)\
**Replies:** 2\
**Last updated:** [March 31, 2016, 4:32am UTC](https://forum.ansible.com/t/how-to-pass-inventory-information-to-modules/21025 "2016-03-31T04:32:16Z")

</div>

Hello everyone, as a part of my Bachelor thesis I’m trying to make few modules for ansible, which would be used to configure MikroTik devices using API. I’m currently having troubles finding a way to “tell” the module t…

---

## [Can Ansible reference pre-existing CloudFormation stacks?](https://forum.ansible.com/t/can-ansible-reference-pre-existing-cloudformation-stacks/21027)

<div class="topic-metadata">

**Author:** [@vjorgensen](https://forum.ansible.com/u/vjorgensen)\
**Replies:** 0\
**Last updated:** [March 31, 2016, 3:37am UTC](https://forum.ansible.com/t/can-ansible-reference-pre-existing-cloudformation-stacks/21027 "2016-03-31T03:37:28Z")

</div>

Hi! I have an ansible playbook that looks something like the one below (edited for brevity). I have another CloudFormation stack created by another process outside my control that creates many common references. Is there…

---

## [Different ssh behavior on Linux and MacOSX](https://forum.ansible.com/t/different-ssh-behavior-on-linux-and-macosx/21009)

<div class="topic-metadata">

**Author:** [@spice](https://forum.ansible.com/u/spice)\
**Replies:** 3\
**Last updated:** [March 31, 2016, 2:01am UTC](https://forum.ansible.com/t/different-ssh-behavior-on-linux-and-macosx/21009 "2016-03-31T02:01:59Z")

</div>

Ha all We use Ansible version 2.0.1.0 on MacOS X 10.11.3 (El Capitan) and Ubuntu 14.04 Ansible on MAcOS installed via #brew install ansible Today i’v got a strange behavior on my project In our role we change root pa…

---

## [not able to match a string in a var list.](https://forum.ansible.com/t/not-able-to-match-a-string-in-a-var-list/21012)

<div class="topic-metadata">

**Author:** [@matthew.graham](https://forum.ansible.com/u/matthew.graham)\
**Replies:** 3\
**Last updated:** [March 30, 2016, 10:43pm UTC](https://forum.ansible.com/t/not-able-to-match-a-string-in-a-var-list/21012 "2016-03-30T22:43:14Z")

</div>

Hi All Doing something Im sure seems odd but building a production deployment script based on some very manual steps. The dev team list out all the services that need to be upgraded. I made a var called deploy to do two…

---

## [this is regarding using modules](https://forum.ansible.com/t/this-is-regarding-using-modules/21024)

<div class="topic-metadata">

**Author:** [@Amit\_Kumar2](https://forum.ansible.com/u/Amit_Kumar2)\
**Replies:** 0\
**Last updated:** [March 30, 2016, 9:44pm UTC](https://forum.ansible.com/t/this-is-regarding-using-modules/21024 "2016-03-30T21:44:08Z")

</div>

I’m using ansible & ansible tower for capturing Server Configuration so that I can provision server on fly: I’m trying to setup yum repository locally on ansible server but I’m getting error: I referred this page: htt…

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

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