# Latest

**URL:** https://forum.ansible.com/latest.md?page=478

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

**Page:** 479

---

## [Get item with file](https://forum.ansible.com/t/get-item-with-file/29818)

<div class="topic-metadata">

**Author:** [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Replies:** 4\
**Last updated:** [March 5, 2019, 10:37am UTC](https://forum.ansible.com/t/get-item-with-file/29818 "2019-03-05T10:37:29Z")

</div>

Hy all, I have one file with this content: 1,user1,host1,appli1 2,user2,host2,appli2 3,user1,host1.appli3 This task works : - set\_fact: indice: “{{ item.split(‘,’)\[0\] }}” with\_lines: cat /home/ansible/ssh\_manager…

---

## [Defining complex data (cascaded arrays) in yaml has problems](https://forum.ansible.com/t/defining-complex-data-cascaded-arrays-in-yaml-has-problems/29817)

<div class="topic-metadata">

**Author:** [@Ralf\_Weber](https://forum.ansible.com/u/Ralf_Weber)\
**Replies:** 4\
**Last updated:** [March 5, 2019, 10:29am UTC](https://forum.ansible.com/t/defining-complex-data-cascaded-arrays-in-yaml-has-problems/29817 "2019-03-05T10:29:20Z")

</div>

Moin! For a recent project I needed to have a data structure with nested arrays, however I could not get it to work using yaml syntax. When using the following playbook: - hosts: all tasks: - name: Set some t…

---

## [Help on terminal and cliconf plugin](https://forum.ansible.com/t/help-on-terminal-and-cliconf-plugin/29824)

<div class="topic-metadata">

**Author:** [@rpachi](https://forum.ansible.com/u/rpachi)\
**Replies:** 1\
**Last updated:** [March 5, 2019, 8:53am UTC](https://forum.ansible.com/t/help-on-terminal-and-cliconf-plugin/29824 "2019-03-05T08:53:42Z")

</div>

Hi Experts, I am unable to create terminal and cliconf plugin for my company. Can some one help me in creating it. I can arrange a call. Thanks in advance. Thanks, Rajas

---

## [Windows ansible Kerberos user privileges.](https://forum.ansible.com/t/windows-ansible-kerberos-user-privileges/29816)

<div class="topic-metadata">

**Author:** [@Flavio\_Gobber](https://forum.ansible.com/u/Flavio_Gobber)\
**Replies:** 2\
**Last updated:** [March 5, 2019, 6:19am UTC](https://forum.ansible.com/t/windows-ansible-kerberos-user-privileges/29816 "2019-03-05T06:19:08Z")

</div>

Hello, I am starting to use the ansible to manage server Joined to a domain. I have started the test using a domain user account members of Domain Users but with the use member of local administrators on target. When …

---

## [Combine values from multiple lists](https://forum.ansible.com/t/combine-values-from-multiple-lists/29780)

<div class="topic-metadata">

**Author:** [@Ryan1](https://forum.ansible.com/u/Ryan1)\
**Replies:** 7\
**Last updated:** [March 5, 2019, 2:15am UTC](https://forum.ansible.com/t/combine-values-from-multiple-lists/29780 "2019-03-05T02:15:14Z")

</div>

How would I go about printing the values from three lists, so that each line contains elements from each list? For instance, I can print the values from the lists using: msg: “Memory: {{ memoryLocator.stdout\_lines }}…

---

## [using when something \> variable](https://forum.ansible.com/t/using-when-something-variable/29822)

<div class="topic-metadata">

**Author:** [@Spiro\_Mitsialis](https://forum.ansible.com/u/Spiro_Mitsialis)\
**Replies:** 2\
**Last updated:** [March 4, 2019, 8:14pm UTC](https://forum.ansible.com/t/using-when-something-variable/29822 "2019-03-04T20:14:58Z")

</div>

I have a playbook that performs a command on a router and then parses the output. So far no problem. I’m then trying to check if any of the variables back from the parser are \>= threshold. The threshold is defined as a …

---

## [Concatenate registered variable , variables in vara and strings](https://forum.ansible.com/t/concatenate-registered-variable-variables-in-vara-and-strings/29821)

<div class="topic-metadata">

**Author:** [@pnagaraj7656](https://forum.ansible.com/u/pnagaraj7656)\
**Replies:** 0\
**Last updated:** [March 4, 2019, 5:51pm UTC](https://forum.ansible.com/t/concatenate-registered-variable-variables-in-vara-and-strings/29821 "2019-03-04T17:51:16Z")

</div>

I'm trying to concatenate registered variable from a previous task , external variable with a string ( ex: -stringhere) in a task. I'm not getting the syntax to do it. I tried below and it didn't work. Command : echo …

---

## [AWX and Git](https://forum.ansible.com/t/awx-and-git/29787)

<div class="topic-metadata">

**Author:** [@Jean-Yves\_LENHOF](https://forum.ansible.com/u/Jean-Yves_LENHOF)\
**Replies:** 5\
**Last updated:** [March 4, 2019, 5:43pm UTC](https://forum.ansible.com/t/awx-and-git/29787 "2019-03-04T17:43:17Z")

</div>

Hi, Today we use ansible “engine” to deploy our roles to servers. We have two git repositories : one for the inventory and variables (to keep an history) one for all roles (on some other projects we have a git reposi…

---

## [How to use the different parameter for each host in playbook](https://forum.ansible.com/t/how-to-use-the-different-parameter-for-each-host-in-playbook/29805)

<div class="topic-metadata">

**Author:** [@Devesh\_singh](https://forum.ansible.com/u/Devesh_singh)\
**Replies:** 3\
**Last updated:** [March 4, 2019, 3:08pm UTC](https://forum.ansible.com/t/how-to-use-the-different-parameter-for-each-host-in-playbook/29805 "2019-03-04T15:08:49Z")

</div>

Hi, Could you please anyone help me to complete below request. We need to excute the one playbook on 10 hosts and each task in playbook should use the different-2 parameter on each host. Could you please how we can pe…

---

## [How to delete the same line in a file ?](https://forum.ansible.com/t/how-to-delete-the-same-line-in-a-file/29806)

<div class="topic-metadata">

**Author:** [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Replies:** 4\
**Last updated:** [March 4, 2019, 12:17pm UTC](https://forum.ansible.com/t/how-to-delete-the-same-line-in-a-file/29806 "2019-03-04T12:17:40Z")

</div>

Hy all, I have this file with this content : premiere line deuxieme line premiere line premiere line How to delete the same line in this file ? I want this file : premiere line deuxieme line Thank you guy !! …

---

## [When Condition check is not working in a list as expected.](https://forum.ansible.com/t/when-condition-check-is-not-working-in-a-list-as-expected/29798)

<div class="topic-metadata">

**Author:** [@Pandu\_jh](https://forum.ansible.com/u/Pandu_jh)\
**Replies:** 4\
**Last updated:** [March 4, 2019, 11:12am UTC](https://forum.ansible.com/t/when-condition-check-is-not-working-in-a-list-as-expected/29798 "2019-03-04T11:12:15Z")

</div>

When Condition check is not working in a list as expected. My requirement is Playbook should not fail If all the three mentioned variables have “no\_share” value. But it’s failing not sure what causing this issue. d…

---

## [How to save the O/P of ansible playbook into a file in windows enviroment](https://forum.ansible.com/t/how-to-save-the-o-p-of-ansible-playbook-into-a-file-in-windows-enviroment/29815)

<div class="topic-metadata">

**Author:** [@shyam.rpms](https://forum.ansible.com/u/shyam.rpms)\
**Replies:** 2\
**Last updated:** [March 4, 2019, 11:10am UTC](https://forum.ansible.com/t/how-to-save-the-o-p-of-ansible-playbook-into-a-file-in-windows-enviroment/29815 "2019-03-04T11:10:32Z")

</div>

Hi All, I have a playbook, using REST API getting the details of a process in JSON format. I want to save that JSON o/p to a file in windows environment. Can any one please help me. sample playbook:

---

## [vmware delete old snapshot](https://forum.ansible.com/t/vmware-delete-old-snapshot/29796)

<div class="topic-metadata">

**Author:** [@itforumsubs](https://forum.ansible.com/u/itforumsubs)\
**Replies:** 2\
**Last updated:** [March 4, 2019, 4:49am UTC](https://forum.ansible.com/t/vmware-delete-old-snapshot/29796 "2019-03-04T04:49:05Z")

</div>

Hi all, May I ask how do you handle deleting old snapshots in vmware? vmware\_guest\_snapshot module seems to be based on the name on the snapshot to manage. Im thinking of how to get the name of the snapshot based on th…

---

## [Except Module in Ansible](https://forum.ansible.com/t/except-module-in-ansible/29786)

<div class="topic-metadata">

**Author:** [@Deepak\_Sharma1](https://forum.ansible.com/u/Deepak_Sharma1)\
**Replies:** 5\
**Last updated:** [March 3, 2019, 10:40pm UTC](https://forum.ansible.com/t/except-module-in-ansible/29786 "2019-03-03T22:40:09Z")

</div>

Hi All, I am using except module to install one TIBCO products , name: Start Streambase installation expect: echo: yes chdir: /opt/tibco//{{ env }}/install command: ./TIB\_sb-cep\_{{ tib\_streambase\_version }}\_linux\_…

---

## [How to assign to an object with arbitrary characters in key](https://forum.ansible.com/t/how-to-assign-to-an-object-with-arbitrary-characters-in-key/29813)

<div class="topic-metadata">

**Author:** [@Oleg\_Semyonov](https://forum.ansible.com/u/Oleg_Semyonov)\
**Replies:** 1\
**Last updated:** [March 3, 2019, 1:48pm UTC](https://forum.ansible.com/t/how-to-assign-to-an-object-with-arbitrary-characters-in-key/29813 "2019-03-03T13:48:48Z")

</div>

I have a list of objects with names like this: ‘obj-0001’, ‘obj-0002’ and need to set\_stats with some data about these objects in the following structure: “data”: { “obj-0001”: { “a”: 1, “b”: 2 }, “obj-0002”: { “a”: 3…

---

## [Ansible Modules](https://forum.ansible.com/t/ansible-modules/29807)

<div class="topic-metadata">

**Author:** [@Sebastian\_Zenobio](https://forum.ansible.com/u/Sebastian_Zenobio)\
**Replies:** 3\
**Last updated:** [March 2, 2019, 1:23pm UTC](https://forum.ansible.com/t/ansible-modules/29807 "2019-03-02T13:23:56Z")

</div>

Hi guys! I wrote a small code inside modules and all is good. The only problem that I have, is when I want to print some message on the tasks (informational). For example: if I have a for inside my code I want that on…

---

## [Ansible CloudFormation module parameters file](https://forum.ansible.com/t/ansible-cloudformation-module-parameters-file/29811)

<div class="topic-metadata">

**Author:** [@Raveendran\_Kumaravel](https://forum.ansible.com/u/Raveendran_Kumaravel)\
**Replies:** 0\
**Last updated:** [March 2, 2019, 4:15am UTC](https://forum.ansible.com/t/ansible-cloudformation-module-parameters-file/29811 "2019-03-02T04:15:44Z")

</div>

Hi, I tested invoking Ansible CloudFormation module from a playbook. by passing required cloudformation parameters. Just wondering is it possible to pass parameter file to a cloudformation module inside playbook Similar …

---

## [How to reference previous play's hostname and host\_vars in a jinja2 template](https://forum.ansible.com/t/how-to-reference-previous-plays-hostname-and-host-vars-in-a-jinja2-template/29810)

<div class="topic-metadata">

**Author:** [@Bharath\_Kumar2](https://forum.ansible.com/u/Bharath_Kumar2)\
**Replies:** 0\
**Last updated:** [March 2, 2019, 3:38am UTC](https://forum.ansible.com/t/how-to-reference-previous-plays-hostname-and-host-vars-in-a-jinja2-template/29810 "2019-03-02T03:38:51Z")

</div>

Hello Ansible experts, I am having a ‘hostgroup’ with a ‘host\_var’ associated with each host of the ‘hostgroup’. Play 1 which targets the ‘hostgroup’, will create files on the target servers using the associated ‘host\_va…

---

## [how could I use python 3 for ansible command](https://forum.ansible.com/t/how-could-i-use-python-3-for-ansible-command/29809)

<div class="topic-metadata">

**Author:** [@Jason\_Yu](https://forum.ansible.com/u/Jason_Yu)\
**Replies:** 0\
**Last updated:** [March 2, 2019, 1:36am UTC](https://forum.ansible.com/t/how-could-i-use-python-3-for-ansible-command/29809 "2019-03-02T01:36:45Z")

</div>

I have two versions of python installed. If I don’t run the scl command, I will use python 2.7, but when I use scl command, it swith to use python 3. What is the difference between these two methods? When I try to see w…

---

## [Get indice in file if caracter present](https://forum.ansible.com/t/get-indice-in-file-if-caracter-present/29792)

<div class="topic-metadata">

**Author:** [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Replies:** 2\
**Last updated:** [March 1, 2019, 11:02pm UTC](https://forum.ansible.com/t/get-indice-in-file-if-caracter-present/29792 "2019-03-01T23:02:22Z")

</div>

Hy all, I have one file with this content: 1,user1,host1,appli1 2,user2,host2,appli2 My problem is that i want an task who look if {{ ansible\_user}},{{inventory\_hostname}} == “user1,host1” He must return ID of this …

---

## [expect with duplicated responses](https://forum.ansible.com/t/expect-with-duplicated-responses/29808)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 5\
**Last updated:** [March 1, 2019, 10:08pm UTC](https://forum.ansible.com/t/expect-with-duplicated-responses/29808 "2019-03-01T22:08:56Z")

</div>

When using the following (first time using expect) I have many responses with the same prompt. I took care of the first 20 of them as you can see below, however, the same prompt comes up again later during the install. I…

---

## [Hostvars to pull specific variables](https://forum.ansible.com/t/hostvars-to-pull-specific-variables/29795)

<div class="topic-metadata">

**Author:** [@Jeffrey\_Agnitsch](https://forum.ansible.com/u/Jeffrey_Agnitsch)\
**Replies:** 5\
**Last updated:** [March 1, 2019, 2:45pm UTC](https://forum.ansible.com/t/hostvars-to-pull-specific-variables/29795 "2019-03-01T14:45:23Z")

</div>

Hello, I am trying to use hostvars to get an inventory hostname and a specific variable. The goal of this is to get from the app group, get each unique servers client\_name. The below command works for just the first lin…

---

## [how to convert textarea in ansible tower survey into a list of dictionary in playbook](https://forum.ansible.com/t/how-to-convert-textarea-in-ansible-tower-survey-into-a-list-of-dictionary-in-playbook/29725)

<div class="topic-metadata">

**Author:** [@Xiangli\_Li](https://forum.ansible.com/u/Xiangli_Li)\
**Replies:** 2\
**Last updated:** [March 1, 2019, 2:44pm UTC](https://forum.ansible.com/t/how-to-convert-textarea-in-ansible-tower-survey-into-a-list-of-dictionary-in-playbook/29725 "2019-03-01T14:44:47Z")

</div>

Hello, I am new to ansible tower, and I am trying to migrate my playbooks into ansible tower environment. in my playbook, I have variable like db\_list: { dbid: 1, dbname: abc} { dbid: 2, dbname: xyz} in tower surve…

---

## [Ansible Ad-hoc Command](https://forum.ansible.com/t/ansible-ad-hoc-command/29804)

<div class="topic-metadata">

**Author:** [@Bipin\_Guragain](https://forum.ansible.com/u/Bipin_Guragain)\
**Replies:** 2\
**Last updated:** [March 1, 2019, 2:34pm UTC](https://forum.ansible.com/t/ansible-ad-hoc-command/29804 "2019-03-01T14:34:32Z")

</div>

Hi All I am new to Ansible and started using it for a while. I have one question on Ansible Ad-hoc command using a shell module with a passed args ‘chdir’. I am having a problem using the argument ‘chdir’ in Ansible CLI…

---

## [How to store ansible running log separately without touching log\_path and ANSIBLE\_LOG\_PATH](https://forum.ansible.com/t/how-to-store-ansible-running-log-separately-without-touching-log-path-and-ansible-log-path/29803)

<div class="topic-metadata">

**Author:** [@Qin\_Peter](https://forum.ansible.com/u/Qin_Peter)\
**Replies:** 0\
**Last updated:** [March 1, 2019, 7:17am UTC](https://forum.ansible.com/t/how-to-store-ansible-running-log-separately-without-touching-log-path-and-ansible-log-path/29803 "2019-03-01T07:17:58Z")

</div>

Hi All, I am new to Ansible and I have requirement about ansible running log. Could anyone help? Thanks. I am talking about running log, not the playbook log. eg: 2019-02-28 01:39:59,819 p=23627 u=peterqi | PLAY \[cre…

---

## [Defning cloudwatch metric alarm which uses metric math using ansible ec2\_metric\_alarm](https://forum.ansible.com/t/defning-cloudwatch-metric-alarm-which-uses-metric-math-using-ansible-ec2-metric-alarm/29800)

<div class="topic-metadata">

**Author:** [@Sachin\_Doiphode](https://forum.ansible.com/u/Sachin_Doiphode)\
**Replies:** 1\
**Last updated:** [March 1, 2019, 6:34am UTC](https://forum.ansible.com/t/defning-cloudwatch-metric-alarm-which-uses-metric-math-using-ansible-ec2-metric-alarm/29800 "2019-03-01T06:34:04Z")

</div>

I’m using ansible’s ec2\_metric\_alarm for creating CloudWatch metrics alarms. now, I have some metrics defined which uses metric math, I’m trying to define alarms for those using ec2\_metric\_alarm but I cannot find a way. …

---

## [creating a vm using ovf and vmdk files](https://forum.ansible.com/t/creating-a-vm-using-ovf-and-vmdk-files/29801)

<div class="topic-metadata">

**Author:** [@Sahar](https://forum.ansible.com/u/Sahar)\
**Replies:** 0\
**Last updated:** [February 28, 2019, 10:06pm UTC](https://forum.ansible.com/t/creating-a-vm-using-ovf-and-vmdk-files/29801 "2019-02-28T22:06:09Z")

</div>

\*\*I'm trying to create VM using the following ansible module. To create it, I see "ovf" as attributes that I can use the path to the ovf files, but I don't see any attribute to let me use my vmdk files.\*\* \*\*Do you know …

---

## [Guidelines for writing cross platform roles](https://forum.ansible.com/t/guidelines-for-writing-cross-platform-roles/29797)

<div class="topic-metadata">

**Author:** [@Elan](https://forum.ansible.com/u/Elan)\
**Replies:** 2\
**Last updated:** [February 28, 2019, 8:05pm UTC](https://forum.ansible.com/t/guidelines-for-writing-cross-platform-roles/29797 "2019-02-28T20:05:21Z")

</div>

Recently I have been watching some ansible conference recordings and reading about best practices and I have a question. How do you write your playbooks/roles to for cross platform use and be able to not to turn your sp…

---

## [Vault encrypting password over the network or just locally](https://forum.ansible.com/t/vault-encrypting-password-over-the-network-or-just-locally/29763)

<div class="topic-metadata">

**Author:** [@mboncalo](https://forum.ansible.com/u/mboncalo)\
**Replies:** 3\
**Last updated:** [February 28, 2019, 1:29pm UTC](https://forum.ansible.com/t/vault-encrypting-password-over-the-network-or-just-locally/29763 "2019-02-28T13:29:20Z")

</div>

Hi, I'm trying to secure my ansible playbook and one of the steps is securing the password. I know that I can store the password encrypted inside ansible vault and than use directly from the vault and send it over th…

---

## [Skip import playbook using when condition.](https://forum.ansible.com/t/skip-import-playbook-using-when-condition/29793)

<div class="topic-metadata">

**Author:** [@Pandu\_jh](https://forum.ansible.com/u/Pandu_jh)\
**Replies:** 2\
**Last updated:** [February 28, 2019, 12:45pm UTC](https://forum.ansible.com/t/skip-import-playbook-using-when-condition/29793 "2019-02-28T12:45:00Z")

</div>

If there are no hosts added to add host, subsequent plays should be skipped. Please let me know how to provide when condition for this - name: hosts: rchadm01 vars\_files: - var.yml tasks: - name: …

[Previous page](https://forum.ansible.com/latest.md?page=477)

[Next page](https://forum.ansible.com/latest.md?page=479)
