[ansible-project] Re: Load vars directory variables at inventory or playbook level

2014-06-13 Thread Xabier Larrakoetxea
Solved! This was answered by Serge van Ginderachter at the devel list: group_vars/all can also be a directory (and so can be any group or host name) so you could do group_vars/all/normalstuff.yml group_vars/all/vaultencryptedstuff.yml El jueves, 12 de junio de 2014 15:11:41 UTC+2, Xabier

Re: [ansible-project] Thinking of Using Ansible for Big Data Center Move - Problem: New To Ansible.

2014-06-13 Thread Dick Davies
Your current location isn't managed by Ansible I suppose? I've got 3 environments built using the same roles and playbooks, I just feed it an inventory per 'stack' holding the new server hostnames and a few per-datacenter variables. Highly recommend it. If you're asking for Ansible playbooks to

Re: [ansible-project] Execute task in a playbook only once per day ?

2014-06-13 Thread Azul
sorted, + 15 - name: check when we last downloaded from upstream + 14 command: find /var/tmp/ -atime 1 -name last-upstream-fetch + 13 register: result + 12 ignore_errors: true + 11 10 - include: sync-upstream-repositories.yaml + 9 when: result !=

[ansible-project] invisible ansible

2014-06-13 Thread ProfHase
I would like to make ansible usage 'invisible' (due to some strange policies to use puppet even for the smallest stuff). There are two problems about it: 1. There is always an .ansible folder in the home directory. How can I switch this off (I'd rather not write a task to delete it

Re: [ansible-project] invisible ansible

2014-06-13 Thread Jan-Piet Mens
I would like to make ansible usage 'invisible' (due to some strange policies to use puppet even for the smallest stuff). mv ansible puppetthing mv ansible-playbook puppetotherthing Sorry. I couldn't resist. -JP -- You received this message because you are

Re: [ansible-project] invisible ansible

2014-06-13 Thread 'Petros Moisiadis' via Ansible Project
On 06/13/14 14:55, Jan-Piet Mens wrote: I would like to make ansible usage 'invisible' (due to some strange policies to use puppet even for the smallest stuff). mv ansible puppetthing mv ansible-playbook puppetotherthing Sorry. I couldn't resist. -JP Well, if you

[ansible-project] unarchive single file. unarchive bug?

2014-06-13 Thread Nick Evgeniev
Hi, any clue how to unarchive single file (i.e. file_name.bz2 - file_name) other than copy then call bunzip? btw there're no problems with multifile archives... also: set_fact: fact=value doesn't work, while set_fact: fact: value does. shouldn't docs be updated? -- You received this

Re: [ansible-project] Thinking of Using Ansible for Big Data Center Move - Problem: New To Ansible.

2014-06-13 Thread Tiglath
Thank you for your reply. We are not using Ansible now, so it would be a first. My plan is to migrate one application by hand, to scope the work, and then do a similar one with Ansible, and if satisfied scale up to all apps. On Friday, June 13, 2014 3:22:33 AM UTC-4, Dick Davies

Re: [ansible-project] invisible ansible

2014-06-13 Thread Michael DeHaan
I sympathesize with the boss problem. As such, may I suggest: include ansible require ansible ansible::ansible::ansible { before = stuff, after = otherstuff, requires = ansible::ansible, what = is most awesome;;; ensure = my boss doesn't find out;;; notify = not my boss };; =

Re: [ansible-project] unarchive single file. unarchive bug?

2014-06-13 Thread Michael DeHaan
(A) define doesn't work with respect to set_fact (B) please start seperate threads on seperate questions (C) sounds like you just want to decompress it rather than unarchive it to me? That would be fine, look into the creates= parameter on the shell command. On Fri, Jun 13, 2014 at

Re: [ansible-project] task includes with facts

2014-06-13 Thread Michael DeHaan
But there is no smart way to decide which tasks to run based on facts - just because the YAML syntax checker raises an error because a variable is not defined (yet) when: foo is defined it's a thing On Fri, Jun 13, 2014 at 9:02 AM, C. Morgan Hamill cham...@wesleyan.edu wrote: Excerpts

Re: [ansible-project] Execute task in a playbook only once per day ?

2014-06-13 Thread Michael DeHaan
You could modify a file with a result when you run a step and use the 'stat' module to check the mtime of the file. On Fri, Jun 13, 2014 at 5:15 AM, Azul m...@azulinho.com wrote: sorted, + 15 - name: check when we last downloaded from upstream + 14 command: find /var/tmp/ -atime 1

Re: [ansible-project] Re: Executing subset of task with tags does not work

2014-06-13 Thread Michael DeHaan
Not sure what you are getting at with all the T1a stuff. Generally speaking your playbooks should be written if extra steps are done, nothing changes, and things don't matter. For instance, a step that ensures a service is running, if it has nothing to do, does nothing. The same should be true

Re: [ansible-project] synchronize module connects to local machine as root before calling rsync

2014-06-13 Thread Michael DeHaan
We're using a turing complete programming language. It's possible. Just needs to be done. On Thu, Jun 12, 2014 at 8:09 AM, 'Petros Moisiadis' via Ansible Project ansible-project@googlegroups.com wrote: On 06/12/14 02:42, Chris Hoffman wrote: Ok, well I did track down the issue into the

Re: [ansible-project] files alongside group_vars, instead of in roles/role_name/files

2014-06-13 Thread Michael DeHaan
For all my environments there are entire files that lend themselves best to not be templated. Just one per environment will do. Having trouble parsing what you want to do here. On Thu, Jun 12, 2014 at 8:08 AM, jepper jespm...@gmail.com wrote: For all my environments there are entire files

Re: [ansible-project] Re: files alongside group_vars, instead of in roles/role_name/files

2014-06-13 Thread Michael DeHaan
Ok, good! On Thu, Jun 12, 2014 at 10:14 AM, jepper jespm...@gmail.com wrote: Yep, {{ inventory_dir }}/files/blah works. Thanks! -- 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

Re: [ansible-project] Conditional Include Question

2014-06-13 Thread Michael DeHaan
I'm not sure why you are ignoring failures on the install RPM step. That seems not good. And ignoring errors on the service part, also not good! What's the reason for all of this? On Thu, Jun 12, 2014 at 10:51 AM, Derrick Bryant dbrya...@gmail.com wrote: Thanks for the reply Michael. I

Re: [ansible-project] Conditional Include Question

2014-06-13 Thread Derrick Bryant
We're trying to avoid Ansible exiting when there's an error, leaving the node in a half-deployed state. We want Ansible to attempt a rollback if the deployment of new software fails. That is, if any of the tasks fail, we want Ansible to stop executing the existing play and run some recover

Re: [ansible-project] Thinking of Using Ansible for Big Data Center Move - Problem: New To Ansible.

2014-06-13 Thread Tiglath
On Friday, June 13, 2014 1:48:40 PM UTC-4, Michael DeHaan wrote: Not sure you can ask for templates without specific applications, so we'll ask -- what specific applications? :) Transaction processing on Solaris. Migration concerns mainly installing executables and configuration files.

[ansible-project] variables and their (multiple layer) resolution

2014-06-13 Thread Dmitry Makovey
I have a playbook, and in one of the templates I need to walk over all the hosts in certain groups grabbing their hostvars etc. I followed http://docs.ansible.com/faq.html and everything seems to work as expected but with one quirk: In template I have: {% for host in groups['nova'] %}

Re: [ansible-project] Conditional Include Question

2014-06-13 Thread Michael DeHaan
We're trying to avoid Ansible exiting when there's an error, leaving the node in a half-deployed state. Hmm. Not sure of your production environment, but seems something about the package is very wrong if upgrades sometimes fail that I would want to get sorted out. Package installs should be

Re: [ansible-project] task includes with facts

2014-06-13 Thread Michael DeHaan
I'm not sure what you mean when you say syntax checker. Can you show the ansible command line you are running and also the output you are receiving? On Fri, Jun 13, 2014 at 3:15 PM, Oliver Heinz oliver.heinz@googlemail.com wrote: Am Freitag, 13. Juni 2014 19:58:19 UTC+2 schrieb Michael

[ansible-project] Can I use with_dict for adding authorized_key for users in a user dict?

2014-06-13 Thread zperry
I have the following simple test playbook, t.yml --- - hosts: nb3 user: root vars_files: - 'vars/users.yml' tasks: - name: Setup | authorized key upload authorized_key: user='{{ item.key }}' *key={{ lookup('file', 'files/{{ item.key }}/id_rsa.pub') }}*

[ansible-project] Re: Can I use with_dict for adding authorized_key for users in a user dict?

2014-06-13 Thread zperry
Quick follow-up. I also have the test id_rsa.pub in `pwd`/files/testuser -- Zack On Friday, June 13, 2014 1:58:18 PM UTC-7, zperry wrote: I have the following simple test playbook, t.yml --- - hosts: nb3 user: root vars_files: - 'vars/users.yml' tasks: - name: Setup |

[ansible-project] Re: Can I use with_dict for adding authorized_key for users in a user dict?

2014-06-13 Thread zperry
Got it. I used the wrong loop construct. Should have used with_subelements with a different input dict. On Friday, June 13, 2014 1:58:18 PM UTC-7, zperry wrote: I have the following simple test playbook, t.yml --- - hosts: nb3 user: root vars_files: - 'vars/users.yml'

Re: [ansible-project] task includes with facts

2014-06-13 Thread Oliver Heinz
Sorry $ tree -L 2 playbooks/roles/test/ playbooks/roles/test/ ├── defaults │ └── main.yml └── tasks ├── Debian7.yml └── main.yml is the correct one before the move command. -- You received this message because you are subscribed to the Google Groups Ansible Project group. To