# Latest

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

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

**Page:** 906

---

## [Filter hosts based on facts](https://forum.ansible.com/t/filter-hosts-based-on-facts/17205)

<div class="topic-metadata">

**Author:** [@Vaclav\_Adamec](https://forum.ansible.com/u/Vaclav_Adamec)\
**Replies:** 2\
**Last updated:** [January 7, 2015, 11:55am UTC](https://forum.ansible.com/t/filter-hosts-based-on-facts/17205 "2015-01-07T11:55:04Z")

</div>

Hi, can humbly ask someone to provide me some example how to filter list of servers with facts ? I probably miss something in documentation, I need something like this: ansible -i /usr/local/src/ansible/plugins/invento…

---

## [apt show upgraded packages](https://forum.ansible.com/t/apt-show-upgraded-packages/17203)

<div class="topic-metadata">

**Author:** [@vadimv\_Vatlin](https://forum.ansible.com/u/vadimv_Vatlin)\
**Replies:** 0\
**Last updated:** [January 7, 2015, 7:41am UTC](https://forum.ansible.com/t/apt-show-upgraded-packages/17203 "2015-01-07T07:41:49Z")

</div>

Hello. I have the task which upgrade all packages to the latest version name: Full upgrade apt: upgrade=dist How can I using --check see which packages would be upgraded ?

---

## [Grant all privileges on a  database using postgresql\_user module](https://forum.ansible.com/t/grant-all-privileges-on-a-database-using-postgresql-user-module/17202)

<div class="topic-metadata">

**Author:** [@Navid\_Paya](https://forum.ansible.com/u/Navid_Paya)\
**Replies:** 0\
**Last updated:** [January 7, 2015, 6:00am UTC](https://forum.ansible.com/t/grant-all-privileges-on-a-database-using-postgresql-user-module/17202 "2015-01-07T06:00:14Z")

</div>

Hi I have been struggling with this for half a day but could be my lacking knowledge of PostgreSQL. I have a database and I want to gran full privileges on it to a particular user. This is what the psq query for that lo…

---

## [Problems with using Ansible 1.9 to assign a floating IP to an OpenStack nova instance](https://forum.ansible.com/t/problems-with-using-ansible-1-9-to-assign-a-floating-ip-to-an-openstack-nova-instance/17200)

<div class="topic-metadata">

**Author:** [@Eugene\_Goldberg](https://forum.ansible.com/u/Eugene_Goldberg)\
**Replies:** 1\
**Last updated:** [January 6, 2015, 9:14pm UTC](https://forum.ansible.com/t/problems-with-using-ansible-1-9-to-assign-a-floating-ip-to-an-openstack-nova-instance/17200 "2015-01-06T21:14:24Z")

</div>

Greetings, I’m trying to configure Ansible 1.9 to launch some OpenStack Nova instances. For each instance, I’m attempting to auto-assign a floating IP, connecting it to a public segment. When I try this: name: launc…

---

## [Using the Google Compute Engine module to create Ubuntu instances doesn't work as expected](https://forum.ansible.com/t/using-the-google-compute-engine-module-to-create-ubuntu-instances-doesnt-work-as-expected/16974)

<div class="topic-metadata">

**Author:** [@Luis\_Medina](https://forum.ansible.com/u/Luis_Medina)\
**Replies:** 1\
**Last updated:** [January 6, 2015, 8:44pm UTC](https://forum.ansible.com/t/using-the-google-compute-engine-module-to-create-ubuntu-instances-doesnt-work-as-expected/16974 "2015-01-06T20:44:14Z")

</div>

Hello, Let me start out with the playbook I’m using (any authentication info you see below has been modified from the original so no worries about privacy concerns): --- - name: Create instance(s) hosts: localhost …

---

## [Feature Idea: Use role meta data to explicitly fail on an unsupported platform](https://forum.ansible.com/t/feature-idea-use-role-meta-data-to-explicitly-fail-on-an-unsupported-platform/17182)

<div class="topic-metadata">

**Author:** [@Gilles\_Cornu](https://forum.ansible.com/u/Gilles_Cornu)\
**Replies:** 2\
**Last updated:** [January 6, 2015, 1:53pm UTC](https://forum.ansible.com/t/feature-idea-use-role-meta-data-to-explicitly-fail-on-an-unsupported-platform/17182 "2015-01-06T13:53:35Z")

</div>

Instead of having to write a “check task” for each role like \` name: Check for unsupported platform fail: msg=“The operating system {{ ansible\_distribution }} / {{ ansible\_os\_family }}) is not currently supported.” w…

---

## [stopping daemons before apt-get remove?](https://forum.ansible.com/t/stopping-daemons-before-apt-get-remove/17123)

<div class="topic-metadata">

**Author:** [@Kevin\_Burton](https://forum.ansible.com/u/Kevin_Burton)\
**Replies:** 2\
**Last updated:** [January 6, 2015, 8:58am UTC](https://forum.ansible.com/t/stopping-daemons-before-apt-get-remove/17123 "2015-01-06T08:58:47Z")

</div>

I need the opposite of notify. Basically, I have a ‘foo-off’ role to turn services / daemons off for a specific host. So if foo is the service, I want to stop foo , then apt-get remove it. service: name=foo state=sto…

---

## [how to make sure some file all contents are include on the remote server.](https://forum.ansible.com/t/how-to-make-sure-some-file-all-contents-are-include-on-the-remote-server/17192)

<div class="topic-metadata">

**Author:** [@Henry\_On](https://forum.ansible.com/u/Henry_On)\
**Replies:** 0\
**Last updated:** [January 6, 2015, 8:16am UTC](https://forum.ansible.com/t/how-to-make-sure-some-file-all-contents-are-include-on-the-remote-server/17192 "2015-01-06T08:16:10Z")

</div>

As the topic,how can I make sure some file content append to the exsiting file.I’ve encounted like this issue.

---

## [Calculating with Variables?](https://forum.ansible.com/t/calculating-with-variables/17177)

<div class="topic-metadata">

**Author:** [@Ulrich\_Hochholdinger](https://forum.ansible.com/u/Ulrich_Hochholdinger)\
**Replies:** 3\
**Last updated:** [January 6, 2015, 12:26am UTC](https://forum.ansible.com/t/calculating-with-variables/17177 "2015-01-06T00:26:53Z")

</div>

Hi, I just started playing around with ansible and tried to achieve a simple operations task with it: Iterate over all nodes of my Xen-Cluster – get free\_memory of every node and sum up those values. next step would b…

---

## [Template paths](https://forum.ansible.com/t/template-paths/16578)

<div class="topic-metadata">

**Author:** [@Joe\_Adams](https://forum.ansible.com/u/Joe_Adams)\
**Replies:** 18\
**Last updated:** [January 5, 2015, 11:36pm UTC](https://forum.ansible.com/t/template-paths/16578 "2015-01-05T23:36:20Z")

</div>

I tried asking the IRC channel but I didn’t get any responses so I figure that the mailing list might be better suited to this question. I’m trying to build an extensible iptables template. All of my hosts will need some…

---

## [using no-pty authorized\_keys option with standard ssh transport](https://forum.ansible.com/t/using-no-pty-authorized-keys-option-with-standard-ssh-transport/17191)

<div class="topic-metadata">

**Author:** [@Jeff\_Weber](https://forum.ansible.com/u/Jeff_Weber)\
**Replies:** 0\
**Last updated:** [January 5, 2015, 10:31pm UTC](https://forum.ansible.com/t/using-no-pty-authorized-keys-option-with-standard-ssh-transport/17191 "2015-01-05T22:31:29Z")

</div>

I’m using ansible to apply configuration on a few servers which have their ssh key configured with the “no-pty” option, and I’m attempting to work out the best configuration settings to use with ansible on them. I can u…

---

## [Use host var in a task in when clause](https://forum.ansible.com/t/use-host-var-in-a-task-in-when-clause/17172)

<div class="topic-metadata">

**Author:** [@Michael\_Liu1](https://forum.ansible.com/u/Michael_Liu1)\
**Replies:** 2\
**Last updated:** [January 5, 2015, 7:44pm UTC](https://forum.ansible.com/t/use-host-var-in-a-task-in-when-clause/17172 "2015-01-05T19:44:57Z")

</div>

Hey All, I’m trying to force a task to run based on a host variable I’ve set. The goal is to only have the task run (on a host) when the “elasticsearch\_purge\_old\_indices\_node” variable is set to “yes”. Inventory file: …

---

## [Either/or tasks](https://forum.ansible.com/t/either-or-tasks/17089)

<div class="topic-metadata">

**Author:** [@Jon\_Warbrick](https://forum.ansible.com/u/Jon_Warbrick)\
**Replies:** 4\
**Last updated:** [January 5, 2015, 6:34pm UTC](https://forum.ansible.com/t/either-or-tasks/17089 "2015-01-05T18:34:27Z")

</div>

Apologies if this is a FAQ, but I haven't found been able to find it anywhere. I keep wanting a pattern where something happens if a variable is true and something positively doesn't happen if the variable is false (or …

---

## [roadmap for cloud modules](https://forum.ansible.com/t/roadmap-for-cloud-modules/17169)

<div class="topic-metadata">

**Author:** [@Kesten\_Broughton2](https://forum.ansible.com/u/Kesten_Broughton2)\
**Replies:** 1\
**Last updated:** [January 5, 2015, 6:30pm UTC](https://forum.ansible.com/t/roadmap-for-cloud-modules/17169 "2015-01-05T18:30:59Z")

</div>

EC2 has far more modules than gce despite their having many similar offerings. I am considering writing a few modules for gce such as quotas and image create/delete. I’m wondering if there is a good way to know if these…

---

## [How to include vars files in another vars file?](https://forum.ansible.com/t/how-to-include-vars-files-in-another-vars-file/17183)

<div class="topic-metadata">

**Author:** [@Mark1](https://forum.ansible.com/u/Mark1)\
**Replies:** 11\
**Last updated:** [January 5, 2015, 5:47pm UTC](https://forum.ansible.com/t/how-to-include-vars-files-in-another-vars-file/17183 "2015-01-05T17:47:15Z")

</div>

Hi, I’m trying to create some sort of factory pattern I guess in my vars files for creating Amazon data pipeline jobs. What I want is to have a list of dicts, and each one will contain a parameter (“step”) that I want t…

---

## [a question of managing windows system through ansible tower](https://forum.ansible.com/t/a-question-of-managing-windows-system-through-ansible-tower/17185)

<div class="topic-metadata">

**Author:** [@wayne0019](https://forum.ansible.com/u/wayne0019)\
**Replies:** 1\
**Last updated:** [January 5, 2015, 4:52pm UTC](https://forum.ansible.com/t/a-question-of-managing-windows-system-through-ansible-tower/17185 "2015-01-05T16:52:33Z")

</div>

hi : I have provide playbook which can install apache server on a windows server, and I can run it with following command: ansible-playbook -i ./hosts ./site.yml the hosts file’s content is: \[window\] 15.126.235.166 …

---

## [Complex computation within jinja-templates in roles?](https://forum.ansible.com/t/complex-computation-within-jinja-templates-in-roles/17187)

<div class="topic-metadata">

**Author:** [@Hartmut\_Goebel](https://forum.ansible.com/u/Hartmut_Goebel)\
**Replies:** 4\
**Last updated:** [January 5, 2015, 4:38pm UTC](https://forum.ansible.com/t/complex-computation-within-jinja-templates-in-roles/17187 "2015-01-05T16:38:22Z")

</div>

Hi, I'm seeking a way to have complex computation within jinja-templates in roles. The computations I need are approx 100 lines of code, so using the jinja2-syntx "{%....%} for each line is tremulous. My first idea w…

---

## [How to write an Ansible task using with\_dict in a loop (with\_items)?](https://forum.ansible.com/t/how-to-write-an-ansible-task-using-with-dict-in-a-loop-with-items/16878)

<div class="topic-metadata">

**Author:** [@Jean-Louis\_FEREY](https://forum.ansible.com/u/Jean-Louis_FEREY)\
**Replies:** 3\
**Last updated:** [January 5, 2015, 3:40pm UTC](https://forum.ansible.com/t/how-to-write-an-ansible-task-using-with-dict-in-a-loop-with-items/16878 "2015-01-05T15:40:52Z")

</div>

I want to update INI configuration files. Today, I store my informations in a var file (in group\_vars) this way : # Identity configuration information identity\_servers\_conf: DEFAULT: admin\_token: "{{identity\_adm…

---

## [Can core user module be extended?](https://forum.ansible.com/t/can-core-user-module-be-extended/17130)

<div class="topic-metadata">

**Author:** [@Alan\_Ray](https://forum.ansible.com/u/Alan_Ray)\
**Replies:** 3\
**Last updated:** [January 5, 2015, 2:08pm UTC](https://forum.ansible.com/t/can-core-user-module-be-extended/17130 "2015-01-05T14:08:27Z")

</div>

I’m looking to extend the core user module to work (at least partially) with OS X (Darwin). The nearest discussion I can find is about 18 months old (https://groups.google.com/forum/#!searchin/ansible-project/extend$20mo…

---

## [Deploying Ansible in EC2 and managing playbook access via IAM roles](https://forum.ansible.com/t/deploying-ansible-in-ec2-and-managing-playbook-access-via-iam-roles/17186)

<div class="topic-metadata">

**Author:** [@Gary\_Malouf](https://forum.ansible.com/u/Gary_Malouf)\
**Replies:** 0\
**Last updated:** [January 5, 2015, 1:56pm UTC](https://forum.ansible.com/t/deploying-ansible-in-ec2-and-managing-playbook-access-via-iam-roles/17186 "2015-01-05T13:56:24Z")

</div>

I am setting up a fresh EC2 deployment for a client and am hoping to do the following: Set up a management host for the cluster and deploy Ansible to it along with the client’s playbooks Allow users to successfully exe…

---

## [Wildcard in group of hosts](https://forum.ansible.com/t/wildcard-in-group-of-hosts/17062)

<div class="topic-metadata">

**Author:** [@Guillaume\_Subiron](https://forum.ansible.com/u/Guillaume_Subiron)\
**Replies:** 4\
**Last updated:** [January 4, 2015, 11:46pm UTC](https://forum.ansible.com/t/wildcard-in-group-of-hosts/17062 "2015-01-04T23:46:25Z")

</div>

Hi, I manage multiple clients, and my servers are named using the following pattern: - foo-db01 - foo-www01 - bar-db01 - bar-mail01 - … I would like to make one group by client, using a wildcard for example: \[fo…

---

## [template source file not getting from closest role](https://forum.ansible.com/t/template-source-file-not-getting-from-closest-role/17095)

<div class="topic-metadata">

**Author:** [@Steve\_Kieu](https://forum.ansible.com/u/Steve_Kieu)\
**Replies:** 2\
**Last updated:** [January 4, 2015, 11:12pm UTC](https://forum.ansible.com/t/template-source-file-not-getting-from-closest-role/17095 "2015-01-04T23:12:16Z")

</div>

Hi All, I have role A and then B (dependent on A). I have sudoers.j2 in the templates folder for each role with different content. When a host with role B applied ansible run the task on role A and apply the source fi…

---

## [Check file for staleness or comparing ctime to current time in Ansible](https://forum.ansible.com/t/check-file-for-staleness-or-comparing-ctime-to-current-time-in-ansible/17176)

<div class="topic-metadata">

**Author:** [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Replies:** 2\
**Last updated:** [January 4, 2015, 8:25pm UTC](https://forum.ansible.com/t/check-file-for-staleness-or-comparing-ctime-to-current-time-in-ansible/17176 "2015-01-04T20:25:12Z")

</div>

Hello, I want to use Ansible for updating Jenkins plugins. So I download the update information via curl. I do not want to do this every time I run the playbook but only when the downloaded file is stale, say older t…

---

## [lookup using computed path?](https://forum.ansible.com/t/lookup-using-computed-path/17179)

<div class="topic-metadata">

**Author:** [@Roy\_Smith](https://forum.ansible.com/u/Roy_Smith)\
**Replies:** 1\
**Last updated:** [January 4, 2015, 7:03pm UTC](https://forum.ansible.com/t/lookup-using-computed-path/17179 "2015-01-04T19:03:11Z")

</div>

I need to install my ssh public key on a host. I’ve got my public key checked into my source tree. I don’t want to hard-wire the location of my source tree, so I use lookup(‘pipe’, ‘hg root’) to find the root of my tree …

---

## [Ansible & Jumphost + MFA](https://forum.ansible.com/t/ansible-jumphost-mfa/17043)

<div class="topic-metadata">

**Author:** [@Nico\_K](https://forum.ansible.com/u/Nico_K)\
**Replies:** 3\
**Last updated:** [January 4, 2015, 2:06pm UTC](https://forum.ansible.com/t/ansible-jumphost-mfa/17043 "2015-01-04T14:06:23Z")

</div>

Hi, It’s not perse an Ansible specific question but it’s my primary use-case and I’m hoping there are other users who did the same. For this example, let’s pretend I have 3 hosts, source, jumper and destination. The s…

---

## [template failure on a rather odd looking file (for apache+logstash)](https://forum.ansible.com/t/template-failure-on-a-rather-odd-looking-file-for-apache-logstash/16972)

<div class="topic-metadata">

**Author:** [@David\_Stark](https://forum.ansible.com/u/David_Stark)\
**Replies:** 1\
**Last updated:** [January 3, 2015, 8:02pm UTC](https://forum.ansible.com/t/template-failure-on-a-rather-odd-looking-file-for-apache-logstash/16972 "2015-01-03T20:02:47Z")

</div>

Hi everyone Sorry if this comes across as a bit of a silly questions but this has been my first real ansible issue that I couldn’t resolve. What I currently do is to declare a special LogFormat for apache. This spits o…

---

## [Escaping special characters inside variable?](https://forum.ansible.com/t/escaping-special-characters-inside-variable/16879)

<div class="topic-metadata">

**Author:** [@John\_Oliver](https://forum.ansible.com/u/John_Oliver)\
**Replies:** 2\
**Last updated:** [January 3, 2015, 6:46pm UTC](https://forum.ansible.com/t/escaping-special-characters-inside-variable/16879 "2015-01-03T18:46:13Z")

</div>

name: Check if postgres is already allowed via IPv4 shell: grep ‘^-A\\ INPUT\\ -s\\ {{roundcube\_host}}\\ -p\\ tcp\\ -m\\ state\\ –state\\ NEW\\ -m\\ tcp\\ –dport\\ 5432\\ -j\\ ACCEPT’ /etc/sysconfig/iptables \>/dev/null 2\>&1 ignore\_…

---

## [copy local or fetch with content](https://forum.ansible.com/t/copy-local-or-fetch-with-content/17175)

<div class="topic-metadata">

**Author:** [@Akos\_Vandra](https://forum.ansible.com/u/Akos_Vandra)\
**Replies:** 0\
**Last updated:** [January 3, 2015, 5:34pm UTC](https://forum.ansible.com/t/copy-local-or-fetch-with-content/17175 "2015-01-03T17:34:13Z")

</div>

Hello! Are there any plans to support the content parameter in fetch similar to how it’s done in copy? Would you accept a PR for it? I need to set the contents of a local file in the playbook directory. Using copy wit…

---

## [Accessing variable data from a filter](https://forum.ansible.com/t/accessing-variable-data-from-a-filter/17170)

<div class="topic-metadata">

**Author:** [@Akos\_Vandra](https://forum.ansible.com/u/Akos_Vandra)\
**Replies:** 2\
**Last updated:** [January 3, 2015, 3:37pm UTC](https://forum.ansible.com/t/accessing-variable-data-from-a-filter/17170 "2015-01-03T15:37:50Z")

</div>

Hello! I might be going around the problem in the wrong way, but I seem to need to access the variable cache from a filter plugin. I am trying to create a map filter, that can be used like so: name: Test Play hosts:…

---

## [Reconnect after the user is added](https://forum.ansible.com/t/reconnect-after-the-user-is-added/17160)

<div class="topic-metadata">

**Author:** [@anatoly\_techtonik](https://forum.ansible.com/u/anatoly_techtonik)\
**Replies:** 3\
**Last updated:** [January 3, 2015, 2:34pm UTC](https://forum.ansible.com/t/reconnect-after-the-user-is-added/17160 "2015-01-03T14:34:22Z")

</div>

Hi. Is there a way to make Ansible reconnect to continue? I am adding user and I need to execute the rest of the operations under this user - making checkout of the project with his forwarded SSH key.

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

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