[ansible-project] Re: Problem looping over JSON data returned from URI call

2015-11-18 Thread Brian Green
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

Re: [ansible-project] YAML syntax error (beginner)

2014-04-11 Thread Brian Green
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:

Re: [ansible-project] Ansible conditions and logics

2014-04-03 Thread Brian Green
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

[ansible-project] Re: Delegated cronjobs with time vars per target host

2014-04-03 Thread Brian Green
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

[ansible-project] Re: Rebooting the server

2014-03-28 Thread Brian Green
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

[ansible-project] Re: Rebooting the server

2014-03-28 Thread Brian Green
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

[ansible-project] Re: using one playbook to install two versions of a software in one run

2014-03-26 Thread Brian Green
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

[ansible-project] group_by adding all hosts?

2014-03-09 Thread Brian Green
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

[ansible-project] Should move shell module from sh to bash?

2014-02-08 Thread Brian Green
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

[ansible-project] Re: How would you set variables in this case?

2014-01-10 Thread Brian Green
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

[ansible-project] Re: How would you set variables in this case?

2014-01-10 Thread Brian Green
: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

[ansible-project] Re: How to skip Role Dependencies?

2013-12-08 Thread Brian Green
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