# Ansible Project

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

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

**Page:** 210

---

## [Override a role's templates?](https://forum.ansible.com/t/override-a-roles-templates/29579)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 2\
**Last updated:** [January 31, 2019, 4:57pm UTC](https://forum.ansible.com/t/override-a-roles-templates/29579 "2019-01-31T16:57:10Z")

</div>

Hi I'm using roles extensively to separate functionality, and I'm trying to keep the roles as general as possible. The resulting playbooks are very minimal, containing not more than a set of include\_role tasks. Many …

---

## [RabbitMQ Hostname Mismatch](https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825)

<div class="topic-metadata">

**Author:** [@muhammed](https://forum.ansible.com/u/muhammed)\
**Replies:** 3\
**Last updated:** [January 31, 2019, 11:33am UTC](https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825 "2019-01-31T11:33:02Z")

</div>

Farily new to ansible, so apologies if I’m missing something obvious. Ansible version: 2.5.5 Issue: My task throws a hostname mismatch error when adding a new vhost on a server that contains a fresh installation of rab…

---

## [Callback with grafana](https://forum.ansible.com/t/callback-with-grafana/29578)

<div class="topic-metadata">

**Author:** [@Rafael\_Tomelin](https://forum.ansible.com/u/Rafael_Tomelin)\
**Replies:** 1\
**Last updated:** [January 31, 2019, 2:03am UTC](https://forum.ansible.com/t/callback-with-grafana/29578 "2019-01-31T02:03:45Z")

</div>

Hello guys, I’m trying to set up callback not available from the ‘https://blog.octo.com/en/walkthrough-watch-your-ansible-deployments-in-grafana/’ link, but it is not working and displays the following message: \[DEPREC…

---

## [How to use variable in "when" statement in ansible?](https://forum.ansible.com/t/how-to-use-variable-in-when-statement-in-ansible/29484)

<div class="topic-metadata">

**Author:** [@Sahar](https://forum.ansible.com/u/Sahar)\
**Replies:** 5\
**Last updated:** [January 31, 2019, 12:34am UTC](https://forum.ansible.com/t/how-to-use-variable-in-when-statement-in-ansible/29484 "2019-01-31T00:34:38Z")

</div>

Any idea how can I fix the below error? tasks: name: check the state (primary/secondary/standalone) asa\_command: commands: ‘show version | i “{{ OldImage }}”’ register: state include: reboot.yml when: ‘“{{ …

---

## [Overridden variable leaking out of dependency declared in role meta?](https://forum.ansible.com/t/overridden-variable-leaking-out-of-dependency-declared-in-role-meta/29576)

<div class="topic-metadata">

**Author:** [@moreati](https://forum.ansible.com/u/moreati)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 9:08pm UTC](https://forum.ansible.com/t/overridden-variable-leaking-out-of-dependency-declared-in-role-meta/29576 "2019-01-30T21:08:11Z")

</div>

I have 2 roles (r1 and r2), r2 depends on r1 and the dependency overrides a variable (x). I would expect the overridden value to only apply while r1 is run as a dependency. However the overridden value gets applied throu…

---

## [Jenkins, Ansible, when conditional](https://forum.ansible.com/t/jenkins-ansible-when-conditional/29575)

<div class="topic-metadata">

**Author:** [@eric.dunn](https://forum.ansible.com/u/eric.dunn)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 7:56pm UTC](https://forum.ansible.com/t/jenkins-ansible-when-conditional/29575 "2019-01-30T19:56:54Z")

</div>

I am running an ansible job that distributes apps and configurations to various servers. I have a when condition on one of my roles. It seems to slow down the process during the installation when it does not meet the c…

---

## [Logging into my local system w/ ansible](https://forum.ansible.com/t/logging-into-my-local-system-w-ansible/29574)

<div class="topic-metadata">

**Author:** [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Replies:** 1\
**Last updated:** [January 30, 2019, 7:43pm UTC](https://forum.ansible.com/t/logging-into-my-local-system-w-ansible/29574 "2019-01-30T19:43:05Z")

</div>

Hey all, So I’ve got a playbook that runs and in my hosts list is the system running the checks themselves…it can’t seem to login to itself. I get this error: fatal: \[ansible-lx\]: UNREACHABLE! =\> {“changed”: false, “ms…

---

## [issue with running inventory with gcp\_compute plugin filters](https://forum.ansible.com/t/issue-with-running-inventory-with-gcp-compute-plugin-filters/29573)

<div class="topic-metadata">

**Author:** [@zach.delano](https://forum.ansible.com/u/zach.delano)\
**Replies:** 2\
**Last updated:** [January 30, 2019, 6:53pm UTC](https://forum.ansible.com/t/issue-with-running-inventory-with-gcp-compute-plugin-filters/29573 "2019-01-30T18:53:59Z")

</div>

I’m trying to get a list of Ubuntu instances from a GCE project. This is what my inventory file looks like. plugin: gcp\_compute projects: filters: disks.licenses:ubuntu auth\_kind: serviceaccount service\_acco…

---

## [Instance group precedence](https://forum.ansible.com/t/instance-group-precedence/29572)

<div class="topic-metadata">

**Author:** [@Sindhuja\_Koneru](https://forum.ansible.com/u/Sindhuja_Koneru)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 4:04pm UTC](https://forum.ansible.com/t/instance-group-precedence/29572 "2019-01-30T16:04:57Z")

</div>

Ansible docs say instance group selected in template has higher precedence than instance group in inventory. Instance group in inventory has hugest precedence than instance group in organization. Template \> Inventory \>…

---

## [Extract the output to excel files](https://forum.ansible.com/t/extract-the-output-to-excel-files/29562)

<div class="topic-metadata">

**Author:** [@Kefi\_Ammar](https://forum.ansible.com/u/Kefi_Ammar)\
**Replies:** 4\
**Last updated:** [January 30, 2019, 3:11pm UTC](https://forum.ansible.com/t/extract-the-output-to-excel-files/29562 "2019-01-30T15:11:35Z")

</div>

Hello everyone, I am new to Ansible and I am using it for network operations. So, I am extracting informations from network devices (software versions, platforms, hostnames, interfaces, system infos,…) and they are pres…

---

## [group module: create group with a specific gid but do not change the gid of an existing group.](https://forum.ansible.com/t/group-module-create-group-with-a-specific-gid-but-do-not-change-the-gid-of-an-existing-group/29570)

<div class="topic-metadata">

**Author:** [@bob.carroll](https://forum.ansible.com/u/bob.carroll)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 2:33pm UTC](https://forum.ansible.com/t/group-module-create-group-with-a-specific-gid-but-do-not-change-the-gid-of-an-existing-group/29570 "2019-01-30T14:33:46Z")

</div>

It would be useful to have an option “update\_gid:” similar to update\_password in the user module. It is often disruptive to change the gid of an existing group. A value “on\_create” would allow state “present” but not up…

---

## [simple kubernetes application deployment using Ansible AWX ? Any body tried that ?](https://forum.ansible.com/t/simple-kubernetes-application-deployment-using-ansible-awx-any-body-tried-that/29569)

<div class="topic-metadata">

**Author:** [@Kylix\_Kumar](https://forum.ansible.com/u/Kylix_Kumar)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 7:18am UTC](https://forum.ansible.com/t/simple-kubernetes-application-deployment-using-ansible-awx-any-body-tried-that/29569 "2019-01-30T07:18:48Z")

</div>

Did any one you knows how to deploy small or simple “hello world” application in Kubernetes using Ansible AWX ? I’m trying to do it … i dont know where to start or how to beings with it. If you have any thoughts or help.…

---

## [Ansible GCE Instance Start and Stop -   LibcloudError  - job did not complete in 180 seconds](https://forum.ansible.com/t/ansible-gce-instance-start-and-stop-libclouderror-job-did-not-complete-in-180-seconds/29568)

<div class="topic-metadata">

**Author:** [@bo.mannarino](https://forum.ansible.com/u/bo.mannarino)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 3:21am UTC](https://forum.ansible.com/t/ansible-gce-instance-start-and-stop-libclouderror-job-did-not-complete-in-180-seconds/29568 "2019-01-30T03:21:27Z")

</div>

We have (GCP) GCE instance start and instance stop playbooks. Tonight’s execution was the stop of 8 GCE instances at once. The main script is kicked off and the playbooks run in background. We are seeing this error - A…

---

## [Parsing json output from uri module](https://forum.ansible.com/t/parsing-json-output-from-uri-module/29537)

<div class="topic-metadata">

**Author:** [@Tony\_Owens](https://forum.ansible.com/u/Tony_Owens)\
**Replies:** 3\
**Last updated:** [January 30, 2019, 3:10am UTC](https://forum.ansible.com/t/parsing-json-output-from-uri-module/29537 "2019-01-30T03:10:02Z")

</div>

I’m trying to parse the output of a uri request that I have saved in a variable named “apis”. Ultimately i will want to match several items when AnonymousAccessAllowed=true but I’m not having success. Any help would be a…

---

## [merging specific group\_vars without changing global behavior](https://forum.ansible.com/t/merging-specific-group-vars-without-changing-global-behavior/29567)

<div class="topic-metadata">

**Author:** [@Adam\_E](https://forum.ansible.com/u/Adam_E)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 1:40am UTC](https://forum.ansible.com/t/merging-specific-group-vars-without-changing-global-behavior/29567 "2019-01-30T01:40:44Z")

</div>

In my environment i have a group\_vars structure something like the following: \` \[global:children\] datacenter1 \[datacenter1:children\] network\_zone1 network\_zone2 \[network\_zone1\] server1 \[network\_zone2\] server2 …

---

## [ERROR! Problem running vault password script /root/.vault\_pass (\[Errno 8\] Exec format error). If this is not a script, remove the executable bit from the file](https://forum.ansible.com/t/error-problem-running-vault-password-script-root-vault-pass-errno-8-exec-format-error-if-this-is-not-a-script-remove-the-executable-bit-from-the-file/29566)

<div class="topic-metadata">

**Author:** [@Jason\_Yu](https://forum.ansible.com/u/Jason_Yu)\
**Replies:** 1\
**Last updated:** [January 29, 2019, 11:59pm UTC](https://forum.ansible.com/t/error-problem-running-vault-password-script-root-vault-pass-errno-8-exec-format-error-if-this-is-not-a-script-remove-the-executable-bit-from-the-file/29566 "2019-01-29T23:59:37Z")

</div>

I got the following error when I ran an ansible script from a docker container. It looks like the executable bit needs to be reset. I am using docker for windows which is running on my windows 10 desktop. Could anyone he…

---

## [Tags in loop](https://forum.ansible.com/t/tags-in-loop/29561)

<div class="topic-metadata">

**Author:** [@Rafael\_Tomelin](https://forum.ansible.com/u/Rafael_Tomelin)\
**Replies:** 3\
**Last updated:** [January 29, 2019, 11:44pm UTC](https://forum.ansible.com/t/tags-in-loop/29561 "2019-01-29T23:44:29Z")

</div>

Hi dear, I need create tag in my role, this example: vars/main.yml name\_variable: tags: key1: value1 key2: value2 in tasks taks/main.yml - name: name my task user: name tags: tags f…

---

## [Iterating through stdout\_lines (jinja formatted data) and returning data](https://forum.ansible.com/t/iterating-through-stdout-lines-jinja-formatted-data-and-returning-data/29564)

<div class="topic-metadata">

**Author:** [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Replies:** 1\
**Last updated:** [January 29, 2019, 9:52pm UTC](https://forum.ansible.com/t/iterating-through-stdout-lines-jinja-formatted-data-and-returning-data/29564 "2019-01-29T21:52:11Z")

</div>

I wish to automate user removal from nagios. This can be done via their REST api; however, I first need to find the user, grab their user\_id, and then I can perform the delete based on the user\_id. Their API returns…

---

## [How ansible works? without an agent on target device](https://forum.ansible.com/t/how-ansible-works-without-an-agent-on-target-device/29555)

<div class="topic-metadata">

**Author:** [@Ethashamuddin\_Mohamm](https://forum.ansible.com/u/Ethashamuddin_Mohamm)\
**Replies:** 1\
**Last updated:** [January 29, 2019, 8:30pm UTC](https://forum.ansible.com/t/how-ansible-works-without-an-agent-on-target-device/29555 "2019-01-29T20:30:11Z")

</div>

Without an agent on target host, Ansible is able to perform tasks like for example: adding a user(-m user). Here are the list of all modules To understand this, I read this article, which says: “Ansible works by conne…

---

## [Change password using script](https://forum.ansible.com/t/change-password-using-script/29563)

<div class="topic-metadata">

**Author:** [@mboncalo](https://forum.ansible.com/u/mboncalo)\
**Replies:** 4\
**Last updated:** [January 29, 2019, 7:32pm UTC](https://forum.ansible.com/t/change-password-using-script/29563 "2019-01-29T19:32:47Z")

</div>

Hi guys, I kinda feel ashamed asking this kind of questions but I'm currently still learning Ansible, only started a week ago and I have to complete this as a part of a personal project that I will present. I wrote a…

---

## [Running yum updates with ansible](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556)

<div class="topic-metadata">

**Author:** [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Replies:** 8\
**Last updated:** [January 29, 2019, 6:30pm UTC](https://forum.ansible.com/t/running-yum-updates-with-ansible/29556 "2019-01-29T18:30:54Z")

</div>

Hey all, So I’ve done a lot of yum updates with ansible and several times I get issues where partial updates are run and it says it’s been completed, however, I reboot and I’m in a kernel panic because the new kernel di…

---

## [Block & rescue misconception](https://forum.ansible.com/t/block-rescue-misconception/29548)

<div class="topic-metadata">

**Author:** [@sergio.fernandez](https://forum.ansible.com/u/sergio.fernandez)\
**Replies:** 3\
**Last updated:** [January 29, 2019, 2:57pm UTC](https://forum.ansible.com/t/block-rescue-misconception/29548 "2019-01-29T14:57:27Z")

</div>

Hi all, I’m using Ansible 2.5.11, using the EC2 dynamic inventory script. I’m trying to do some tasks over an instance with a role using block and rescue, so if one of the tasks fails, the rescue task runs (removing the…

---

## [Porting playbooks from Ansible 2.4 to newer version](https://forum.ansible.com/t/porting-playbooks-from-ansible-2-4-to-newer-version/29342)

<div class="topic-metadata">

**Author:** [@Julien\_Deloubes](https://forum.ansible.com/u/Julien_Deloubes)\
**Replies:** 4\
**Last updated:** [January 29, 2019, 12:26pm UTC](https://forum.ansible.com/t/porting-playbooks-from-ansible-2-4-to-newer-version/29342 "2019-01-29T12:26:01Z")

</div>

Hi there, we have a bunch of playbooks and roles, all written in Ansible version \>= 2.4 I need to audit all our playbooks in order to migrate to a more recent version. There are a lot of changes from 2.4 to 2.5 mainly…

---

## [Ansible running command in two hosts and compare the outputs in one playbook](https://forum.ansible.com/t/ansible-running-command-in-two-hosts-and-compare-the-outputs-in-one-playbook/29558)

<div class="topic-metadata">

**Author:** [@ansiblekrazy](https://forum.ansible.com/u/ansiblekrazy)\
**Replies:** 0\
**Last updated:** [January 29, 2019, 7:50am UTC](https://forum.ansible.com/t/ansible-running-command-in-two-hosts-and-compare-the-outputs-in-one-playbook/29558 "2019-01-29T07:50:00Z")

</div>

Ask Question -1 I’ve one playbook which runs on 2,3 hosts. I want to compare output of a command run on host 1 with output of command run on host 2 Something like below - hosts: 1,2,3 tasks: - name: Check file…

---

## [Access  same variable with different value from multiple json files](https://forum.ansible.com/t/access-same-variable-with-different-value-from-multiple-json-files/29557)

<div class="topic-metadata">

**Author:** [@Coding](https://forum.ansible.com/u/Coding)\
**Replies:** 0\
**Last updated:** [January 29, 2019, 2:20am UTC](https://forum.ansible.com/t/access-same-variable-with-different-value-from-multiple-json-files/29557 "2019-01-29T02:20:52Z")

</div>

I have multiple json files look like this: temp/file-a.json: { “x”: 5”, “y”: “name1”, } tmp/file-b.jsob: { “x”: “10”, “y”: “name2”, } tmp/file-c.json: { “x”: “7”, “y”: “name3”, …

---

## [set\_fact with default value of type string](https://forum.ansible.com/t/set-fact-with-default-value-of-type-string/29552)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 2\
**Last updated:** [January 28, 2019, 10:09pm UTC](https://forum.ansible.com/t/set-fact-with-default-value-of-type-string/29552 "2019-01-28T22:09:28Z")

</div>

I know I can define the variable previous to this, but I am wondering if I can combine setting a variable with a default value within set\_fact. If possible, I wonder if my syntax is wrong (likely)? I can’t seem to find m…

---

## [Boot signal from a remote Pi](https://forum.ansible.com/t/boot-signal-from-a-remote-pi/29535)

<div class="topic-metadata">

**Author:** [@Sergio\_Fernandez](https://forum.ansible.com/u/Sergio_Fernandez)\
**Replies:** 1\
**Last updated:** [January 28, 2019, 10:01pm UTC](https://forum.ansible.com/t/boot-signal-from-a-remote-pi/29535 "2019-01-28T22:01:15Z")

</div>

Hi there! I would like to know the best way to perform this: I will be using the Vault (from Hashicorp) to store API keys for my app, so I will be storing the Vault Token in my Raspberry Pi, inside a tmpfs mount, so ev…

---

## [Ansible parse variables with special characters](https://forum.ansible.com/t/ansible-parse-variables-with-special-characters/29549)

<div class="topic-metadata">

**Author:** [@pnagaraj7656](https://forum.ansible.com/u/pnagaraj7656)\
**Replies:** 2\
**Last updated:** [January 28, 2019, 9:48pm UTC](https://forum.ansible.com/t/ansible-parse-variables-with-special-characters/29549 "2019-01-28T21:48:16Z")

</div>

I need to pass certain strings with special characters like $ to variables. I was able to parse by providing the values in single quotes or using \\ when the string contains a single $ . Ex below x is my variable. X : …

---

## [Ansible module yum module](https://forum.ansible.com/t/ansible-module-yum-module/29551)

<div class="topic-metadata">

**Author:** [@Anand\_Vamsi](https://forum.ansible.com/u/Anand_Vamsi)\
**Replies:** 0\
**Last updated:** [January 28, 2019, 6:15pm UTC](https://forum.ansible.com/t/ansible-module-yum-module/29551 "2019-01-28T18:15:57Z")

</div>

Ansible Team- I’m in situation where i need to remove a package without removing the dependencies using yum module for centos/redhat. I don’t see any option in Ansible yum reference page which exclude deps. Only optio…

---

## [Create variables in hash](https://forum.ansible.com/t/create-variables-in-hash/29531)

<div class="topic-metadata">

**Author:** [@Rafael\_Tomelin](https://forum.ansible.com/u/Rafael_Tomelin)\
**Replies:** 2\
**Last updated:** [January 28, 2019, 4:43pm UTC](https://forum.ansible.com/t/create-variables-in-hash/29531 "2019-01-28T16:43:07Z")

</div>

Hi dear, How can create variables in hash, example:

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

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