Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The directory structure does not conform to the standard #53

Open
v-olmedo opened this issue Oct 4, 2021 · 1 comment
Open

The directory structure does not conform to the standard #53

v-olmedo opened this issue Oct 4, 2021 · 1 comment

Comments

@v-olmedo
Copy link

v-olmedo commented Oct 4, 2021

https://docs.ansible.com/ansible/2.8/user_guide/playbooks_best_practices.html#directory-layout

production # inventory file for production servers
staging # inventory file for staging environment

group_vars/
group1.yml # here we assign variables to particular groups
group2.yml
host_vars/
hostname1.yml # here we assign variables to particular systems
hostname2.yml

library/ # if any custom modules, put them here (optional)
module_utils/ # if any custom module_utils to support modules, put them here (optional)
filter_plugins/ # if any custom filter plugins, put them here (optional)

site.yml # master playbook
webservers.yml # playbook for webserver tier
dbservers.yml # playbook for dbserver tier

roles/
common/ # this hierarchy represents a "role"
tasks/ #
main.yml # <-- tasks file can include smaller files if warranted
handlers/ #
main.yml # <-- handlers file
templates/ # <-- files for use with the template resource
ntp.conf.j2 # <------- templates end in .j2
files/ #
bar.txt # <-- files for use with the copy resource
foo.sh # <-- script files for use with the script resource
vars/ #
main.yml # <-- variables associated with this role
defaults/ #
main.yml # <-- default lower priority variables for this role
meta/ #
main.yml # <-- role dependencies
library/ # roles can also include custom modules
module_utils/ # roles can also include custom module_utils
lookup_plugins/ # or other types of plugins, like lookup in this case

webtier/              # same kind of structure as "common" was above, done for the webtier role
monitoring/           # ""
fooapp/               # ""
@sdodsley
Copy link
Collaborator

sdodsley commented Oct 4, 2021

There s no intent for this to be a conformant repository of example playbooks at this time.
This is currently a simple set of examples on how to use the Pure Ansible modules/Collections.
Should we decide to formalize this then we will of course conform to the standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants