# Ansible Project

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

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

**Page:** 250

---

## [How to disable registration of stdr output in ansible](https://forum.ansible.com/t/how-to-disable-registration-of-stdr-output-in-ansible/27962)

<div class="topic-metadata">

**Author:** [@Imthi\_Official](https://forum.ansible.com/u/Imthi_Official)\
**Replies:** 0\
**Last updated:** [July 5, 2018, 5:23pm UTC](https://forum.ansible.com/t/how-to-disable-registration-of-stdr-output-in-ansible/27962 "2018-07-05T17:23:05Z")

</div>

Hi, I have developed a custom module for ansible using python pycurl lib. Instead of registering the returned response. The stdr output is being registered. Could anyone help me on this. https://stackoverflow.com/quest…

---

## [inventory and group vars](https://forum.ansible.com/t/inventory-and-group-vars/27957)

<div class="topic-metadata">

**Author:** [@lior\_hollander](https://forum.ansible.com/u/lior_hollander)\
**Replies:** 1\
**Last updated:** [July 5, 2018, 4:05pm UTC](https://forum.ansible.com/t/inventory-and-group-vars/27957 "2018-07-05T16:05:35Z")

</div>

hey, i have the following directory layout, and its not working: inventories/ production/ hosts # inventory file for production servers group\_vars/ group1.yml # here we assig…

---

## [RegEXP ansible ERROR! Syntax Error while loading YAML.](https://forum.ansible.com/t/regexp-ansible-error-syntax-error-while-loading-yaml/27960)

<div class="topic-metadata">

**Author:** [@VS1](https://forum.ansible.com/u/VS1)\
**Replies:** 1\
**Last updated:** [July 5, 2018, 3:50pm UTC](https://forum.ansible.com/t/regexp-ansible-error-syntax-error-while-loading-yaml/27960 "2018-07-05T15:50:07Z")

</div>

\` name: Configure filebeat lineinfile: dest= /etc/filebeat/filebeat.yml regexp = “{{ item.regexp }}” line = “{{ item.regexp }}” with\_items: { regexp: ‘#output.elasticsearch:’, line: ‘output.elasticsearch:\\n hosts…

---

## [Ansible playbook for finding file content change in particular directory on two servers.](https://forum.ansible.com/t/ansible-playbook-for-finding-file-content-change-in-particular-directory-on-two-servers/27958)

<div class="topic-metadata">

**Author:** [@Akash\_Talole](https://forum.ansible.com/u/Akash_Talole)\
**Replies:** 0\
**Last updated:** [July 5, 2018, 3:31pm UTC](https://forum.ansible.com/t/ansible-playbook-for-finding-file-content-change-in-particular-directory-on-two-servers/27958 "2018-07-05T15:31:02Z")

</div>

Problem statement: I want to find differences between these two directory file contents on two different host. e.g. file1 on server1 and server2 has differences. That should be output of this playbook. Server1 direct…

---

## [Ansible-pull ask always to put credentials such as Username and Password](https://forum.ansible.com/t/ansible-pull-ask-always-to-put-credentials-such-as-username-and-password/27956)

<div class="topic-metadata">

**Author:** [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Replies:** 0\
**Last updated:** [July 5, 2018, 1:30pm UTC](https://forum.ansible.com/t/ansible-pull-ask-always-to-put-credentials-such-as-username-and-password/27956 "2018-07-05T13:30:49Z")

</div>

Hi all, I have setup a GIT Repository and I need to use now via ansible-pull the correct username and passwort to pull the data out of it. When using the correct credentials it keeps asking me again and again for the c…

---

## [Pass multiple commands in ad-hoc mode in Cisco ios\_command module](https://forum.ansible.com/t/pass-multiple-commands-in-ad-hoc-mode-in-cisco-ios-command-module/27947)

<div class="topic-metadata">

**Author:** [@Dilraj\_Singh\_Khalsa](https://forum.ansible.com/u/Dilraj_Singh_Khalsa)\
**Replies:** 4\
**Last updated:** [July 5, 2018, 12:58pm UTC](https://forum.ansible.com/t/pass-multiple-commands-in-ad-hoc-mode-in-cisco-ios-command-module/27947 "2018-07-05T12:58:33Z")

</div>

I would like to know how can I pass multiple show commands in ios\_command module in ad-hoc mode. Sample with just one command: ansible all -m ios\_command -a "commands='show version'" Now here I would like to send a…

---

## [Using replace well](https://forum.ansible.com/t/using-replace-well/27954)

<div class="topic-metadata">

**Author:** [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Replies:** 0\
**Last updated:** [July 5, 2018, 12:01pm UTC](https://forum.ansible.com/t/using-replace-well/27954 "2018-07-05T12:01:15Z")

</div>

Okay, this might not be the most kludgy task list ever, but I think it’s in the running. The goal is to edit Apache’s httpd.conf file to ensure certain Options are set and certain other ones aren’t. The issues I’ve run i…

---

## [Ansible scaling and optimization/best practices](https://forum.ansible.com/t/ansible-scaling-and-optimization-best-practices/27952)

<div class="topic-metadata">

**Author:** [@oxedions](https://forum.ansible.com/u/oxedions)\
**Replies:** 2\
**Last updated:** [July 5, 2018, 9:15am UTC](https://forum.ansible.com/t/ansible-scaling-and-optimization-best-practices/27952 "2018-07-05T09:15:12Z")

</div>

Hi :slight\_smile: I am using Ansible to deploy a generic configuration on a very large network. This network has more than 1000 hosts. However, I am facing important scaling issues with templates. Somes just takes too…

---

## [How to run delegate\_to task only on one host in group with if/when condition](https://forum.ansible.com/t/how-to-run-delegate-to-task-only-on-one-host-in-group-with-if-when-condition/27949)

<div class="topic-metadata">

**Author:** [@abhijith.devaraju](https://forum.ansible.com/u/abhijith.devaraju)\
**Replies:** 6\
**Last updated:** [July 5, 2018, 7:25am UTC](https://forum.ansible.com/t/how-to-run-delegate-to-task-only-on-one-host-in-group-with-if-when-condition/27949 "2018-07-05T07:25:14Z")

</div>

Hi All, My host file looks like below where I am using specific host variables “smca\_role”. \[smca\] smca1 ansible\_host=10.66.69.194 smca\_role=True smca2 ansible\_host=10.66.69.193 smca\_role=False My playbook task look…

---

## [How to retry within a with\_items loop ?](https://forum.ansible.com/t/how-to-retry-within-a-with-items-loop/27953)

<div class="topic-metadata">

**Author:** [@JiElPe-Fr38](https://forum.ansible.com/u/JiElPe-Fr38)\
**Replies:** 0\
**Last updated:** [July 5, 2018, 7:07am UTC](https://forum.ansible.com/t/how-to-retry-within-a-with-items-loop/27953 "2018-07-05T07:07:07Z")

</div>

Hello, I have written a task that installs jenkins plugins using the jenkins\_plugin module and a list of plugins. It looks like : \` name: Install plugins jenkins\_plugin: group: “{{ jenkins\_process\_group }}” owner…

---

## [Access denied renaming windows domain joined server](https://forum.ansible.com/t/access-denied-renaming-windows-domain-joined-server/27943)

<div class="topic-metadata">

**Author:** [@Lee\_Drew](https://forum.ansible.com/u/Lee_Drew)\
**Replies:** 5\
**Last updated:** [July 4, 2018, 10:11am UTC](https://forum.ansible.com/t/access-denied-renaming-windows-domain-joined-server/27943 "2018-07-04T10:11:22Z")

</div>

I’m trying to rename a domain joined server via the following play… hosts: server tasks: name: Rename server from server1 to server2 win\_shell: | $name = $env:COMPUTERNAME if ($name -ne “server1”) { Rename-Co…

---

## [Galaxy v3.0.2 bug fix release](https://forum.ansible.com/t/galaxy-v3-0-2-bug-fix-release/27941)

<div class="topic-metadata">

**Author:** [@chousekn](https://forum.ansible.com/u/chousekn)\
**Replies:** 1\
**Last updated:** [July 4, 2018, 9:37am UTC](https://forum.ansible.com/t/galaxy-v3-0-2-bug-fix-release/27941 "2018-07-04T09:37:56Z")

</div>

Galaxy will be performing a maintenance release tomorrow morning, 4 July 2018 between 5:00 and 6:00 AM Eastern. It should be quick and painless, with no noticeable impact to users. If you’re interested, here’s a look at…

---

## [Ansible playbook should exit Immediately when it learns Incorrect sudo password is entered](https://forum.ansible.com/t/ansible-playbook-should-exit-immediately-when-it-learns-incorrect-sudo-password-is-entered/27936)

<div class="topic-metadata">

**Author:** [@abhijith.devaraju](https://forum.ansible.com/u/abhijith.devaraju)\
**Replies:** 8\
**Last updated:** [July 3, 2018, 9:03pm UTC](https://forum.ansible.com/t/ansible-playbook-should-exit-immediately-when-it-learns-incorrect-sudo-password-is-entered/27936 "2018-07-03T21:03:16Z")

</div>

Hello Everyone, I am trying to find a way to add a check where playbook will exit Immediately if incorrect sudo password is entered by a user. As of now, If incorrect password is entered ansible would execute the playbo…

---

## [Using sudosh instead of just sudo](https://forum.ansible.com/t/using-sudosh-instead-of-just-sudo/16107)

<div class="topic-metadata">

**Author:** [@Darren\_Johnson](https://forum.ansible.com/u/Darren_Johnson)\
**Replies:** 10\
**Last updated:** [July 3, 2018, 8:48pm UTC](https://forum.ansible.com/t/using-sudosh-instead-of-just-sudo/16107 "2018-07-03T20:48:56Z")

</div>

I am trying to meet a corporate requirement wherein ansible’s actions are recorded by sudosh on each server it touches. I tried changing “executable” from /bin/sh to /usr/bin/sudosh, but sudosh doesn’t have the correspon…

---

## [Facts not available when using debug module in ad-hoc mode](https://forum.ansible.com/t/facts-not-available-when-using-debug-module-in-ad-hoc-mode/27932)

<div class="topic-metadata">

**Author:** [@Kai\_Weber](https://forum.ansible.com/u/Kai_Weber)\
**Replies:** 3\
**Last updated:** [July 3, 2018, 6:12pm UTC](https://forum.ansible.com/t/facts-not-available-when-using-debug-module-in-ad-hoc-mode/27932 "2018-07-03T18:12:42Z")

</div>

Hi, I try to find an easy way to test jinja2 statments. I tried the debug module in ad-hoc mode and found that machine facts are not availabe. Is this so by design? How else can I test jinja2 statments? $ ansible -m…

---

## [Ansible loop over array](https://forum.ansible.com/t/ansible-loop-over-array/27940)

<div class="topic-metadata">

**Author:** [@Madushan\_Chathuranga](https://forum.ansible.com/u/Madushan_Chathuranga)\
**Replies:** 8\
**Last updated:** [July 3, 2018, 1:09pm UTC](https://forum.ansible.com/t/ansible-loop-over-array/27940 "2018-07-03T13:09:46Z")

</div>

Hi, Is there a way to loop over an array in ansible with a given array size. eg: I have an array with 10 elements. I want to limit the iteration only to first 5 elemets. Thanks.

---

## [at module -- doesn't schedule at a specific time?](https://forum.ansible.com/t/at-module-doesnt-schedule-at-a-specific-time/27930)

<div class="topic-metadata">

**Author:** [@erichymowitz](https://forum.ansible.com/u/erichymowitz)\
**Replies:** 3\
**Last updated:** [July 3, 2018, 11:58am UTC](https://forum.ansible.com/t/at-module-doesnt-schedule-at-a-specific-time/27930 "2018-07-03T11:58:16Z")

</div>

Greetings. I’m looking at the documentation for the at module, and as far as I can tell, the module will only schedule a job based on “now + time-delta”. Am I missing something? How can I use this module (or perhaps a …

---

## [Need to parse stdout\_lines output](https://forum.ansible.com/t/need-to-parse-stdout-lines-output/27938)

<div class="topic-metadata">

**Author:** [@Adolphson](https://forum.ansible.com/u/Adolphson)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 11:40am UTC](https://forum.ansible.com/t/need-to-parse-stdout-lines-output/27938 "2018-07-03T11:40:00Z")

</div>

I have a stdout\_lines output that I need to grab 2 lines and put into a variable. Here is the stdout\_lines output: \` “stdout\_lines”: \[ “WARNING THIS IS A PRIVATE AND PROPRIETARY SYSTEM.”, "Password: ", “Last login:…

---

## [Galaxy v3.0.1 Bug Fix Release](https://forum.ansible.com/t/galaxy-v3-0-1-bug-fix-release/27935)

<div class="topic-metadata">

**Author:** [@chousekn](https://forum.ansible.com/u/chousekn)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 9:03am UTC](https://forum.ansible.com/t/galaxy-v3-0-1-bug-fix-release/27935 "2018-07-03T09:03:13Z")

</div>

Galaxy will be performing a maintenance release tomorrow morning, 3 July 2018 between 4:00 and 5:00 AM. It should be quick and painless, with no noticeable impact to users. If you’re interested, here’s a look at bug fix…

---

## [To invoke jmx operations on a java/jboss application](https://forum.ansible.com/t/to-invoke-jmx-operations-on-a-java-jboss-application/27914)

<div class="topic-metadata">

**Author:** [@Josephsimon\_Arokiara](https://forum.ansible.com/u/Josephsimon_Arokiara)\
**Replies:** 3\
**Last updated:** [July 3, 2018, 7:34am UTC](https://forum.ansible.com/t/to-invoke-jmx-operations-on-a-java-jboss-application/27914 "2018-07-03T07:34:08Z")

</div>

Hi All, Is anyone aware of any ansible modules that could be used to invoke jmx operations on a java/jboss application? Cheers, Simon J

---

## [Ansible Galaxy Migration Wrap Up](https://forum.ansible.com/t/ansible-galaxy-migration-wrap-up/27937)

<div class="topic-metadata">

**Author:** [@Timothy\_Appnel1](https://forum.ansible.com/u/Timothy_Appnel1)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 10:42pm UTC](https://forum.ansible.com/t/ansible-galaxy-migration-wrap-up/27937 "2018-07-02T22:42:53Z")

</div>

This weekend’s migration and overhaul of Galaxy seems to have gone over reasonably well with only a few hiccups that the team has already been at work addressing. (Thanks to those of you that have already filed issues.) @…

---

## [Ansible execute code when Host is a part of of Group X](https://forum.ansible.com/t/ansible-execute-code-when-host-is-a-part-of-of-group-x/27926)

<div class="topic-metadata">

**Author:** [@VS1](https://forum.ansible.com/u/VS1)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 8:30pm UTC](https://forum.ansible.com/t/ansible-execute-code-when-host-is-a-part-of-of-group-x/27926 "2018-07-02T20:30:08Z")

</div>

Hello, I want to make a code that will execute on all my webserver but some part of my webserver i want to execute only on a specific machine from the webserver list ot when that machine is also part of group of \[mainws\]…

---

## [Inline vs template evaluation](https://forum.ansible.com/t/inline-vs-template-evaluation/27920)

<div class="topic-metadata">

**Author:** [@durist](https://forum.ansible.com/u/durist)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 6:46pm UTC](https://forum.ansible.com/t/inline-vs-template-evaluation/27920 "2018-07-02T18:46:22Z")

</div>

I’ve run into what seems like a weird inconsistency in the way templates are evaluated vs inline variables. I have a template file that contains this: {{ '{{' }}.Name{{ '}}' }} And the template is evaluated like this: …

---

## [Create windows user with temporary password](https://forum.ansible.com/t/create-windows-user-with-temporary-password/27913)

<div class="topic-metadata">

**Author:** [@Vincent\_Mercier](https://forum.ansible.com/u/Vincent_Mercier)\
**Replies:** 1\
**Last updated:** [July 2, 2018, 5:24pm UTC](https://forum.ansible.com/t/create-windows-user-with-temporary-password/27913 "2018-07-02T17:24:54Z")

</div>

Hi Ansible community, I’m wondering how to create Windows users with a temporary password. A common workflow is to create users with a temporary password, send the temporary password and force users to change their pas…

---

## [jinja2 warning when using "failed\_when" with a variable](https://forum.ansible.com/t/jinja2-warning-when-using-failed-when-with-a-variable/27895)

<div class="topic-metadata">

**Author:** [@JS11](https://forum.ansible.com/u/JS11)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 4:14pm UTC](https://forum.ansible.com/t/jinja2-warning-when-using-failed-when-with-a-variable/27895 "2018-07-02T16:14:30Z")

</div>

Hello! I have the task below, which works absolutely fine, and errors out correctly as well. However, I get a WARNING any time I run the play. (I have a variable in the failed\_when line) name: Disable App ‘{{ currentA…

---

## [Multiple Checks via single task](https://forum.ansible.com/t/multiple-checks-via-single-task/27931)

<div class="topic-metadata">

**Author:** [@Vino\_B](https://forum.ansible.com/u/Vino_B)\
**Replies:** 1\
**Last updated:** [July 2, 2018, 3:45pm UTC](https://forum.ansible.com/t/multiple-checks-via-single-task/27931 "2018-07-02T15:45:43Z")

</div>

Hi All, Request your help on how to perform the below check via a single task in ansible playbook Check whether the hostname is fully qualified domain name : hostname -f if exist then check Check the IP address of th…

---

## [Ansible logs](https://forum.ansible.com/t/ansible-logs/27929)

<div class="topic-metadata">

**Author:** [@Fatima\_Elfakih](https://forum.ansible.com/u/Fatima_Elfakih)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 2:50pm UTC](https://forum.ansible.com/t/ansible-logs/27929 "2018-07-02T14:50:16Z")

</div>

Hi, How can I disable writing logs in syslog and keep logs in stdout Thank you

---

## [ansible-galaxy looks for non-existent Python interpreter](https://forum.ansible.com/t/ansible-galaxy-looks-for-non-existent-python-interpreter/27923)

<div class="topic-metadata">

**Author:** [@Robert\_F](https://forum.ansible.com/u/Robert_F)\
**Replies:** 1\
**Last updated:** [July 2, 2018, 1:54pm UTC](https://forum.ansible.com/t/ansible-galaxy-looks-for-non-existent-python-interpreter/27923 "2018-07-02T13:54:59Z")

</div>

I’m trying to install an Ansible role using ansible-galaxy but when I run the command it looks for a version of Python on a path that doesn’t exist: -bash: /usr/local/bin/ansible-galaxy: /usr/local/opt/python/bin/python…

---

## [Why is using args from variables considered unsave?](https://forum.ansible.com/t/why-is-using-args-from-variables-considered-unsave/23989)

<div class="topic-metadata">

**Author:** [@Michal\_Czeraszkiewic](https://forum.ansible.com/u/Michal_Czeraszkiewic)\
**Replies:** 9\
**Last updated:** [July 2, 2018, 12:56pm UTC](https://forum.ansible.com/t/why-is-using-args-from-variables-considered-unsave/23989 "2018-07-02T12:56:38Z")

</div>

I’m trying out this playbook: \`

---

## [MongoDB Lookup](https://forum.ansible.com/t/mongodb-lookup/25926)

<div class="topic-metadata">

**Author:** [@Marcelo\_Oliveira](https://forum.ansible.com/u/Marcelo_Oliveira)\
**Replies:** 3\
**Last updated:** [July 2, 2018, 12:32pm UTC](https://forum.ansible.com/t/mongodb-lookup/25926 "2018-07-02T12:32:22Z")

</div>

Hello everybody, I am learning ansible through its official documentation and videos on youtube, but sadly I can’t get it working with its lookup-mongodb module as described at http://docs.ansible.com/ansible/latest/pla…

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

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