# Ansible Project

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

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

**Page:** 171

---

## [When yum succeeds, boot?](https://forum.ansible.com/t/when-yum-succeeds-boot/31065)

<div class="topic-metadata">

**Author:** [@Mike\_Eggleston](https://forum.ansible.com/u/Mike_Eggleston)\
**Replies:** 3\
**Last updated:** [August 22, 2019, 12:52pm UTC](https://forum.ansible.com/t/when-yum-succeeds-boot/31065 "2019-08-22T12:52:48Z")

</div>

I am working on a playbook that uses yum. When yum does an update of all installed packages I want to do a conditional shutdown -r. What condition do I check from the yum task succeeding? Mike

---

## [Issues with an jinja and magic variables script any help would be awesome](https://forum.ansible.com/t/issues-with-an-jinja-and-magic-variables-script-any-help-would-be-awesome/31099)

<div class="topic-metadata">

**Author:** [@S\_C\_Rigler](https://forum.ansible.com/u/S_C_Rigler)\
**Replies:** 0\
**Last updated:** [August 22, 2019, 11:53am UTC](https://forum.ansible.com/t/issues-with-an-jinja-and-magic-variables-script-any-help-would-be-awesome/31099 "2019-08-22T11:53:36Z")

</div>

I’m going to guess that you probably don’t have facts cached (or the cache has expired) for the hosts where the variable is undefined.

---

## [get indice in csv file](https://forum.ansible.com/t/get-indice-in-csv-file/31090)

<div class="topic-metadata">

**Author:** [@Karther](https://forum.ansible.com/u/Karther)\
**Replies:** 2\
**Last updated:** [August 22, 2019, 8:37am UTC](https://forum.ansible.com/t/get-indice-in-csv-file/31090 "2019-08-22T08:37:57Z")

</div>

Hey, I have on file csv “clef\_applicatives.csv” with this content : 13,my\_user,my\_host,gis 14,my\_user,my\_host,gis I have next tasks with this content : set\_fact: indice: “{{ item.split(‘,’)\[0\] }}” with\_lines: ca…

---

## [Eliminate /bin/sh -c environment from any ssh command sending.](https://forum.ansible.com/t/eliminate-bin-sh-c-environment-from-any-ssh-command-sending/31083)

<div class="topic-metadata">

**Author:** [@Tom\_Van\_de\_Velde](https://forum.ansible.com/u/Tom_Van_de_Velde)\
**Replies:** 3\
**Last updated:** [August 22, 2019, 6:11am UTC](https://forum.ansible.com/t/eliminate-bin-sh-c-environment-from-any-ssh-command-sending/31083 "2019-08-22T06:11:53Z")

</div>

Hi, I"m writing a module for Ansible, executing ssh commands on the a remote secured shell. Python is not installed and the installation is not possible. But It seams that there is always an attempt to discover the py…

---

## [Dynamic Inventory Script - Groups in Groups](https://forum.ansible.com/t/dynamic-inventory-script-groups-in-groups/31074)

<div class="topic-metadata">

**Author:** [@A\_Drew](https://forum.ansible.com/u/A_Drew)\
**Replies:** 6\
**Last updated:** [August 21, 2019, 4:41pm UTC](https://forum.ansible.com/t/dynamic-inventory-script-groups-in-groups/31074 "2019-08-21T16:41:19Z")

</div>

Hello, I am running into a problem with trying to create Dynamic Inventories via a Python Script, when the structure has Groups that belong to Groups. If I just have a list of servers in each group, I do not have any p…

---

## [Some user of ansible\_user](https://forum.ansible.com/t/some-user-of-ansible-user/31088)

<div class="topic-metadata">

**Author:** [@Karther](https://forum.ansible.com/u/Karther)\
**Replies:** 3\
**Last updated:** [August 21, 2019, 3:38pm UTC](https://forum.ansible.com/t/some-user-of-ansible-user/31088 "2019-08-21T15:38:17Z")

</div>

Hey all !! Ok thanks very much community ansible for your help !! :slight\_smile: It’s very pity that ansible not can play the same playbook on the same host with different user … Thanks very much for your help !! …

---

## [Get host name of the servers where the task failed](https://forum.ansible.com/t/get-host-name-of-the-servers-where-the-task-failed/31089)

<div class="topic-metadata">

**Author:** [@Pandu\_jh](https://forum.ansible.com/u/Pandu_jh)\
**Replies:** 1\
**Last updated:** [August 21, 2019, 2:57pm UTC](https://forum.ansible.com/t/get-host-name-of-the-servers-where-the-task-failed/31089 "2019-08-21T14:57:00Z")

</div>

I have a task in my playbook where it runs against multiple servers. I need to get the hostname of all servers where my task failed and append it to a variable as a list. Please assist how to get this.

---

## [Need Help!!!!](https://forum.ansible.com/t/need-help/31080)

<div class="topic-metadata">

**Author:** [@Jyotsna\_Mehta](https://forum.ansible.com/u/Jyotsna_Mehta)\
**Replies:** 3\
**Last updated:** [August 21, 2019, 12:40pm UTC](https://forum.ansible.com/t/need-help/31080 "2019-08-21T12:40:33Z")

</div>

Can someone help me create a playbook that restarts windows based load runner service on multiple windows servers?

---

## [Some user of ansible\_user](https://forum.ansible.com/t/some-user-of-ansible-user/31084)

<div class="topic-metadata">

**Author:** [@Mark\_Anthony\_Garcia](https://forum.ansible.com/u/Mark_Anthony_Garcia)\
**Replies:** 2\
**Last updated:** [August 21, 2019, 11:42am UTC](https://forum.ansible.com/t/some-user-of-ansible-user/31084 "2019-08-21T11:42:53Z")

</div>

For me I use the local users from the ansible controllers by calling the “{{ lookup(‘env’,‘USER’) }}”.

---

## [WINRM](https://forum.ansible.com/t/winrm/31085)

<div class="topic-metadata">

**Author:** [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Replies:** 2\
**Last updated:** [August 21, 2019, 10:20am UTC](https://forum.ansible.com/t/winrm/31085 "2019-08-21T10:20:21Z")

</div>

Hi, I am working on automation using ansible where in I need to connect to remote window server and install NT service . Please help me for the correct playbook as I have installed Winrm on window and connectivity is wo…

---

## [Some user of ansible\_user](https://forum.ansible.com/t/some-user-of-ansible-user/31082)

<div class="topic-metadata">

**Author:** [@Zolvaring](https://forum.ansible.com/u/Zolvaring)\
**Replies:** 3\
**Last updated:** [August 21, 2019, 10:12am UTC](https://forum.ansible.com/t/some-user-of-ansible-user/31082 "2019-08-21T10:12:45Z")

</div>

I'm confused what you want to do when you use a second user. If you want fallback users, I don't know of a simple built in way but have gotten it to work looping user/pass /key combos with gather facts or a shell "sudo -…

---

## [yum history](https://forum.ansible.com/t/yum-history/31081)

<div class="topic-metadata">

**Author:** [@Amos](https://forum.ansible.com/u/Amos)\
**Replies:** 0\
**Last updated:** [August 20, 2019, 8:35pm UTC](https://forum.ansible.com/t/yum-history/31081 "2019-08-20T20:35:06Z")

</div>

So, in bash I can get some info from ‘yum history’. Get the last ‘yum update’: yum history | grep Update | head -1 Get the very last call to yum: yum history | awk ‘/^----/{ n=NR+1 }n && n\<=NR && NR\<(n+1){ print }’ H…

---

## [execute one task of a playbook locally and the rest on the remote hosts?](https://forum.ansible.com/t/execute-one-task-of-a-playbook-locally-and-the-rest-on-the-remote-hosts/31077)

<div class="topic-metadata">

**Author:** [@Mike\_Eggleston](https://forum.ansible.com/u/Mike_Eggleston)\
**Replies:** 4\
**Last updated:** [August 20, 2019, 4:29pm UTC](https://forum.ansible.com/t/execute-one-task-of-a-playbook-locally-and-the-rest-on-the-remote-hosts/31077 "2019-08-20T16:29:56Z")

</div>

I’m working on a playbook to deploy an internal application to internal hosts. This application is delivered by development to QA in a \*.tar.gz file. The file is staged and deployed to QA (by me) in that \*.tar.gz file. W…

---

## [rksh does not allow me to run /bin/sh -c so ansible failes](https://forum.ansible.com/t/rksh-does-not-allow-me-to-run-bin-sh-c-so-ansible-failes/31078)

<div class="topic-metadata">

**Author:** [@Tom\_Van\_de\_Velde](https://forum.ansible.com/u/Tom_Van_de_Velde)\
**Replies:** 0\
**Last updated:** [August 20, 2019, 4:26pm UTC](https://forum.ansible.com/t/rksh-does-not-allow-me-to-run-bin-sh-c-so-ansible-failes/31078 "2019-08-20T16:26:36Z")

</div>

Hi, I want to use Ansible to a target using an ssh connection and a restricted shell… I have setup gather\_facts: false in my playbook, but even then Ansible is trying to guess the discovered\_interpreter\_python and retu…

---

## [Problem with get indice in file](https://forum.ansible.com/t/problem-with-get-indice-in-file/31076)

<div class="topic-metadata">

**Author:** [@Karther](https://forum.ansible.com/u/Karther)\
**Replies:** 4\
**Last updated:** [August 20, 2019, 2:32pm UTC](https://forum.ansible.com/t/problem-with-get-indice-in-file/31076 "2019-08-20T14:32:08Z")

</div>

Hey ! I have strange problem : I have on file “clef\_applicatives.csv” with this content : 2,user1,host1,clef1 7,user3,host2,clef5 6,user4,host4,clef6 42,user5,host5,clef7 23,user6,host8,clef8 3,user7,host3,clef9 …

---

## [best practices re ansible-playbook inventories and group\_vars](https://forum.ansible.com/t/best-practices-re-ansible-playbook-inventories-and-group-vars/31063)

<div class="topic-metadata">

**Author:** [@Jim\_Robinson](https://forum.ansible.com/u/Jim_Robinson)\
**Replies:** 1\
**Last updated:** [August 20, 2019, 2:31pm UTC](https://forum.ansible.com/t/best-practices-re-ansible-playbook-inventories-and-group-vars/31063 "2019-08-20T14:31:30Z")

</div>

Folks, I’d like to get some feedback from the experts here about the proper way to lay out inventory group\_vars. When ansible was set up in my organization the developer decided to split inventory into two groups, devq…

---

## [win\_dsc UrlAcl and passing int\[\]](https://forum.ansible.com/t/win-dsc-urlacl-and-passing-int/30970)

<div class="topic-metadata">

**Author:** [@Richard\_Payne](https://forum.ansible.com/u/Richard_Payne)\
**Replies:** 10\
**Last updated:** [August 20, 2019, 12:10pm UTC](https://forum.ansible.com/t/win-dsc-urlacl-and-passing-int/30970 "2019-08-20T12:10:53Z")

</div>

I’m trying to integrate my existing DSC configuration into my Ansible setup. I’m using the UrlAcl module (https://www.powershellgallery.com/packages/HttpSys/1.0.1/Content/UrlAcls%5CUrlAcls.ps1) and its Port property is a…

---

## [yum interpreter line missing](https://forum.ansible.com/t/yum-interpreter-line-missing/31075)

<div class="topic-metadata">

**Author:** [@Mike\_Eggleston](https://forum.ansible.com/u/Mike_Eggleston)\
**Replies:** 0\
**Last updated:** [August 19, 2019, 8:44pm UTC](https://forum.ansible.com/t/yum-interpreter-line-missing/31075 "2019-08-19T20:44:35Z")

</div>

Jonathan made me understand how my previous “can’t connect to a server” was wrong in my head. Now my next issue. I’m writing a little playbooks that will eventually go into a “provisioning” playbook to make all my boxes…

---

## [Can’t reach a server?](https://forum.ansible.com/t/can-t-reach-a-server/31071)

<div class="topic-metadata">

**Author:** [@Mike\_Eggleston](https://forum.ansible.com/u/Mike_Eggleston)\
**Replies:** 20\
**Last updated:** [August 19, 2019, 7:07pm UTC](https://forum.ansible.com/t/can-t-reach-a-server/31071 "2019-08-19T19:07:54Z")

</div>

What’s happening here? I can reach the server over ssh, but ansible can’t? I’m testing a provisioning play. I can ssh into the box with “ssh root@box” but the command “ansible-playbook -vvv -u root -k —limit box yum.yml”…

---

## [Do a variable defined in vars/main.yml will be evaluated in defaults/main.yml?](https://forum.ansible.com/t/do-a-variable-defined-in-vars-main-yml-will-be-evaluated-in-defaults-main-yml/31072)

<div class="topic-metadata">

**Author:** [@Omkar](https://forum.ansible.com/u/Omkar)\
**Replies:** 1\
**Last updated:** [August 19, 2019, 3:23pm UTC](https://forum.ansible.com/t/do-a-variable-defined-in-vars-main-yml-will-be-evaluated-in-defaults-main-yml/31072 "2019-08-19T15:23:59Z")

</div>

Hello, I have a question, I want 2 use a URL that has to be dynamically generated. I will be providing the version as a variable to the URL. So here’s what I am doing. I have the url variable defined in defaults/main…

---

## [Merging a list of dicts with another list of dicts](https://forum.ansible.com/t/merging-a-list-of-dicts-with-another-list-of-dicts/31057)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 1\
**Last updated:** [August 19, 2019, 12:50pm UTC](https://forum.ansible.com/t/merging-a-list-of-dicts-with-another-list-of-dicts/31057 "2019-08-19T12:50:32Z")

</div>

Hi I have a role for managing user accounts, which accepts a list of dicts to configure those, for example: default\_users: name: bob comment: Bob Morton state: present name: dick comment: Dick Jones state: presen…

---

## [Getting Runtime error “obj must be a list of dicts or a nested dict” using with\_items](https://forum.ansible.com/t/getting-runtime-error-obj-must-be-a-list-of-dicts-or-a-nested-dict-using-with-items/31064)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 1\
**Last updated:** [August 19, 2019, 12:27pm UTC](https://forum.ansible.com/t/getting-runtime-error-obj-must-be-a-list-of-dicts-or-a-nested-dict-using-with-items/31064 "2019-08-19T12:27:59Z")

</div>

I need to search a string “TicketID” in .db files under a directory. If found my playbook should fail. Below is my playbook for the same, however I’m getting runtime error “using with\_items” Output: TASK \[Search for …

---

## [best way to wait for AWS metadata to resolve?](https://forum.ansible.com/t/best-way-to-wait-for-aws-metadata-to-resolve/31067)

<div class="topic-metadata">

**Author:** [@Jim\_Robinson](https://forum.ansible.com/u/Jim_Robinson)\
**Replies:** 3\
**Last updated:** [August 19, 2019, 11:50am UTC](https://forum.ansible.com/t/best-way-to-wait-for-aws-metadata-to-resolve/31067 "2019-08-19T11:50:00Z")

</div>

I’m not sure whether this is something ansible can do out of the box or not. I am looking for a way to pause execution of a playbook until certain pieces of metadata become available from AWS. Basically I’m starting an…

---

## [Trying to connect master host Ansible to target HP-UX 11.31 ia64 server](https://forum.ansible.com/t/trying-to-connect-master-host-ansible-to-target-hp-ux-11-31-ia64-server/31066)

<div class="topic-metadata">

**Author:** [@user70](https://forum.ansible.com/u/user70)\
**Replies:** 5\
**Last updated:** [August 18, 2019, 8:37pm UTC](https://forum.ansible.com/t/trying-to-connect-master-host-ansible-to-target-hp-ux-11-31-ia64-server/31066 "2019-08-18T20:37:32Z")

</div>

Hi! After tuning connect from master ansible server to target HP-UX server (HP-UX 11.31 ia64 server with installed Python 2.7.16) by SSH (ssh HPUX - without password), i try a test: ssh hp-ux (get connected without pa…

---

## ["PUTTING" or  http PUT interacting with JFrog Artifactory](https://forum.ansible.com/t/putting-or-http-put-interacting-with-jfrog-artifactory/31060)

<div class="topic-metadata">

**Author:** [@GM1](https://forum.ansible.com/u/GM1)\
**Replies:** 3\
**Last updated:** [August 18, 2019, 6:06pm UTC](https://forum.ansible.com/t/putting-or-http-put-interacting-with-jfrog-artifactory/31060 "2019-08-18T18:06:33Z")

</div>

Hey everyone - if I was going to use an Ansible module to push or PUT a file into say JFrog Artfactory, using an API key, which of the Ansible modules would be best? I have looked at the uri module and the net\_put but th…

---

## [Ansible iterate from file and populate template](https://forum.ansible.com/t/ansible-iterate-from-file-and-populate-template/30561)

<div class="topic-metadata">

**Author:** [@Nicola\_Contu](https://forum.ansible.com/u/Nicola_Contu)\
**Replies:** 5\
**Last updated:** [August 16, 2019, 8:37pm UTC](https://forum.ansible.com/t/ansible-iterate-from-file-and-populate-template/30561 "2019-08-16T20:37:43Z")

</div>

Hello, I have a template with few variables to be populated, then I am shipping that template populated to a another server. Here is my playbook : hosts: dev become: yes become\_method: sudo vars: username: “{{ us…

---

## [Module yum and package?](https://forum.ansible.com/t/module-yum-and-package/31062)

<div class="topic-metadata">

**Author:** [@Mike\_Eggleston](https://forum.ansible.com/u/Mike_Eggleston)\
**Replies:** 1\
**Last updated:** [August 16, 2019, 7:11pm UTC](https://forum.ansible.com/t/module-yum-and-package/31062 "2019-08-16T19:11:31Z")

</div>

Yum says it will do a wild card on the update (equivalent to “yum update”). Will the module “package” also do a wildcard? Mike

---

## [What is the best way to manage machines that aren't defined as hosts?](https://forum.ansible.com/t/what-is-the-best-way-to-manage-machines-that-arent-defined-as-hosts/31056)

<div class="topic-metadata">

**Author:** [@Kurt\_Robinson](https://forum.ansible.com/u/Kurt_Robinson)\
**Replies:** 4\
**Last updated:** [August 16, 2019, 3:45pm UTC](https://forum.ansible.com/t/what-is-the-best-way-to-manage-machines-that-arent-defined-as-hosts/31056 "2019-08-16T15:45:59Z")

</div>

I intend to Ansible to run deployment configuration on a number of Dell ESXi hosts in VMware using VMware and OpenManage modules. In my past ansible training, my playbooks have always run from hosts that I have defined …

---

## [SSH to Oracle SBC](https://forum.ansible.com/t/ssh-to-oracle-sbc/31022)

<div class="topic-metadata">

**Author:** [@suriravi2002](https://forum.ansible.com/u/suriravi2002)\
**Replies:** 4\
**Last updated:** [August 16, 2019, 1:10pm UTC](https://forum.ansible.com/t/ssh-to-oracle-sbc/31022 "2019-08-16T13:10:08Z")

</div>

Hi All, I am a beginner to Ansible . I tried to connect to Oracle SBC using below command ash is failing .But it is successful to normal Linux remote hosts. Ansible 10.x.x.x -i inventory -u admin -m ping -k -vvv Outpu…

---

## [Confused newbie - ERROR! the field 'hosts' is required but was not set](https://forum.ansible.com/t/confused-newbie-error-the-field-hosts-is-required-but-was-not-set/31054)

<div class="topic-metadata">

**Author:** [@GM1](https://forum.ansible.com/u/GM1)\
**Replies:** 3\
**Last updated:** [August 16, 2019, 11:33am UTC](https://forum.ansible.com/t/confused-newbie-error-the-field-hosts-is-required-but-was-not-set/31054 "2019-08-16T11:33:44Z")

</div>

Hi there - first I will post my response from when I run my playbook: ansible-playbook -vv glen.yml ansible-playbook 2.5.2 config file = /etc/ansible/ansible.cfg configured module search path = \[u’/home/gmillard/.ans…

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

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