Hello,
I need some inspiration because I decided to finally start rewriting the entire Ansible project at my company.
We manage Ansible using AWX-Operator
How do you write your playbooks?
Do you have each playbook for something different f.e.:
- playbook-provision.yaml
- playbook-update.yaml
Or is it something like: playbook-allinone.yaml and more advanced tag management?
Do you also have any suggestions for ansible.cfg?
My playbook looks like:
---
# playbook.yaml
- name: Provision playbook
hosts: all
gather_facts: true
become: true
tasks:
- name: Provision SSH access
ansible.builtin.import_role:
name: ssh
when: launch_ssh | bool
tags:
- launch_tag_ssh
- name: Provision firewall
ansible.builtin.import_role:
name: firewall
when: launch_firewall | bool
tags:
- launch_tag_firewall
- name: Provision zabbix_agent2
ansible.builtin.import_role:
name: zabbix_agent2
when: launch_zabbix_agent2 | bool
tags:
- launch_tag_zabbix_agent2