# Ansible Project

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

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

**Page:** 238

---

## [Ansible module “vmware\_portgroup” incorrectly returns “changed”, even when arguments unchanged.](https://forum.ansible.com/t/ansible-module-vmware-portgroup-incorrectly-returns-changed-even-when-arguments-unchanged/28450)

<div class="topic-metadata">

**Author:** [@dbaril](https://forum.ansible.com/u/dbaril)\
**Replies:** 0\
**Last updated:** [August 28, 2018, 6:21pm UTC](https://forum.ansible.com/t/ansible-module-vmware-portgroup-incorrectly-returns-changed-even-when-arguments-unchanged/28450 "2018-08-28T18:21:58Z")

</div>

The Ansible module “vmware\_portgroup” will incorrectly return a “changed” condition, even when the arguments are unchanged. The vmware\_portgroup module does run correctly and changes the ESXi portgroup settings as neede…

---

## [Ansible module “vmware\_dns\_config” incorrectly returns “changed”, even when arguments unchanged.](https://forum.ansible.com/t/ansible-module-vmware-dns-config-incorrectly-returns-changed-even-when-arguments-unchanged/28449)

<div class="topic-metadata">

**Author:** [@dbaril](https://forum.ansible.com/u/dbaril)\
**Replies:** 0\
**Last updated:** [August 28, 2018, 6:12pm UTC](https://forum.ansible.com/t/ansible-module-vmware-dns-config-incorrectly-returns-changed-even-when-arguments-unchanged/28449 "2018-08-28T18:12:52Z")

</div>

The Ansible module “vmware\_dns\_config” will incorrectly return a “changed” condition, even when the arguments are unchanged. The vmware\_dns\_config module does run correctly and changes the ESXi DNS settings as needed, b…

---

## [Access Splunk alerts through ansible](https://forum.ansible.com/t/access-splunk-alerts-through-ansible/28369)

<div class="topic-metadata">

**Author:** [@Pradeep\_Drall](https://forum.ansible.com/u/Pradeep_Drall)\
**Replies:** 13\
**Last updated:** [August 28, 2018, 5:46pm UTC](https://forum.ansible.com/t/access-splunk-alerts-through-ansible/28369 "2018-08-28T17:46:49Z")

</div>

I would like to access Splunk alerts through ansible. We have several alerts in Splunk which we wants to access through ansible. Please do let me know can we access splunk alerts via ansible. If so, let me know the steps…

---

## [Same host in multiple host groups](https://forum.ansible.com/t/same-host-in-multiple-host-groups/28443)

<div class="topic-metadata">

**Author:** [@payam.mesgari](https://forum.ansible.com/u/payam.mesgari)\
**Replies:** 4\
**Last updated:** [August 28, 2018, 3:57pm UTC](https://forum.ansible.com/t/same-host-in-multiple-host-groups/28443 "2018-08-28T15:57:43Z")

</div>

Hi, I am experiencing something similar to this issue Ansible group\_vars from inventory don’t support repeated hosts. My main playbook is: site.yml \` name: Configure acceptance server hosts: acceptance roles: …

---

## [Created Users on EC2 Instance, Now I Can't SSH There](https://forum.ansible.com/t/created-users-on-ec2-instance-now-i-cant-ssh-there/28430)

<div class="topic-metadata">

**Author:** [@ttwalto](https://forum.ansible.com/u/ttwalto)\
**Replies:** 7\
**Last updated:** [August 28, 2018, 3:05pm UTC](https://forum.ansible.com/t/created-users-on-ec2-instance-now-i-cant-ssh-there/28430 "2018-08-28T15:05:05Z")

</div>

I’ve run a playbook that creates an EC2 instance. The AMI used to create the instance is using CentOS and installs an SSH key so that I can ssh in as username “centos” without a password. It works fine. But now I’ve crea…

---

## [problem: date and time as variable in 2 steps](https://forum.ansible.com/t/problem-date-and-time-as-variable-in-2-steps/28444)

<div class="topic-metadata">

**Author:** [@Henrik\_Schuetze](https://forum.ansible.com/u/Henrik_Schuetze)\
**Replies:** 3\
**Last updated:** [August 28, 2018, 2:26pm UTC](https://forum.ansible.com/t/problem-date-and-time-as-variable-in-2-steps/28444 "2018-08-28T14:26:44Z")

</div>

i want to create an backup with Backup\_\<Date + Time\> so i use: defaults\\main.yml file\_date: “{{ lookup(‘pipe’,‘date +%Y-%m-%d-%H-%M-%S’) }}” and then i want to transfer the file. But between backup and transfer the t…

---

## [vmware\_guest or vsphere\_guest - Mulitple SCSI devices](https://forum.ansible.com/t/vmware-guest-or-vsphere-guest-mulitple-scsi-devices/23933)

<div class="topic-metadata">

**Author:** [@Adam\_Kile](https://forum.ansible.com/u/Adam_Kile)\
**Replies:** 1\
**Last updated:** [August 28, 2018, 10:36am UTC](https://forum.ansible.com/t/vmware-guest-or-vsphere-guest-mulitple-scsi-devices/23933 "2018-08-28T10:36:53Z")

</div>

We’ve started using Ansible to automate some VM builds within some of our environments. For one of our builds, we have a VM which has about 20 disks. When using vmware\_guest, if we add all 20 disks, the task bombs with: …

---

## [use Ansible to install a .exe program on windows machine](https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431)

<div class="topic-metadata">

**Author:** [@Nguyen\_Hoang](https://forum.ansible.com/u/Nguyen_Hoang)\
**Replies:** 3\
**Last updated:** [August 28, 2018, 9:24am UTC](https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431 "2018-08-28T09:24:20Z")

</div>

Hi All, I am new to Ansible and I want to use Ansible to install a .exe program on windows machines. I have a Ansible server on a CentOs linux machine and 10 windows 2012 R2 machines where I want to install a .exe prog…

---

## [How to add scsi controller in vmware\_guest](https://forum.ansible.com/t/how-to-add-scsi-controller-in-vmware-guest/28439)

<div class="topic-metadata">

**Author:** [@llmiell\_Sanimzz](https://forum.ansible.com/u/llmiell_Sanimzz)\
**Replies:** 0\
**Last updated:** [August 28, 2018, 8:04am UTC](https://forum.ansible.com/t/how-to-add-scsi-controller-in-vmware-guest/28439 "2018-08-28T08:04:57Z")

</div>

Hi, I would like to create DB server that have to separate scsi on disk device. Could you advice how to add more scsi controller on playbook? Thanks. SK

---

## [Configure 5 Linux servers with one block code in playbbok ansible\_local](https://forum.ansible.com/t/configure-5-linux-servers-with-one-block-code-in-playbbok-ansible-local/28438)

<div class="topic-metadata">

**Author:** [@BenZ](https://forum.ansible.com/u/BenZ)\
**Replies:** 0\
**Last updated:** [August 28, 2018, 7:58am UTC](https://forum.ansible.com/t/configure-5-linux-servers-with-one-block-code-in-playbbok-ansible-local/28438 "2018-08-28T07:58:47Z")

</div>

Hi, I am using vagrant to create 5 servers and using ansible to configure each of them to install Nginx and add the the sentence "hello from web server{server number}. I am trying to understand what is best way to conf…

---

## [Need a register value to persist](https://forum.ansible.com/t/need-a-register-value-to-persist/28414)

<div class="topic-metadata">

**Author:** [@dyioulos](https://forum.ansible.com/u/dyioulos)\
**Replies:** 9\
**Last updated:** [August 28, 2018, 7:21am UTC](https://forum.ansible.com/t/need-a-register-value-to-persist/28414 "2018-08-28T07:21:56Z")

</div>

Hello, all. I’ve created the following playbook: hosts: Host1 gather\_facts: false tasks: name: SQL Query Pending Import Jobs script: /etc/ansible/files/mssql\_opm\_getImportJobs.ps1 register: import\_job\_count debu…

---

## [Ansible Python API  - send file as parameter](https://forum.ansible.com/t/ansible-python-api-send-file-as-parameter/28437)

<div class="topic-metadata">

**Author:** [@Balaji1](https://forum.ansible.com/u/Balaji1)\
**Replies:** 0\
**Last updated:** [August 28, 2018, 5:13am UTC](https://forum.ansible.com/t/ansible-python-api-send-file-as-parameter/28437 "2018-08-28T05:13:52Z")

</div>

Hello All, Can anyone please help to create an equivalent of a command ansible-playbook -i environments playbooks/site.yml -u user\_name -e “@build.json” I am very curious to know how to write this " -e “@build.json” "…

---

## [DNS lookup not working](https://forum.ansible.com/t/dns-lookup-not-working/28433)

<div class="topic-metadata">

**Author:** [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Replies:** 4\
**Last updated:** [August 27, 2018, 11:05pm UTC](https://forum.ansible.com/t/dns-lookup-not-working/28433 "2018-08-27T23:05:29Z")

</div>

I have a task that uses the dig lookup to resolve a DNS record, but it fails with the error, “An unhandled exception occurred while running the lookup plugin ‘dig’. Error was a \<class ‘ansible.errors.AnsibleError’\>, orig…

---

## [How to validate the results for with\_items?](https://forum.ansible.com/t/how-to-validate-the-results-for-with-items/28429)

<div class="topic-metadata">

**Author:** [@Ramu](https://forum.ansible.com/u/Ramu)\
**Replies:** 5\
**Last updated:** [August 27, 2018, 8:15pm UTC](https://forum.ansible.com/t/how-to-validate-the-results-for-with-items/28429 "2018-08-27T20:15:33Z")

</div>

Hi All, I want to implement a logic for below requirement block: name: A task shell: grep '{{ item }} is present ’ /in/a/file register: output with\_items: “{{ host\_group }}” always: set\_fact: failed\_items: H…

---

## [Why does Ansible not run under Windows hosts natively?](https://forum.ansible.com/t/why-does-ansible-not-run-under-windows-hosts-natively/28428)

<div class="topic-metadata">

**Author:** [@Thorsten\_Schoning](https://forum.ansible.com/u/Thorsten_Schoning)\
**Replies:** 2\
**Last updated:** [August 27, 2018, 7:57pm UTC](https://forum.ansible.com/t/why-does-ansible-not-run-under-windows-hosts-natively/28428 "2018-08-27T19:57:30Z")

</div>

Hi all I'm doing some research about managing my Ubuntu servers using Ansible, but am using a Windows 10 myself and therefore would like to run Ansible on my Windows host. The servers to manage are Linux only for now…

---

## [unable to send register value on remote server.](https://forum.ansible.com/t/unable-to-send-register-value-on-remote-server/28421)

<div class="topic-metadata">

**Author:** [@Deepak\_Sharma](https://forum.ansible.com/u/Deepak_Sharma)\
**Replies:** 9\
**Last updated:** [August 27, 2018, 5:49pm UTC](https://forum.ansible.com/t/unable-to-send-register-value-on-remote-server/28421 "2018-08-27T17:49:07Z")

</div>

---

## [JInja Warning using when condition](https://forum.ansible.com/t/jinja-warning-using-when-condition/28087)

<div class="topic-metadata">

**Author:** [@Sreejith\_Sreejayan](https://forum.ansible.com/u/Sreejith_Sreejayan)\
**Replies:** 13\
**Last updated:** [August 27, 2018, 9:42am UTC](https://forum.ansible.com/t/jinja-warning-using-when-condition/28087 "2018-08-27T09:42:36Z")

</div>

any way to avoid jinja warning in when condition \[WARNING\]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: ‘{{ tomcat.resweb.version }}-{{ tomcat.resweb.build }}’ not in we…

---

## [Use shell/command to update text file with variable name](https://forum.ansible.com/t/use-shell-command-to-update-text-file-with-variable-name/28410)

<div class="topic-metadata">

**Author:** [@MPb](https://forum.ansible.com/u/MPb)\
**Replies:** 3\
**Last updated:** [August 27, 2018, 9:29am UTC](https://forum.ansible.com/t/use-shell-command-to-update-text-file-with-variable-name/28410 "2018-08-27T09:29:40Z")

</div>

I have a process that is exporting xml config from an application and the exported xml config contains the server name of the server it was exported from. A grep contains would contain a list of these: ./config\_1.xml: n…

---

## [Please explain ec2\_instance volumes config](https://forum.ansible.com/t/please-explain-ec2-instance-volumes-config/28317)

<div class="topic-metadata">

**Author:** [@Bruce\_Affonso](https://forum.ansible.com/u/Bruce_Affonso)\
**Replies:** 36\
**Last updated:** [August 27, 2018, 9:26am UTC](https://forum.ansible.com/t/please-explain-ec2-instance-volumes-config/28317 "2018-08-27T09:26:58Z")

</div>

I am trying to use the ec2\_instance module to create an ec2 instance. When using the ec2 module to configure a volume one would do something like this: volumes: device\_name: /dev/sda1 volume\_type: gp2 volume\_size: 5…

---

## [ec2\_vol and windows hosts](https://forum.ansible.com/t/ec2-vol-and-windows-hosts/28423)

<div class="topic-metadata">

**Author:** [@Bruce\_Affonso](https://forum.ansible.com/u/Bruce_Affonso)\
**Replies:** 1\
**Last updated:** [August 27, 2018, 3:21am UTC](https://forum.ansible.com/t/ec2-vol-and-windows-hosts/28423 "2018-08-27T03:21:37Z")

</div>

Hi, I know how to use ec2\_vol to mount a drive to a Windows host. Are there and Ansible options or modules available that then allow that drive to be set online, initialized and formatted or do we need to use powershell…

---

## [Ansible playbook -read array variables from external file recursively](https://forum.ansible.com/t/ansible-playbook-read-array-variables-from-external-file-recursively/28424)

<div class="topic-metadata">

**Author:** [@Saravanan](https://forum.ansible.com/u/Saravanan)\
**Replies:** 2\
**Last updated:** [August 26, 2018, 10:38pm UTC](https://forum.ansible.com/t/ansible-playbook-read-array-variables-from-external-file-recursively/28424 "2018-08-26T22:38:22Z")

</div>

Variables declared as an array in an external file. Need to read these variables recursively in the playbook during play for multiple records. Request to suggest right looping to use in Ansible playbook. Currently able …

---

## [Delete Partition Table](https://forum.ansible.com/t/delete-partition-table/28371)

<div class="topic-metadata">

**Author:** [@dmartin](https://forum.ansible.com/u/dmartin)\
**Replies:** 1\
**Last updated:** [August 25, 2018, 12:21pm UTC](https://forum.ansible.com/t/delete-partition-table/28371 "2018-08-25T12:21:19Z")

</div>

Hi everyone! I’m trying to clear a partition table. That is, delete all partitions. I don’t see how to do that with the parted module. Thanks! -Dylab

---

## [SSL/Certificate errors when running playbooks against Azure](https://forum.ansible.com/t/ssl-certificate-errors-when-running-playbooks-against-azure/26264)

<div class="topic-metadata">

**Author:** [@JOS](https://forum.ansible.com/u/JOS)\
**Replies:** 4\
**Last updated:** [August 25, 2018, 11:15am UTC](https://forum.ansible.com/t/ssl-certificate-errors-when-running-playbooks-against-azure/26264 "2018-08-25T11:15:27Z")

</div>

Hello, So I have an Azure free trial subscription and am trying to deploy VMs for it through ansible. For reference, I mostly followed this guide: https://github.com/erjosito/ansible-azure-lab I am unable to execute an…

---

## [Conditional parameters to vmware\_guest](https://forum.ansible.com/t/conditional-parameters-to-vmware-guest/28419)

<div class="topic-metadata">

**Author:** [@enzo.tano](https://forum.ansible.com/u/enzo.tano)\
**Replies:** 0\
**Last updated:** [August 24, 2018, 7:43pm UTC](https://forum.ansible.com/t/conditional-parameters-to-vmware-guest/28419 "2018-08-24T19:43:28Z")

</div>

Hi, sorry if I continue with newbie questions. I have my playbook for create vm from template - name: Clone a VM from Template and customize vmware\_guest: hostname: 192.168.1.209 username: user password:…

---

## [Ansible 2.5.1 does not run a task](https://forum.ansible.com/t/ansible-2-5-1-does-not-run-a-task/28411)

<div class="topic-metadata">

**Author:** [@Chris\_Barlock](https://forum.ansible.com/u/Chris_Barlock)\
**Replies:** 3\
**Last updated:** [August 24, 2018, 2:19pm UTC](https://forum.ansible.com/t/ansible-2-5-1-does-not-run-a-task/28411 "2018-08-24T14:19:01Z")

</div>

I just upgraded a set of Ubuntu machines from 16.04.5 to 18.04.1, which now has Ansible 2.5.1 installed. An existing Ansible project that I have seems to skip a step. With verbose mode enabled, I see that it starts the s…

---

## [Output from "fail" too verbose](https://forum.ansible.com/t/output-from-fail-too-verbose/28413)

<div class="topic-metadata">

**Author:** [@Uwe\_Sauter](https://forum.ansible.com/u/Uwe_Sauter)\
**Replies:** 2\
**Last updated:** [August 24, 2018, 10:42am UTC](https://forum.ansible.com/t/output-from-fail-too-verbose/28413 "2018-08-24T10:42:20Z")

</div>

Hi all, I have a list of files where I need to check existence and fail if one doesn't exist. I'd expect the fail module to \*just\* output the defined message when the condition is true but instead the complete item is…

---

## [Build ec2 instances with attaching multiple tags names :-](https://forum.ansible.com/t/build-ec2-instances-with-attaching-multiple-tags-names/28412)

<div class="topic-metadata">

**Author:** [@Badraj\_Angirekula](https://forum.ansible.com/u/Badraj_Angirekula)\
**Replies:** 0\
**Last updated:** [August 24, 2018, 5:30am UTC](https://forum.ansible.com/t/build-ec2-instances-with-attaching-multiple-tags-names/28412 "2018-08-24T05:30:27Z")

</div>

Build ec2 instances with attaching multiple tags names :- For example- I have launched one ec2 instance with tag name “websever1” the next builds of ec2 instances should start with tag name webserver2 , webserver3 … aut…

---

## [remote file concatenation](https://forum.ansible.com/t/remote-file-concatenation/28408)

<div class="topic-metadata">

**Author:** [@dch](https://forum.ansible.com/u/dch)\
**Replies:** 2\
**Last updated:** [August 23, 2018, 10:02pm UTC](https://forum.ansible.com/t/remote-file-concatenation/28408 "2018-08-23T22:02:38Z")

</div>

hi, I've 3 files on a remote server after acme let's encrypt dns-01 process, that need to be concatenated in a specific order (private.key intermediate.cert public.cert ) for my TLS proxy, on the same system. - the ass…

---

## [selectattr on dict not working as expected](https://forum.ansible.com/t/selectattr-on-dict-not-working-as-expected/28409)

<div class="topic-metadata">

**Author:** [@justin1](https://forum.ansible.com/u/justin1)\
**Replies:** 2\
**Last updated:** [August 23, 2018, 9:05pm UTC](https://forum.ansible.com/t/selectattr-on-dict-not-working-as-expected/28409 "2018-08-23T21:05:31Z")

</div>

I have a dict that looks like: \` TASK \[debug vpc\_subnet\_facts.subnets\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Comparing part of a string as an integer](https://forum.ansible.com/t/comparing-part-of-a-string-as-an-integer/28405)

<div class="topic-metadata">

**Author:** [@Jameson](https://forum.ansible.com/u/Jameson)\
**Replies:** 8\
**Last updated:** [August 23, 2018, 8:08pm UTC](https://forum.ansible.com/t/comparing-part-of-a-string-as-an-integer/28405 "2018-08-23T20:08:36Z")

</div>

I’m trying to write a conditional to only act on members of a list of strings when two characters in the string are less than a given number. Does anyone know if this is possible? What I’m trying now looks like: set\_fac…

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

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