Hi all!
I write role for Ansible Galaxy, and have a little problem. I have 2 host
groups and need execute different tasks for this groups. At this moment I
doing it with the following configuration, this is the root playbook.yml
- hosts: all
sudo: yes
sudo_user: root
vars_files:
- 'defaults/main.yml' # main configuration
- 'defaults/repo.yml' # repositories which must not be changed in
normal case
tasks:
- include: 'tasks/install.yml'
- hosts: streaming-master
sudo: yes
sudo_user: root
vars_files:
- 'defaults/main.yml'
- 'defaults/repo.yml'
tasks:
- include: 'tasks/configure-master.yml'
- include: 'tasks/users.yml'
- include: 'tasks/databases.yml'
- hosts: streaming-slaves
sudo: yes
sudo_user: root
vars_files:
- 'defaults/main.yml'
- 'defaults/repo.yml'
tasks:
- include: 'tasks/configure-slaves.yml'
Аs you can see, there are many duplicate information
(sudo/sudo_user/vars_files), how to avoid it?
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ad521265-6101-4326-ba61-25f9f302a716%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.