add base
This commit is contained in:
60
playbook.yaml
Normal file
60
playbook.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
# ansible-playbook playbook.yaml --ask-pass
|
||||
|
||||
- name: VM creator playbook
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Apply VM creator tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: tasks/01create_template.yaml
|
||||
apply:
|
||||
tags:
|
||||
- createtemplate
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: 1st node deploy playbook
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Apply node deploy tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: tasks/02create_first.yaml
|
||||
apply:
|
||||
tags:
|
||||
- createfirst
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Show node info
|
||||
hosts: k3s-1
|
||||
gather_facts: false
|
||||
vars:
|
||||
ansible_user: core
|
||||
|
||||
tasks:
|
||||
- name: Execute post raw commands
|
||||
ansible.builtin.include_tasks:
|
||||
file: tasks/02create_first_raw.yaml
|
||||
apply:
|
||||
tags:
|
||||
- createfirst
|
||||
- createfirstpost
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Deploy rest of nodes playbook
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Apply node deploy tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: tasks/03create_nodes.yaml
|
||||
apply:
|
||||
tags:
|
||||
- createrest
|
||||
tags:
|
||||
- always
|
||||
Reference in New Issue
Block a user