First playbook example
This commit is contained in:
parent
9351f64a03
commit
b2fb278b0f
|
@ -0,0 +1,3 @@
|
|||
# Kubernetes Playbook
|
||||
|
||||
Is included by [snel.ansible](https://git.snel.com/snelcom-ansible/snel.ansible)
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
# Playbook Kubernetes
|
||||
|
||||
- name: Kubernetes Play
|
||||
gather_facts: false
|
||||
hosts:
|
||||
- talos
|
||||
roles:
|
||||
- role: machine_status
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
|
||||
- name: Get machine status
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
ansible.builtin.command:
|
||||
cmd: "talosctl get machinestatus --endpoints '{{ ansible_remote }}' --nodes '{{ ansible_remote }}' --insecure --output json"
|
||||
register: _machine_status_output
|
||||
|
||||
|
||||
- name: Parse machine status
|
||||
ansible.builtin.set_fact:
|
||||
_machine_status: "{{ _machine_status_output.stdout | from_json }}"
|
||||
|
||||
- name: Show machine status
|
||||
ansible.builtin.debug:
|
||||
var: _machine_status
|
Loading…
Reference in New Issue