# Ansible Project

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

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

**Page:** 39

---

## [Fatal error](https://forum.ansible.com/t/fatal-error/36965)

<div class="topic-metadata">

**Author:** [@Ram\_Murthy](https://forum.ansible.com/u/Ram_Murthy)\
**Replies:** 4\
**Last updated:** [August 10, 2022, 9:44am UTC](https://forum.ansible.com/t/fatal-error/36965 "2022-08-10T09:44:30Z")

</div>

Hi Team,

---

## [How to extract a specific value from input list ?](https://forum.ansible.com/t/how-to-extract-a-specific-value-from-input-list/36966)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 6\
**Last updated:** [August 9, 2022, 2:17pm UTC](https://forum.ansible.com/t/how-to-extract-a-specific-value-from-input-list/36966 "2022-08-09T14:17:46Z")

</div>

I have the following input list postgres\_create\_users: {role: user1 , password: password1 } {role: user2, password: password2} {role: user3, password: password3} {role: user4, password: password4} As part of J2 templ…

---

## [Centos System Disk Partition help](https://forum.ansible.com/t/centos-system-disk-partition-help/36963)

<div class="topic-metadata">

**Author:** [@Nitrous](https://forum.ansible.com/u/Nitrous)\
**Replies:** 3\
**Last updated:** [August 9, 2022, 11:54am UTC](https://forum.ansible.com/t/centos-system-disk-partition-help/36963 "2022-08-09T11:54:50Z")

</div>

Hey Guys, Ive just deployed a VM for Centos from Azure market place, but it seems like that the OS disk by default is 30GB, and I want to be able to use the whole partition. This is what I am trying to achieve in ansibl…

---

## [Ansible 2.13 yum module - requires minimum version of target python of 2.7 or 3.5. But I already have that](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955)

<div class="topic-metadata">

**Author:** [@Daniel\_Barros](https://forum.ansible.com/u/Daniel_Barros)\
**Replies:** 4\
**Last updated:** [August 9, 2022, 2:59am UTC](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955 "2022-08-09T02:59:47Z")

</div>

I have an Ansible (2.13) machine targeting a remote centOS 6 with Python 3.6. Remote machine has python3.6 installed and variables are set like this: $ ansible-inventory --host centos-6-vm { “ansible\_private\_key\_file…

---

## [error new project](https://forum.ansible.com/t/error-new-project/36959)

<div class="topic-metadata">

**Author:** [@Mahdi\_Idriss](https://forum.ansible.com/u/Mahdi_Idriss)\
**Replies:** 2\
**Last updated:** [August 8, 2022, 7:16pm UTC](https://forum.ansible.com/t/error-new-project/36959 "2022-08-08T19:16:21Z")

</div>

Hi ALL, i am trying to run a job from ansible platform but keep receiving below error: Error: invalid reference format any idea?

---

## [Lineinfile - Remove line if the regexp match but the variable inside item is not defined.](https://forum.ansible.com/t/lineinfile-remove-line-if-the-regexp-match-but-the-variable-inside-item-is-not-defined/36961)

<div class="topic-metadata">

**Author:** [@farrukh\_ahmed](https://forum.ansible.com/u/farrukh_ahmed)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 12:26pm UTC](https://forum.ansible.com/t/lineinfile-remove-line-if-the-regexp-match-but-the-variable-inside-item-is-not-defined/36961 "2022-08-08T12:26:31Z")

</div>

Hello Team, Hope you all are doing well. I’m stuck at lineinfile module. how to check if a variable inside each item is defined then add the line in the file, otherwise if the regex found the match in the remote host …

---

## ["msg": "No package matching 'python' is available"](https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960)

<div class="topic-metadata">

**Author:** [@NURUDEEN\_KAMILU](https://forum.ansible.com/u/NURUDEEN_KAMILU)\
**Replies:** 3\
**Last updated:** [August 8, 2022, 10:19am UTC](https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960 "2022-08-08T10:19:39Z")

</div>

Hello, I tried installing python dependencies on ubuntu using ansible. However, I got this error fatal: \[18.157.79.199\]: FAILED! =\> {“changed”: false, “msg”: “No package matching ‘python’ is available”} Below is a scr…

---

## [Alma Linux not recognised as RedHat family](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949)

<div class="topic-metadata">

**Author:** [@shane.do](https://forum.ansible.com/u/shane.do)\
**Replies:** 4\
**Last updated:** [August 6, 2022, 3:10pm UTC](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949 "2022-08-06T15:10:47Z")

</div>

I’ve got some playbooks that install updates to some servers based on operating system family like so: include\_tasks: update-RedHat.yml when: (ansible\_os\_family == ‘RedHat’) include\_tasks: update-Debian.yml when:…

---

## [Pull of List in a Variable File as Extra-Vars](https://forum.ansible.com/t/pull-of-list-in-a-variable-file-as-extra-vars/36943)

<div class="topic-metadata">

**Author:** [@Poseidon\_Olympian](https://forum.ansible.com/u/Poseidon_Olympian)\
**Replies:** 11\
**Last updated:** [August 5, 2022, 4:58pm UTC](https://forum.ansible.com/t/pull-of-list-in-a-variable-file-as-extra-vars/36943 "2022-08-05T16:58:58Z")

</div>

Hello Team, Can I ask some help on how to pull items as Extra-Vars? So, here is the scenario. dirname.yml dir\_list: hello goodbye take-care patch\_file.yml patch\_lib: lib\_1 lib\_2 general\_var.yml main\_dir: “{{ …

---

## ['include\_vars' doesn't find the vars file](https://forum.ansible.com/t/include-vars-doesnt-find-the-vars-file/36952)

<div class="topic-metadata">

**Author:** [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Replies:** 0\
**Last updated:** [August 5, 2022, 4:36pm UTC](https://forum.ansible.com/t/include-vars-doesnt-find-the-vars-file/36952 "2022-08-05T16:36:28Z")

</div>

I want to include a defaults, or variable file in the /defaults/main.yml of a role I am playing Upon execution I am getting "the defaults/main.yml file for role 'postgres\_disable' must contain a dictionary of variables" …

---

## [Use variable with item in when condition in ansible task](https://forum.ansible.com/t/use-variable-with-item-in-when-condition-in-ansible-task/36946)

<div class="topic-metadata">

**Author:** [@Pugazhendhi\_Ramakris](https://forum.ansible.com/u/Pugazhendhi_Ramakris)\
**Replies:** 2\
**Last updated:** [August 4, 2022, 1:17pm UTC](https://forum.ansible.com/t/use-variable-with-item-in-when-condition-in-ansible-task/36946 "2022-08-04T13:17:24Z")

</div>

I’m using the below playbook to capture the vmware datacenter information, which is working fine without any issues:

---

## [Help with complex json\_query](https://forum.ansible.com/t/help-with-complex-json-query/36944)

<div class="topic-metadata">

**Author:** [@Spiro\_Mitsialis](https://forum.ansible.com/u/Spiro_Mitsialis)\
**Replies:** 2\
**Last updated:** [August 4, 2022, 4:51am UTC](https://forum.ansible.com/t/help-with-complex-json-query/36944 "2022-08-04T04:51:41Z")

</div>

Hi, I have the following data: “application\_profiles”: \[ { “app\_desc”: “”, “app\_name”: “NCS\_Net\_inf”, “epg\_name”: \[ “SPAN-destination-analysis”, “infra\_auth\_servers”, “netinf\_test\_servers”, “paaa-infra-mgt”, “…

---

## [Double Headers when using both profile\_tasks and profile\_roles](https://forum.ansible.com/t/double-headers-when-using-both-profile-tasks-and-profile-roles/36942)

<div class="topic-metadata">

**Author:** [@Jay\_Grace](https://forum.ansible.com/u/Jay_Grace)\
**Replies:** 1\
**Last updated:** [August 3, 2022, 6:21pm UTC](https://forum.ansible.com/t/double-headers-when-using-both-profile-tasks-and-profile-roles/36942 "2022-08-03T18:21:02Z")

</div>

When I use both profile\_tasks and profile\_roles in my ansible.cfg I get two headers lines. How do I trim that down to just one (or none just for knowledge’s sake)? For example I only want one header line with the date t…

---

## [Fetch VM Info from Ansible](https://forum.ansible.com/t/fetch-vm-info-from-ansible/36932)

<div class="topic-metadata">

**Author:** [@Pugazhendhi\_Ramakris](https://forum.ansible.com/u/Pugazhendhi_Ramakris)\
**Replies:** 3\
**Last updated:** [August 3, 2022, 6:11pm UTC](https://forum.ansible.com/t/fetch-vm-info-from-ansible/36932 "2022-08-03T18:11:20Z")

</div>

I’m using the “vmware\_vm\_info” module to fetch the VM name with the below playbook and it is working fine but if I try to add the ?guest\_name==‘vm\_name’ as variable it is not working. Can you please suggest how to genera…

---

## [Multiple volumes attach to ec2 from single snapshot](https://forum.ansible.com/t/multiple-volumes-attach-to-ec2-from-single-snapshot/36939)

<div class="topic-metadata">

**Author:** [@Parth\_Patel](https://forum.ansible.com/u/Parth_Patel)\
**Replies:** 1\
**Last updated:** [August 3, 2022, 6:06pm UTC](https://forum.ansible.com/t/multiple-volumes-attach-to-ec2-from-single-snapshot/36939 "2022-08-03T18:06:16Z")

</div>

Hi Team, I would like to know the approach to attach more than then the same volume to ec2 generated from a single snapshot only. I did achieve generating a single volume and attaching it to ec2 from the snapshot. ama…

---

## [ProxyCommand fails on \> ansible 3.4.0 using network\_cli](https://forum.ansible.com/t/proxycommand-fails-on-ansible-3-4-0-using-network-cli/36916)

<div class="topic-metadata">

**Author:** [@thijn](https://forum.ansible.com/u/thijn)\
**Replies:** 2\
**Last updated:** [August 3, 2022, 2:12pm UTC](https://forum.ansible.com/t/proxycommand-fails-on-ansible-3-4-0-using-network-cli/36916 "2022-08-03T14:12:38Z")

</div>

Hi, For connectivity to Cisco XR devices, i need to use one or more jumphosts. I am using: ansible\_ssh\_common\_args: -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand=“ssh -W %h:%p -q jumphost…

---

## [unsupported parameter for ios\_l2\_interfaces](https://forum.ansible.com/t/unsupported-parameter-for-ios-l2-interfaces/36918)

<div class="topic-metadata">

**Author:** [@Hossein\_Malakooti](https://forum.ansible.com/u/Hossein_Malakooti)\
**Replies:** 9\
**Last updated:** [August 3, 2022, 2:07am UTC](https://forum.ansible.com/t/unsupported-parameter-for-ios-l2-interfaces/36918 "2022-08-03T02:07:05Z")

</div>

Hello All I am getting unsupported parameter for ios\_l2\_interfaces error when I am trying to run a simple playbook to change VLAN on an interface . I’ve attached my playbook , inventory and anssible.cfg plus -vvv result…

---

## [Ansible 6.2.0 has been released!](https://forum.ansible.com/t/ansible-6-2-0-has-been-released/36936)

<div class="topic-metadata">

**Author:** [@Ompragash](https://forum.ansible.com/u/Ompragash)\
**Replies:** 1\
**Last updated:** [August 3, 2022, 1:28am UTC](https://forum.ansible.com/t/ansible-6-2-0-has-been-released/36936 "2022-08-03T01:28:46Z")

</div>

Hi all, We’re happy to announce that the Ansible 6.2.0 package has been released ! Ansible 6.2.0 will include ansible-core 2.13.2 as well as a curated set of Ansible collections to provide a vast number of modules and…

---

## [rsync failure](https://forum.ansible.com/t/rsync-failure/36927)

<div class="topic-metadata">

**Author:** [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Replies:** 8\
**Last updated:** [August 2, 2022, 1:59am UTC](https://forum.ansible.com/t/rsync-failure/36927 "2022-08-02T01:59:01Z")

</div>

---

## [I need to save fact into variable and use it afterwards](https://forum.ansible.com/t/i-need-to-save-fact-into-variable-and-use-it-afterwards/36917)

<div class="topic-metadata">

**Author:** [@mboncalo](https://forum.ansible.com/u/mboncalo)\
**Replies:** 6\
**Last updated:** [August 1, 2022, 4:04pm UTC](https://forum.ansible.com/t/i-need-to-save-fact-into-variable-and-use-it-afterwards/36917 "2022-08-01T16:04:08Z")

</div>

I have a task with run\_once:true , which must run only on the first host and I need to use that hostname into a lookup file , something like this: name: Print facts debug: var: ansible\_nodename register: admin\_host …

---

## [Newbie question](https://forum.ansible.com/t/newbie-question/36901)

<div class="topic-metadata">

**Author:** [@Jeffrey\_Parrott](https://forum.ansible.com/u/Jeffrey_Parrott)\
**Replies:** 1\
**Last updated:** [August 1, 2022, 1:31pm UTC](https://forum.ansible.com/t/newbie-question/36901 "2022-08-01T13:31:17Z")

</div>

Newbie here, looking to see if Ansible will allow me to do initial configurations on a new out of the box Cisco switch. I need the ability to have the switch connect to my network and download a specific configuration, A…

---

## [Ansible GCP dynamic Inventory Plugin How to pass Project ID](https://forum.ansible.com/t/ansible-gcp-dynamic-inventory-plugin-how-to-pass-project-id/36893)

<div class="topic-metadata">

**Author:** [@A\_D](https://forum.ansible.com/u/A_D)\
**Replies:** 1\
**Last updated:** [August 1, 2022, 12:40pm UTC](https://forum.ansible.com/t/ansible-gcp-dynamic-inventory-plugin-how-to-pass-project-id/36893 "2022-08-01T12:40:12Z")

</div>

Hi Everyone, I am using the dynamic inventory file for setting up Ansible for running configurations in GCP inventory.compute.gcp.yml plugin: gcp\_compute # name the plugin you want to use (use ansible-doc -t inventory …

---

## [sucessfully ran single play but not when the play is part of a task in the pb](https://forum.ansible.com/t/sucessfully-ran-single-play-but-not-when-the-play-is-part-of-a-task-in-the-pb/36903)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 2\
**Last updated:** [August 1, 2022, 12:33pm UTC](https://forum.ansible.com/t/sucessfully-ran-single-play-but-not-when-the-play-is-part-of-a-task-in-the-pb/36903 "2022-08-01T12:33:13Z")

</div>

I sucessully ran this play as a single play

---

## [failed instances](https://forum.ansible.com/t/failed-instances/36926)

<div class="topic-metadata">

**Author:** [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Replies:** 2\
**Last updated:** [August 1, 2022, 8:08am UTC](https://forum.ansible.com/t/failed-instances/36926 "2022-08-01T08:08:11Z")

</div>

---

## [Speeding up a task](https://forum.ansible.com/t/speeding-up-a-task/36924)

<div class="topic-metadata">

**Author:** [@HobsonI](https://forum.ansible.com/u/HobsonI)\
**Replies:** 5\
**Last updated:** [July 31, 2022, 4:59am UTC](https://forum.ansible.com/t/speeding-up-a-task/36924 "2022-07-31T04:59:22Z")

</div>

Hi Guys, I need advice on speeding up this task: - name: "restore files to {{ location }}" ansible.builtin.copy: src: "/home/ian/backup/hobson42/var/www/ianhobson.com/" dest: "{{ location }}" It copie…

---

## [to which local bash command does get\_url translate to?](https://forum.ansible.com/t/to-which-local-bash-command-does-get-url-translate-to/36923)

<div class="topic-metadata">

**Author:** [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Replies:** 1\
**Last updated:** [July 29, 2022, 3:27pm UTC](https://forum.ansible.com/t/to-which-local-bash-command-does-get-url-translate-to/36923 "2022-07-29T15:27:54Z")

</div>

I am running ansible playbooks against hosts in different networks or firewall-zones and need to fetch confg-files from a local BitBucket server at times with get\_url TASKS. connectivoty to that BitBucket Server is chall…

---

## [renaming a folder on the remote ... issue with defaults/main.yml](https://forum.ansible.com/t/renaming-a-folder-on-the-remote-issue-with-defaults-main-yml/36920)

<div class="topic-metadata">

**Author:** [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Replies:** 5\
**Last updated:** [July 29, 2022, 3:05pm UTC](https://forum.ansible.com/t/renaming-a-folder-on-the-remote-issue-with-defaults-main-yml/36920 "2022-07-29T15:05:40Z")

</div>

I am trying to rename a folder on a remote if it exists. this is being done via a role. ====== my two tasks =============================================================== - name: move legacy postgres - stat postgres\_d…

---

## [How to save a list of dictionaries to a file with a correct indentation](https://forum.ansible.com/t/how-to-save-a-list-of-dictionaries-to-a-file-with-a-correct-indentation/36911)

<div class="topic-metadata">

**Author:** [@actionmystique](https://forum.ansible.com/u/actionmystique)\
**Replies:** 4\
**Last updated:** [July 28, 2022, 1:44pm UTC](https://forum.ansible.com/t/how-to-save-a-list-of-dictionaries-to-a-file-with-a-correct-indentation/36911 "2022-07-28T13:44:35Z")

</div>

The goal seems to be simple, but I cannot manage to get the indentation right. Playbook: name: Saving a list of dictionaries to a file gather\_facts: false hosts: localhost strategy: debug tasks: name: Saving a lis…

---

## [How to unquote a json structure](https://forum.ansible.com/t/how-to-unquote-a-json-structure/36913)

<div class="topic-metadata">

**Author:** [@actionmystique](https://forum.ansible.com/u/actionmystique)\
**Replies:** 1\
**Last updated:** [July 28, 2022, 10:10am UTC](https://forum.ansible.com/t/how-to-unquote-a-json-structure/36913 "2022-07-28T10:10:00Z")

</div>

One shell command returns a json structure, but ansible converts it into a string in the registered variable. In order to access some attributes, this string needs to be unquoted, but how? There is a quote filter, but t…

---

## [windows patching\_uninstall](https://forum.ansible.com/t/windows-patching-uninstall/30395)

<div class="topic-metadata">

**Author:** [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Replies:** 3\
**Last updated:** [July 28, 2022, 6:05am UTC](https://forum.ansible.com/t/windows-patching-uninstall/30395 "2022-07-28T06:05:13Z")

</div>

Hello All! I need to uninstall the windows install package with KB article with help of ansible. the win\_update is not happy with ‘absent’ Please help. Thanks

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

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