Try using from_json filter
http://docs.ansible.com/ansible/playbooks_filters.html#filters-for-formatting-data
https://gist.github.com/lxhunter/45fb119c0128600158d8
On Tuesday, November 17, 2015 at 12:09:30 PM UTC-6, Andris Bjornson wrote:
>
> Hello - I have a question about looping over json
While this may not be the cause of your issues, the following is (or will
be) an issue for you.
- name: ensure joe is installed yum
apt: name=joe state=latest
when: ansible_os_family == CentOS or ansible_os_family == Fedora
change to:
- name: ensure joe is installed yum
yum:
I've never seen this syntax used with when:
- name: Moving on
debug: msg=doing something with {{ item.item }}
when:
- item.stat.exists == true
- item.stat.islnk != true
with_items: st.results
Is that a valid conditional? Is it equivalent to 'and' ?
On Wednesday, April 2, 2014
Where are you using the rsnap_daily_hour variable? The task you pasted
doesn't have it included.
The vars file you included is host specific for 'newhost', if you are
trying to use those variables in a play involving the backuphost (not a
delegated_to task), you'll either need to use
If the server is taking a longer than the default timeout value, increase
that value. Default is 300 seconds, might need to increase that.
http://docs.ansible.com/wait_for_module.html
Or there could be a connectivity issue. Is it listening on port 22? Does
FQDN name resolution work?
On
name. I used it because I found it
in some Ansible snippet.
Which variable should I place there in order to get current host rebooted?
(in my case it would be xxx)
My hosts file:
[xxx]
xxx
W dniu piątek, 28 marca 2014 16:13:27 UTC+1 użytkownik Brian Green napisał:
If the server
You have to restructure the playbooks to loop within the role itself
(perhaps have a list with versions to install in your variables), or call
the role twice. I would really like to see some mechanism to loop over a
role, but with that said, you should be able to find a solution.
Why is
I ran into odd issues when using group names with hyphens in them. Similar
situation of not using variable names with hyphens in them. Not sure if this is
the case but its worth mentioning.
--
You received this message because you are subscribed to the Google Groups
Ansible Project group.
To
Unless I'm missing something, can't you just set executable: /bin/bash ?
--
You received this message because you are subscribed to the Google Groups
Ansible Project group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
How about keep your default variables in roles/vars/main.yml and then for
variables that would be considered special case or overrides you put them
elsewhere with higher precedence. For your RHEL 5 example, take a look at
http://docs.ansible.com/playbooks_variables.html#conditional-imports and
:19:12 PM UTC-6, Adam Morris wrote:
On Friday, January 10, 2014 4:16:47 PM UTC-8, Brian Green wrote:
How about keep your default variables in roles/vars/main.yml and then for
variables that would be considered special case or overrides you put them
elsewhere with higher precedence. For your
Have you tried something like:
---
dependencies:
- { role: some_role, when: some_role_dependency is not defined }
ansible-playbook -i hosts some_role.yml -e some_role_dependency=false
- skips dependency
ansible-playbook -i hosts some_role.yml
12 matches
Mail list logo