# Ansible Project

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

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

**Page:** 278

---

## [Iterate through group of variables](https://forum.ansible.com/t/iterate-through-group-of-variables/26879)

<div class="topic-metadata">

**Author:** [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Replies:** 0\
**Last updated:** [March 1, 2018, 8:05pm UTC](https://forum.ansible.com/t/iterate-through-group-of-variables/26879 "2018-03-01T20:05:31Z")

</div>

What are you trying to do? groups\[item.port|string\] will try to find a inventory group called 900 but that doesn't exist.

---

## [include\_role with\_sequence - why it runs all possible variants on all hosts?](https://forum.ansible.com/t/include-role-with-sequence-why-it-runs-all-possible-variants-on-all-hosts/26878)

<div class="topic-metadata">

**Author:** [@Jiri\_Novak](https://forum.ansible.com/u/Jiri_Novak)\
**Replies:** 0\
**Last updated:** [March 1, 2018, 6:32pm UTC](https://forum.ansible.com/t/include-role-with-sequence-why-it-runs-all-possible-variants-on-all-hosts/26878 "2018-03-01T18:32:42Z")

</div>

Hi, I’ve stumbled upon strange behviour, any ideas what am I doing wrong? let’s say I have variables like this: hosts: hostnameA.tld: min\_id: 0 max\_id: 5 hostnameB.tld: min\_id: 6 max\_id: 11 and then if I use th…

---

## [Trying to compare shared and client schema versions and upgrade client schema, if condition satisfies in Ansible using nested loops?](https://forum.ansible.com/t/trying-to-compare-shared-and-client-schema-versions-and-upgrade-client-schema-if-condition-satisfies-in-ansible-using-nested-loops/26877)

<div class="topic-metadata">

**Author:** [@Raj5](https://forum.ansible.com/u/Raj5)\
**Replies:** 0\
**Last updated:** [March 1, 2018, 3:13pm UTC](https://forum.ansible.com/t/trying-to-compare-shared-and-client-schema-versions-and-upgrade-client-schema-if-condition-satisfies-in-ansible-using-nested-loops/26877 "2018-03-01T15:13:06Z")

</div>

I am trying to write an ansible nested loop condition to do the schema upgrade based on if the version matches between shared schema and client schema. Here is what my play book doing. Logs in to Shared Schema DB and …

---

## [Is it possible to avoid aborting a play if all hosts in a serial batch fail?](https://forum.ansible.com/t/is-it-possible-to-avoid-aborting-a-play-if-all-hosts-in-a-serial-batch-fail/26870)

<div class="topic-metadata">

**Author:** [@Daniel\_Heffner](https://forum.ansible.com/u/Daniel_Heffner)\
**Replies:** 13\
**Last updated:** [March 1, 2018, 2:01pm UTC](https://forum.ansible.com/t/is-it-possible-to-avoid-aborting-a-play-if-all-hosts-in-a-serial-batch-fail/26870 "2018-03-01T14:01:40Z")

</div>

So, for example, i have a playbook: \` hosts: some\_hosts serial: 50 roles: some\_role … some other play with different hosts \` and for some reason, all 50 hosts in a batch fail. I want to continue running the play …

---

## [Unarchive faild with spring boot war archive](https://forum.ansible.com/t/unarchive-faild-with-spring-boot-war-archive/26874)

<div class="topic-metadata">

**Author:** [@Jan-Philipp\_Bolle](https://forum.ansible.com/u/Jan-Philipp_Bolle)\
**Replies:** 2\
**Last updated:** [March 1, 2018, 1:40pm UTC](https://forum.ansible.com/t/unarchive-faild-with-spring-boot-war-archive/26874 "2018-03-01T13:40:00Z")

</div>

Hi there I try to unarchive several war archives. Mysteriously this fails only with war achives created by the maven spring boot plug-in (I expect this is the problem). All my war achives can extract with the normal zi…

---

## ["Unable to open shell" when not running playbook as sudo](https://forum.ansible.com/t/unable-to-open-shell-when-not-running-playbook-as-sudo/26871)

<div class="topic-metadata">

**Author:** [@Bryan\_Bartik](https://forum.ansible.com/u/Bryan_Bartik)\
**Replies:** 1\
**Last updated:** [March 1, 2018, 1:31pm UTC](https://forum.ansible.com/t/unable-to-open-shell-when-not-running-playbook-as-sudo/26871 "2018-03-01T13:31:03Z")

</div>

I have a playbook that backups router configs using the ios\_config module. When I run the command as sudo it works but the files it creates are owned by root. I want them owned by me. However when I run the ansible-playb…

---

## [Merging global group\_vars](https://forum.ansible.com/t/merging-global-group-vars/26876)

<div class="topic-metadata">

**Author:** [@Mario](https://forum.ansible.com/u/Mario)\
**Replies:** 0\
**Last updated:** [March 1, 2018, 11:13am UTC](https://forum.ansible.com/t/merging-global-group-vars/26876 "2018-03-01T11:13:58Z")

</div>

How can I merge global in-memory group\_vars with some other yml files? We will have a best practice approch with a couple of groups and some corresponding roles. The folder structure will have a top-level group\_vars an…

---

## [Access the value of -u flag in ansible role](https://forum.ansible.com/t/access-the-value-of-u-flag-in-ansible-role/26873)

<div class="topic-metadata">

**Author:** [@Sahil\_Sawhney](https://forum.ansible.com/u/Sahil_Sawhney)\
**Replies:** 0\
**Last updated:** [March 1, 2018, 7:18am UTC](https://forum.ansible.com/t/access-the-value-of-u-flag-in-ansible-role/26873 "2018-03-01T07:18:09Z")

</div>

Is there a way by which we can access the value of the flags (especially the –private-key and -u flags) we provide while running the ansible script; inside the ansible role? Thanks

---

## [How to ignore the failed plays, not just failed tasks ?](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 6\
**Last updated:** [March 1, 2018, 12:16am UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789 "2018-03-01T00:16:28Z")

</div>

The whole play will only fail and abort the run when all hosts in the batch have failed. (If serial: 10 is set for a rolling update, the batch size is 10, for example, otherwise it’s the size of the group).

---

## [Ansible 2.3.4 RC1 is available for testing](https://forum.ansible.com/t/ansible-2-3-4-rc1-is-available-for-testing/26872)

<div class="topic-metadata">

**Author:** [@jimi](https://forum.ansible.com/u/jimi)\
**Replies:** 0\
**Last updated:** [February 28, 2018, 11:39pm UTC](https://forum.ansible.com/t/ansible-2-3-4-rc1-is-available-for-testing/26872 "2018-02-28T23:39:08Z")

</div>

​​Hi all, we’re happy to announce that rc1 for 2.3.4 is now available for testing. This release mainly addresses https://github.com/ansible/ansible/pull/19712, which was fixed but had not previously been backported to t…

---

## [Ansible SSH  "stderr": "reboot: Need to be root"](https://forum.ansible.com/t/ansible-ssh-stderr-reboot-need-to-be-root/26863)

<div class="topic-metadata">

**Author:** [@Hemant\_Kulkarni](https://forum.ansible.com/u/Hemant_Kulkarni)\
**Replies:** 3\
**Last updated:** [February 28, 2018, 4:29pm UTC](https://forum.ansible.com/t/ansible-ssh-stderr-reboot-need-to-be-root/26863 "2018-02-28T16:29:28Z")

</div>

Hello Team, I need to reboot my servers using ansible ,my Problem is i dont have sudo user , i have normal user and root password … admin = normal user here is my simple playbook … hosts: unix tasks: name: reboot s…

---

## [pretty printing 'complete' dictionary vars in a file after reading from a list of dicts](https://forum.ansible.com/t/pretty-printing-complete-dictionary-vars-in-a-file-after-reading-from-a-list-of-dicts/26860)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 7\
**Last updated:** [February 28, 2018, 4:09pm UTC](https://forum.ansible.com/t/pretty-printing-complete-dictionary-vars-in-a-file-after-reading-from-a-list-of-dicts/26860 "2018-02-28T16:09:46Z")

</div>

I have a large number of YAML files prepared manually which have a fixed structure - list of dictionaries. But within different files, sequence of these keys and their values differ. I need to manage them automatically, …

---

## [Figuring out playbook\_vars\_root](https://forum.ansible.com/t/figuring-out-playbook-vars-root/26867)

<div class="topic-metadata">

**Author:** [@Jean\_Helou](https://forum.ansible.com/u/Jean_Helou)\
**Replies:** 1\
**Last updated:** [February 28, 2018, 9:53am UTC](https://forum.ansible.com/t/figuring-out-playbook-vars-root/26867 "2018-02-28T09:53:06Z")

</div>

I am trying to understand what playbook\_vars\_root does in Ansible 2.4.3, I have the feeling that it is totally ignored According to the documentation : This sets which playbook dirs will be used as a root to process v…

---

## [ansible-valult encrypt\_string and adhoc command usage - how to ?](https://forum.ansible.com/t/ansible-valult-encrypt-string-and-adhoc-command-usage-how-to/26755)

<div class="topic-metadata">

**Author:** [@Narahari\_n\_Savitha](https://forum.ansible.com/u/Narahari_n_Savitha)\
**Replies:** 1\
**Last updated:** [February 28, 2018, 4:02am UTC](https://forum.ansible.com/t/ansible-valult-encrypt-string-and-adhoc-command-usage-how-to/26755 "2018-02-28T04:02:21Z")

</div>

Friends: I am trying to understand how to do something. I am not even sure it is possible. Try to help me please. Thank you in advance for your help. End User types in user id and password on jenkins screen. I then w…

---

## [Can Ansible consider switching from Google Groups to a Discourse instance?](https://forum.ansible.com/t/can-ansible-consider-switching-from-google-groups-to-a-discourse-instance/26777)

<div class="topic-metadata">

**Author:** [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Replies:** 6\
**Last updated:** [February 27, 2018, 9:35pm UTC](https://forum.ansible.com/t/can-ansible-consider-switching-from-google-groups-to-a-discourse-instance/26777 "2018-02-27T21:35:16Z")

</div>

I did a search, and I think the last time switching from mailing lists to a forum was discussed was in 2014 here: https://groups.google.com/d/topic/ansible-project/3NkSXNxULFw/discussion Can Ansible consider switching f…

---

## [Can someone show a working example of how to iterate over the rows of a csv file?](https://forum.ansible.com/t/can-someone-show-a-working-example-of-how-to-iterate-over-the-rows-of-a-csv-file/26815)

<div class="topic-metadata">

**Author:** [@Nico\_Sabbi](https://forum.ansible.com/u/Nico_Sabbi)\
**Replies:** 5\
**Last updated:** [February 27, 2018, 6:58pm UTC](https://forum.ansible.com/t/can-someone-show-a-working-example-of-how-to-iterate-over-the-rows-of-a-csv-file/26815 "2018-02-27T18:58:20Z")

</div>

HI, I find Ansible docs really frustrating. Never a full example that is not trivial or misleading. Please, can someone provide a working example of a play to iterate over the rows of a csvfile? Thanks.

---

## [Recursive copy without copying top dir?](https://forum.ansible.com/t/recursive-copy-without-copying-top-dir/26861)

<div class="topic-metadata">

**Author:** [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Replies:** 2\
**Last updated:** [February 27, 2018, 5:40pm UTC](https://forum.ansible.com/t/recursive-copy-without-copying-top-dir/26861 "2018-02-27T17:40:22Z")

</div>

Ansible v2.4.0.0 I want to copy the contents of a local directory to my target host, but the recursive option copies the directory itself. That is \` name: Copy local files target copy: src: /tmp/local\_dir dest: /s…

---

## [I want to curl --unix-socket](https://forum.ansible.com/t/i-want-to-curl-unix-socket/26630)

<div class="topic-metadata">

**Author:** [@Chris7444](https://forum.ansible.com/u/Chris7444)\
**Replies:** 1\
**Last updated:** [February 27, 2018, 3:16pm UTC](https://forum.ansible.com/t/i-want-to-curl-unix-socket/26630 "2018-02-27T15:16:51Z")

</div>

Is there an ansible module that will let me do the same ? It seems the uri: module does not support unix sockets I would like to avoid using the shell: or command: module if possible Thanks

---

## [Security acess to a machine via Ansible](https://forum.ansible.com/t/security-acess-to-a-machine-via-ansible/26821)

<div class="topic-metadata">

**Author:** [@Oscar\_Pinto](https://forum.ansible.com/u/Oscar_Pinto)\
**Replies:** 4\
**Last updated:** [February 27, 2018, 2:41pm UTC](https://forum.ansible.com/t/security-acess-to-a-machine-via-ansible/26821 "2018-02-27T14:41:51Z")

</div>

How can I ensure that a user that is used to play the playbooks does not have ssh access in any other way

---

## [Ansible Tower Job Output via api](https://forum.ansible.com/t/ansible-tower-job-output-via-api/26857)

<div class="topic-metadata">

**Author:** [@smitconsultant2017](https://forum.ansible.com/u/smitconsultant2017)\
**Replies:** 0\
**Last updated:** [February 27, 2018, 5:19am UTC](https://forum.ansible.com/t/ansible-tower-job-output-via-api/26857 "2018-02-27T05:19:51Z")

</div>

Hi I am looking for a way to get output of ansible tower job. I was looking at rest Api v 2 and can see jobs and templates. The aim is to run the job in tower and if failed send the output in email as part of master pla…

---

## [win\_uri returning "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."](https://forum.ansible.com/t/win-uri-returning-the-underlying-connection-was-closed-could-not-establish-trust-relationship-for-the-ssl-tls-secure-channel/26842)

<div class="topic-metadata">

**Author:** [@Dave\_Olker](https://forum.ansible.com/u/Dave_Olker)\
**Replies:** 6\
**Last updated:** [February 26, 2018, 10:45pm UTC](https://forum.ansible.com/t/win-uri-returning-the-underlying-connection-was-closed-could-not-establish-trust-relationship-for-the-ssl-tls-secure-channel/26842 "2018-02-26T22:45:56Z")

</div>

In my Ansible playbook I have a task that calls the “uri” module when running on Linux systems and “win\_uri” when run on Windows systems. The remainder of the task is identical: name: init win\_uri: url: “https://ucp0…

---

## [how to modify ansible-cmdb to get vmware\_host\_facts (new module)](https://forum.ansible.com/t/how-to-modify-ansible-cmdb-to-get-vmware-host-facts-new-module/26856)

<div class="topic-metadata">

**Author:** [@akshar\_barot](https://forum.ansible.com/u/akshar_barot)\
**Replies:** 0\
**Last updated:** [February 26, 2018, 9:31pm UTC](https://forum.ansible.com/t/how-to-modify-ansible-cmdb-to-get-vmware-host-facts-new-module/26856 "2018-02-26T21:31:40Z")

</div>

Hi Experts, I am trying to get facts for esx host (vmware\_host\_facts). and module is not available in current version. anyhow I downloaded from https://github.com/ansible/ansible/tree/devel/lib/ansible/modules/cloud/vmw…

---

## [\[Ansible 2.5\] Question about with\_dict and hash\_behaviour = merge](https://forum.ansible.com/t/ansible-2-5-question-about-with-dict-and-hash-behaviour-merge/26855)

<div class="topic-metadata">

**Author:** [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Replies:** 3\
**Last updated:** [February 26, 2018, 8:50pm UTC](https://forum.ansible.com/t/ansible-2-5-question-about-with-dict-and-hash-behaviour-merge/26855 "2018-02-26T20:50:50Z")

</div>

According to this blog post: https://www.ansible.com/blog/loop-plays-past-present-future with\_dict is going away. All my roles rely heavily on with\_dict and hash\_behaviour = merge merging to avoid configuring the same va…

---

## [ENV variable in Anisble.cfg file](https://forum.ansible.com/t/env-variable-in-anisble-cfg-file/26853)

<div class="topic-metadata">

**Author:** [@Ian\_Barkley](https://forum.ansible.com/u/Ian_Barkley)\
**Replies:** 1\
**Last updated:** [February 26, 2018, 7:33pm UTC](https://forum.ansible.com/t/env-variable-in-anisble-cfg-file/26853 "2018-02-26T19:33:10Z")

</div>

I’ve noticed the documentation has moved from using $HOME to ~/ in various examples when referencing the Ansible.cfg file. I’m currently targeting the use of $USER to help define remote\_path. Will the behavior of using …

---

## [Can I combine with\_items and when?](https://forum.ansible.com/t/can-i-combine-with-items-and-when/26849)

<div class="topic-metadata">

**Author:** [@Nico\_Sabbi](https://forum.ansible.com/u/Nico_Sabbi)\
**Replies:** 8\
**Last updated:** [February 26, 2018, 5:16pm UTC](https://forum.ansible.com/t/can-i-combine-with-items-and-when/26849 "2018-02-26T17:16:43Z")

</div>

HI, can I combine when: and with\_items clauses as in this example? become: true become\_user: root tasks: block: debug: msg: “riga {{item}}” user: name: “{{ item.split(‘:’)\[0\] }}” home: “{{ item.split(‘:’)\[1\] }}” …

---

## [Power Shell remoting (WinRM trust) not working with Active Directory Kerberos Authentication](https://forum.ansible.com/t/power-shell-remoting-winrm-trust-not-working-with-active-directory-kerberos-authentication/26851)

<div class="topic-metadata">

**Author:** [@Dinesh\_Vashisht](https://forum.ansible.com/u/Dinesh_Vashisht)\
**Replies:** 2\
**Last updated:** [February 26, 2018, 4:47pm UTC](https://forum.ansible.com/t/power-shell-remoting-winrm-trust-not-working-with-active-directory-kerberos-authentication/26851 "2018-02-26T16:47:56Z")

</div>

Hi All, We are using Ansible Version: 2.4.2.0. Power Shell remoting (WinRM trust) is not working when using Active Directory even after establishing: Successful Kerberos Authentication: Default principal: automation…

---

## [win\_lineinfile | Regex](https://forum.ansible.com/t/win-lineinfile-regex/26852)

<div class="topic-metadata">

**Author:** [@Tiago\_Pimpao](https://forum.ansible.com/u/Tiago_Pimpao)\
**Replies:** 0\
**Last updated:** [February 26, 2018, 3:50pm UTC](https://forum.ansible.com/t/win-lineinfile-regex/26852 "2018-02-26T15:50:03Z")

</div>

Hi, I need to update a property in a file but the value i need to write depend of the inventory\_hostname. If the hostname is ABCAPP1.MYDOMAIN.COM the value i need to write is APP1 If the hostname is ABCDB1.MYDOMAIN.CO…

---

## [Cisco and ios\_command "unable to set terminal parameters" error](https://forum.ansible.com/t/cisco-and-ios-command-unable-to-set-terminal-parameters-error/26850)

<div class="topic-metadata">

**Author:** [@Scott\_McCamish](https://forum.ansible.com/u/Scott_McCamish)\
**Replies:** 0\
**Last updated:** [February 26, 2018, 2:54pm UTC](https://forum.ansible.com/t/cisco-and-ios-command-unable-to-set-terminal-parameters-error/26850 "2018-02-26T14:54:29Z")

</div>

I’m new to ansible. I’ve tried several switch and router versions. All attempts result in the same error. I am able to log into the switch from my ansible host as the network-users. ansible-playbook 2.4.2.0 config fil…

---

## [Playbooks In Subdirectories #12862](https://forum.ansible.com/t/playbooks-in-subdirectories-12862/26847)

<div class="topic-metadata">

**Author:** [@Percy\_Grunwald](https://forum.ansible.com/u/Percy_Grunwald)\
**Replies:** 2\
**Last updated:** [February 26, 2018, 1:18pm UTC](https://forum.ansible.com/t/playbooks-in-subdirectories-12862/26847 "2018-02-26T13:18:38Z")

</div>

I’ve decided to drop my two cents in here as well since I have spent the past hour trawling Google for advice about this issue and found nothing that I consider to be an acceptable solution. In my opinion, Ansible’s beh…

---

## [Windows Kerberos Issues](https://forum.ansible.com/t/windows-kerberos-issues/24684)

<div class="topic-metadata">

**Author:** [@Jim\_Heald](https://forum.ansible.com/u/Jim_Heald)\
**Replies:** 6\
**Last updated:** [February 26, 2018, 1:03pm UTC](https://forum.ansible.com/t/windows-kerberos-issues/24684 "2018-02-26T13:03:40Z")

</div>

I’m trying to use Ansible to log into a Windows host, and I’m having issues logging in. My Ansible server is joined to the domain DNS lookup works, as well as in reverse I can log into the Windows hosts as a local user…

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

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