feat(ansible): add minimal doc-rpc sol bootstrap playbook
This commit is contained in:
9
ansible/ansible.cfg
Normal file
9
ansible/ansible.cfg
Normal file
@@ -0,0 +1,9 @@
|
||||
[defaults]
|
||||
inventory = inventory/hosts.ini
|
||||
host_key_checking = False
|
||||
stdout_callback = yaml
|
||||
interpreter_python = auto_silent
|
||||
retry_files_enabled = False
|
||||
|
||||
[ssh_connection]
|
||||
pipelining = True
|
||||
2
ansible/inventory/hosts.ini
Normal file
2
ansible/inventory/hosts.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[sol_rpc]
|
||||
mevnode ansible_host=mevnode ansible_user=root
|
||||
27
ansible/playbooks/doc-rpc-sol-min.yml
Normal file
27
ansible/playbooks/doc-rpc-sol-min.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Minimal check for doc/rpc Sol host
|
||||
hosts: sol_rpc
|
||||
gather_facts: true
|
||||
become: false
|
||||
|
||||
tasks:
|
||||
- name: Validate Ansible transport
|
||||
ansible.builtin.ping:
|
||||
|
||||
- name: Show host basics
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- "inventory_hostname={{ inventory_hostname }}"
|
||||
- "ansible_host={{ ansible_host | default('n/a') }}"
|
||||
- "hostname={{ ansible_facts['hostname'] | default('n/a') }}"
|
||||
- "os_family={{ ansible_facts['os_family'] | default('n/a') }}"
|
||||
- "kernel={{ ansible_facts['kernel'] | default('n/a') }}"
|
||||
|
||||
- name: Read uptime
|
||||
ansible.builtin.command: uptime
|
||||
register: uptime_cmd
|
||||
changed_when: false
|
||||
|
||||
- name: Print uptime
|
||||
ansible.builtin.debug:
|
||||
var: uptime_cmd.stdout
|
||||
Reference in New Issue
Block a user