- DigitalOcean Dynamic Inventory
- GCP Dynamic Inventory
- Reusable Roles
- exporter
- node-exporter
- jmx-exporter
- mongodb-exporter)
- apache-kafka
- apache-zookeeper
- java11
- setdatetime
- unzip
- supervisor
- python3
- pip3
- ansible
- pre-commit
$ pre-commit install
-
Digitalocean Inventory
-
Create your own config.ini from config.ini.example
-
Inventory for
hostvars
andgroupvars
- Development
- create your own digital_ocean.ini from digital_ocean.ini.example
- Production
- create your own digital_ocean.ini from digital_ocean.ini.example
- Development
-
-
GCP Inventory
- To-Do
-
Static Inventory
- To-Do
All things inside this repository started from playbook directory.
- Example playbook:
- name: Example
hosts: "{{ host }}"
become: yes
vars_files:
- "{{ vault_file }}"
roles:
# misc
- misc/supervisor
- misc/setdatetime
# exporter
- role: exporter
exporter_name: node_exporter
Note:
- {{ host }} variable defined for target host
- {{ vault_file }} variable defined for ansible-vault files location, value can be shown inside hosts/group_vars/all.yml files
- Usages
$ ANSIBLE_CONFIG=~/ansible-reusable-roles/config/config-prod.ini ansible-playbook ~/ansible-reusable-roles/playbook/production/example.yml --extra-var="host=testing"
All roles for install or setup configuration inside roles directory
Store credential variables and value.
Try this password xHSyH4fDJPYhYuff
$ ansible-vault edit {env}.vault
or stored password into file
$ ansible-vault edit development.vault --vault-password-file=~/.yourpasswordfile
hosts
directory Store configuration/variables on host / group level, make sure file naming is same withhost_target
templates
directory Store configuration/variables on global level
- Static Inventory Example