[ansible-project] Are Roles enough?

2014-06-06 Thread Joachim Friberg
I have it as simple as this; Playbooks \ server1.yml \ server2.yml \ roles/ldap \ roles/Apache... And so on, its very simple and its easy to manager :-) -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop

[ansible-project] for and if in template

2014-05-28 Thread Joachim Friberg
Hi, I'm trying to get this: define hostgroup{ hostgroup_name TableswitchesSweden members dlg-prd-office-tbs01,dlg-prd-office-tbs02,dlg-prd-office- tbs03,dlg-prd-office-tbs04,dlg-prd-office-tbs05,dlg-prd-office-tbs07,dlg-prd

[ansible-project] Flatten a dict-list in a template

2014-05-21 Thread Joachim Friberg
So I'm trying to setup a shinken-enviroment and it has a similar syntax to Nagios. In the contactgroups.cfg I need to put all my admins on one line. Is there anyway to take entries from a list of dicts and flatten them to one line? Below is my test-example --- - hosts: localhost

Re: [ansible-project] Flatten a dict-list in a template

2014-05-21 Thread Joachim Friberg
How do you know all of this! You are amazing! :) It worked Den onsdagen den 21:e maj 2014 kl. 13:30:18 UTC+2 skrev Ernest0x: On 05/21/14 12:59, Joachim Friberg wrote: So I'm trying to setup a shinken-enviroment and it has a similar syntax to Nagios. In the contactgroups.cfg I need

[ansible-project] Multiple lines in subelements

2014-05-20 Thread Joachim Friberg
Hi, I'm trying to push the limits of subelements but I can't figure out how.. Part of my task/main.yml - name: Prepare for Shinken|user user: name={{ item.0.name }} comment={{ item.0.comment }} group={{ item.0.group }} shell={{ item.0.shell }} password={{

Re: [ansible-project] Multiple lines in subelements

2014-05-20 Thread Joachim Friberg
So what I'm trying to achive is not possible? How could I create a set of users using the variable's-file instead of hardcoding them into the task-file? -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop

Re: [ansible-project] Multiple lines in subelements

2014-05-20 Thread Joachim Friberg
You are the best! This should go in to the andible-docs. I Just needed to modify it a small bit. Here's the end result and code: - name: Prepare for Shinken|user user: name={{ item.0.name }} comment={{ item.0.comment }} group={{ item.1 }} shell={{ item.0.shell }}

Re: [ansible-project] Multiple lines in subelements

2014-05-20 Thread Joachim Friberg
Another great way of doing it! What I'm going to do is just a playbook to setup the basic Shinken system. And the Shinken user should only be member of the group shinken. Den tisdagen den 20:e maj 2014 kl. 14:39:54 UTC+2 skrev Ernest0x: On 05/20/14 15:05, Joachim Friberg wrote: You

Re: [ansible-project] Run handler on failed task

2014-04-16 Thread Joachim Friberg
future or if anyone can point me to where I can suggest a patch :) Den tisdagen den 15:e april 2014 kl. 17:34:01 UTC+2 skrev Dick Davies: On 15 April 2014 09:24, Joachim Friberg fetal...@gmail.com javascript: wrote: For example I want to do a yum install mysql on a server

[ansible-project] Run handler on failed task

2014-04-15 Thread Joachim Friberg
Hi, So what I want to do, and have not yet found a way todo yet, is to run a handler if a taks fails rather then if it succeeds. For example I want to do a yum install mysql on a server, but this server does not have python-simplejson and/or other packages that is neccesary for Ansible. How do