# Ansible Project

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

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

**Page:** 215

---

## [ios\_command multiple commands](https://forum.ansible.com/t/ios-command-multiple-commands/29375)

<div class="topic-metadata">

**Author:** [@Eduardo\_Nunes\_Pereir](https://forum.ansible.com/u/Eduardo_Nunes_Pereir)\
**Replies:** 2\
**Last updated:** [January 6, 2019, 2:34am UTC](https://forum.ansible.com/t/ios-command-multiple-commands/29375 "2019-01-06T02:34:21Z")

</div>

name: Network Getting Started First Playbook connection: network\_cli gather\_facts: false hosts: lab tasks: name: run multiple commands on remote nodes ios\_command: commands: show run register: output na…

---

## [adding time with ISO8601 format](https://forum.ansible.com/t/adding-time-with-iso8601-format/29379)

<div class="topic-metadata">

**Author:** [@IP\_Freely](https://forum.ansible.com/u/IP_Freely)\
**Replies:** 1\
**Last updated:** [January 5, 2019, 11:58pm UTC](https://forum.ansible.com/t/adding-time-with-iso8601-format/29379 "2019-01-05T23:58:42Z")

</div>

I’m trying to send a ISO8601 time format string to the Prometheus alert manager through the uri moule to tell it to silence an alarm for the next hour. I have worked out that the current time is available (ansible\_date\_…

---

## [with\_sequence run a line only once](https://forum.ansible.com/t/with-sequence-run-a-line-only-once/29377)

<div class="topic-metadata">

**Author:** [@Piyush\_Bansal](https://forum.ansible.com/u/Piyush_Bansal)\
**Replies:** 6\
**Last updated:** [January 5, 2019, 6:33pm UTC](https://forum.ansible.com/t/with-sequence-run-a-line-only-once/29377 "2019-01-05T18:33:22Z")

</div>

Hello, I am trying to loop over a task using “with\_sequence” and I need to make it work such that it run one specific line only once but rest of the lines it executes as normal times. It not succeeding or I am not able…

---

## [Dynamic Inventory using Active Directory / LDAP](https://forum.ansible.com/t/dynamic-inventory-using-active-directory-ldap/26714)

<div class="topic-metadata">

**Author:** [@aaron](https://forum.ansible.com/u/aaron)\
**Replies:** 6\
**Last updated:** [January 5, 2019, 9:23am UTC](https://forum.ansible.com/t/dynamic-inventory-using-active-directory-ldap/26714 "2019-01-05T09:23:28Z")

</div>

Does anyone have code that can pull a dynamic inventory from list of AD OUs? Want to use the windows\_update module to patch our servers only in specific OUs. Maybe I missed it, but I don’t see Windows Active Directory i…

---

## [rolling tasks for multiple clusters?](https://forum.ansible.com/t/rolling-tasks-for-multiple-clusters/29362)

<div class="topic-metadata">

**Author:** [@Doug\_OLeary](https://forum.ansible.com/u/Doug_OLeary)\
**Replies:** 3\
**Last updated:** [January 5, 2019, 9:21am UTC](https://forum.ansible.com/t/rolling-tasks-for-multiple-clusters/29362 "2019-01-05T09:21:07Z")

</div>

Hi; I’ve read the docs on rolling updates and that sounds very close to what I’m looking for; however, I need to execute rolling reboots for multiple clusters preferably simultaneously. More specifically, after patchin…

---

## [finding first host meeting a condition](https://forum.ansible.com/t/finding-first-host-meeting-a-condition/29370)

<div class="topic-metadata">

**Author:** [@rjwagner.dba](https://forum.ansible.com/u/rjwagner.dba)\
**Replies:** 1\
**Last updated:** [January 4, 2019, 8:17pm UTC](https://forum.ansible.com/t/finding-first-host-meeting-a-condition/29370 "2019-01-04T20:17:40Z")

</div>

Hey all- I need to find the first host in the inventory running a particular process. I can query the hosts to look for the process using a shell pipeline and register the output in a variable (call it ps\_output). But I…

---

## [Consolidated configuration file handling?](https://forum.ansible.com/t/consolidated-configuration-file-handling/29373)

<div class="topic-metadata">

**Author:** [@Robert\_Rapplean](https://forum.ansible.com/u/Robert_Rapplean)\
**Replies:** 0\
**Last updated:** [January 4, 2019, 5:28pm UTC](https://forum.ansible.com/t/consolidated-configuration-file-handling/29373 "2019-01-04T17:28:53Z")

</div>

I’ve been digging through the documentation and have run into a wall in terms of Ansible’s ability to manage the contents of configuration files. This might have something to do with search engine results returning artic…

---

## [Ansible Lookup Issue](https://forum.ansible.com/t/ansible-lookup-issue/29371)

<div class="topic-metadata">

**Author:** [@Freddie\_Eisa](https://forum.ansible.com/u/Freddie_Eisa)\
**Replies:** 2\
**Last updated:** [January 4, 2019, 4:31pm UTC](https://forum.ansible.com/t/ansible-lookup-issue/29371 "2019-01-04T16:31:21Z")

</div>

Hello, Im running the following set\_fact: host: “{{ lookup(‘nios’, ‘record:host’, filter={‘name’: ‘{{ ansible\_facts.fqdn }}’ }, provider=nios\_provider) }}” Im trying to pass the ansible\_facts.fqdn as the name. If i u…

---

## [Rebooting a Cisco ASA device](https://forum.ansible.com/t/rebooting-a-cisco-asa-device/29364)

<div class="topic-metadata">

**Author:** [@Sahar](https://forum.ansible.com/u/Sahar)\
**Replies:** 3\
**Last updated:** [January 4, 2019, 3:41pm UTC](https://forum.ansible.com/t/rebooting-a-cisco-asa-device/29364 "2019-01-04T15:41:28Z")

</div>

I’m trying to reboot a Cisco ASA Firewall, and run the “show version” command after it. It seems that rebooting works, but when the playbook gets to the show version command, it will get failed by showing the error down …

---

## [Pyinstaller doesn't import ansible library (Python API v2 of Ansible)](https://forum.ansible.com/t/pyinstaller-doesnt-import-ansible-library-python-api-v2-of-ansible/29368)

<div class="topic-metadata">

**Author:** [@Kawther\_Arfaoui](https://forum.ansible.com/u/Kawther_Arfaoui)\
**Replies:** 0\
**Last updated:** [January 4, 2019, 1:35pm UTC](https://forum.ansible.com/t/pyinstaller-doesnt-import-ansible-library-python-api-v2-of-ansible/29368 "2019-01-04T13:35:43Z")

</div>

Hello all, I’m trying to execute a binary file generated by Pyinstaller , but I have got this error: Traceback (most recent call last): File “kubernetes\_deployer/cm2\_deploy\_ansible.py”, line 32, in File “/tmp/pip-in…

---

## [ansible role/playbook  cloudwatch alarm](https://forum.ansible.com/t/ansible-role-playbook-cloudwatch-alarm/29366)

<div class="topic-metadata">

**Author:** [@Frank\_Dias](https://forum.ansible.com/u/Frank_Dias)\
**Replies:** 0\
**Last updated:** [January 4, 2019, 2:31am UTC](https://forum.ansible.com/t/ansible-role-playbook-cloudwatch-alarm/29366 "2019-01-04T02:31:46Z")

</div>

I am looking for a role or play book that one could run against AWS EC2 instances and set a cloud watch alarm for “cpucreditbalance”. frank

---

## [Inventory scripts: How to add debug info when run via Ansible?](https://forum.ansible.com/t/inventory-scripts-how-to-add-debug-info-when-run-via-ansible/29334)

<div class="topic-metadata">

**Author:** [@Jimmy\_Htor](https://forum.ansible.com/u/Jimmy_Htor)\
**Replies:** 3\
**Last updated:** [January 3, 2019, 9:41pm UTC](https://forum.ansible.com/t/inventory-scripts-how-to-add-debug-info-when-run-via-ansible/29334 "2019-01-03T21:41:47Z")

</div>

Hey, The way I see it you either output to STDOUT, which would make debug output part of the inventory data, thus corrupt it. Or you output to STDERR and Ansible will treat is as actual errors (and show it using red col…

---

## [win\_pagefile is not returning configured pagefiles](https://forum.ansible.com/t/win-pagefile-is-not-returning-configured-pagefiles/29363)

<div class="topic-metadata">

**Author:** [@Dave\_Olker](https://forum.ansible.com/u/Dave_Olker)\
**Replies:** 0\
**Last updated:** [January 3, 2019, 7:29pm UTC](https://forum.ansible.com/t/win-pagefile-is-not-returning-configured-pagefiles/29363 "2019-01-03T19:29:40Z")

</div>

My Windows 2016 server has the following pagefile configuration: C:\\Windows\\system32\>wmic pagefile list /format:list AllocatedBaseSize=9728 CurrentUsage=0 Description=D:\\pagefile.sys InstallDate=20190103102344.59885…

---

## [How to Random Roles](https://forum.ansible.com/t/how-to-random-roles/29358)

<div class="topic-metadata">

**Author:** [@Francis\_Santos](https://forum.ansible.com/u/Francis_Santos)\
**Replies:** 3\
**Last updated:** [January 3, 2019, 5:41pm UTC](https://forum.ansible.com/t/how-to-random-roles/29358 "2019-01-03T17:41:53Z")

</div>

I gotta random both the hosts and the roles. I successfully randomed the hosts, but I not getting the roles to random. Here is what I got

---

## [How to random roles](https://forum.ansible.com/t/how-to-random-roles/29351)

<div class="topic-metadata">

**Author:** [@Francis\_Santos](https://forum.ansible.com/u/Francis_Santos)\
**Replies:** 1\
**Last updated:** [January 3, 2019, 4:55pm UTC](https://forum.ansible.com/t/how-to-random-roles/29351 "2019-01-03T16:55:26Z")

</div>

I gotta random both the hosts and the roles. I successfully randomed the hosts, but I not getting the roles to random. Here is what I got

---

## [How to manage AWS resources by Ansible Without Access Keys and Secret Access Keys](https://forum.ansible.com/t/how-to-manage-aws-resources-by-ansible-without-access-keys-and-secret-access-keys/29350)

<div class="topic-metadata">

**Author:** [@S\_Saravanan](https://forum.ansible.com/u/S_Saravanan)\
**Replies:** 6\
**Last updated:** [January 3, 2019, 12:39pm UTC](https://forum.ansible.com/t/how-to-manage-aws-resources-by-ansible-without-access-keys-and-secret-access-keys/29350 "2019-01-03T12:39:46Z")

</div>

Hi All, How can we manage AWS resources by Ansible without Access Keys and Secret Access Keys ? There is a requirement to use Ansible server to manage AWS, but should not use access and secret keys for security policy …

---

## [Best method to use uri for multiple machine parameters](https://forum.ansible.com/t/best-method-to-use-uri-for-multiple-machine-parameters/29357)

<div class="topic-metadata">

**Author:** [@eric.dunn](https://forum.ansible.com/u/eric.dunn)\
**Replies:** 0\
**Last updated:** [January 2, 2019, 10:07pm UTC](https://forum.ansible.com/t/best-method-to-use-uri-for-multiple-machine-parameters/29357 "2019-01-02T22:07:34Z")

</div>

Hi I have success with the following ansible script to license a single machine. Summary: Retrieve Machine ID \> submit User/Password/Machine ID/Activation code … then submit license back to the machine to license the s…

---

## [General best practices regarding roles](https://forum.ansible.com/t/general-best-practices-regarding-roles/29355)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 1\
**Last updated:** [January 2, 2019, 8:37pm UTC](https://forum.ansible.com/t/general-best-practices-regarding-roles/29355 "2019-01-02T20:37:05Z")

</div>

When setting up roles I have the following: \` /etc/ansible/roles # tree aliases/ -L 1 aliases/ ├── defaults ├── handlers ├── main.yml ├── meta ├── README.md ├── tasks ├── tests └── vars \` The main.yml has th…

---

## [Issues with connecting to API using Ansible](https://forum.ansible.com/t/issues-with-connecting-to-api-using-ansible/29353)

<div class="topic-metadata">

**Author:** [@Hristo\_Georgiev](https://forum.ansible.com/u/Hristo_Georgiev)\
**Replies:** 4\
**Last updated:** [January 2, 2019, 7:55pm UTC](https://forum.ansible.com/t/issues-with-connecting-to-api-using-ansible/29353 "2019-01-02T19:55:13Z")

</div>

Hello, I have a WebService that I need to connect to and add content via POST method. It accepts content in the form of “application/x-www-form-urlencoded”. I am using JSON formatted body and I tell Ansible to use form-…

---

## [How to Random Roles](https://forum.ansible.com/t/how-to-random-roles/29354)

<div class="topic-metadata">

**Author:** [@Francis\_Santos](https://forum.ansible.com/u/Francis_Santos)\
**Replies:** 0\
**Last updated:** [January 2, 2019, 4:52pm UTC](https://forum.ansible.com/t/how-to-random-roles/29354 "2019-01-02T16:52:06Z")

</div>

I gotta random both the hosts and the roles. I successfully randomed the hosts, but I not getting the roles to random. Here is what I got

---

## [How to pass range of input with vars\_prompt](https://forum.ansible.com/t/how-to-pass-range-of-input-with-vars-prompt/29349)

<div class="topic-metadata">

**Author:** [@a.srini](https://forum.ansible.com/u/a.srini)\
**Replies:** 1\
**Last updated:** [January 2, 2019, 10:56am UTC](https://forum.ansible.com/t/how-to-pass-range-of-input-with-vars-prompt/29349 "2019-01-02T10:56:04Z")

</div>

Hi Experts, I have a question, can we pass a range of inputs with vars\_prompt. example: From the below playbook, i am able to pass multiple port numbers split by “,”. prompt: Please enter the port name: 0/1,0/2,0/3,0…

---

## [Synchronize module ignores ansible\_user parameter](https://forum.ansible.com/t/synchronize-module-ignores-ansible-user-parameter/29348)

<div class="topic-metadata">

**Author:** [@Checker](https://forum.ansible.com/u/Checker)\
**Replies:** 0\
**Last updated:** [January 1, 2019, 3:20pm UTC](https://forum.ansible.com/t/synchronize-module-ignores-ansible-user-parameter/29348 "2019-01-01T15:20:18Z")

</div>

I got same problem (https://github.com/ansible/ansible/issues/29483) for Ansible 2.7.5 and 2.5.1. Only difference is that password prompt is hidden and thus, the task hangs continuously. that is, when sending a file fr…

---

## [kolla-ansible all-in-one error: "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'glance-registry'"](https://forum.ansible.com/t/kolla-ansible-all-in-one-error-msg-ansibleundefinedvariable-dict-object-has-no-attribute-glance-registry/29347)

<div class="topic-metadata">

**Author:** [@Peter\_Clapham](https://forum.ansible.com/u/Peter_Clapham)\
**Replies:** 0\
**Last updated:** [January 1, 2019, 3:15pm UTC](https://forum.ansible.com/t/kolla-ansible-all-in-one-error-msg-ansibleundefinedvariable-dict-object-has-no-attribute-glance-registry/29347 "2019-01-01T15:15:26Z")

</div>

Running on Ubuntu 18.04.1 (bionic) following instructions from: https://docs.openstack.org/project-deploy-guide/kolla-ansible/queens/quickstart.html with the exception that: kolla\_base\_distro: "centos" is kolla\_base\_…

---

## [AttributeError: 'module' object has no attribute 'cursors'](https://forum.ansible.com/t/attributeerror-module-object-has-no-attribute-cursors/29019)

<div class="topic-metadata">

**Author:** [@Son\_T](https://forum.ansible.com/u/Son_T)\
**Replies:** 4\
**Last updated:** [January 1, 2019, 11:57am UTC](https://forum.ansible.com/t/attributeerror-module-object-has-no-attribute-cursors/29019 "2019-01-01T11:57:33Z")

</div>

This is the error I get when using proxysql\_manage\_config module as documented here: https://docs.ansible.com/ansible/2.5/modules/proxysql\_manage\_config\_module.html Anyone know how I get around this issue?

---

## [How can I run an imported Ansible playbook for each unique value in a set of host vars?](https://forum.ansible.com/t/how-can-i-run-an-imported-ansible-playbook-for-each-unique-value-in-a-set-of-host-vars/29344)

<div class="topic-metadata">

**Author:** [@Ewan](https://forum.ansible.com/u/Ewan)\
**Replies:** 1\
**Last updated:** [January 1, 2019, 8:46am UTC](https://forum.ansible.com/t/how-can-i-run-an-imported-ansible-playbook-for-each-unique-value-in-a-set-of-host-vars/29344 "2019-01-01T08:46:29Z")

</div>

I’ve got a playbook which needs to run against my entire inventory, with a list of hostnames as an extra variable (target\_hosts). The hosts in target\_hosts all have a group\_id hostvar defined on them. I use the whole in…

---

## [Win\_service "Cannot start service InstallerService on computer '.'."](https://forum.ansible.com/t/win-service-cannot-start-service-installerservice-on-computer/29345)

<div class="topic-metadata">

**Author:** [@Matthieu\_Ducorps](https://forum.ansible.com/u/Matthieu_Ducorps)\
**Replies:** 0\
**Last updated:** [January 1, 2019, 8:21am UTC](https://forum.ansible.com/t/win-service-cannot-start-service-installerservice-on-computer/29345 "2019-01-01T08:21:45Z")

</div>

Hi All, I’m running into an issue where I’m not sure what is cause, here is the setup: Debian GNU/Linux buster/sid ansible 2.7.5 config file = /home/ansible/ansibleGalaxy/ansible.cfg configured module search path = …

---

## [How to use 'with\_items' based on variable?](https://forum.ansible.com/t/how-to-use-with-items-based-on-variable/29338)

<div class="topic-metadata">

**Author:** [@Bharath\_Kumar2](https://forum.ansible.com/u/Bharath_Kumar2)\
**Replies:** 3\
**Last updated:** [December 31, 2018, 9:09pm UTC](https://forum.ansible.com/t/how-to-use-with-items-based-on-variable/29338 "2018-12-31T21:09:14Z")

</div>

Hello Ansible Experts, I am creating a Role, which has a task to download multiple files from an URL, and, for that, I am using get\_url module. Since, get\_url cant download files recursively, I have been trying to use ‘…

---

## [Run Select query and Insert query inansible](https://forum.ansible.com/t/run-select-query-and-insert-query-inansible/29329)

<div class="topic-metadata">

**Author:** [@Tharindu\_Weerakoon](https://forum.ansible.com/u/Tharindu_Weerakoon)\
**Replies:** 3\
**Last updated:** [December 31, 2018, 7:10pm UTC](https://forum.ansible.com/t/run-select-query-and-insert-query-inansible/29329 "2018-12-31T19:10:40Z")

</div>

Hello all, I have got lot of answers for my previous post. Thanks for everyone. Could you please help me to insert record to MYSQL db through the playbook. Tharindu

---

## [Migrating puppet written code into Ansible](https://forum.ansible.com/t/migrating-puppet-written-code-into-ansible/29340)

<div class="topic-metadata">

**Author:** [@Sagar\_Parbhane](https://forum.ansible.com/u/Sagar_Parbhane)\
**Replies:** 1\
**Last updated:** [December 31, 2018, 2:25pm UTC](https://forum.ansible.com/t/migrating-puppet-written-code-into-ansible/29340 "2018-12-31T14:25:51Z")

</div>

Hi All, I have a automation code written in puppet and now we want it to move into Ansible. Is there any best way to do this migration? or we have to migrate module by module

---

## [aws cloudwatch alarms](https://forum.ansible.com/t/aws-cloudwatch-alarms/29341)

<div class="topic-metadata">

**Author:** [@bstap](https://forum.ansible.com/u/bstap)\
**Replies:** 0\
**Last updated:** [December 31, 2018, 3:30am UTC](https://forum.ansible.com/t/aws-cloudwatch-alarms/29341 "2018-12-31T03:30:06Z")

</div>

I am looking for any example ansible playbook to set cloudwatch cpu credit alarms, I have an app that gets into a funky state and the cpu credit deplete over a period of time. In normal state they stay level. Frank

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

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