# Ansible Project

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

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

**Page:** 249

---

## [AWS ALB Target group and instance association/dissociation.](https://forum.ansible.com/t/aws-alb-target-group-and-instance-association-dissociation/27999)

<div class="topic-metadata">

**Author:** [@Bond](https://forum.ansible.com/u/Bond)\
**Replies:** 3\
**Last updated:** [July 10, 2018, 5:32pm UTC](https://forum.ansible.com/t/aws-alb-target-group-and-instance-association-dissociation/27999 "2018-07-10T17:32:28Z")

</div>

Hi, I am trying to understand the best way to remove and add an instance to a target group. Basically, what I want to do is Query an ALB to get the list of the target groups by supplying the name of the ALB ( in a var…

---

## [Unarchive + Template Copy](https://forum.ansible.com/t/unarchive-template-copy/28013)

<div class="topic-metadata">

**Author:** [@Josephsimon\_Arokiara](https://forum.ansible.com/u/Josephsimon_Arokiara)\
**Replies:** 0\
**Last updated:** [July 10, 2018, 4:46pm UTC](https://forum.ansible.com/t/unarchive-template-copy/28013 "2018-07-10T16:46:47Z")

</div>

Hi All, One of the file in a zip is a jinja template . I need to copy the zip to the remote host. I can extract he template file from the zip and copy the template separately after unarchive task. Is there any way to d…

---

## [Ansible: Foreman Inventory Source](https://forum.ansible.com/t/ansible-foreman-inventory-source/27950)

<div class="topic-metadata">

**Author:** [@Woolly](https://forum.ansible.com/u/Woolly)\
**Replies:** 4\
**Last updated:** [July 10, 2018, 3:23pm UTC](https://forum.ansible.com/t/ansible-foreman-inventory-source/27950 "2018-07-10T15:23:51Z")

</div>

Hi, Does anyone know how to configure the new Foreman Inventory Source plugin that ships with Ansible 2.6? The documentation for it is here: https://docs.ansible.com/ansible/devel/plugins/inventory/foreman.html But th…

---

## [PR review needed for rackspace token auth feature](https://forum.ansible.com/t/pr-review-needed-for-rackspace-token-auth-feature/28008)

<div class="topic-metadata">

**Author:** [@Konstantinos\_Koukopo](https://forum.ansible.com/u/Konstantinos_Koukopo)\
**Replies:** 0\
**Last updated:** [July 10, 2018, 3:18pm UTC](https://forum.ansible.com/t/pr-review-needed-for-rackspace-token-auth-feature/28008 "2018-07-10T15:18:32Z")

</div>

Hi everyone, I’ve opened a pull request to authenticate to Rackspace using a pre-generated token \[1\]. I’m already using it for my use case, which includes passing a token to a remote system without compromising the main…

---

## [VMs migration to from one host to another host](https://forum.ansible.com/t/vms-migration-to-from-one-host-to-another-host/28004)

<div class="topic-metadata">

**Author:** [@Ramesh\_AR](https://forum.ansible.com/u/Ramesh_AR)\
**Replies:** 0\
**Last updated:** [July 10, 2018, 1:59pm UTC](https://forum.ansible.com/t/vms-migration-to-from-one-host-to-another-host/28004 "2018-07-10T13:59:57Z")

</div>

Hi All. I’m looking for a play book to migrate VMs from one host to another . Ansible module vmware\_vmotion define only one vm at a time but if the host has more VMs we can’t write the VM name in the playbook. Any thou…

---

## [New Vpc created. Where do i specify the new VPC id](https://forum.ansible.com/t/new-vpc-created-where-do-i-specify-the-new-vpc-id/27998)

<div class="topic-metadata">

**Author:** [@Sloan](https://forum.ansible.com/u/Sloan)\
**Replies:** 4\
**Last updated:** [July 10, 2018, 6:36am UTC](https://forum.ansible.com/t/new-vpc-created-where-do-i-specify-the-new-vpc-id/27998 "2018-07-10T06:36:32Z")

</div>

I’m spinning up new servers in a newly-created VPC I’m not sure which file contains the directive to change the VPC ID so the servers are created in the correct new VPC?

---

## [Ansible read variable defined in inventory from playbook yaml file.](https://forum.ansible.com/t/ansible-read-variable-defined-in-inventory-from-playbook-yaml-file/27994)

<div class="topic-metadata">

**Author:** [@Madushan\_Chathuranga](https://forum.ansible.com/u/Madushan_Chathuranga)\
**Replies:** 4\
**Last updated:** [July 9, 2018, 9:29pm UTC](https://forum.ansible.com/t/ansible-read-variable-defined-in-inventory-from-playbook-yaml-file/27994 "2018-07-09T21:29:35Z")

</div>

Need some help regarding reading on vars from inventory…

---

## [This topic needs a title](https://forum.ansible.com/t/this-topic-needs-a-title/27987)

<div class="topic-metadata">

**Author:** [@Ramesh\_AR](https://forum.ansible.com/u/Ramesh_AR)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 11:57am UTC](https://forum.ansible.com/t/this-topic-needs-a-title/27987 "2018-07-09T11:57:33Z")

</div>

Hi All, I’m new to Ansible and still learning . My organization has plan to do esxi upgrade via ansible. As a administrator we need to think of smart way to do ansible way . As initial step of the upgrade I would like t…

---

## [Galaxy Maintenance 13 July 00:00 - 06:00 Eastern](https://forum.ansible.com/t/galaxy-maintenance-13-july-00-00-06-00-eastern/27992)

<div class="topic-metadata">

**Author:** [@chousekn](https://forum.ansible.com/u/chousekn)\
**Replies:** 0\
**Last updated:** [July 9, 2018, 10:01am UTC](https://forum.ansible.com/t/galaxy-maintenance-13-july-00-00-06-00-eastern/27992 "2018-07-09T10:01:35Z")

</div>

The OpenShift cluster that hosts Galaxy will be upgraded to OpenShift v3.9 on 13 July, between 00:00 and 06:00 Eastern. We don’t anticipate outages during this window, but we cannot guarantees that there won’t be some m…

---

## [json how to register variable with item only when matches](https://forum.ansible.com/t/json-how-to-register-variable-with-item-only-when-matches/27977)

<div class="topic-metadata">

**Author:** [@Konstantin\_R](https://forum.ansible.com/u/Konstantin_R)\
**Replies:** 3\
**Last updated:** [July 9, 2018, 7:29am UTC](https://forum.ansible.com/t/json-how-to-register-variable-with-item-only-when-matches/27977 "2018-07-09T07:29:19Z")

</div>

Hello, I have next playbook: hosts: 127.0.0.1 tasks: name: Load variables include\_vars: file: vars/vcenter.yaml name: vcenter name: Get information about cluster vmware\_cluster\_facts: datacenter: ‘DC03’ hostnam…

---

## [Filter on Condition in Loop](https://forum.ansible.com/t/filter-on-condition-in-loop/27990)

<div class="topic-metadata">

**Author:** [@utkarsh\_srivastava](https://forum.ansible.com/u/utkarsh_srivastava)\
**Replies:** 1\
**Last updated:** [July 9, 2018, 7:25am UTC](https://forum.ansible.com/t/filter-on-condition-in-loop/27990 "2018-07-09T07:25:04Z")

</div>

Hi pause: prompt: Do You want to Add this item “{{ item }}” ? register: item\_list with\_lines: cat file\_name run\_once: true set\_fact: my\_list: “{{ item\_list.results | map(attribute=‘item’) | list | join(‘,’) }}…

---

## [ansible\_hostname in with\_items](https://forum.ansible.com/t/ansible-hostname-in-with-items/27883)

<div class="topic-metadata">

**Author:** [@Bachu\_Prathap](https://forum.ansible.com/u/Bachu_Prathap)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 3:39am UTC](https://forum.ansible.com/t/ansible-hostname-in-with-items/27883 "2018-07-09T03:39:53Z")

</div>

Hi Team I am writing a playbook to automate assigning an IP address to a set of hosts, however, I am stuck at pulling IP details from vars\_files. below is the code, any pointers will be much helpful to me. thank you. v…

---

## [how to run yum ad-hoc command as different user?](https://forum.ansible.com/t/how-to-run-yum-ad-hoc-command-as-different-user/27988)

<div class="topic-metadata">

**Author:** [@Vamsee\_Chowdary](https://forum.ansible.com/u/Vamsee_Chowdary)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 3:17am UTC](https://forum.ansible.com/t/how-to-run-yum-ad-hoc-command-as-different-user/27988 "2018-07-09T03:17:45Z")

</div>

Hello there, As a user “vamsi”,i am trying to install httpd on node1 machine using ad-hoc command “yum” from the command line. please note that user vamsi has sudo privileges on node1. I tried everything (–become,–ask…

---

## [Ansible multi VM Snapshot](https://forum.ansible.com/t/ansible-multi-vm-snapshot/27980)

<div class="topic-metadata">

**Author:** [@Rama](https://forum.ansible.com/u/Rama)\
**Replies:** 1\
**Last updated:** [July 8, 2018, 11:30pm UTC](https://forum.ansible.com/t/ansible-multi-vm-snapshot/27980 "2018-07-08T23:30:17Z")

</div>

Hi All, I am newbie to Ansible. In my organization, couple of production vm’s need frequent snapshots.I went through Ansible documentation that directed me how to find VM’s folder path and how to take VM snaphost in dif…

---

## ['rc' check failure - 'dict object' has no attribute 'rc'](https://forum.ansible.com/t/rc-check-failure-dict-object-has-no-attribute-rc/27979)

<div class="topic-metadata">

**Author:** [@Imam\_Toufique](https://forum.ansible.com/u/Imam_Toufique)\
**Replies:** 4\
**Last updated:** [July 8, 2018, 11:23pm UTC](https://forum.ansible.com/t/rc-check-failure-dict-object-has-no-attribute-rc/27979 "2018-07-08T23:23:49Z")

</div>

Hi, I am new in ansible world, trying to figure out playbook where I use ‘grep’ to check for netmask address from a text file and capture the exit code with ‘register’ ( see below). My vars/main.yml looks like this: i…

---

## [Accessing Ansible environment vars from module.](https://forum.ansible.com/t/accessing-ansible-environment-vars-from-module/27986)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [July 8, 2018, 6:43pm UTC](https://forum.ansible.com/t/accessing-ansible-environment-vars-from-module/27986 "2018-07-08T18:43:35Z")

</div>

In the module, those should be available via os.environ: https://docs.python.org/2/library/os.html#os.environ

---

## [Overriding defaults in anchor](https://forum.ansible.com/t/overriding-defaults-in-anchor/27983)

<div class="topic-metadata">

**Author:** [@Anushri\_Mishra](https://forum.ansible.com/u/Anushri_Mishra)\
**Replies:** 0\
**Last updated:** [July 8, 2018, 1:53am UTC](https://forum.ansible.com/t/overriding-defaults-in-anchor/27983 "2018-07-08T01:53:59Z")

</div>

Hi, Is there a way to override defaults in anchor ? default: &defaults foo: "yes" bar: "true" data: "name1": "phone": 617 "foo" : "no" \<\<: \*defaults "name2": \<\<: \*defaults Does this work for example c…

---

## [ESXi upgrade with Ansible](https://forum.ansible.com/t/esxi-upgrade-with-ansible/27981)

<div class="topic-metadata">

**Author:** [@Ramesh\_AR](https://forum.ansible.com/u/Ramesh_AR)\
**Replies:** 0\
**Last updated:** [July 7, 2018, 1:25pm UTC](https://forum.ansible.com/t/esxi-upgrade-with-ansible/27981 "2018-07-07T13:25:58Z")

</div>

Hi All, I want to do ESXi upgrade by using Ansible from Scratch. Does anyone has sample playbooks for disabling alarm, VMs migration,put hosts in maintenance mode, remove from vCenter and upgrade process then reconnect …

---

## [bigip\_node module won't connect?](https://forum.ansible.com/t/bigip-node-module-wont-connect/27963)

<div class="topic-metadata">

**Author:** [@Scott\_Pouliot](https://forum.ansible.com/u/Scott_Pouliot)\
**Replies:** 1\
**Last updated:** [July 7, 2018, 5:13am UTC](https://forum.ansible.com/t/bigip-node-module-wont-connect/27963 "2018-07-07T05:13:48Z")

</div>

So I am fairly new to ansible here, but I’ve been fumbling my way around OK thus far. I can’t seem to get ansible connected to our BigIP F5 at all though. Are there special permissions I need my network team to grant me …

---

## [Ansible CredSSP configuration to connect to Windows Host](https://forum.ansible.com/t/ansible-credssp-configuration-to-connect-to-windows-host/27978)

<div class="topic-metadata">

**Author:** [@NirMur](https://forum.ansible.com/u/NirMur)\
**Replies:** 0\
**Last updated:** [July 6, 2018, 9:43pm UTC](https://forum.ansible.com/t/ansible-credssp-configuration-to-connect-to-windows-host/27978 "2018-07-06T21:43:28Z")

</div>

I am new to Ansible and trying to enable CredSSP to use AD authentication for my Windows host(Basic authentication works fine). I have added a group\_var file with the following information ansible\_connection: winrm ans…

---

## [run task  only if changed](https://forum.ansible.com/t/run-task-only-if-changed/27720)

<div class="topic-metadata">

**Author:** [@cava\_cavamagie](https://forum.ansible.com/u/cava_cavamagie)\
**Replies:** 8\
**Last updated:** [July 6, 2018, 7:53pm UTC](https://forum.ansible.com/t/run-task-only-if-changed/27720 "2018-07-06T19:53:28Z")

</div>

i have to run a playbook that can set the repository rh for a lot o machine name: RH Enable repositories rhsm\_repository: name: ‘{{ item.name }}’ state: ‘{{ item.state }}’ with\_items: ‘{{ IBM\_l6\_R\_RH7\_rhsm\_reposito…

---

## [Loop with a filter applied to a list](https://forum.ansible.com/t/loop-with-a-filter-applied-to-a-list/27972)

<div class="topic-metadata">

**Author:** [@bozho](https://forum.ansible.com/u/bozho)\
**Replies:** 2\
**Last updated:** [July 6, 2018, 12:41pm UTC](https://forum.ansible.com/t/loop-with-a-filter-applied-to-a-list/27972 "2018-07-06T12:41:27Z")

</div>

Hi all, I'm having trouble creating a list of file names to loop over. I've tried this, but it doesn't work: - name: Debug debug: msg: "{{ item }}" loop: "{{ query('fileglob', 'dir/\*') | basename) }}" I get an err…

---

## [Avoid typing the credentials for ansible-pull all the time](https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965)

<div class="topic-metadata">

**Author:** [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Replies:** 3\
**Last updated:** [July 6, 2018, 11:11am UTC](https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965 "2018-07-06T11:11:41Z")

</div>

Hello, in order to automate the pull request via ansible-pull, I need to have some credentials stored somewhere for ansible. The Repository is just reachable via HTTPS. Therefore Username and Password is needed. But a…

---

## [looking for advice on storing connection passwords](https://forum.ansible.com/t/looking-for-advice-on-storing-connection-passwords/27955)

<div class="topic-metadata">

**Author:** [@erichymowitz](https://forum.ansible.com/u/erichymowitz)\
**Replies:** 2\
**Last updated:** [July 6, 2018, 9:23am UTC](https://forum.ansible.com/t/looking-for-advice-on-storing-connection-passwords/27955 "2018-07-06T09:23:39Z")

</div>

So we have some windows machines, and right now, we have this in our /etc/ansible/hosts file: \[windows:vars\] ansible\_connection=winrm ansible\_user=AdminAccount ansible\_password=AdminPassword ansible\_winrm\_transport=…

---

## [win\_copy between two network shares](https://forum.ansible.com/t/win-copy-between-two-network-shares/27970)

<div class="topic-metadata">

**Author:** [@ranjith\_ravi](https://forum.ansible.com/u/ranjith_ravi)\
**Replies:** 1\
**Last updated:** [July 6, 2018, 8:49am UTC](https://forum.ansible.com/t/win-copy-between-two-network-shares/27970 "2018-07-06T08:49:57Z")

</div>

Hi, I want to copy a file from network share to another network share in ansible. But the problem is, i can able to pass credential for only one server using runas method. Need suggestion on this issue. Below is my pl…

---

## [Ansible + vmware](https://forum.ansible.com/t/ansible-vmware/27969)

<div class="topic-metadata">

**Author:** [@Konstantin\_R](https://forum.ansible.com/u/Konstantin_R)\
**Replies:** 0\
**Last updated:** [July 6, 2018, 5:46am UTC](https://forum.ansible.com/t/ansible-vmware/27969 "2018-07-06T05:46:29Z")

</div>

Hello, Trying to solve a big task. We have a ton of Datacenters and Clusters inside. I need to create a playbook wich. Find VM by hostname Moves it to 1st ESXi host in cluster & specific storage. Thank you.

---

## [Ansible 2.6.1/2.5.6/2.4.6 are now available](https://forum.ansible.com/t/ansible-2-6-1-2-5-6-2-4-6-are-now-available/27967)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 0\
**Last updated:** [July 6, 2018, 12:58am UTC](https://forum.ansible.com/t/ansible-2-6-1-2-5-6-2-4-6-are-now-available/27967 "2018-07-06T00:58:37Z")

</div>

Hi all, Ansible 2.6.1, 2.5.6, and 2.4.6 were released today. In addition to various bugfixes (see each release’s changelog for details), these releases each include fixes for two recently-filed security vulnerabilities: …

---

## [Strange ansible issue](https://forum.ansible.com/t/strange-ansible-issue/27964)

<div class="topic-metadata">

**Author:** [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Replies:** 1\
**Last updated:** [July 5, 2018, 9:49pm UTC](https://forum.ansible.com/t/strange-ansible-issue/27964 "2018-07-05T21:49:23Z")

</div>

Hi, There’s a check on one execution, and real execution on another, your problem does’nt come from that ? Regards,

---

## [custom logging for one role](https://forum.ansible.com/t/custom-logging-for-one-role/27942)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 6\
**Last updated:** [July 5, 2018, 7:23pm UTC](https://forum.ansible.com/t/custom-logging-for-one-role/27942 "2018-07-05T19:23:55Z")

</div>

I have a cron job that runs a playbook quarterly. For this one playbook only I wish to log to a separate file (for audit reasons). Is this possible with a command line switch? I haven’t seen a way to do this online, nor …

---

## [iterating over stdout\_lines list](https://forum.ansible.com/t/iterating-over-stdout-lines-list/27961)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 3\
**Last updated:** [July 5, 2018, 6:00pm UTC](https://forum.ansible.com/t/iterating-over-stdout-lines-list/27961 "2018-07-05T18:00:53Z")

</div>

I want ansible to create a csv file for me. For example I need the output to be in this format: Server, User, Approve, Remove serverA, user1,X, serverA, user2,X ServerA, user3,X ServerB, user1,X ServerC, user1,X S…

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

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