Adding stuff to help with new node setup and podman initial setup
This commit is contained in:
parent
f863da3d3b
commit
0077f4ace2
@ -1,5 +1,5 @@
|
|||||||
[ansible_nodes]
|
[ansible_nodes]
|
||||||
blacktide ansible_host=192.168.3.2 connection=local
|
blacktide ansible_host=192.168.3.2 connection=local
|
||||||
|
|
||||||
[meshcentral_nodes]
|
[podman_nodes]
|
||||||
meshcentral ansible_host=192.168.3.3
|
arcade ansible_host=10.20.24.3
|
||||||
|
15
playbooks/patch.yml
Normal file
15
playbooks/patch.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
- become: true
|
||||||
|
become_method: sudo
|
||||||
|
become_user: root
|
||||||
|
tasks:
|
||||||
|
- name: Update all packages
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: "*"
|
||||||
|
state: latest
|
||||||
|
async: 3600
|
||||||
|
poll: 60
|
||||||
|
|
||||||
|
- name: Reboot Node
|
||||||
|
ansible.builtin.reboot:
|
||||||
|
reboot_timeout: 1800
|
48
playbooks/podman_setup.yml
Normal file
48
playbooks/podman_setup.yml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
- name: podman_nodes
|
||||||
|
become: true
|
||||||
|
become_method: sudo
|
||||||
|
become_user: root
|
||||||
|
vars:
|
||||||
|
dev_device: "/dev/vdb"
|
||||||
|
vg_name: "vg_podman"
|
||||||
|
lv_name: "lv_containers"
|
||||||
|
containers_directory: "/var/lib/containers"
|
||||||
|
tasks:
|
||||||
|
- name: Setup container directory volume group
|
||||||
|
community.general.lvg:
|
||||||
|
vg: "{{ vg_podman }}"
|
||||||
|
pvs: "{{ dev_device }}"
|
||||||
|
|
||||||
|
- name: Setup container directory logical volume
|
||||||
|
community.general.lvol:
|
||||||
|
vg: "{{ vg_podman }}"
|
||||||
|
lv: "{{ lv_name }}"
|
||||||
|
size: 100%FREE
|
||||||
|
|
||||||
|
- name: Create xfs filesystem on lib_containers logical volume
|
||||||
|
community.general.filesystem:
|
||||||
|
fstype: xfs
|
||||||
|
dev: /dev/mapper/{{ vg_name }}-{{ lv_name }}
|
||||||
|
|
||||||
|
- name: Create the containers directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ containers_directory }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Setup containers directory mount
|
||||||
|
ansible.posix.mount:
|
||||||
|
path: "{{ containers_directory }}"
|
||||||
|
src: "/dev/mapper/{{ vg_name }}-{{ lv_name }}"
|
||||||
|
fstype: xfs
|
||||||
|
state: mounted
|
||||||
|
|
||||||
|
- name: Install podman
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: podman
|
||||||
|
state: latest
|
||||||
|
async: 1200
|
||||||
|
poll: 60
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user