Skip to content

Instantly share code, notes, and snippets.

@duffney
Last active June 17, 2020 11:24
Show Gist options
  • Save duffney/cb2ebd52ebdf98624ee456dd34165995 to your computer and use it in GitHub Desktop.
Save duffney/cb2ebd52ebdf98624ee456dd34165995 to your computer and use it in GitHub Desktop.
Ansible Directory Layouts

Basic

|-- dev
|-- production

|-- group_vars/
|   |-- all.yml
|   |-- linux.yml
|   |-- windows.yml
|-- host_vars/
|   |-- linuxweb01.yml
|   |-- winweb01.yml

|-- ping.yml
|-- win_ping.yml
|-- configure_nginx_web_server.yml
|-- configure_iis_web_server.yml

|-- roles/
|   |-- chocolatey/
|   |-- ngnix/
|   |-- iis/

Alternate

|-- inventories/
|   |
|   |-- dev/
|   |   |-- hosts
|   |   |-- group_vars/
|   |   |   |-- all.yml
|   |   |   |-- linux.yml
|   |   |   |-- windows.yml
|   |   |-- host_vars/
|   |   |   |-- linuxweb01.yml
|   |   |   |-- winweb01.yml
|   |
|   |-- production/
|   |   |-- hosts
|   |   |-- group_vars/
|   |   |   |-- all.yml
|   |   |   |-- linux.yml
|   |   |   |-- windows.yml
|   |   |-- host_vars/
|   |   |   |-- linuxweb01.yml
|   |   |   |-- winweb01.yml

|-- ping.yml
|-- win_ping.yml
|-- configure_nginx_web_server.yml
|-- configure_iis_web_server.yml

|-- roles/
|   |-- chocolatey/
|   |-- ngnix/
|   |-- iis/
|-- environments/
|   |
|   |-- 000_cross_env_vars
|   |
|   |-- dev/
|   |   |-- hosts
|   |   |-- group_vars/
|   |   |   |-- all/
|   |   |   |  |-- 000_cross_env_vars -> ../../../000_cross_env_vars
|   |   |   |  |-- env_specific
|   |   |   |-- linux.yml
|   |   |   |-- windows.yml
|   |   |-- host_vars/
|   |   |   |-- linuxweb01.yml
|   |   |   |-- winweb01.yml
|   |
|   |-- production/
|   |   |-- hosts
|   |   |-- group_vars/
|   |   |   |-- all/
|   |   |   |  |-- 000_cross_env_vars -> ../../../000_cross_env_vars
|   |   |   |  |-- env_specific
|   |   |   |-- linux.yml
|   |   |   |-- windows.yml
|   |   |-- host_vars/
|   |   |   |-- linuxweb01.yml
|   |   |   |-- winweb01.yml

|-- ping.yml
|-- win_ping.yml
|-- configure_nginx_web_server.yml
|-- configure_iis_web_server.yml

|-- roles/
|   |-- chocolatey/
|   |-- ngnix/
|   |-- iis/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment