[ansible-project] Re: hostvars with variables for different hosts

2015-10-12 Thread Roman Belyakovsky
FYI, opened an issue <https://github.com/ansible/ansible/issues/12714>. On Friday, October 2, 2015 at 12:08:56 PM UTC+3, Roman Belyakovsky wrote: > > Hello! > > Let's say I have a simple dictionary in host_vars or group_vars: > host_presets: > hostname: "{{ in

[ansible-project] hostvars with variables for different hosts

2015-10-02 Thread Roman Belyakovsky
Hello! Let's say I have a simple dictionary in host_vars or group_vars: host_presets: hostname: "{{ inventory_hostname.split('.')[0] }} domain: "{{ inventory_hostname| regex_replace('^' + inventory_hostname. split('.')[0] + '\\.', '')}}" It works perfectly till I try to get it for other host

Re: [ansible-project] generic 'package' module?

2015-09-14 Thread Roman Belyakovsky
Hi Christian, I didn't get how did you do the OS specific package installation. I've ended up with a temporary solution: - name: install python-passlib action: "{{ ansible_pkg_mgr }} name={{ item.name }}" with_items: - { os: Gentoo, name: dev-python/passlib } when: ansible_os_family

[ansible-project] Re: can i use a ansible.cfg var in a playbook?

2015-09-09 Thread Roman Belyakovsky
I believe it should be a good idea to check filters or modules code and implement a filter, i.e. role_path(rolename). It's a bit complicated though: if you just copy this code to your filter it won't work due to

[ansible-project] Re: ETA on Ansible 2.0 ?

2015-09-08 Thread Roman Belyakovsky
Any update on ETA? -- 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+unsubscr...@googlegroups.com. To post to this group, send email to

[ansible-project] delegate_to works incorrectly with with_items

2015-09-03 Thread Roman Belyakovsky
Hello! I have an issue: delegate_to works incorrectly with with_items. I cannot collect missing facts. I've opened an issue <https://github.com/ansible/ansible/issues/1> but it was already closed. Is there anything wrong with my playbook? Thank you, Yours Faithfully, Roman Belya

Re: [ansible-project] Any way to make a task serial (or set mutex so only 1 thread run it at a time)?

2015-05-20 Thread Roman Belyakovsky
Looks like it's going to be possible in v2.0. Move tasks that should be done in 'serial: 1' mode to a separate file. Include it with items iterating over hosts in a group and set some variable to a host name. Add to files in a separate task condition to check if hostname is similar to that

[ansible-project] Re: Possible to set Serial per task ( needed when using delegate_to ) ?

2015-05-20 Thread Roman Belyakovsky
As this post is stilled in top of google search let me describe one more way for a single task that should not be done simultaneously on multiple servers: - hosts: all tasks: - name: set fact set_fact: marker: marker - name: group by marker group_by: