56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
|
---
|
||
|
- name: Install unzip using apt
|
||
|
apt: name=unzip state=latest update_cache=yes force_apt_get=yes
|
||
|
|
||
|
- name: "NOTSCORED | 3.5.1.6 | PATCH | Ensure firewall rules exist for all open ports"
|
||
|
ufw:
|
||
|
rule: allow
|
||
|
proto: tcp
|
||
|
port: "{{ item }}"
|
||
|
loop:
|
||
|
- '3000'
|
||
|
- '80'
|
||
|
- '443'
|
||
|
- '22'
|
||
|
|
||
|
- name: Creates directory structure for assetto content
|
||
|
file:
|
||
|
path: /home/{{ main_user }}/data
|
||
|
state: directory
|
||
|
owner: "{{ main_user }}"
|
||
|
group: "{{ main_user }}"
|
||
|
mode: 0775
|
||
|
|
||
|
- name: bring down server-manager docker-compose
|
||
|
become_user: "{{ main_user }}"
|
||
|
docker_compose:
|
||
|
project_src: /home/{{ main_user }}/server-manager/
|
||
|
state: absent
|
||
|
register: __remove_assetto_server_manager
|
||
|
tags:
|
||
|
- bring-down
|
||
|
|
||
|
- name: update permissions
|
||
|
file:
|
||
|
path: /home/{{ main_user }}
|
||
|
state: directory
|
||
|
recurse: yes
|
||
|
owner: "{{ main_user }}"
|
||
|
group: "{{ main_user }}"
|
||
|
mode: 0775
|
||
|
|
||
|
- name: docker compose up
|
||
|
become_user: "{{ main_user }}"
|
||
|
docker_compose:
|
||
|
project_src: /home/{{ main_user }}/server-manager/
|
||
|
state: present
|
||
|
register: __assetto_server_manager
|
||
|
|
||
|
- name: debug docker compose down
|
||
|
debug:
|
||
|
var: __remove_assetto_server_manager
|
||
|
|
||
|
- name: debug docker compose up
|
||
|
debug:
|
||
|
var: __assetto_server_manager
|