-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhomeworld_bootstrap.yml
60 lines (49 loc) · 1.24 KB
/
homeworld_bootstrap.yml
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
---
- name: Bootstrap home server default proxmox install as root
hosts: homeworld_root
vars_files:
- host_vars/homeworld/secret.yaml
pre_tasks:
- name: Update apt cache
apt:
update_cache: yes
- name: Upgrade packages
apt:
upgrade: safe
autoremove: yes
- name: Install sudo
package:
name: sudo
state: present
- name: Create user
user:
name: "{{ user }}"
password: "{{ password }}"
state: present
createhome: true
shell: /bin/bash
groups: sudo
roles:
- role: geerlingguy.docker
vars:
docker_install_compose_plugin: true
docker_compose_package: docker-compose-plugin
docker_compose_package_state: present
docker_users:
- "{{ user }}"
post_tasks:
- name: Ensure user is in the docker group
user:
name: connor
groups: docker
append: yes
- name: Copy sshd_config file - DISABLES SSH AS ROOT
copy:
src: configs/homeworld/sshd_config
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: '0644'
- name: Reboot server
ansible.builtin.command: reboot
ignore_errors: true