# Archives

**URL:** https://forum.ansible.com/c/archives/31.md?page=307

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

**Page:** 308

---

## [How to include group\_vars when using python api to run ansible-playbook.](https://forum.ansible.com/t/how-to-include-group-vars-when-using-python-api-to-run-ansible-playbook/29830)

<div class="topic-metadata">

**Author:** [@Jace\_Liang](https://forum.ansible.com/u/Jace_Liang)\
**Replies:** 0\
**Last updated:** [March 6, 2019, 4:53am UTC](https://forum.ansible.com/t/how-to-include-group-vars-when-using-python-api-to-run-ansible-playbook/29830 "2019-03-06T04:53:44Z")

</div>

Hi all, I am trying to write a python script to run kuberspray’s ansible-playbook. Basically, when using kubespray, all I need to do is get into kubespray’s folder and type command. \` ansible-playbook -i inventory/my…

---

## [Determine virtual or physical machine from existing default Ansible facts](https://forum.ansible.com/t/determine-virtual-or-physical-machine-from-existing-default-ansible-facts/23672)

<div class="topic-metadata">

**Author:** [@Simon\_Wydooghe](https://forum.ansible.com/u/Simon_Wydooghe)\
**Replies:** 5\
**Last updated:** [March 5, 2019, 11:57pm UTC](https://forum.ansible.com/t/determine-virtual-or-physical-machine-from-existing-default-ansible-facts/23672 "2019-03-05T23:57:54Z")

</div>

Does anyone have a suggestion on how to detect whether a machine is a bare metal one or a virtual one using the existing Ansible facts? In Puppet there was a ‘physical’ boolean which could be used, but going through the …

---

## [Required Role to Create Inventory Scripts](https://forum.ansible.com/t/required-role-to-create-inventory-scripts/29799)

<div class="topic-metadata">

**Author:** [@Uriel](https://forum.ansible.com/u/Uriel)\
**Replies:** 1\
**Last updated:** [March 5, 2019, 11:16pm UTC](https://forum.ansible.com/t/required-role-to-create-inventory-scripts/29799 "2019-03-05T23:16:13Z")

</div>

Does anyone know what role is required to give users access to creating Inventory Scripts? I’ve tried giving the Inventory Admin role to Org members but they don’t get the option to create IS. I’m not seeing an IS Admin …

---

## [Installing AWX on ECS](https://forum.ansible.com/t/installing-awx-on-ecs/29829)

<div class="topic-metadata">

**Author:** [@CV1](https://forum.ansible.com/u/CV1)\
**Replies:** 1\
**Last updated:** [March 5, 2019, 11:14pm UTC](https://forum.ansible.com/t/installing-awx-on-ecs/29829 "2019-03-05T23:14:33Z")

</div>

Hi, I am trying to get AWX running on ECS. All of the containers say running, but the awx\_task container has an error: … me = instance or Instance.objects.me() File “/var/lib/awx/venv/awx/lib64/python3.6/site-packag…

---

## [How to store ansible running log to separate log file without touch ANSIBLE\_LOG\_PATH or ansible.cfg](https://forum.ansible.com/t/how-to-store-ansible-running-log-to-separate-log-file-without-touch-ansible-log-path-or-ansible-cfg/29785)

<div class="topic-metadata">

**Author:** [@Qin\_Peter](https://forum.ansible.com/u/Qin_Peter)\
**Replies:** 4\
**Last updated:** [March 5, 2019, 9:47pm UTC](https://forum.ansible.com/t/how-to-store-ansible-running-log-to-separate-log-file-without-touch-ansible-log-path-or-ansible-cfg/29785 "2019-03-05T21:47:08Z")

</div>

Hi All, This is Peter and I am newer to Ansible. I am trying to store the ansible running log to a file. And every playbook will have separate ansible running log file. I know I can use ‘export ANSIBLE\_LOG\_PATH=~/shar…

---

## [How get some word in file](https://forum.ansible.com/t/how-get-some-word-in-file/29819)

<div class="topic-metadata">

**Author:** [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Replies:** 1\
**Last updated:** [March 5, 2019, 10:38am UTC](https://forum.ansible.com/t/how-get-some-word-in-file/29819 "2019-03-05T10:38:04Z")

</div>

Hy all, I’m sorry i ask a lot of question but it’s my last question. I have this file : 2,user2,hostname2,appli1 1,user1,hostname1,appli1,appli2,appli3, … 3,user3,hostname3,appli1 appli1 it’s one application for in…

---

## [Get indice in variable](https://forum.ansible.com/t/get-indice-in-variable/29825)

<div class="topic-metadata">

**Author:** [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Replies:** 1\
**Last updated:** [March 5, 2019, 10:37am UTC](https://forum.ansible.com/t/get-indice-in-variable/29825 "2019-03-05T10:37:46Z")

</div>

Hy all, I have this task : set\_fact: liste\_appli: “{{ item.split(‘,’)\[3:\] }}” with\_lines: cat /home/ansible/ssh\_manager/clef\_applicatives.csv when: (item.split(‘,’)\[1\] == ansible\_user) and (item.split(‘,’)\[2\] == in…

---

## [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…

[Previous page](https://forum.ansible.com/c/archives/31.md?page=306)

[Next page](https://forum.ansible.com/c/archives/31.md?page=308)
