Hi, 

we have several playbooks and roles in our project so I try to organize 
them in that way:

\---deployment
    \---trunk
        |   ansible.cfg
        |   app1.yml
        |   ....yml
        |   app[N].yml
        +---files
        +---filter_plugins
        +---group_vars
        +---library
        +---playbooks
        |   +---provisioning
        |   |   |   binaryBuild.yml
        |   |   |   root.yml
        |   |   |   site.yml
        |   |   |   user.yml
        |   |   +---roles
        |   |   |   test-java.yml
        |   |   |   +---java


we put the ansible.cfg to the root of our project (trunk) to keep all 
settings in a central place, so whenever somebody checks out that project 
it should be executable.

Now, when invoking

ansible-playbook -i /path/to/inventory/hosts playbooks/provisioning/site.yml

the execution faills because of missing roles, filter_plugins and so on. 
Ansible tries to load those relative to the playbook - and not relative to 
the current directory!

Only workaround I found is to add a list of settings to the ansible.cfg 
file:

roles_path = roles: ../roles: ../../roles
filter_plugins = filter_plugins:../filter_plugins:../../filter_plugins:~/.
ansible/plugins/filter_plugins/:/usr/share/ansible_plugins/filter_plugins


Using ${ANSIBLE_HOME} in the ansible.cfg to have fixed path also did not work 
for me.

=> What is the "best practice" to organize real-life projects, containing a 
huge list of playbooks? 
=> Also, where do people put their "test playbooks", for integration testing of 
roles ?

I dont want a solution based on 
* ansible.cfg outside the project ( HOME directory or any other user dependant 
place)
* symlinks

I couldn“t find any hint concerning "test playbooks" and "organizing modules" 
in the documentation.

Thanx for any advice, 

Torsten

-- 
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/7e2b947b-a77f-4da5-a70e-c26b498a921d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to