30 lines
762 B
YAML
30 lines
762 B
YAML
# for alpine vms, preinstall sudo and python3, and configure sudo with the wheel group
|
|
---
|
|
- name: Provision a new VM
|
|
hosts: all
|
|
gather_facts: false
|
|
become: true
|
|
|
|
tasks:
|
|
- name: Update system
|
|
shell: "apk update && apk upgrade"
|
|
|
|
- name: Install packages
|
|
shell: "apk add vim git sudo docker docker-cli docker-cli-compose docker-cli-buildx nfs-utils bash bash-completion mandoc man-pages shadow curl chrony"
|
|
|
|
- name: Enable services
|
|
shell: "rc-update add {{ item }} default"
|
|
with_items:
|
|
- docker
|
|
- nfs
|
|
- chronyd
|
|
|
|
- name: Reboot system
|
|
reboot:
|
|
|
|
- name: Change shell to bash
|
|
shell: "chsh -s /bin/bash bryson"
|
|
|
|
- name: Add to groups
|
|
shell: "addgroup bryson docker"
|
|
|