personal-servers/provision-pinky/server.yml

55 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-06-26 16:07:12 +00:00
# Setup basic server stuff
- name: Basic Server Setup
hosts: servers
become_method: ansible.builtin.sudo
tasks:
- name: Install some packages
become: true
ansible.builtin.package:
name:
- docker
- docker-compose
- btrfs-progs
2024-07-11 17:29:35 +00:00
- qemu-system-arm
- qemu-utils
state: present
- name: Install Debian-specific packages
become: true
when: ansible_os_family == 'Debian'
ansible.builtin.apt:
name:
- qemu-efi-aarch64
- net-tools
2024-06-26 16:07:12 +00:00
state: present
- name: Start and enable service docker
2024-06-26 16:58:25 +00:00
become: true
2024-06-26 16:07:12 +00:00
ansible.builtin.service:
name: docker
state: started
enabled: true
- name: Add ralsina to docker group
become: true
ansible.builtin.user:
name: ralsina
groups: docker
append: true
2024-06-26 16:58:25 +00:00
- name: Configure Docker
become: true
ansible.builtin.copy:
dest: /etc/docker/daemon.json
mode: '0644'
content: |
{
"data-root": "/data/docker"
}
notify:
- Restart Docker
handlers:
- name: Restart Docker
become: true
ansible.builtin.service:
name: docker
state: restarted
2024-07-11 17:29:35 +00:00