Hi

Is there a document describing the best practices to organise a complex 
Ansible project ?

Here is the project that I'm thinking about :
 
- Project has been designed as a collection of reusable modules (= role) 
which are living under by example this folder "complexproject/roles" fo the 
modules part of the main project
- Project could include roles created and managed by external teams and git 
cloned locally under "complexproject/imported/projectA/roles, 
complexproject/imported/projectB/roles" 
- Users access the main playbooks using this command "ansible-playbook -i 
inventory complexproject/playbooks/main.yml 
- main.yml file contains roles tagged to be called

E.g.
---
- hosts: "{{ openshift_node }}"
  gather_facts: "{{ gathering_host_info | bool == true }}"

  roles:
    - { role: 'enable_cluster_admin', tags: 'enable_cluster_admin', when: 
target_platform == 'cloud' }
    - { role: 'create_projects',      tags: 'create_projects'}
    - { role: 'persistence',          tags: 'persistence',          when: 
target_platform == 'cloud' }

Questions
- Is this approach coherent/consistent ?
- Can we set up a var to tell to Ansible where all the roles are located: 
complexproject/roles:complexproject/imported/projectA/roles:complexproject/imported/projectB/roles
- Should we adopt a different approach where different projects which 
contain roles are imported using "import_playbook" --> see 
`openshift-ansible` project - https://goo.gl/KXDWXN ?

Regards

Charles

-- 
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/c9e936ce-5c2f-4956-a196-9babf84d6802%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to