37 lines
743 B
YAML
37 lines
743 B
YAML
|
# for rocky vms
|
||
|
---
|
||
|
- name: Provision a new Rocky VM
|
||
|
hosts: all
|
||
|
gather_facts: false
|
||
|
become: true
|
||
|
strategy: linear
|
||
|
|
||
|
tasks:
|
||
|
- name: Update system
|
||
|
shell: pacman -Syu
|
||
|
|
||
|
- name: Install essential packages
|
||
|
shell: pacman -Sy vim git nfs-utils wget curl
|
||
|
|
||
|
- name: Reboot to apply updates
|
||
|
reboot:
|
||
|
|
||
|
- name: Install docker
|
||
|
shell: pacman -Sy docker docker-buildx docker-compose
|
||
|
|
||
|
- name: Start docker
|
||
|
systemd_service:
|
||
|
name: docker
|
||
|
state: started
|
||
|
enabled: true
|
||
|
|
||
|
- name: Set multi-user default
|
||
|
shell: "systemctl set-default multi-user"
|
||
|
|
||
|
- name: Add bryson to docker group
|
||
|
shell: "sudo gpasswd -a bryson docker"
|
||
|
|
||
|
- name: Final reboot
|
||
|
reboot:
|
||
|
|