Example usage of creasty/ansible-roles
├── group_vars
│ └── example_production.yml
├── hosts
├── ignitions
│ └── example_production.yml
└── roles
├── common
└── example_production
├── files
├── tasks
│ └── main.yml
└── templates
$ git submodule add git@github.com:creasty/ansible-roles.git roles/common
I already did this for you, so insted of it, just clone the repository with recursive option.
$ git clone --recursive git@github.com:creasty/ansible-playbooks-example.git
# /ignitions/example_production.yml
# ...
vars:
common_path: ../common
role_path: ../example_production
# ...
# /group_vars/example_production.yml
app:
name: example
path: /home/webapp/example
user:
# ...
# /roles/example_production/tasks/main.yml
- include: '../../common/common.yml'
- include: '../../common/ntp.yml'
- include: '../../common/user.yml'
- include: '../../common/app.yml'
# ...
$ ansible-playbook -i hosts ignitions/example_production.yml