# Ansible Project

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

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

**Page:** 209

---

## [scaleway inventory plugin does not list some (not running) hosts](https://forum.ansible.com/t/scaleway-inventory-plugin-does-not-list-some-not-running-hosts/29620)

<div class="topic-metadata">

**Author:** [@Oleg\_Semyonov](https://forum.ansible.com/u/Oleg_Semyonov)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 11:01am UTC](https://forum.ansible.com/t/scaleway-inventory-plugin-does-not-list-some-not-running-hosts/29620 "2019-02-05T11:01:22Z")

</div>

I am trying to use scaleway dynamic inventory plugin with scaleway module to manage cloud VPS farm. The desired workflow is: \[inv:localhost\] - add VPS host to scaleway via scaleway\_compute module (state: running, wait:…

---

## [ansible k8s module failing to connect to cluster with 503](https://forum.ansible.com/t/ansible-k8s-module-failing-to-connect-to-cluster-with-503/29618)

<div class="topic-metadata">

**Author:** [@Alon\_Nisser](https://forum.ansible.com/u/Alon_Nisser)\
**Replies:** 2\
**Last updated:** [February 5, 2019, 7:27am UTC](https://forum.ansible.com/t/ansible-k8s-module-failing-to-connect-to-cluster-with-503/29618 "2019-02-05T07:27:06Z")

</div>

I’m trying to use ansible new k8s module (based ok k8\_raw from 2.6) to maintain an aks k8 cluster. While I can work with the cluster with kubectl , any command with the k8s cluster fails with a 503 error. For example th…

---

## [Ansible Project](https://forum.ansible.com/t/ansible-project/29617)

<div class="topic-metadata">

**Author:** [@Siva\_Sundari](https://forum.ansible.com/u/Siva_Sundari)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 6:31am UTC](https://forum.ansible.com/t/ansible-project/29617 "2019-02-05T06:31:20Z")

</div>

www.ansible.com. In computing, Ansible is an open-source software provisioning, configuration management, and application deployment tool. It runs on many Unix-like systems, and can configure both Unix-like systems as we…

---

## [long nasty filter chain](https://forum.ansible.com/t/long-nasty-filter-chain/29615)

<div class="topic-metadata">

**Author:** [@Luca\_Cazzaniga](https://forum.ansible.com/u/Luca_Cazzaniga)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 2:39am UTC](https://forum.ansible.com/t/long-nasty-filter-chain/29615 "2019-02-05T02:39:21Z")

</div>

Hi all I’ve some variables scattered in my roles dirs: fstype: \[ ‘xfs’, ‘ext4’, ‘ext3’, ‘btrfs’, ‘ufs’ \] #enable check on all partition of the listed types default\_limit: { limit: 90, unit: ‘%’ } mountpoints: { moun…

---

## [How to run a playbook or command against AWS](https://forum.ansible.com/t/how-to-run-a-playbook-or-command-against-aws/29613)

<div class="topic-metadata">

**Author:** [@Ed\_Greenberg](https://forum.ansible.com/u/Ed_Greenberg)\
**Replies:** 1\
**Last updated:** [February 4, 2019, 6:23pm UTC](https://forum.ansible.com/t/how-to-run-a-playbook-or-command-against-aws/29613 "2019-02-04T18:23:03Z")

</div>

So I have my AWS ACCESS and SECRET keys sitting in environment variables. I have Ansible working, and BOTO installed. I have this little playbook:

---

## [Is there a way to get current task name?](https://forum.ansible.com/t/is-there-a-way-to-get-current-task-name/29524)

<div class="topic-metadata">

**Author:** [@Lionel\_Felicite](https://forum.ansible.com/u/Lionel_Felicite)\
**Replies:** 3\
**Last updated:** [February 4, 2019, 4:53pm UTC](https://forum.ansible.com/t/is-there-a-way-to-get-current-task-name/29524 "2019-02-04T16:53:43Z")

</div>

Hi all, Is there a way to get the current task name? With this example plyabook, I got an undefined “name” variable hosts: all tasks: name: Dump all vars debug: msg: “echo task name is {{ name }}” Error mess…

---

## [Dynamicly finding a disk](https://forum.ansible.com/t/dynamicly-finding-a-disk/29610)

<div class="topic-metadata">

**Author:** [@Keif\_Gwinn1](https://forum.ansible.com/u/Keif_Gwinn1)\
**Replies:** 0\
**Last updated:** [February 4, 2019, 2:58pm UTC](https://forum.ansible.com/t/dynamicly-finding-a-disk/29610 "2019-02-04T14:58:06Z")

</div>

Hi, I’m trying to dynamically identify a disk based on the device Ids {“ids”: { “sda”: \[“google-persistent-disk-0”, “scsi-0Google\_PersistentDisk\_persistent-disk-0”\], “sda1”: \[“google-persistent-disk-0-part1”,“scsi-0G…

---

## [Defined variable when value different](https://forum.ansible.com/t/defined-variable-when-value-different/29597)

<div class="topic-metadata">

**Author:** [@Rafael\_Tomelin](https://forum.ansible.com/u/Rafael_Tomelin)\
**Replies:** 7\
**Last updated:** [February 4, 2019, 1:21pm UTC](https://forum.ansible.com/t/defined-variable-when-value-different/29597 "2019-02-04T13:21:46Z")

</div>

Hi, How defined variable value when other variable for different the 1. Exemplo vars: networkinterface\_number: 1 name: Create network interface azure\_rm\_networkinterface: name: “interface{{networkinterface\_number…

---

## [Configure the ssh connection plugin to add ssh proxy and user information to the hostname when connecting](https://forum.ansible.com/t/configure-the-ssh-connection-plugin-to-add-ssh-proxy-and-user-information-to-the-hostname-when-connecting/29581)

<div class="topic-metadata">

**Author:** [@Urs\_Lamprecht](https://forum.ansible.com/u/Urs_Lamprecht)\
**Replies:** 1\
**Last updated:** [February 4, 2019, 1:13pm UTC](https://forum.ansible.com/t/configure-the-ssh-connection-plugin-to-add-ssh-proxy-and-user-information-to-the-hostname-when-connecting/29581 "2019-02-04T13:13:34Z")

</div>

We are forced to use CyberArc PSM Proxy which describes itself as a “ssh proxy”. For what I know this is not a jump host / bastion host solution ! I can not access my target servers directly, the only open ssh port is th…

---

## [Error while executing my PB](https://forum.ansible.com/t/error-while-executing-my-pb/29608)

<div class="topic-metadata">

**Author:** [@Zaineb\_Masmoudi](https://forum.ansible.com/u/Zaineb_Masmoudi)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 9:43am UTC](https://forum.ansible.com/t/error-while-executing-my-pb/29608 "2019-02-04T09:43:45Z")

</div>

Hi all, I’m facing this error while I’m executing my PB: TASK \[Exchange intersec keys between servers\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Non zero return code error | Sophos Installation | Windows](https://forum.ansible.com/t/non-zero-return-code-error-sophos-installation-windows/29606)

<div class="topic-metadata">

**Author:** [@yyellapragada](https://forum.ansible.com/u/yyellapragada)\
**Replies:** 1\
**Last updated:** [February 4, 2019, 4:43am UTC](https://forum.ansible.com/t/non-zero-return-code-error-sophos-installation-windows/29606 "2019-02-04T04:43:28Z")

</div>

Hey Team, Please see the error in the screenshot. I get an error that has no useful information to debug, to the best of my knowledge. Might be I am missing something which I was hoping you can help me find. Please …

---

## [How to handle host unreachable error in a playbook](https://forum.ansible.com/t/how-to-handle-host-unreachable-error-in-a-playbook/29607)

<div class="topic-metadata">

**Author:** [@Saravanan](https://forum.ansible.com/u/Saravanan)\
**Replies:** 0\
**Last updated:** [February 4, 2019, 3:10am UTC](https://forum.ansible.com/t/how-to-handle-host-unreachable-error-in-a-playbook/29607 "2019-02-04T03:10:42Z")

</div>

Hi Ansible Experts, We would need to check the fail-over check of remote servers in the beginning of the play and delegate them during the play execution when its reachable. \`

---

## [jinja2 template with dictionary](https://forum.ansible.com/t/jinja2-template-with-dictionary/29605)

<div class="topic-metadata">

**Author:** [@Ashok1](https://forum.ansible.com/u/Ashok1)\
**Replies:** 0\
**Last updated:** [February 3, 2019, 10:06pm UTC](https://forum.ansible.com/t/jinja2-template-with-dictionary/29605 "2019-02-03T22:06:47Z")

</div>

I have the following dict: syslog\_clients: mailout: hosts: “\[ ‘10.5.10.111’, ‘10.5.10.112’, ‘10.5.10.11’ \]” destinations: destination: ‘/logs/mail/mail.log’ apache: hosts: “\[ ‘10.5.13.24’, ‘10.5.13.25’, ‘10.5.…

---

## [set\_fact with\_items inside var](https://forum.ansible.com/t/set-fact-with-items-inside-var/29604)

<div class="topic-metadata">

**Author:** [@Tony\_Owens](https://forum.ansible.com/u/Tony_Owens)\
**Replies:** 2\
**Last updated:** [February 3, 2019, 8:21pm UTC](https://forum.ansible.com/t/set-fact-with-items-inside-var/29604 "2019-02-03T20:21:12Z")

</div>

I need to add an item to a list. This works: name: “Build Pool IP List” set\_fact: pool\_server\_ips\_list: “{{pool\_server\_ips\_list}} + \[{‘ip’: {‘addr’: item, ‘type’: ‘V4’}}\]” with\_items: “{{pool\_server\_ips}}” with thi…

---

## [Install and Configure Gluster File System](https://forum.ansible.com/t/install-and-configure-gluster-file-system/29603)

<div class="topic-metadata">

**Author:** [@Ameya\_Agashe](https://forum.ansible.com/u/Ameya_Agashe)\
**Replies:** 1\
**Last updated:** [February 3, 2019, 1:18pm UTC](https://forum.ansible.com/t/install-and-configure-gluster-file-system/29603 "2019-02-03T13:18:16Z")

</div>

Hi Guys, I’m not sure why the below yaml gives me an error ? name: Install Gluster and create file system on Cluster hosts: localhost connection: local tasks: name: create gluster volume gluster\_volume: state: pr…

---

## [loop over dict2items](https://forum.ansible.com/t/loop-over-dict2items/29602)

<div class="topic-metadata">

**Author:** [@Luca\_Cazzaniga](https://forum.ansible.com/u/Luca_Cazzaniga)\
**Replies:** 1\
**Last updated:** [February 2, 2019, 7:03pm UTC](https://forum.ansible.com/t/loop-over-dict2items/29602 "2019-02-02T19:03:23Z")

</div>

Hi all, trying the following playbook taken from user\_guide/playbooks\_loops.html - hosts: localhost tasks: - name: create a tag dictionary of non-empty tags set\_fact: tags\_dict: "{{ (tags\_dict|default({})…

---

## [Does Ansible prevent 2 Tasks from modifying the same part of a system?(thus, Task 2 undoing what Task 1 did)](https://forum.ansible.com/t/does-ansible-prevent-2-tasks-from-modifying-the-same-part-of-a-system-thus-task-2-undoing-what-task-1-did/29530)

<div class="topic-metadata">

**Author:** [@Sylvain\_Martel](https://forum.ansible.com/u/Sylvain_Martel)\
**Replies:** 2\
**Last updated:** [February 2, 2019, 1:27pm UTC](https://forum.ansible.com/t/does-ansible-prevent-2-tasks-from-modifying-the-same-part-of-a-system-thus-task-2-undoing-what-task-1-did/29530 "2019-02-02T13:27:38Z")

</div>

Hi, We are new to using ansible, and I saw something while going through our early code that had me worried. I have CoderA and CoderB that are starting to create roles and tasks. In one Task, coderA adds IIS features, b…

---

## [Calling a variable within a variable within a jinja pipe filter](https://forum.ansible.com/t/calling-a-variable-within-a-variable-within-a-jinja-pipe-filter/29565)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 4\
**Last updated:** [February 2, 2019, 12:22pm UTC](https://forum.ansible.com/t/calling-a-variable-within-a-variable-within-a-jinja-pipe-filter/29565 "2019-02-02T12:22:59Z")

</div>

I am trying to do two things: Call a variable while trying to set\_fact within a jinja pipe filter Prevent fails when the user isn’t found \` name: “Find the user\_id for {{ user }}” set\_fact: uid: “{{ (userinfo.json…

---

## [Access specific elements using with\_items / with\_subelememts](https://forum.ansible.com/t/access-specific-elements-using-with-items-with-subelememts/29543)

<div class="topic-metadata">

**Author:** [@Saranya\_N](https://forum.ansible.com/u/Saranya_N)\
**Replies:** 4\
**Last updated:** [February 2, 2019, 12:09pm UTC](https://forum.ansible.com/t/access-specific-elements-using-with-items-with-subelememts/29543 "2019-02-02T12:09:36Z")

</div>

I have a variable file with dictionary under a role like below format : Applformat: - Appname : app-main Parameters: - x : a Y : b Z : c - x : d Y : e …

---

## [Issue with vmware\_guest\_snapshot module](https://forum.ansible.com/t/issue-with-vmware-guest-snapshot-module/24494)

<div class="topic-metadata">

**Author:** [@americanoz](https://forum.ansible.com/u/americanoz)\
**Replies:** 12\
**Last updated:** [February 2, 2019, 10:54am UTC](https://forum.ansible.com/t/issue-with-vmware-guest-snapshot-module/24494 "2019-02-02T10:54:02Z")

</div>

Hi all, I have been having an issue with trying to get this module working correctly. I believe it is the way I am laying out the code. I have seen some solutions from Kai and he seems to have a very good handle on it s…

---

## [Ansible Playbook ssh connectivity fails only on a particular server](https://forum.ansible.com/t/ansible-playbook-ssh-connectivity-fails-only-on-a-particular-server/29600)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 0\
**Last updated:** [February 2, 2019, 6:12am UTC](https://forum.ansible.com/t/ansible-playbook-ssh-connectivity-fails-only-on-a-particular-server/29600 "2019-02-02T06:12:32Z")

</div>

Below ansible-playbook connectivity works fine for all my servers except server2. Below command fails. \` ansible-playbook -vvvv /opt/test/scripts/Auto/site.yml -i /opt/test/scripts/Auto/hosts.txt -e “source\_host=server…

---

## [removing a domain form sssd.conf](https://forum.ansible.com/t/removing-a-domain-form-sssd-conf/29592)

<div class="topic-metadata">

**Author:** [@Lewis\_Carroll](https://forum.ansible.com/u/Lewis_Carroll)\
**Replies:** 3\
**Last updated:** [February 2, 2019, 1:33am UTC](https://forum.ansible.com/t/removing-a-domain-form-sssd-conf/29592 "2019-02-02T01:33:13Z")

</div>

I am trying to figure out how to use replace or lineinfile to remove a domain entry in sssd.conf. Here is example: \[domain/example\] cache\_credentials = false enumerate = true ldap\_schema = rfc2307 ldap\_rfc2307\_fall…

---

## [How to import/load env/ini file that is located in file on the Remote/Target server?](https://forum.ansible.com/t/how-to-import-load-env-ini-file-that-is-located-in-file-on-the-remote-target-server/29416)

<div class="topic-metadata">

**Author:** [@Chaz\_E](https://forum.ansible.com/u/Chaz_E)\
**Replies:** 7\
**Last updated:** [February 2, 2019, 12:29am UTC](https://forum.ansible.com/t/how-to-import-load-env-ini-file-that-is-located-in-file-on-the-remote-target-server/29416 "2019-02-02T00:29:49Z")

</div>

QUESTION: How can we load or import an env/ini file that is located in a file on the Remote/Target server? GOAL: We have an env/ini file on the remote/target server. We want to read in that file and use the values as …

---

## [Cisco Show Power Inline command with Ansible](https://forum.ansible.com/t/cisco-show-power-inline-command-with-ansible/29584)

<div class="topic-metadata">

**Author:** [@Michael\_Ikram](https://forum.ansible.com/u/Michael_Ikram)\
**Replies:** 1\
**Last updated:** [February 1, 2019, 10:00pm UTC](https://forum.ansible.com/t/cisco-show-power-inline-command-with-ansible/29584 "2019-02-01T22:00:01Z")

</div>

Hi There, I have a request to match a specific line in output of show power inline command below, mainly I need to extract line number 4 from below: DP-M-R4-C9K#sh power inline Module Available Used Remaining (Watts)…

---

## [Updating Ansible hosts inventory dynamically](https://forum.ansible.com/t/updating-ansible-hosts-inventory-dynamically/29596)

<div class="topic-metadata">

**Author:** [@Subhi\_Andrews](https://forum.ansible.com/u/Subhi_Andrews)\
**Replies:** 3\
**Last updated:** [February 1, 2019, 8:51pm UTC](https://forum.ansible.com/t/updating-ansible-hosts-inventory-dynamically/29596 "2019-02-01T20:51:46Z")

</div>

We have our hosts inventory organized by environments. We tend to have alpha versions of software deployed in our test environment. Are there any thoughts on keeping the inventory dynamically updated if we decide to move…

---

## [Ansible Inventory file](https://forum.ansible.com/t/ansible-inventory-file/29588)

<div class="topic-metadata">

**Author:** [@Deepak\_Sharma1](https://forum.ansible.com/u/Deepak_Sharma1)\
**Replies:** 6\
**Last updated:** [February 1, 2019, 8:07pm UTC](https://forum.ansible.com/t/ansible-inventory-file/29588 "2019-02-01T20:07:09Z")

</div>

Hi Everyone, I am new to Ansible , I have created new inventory yml file with below details . KafkaNonprodservers: hosts: abc.abc.com:2022 abd.abd.com:2022 ansible\_user : abc but I am getting below error ansible…

---

## [win\_task\_scheduler - setting memory and io priority](https://forum.ansible.com/t/win-task-scheduler-setting-memory-and-io-priority/29595)

<div class="topic-metadata">

**Author:** [@Subhi\_Andrews](https://forum.ansible.com/u/Subhi_Andrews)\
**Replies:** 0\
**Last updated:** [February 1, 2019, 7:03pm UTC](https://forum.ansible.com/t/win-task-scheduler-setting-memory-and-io-priority/29595 "2019-02-01T19:03:14Z")

</div>

Is there a way to do this via win\_task\_scheduler or otherwise? Priority setting in win\_task\_scheduler only affects process priority and not IO/mem priorities. Anyone has any suggestions?

---

## [become\_flags for specific inventory host](https://forum.ansible.com/t/become-flags-for-specific-inventory-host/29582)

<div class="topic-metadata">

**Author:** [@Bruno\_Cochofel](https://forum.ansible.com/u/Bruno_Cochofel)\
**Replies:** 2\
**Last updated:** [February 1, 2019, 12:09pm UTC](https://forum.ansible.com/t/become-flags-for-specific-inventory-host/29582 "2019-02-01T12:09:37Z")

</div>

Hi, I have the need to configure become\_flags var for some of my inventory hosts (because of old sudo versions not accepting " -H -S -n"). I was trying to do this on my dynamic inventory with hostvars for that host, bu…

---

## [Ansible play to check if port is up on windows target host](https://forum.ansible.com/t/ansible-play-to-check-if-port-is-up-on-windows-target-host/29587)

<div class="topic-metadata">

**Author:** [@Mauricio\_Tavares](https://forum.ansible.com/u/Mauricio_Tavares)\
**Replies:** 0\
**Last updated:** [February 1, 2019, 5:03am UTC](https://forum.ansible.com/t/ansible-play-to-check-if-port-is-up-on-windows-target-host/29587 "2019-02-01T05:03:33Z")

</div>

Maybe https://docs.ansible.com/ansible/latest/modules/win\_wait\_for\_module.html instead?

---

## [Network, vars, and role housecleaning](https://forum.ansible.com/t/network-vars-and-role-housecleaning/29586)

<div class="topic-metadata">

**Author:** [@Mauricio\_Tavares](https://forum.ansible.com/u/Mauricio_Tavares)\
**Replies:** 0\
**Last updated:** [February 1, 2019, 4:32am UTC](https://forum.ansible.com/t/network-vars-and-role-housecleaning/29586 "2019-02-01T04:32:26Z")

</div>

So I need to define lots of variables for a specific host because I am configuring its network (turning more interfaces on and whatnot). So I created a host\_vars/oddhost.yml that have lines like this: home\_nic: "eth0" …

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

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