# Archives

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

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

**Page:** 581

---

## [More Ansible Tower - create an inventory group](https://forum.ansible.com/t/more-ansible-tower-create-an-inventory-group/21767)

<div class="topic-metadata">

**Author:** [@Peter\_Mooshammer](https://forum.ansible.com/u/Peter_Mooshammer)\
**Replies:** 2\
**Last updated:** [June 15, 2016, 4:49pm UTC](https://forum.ansible.com/t/more-ansible-tower-create-an-inventory-group/21767 "2016-06-15T16:49:36Z")

</div>

Hello, Is there a way to create a new inventory group other than through the UI? thanks Peter

---

## [Ansible 2.1 failing on pam\_limits module](https://forum.ansible.com/t/ansible-2-1-failing-on-pam-limits-module/21706)

<div class="topic-metadata">

**Author:** [@Fong\_Yang](https://forum.ansible.com/u/Fong_Yang)\
**Replies:** 1\
**Last updated:** [June 15, 2016, 4:09pm UTC](https://forum.ansible.com/t/ansible-2-1-failing-on-pam-limits-module/21706 "2016-06-15T16:09:55Z")

</div>

I’m getting errors with pam\_limits on the latest Ansible 2.1: TASK \[system\_configs : pam\_limits\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* fatal: \[10.1.107.1\]: FAILED! =\> {“failed”: true, “msg”: “module (pam\_limit…

---

## [Conditional variables](https://forum.ansible.com/t/conditional-variables/21780)

<div class="topic-metadata">

**Author:** [@Pavel\_Stratil](https://forum.ansible.com/u/Pavel_Stratil)\
**Replies:** 1\
**Last updated:** [June 15, 2016, 4:05pm UTC](https://forum.ansible.com/t/conditional-variables/21780 "2016-06-15T16:05:11Z")

</div>

Hey all, i’m trying to write a task to manage ssh keys. depending on that the ansible\_user, i want teo work either in /root/.ssh or /home/$user/.ssh. So I naively googled how to do that and only ended confused with s…

---

## [Ansible collect & translate server data](https://forum.ansible.com/t/ansible-collect-translate-server-data/21783)

<div class="topic-metadata">

**Author:** [@Ansible\_User](https://forum.ansible.com/u/Ansible_User)\
**Replies:** 0\
**Last updated:** [June 15, 2016, 3:16pm UTC](https://forum.ansible.com/t/ansible-collect-translate-server-data/21783 "2016-06-15T15:16:53Z")

</div>

Ansible newbie here with a more general question. I have a large number of servers that need to be re-build from scratch (no option on this). Ideally I would (1) pull the install & config info from the servers, (2) trans…

---

## [Another variable within a variable for jinja templates](https://forum.ansible.com/t/another-variable-within-a-variable-for-jinja-templates/21735)

<div class="topic-metadata">

**Author:** [@Keith\_Poirier](https://forum.ansible.com/u/Keith_Poirier)\
**Replies:** 2\
**Last updated:** [June 15, 2016, 1:19pm UTC](https://forum.ansible.com/t/another-variable-within-a-variable-for-jinja-templates/21735 "2016-06-15T13:19:42Z")

</div>

What I’m trying to do is get a list of active NICs on a system and build a template using what I find. The playbook looks like:

---

## [How I can clone with ansible into specific directory without annoying git folder?](https://forum.ansible.com/t/how-i-can-clone-with-ansible-into-specific-directory-without-annoying-git-folder/21782)

<div class="topic-metadata">

**Author:** [@Andrey\_Vinogradov](https://forum.ansible.com/u/Andrey_Vinogradov)\
**Replies:** 0\
**Last updated:** [June 15, 2016, 12:51pm UTC](https://forum.ansible.com/t/how-i-can-clone-with-ansible-into-specific-directory-without-annoying-git-folder/21782 "2016-06-15T12:51:33Z")

</div>

Hi guys! I stuck on the cloning the git content without the folder itself. I am using the task like: git: repo=git@bitbucket.org:project/someRepo.git dest=/var/www accept\_hostkey=yes version=someVersion force=yes and …

---

## [Lineinfile append at EOF](https://forum.ansible.com/t/lineinfile-append-at-eof/21765)

<div class="topic-metadata">

**Author:** [@Mona\_Gopal](https://forum.ansible.com/u/Mona_Gopal)\
**Replies:** 3\
**Last updated:** [June 15, 2016, 12:01pm UTC](https://forum.ansible.com/t/lineinfile-append-at-eof/21765 "2016-06-15T12:01:47Z")

</div>

Hi all, I am trying to use the lineinfile module to append some of the software details to a file. I don’t want to match to any regexp, but just insert every software details at the EOF. Below is the piece of code. …

---

## [Python script with Json output as inventory](https://forum.ansible.com/t/python-script-with-json-output-as-inventory/21779)

<div class="topic-metadata">

**Author:** [@Idan\_null](https://forum.ansible.com/u/Idan_null)\
**Replies:** 2\
**Last updated:** [June 15, 2016, 12:07am UTC](https://forum.ansible.com/t/python-script-with-json-output-as-inventory/21779 "2016-06-15T00:07:52Z")

</div>

Hello to everyone :slight\_smile: I’m quite new to Ansible. I have used the Python API for ansible to connect to a few servers I have, I want to get the inventory list for the python script from MySQL server, so as far…

---

## [need help in checking if a variable string is in an item string](https://forum.ansible.com/t/need-help-in-checking-if-a-variable-string-is-in-an-item-string/21757)

<div class="topic-metadata">

**Author:** [@jyanga](https://forum.ansible.com/u/jyanga)\
**Replies:** 5\
**Last updated:** [June 14, 2016, 10:12pm UTC](https://forum.ansible.com/t/need-help-in-checking-if-a-variable-string-is-in-an-item-string/21757 "2016-06-14T22:12:11Z")

</div>

Here is what I have. vars/main.yml host\_entries: { srv\_loc: ‘ca’, ip\_addr: ‘10.1.1.1’, host\_aliases: ‘ca-srv-01.example.com ca-srv-01’ } { srv\_loc: ‘ny’, ip\_addr: ‘10.2.1.1’, host\_aliases: ‘ny-srv-01.example.com ny-s…

---

## [win\_package uninstall example?](https://forum.ansible.com/t/win-package-uninstall-example/21708)

<div class="topic-metadata">

**Author:** [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Replies:** 9\
**Last updated:** [June 14, 2016, 9:09pm UTC](https://forum.ansible.com/t/win-package-uninstall-example/21708 "2016-06-14T21:09:58Z")

</div>

I’m trying to figure out how to use win\_package to uninstall software. The state=“absent” would do an uninstall? It would seem this module can be used only for package installation?

---

## [Serial: usage across multiple plays](https://forum.ansible.com/t/serial-usage-across-multiple-plays/21759)

<div class="topic-metadata">

**Author:** [@Jason3](https://forum.ansible.com/u/Jason3)\
**Replies:** 2\
**Last updated:** [June 14, 2016, 8:13pm UTC](https://forum.ansible.com/t/serial-usage-across-multiple-plays/21759 "2016-06-14T20:13:00Z")

</div>

I’m trying to write a rolling-update.yml playbook that calls other playbooks and makes use of the serial: attribute. It goes something like this: rolling-update.yml: hosts: nonprod-app-servers serial: “30%” pre\_ta…

---

## [Finding a string within an stdout\_lines array](https://forum.ansible.com/t/finding-a-string-within-an-stdout-lines-array/21777)

<div class="topic-metadata">

**Author:** [@jamesvader13](https://forum.ansible.com/u/jamesvader13)\
**Replies:** 1\
**Last updated:** [June 14, 2016, 7:31pm UTC](https://forum.ansible.com/t/finding-a-string-within-an-stdout-lines-array/21777 "2016-06-14T19:31:43Z")

</div>

I am trying to find whether a certain letter exists in an stdout\_lines array. I want the role to run if there is a ‘P’ found in the stdout\_output. The stdout\_lines array looks like this “stdout”: “P\\r\\nA\\r\\nS\\r\\nI\\r\\n”…

---

## [Error while using ansible with aws](https://forum.ansible.com/t/error-while-using-ansible-with-aws/21776)

<div class="topic-metadata">

**Author:** [@challa.tek](https://forum.ansible.com/u/challa.tek)\
**Replies:** 0\
**Last updated:** [June 14, 2016, 5:25pm UTC](https://forum.ansible.com/t/error-while-using-ansible-with-aws/21776 "2016-06-14T17:25:14Z")

</div>

i am using ansible 2.1.0.0, when i execute a playbook against ec2 console i am finding this error Error: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_args”: {“assign\_public\_ip”: false, “aws\_acce…

---

## [Tighter integration with OS X preferences (aka defaults)](https://forum.ansible.com/t/tighter-integration-with-os-x-preferences-aka-defaults/21775)

<div class="topic-metadata">

**Author:** [@nordjc](https://forum.ansible.com/u/nordjc)\
**Replies:** 0\
**Last updated:** [June 14, 2016, 5:23pm UTC](https://forum.ansible.com/t/tighter-integration-with-os-x-preferences-aka-defaults/21775 "2016-06-14T17:23:46Z")

</div>

(Announcing here in case users who would care do not monitor the PRs closely) This new module should help those of us who have run into the limits of using the defaults command on OS X: https://github.com/ansible/ansib…

---

## ["TASK:" only showing "\[command\]"](https://forum.ansible.com/t/task-only-showing-command/21761)

<div class="topic-metadata">

**Author:** [@Dana\_Christo](https://forum.ansible.com/u/Dana_Christo)\
**Replies:** 3\
**Last updated:** [June 14, 2016, 5:20pm UTC](https://forum.ansible.com/t/task-only-showing-command/21761 "2016-06-14T17:20:39Z")

</div>

I’m trying to create a playbook to print “hello world”. Here is my playbook: \`

---

## [Trying to recreate an if statement inside a for loop with ansible](https://forum.ansible.com/t/trying-to-recreate-an-if-statement-inside-a-for-loop-with-ansible/21773)

<div class="topic-metadata">

**Author:** [@Chris\_Shelton](https://forum.ansible.com/u/Chris_Shelton)\
**Replies:** 0\
**Last updated:** [June 14, 2016, 3:15pm UTC](https://forum.ansible.com/t/trying-to-recreate-an-if-statement-inside-a-for-loop-with-ansible/21773 "2016-06-14T15:15:22Z")

</div>

So I have an on-line form in ansible tower that lets people pick a group to included in. I’m trying to set it up so they can pick multiple groups, but I’m having a tough time writing the logical checks I need. In any ot…

---

## [Default mode for apt\_repository module](https://forum.ansible.com/t/default-mode-for-apt-repository-module/21772)

<div class="topic-metadata">

**Author:** [@stevew.work](https://forum.ansible.com/u/stevew.work)\
**Replies:** 0\
**Last updated:** [June 14, 2016, 3:11pm UTC](https://forum.ansible.com/t/default-mode-for-apt-repository-module/21772 "2016-06-14T15:11:15Z")

</div>

I noticed today that the default mode is 420 for the apt\_repository module which seems a little odd to me. I would think 640 or 644 would be more appropriate. Does anyone know the reason for setting the default mode to 4…

---

## ["when" condition in handler is not honored](https://forum.ansible.com/t/when-condition-in-handler-is-not-honored/21771)

<div class="topic-metadata">

**Author:** [@Guy\_Matz1](https://forum.ansible.com/u/Guy_Matz1)\
**Replies:** 0\
**Last updated:** [June 14, 2016, 2:41pm UTC](https://forum.ansible.com/t/when-condition-in-handler-is-not-honored/21771 "2016-06-14T14:41:55Z")

</div>

Hi! I have a "when: condition that works fine in “regular” tasks, but not in a handler . . . is that expected? So I’m using a notify, then at the end of the handler task I have a when condition. The notification works,…

---

## [Migrating to Ansible v2.0 API --\> What is this Options namedtuple?](https://forum.ansible.com/t/migrating-to-ansible-v2-0-api-what-is-this-options-namedtuple/21755)

<div class="topic-metadata">

**Author:** [@Fran\_Fitzpatrick](https://forum.ansible.com/u/Fran_Fitzpatrick)\
**Replies:** 4\
**Last updated:** [June 14, 2016, 2:11pm UTC](https://forum.ansible.com/t/migrating-to-ansible-v2-0-api-what-is-this-options-namedtuple/21755 "2016-06-14T14:11:29Z")

</div>

Hi all, We’re currently upgrading our system to the new Ansible v2.x API and while I understand that the API is not officially supported, I’m trying to understand how to use the options named tuple that appears to be po…

---

## [mail using ansible](https://forum.ansible.com/t/mail-using-ansible/21768)

<div class="topic-metadata">

**Author:** [@Abhishek\_Bandari](https://forum.ansible.com/u/Abhishek_Bandari)\
**Replies:** 1\
**Last updated:** [June 14, 2016, 1:46pm UTC](https://forum.ansible.com/t/mail-using-ansible/21768 "2016-06-14T13:46:51Z")

</div>

email.yml

---

## [using pam\_limits module in Ansible 2.1 errors](https://forum.ansible.com/t/using-pam-limits-module-in-ansible-2-1-errors/21763)

<div class="topic-metadata">

**Author:** [@Fong\_Yang](https://forum.ansible.com/u/Fong_Yang)\
**Replies:** 1\
**Last updated:** [June 14, 2016, 1:31pm UTC](https://forum.ansible.com/t/using-pam-limits-module-in-ansible-2-1-errors/21763 "2016-06-14T13:31:46Z")

</div>

I’m attempting to use the pam\_limits module as included in Ansible 2.1 but getting this error: TASK \[system\_configs : pam\_limits\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* fatal: \[10.0.107.1\]: FAILED! =\> {“failed”:…

---

## [Display username in a SUDO prompt](https://forum.ansible.com/t/display-username-in-a-sudo-prompt/21770)

<div class="topic-metadata">

**Author:** [@Anton\_Ovchinnikov](https://forum.ansible.com/u/Anton_Ovchinnikov)\
**Replies:** 1\
**Last updated:** [June 14, 2016, 1:12pm UTC](https://forum.ansible.com/t/display-username-in-a-sudo-prompt/21770 "2016-06-14T13:12:50Z")

</div>

When asking for ‘become’ password, it would be convenient to display a username for which the password will be user later. Imagine you have several machines (or groups of machines), on each of those there might be diffe…

---

## [Question about using the expect module](https://forum.ansible.com/t/question-about-using-the-expect-module/21753)

<div class="topic-metadata">

**Author:** [@Sher\_Chowdhury](https://forum.ansible.com/u/Sher_Chowdhury)\
**Replies:** 2\
**Last updated:** [June 14, 2016, 10:13am UTC](https://forum.ansible.com/t/question-about-using-the-expect-module/21753 "2016-06-14T10:13:00Z")

</div>

I have an interactive command that prompts me enter a series of letters, b, d, and y. I was wondering if it is possible to run something like this: - expect: command: /path/to/custom/command responses: -…

---

## [Connecting to localhost and 127.0.0.1](https://forum.ansible.com/t/connecting-to-localhost-and-127-0-0-1/21762)

<div class="topic-metadata">

**Author:** [@Dana\_Christo](https://forum.ansible.com/u/Dana_Christo)\
**Replies:** 1\
**Last updated:** [June 14, 2016, 5:33am UTC](https://forum.ansible.com/t/connecting-to-localhost-and-127-0-0-1/21762 "2016-06-14T05:33:35Z")

</div>

When trying to run a playbook without specifying -i “localhost,” -c local I get that the host is unreachable, even though I specify the localhost in my /etc/ansible/hosts file: Is there something I’m missing in the ho…

---

## [Ansible Tower - updating ansible](https://forum.ansible.com/t/ansible-tower-updating-ansible/21766)

<div class="topic-metadata">

**Author:** [@Peter\_Mooshammer](https://forum.ansible.com/u/Peter_Mooshammer)\
**Replies:** 0\
**Last updated:** [June 14, 2016, 5:28am UTC](https://forum.ansible.com/t/ansible-tower-updating-ansible/21766 "2016-06-14T05:28:45Z")

</div>

Hello, I have a question, about Ansible Tower. Is it feasible to update Ansible from 2.0 to 2.1 on an Ansible Tower setup? thanks Peter

---

## [Restart Ansible playbook execution after updating from source code control system](https://forum.ansible.com/t/restart-ansible-playbook-execution-after-updating-from-source-code-control-system/21764)

<div class="topic-metadata">

**Author:** [@Fong\_Yang](https://forum.ansible.com/u/Fong_Yang)\
**Replies:** 0\
**Last updated:** [June 13, 2016, 11:57pm UTC](https://forum.ansible.com/t/restart-ansible-playbook-execution-after-updating-from-source-code-control-system/21764 "2016-06-13T23:57:07Z")

</div>

Does Ansible support tasks that updates the playbooks from another server or via source code control system then run those playbooks? Or do you have to do this outside of Ansible then run Ansible on those updated playboo…

---

## [Problem with zfs module on SmartOS?](https://forum.ansible.com/t/problem-with-zfs-module-on-smartos/21760)

<div class="topic-metadata">

**Author:** [@Don\_Jackson](https://forum.ansible.com/u/Don_Jackson)\
**Replies:** 1\
**Last updated:** [June 13, 2016, 8:15pm UTC](https://forum.ansible.com/t/problem-with-zfs-module-on-smartos/21760 "2016-06-13T20:15:05Z")

</div>

Over the past month or so, the following task has consistently failed for me, because the specified dataset already exists: name: Create zfs datasets zfs: name: zones/images state: present become: true The failure…

---

## [newbie nagios client deployment problem](https://forum.ansible.com/t/newbie-nagios-client-deployment-problem/21756)

<div class="topic-metadata">

**Author:** [@Thomas\_Steele](https://forum.ansible.com/u/Thomas_Steele)\
**Replies:** 2\
**Last updated:** [June 13, 2016, 6:54pm UTC](https://forum.ansible.com/t/newbie-nagios-client-deployment-problem/21756 "2016-06-13T18:54:48Z")

</div>

I’m trying to get a playbook that will download, untar, configure and make nagios client on a rhel7 server. So far the download and untar are working perfectly, but the configure and make commands are not running properl…

---

## [Ansible paybook not doing anything despite saying "succesful"](https://forum.ansible.com/t/ansible-paybook-not-doing-anything-despite-saying-succesful/21754)

<div class="topic-metadata">

**Author:** [@G\_Stewart](https://forum.ansible.com/u/G_Stewart)\
**Replies:** 1\
**Last updated:** [June 13, 2016, 5:59pm UTC](https://forum.ansible.com/t/ansible-paybook-not-doing-anything-despite-saying-succesful/21754 "2016-06-13T17:59:12Z")

</div>

I have been trying to create a playbook to modify system config files–in this case, postifx configs–and, to restart the postfix service when done. While I’ve gotten the script to run without errors (I think), despit the …

---

## [script module fails](https://forum.ansible.com/t/script-module-fails/21752)

<div class="topic-metadata">

**Author:** [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Replies:** 4\
**Last updated:** [June 13, 2016, 5:47pm UTC](https://forum.ansible.com/t/script-module-fails/21752 "2016-06-13T17:47:01Z")

</div>

Hi all, I have a role where the file “configure\_disks.ps1” is placed in folder “files”. From the role task I’m trying to run the “script” module using that file: name: Configure data disk storage pool script: free\_…

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

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