# Ansible Project

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

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

**Page:** 205

---

## [Appending a line in a file](https://forum.ansible.com/t/appending-a-line-in-a-file/29769)

<div class="topic-metadata">

**Author:** [@lpescatore](https://forum.ansible.com/u/lpescatore)\
**Replies:** 8\
**Last updated:** [February 26, 2019, 8:51am UTC](https://forum.ansible.com/t/appending-a-line-in-a-file/29769 "2019-02-26T08:51:35Z")

</div>

Hi, I want to add some stuff to my /etc/hosts file. For instance, if my /etc/hosts says “server.corp”, I want to append that in all my machines to where it says “server.corp.company.com”. Then I want it to save. What …

---

## [error run shell script for start service jboss](https://forum.ansible.com/t/error-run-shell-script-for-start-service-jboss/29748)

<div class="topic-metadata">

**Author:** [@Jhon\_J\_Castro\_H](https://forum.ansible.com/u/Jhon_J_Castro_H)\
**Replies:** 2\
**Last updated:** [February 25, 2019, 8:10pm UTC](https://forum.ansible.com/t/error-run-shell-script-for-start-service-jboss/29748 "2019-02-25T20:10:14Z")

</div>

PLAYBOOK: hosts: all gather\_facts: yes remote\_user: root become: yes tasks: name: Inicializa Servicio JBOSS 1.1 shell: sh /home/jboss/jboss-6.4/bin/standalone.sh ignore\_errors: yes name: Inicializa Servici…

---

## [Help with ansible local\_action with\_items and debug](https://forum.ansible.com/t/help-with-ansible-local-action-with-items-and-debug/29768)

<div class="topic-metadata">

**Author:** [@Rogerio\_Ceni\_Coelho](https://forum.ansible.com/u/Rogerio_Ceni_Coelho)\
**Replies:** 0\
**Last updated:** [February 25, 2019, 7:58pm UTC](https://forum.ansible.com/t/help-with-ansible-local-action-with-items-and-debug/29768 "2019-02-25T19:58:32Z")

</div>

Hi Ansible Jedi´s !!! I need some help with this example running a local\_action. This playbook returns only debug information for the last item on local\_action. What are the right way to print debug for all items ??? …

---

## [Ansible Failed Authentication](https://forum.ansible.com/t/ansible-failed-authentication/29750)

<div class="topic-metadata">

**Author:** [@VeGeTa-X](https://forum.ansible.com/u/VeGeTa-X)\
**Replies:** 7\
**Last updated:** [February 25, 2019, 7:22pm UTC](https://forum.ansible.com/t/ansible-failed-authentication/29750 "2019-02-25T19:22:30Z")

</div>

I am starting out at ansible with a basic playbook to learn ansible I am getting the error message below I know the user and creds are correct I have logged into that switch from ansible server can someone please let me…

---

## [How can I loop over all hosts in a group in this playbook?](https://forum.ansible.com/t/how-can-i-loop-over-all-hosts-in-a-group-in-this-playbook/15950)

<div class="topic-metadata">

**Author:** [@Abe\_Voelker](https://forum.ansible.com/u/Abe_Voelker)\
**Replies:** 6\
**Last updated:** [February 25, 2019, 5:32pm UTC](https://forum.ansible.com/t/how-can-i-loop-over-all-hosts-in-a-group-in-this-playbook/15950 "2019-02-25T17:32:29Z")

</div>

I have an inventory file like this: \` \[webservers\] 10.0.0.1 10.0.0.2 10.0.0.3 \[postgresservers\] 10.0.0.4 \` And I’m trying to run this playbook against my Postgres host: \`

---

## [Unable to connect via jump-server. Do not understand why control socket is missing](https://forum.ansible.com/t/unable-to-connect-via-jump-server-do-not-understand-why-control-socket-is-missing/29766)

<div class="topic-metadata">

**Author:** [@myprogramingnotes](https://forum.ansible.com/u/myprogramingnotes)\
**Replies:** 0\
**Last updated:** [February 25, 2019, 4:26pm UTC](https://forum.ansible.com/t/unable-to-connect-via-jump-server-do-not-understand-why-control-socket-is-missing/29766 "2019-02-25T16:26:26Z")

</div>

According to the docs setting ProxyCommand in ansible\_ssh\_command\_args will enable access to private servers via a jump server. I am attempting to do this but keeping the error Control socket “/Users/pnotes/.ansible/cp/…

---

## [network-engine - parser problem](https://forum.ansible.com/t/network-engine-parser-problem/29740)

<div class="topic-metadata">

**Author:** [@andybourges](https://forum.ansible.com/u/andybourges)\
**Replies:** 3\
**Last updated:** [February 25, 2019, 3:35pm UTC](https://forum.ansible.com/t/network-engine-parser-problem/29740 "2019-02-25T15:35:41Z")

</div>

Hi, …I’m currently having a look at network-engine and so far it looks really promising! Seems like the best solution for network automation there is today :slight\_smile: However, I’m having trouble parsing a certain co…

---

## [with blockinfile module, I'm looking for option to check the entries whether its present or not! if not then entries have to be added by play.](https://forum.ansible.com/t/with-blockinfile-module-im-looking-for-option-to-check-the-entries-whether-its-present-or-not-if-not-then-entries-have-to-be-added-by-play/29762)

<div class="topic-metadata">

**Author:** [@Deepan\_M](https://forum.ansible.com/u/Deepan_M)\
**Replies:** 2\
**Last updated:** [February 25, 2019, 3:19pm UTC](https://forum.ansible.com/t/with-blockinfile-module-im-looking-for-option-to-check-the-entries-whether-its-present-or-not-if-not-then-entries-have-to-be-added-by-play/29762 "2019-02-25T15:19:02Z")

</div>

Hello, Can someone please help to solve my request? with blockinfile module, I’m looking for option to check the entries whether its present or not! if not then entries have to be added by play. As per below my playbo…

---

## [How can i resolve dependencies for ansible 2.7 rpm install](https://forum.ansible.com/t/how-can-i-resolve-dependencies-for-ansible-2-7-rpm-install/29764)

<div class="topic-metadata">

**Author:** [@Bharath\_Kumar\_Gajjel](https://forum.ansible.com/u/Bharath_Kumar_Gajjel)\
**Replies:** 0\
**Last updated:** [February 25, 2019, 3:13pm UTC](https://forum.ansible.com/t/how-can-i-resolve-dependencies-for-ansible-2-7-rpm-install/29764 "2019-02-25T15:13:24Z")

</div>

Hello, Iam installing ansible 2.7 on rhel6,python 2.6 and i got below error. rpm -ivh ansible-2.7.7-1.el6.ans.noarch.rpm warning: ansible-2.7.7-1.el6.ans.noarch.rpm: Header V4 RSA/SHA1 Signature, NOKEY error: Failed …

---

## [Use a variable from another host's variables](https://forum.ansible.com/t/use-a-variable-from-another-hosts-variables/29754)

<div class="topic-metadata">

**Author:** [@adsquaired](https://forum.ansible.com/u/adsquaired)\
**Replies:** 3\
**Last updated:** [February 25, 2019, 2:02pm UTC](https://forum.ansible.com/t/use-a-variable-from-another-hosts-variables/29754 "2019-02-25T14:02:22Z")

</div>

Hello all, I have an inventory file populated with two hosts and I would like to use the value of host B’s variable on host A. I had no luck with using hostvars in the template. Example inventory file. Note this will b…

---

## [Dealing with non-fixed length lists of variables](https://forum.ansible.com/t/dealing-with-non-fixed-length-lists-of-variables/29760)

<div class="topic-metadata">

**Author:** [@JonTheNiceGuy](https://forum.ansible.com/u/JonTheNiceGuy)\
**Replies:** 0\
**Last updated:** [February 25, 2019, 11:59am UTC](https://forum.ansible.com/t/dealing-with-non-fixed-length-lists-of-variables/29760 "2019-02-25T11:59:52Z")

</div>

Why not structure your data like this:

---

## [Ansible, CyberArk, root and SSH](https://forum.ansible.com/t/ansible-cyberark-root-and-ssh/29756)

<div class="topic-metadata">

**Author:** [@imanuel.greenfeld1](https://forum.ansible.com/u/imanuel.greenfeld1)\
**Replies:** 1\
**Last updated:** [February 24, 2019, 7:33pm UTC](https://forum.ansible.com/t/ansible-cyberark-root-and-ssh/29756 "2019-02-24T19:33:45Z")

</div>

Hello We have Ansible in our organisation which deploys software across our Development servers. IT Security recently CyberArk’d each of the Development servers and now Ansible cannot log into each of the machines (not…

---

## [Ansible Dynamic Inventory for Azure](https://forum.ansible.com/t/ansible-dynamic-inventory-for-azure/29757)

<div class="topic-metadata">

**Author:** [@Ameya\_Agashe](https://forum.ansible.com/u/Ameya_Agashe)\
**Replies:** 1\
**Last updated:** [February 24, 2019, 7:19pm UTC](https://forum.ansible.com/t/ansible-dynamic-inventory-for-azure/29757 "2019-02-24T19:19:13Z")

</div>

Hi Guys, I am trying to play around with Ansible dynamic inventory to get software installed/perform configuration management. I have executed instructions as given by Microsoft here: https://docs.microsoft.com/en-us/a…

---

## [Execute eval from shell module to set up environment variables](https://forum.ansible.com/t/execute-eval-from-shell-module-to-set-up-environment-variables/29695)

<div class="topic-metadata">

**Author:** [@user116](https://forum.ansible.com/u/user116)\
**Replies:** 3\
**Last updated:** [February 24, 2019, 6:54pm UTC](https://forum.ansible.com/t/execute-eval-from-shell-module-to-set-up-environment-variables/29695 "2019-02-24T18:54:38Z")

</div>

Is it possible to execute eval command from a shell module to set up environment variables ? This is a snippet from a playbook which tries to set up environment variables by executing eval command \` eval $(docker-mach…

---

## [nested loop](https://forum.ansible.com/t/nested-loop/29759)

<div class="topic-metadata">

**Author:** [@Luca\_Cazzaniga](https://forum.ansible.com/u/Luca_Cazzaniga)\
**Replies:** 0\
**Last updated:** [February 24, 2019, 6:49pm UTC](https://forum.ansible.com/t/nested-loop/29759 "2019-02-24T18:49:35Z")

</div>

hi all, is there a way to make nested loop without using include\_tasks I know it's possible to use with\_nested, but how convert this manual example to use only one file? ##################### # main.yml ###############…

---

## [Ansible connection chroot on remote target](https://forum.ansible.com/t/ansible-connection-chroot-on-remote-target/29758)

<div class="topic-metadata">

**Author:** [@Chiku](https://forum.ansible.com/u/Chiku)\
**Replies:** 0\
**Last updated:** [February 24, 2019, 10:40am UTC](https://forum.ansible.com/t/ansible-connection-chroot-on-remote-target/29758 "2019-02-24T10:40:03Z")

</div>

Hello, In documentation, I see there is chroot connection type, but it looks like for local target only. How can run ansible tasks in a chroot on remote target? Thank you.

---

## [Using include\_tasks with the same file several times inside a role](https://forum.ansible.com/t/using-include-tasks-with-the-same-file-several-times-inside-a-role/29753)

<div class="topic-metadata">

**Author:** [@Paulo\_Silva](https://forum.ansible.com/u/Paulo_Silva)\
**Replies:** 3\
**Last updated:** [February 23, 2019, 10:20pm UTC](https://forum.ansible.com/t/using-include-tasks-with-the-same-file-several-times-inside-a-role/29753 "2019-02-23T22:20:19Z")

</div>

Hi, Is it possible do to something like this inside a role? name: task with var1 include\_tasks: external.yaml vars: my\_var=var1 name task with var2 include\_tasks: external.yaml vars: my\_var=var2 I’m no ge…

---

## [How can i handle ADFS in between Ansible and ServiceNow Portal to Create, Update Snow tickets?](https://forum.ansible.com/t/how-can-i-handle-adfs-in-between-ansible-and-servicenow-portal-to-create-update-snow-tickets/29107)

<div class="topic-metadata">

**Author:** [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Replies:** 1\
**Last updated:** [February 23, 2019, 7:56pm UTC](https://forum.ansible.com/t/how-can-i-handle-adfs-in-between-ansible-and-servicenow-portal-to-create-update-snow-tickets/29107 "2019-02-23T19:56:24Z")

</div>

I was trying to using snow modules (https://docs.ansible.com/ansible/2.7/modules/snow\_record\_module.html). This works for a normal snow instance where there is no ADFS in between. However, in our organization, we have AD…

---

## [Ansible and purged resources](https://forum.ansible.com/t/ansible-and-purged-resources/29755)

<div class="topic-metadata">

**Author:** [@Klaus\_Ethgen](https://forum.ansible.com/u/Klaus_Ethgen)\
**Replies:** 0\
**Last updated:** [February 23, 2019, 6:37pm UTC](https://forum.ansible.com/t/ansible-and-purged-resources/29755 "2019-02-23T18:37:31Z")

</div>

Hi Folks, I have used many configuration management systems in the past. One of the greatest features was the purge value for resources in puppet that removes all \_unmanaged\_ resources of the type (file, user, ssh-Key…

---

## [Ansible Playbook](https://forum.ansible.com/t/ansible-playbook/29752)

<div class="topic-metadata">

**Author:** [@BHARATHI\_DURAI\_RAJ](https://forum.ansible.com/u/BHARATHI_DURAI_RAJ)\
**Replies:** 0\
**Last updated:** [February 23, 2019, 2:29pm UTC](https://forum.ansible.com/t/ansible-playbook/29752 "2019-02-23T14:29:29Z")

</div>

Can you please help me on correcting the below playbook… name: Delete Project uri: url: “https://dev.azure.com/{{ org }}/\_apis/projects?api-version=4.1” method: DELETE user: “{{ vsts\_user }}” password: “{{ pattoke…

---

## [why i cannot remove this file /etc/yum.repos.d/redhat-rhui,repo even with the root permission.](https://forum.ansible.com/t/why-i-cannot-remove-this-file-etc-yum-repos-d-redhat-rhui-repo-even-with-the-root-permission/29751)

<div class="topic-metadata">

**Author:** [@Jason\_Yu](https://forum.ansible.com/u/Jason_Yu)\
**Replies:** 2\
**Last updated:** [February 23, 2019, 5:21am UTC](https://forum.ansible.com/t/why-i-cannot-remove-this-file-etc-yum-repos-d-redhat-rhui-repo-even-with-the-root-permission/29751 "2019-02-23T05:21:06Z")

</div>

Dear Ansible Gurus and friends: I have the following ansible script to remove the default AWS repos on an new created RHEL ec2 instance from Packer. It works well untill the “Remove AWS RHUI repos” module. For some rea…

---

## [ansible error fpr sudo user](https://forum.ansible.com/t/ansible-error-fpr-sudo-user/29743)

<div class="topic-metadata">

**Author:** [@Vivek1](https://forum.ansible.com/u/Vivek1)\
**Replies:** 16\
**Last updated:** [February 22, 2019, 6:09pm UTC](https://forum.ansible.com/t/ansible-error-fpr-sudo-user/29743 "2019-02-22T18:09:28Z")

</div>

Hello Experts, I had a working playbook in my test environment, where my user was root user itslef and didnt have any issue. When i moved my playbook to staging environment , there my login user account is “admin” whic…

---

## [Dropping Fedora rpms from https://releases.ansible.com/](https://forum.ansible.com/t/dropping-fedora-rpms-from-https-releases-ansible-com/29702)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 1\
**Last updated:** [February 22, 2019, 5:26pm UTC](https://forum.ansible.com/t/dropping-fedora-rpms-from-https-releases-ansible-com/29702 "2019-02-22T17:26:42Z")

</div>

Hey all, Recently we had a discussion internally about whether to build upstream Ansible rpms on Fedora 29 using Python3 or Python2. This lead to a question about how useful the Fedora rpms Ansible releases on https…

---

## [mangling include\_role path](https://forum.ansible.com/t/mangling-include-role-path/29737)

<div class="topic-metadata">

**Author:** [@Dimon](https://forum.ansible.com/u/Dimon)\
**Replies:** 1\
**Last updated:** [February 22, 2019, 5:08pm UTC](https://forum.ansible.com/t/mangling-include-role-path/29737 "2019-02-22T17:08:10Z")

</div>

I’ve set up a playbook that includes another playbook located under ‘a/b/c’ subdirectory. From that included playbook I do ‘include\_role’ which fails since role is located at top level and not the sub-playbook level. Wha…

---

## [win\_package and check\_mode](https://forum.ansible.com/t/win-package-and-check-mode/29747)

<div class="topic-metadata">

**Author:** [@Igor\_Turovsky](https://forum.ansible.com/u/Igor_Turovsky)\
**Replies:** 0\
**Last updated:** [February 22, 2019, 4:40pm UTC](https://forum.ansible.com/t/win-package-and-check-mode/29747 "2019-02-22T16:40:35Z")

</div>

Hello, I have a question about running win\_package in check\_mode. My playbook (part of it): name: Copy Splunk Forwarder MSI win\_copy: src: “{{ splunk\_forwarder\_distro }}” dest: “{{ splunk\_forwarder\_distro\_local }…

---

## [Mahalakshmi HD digital set top box Kurnool | Mahalakshmidigital](https://forum.ansible.com/t/mahalakshmi-hd-digital-set-top-box-kurnool-mahalakshmidigital/29741)

<div class="topic-metadata">

**Author:** [@yavarishras916](https://forum.ansible.com/u/yavarishras916)\
**Replies:** 0\
**Last updated:** [February 22, 2019, 11:33am UTC](https://forum.ansible.com/t/mahalakshmi-hd-digital-set-top-box-kurnool-mahalakshmidigital/29741 "2019-02-22T11:33:02Z")

</div>

Mahalakshmi digital set-top box offers great picture quality, incredibly vivid colors, sharper images, and stunning surround sound, MLC HD takes TV viewing to a whole new level. Visit for more Info: http://mahalakshm…

---

## [Ansible fork and serial relationship?](https://forum.ansible.com/t/ansible-fork-and-serial-relationship/29739)

<div class="topic-metadata">

**Author:** [@leerin](https://forum.ansible.com/u/leerin)\
**Replies:** 0\
**Last updated:** [February 22, 2019, 2:54am UTC](https://forum.ansible.com/t/ansible-fork-and-serial-relationship/29739 "2019-02-22T02:54:50Z")

</div>

Hi experts, I found one interesting thing about ansible fork and serial. But don’t know what is the exact relationship between these two values. Following is the result of my testing: 21 VMs fork=10, serial=100%, an…

---

## [Ansible 2.7.8, 2.6.14, and 2.5.15](https://forum.ansible.com/t/ansible-2-7-8-2-6-14-and-2-5-15/29736)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [February 21, 2019, 10:01pm UTC](https://forum.ansible.com/t/ansible-2-7-8-2-6-14-and-2-5-15/29736 "2019-02-21T22:01:09Z")

</div>

Hi all- we're happy to announce that the general release of Ansible 2.7.8, Ansible 2.6.14, and Ansible 2.5.15 are now ready to be installed. How do you get it?

---

## [netconf\_config - Viptela](https://forum.ansible.com/t/netconf-config-viptela/29734)

<div class="topic-metadata">

**Author:** [@robbiee.dwyer](https://forum.ansible.com/u/robbiee.dwyer)\
**Replies:** 4\
**Last updated:** [February 21, 2019, 4:14pm UTC](https://forum.ansible.com/t/netconf-config-viptela/29734 "2019-02-21T16:14:41Z")

</div>

Hello, I am trying to use netconf\_config module on vEdge 18.3 without success.

---

## [\`dig\` module through nested list](https://forum.ansible.com/t/dig-module-through-nested-list/29735)

<div class="topic-metadata">

**Author:** [@Ashok1](https://forum.ansible.com/u/Ashok1)\
**Replies:** 0\
**Last updated:** [February 21, 2019, 4:13pm UTC](https://forum.ansible.com/t/dig-module-through-nested-list/29735 "2019-02-21T16:13:56Z")

</div>

Hi all, I have a data-structure like the below that consists of few internal hostnames. client\_groups: apache-servers: apa01-pco.web.vpn apa02-pco.web.vpn apa03-pco.web.vpn mailout: mo11-pco.mail.vpn mo12-pco.mai…

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

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