# Ansible Project

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

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

**Page:** 228

---

## [Changing http port for a host that ansible uses to connect to a host](https://forum.ansible.com/t/changing-http-port-for-a-host-that-ansible-uses-to-connect-to-a-host/28865)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 0\
**Last updated:** [October 24, 2018, 6:23pm UTC](https://forum.ansible.com/t/changing-http-port-for-a-host-that-ansible-uses-to-connect-to-a-host/28865 "2018-10-24T18:23:13Z")

</div>

You're mixing a few things up here. 1. Ansible doesn't have anything to do with 'http'. The only thing it uses is SSH, which runs op port 22 by default. 2. If you want to run this on a different port, use the 'ansible…

---

## [Unable to parse ansible/contrib/inventory/ec2.py as an inventory source](https://forum.ansible.com/t/unable-to-parse-ansible-contrib-inventory-ec2-py-as-an-inventory-source/28848)

<div class="topic-metadata">

**Author:** [@heguimin36](https://forum.ansible.com/u/heguimin36)\
**Replies:** 11\
**Last updated:** [October 24, 2018, 6:17pm UTC](https://forum.ansible.com/t/unable-to-parse-ansible-contrib-inventory-ec2-py-as-an-inventory-source/28848 "2018-10-24T18:17:15Z")

</div>

When I run the following command in the directory ansible/contrib/inventory ansible -i ec2.py all -m ping and I got the following error: \[WARNING\]: \* Failed to parse /Users/hehe/Projects/python/ansible/contrib/invent…

---

## [Diffculty with registering the script output](https://forum.ansible.com/t/diffculty-with-registering-the-script-output/28856)

<div class="topic-metadata">

**Author:** [@itssitaram9](https://forum.ansible.com/u/itssitaram9)\
**Replies:** 2\
**Last updated:** [October 24, 2018, 1:30pm UTC](https://forum.ansible.com/t/diffculty-with-registering-the-script-output/28856 "2018-10-24T13:30:13Z")

</div>

I am trying to execute a shut down script and Shut down remote server upon successful execution of the script . I do not want to shutdown the server when the script fails. I did write the play book below, but it is thr…

---

## [how to pass ansible variables from Jenkins by  using parameters](https://forum.ansible.com/t/how-to-pass-ansible-variables-from-jenkins-by-using-parameters/28857)

<div class="topic-metadata">

**Author:** [@kumar\_kittu](https://forum.ansible.com/u/kumar_kittu)\
**Replies:** 2\
**Last updated:** [October 24, 2018, 9:55am UTC](https://forum.ansible.com/t/how-to-pass-ansible-variables-from-jenkins-by-using-parameters/28857 "2018-10-24T09:55:18Z")

</div>

Hello All, I have ansible-playbook which has variables defined and that playbook is executed successfully from jenkins by creating job. my query is : I need to pass ansible variables defined in playbook from jenkins ,…

---

## [Complex host patterns](https://forum.ansible.com/t/complex-host-patterns/28849)

<div class="topic-metadata">

**Author:** [@Gonzalo\_Servat](https://forum.ansible.com/u/Gonzalo_Servat)\
**Replies:** 8\
**Last updated:** [October 24, 2018, 1:27am UTC](https://forum.ansible.com/t/complex-host-patterns/28849 "2018-10-24T01:27:58Z")

</div>

Hi All When working with host patterns, is it possible to craft one that says “must be in group X and must be in either group Y, W and Z”? e.g. host must be in group “webserver” but it must also be in either group dc1,…

---

## [Could not match supplied host pattern issue](https://forum.ansible.com/t/could-not-match-supplied-host-pattern-issue/28840)

<div class="topic-metadata">

**Author:** [@Johar\_K\_Kwan](https://forum.ansible.com/u/Johar_K_Kwan)\
**Replies:** 3\
**Last updated:** [October 24, 2018, 1:06am UTC](https://forum.ansible.com/t/could-not-match-supplied-host-pattern-issue/28840 "2018-10-24T01:06:54Z")

</div>

Hi All, I have few Ansible tasks as follow: Provisioning VM using vmware (no issue) Adding new vm host into tower inventory (no issue) Install new package to new VM (Issue) My question is why Ansible can’t locate my …

---

## [Ansible Playbook fails with syntax error](https://forum.ansible.com/t/ansible-playbook-fails-with-syntax-error/28855)

<div class="topic-metadata">

**Author:** [@Tony\_Esposito](https://forum.ansible.com/u/Tony_Esposito)\
**Replies:** 0\
**Last updated:** [October 23, 2018, 9:08pm UTC](https://forum.ansible.com/t/ansible-playbook-fails-with-syntax-error/28855 "2018-10-23T21:08:32Z")

</div>

It was determined that this playbook that was failing was not even being used by Ansible. It was a ‘test’ playbook so I am going to ‘pass’ on even answering this one.

---

## [Error add host to host collection with uri module api rest operations with satellite](https://forum.ansible.com/t/error-add-host-to-host-collection-with-uri-module-api-rest-operations-with-satellite/28850)

<div class="topic-metadata">

**Author:** [@Alberto\_Jimenez\_Loza](https://forum.ansible.com/u/Alberto_Jimenez_Loza)\
**Replies:** 6\
**Last updated:** [October 23, 2018, 4:42pm UTC](https://forum.ansible.com/t/error-add-host-to-host-collection-with-uri-module-api-rest-operations-with-satellite/28850 "2018-10-23T16:42:49Z")

</div>

I’m working wit uri module with satellite. I do one playbook for create a new host\_collection and it works OK. name: CREATE HC uri: url: “https://xxxxxx/katello/api/host\_collections/” user: “{{user}}” password: “{…

---

## [Get Field with equal condition from json generated ansible 2.5.2 uri module](https://forum.ansible.com/t/get-field-with-equal-condition-from-json-generated-ansible-2-5-2-uri-module/28844)

<div class="topic-metadata">

**Author:** [@Alberto\_Jimenez\_Loza](https://forum.ansible.com/u/Alberto_Jimenez_Loza)\
**Replies:** 6\
**Last updated:** [October 23, 2018, 2:30pm UTC](https://forum.ansible.com/t/get-field-with-equal-condition-from-json-generated-ansible-2-5-2-uri-module/28844 "2018-10-23T14:30:08Z")

</div>

I need get a field into a json what has been generated wit uri module. This is my json that contains two hosts colections hc1 y hc2. I want to get the field id:693 of the host\_collection hc1. "created\_at":…

---

## [Is there a Playbook available for finding out CPU usage and Disk Utilization for Linux flavors](https://forum.ansible.com/t/is-there-a-playbook-available-for-finding-out-cpu-usage-and-disk-utilization-for-linux-flavors/28851)

<div class="topic-metadata">

**Author:** [@Vinu\_Vajravel](https://forum.ansible.com/u/Vinu_Vajravel)\
**Replies:** 3\
**Last updated:** [October 23, 2018, 1:32pm UTC](https://forum.ansible.com/t/is-there-a-playbook-available-for-finding-out-cpu-usage-and-disk-utilization-for-linux-flavors/28851 "2018-10-23T13:32:22Z")

</div>

Is there a Playbook available for finding out CPU usage and Disk Utilization for Linux flavors

---

## [Galaxy’s new quality scoring of roles - feedback requested](https://forum.ansible.com/t/galaxy-s-new-quality-scoring-of-roles-feedback-requested/28847)

<div class="topic-metadata">

**Author:** [@acrosby](https://forum.ansible.com/u/acrosby)\
**Replies:** 1\
**Last updated:** [October 23, 2018, 6:28am UTC](https://forum.ansible.com/t/galaxy-s-new-quality-scoring-of-roles-feedback-requested/28847 "2018-10-23T06:28:43Z")

</div>

Ansible Galaxy 3.1 will introduce quality scoring of roles - you can try this out now in the galaxy dev environment: https://galaxy-dev.ansible.com. We hope quality scores will provide another datapoint to help users com…

---

## [Ansible Vault - store credentials for all hosts in one vault file](https://forum.ansible.com/t/ansible-vault-store-credentials-for-all-hosts-in-one-vault-file/28841)

<div class="topic-metadata">

**Author:** [@Libor\_Burda](https://forum.ansible.com/u/Libor_Burda)\
**Replies:** 2\
**Last updated:** [October 23, 2018, 1:48am UTC](https://forum.ansible.com/t/ansible-vault-store-credentials-for-all-hosts-in-one-vault-file/28841 "2018-10-23T01:48:38Z")

</div>

Hello everyone. Is there any way how to store credentials in one Vault file, so that these credentials are applied for each host? For example, when I create group\_vars/all.yml and store creds here and then execute play…

---

## [Ansible Playbook error - Dict object has no attribute.](https://forum.ansible.com/t/ansible-playbook-error-dict-object-has-no-attribute/28843)

<div class="topic-metadata">

**Author:** [@Kishore\_Ponniah](https://forum.ansible.com/u/Kishore_Ponniah)\
**Replies:** 8\
**Last updated:** [October 22, 2018, 6:04pm UTC](https://forum.ansible.com/t/ansible-playbook-error-dict-object-has-no-attribute/28843 "2018-10-22T18:04:18Z")

</div>

Hi, I am trying to create a Direct connect Gateway in AWS account using ansible. I have the main playbook and an account config yaml template. When I run the playbook I am getting an error fatal: \[infrastructure\]: FAIL…

---

## [Help needed Please ...](https://forum.ansible.com/t/help-needed-please/28839)

<div class="topic-metadata">

**Author:** [@Satesh\_S\_Kumar](https://forum.ansible.com/u/Satesh_S_Kumar)\
**Replies:** 2\
**Last updated:** [October 22, 2018, 5:57pm UTC](https://forum.ansible.com/t/help-needed-please/28839 "2018-10-22T17:57:30Z")

</div>

Hi, I am trying to install IIS and sub features via Ansible. It gives me the below error. I have Ansible 2.4. Please let me know if you got any pointers … ERROR! ‘win\_roles’ is not a valid attribute for a Play

---

## [Ansible mail module failing at sending mail](https://forum.ansible.com/t/ansible-mail-module-failing-at-sending-mail/28829)

<div class="topic-metadata">

**Author:** [@Umberto\_Manferdini1](https://forum.ansible.com/u/Umberto_Manferdini1)\
**Replies:** 7\
**Last updated:** [October 22, 2018, 12:06pm UTC](https://forum.ansible.com/t/ansible-mail-module-failing-at-sending-mail/28829 "2018-10-22T12:06:27Z")

</div>

Hello, Trying to use the mail module to send emails as last task of my playbook It fails saying fatal: \[r1 → localhost\]: FAILED! =\> {“changed”: false, “msg”: “Authentication to smtp.mail.yahoo.com:25 failed, please ch…

---

## [I would like to open a web browser with ansible](https://forum.ansible.com/t/i-would-like-to-open-a-web-browser-with-ansible/28835)

<div class="topic-metadata">

**Author:** [@Julien](https://forum.ansible.com/u/Julien)\
**Replies:** 1\
**Last updated:** [October 22, 2018, 9:16am UTC](https://forum.ansible.com/t/i-would-like-to-open-a-web-browser-with-ansible/28835 "2018-10-22T09:16:52Z")

</div>

Hello I’d like to open a web browser into my Windows session with ansible, i’ve tried with this playbook, but this has no effect on my session name: Starting nginx win\_shell: Start-Process -FilePath ‘D:\\Stream\\nginx-…

---

## [How to declare group variables for host inventory in Ansible Tower](https://forum.ansible.com/t/how-to-declare-group-variables-for-host-inventory-in-ansible-tower/28838)

<div class="topic-metadata">

**Author:** [@Saravanan](https://forum.ansible.com/u/Saravanan)\
**Replies:** 0\
**Last updated:** [October 21, 2018, 5:52pm UTC](https://forum.ansible.com/t/how-to-declare-group-variables-for-host-inventory-in-ansible-tower/28838 "2018-10-21T17:52:44Z")

</div>

Hi All, Need to declare few group variables in server Inventory of Ansible Tower and retrieve them in playbook. Currently my host inventory looks as below. server.ini \[mygroup\] host1 ansible\_host=host1 ansible\_user=us…

---

## [How to get a list of mount points from facts gathered by ansible on Linux host?](https://forum.ansible.com/t/how-to-get-a-list-of-mount-points-from-facts-gathered-by-ansible-on-linux-host/28837)

<div class="topic-metadata">

**Author:** [@shibhi](https://forum.ansible.com/u/shibhi)\
**Replies:** 1\
**Last updated:** [October 21, 2018, 9:00am UTC](https://forum.ansible.com/t/how-to-get-a-list-of-mount-points-from-facts-gathered-by-ansible-on-linux-host/28837 "2018-10-21T09:00:53Z")

</div>

Hi Team: I’m trying to get a list variable with mount points from Ansible facts. But, I’m getting the whole “ansible\_mounts” facts in JSON format. I have difficult time to retrieve only mount points in list format. Lik…

---

## [How to convert a dictionary to a list with key=value elements or to a string with key=value elements?](https://forum.ansible.com/t/how-to-convert-a-dictionary-to-a-list-with-key-value-elements-or-to-a-string-with-key-value-elements/28830)

<div class="topic-metadata">

**Author:** [@Dmitriy\_Panteleyev](https://forum.ansible.com/u/Dmitriy_Panteleyev)\
**Replies:** 5\
**Last updated:** [October 20, 2018, 9:00pm UTC](https://forum.ansible.com/t/how-to-convert-a-dictionary-to-a-list-with-key-value-elements-or-to-a-string-with-key-value-elements/28830 "2018-10-20T21:00:27Z")

</div>

Given an arbitrary dictionary like: test: one: wan two: too three: tree How can I convert it to a list like: \` test: one=wan two=too thee=tree \` The end result that I need is actually a string of these list items…

---

## [Do YAML inventory plugins support inheritance?](https://forum.ansible.com/t/do-yaml-inventory-plugins-support-inheritance/28801)

<div class="topic-metadata">

**Author:** [@Guy\_Knights1](https://forum.ansible.com/u/Guy_Knights1)\
**Replies:** 2\
**Last updated:** [October 20, 2018, 12:03am UTC](https://forum.ansible.com/t/do-yaml-inventory-plugins-support-inheritance/28801 "2018-10-20T00:03:26Z")

</div>

I’m experimenting with the new AWS\_EC2 plugin and have been wondering if there’s a way to streamline the file as we have separate inventory folders for dev, demo and prod. Is there a way to do something like and ‘include…

---

## [Ansible 2.6.6 is available](https://forum.ansible.com/t/ansible-2-6-6-is-available/28833)

<div class="topic-metadata">

**Author:** [@Matt\_Clay1](https://forum.ansible.com/u/Matt_Clay1)\
**Replies:** 2\
**Last updated:** [October 19, 2018, 11:57pm UTC](https://forum.ansible.com/t/ansible-2-6-6-is-available/28833 "2018-10-19T23:57:22Z")

</div>

Hi all – we’re happy to announce that the general release of Ansible 2.6.6 is now available! How do you get it?

---

## [include\_tasks vs include](https://forum.ansible.com/t/include-tasks-vs-include/28804)

<div class="topic-metadata">

**Author:** [@Ben\_Joyce](https://forum.ansible.com/u/Ben_Joyce)\
**Replies:** 9\
**Last updated:** [October 19, 2018, 9:08pm UTC](https://forum.ansible.com/t/include-tasks-vs-include/28804 "2018-10-19T21:08:14Z")

</div>

Hi. Has include\_tasks been deprecated? I have a playbook that used include\_tasks fine up until recently. ansible-playbook --version reports 2.7.0 Unfortunately I can’t be sure of what the previous version was, if it wa…

---

## [Become directives vs connection variables](https://forum.ansible.com/t/become-directives-vs-connection-variables/28831)

<div class="topic-metadata">

**Author:** [@aaldi](https://forum.ansible.com/u/aaldi)\
**Replies:** 2\
**Last updated:** [October 19, 2018, 7:55pm UTC](https://forum.ansible.com/t/become-directives-vs-connection-variables/28831 "2018-10-19T19:55:03Z")

</div>

I’m trying to understand privilege escalation, but have a hard time comparing these two concepts. If I specify become: yes, does that mean that privilege escalation works now? What about if I specify ansible\_become: yes?…

---

## [PowerShell script help](https://forum.ansible.com/t/powershell-script-help/28818)

<div class="topic-metadata">

**Author:** [@dyioulos](https://forum.ansible.com/u/dyioulos)\
**Replies:** 4\
**Last updated:** [October 19, 2018, 3:55pm UTC](https://forum.ansible.com/t/powershell-script-help/28818 "2018-10-19T15:55:50Z")

</div>

Hi, all. I’ve created a playbook to run a PowerShell script. The script is already copied to the target system (but also exists on the Ansible server). It must be run with the following argument: -ConsoleTitle “Dell Co…

---

## [Very first time Network Engineer user - ping module needs to connect with SSH to work?](https://forum.ansible.com/t/very-first-time-network-engineer-user-ping-module-needs-to-connect-with-ssh-to-work/28826)

<div class="topic-metadata">

**Author:** [@Greg\_Focaccio](https://forum.ansible.com/u/Greg_Focaccio)\
**Replies:** 5\
**Last updated:** [October 19, 2018, 1:24pm UTC](https://forum.ansible.com/t/very-first-time-network-engineer-user-ping-module-needs-to-connect-with-ssh-to-work/28826 "2018-10-19T13:24:04Z")

</div>

Hi All, First time getting into any kind of automation -starting with Ansible. Odd results for me. What is going on? Thanks, Greg 05:41root@xfrr3 /etc/ansible ? ansible f1 --module-name=ping172.16.0.1 | UNREACHABLE!…

---

## [ansible always reports changed](https://forum.ansible.com/t/ansible-always-reports-changed/28825)

<div class="topic-metadata">

**Author:** [@Jost](https://forum.ansible.com/u/Jost)\
**Replies:** 2\
**Last updated:** [October 19, 2018, 9:00am UTC](https://forum.ansible.com/t/ansible-always-reports-changed/28825 "2018-10-19T09:00:40Z")

</div>

Hi I have ansible 2.6.5 and I notice one strange think. If I use hard code path for “item.dest” then reports no changed. Change is reported only if I change something inside plugins which is OK name: install plugins …

---

## [running bash command in ansible on centos 7 leads to /dev/null permission denied problem](https://forum.ansible.com/t/running-bash-command-in-ansible-on-centos-7-leads-to-dev-null-permission-denied-problem/28824)

<div class="topic-metadata">

**Author:** [@lwsanty](https://forum.ansible.com/u/lwsanty)\
**Replies:** 0\
**Last updated:** [October 18, 2018, 10:25pm UTC](https://forum.ansible.com/t/running-bash-command-in-ansible-on-centos-7-leads-to-dev-null-permission-denied-problem/28824 "2018-10-18T22:25:39Z")

</div>

hi guys! has anyone bumped into the similar issue before? https://github.com/ansible/ansible/issues/47305

---

## [include\_role with passed variable defined by template fails](https://forum.ansible.com/t/include-role-with-passed-variable-defined-by-template-fails/28794)

<div class="topic-metadata">

**Author:** [@Dmitriy\_Panteleyev](https://forum.ansible.com/u/Dmitriy_Panteleyev)\
**Replies:** 3\
**Last updated:** [October 18, 2018, 7:21pm UTC](https://forum.ansible.com/t/include-role-with-passed-variable-defined-by-template-fails/28794 "2018-10-18T19:21:24Z")

</div>

I’m a bit confused how variables are defined when using include\_role. A basic example follows. /play.yml \` hosts: localhost roles: one \` /roles/one/tasks/main.yml \`

---

## [When are file lookups performed? How to store lookup result in a variable?](https://forum.ansible.com/t/when-are-file-lookups-performed-how-to-store-lookup-result-in-a-variable/28823)

<div class="topic-metadata">

**Author:** [@Dmitriy\_Panteleyev](https://forum.ansible.com/u/Dmitriy_Panteleyev)\
**Replies:** 2\
**Last updated:** [October 18, 2018, 7:20pm UTC](https://forum.ansible.com/t/when-are-file-lookups-performed-how-to-store-lookup-result-in-a-variable/28823 "2018-10-18T19:20:44Z")

</div>

I was under the impression that if I define a variable with a lookup function, it would store the results of the lookup. And then when I used that variable, it would spit out the results of the lookup. However, from run…

---

## [Handlers called but not working](https://forum.ansible.com/t/handlers-called-but-not-working/28819)

<div class="topic-metadata">

**Author:** [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Replies:** 4\
**Last updated:** [October 18, 2018, 6:11pm UTC](https://forum.ansible.com/t/handlers-called-but-not-working/28819 "2018-10-18T18:11:42Z")

</div>

In the ansible output it says: META: ran handlers For this role handlers/main.yml is: - name: restart\_and\_enable\_httpd service: name: httpd state: restarted enabled: true This is Ansible 2.6 o…

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

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