-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidate.yml
More file actions
68 lines (57 loc) · 1.93 KB
/
Copy pathvalidate.yml
File metadata and controls
68 lines (57 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# Relay Validation Playbook
# Run to validate configuration without making changes
- name: Validate Relay configuration
hosts: relay_services
gather_facts: true
become: false
tasks:
- name: Check SSH connectivity
ansible.builtin.ping:
- name: Gather system facts
ansible.builtin.setup:
- name: Display host information
ansible.builtin.debug:
msg:
- "Hostname: {{ ansible_hostname }}"
- "OS: {{ ansible_distribution }} {{ ansible_distribution_version }}"
- "Architecture: {{ ansible_architecture }}"
- "Python: {{ ansible_python_version }}"
- name: Check sudo access
ansible.builtin.command: sudo -n true
changed_when: false
become: false
- name: Verify required directories (Keystone prerequisites)
ansible.builtin.stat:
path: "{{ item }}"
register: prereq_dirs
loop:
- /etc/containers/systemd
- /mnt/ssd
- /mnt/backup
become: true
- name: Report prerequisite status
ansible.builtin.debug:
msg: |
Keystone Prerequisites:
{% for result in prereq_dirs.results %}
- {{ result.item }}: {{ 'OK' if result.stat.exists else 'MISSING' }}
{% endfor %}
- name: Verify Podman installation
ansible.builtin.command: podman --version
register: podman_version
changed_when: false
failed_when: false
become: true
- name: Display Podman status
ansible.builtin.debug:
msg: "Podman: {{ podman_version.stdout if podman_version.rc == 0 else 'NOT INSTALLED' }}"
- name: Check systemd status
ansible.builtin.command: systemctl is-system-running
register: systemd_status
changed_when: false
failed_when: false
become: true
- name: Display systemd status
ansible.builtin.debug:
msg: "systemd: {{ systemd_status.stdout }}"