# Latest

**URL:** https://forum.ansible.com/latest.md?page=886

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

**Page:** 887

---

## [Post json data with URI module](https://forum.ansible.com/t/post-json-data-with-uri-module/17760)

<div class="topic-metadata">

**Author:** [@Tony\_Kinsley](https://forum.ansible.com/u/Tony_Kinsley)\
**Replies:** 0\
**Last updated:** [March 17, 2015, 12:26am UTC](https://forum.ansible.com/t/post-json-data-with-uri-module/17760 "2015-03-17T00:26:34Z")

</div>

I am trying to post a variable that gets defined during my playbook as json to a webservice. Unfortunately I have not been able to get the URI module to post valid json. \` name: lookup act\_transaction in database mo…

---

## [Is using facts for application secrets secure](https://forum.ansible.com/t/is-using-facts-for-application-secrets-secure/17758)

<div class="topic-metadata">

**Author:** [@Andrew\_Swerlick](https://forum.ansible.com/u/Andrew_Swerlick)\
**Replies:** 1\
**Last updated:** [March 16, 2015, 9:09pm UTC](https://forum.ansible.com/t/is-using-facts-for-application-secrets-secure/17758 "2015-03-16T21:09:47Z")

</div>

I have an ansible workflow with two playbooks. One for provisioning servers with all my application dependencies and one for deploying my actual applications inside of docker containers. Currently the deployment playbook…

---

## [combining with\_nested: + with\_together: (incl. loop count limit)](https://forum.ansible.com/t/combining-with-nested-with-together-incl-loop-count-limit/17558)

<div class="topic-metadata">

**Author:** [@Nusenu1](https://forum.ansible.com/u/Nusenu1)\
**Replies:** 2\
**Last updated:** [March 16, 2015, 8:29pm UTC](https://forum.ansible.com/t/combining-with-nested-with-together-incl-loop-count-limit/17558 "2015-03-16T20:29:35Z")

</div>

Hi, (this email was previously send to the incorrect list \[1\]) I've got 3 sets of data: foo: \[ A, B, C, D, ...\] bar: \[ 1, 2 \] tra: \[ a, b \] foo should be combined with bar and tra in a nested loop, but bar and tra…

---

## [Search in File for a character - out of the box module](https://forum.ansible.com/t/search-in-file-for-a-character-out-of-the-box-module/17755)

<div class="topic-metadata">

**Author:** [@Michael\_Mulder](https://forum.ansible.com/u/Michael_Mulder)\
**Replies:** 1\
**Last updated:** [March 16, 2015, 5:33pm UTC](https://forum.ansible.com/t/search-in-file-for-a-character-out-of-the-box-module/17755 "2015-03-16T17:33:01Z")

</div>

Hi I simply want to search in a file if there is at lease one occurance of “@” inside. An ansible module is prefered I tried a little a bit with replace and lineinfile module and check the result variabel, but maybe th…

---

## [cannot substitute the key path with variable inside the lookup module](https://forum.ansible.com/t/cannot-substitute-the-key-path-with-variable-inside-the-lookup-module/17747)

<div class="topic-metadata">

**Author:** [@George\_Boobyer](https://forum.ansible.com/u/George_Boobyer)\
**Replies:** 1\
**Last updated:** [March 16, 2015, 5:32pm UTC](https://forum.ansible.com/t/cannot-substitute-the-key-path-with-variable-inside-the-lookup-module/17747 "2015-03-16T17:32:19Z")

</div>

I don't think you need the string concatenation - in Brian's example he is building a string - you are just using a variable alone? Have you tried key\_material: "{{ lookup('file', ssh\_key\_location) }}"

---

## [URI module equivalent for 'curl --upload-file'](https://forum.ansible.com/t/uri-module-equivalent-for-curl-upload-file/17732)

<div class="topic-metadata">

**Author:** [@Kyle\_Frank](https://forum.ansible.com/u/Kyle_Frank)\
**Replies:** 1\
**Last updated:** [March 16, 2015, 3:08pm UTC](https://forum.ansible.com/t/uri-module-equivalent-for-curl-upload-file/17732 "2015-03-16T15:08:09Z")

</div>

HI. I’ve been trying to deploy a war file to the Tomcat manager using the uri module. I’ve been able to use curl from the command line to achieve this but I can’t seem to translate it into an ansible task that uses the …

---

## [Access a variable defined in a playbook - within a role](https://forum.ansible.com/t/access-a-variable-defined-in-a-playbook-within-a-role/17739)

<div class="topic-metadata">

**Author:** [@Adrian\_Paraschiv](https://forum.ansible.com/u/Adrian_Paraschiv)\
**Replies:** 6\
**Last updated:** [March 16, 2015, 2:49pm UTC](https://forum.ansible.com/t/access-a-variable-defined-in-a-playbook-within-a-role/17739 "2015-03-16T14:49:45Z")

</div>

Hello, I have this playbook running a role. The role runs a script that runs with the role-parameter: “whentorun” I reuse the role with different arguments bun I need to run the second command (/scripts/nonReg/expoNonR…

---

## [Custom Connection Plugin or other solutions?](https://forum.ansible.com/t/custom-connection-plugin-or-other-solutions/17752)

<div class="topic-metadata">

**Author:** [@Martin2](https://forum.ansible.com/u/Martin2)\
**Replies:** 0\
**Last updated:** [March 16, 2015, 1:52pm UTC](https://forum.ansible.com/t/custom-connection-plugin-or-other-solutions/17752 "2015-03-16T13:52:20Z")

</div>

Hi, I have a situation with a special kind of bastion host. As far as I read the connection type plugins (ssh, paramiko\_ssh, winrm) it seems that this is the only way to actually do this, see below for a typical session…

---

## [lookup paths and reuse of roles](https://forum.ansible.com/t/lookup-paths-and-reuse-of-roles/17750)

<div class="topic-metadata">

**Author:** [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Replies:** 0\
**Last updated:** [March 16, 2015, 11:30am UTC](https://forum.ansible.com/t/lookup-paths-and-reuse-of-roles/17750 "2015-03-16T11:30:21Z")

</div>

Hello, I have written a role create\_user which does the following: - creates a user U - creates /etc/ssh/authorizedkeys/U with content of user U's authorizedkeys (copy task) - creates /etc/ssh/ignores/ignore\_U with …

---

## [Postgresql revoke user privileges on views](https://forum.ansible.com/t/postgresql-revoke-user-privileges-on-views/17749)

<div class="topic-metadata">

**Author:** [@Maxwell\_Talbot](https://forum.ansible.com/u/Maxwell_Talbot)\
**Replies:** 0\
**Last updated:** [March 16, 2015, 11:28am UTC](https://forum.ansible.com/t/postgresql-revoke-user-privileges-on-views/17749 "2015-03-16T11:28:19Z")

</div>

Hi All, I’m having some trouble removing users using the postgresql\_user integration module, I accept that I’m probably doing something dumb. To get rid of users, I realise I need to first get rid of their privileges. …

---

## [register shell output, set as custom fact and use it as a condition of the playbook running](https://forum.ansible.com/t/register-shell-output-set-as-custom-fact-and-use-it-as-a-condition-of-the-playbook-running/17734)

<div class="topic-metadata">

**Author:** [@Chris\_Short](https://forum.ansible.com/u/Chris_Short)\
**Replies:** 6\
**Last updated:** [March 16, 2015, 9:37am UTC](https://forum.ansible.com/t/register-shell-output-set-as-custom-fact-and-use-it-as-a-condition-of-the-playbook-running/17734 "2015-03-16T09:37:54Z")

</div>

I am trying to register the output of a shell command, set it as a fact, and then run the playbook only when there is not a match. Example:

---

## [register: variable as {{item}}?](https://forum.ansible.com/t/register-variable-as-item/17746)

<div class="topic-metadata">

**Author:** [@Rick\_Kasten](https://forum.ansible.com/u/Rick_Kasten)\
**Replies:** 4\
**Last updated:** [March 15, 2015, 3:10pm UTC](https://forum.ansible.com/t/register-variable-as-item/17746 "2015-03-15T15:10:12Z")

</div>

shell: alternatives --display {{ item }} | grep “best” | grep “jre1.7.0\_75” sudo: yes register: “{{ item }}” ignore\_errors: with\_items: java javaws jcontrol I’ve tried several iterations of this, all fail. Is there…

---

## [registered variables and ec2 with\_items on private and public subnet](https://forum.ansible.com/t/registered-variables-and-ec2-with-items-on-private-and-public-subnet/17718)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 1\
**Last updated:** [March 14, 2015, 10:14pm UTC](https://forum.ansible.com/t/registered-variables-and-ec2-with-items-on-private-and-public-subnet/17718 "2015-03-14T22:14:11Z")

</div>

Hi, Below is the playbook, which work fine and create an ec2 instance inside the Public subnet inside my VPC and register the result inside the “ec2” variable, but the problem is sometime the “Associate new EIP to the N…

---

## [need help getting started using Ansible conditionals with regards to the absence/presence of Docker containers](https://forum.ansible.com/t/need-help-getting-started-using-ansible-conditionals-with-regards-to-the-absence-presence-of-docker-containers/17743)

<div class="topic-metadata">

**Author:** [@Kenneth\_Wolcott](https://forum.ansible.com/u/Kenneth_Wolcott)\
**Replies:** 1\
**Last updated:** [March 14, 2015, 5:22pm UTC](https://forum.ansible.com/t/need-help-getting-started-using-ansible-conditionals-with-regards-to-the-absence-presence-of-docker-containers/17743 "2015-03-14T17:22:01Z")

</div>

Hi; I think I know what I need to do if I were running a bash script to manage Docker containers. But I'm not sure how to leverage that knowledge into Ansible conditionals. My problem is that I need to make cer…

---

## [Docker module required arguments - should image always be mandatory?](https://forum.ansible.com/t/docker-module-required-arguments-should-image-always-be-mandatory/17741)

<div class="topic-metadata">

**Author:** [@Dave\_W](https://forum.ansible.com/u/Dave_W)\
**Replies:** 1\
**Last updated:** [March 14, 2015, 5:16pm UTC](https://forum.ansible.com/t/docker-module-required-arguments-should-image-always-be-mandatory/17741 "2015-03-14T17:16:45Z")

</div>

Hi there. I’m fairly certain the docker module is working as designed, but I wanted to make sure before I create an issue on github. - name: stop docker container docker: name=myapp image=myappimage state…

---

## [Ansible for application deploys to cloud resources](https://forum.ansible.com/t/ansible-for-application-deploys-to-cloud-resources/17744)

<div class="topic-metadata">

**Author:** [@Josh\_Pederson](https://forum.ansible.com/u/Josh_Pederson)\
**Replies:** 0\
**Last updated:** [March 13, 2015, 9:34pm UTC](https://forum.ansible.com/t/ansible-for-application-deploys-to-cloud-resources/17744 "2015-03-13T21:34:30Z")

</div>

I’m curious how folks are using Ansible in scenarios where you provision an environment on AWS EC2 (or any cloud platform) then deploy your application to it. Take a QA environment example – your latest code is ready fo…

---

## [thoroughly stumped on ssh key issue; ansible not reading /root/.ssh/config? (missing something simple?).](https://forum.ansible.com/t/thoroughly-stumped-on-ssh-key-issue-ansible-not-reading-root-ssh-config-missing-something-simple/17463)

<div class="topic-metadata">

**Author:** [@jason\_cafarelli](https://forum.ansible.com/u/jason_cafarelli)\
**Replies:** 3\
**Last updated:** [March 13, 2015, 2:56pm UTC](https://forum.ansible.com/t/thoroughly-stumped-on-ssh-key-issue-ansible-not-reading-root-ssh-config-missing-something-simple/17463 "2015-03-13T14:56:10Z")

</div>

Issue: PAsswordless ssh works; ansible does not; comes back with AUTH failed. Almost looks like my /root/.ssh/config is not being read by ansible? Workarounds: setting key manually in /etc/ansible/ansible.cfg or using…

---

## [Variable inheritance/override](https://forum.ansible.com/t/variable-inheritance-override/17730)

<div class="topic-metadata">

**Author:** [@Duncan\_Hutty](https://forum.ansible.com/u/Duncan_Hutty)\
**Replies:** 1\
**Last updated:** [March 13, 2015, 2:13pm UTC](https://forum.ansible.com/t/variable-inheritance-override/17730 "2015-03-13T14:13:31Z")

</div>

I'd like to have a pattern for roles where I can: 1) set default values in defaults/default.yml 2) override certain parts of a deep data structure in defaults/{{ansible\_distribution}}.yml 3) allow individual instantia…

---

## [Re-using a pre\_task and post\_task using roles?](https://forum.ansible.com/t/re-using-a-pre-task-and-post-task-using-roles/17733)

<div class="topic-metadata">

**Author:** [@Sam\_S](https://forum.ansible.com/u/Sam_S)\
**Replies:** 1\
**Last updated:** [March 13, 2015, 7:45am UTC](https://forum.ansible.com/t/re-using-a-pre-task-and-post-task-using-roles/17733 "2015-03-13T07:45:42Z")

</div>

Let’s say I need to deploy two sets of applications - PHP vs PERL. I want to be able to re-use the pre\_tasks and post\_tasks snippet so that i dont have to make changes to multiple scripts if I modify a value for the net…

---

## [Having variables in task names](https://forum.ansible.com/t/having-variables-in-task-names/16237)

<div class="topic-metadata">

**Author:** [@Stephen\_Aylward](https://forum.ansible.com/u/Stephen_Aylward)\
**Replies:** 9\
**Last updated:** [March 13, 2015, 5:08am UTC](https://forum.ansible.com/t/having-variables-in-task-names/16237 "2015-03-13T05:08:14Z")

</div>

When running my playbook, on tasks that I have tried to name with variables, the variable name is there rather than the value. Eg: TASK: \[weblogic | Create {{ tmp\_dir }}\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* What do I need to c…

---

## [FYI Python 3 stuffs](https://forum.ansible.com/t/fyi-python-3-stuffs/15797)

<div class="topic-metadata">

**Author:** [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Replies:** 20\
**Last updated:** [March 12, 2015, 11:48pm UTC](https://forum.ansible.com/t/fyi-python-3-stuffs/15797 "2015-03-12T23:48:48Z")

</div>

To the few, the proud and the brave. I have worked on and have a working(99%) Ansible + Python3 setup. I am currently in the process of getting the PR into sane order. Testing and validation have sucked up most of my…

---

## [Service Module fails to change Sys V services when SystemD is enabled by default](https://forum.ansible.com/t/service-module-fails-to-change-sys-v-services-when-systemd-is-enabled-by-default/17703)

<div class="topic-metadata">

**Author:** [@Tony\_Kinsley](https://forum.ansible.com/u/Tony_Kinsley)\
**Replies:** 4\
**Last updated:** [March 12, 2015, 11:19pm UTC](https://forum.ansible.com/t/service-module-fails-to-change-sys-v-services-when-systemd-is-enabled-by-default/17703 "2015-03-12T23:19:55Z")

</div>

Hey Guys, I am working with an old Fedora ( 15 ) which has systemd enabled by default, but many of the services are still controlled by the old Sys V init scripts ( including sshd and auditd ). Looking through the servi…

---

## [PyCon Sprints](https://forum.ansible.com/t/pycon-sprints/17735)

<div class="topic-metadata">

**Author:** [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Replies:** 0\
**Last updated:** [March 12, 2015, 8:55pm UTC](https://forum.ansible.com/t/pycon-sprints/17735 "2015-03-12T20:55:04Z")

</div>

Hey everyone, Ansible is one of the sponsors of PyCon again this year. https://us.pycon.org/2015/ which means a bunch of us will be there and there will be a booth setup in the expo hall, etc. I'll be staying for the…

---

## [ERROR: provided hosts list is empty](https://forum.ansible.com/t/error-provided-hosts-list-is-empty/17731)

<div class="topic-metadata">

**Author:** [@Guru\_Devanla](https://forum.ansible.com/u/Guru_Devanla)\
**Replies:** 4\
**Last updated:** [March 12, 2015, 6:39pm UTC](https://forum.ansible.com/t/error-provided-hosts-list-is-empty/17731 "2015-03-12T18:39:50Z")

</div>

Hello All, I have a simple .yml file that looks like this. hosts: ‘{{ hosts }}’ tasks: include: tasks/apt\_setup.yml app\_user=‘{{ as\_user }}’ include: tasks/python\_setup.yml app\_user=‘{{ as\_user }}’ And I am invoking…

---

## [lookup module didn't replace variable value that is given as file name](https://forum.ansible.com/t/lookup-module-didnt-replace-variable-value-that-is-given-as-file-name/17729)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 2\
**Last updated:** [March 12, 2015, 5:35pm UTC](https://forum.ansible.com/t/lookup-module-didnt-replace-variable-value-that-is-given-as-file-name/17729 "2015-03-12T17:35:58Z")

</div>

Hi, I have problem with the lookup module, I am given the file name as a variable, it takes it but didn’t replace the variable with it’s value. For example: pub\_subnet: “{{ lookup(‘file’, ‘./vars/{{ vpc\_name }}\_public\_…

---

## [Ansible in Travis CI](https://forum.ansible.com/t/ansible-in-travis-ci/17724)

<div class="topic-metadata">

**Author:** [@Jurgen\_Hermann](https://forum.ansible.com/u/Jurgen_Hermann)\
**Replies:** 1\
**Last updated:** [March 12, 2015, 4:23pm UTC](https://forum.ansible.com/t/ansible-in-travis-ci/17724 "2015-03-12T16:23:37Z")

</div>

With a few tweaks it works, see https://travis-ci.org/jhermann/ansible.

---

## [Terminate all instances in a ASG with ec2\_asg](https://forum.ansible.com/t/terminate-all-instances-in-a-asg-with-ec2-asg/17717)

<div class="topic-metadata">

**Author:** [@Julien\_Syx](https://forum.ansible.com/u/Julien_Syx)\
**Replies:** 1\
**Last updated:** [March 12, 2015, 3:57pm UTC](https://forum.ansible.com/t/terminate-all-instances-in-a-asg-with-ec2-asg/17717 "2015-03-12T15:57:53Z")

</div>

Hello, I’m trying to use the ec2\_asg module here : http://docs.ansible.com/ec2\_asg\_module.html The goal is to kill all instances during the night and boot them the morning. I tried : name: Shutdown PREPROD hosts: l…

---

## [Running playbook in interactive mode breaks upon run](https://forum.ansible.com/t/running-playbook-in-interactive-mode-breaks-upon-run/17663)

<div class="topic-metadata">

**Author:** [@Sam\_S](https://forum.ansible.com/u/Sam_S)\
**Replies:** 4\
**Last updated:** [March 12, 2015, 3:19pm UTC](https://forum.ansible.com/t/running-playbook-in-interactive-mode-breaks-upon-run/17663 "2015-03-12T15:19:05Z")

</div>

ansible-playbook -i hosts test.yml --step Output: PLAY \[webservers\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Traceback (most recent call last): File “/home/deployment/ansible/bin/ansible-playbook…

---

## [AWS ec2\_elb register multiple instances to and elb?](https://forum.ansible.com/t/aws-ec2-elb-register-multiple-instances-to-and-elb/17700)

<div class="topic-metadata">

**Author:** [@Eoin\_Verling](https://forum.ansible.com/u/Eoin_Verling)\
**Replies:** 4\
**Last updated:** [March 12, 2015, 3:14pm UTC](https://forum.ansible.com/t/aws-ec2-elb-register-multiple-instances-to-and-elb/17700 "2015-03-12T15:14:59Z")

</div>

Hi, I’m trying to add instances to an ELB, I may be looking at this the wrong way. I have X number of instances, running ElasticSearch for example. I want to create an ELB, and add (register) all the instance ids, wit…

---

## [conditional with register in one task?](https://forum.ansible.com/t/conditional-with-register-in-one-task/17719)

<div class="topic-metadata">

**Author:** [@Marc\_Patermann](https://forum.ansible.com/u/Marc_Patermann)\
**Replies:** 2\
**Last updated:** [March 12, 2015, 10:53am UTC](https://forum.ansible.com/t/conditional-with-register-in-one-task/17719 "2015-03-12T10:53:24Z")

</div>

Hi, should this work: tasks: - name: test shell: uname -a when: env == "test" - name: test 1 file: path=/opt/test.txt state=touch when: env == "test1" register: test\_1 - n…

[Previous page](https://forum.ansible.com/latest.md?page=885)

[Next page](https://forum.ansible.com/latest.md?page=887)
