feat: Updates for using pre-defined ansible role
This commit is contained in:
4
playbook/ansible.cfg
Normal file
4
playbook/ansible.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
[defaults]
|
||||
inventory=./inventory.ini
|
||||
stdout_callback=yaml
|
||||
interpreter_python=auto_silent
|
||||
0
playbook/group_vars/all/.gitkeep
Normal file
0
playbook/group_vars/all/.gitkeep
Normal file
2
playbook/inventory.ini
Normal file
2
playbook/inventory.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[local]
|
||||
127.0.0.1 ansible_connection=local
|
||||
25
playbook/playbook.yml
Normal file
25
playbook/playbook.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Generate Report.
|
||||
hosts: all
|
||||
roles:
|
||||
- role: hpa_role
|
||||
tasks:
|
||||
- name: Link vars file.
|
||||
ansible.builtin.file:
|
||||
src: "{{ work_dir }}/vars.yml"
|
||||
dest: "{{ work_dir }}/playbook/group_vars/all/vars.yml"
|
||||
state: link
|
||||
tags:
|
||||
- setup
|
||||
- setup-all
|
||||
- setup-all-with-vault
|
||||
- setup-with-vault
|
||||
|
||||
- name: Link vault file.
|
||||
ansible.builtin.file:
|
||||
src: "{{ work_dir }}/vault.yml"
|
||||
dest: "{{ work_dir }}/playbook/group_vars/all/vault.yml"
|
||||
state: link
|
||||
tags:
|
||||
- setup-all-with-vault
|
||||
- setup-with-vault
|
||||
3
playbook/requirements.yml
Normal file
3
playbook/requirements.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
- name: hpa_role
|
||||
src: git+https://git.housh.dev/michael/ansible-role-hpa
|
||||
version: main
|
||||
Reference in New Issue
Block a user