# Ansible Project

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

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

**Page:** 224

---

## [Apply action for each regexp match found on same line](https://forum.ansible.com/t/apply-action-for-each-regexp-match-found-on-same-line/28967)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 9\
**Last updated:** [November 13, 2018, 7:37pm UTC](https://forum.ansible.com/t/apply-action-for-each-regexp-match-found-on-same-line/28967 "2018-11-13T19:37:23Z")

</div>

Assume the following line: vif = \['mac=00:21:f6:04:16:f3,bridge=101498d8ff', 'mac=00:21:f6:80:0b:d9,bridge=1017dc5841'\] If I use lineinfile, replace, etc to do a regular expression match, can I somehow apply the follow…

---

## [What is the proper way to add a loop for a whole playbook ?](https://forum.ansible.com/t/what-is-the-proper-way-to-add-a-loop-for-a-whole-playbook/29020)

<div class="topic-metadata">

**Author:** [@ryan\_prihoda](https://forum.ansible.com/u/ryan_prihoda)\
**Replies:** 4\
**Last updated:** [November 13, 2018, 3:33pm UTC](https://forum.ansible.com/t/what-is-the-proper-way-to-add-a-loop-for-a-whole-playbook/29020 "2018-11-13T15:33:05Z")

</div>

Normally I’d add my loop at the end of each task but my playbook is growing rather long. How do I set variables in the playbook so that each task will loop though them ? Something like this \` \` name: archive logs ho…

---

## [unarchive a file is failing](https://forum.ansible.com/t/unarchive-a-file-is-failing/29010)

<div class="topic-metadata">

**Author:** [@anushakeshipeddy4](https://forum.ansible.com/u/anushakeshipeddy4)\
**Replies:** 8\
**Last updated:** [November 13, 2018, 9:00am UTC](https://forum.ansible.com/t/unarchive-a-file-is-failing/29010 "2018-11-13T09:00:39Z")

</div>

Hi Team, I am trying to unarchive a file is failing with below errors. Could someone please look into it. Playbook:

---

## [writing playbook with vars and input parameters](https://forum.ansible.com/t/writing-playbook-with-vars-and-input-parameters/28991)

<div class="topic-metadata">

**Author:** [@Vivek1](https://forum.ansible.com/u/Vivek1)\
**Replies:** 1\
**Last updated:** [November 13, 2018, 4:39am UTC](https://forum.ansible.com/t/writing-playbook-with-vars-and-input-parameters/28991 "2018-11-13T04:39:22Z")

</div>

Hi Experts, Am a beginner to ansible and need all your guidance to learn and understand ansible at its all functionality and professional way of playbook creation. So Experts, here i am installing an application and i …

---

## [Help needed to spedup the execution of playbook using aync](https://forum.ansible.com/t/help-needed-to-spedup-the-execution-of-playbook-using-aync/29011)

<div class="topic-metadata">

**Author:** [@Saravanan](https://forum.ansible.com/u/Saravanan)\
**Replies:** 2\
**Last updated:** [November 13, 2018, 12:30am UTC](https://forum.ansible.com/t/help-needed-to-spedup-the-execution-of-playbook-using-aync/29011 "2018-11-13T00:30:44Z")

</div>

Hi Team, Herewith I am sharing my core playbook and another yaml playbook used for iteration to get the apache server status, storing them to a file. This playbook takes longer time to complete the task on all hosts. To…

---

## [call Dockerfiles inside ansible](https://forum.ansible.com/t/call-dockerfiles-inside-ansible/28401)

<div class="topic-metadata">

**Author:** [@joe\_pinto](https://forum.ansible.com/u/joe_pinto)\
**Replies:** 3\
**Last updated:** [November 12, 2018, 10:42pm UTC](https://forum.ansible.com/t/call-dockerfiles-inside-ansible/28401 "2018-11-12T22:42:24Z")

</div>

I have one Dockerfile I have tried : name: build docker image command: docker build -t ansibleum /ze/Dockerfile But the image was not created) ansible-playbook old\_copiash.yml -f 1 PLAY \[Transfer and execute a scr…

---

## [Can Ansible execute a Dockerfile on Docker to setup platforms for PXE boots?](https://forum.ansible.com/t/can-ansible-execute-a-dockerfile-on-docker-to-setup-platforms-for-pxe-boots/29014)

<div class="topic-metadata">

**Author:** [@EspressoBeanies](https://forum.ansible.com/u/EspressoBeanies)\
**Replies:** 1\
**Last updated:** [November 12, 2018, 10:25pm UTC](https://forum.ansible.com/t/can-ansible-execute-a-dockerfile-on-docker-to-setup-platforms-for-pxe-boots/29014 "2018-11-12T22:25:07Z")

</div>

I’d like to setup an HTTP server on a Docker image to serve as a platform for PXE booting and I don’t see a clear way for Ansible to be able to execute a Dockerfile on a local Docker instance to spawn an HTTP server. I d…

---

## [cant run shell script with arguments](https://forum.ansible.com/t/cant-run-shell-script-with-arguments/29012)

<div class="topic-metadata">

**Author:** [@Vivek1](https://forum.ansible.com/u/Vivek1)\
**Replies:** 0\
**Last updated:** [November 12, 2018, 6:04pm UTC](https://forum.ansible.com/t/cant-run-shell-script-with-arguments/29012 "2018-11-12T18:04:59Z")

</div>

Hello Experts. i tried both command and shell module to execute the playbook for running my application setup. There i have to add some arguments with the script, as one input file as response.properties, and one applic…

---

## [Ansible command module giving errors in playbook](https://forum.ansible.com/t/ansible-command-module-giving-errors-in-playbook/29008)

<div class="topic-metadata">

**Author:** [@Vivek1](https://forum.ansible.com/u/Vivek1)\
**Replies:** 3\
**Last updated:** [November 12, 2018, 4:01pm UTC](https://forum.ansible.com/t/ansible-command-module-giving-errors-in-playbook/29008 "2018-11-12T16:01:38Z")

</div>

0down votefavorite I am creating a playbook to silently execute a installation package using Command module. But here I am getting playbook execution error. Below is my playbook sample. Here my aim is to execute the my…

---

## [Is there a way to access a play's vars section?](https://forum.ansible.com/t/is-there-a-way-to-access-a-plays-vars-section/28997)

<div class="topic-metadata">

**Author:** [@Nick\_Kakouros](https://forum.ansible.com/u/Nick_Kakouros)\
**Replies:** 4\
**Last updated:** [November 12, 2018, 2:25pm UTC](https://forum.ansible.com/t/is-there-a-way-to-access-a-plays-vars-section/28997 "2018-11-12T14:25:50Z")

</div>

Given a play, I would like to reference somehow its vars section. I would like to achieve any of the two: The next play to have access to the vars of the previous play like “{{ prev\_play\_vars }}” The vars section of ea…

---

## [Cron module](https://forum.ansible.com/t/cron-module/29005)

<div class="topic-metadata">

**Author:** [@f.second](https://forum.ansible.com/u/f.second)\
**Replies:** 2\
**Last updated:** [November 12, 2018, 1:12pm UTC](https://forum.ansible.com/t/cron-module/29005 "2018-11-12T13:12:05Z")

</div>

Hello, It’s not possible to install cron module for manage crontab. https://docs.ansible.com/ansible/2.7/modules/cron\_module.html?highlight=cron#requirements pip install cron I’ve this issue : playbook pip install c…

---

## [Logging per playbook file](https://forum.ansible.com/t/logging-per-playbook-file/28986)

<div class="topic-metadata">

**Author:** [@Sorin\_Work](https://forum.ansible.com/u/Sorin_Work)\
**Replies:** 3\
**Last updated:** [November 12, 2018, 10:23am UTC](https://forum.ansible.com/t/logging-per-playbook-file/28986 "2018-11-12T10:23:26Z")

</div>

Hi all, I just recently started using Ansible and really like it! I’ve enabled the global logging directive in /etc/ansible/ansible.cfg, but I wonder if I can re-point where the log gets saved per playbook? The setup …

---

## [VMware dvs portgroup](https://forum.ansible.com/t/vmware-dvs-portgroup/28994)

<div class="topic-metadata">

**Author:** [@Barry\_Obie](https://forum.ansible.com/u/Barry_Obie)\
**Replies:** 1\
**Last updated:** [November 12, 2018, 7:15am UTC](https://forum.ansible.com/t/vmware-dvs-portgroup/28994 "2018-11-12T07:15:05Z")

</div>

Hi. I’m trying to use the VMware module to configure my vCenters. I have over 100 vlans and roughly 30 dv switches that I’m trying to configure. The dvs switches could have any combination of the vlans. I could do somet…

---

## [Including vars\_files based on a condition is getting failed](https://forum.ansible.com/t/including-vars-files-based-on-a-condition-is-getting-failed/29001)

<div class="topic-metadata">

**Author:** [@anushakeshipeddy4](https://forum.ansible.com/u/anushakeshipeddy4)\
**Replies:** 3\
**Last updated:** [November 12, 2018, 5:56am UTC](https://forum.ansible.com/t/including-vars-files-based-on-a-condition-is-getting-failed/29001 "2018-11-12T05:56:20Z")

</div>

Hi All, I am trying to include vars\_Files based on a condition but it is getting failed. Could somone please help. PLAYBOOK:

---

## [concatenate string with all list items](https://forum.ansible.com/t/concatenate-string-with-all-list-items/28987)

<div class="topic-metadata">

**Author:** [@Fatima\_Elfakih](https://forum.ansible.com/u/Fatima_Elfakih)\
**Replies:** 1\
**Last updated:** [November 11, 2018, 11:50pm UTC](https://forum.ansible.com/t/concatenate-string-with-all-list-items/28987 "2018-11-11T23:50:27Z")

</div>

hello I want to add a string for all item in my list without using “with\_item”. any proposition? Thx

---

## ["/bin/sh: 1: powershell: not found\\n"](https://forum.ansible.com/t/bin-sh-1-powershell-not-found-n/27369)

<div class="topic-metadata">

**Author:** [@ali.khawaja](https://forum.ansible.com/u/ali.khawaja)\
**Replies:** 10\
**Last updated:** [November 11, 2018, 8:29pm UTC](https://forum.ansible.com/t/bin-sh-1-powershell-not-found-n/27369 "2018-11-11T20:29:26Z")

</div>

i have a simple ansible playbook that i am using to configure some windows machines. i am getting the following error. i have installed powershell. is it the bash shell that is complaining? winrm is configured fine and i…

---

## [Set hosts value with an extra-vars doesn't work for my Ansible role](https://forum.ansible.com/t/set-hosts-value-with-an-extra-vars-doesnt-work-for-my-ansible-role/29003)

<div class="topic-metadata">

**Author:** [@Dylan\_Osef](https://forum.ansible.com/u/Dylan_Osef)\
**Replies:** 0\
**Last updated:** [November 11, 2018, 6:07pm UTC](https://forum.ansible.com/t/set-hosts-value-with-an-extra-vars-doesnt-work-for-my-ansible-role/29003 "2018-11-11T18:07:49Z")

</div>

I’ve got a problem with my ansible playbook : My playbook is composed of 5 roles and looks like this : --- - name: Création de la machine virtuelle {{ Host\_Name }} à l'aide du template {{ vcenter\_template }} hosts: l…

---

## [Module vmware\_guest  option powerdon/powerdoff not work OK](https://forum.ansible.com/t/module-vmware-guest-option-powerdon-powerdoff-not-work-ok/29000)

<div class="topic-metadata">

**Author:** [@Lucas\_Jackson](https://forum.ansible.com/u/Lucas_Jackson)\
**Replies:** 2\
**Last updated:** [November 11, 2018, 4:19am UTC](https://forum.ansible.com/t/module-vmware-guest-option-powerdon-powerdoff-not-work-ok/29000 "2018-11-11T04:19:44Z")

</div>

Makes sense the behavior, your playbook is attempting to power on the vm (state: poweredon) if the vm is already powered on then changed should be false.

---

## [Rendering the variables](https://forum.ansible.com/t/rendering-the-variables/28998)

<div class="topic-metadata">

**Author:** [@BIJAY\_PARIDA](https://forum.ansible.com/u/BIJAY_PARIDA)\
**Replies:** 3\
**Last updated:** [November 10, 2018, 7:43pm UTC](https://forum.ansible.com/t/rendering-the-variables/28998 "2018-11-10T19:43:36Z")

</div>

I have defined the variable like below:- input\_host\_ports: 4000:fluent:syslog 4500:json:log 4800:plain:debuglog I want to get the render the variables in the jinja2 for loop like below: tcp { port =\> 4000 …

---

## [Ansible Installation into Custom Directory using Yum Repository](https://forum.ansible.com/t/ansible-installation-into-custom-directory-using-yum-repository/28999)

<div class="topic-metadata">

**Author:** [@acharyatejaswi25](https://forum.ansible.com/u/acharyatejaswi25)\
**Replies:** 1\
**Last updated:** [November 10, 2018, 6:46pm UTC](https://forum.ansible.com/t/ansible-installation-into-custom-directory-using-yum-repository/28999 "2018-11-10T18:46:15Z")

</div>

Hi, I have installed ansible and the version is 2.6.4 using yum repository in RHEL 6.8.By default,all the host,ansible.cfg…etc files are in “/etc/ansible” directory.Can I install it into a custom directory other than “/…

---

## [MongoDB Ansible PRs](https://forum.ansible.com/t/mongodb-ansible-prs/28881)

<div class="topic-metadata">

**Author:** [@rhysmeister](https://forum.ansible.com/u/rhysmeister)\
**Replies:** 1\
**Last updated:** [November 10, 2018, 6:41pm UTC](https://forum.ansible.com/t/mongodb-ansible-prs/28881 "2018-11-10T18:41:38Z")

</div>

Hello, I submitted two PRs to the Ansible project sometime ago… https://github.com/ansible/ansible/pull/43674 https://github.com/ansible/ansible/pull/43673 I appreciate you guys get a lot of these but can I find out …

---

## [Erro Playbook to Update](https://forum.ansible.com/t/erro-playbook-to-update/28975)

<div class="topic-metadata">

**Author:** [@Adelmo\_Silva](https://forum.ansible.com/u/Adelmo_Silva)\
**Replies:** 4\
**Last updated:** [November 10, 2018, 9:12am UTC](https://forum.ansible.com/t/erro-playbook-to-update/28975 "2018-11-10T09:12:36Z")

</div>

Good morning, my friends. I’m having an error happening on Ansible when I run the playbook below: hosts: all become: yes become\_method: sudo become\_user: ansible gather\_facts: yes tasks: name: Installing Updates …

---

## [How to deploy Microsoft Office using Ansible?](https://forum.ansible.com/t/how-to-deploy-microsoft-office-using-ansible/28966)

<div class="topic-metadata">

**Author:** [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Replies:** 5\
**Last updated:** [November 10, 2018, 12:28am UTC](https://forum.ansible.com/t/how-to-deploy-microsoft-office-using-ansible/28966 "2018-11-10T00:28:41Z")

</div>

Hi How can we deploy Microsoft Office through Ansible? Should I use the win\_package module? What options should I use?

---

## [AWS dynamic inventory not working - on ONE account](https://forum.ansible.com/t/aws-dynamic-inventory-not-working-on-one-account/27461)

<div class="topic-metadata">

**Author:** [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Replies:** 1\
**Last updated:** [November 10, 2018, 12:20am UTC](https://forum.ansible.com/t/aws-dynamic-inventory-not-working-on-one-account/27461 "2018-11-10T00:20:58Z")

</div>

I manage multiple AWS accounts. On all but one, I can use the ec2.py dynamic inventory script. On that one account, the inventory is always empty: kauer@kt:~/dev/ansible$ scripts/ec2.py --list { “\_meta”: { “hostvars…

---

## [Sudo (become) limitations & Best Practices](https://forum.ansible.com/t/sudo-become-limitations-best-practices/28995)

<div class="topic-metadata">

**Author:** [@Acrobis\_Nubian](https://forum.ansible.com/u/Acrobis_Nubian)\
**Replies:** 0\
**Last updated:** [November 9, 2018, 5:10pm UTC](https://forum.ansible.com/t/sudo-become-limitations-best-practices/28995 "2018-11-09T17:10:58Z")

</div>

Hi guys, So being new to Ansible I recently bumped into what seems to be a sudo security issue in Ansible, which I suppose is a well-known thing in Ansible community, but for whatever reasons I couldn’t find a lot of in…

---

## [ERROR! the field 'hosts' is required but was not set](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/28988)

<div class="topic-metadata">

**Author:** [@nexusbond.renz](https://forum.ansible.com/u/nexusbond.renz)\
**Replies:** 1\
**Last updated:** [November 9, 2018, 4:31pm UTC](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/28988 "2018-11-09T16:31:09Z")

</div>

(attachments)

---

## [cant start websphere Liberty using ansible](https://forum.ansible.com/t/cant-start-websphere-liberty-using-ansible/28993)

<div class="topic-metadata">

**Author:** [@Vivek1](https://forum.ansible.com/u/Vivek1)\
**Replies:** 1\
**Last updated:** [November 9, 2018, 2:49pm UTC](https://forum.ansible.com/t/cant-start-websphere-liberty-using-ansible/28993 "2018-11-09T14:49:46Z")

</div>

Hi Experts, Really appreciate your guidance here… I have setup a Websphere liberty application in Linux environment, there I am doing commandline execution and i want to automate that process through ansible now After…

---

## [Zypper fails to install multiple dependant RPMs e.g. mysql](https://forum.ansible.com/t/zypper-fails-to-install-multiple-dependant-rpms-e-g-mysql/28977)

<div class="topic-metadata">

**Author:** [@dean\_warren](https://forum.ansible.com/u/dean_warren)\
**Replies:** 1\
**Last updated:** [November 9, 2018, 5:21am UTC](https://forum.ansible.com/t/zypper-fails-to-install-multiple-dependant-rpms-e-g-mysql/28977 "2018-11-09T05:21:42Z")

</div>

Trying to install mysql on SLES 12 SP1 using Ansible 2.7 Following officail mysql documentation as per here: https://dev.mysql.com/doc/refman/8.0/en/linux-installation-rpm.html i.e. using the following command: sudo …

---

## [Ansible automate backup restoration](https://forum.ansible.com/t/ansible-automate-backup-restoration/28972)

<div class="topic-metadata">

**Author:** [@tonitsh](https://forum.ansible.com/u/tonitsh)\
**Replies:** 3\
**Last updated:** [November 9, 2018, 5:15am UTC](https://forum.ansible.com/t/ansible-automate-backup-restoration/28972 "2018-11-09T05:15:55Z")

</div>

Hi. Im having trouble in my backup test playbook. backed up files are is Amazon s3 bucket. The problem is - we have many versions there. i need to limit rsync to latest version without providing it manually, or to prom…

---

## [Alternate solution needed for winrm connections](https://forum.ansible.com/t/alternate-solution-needed-for-winrm-connections/28969)

<div class="topic-metadata">

**Author:** [@sase\_kumar](https://forum.ansible.com/u/sase_kumar)\
**Replies:** 3\
**Last updated:** [November 9, 2018, 4:41am UTC](https://forum.ansible.com/t/alternate-solution-needed-for-winrm-connections/28969 "2018-11-09T04:41:13Z")

</div>

Hi Team, In our environment , basic , ntlm ,credssp is disabled by default in windows2012 machines and I tried it out with last option that is kerberos . Scenario - centos machine has ansible controller new domain ha…

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

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