Playbook
This commit is contained in:
parent
451c8fee6e
commit
1caa7659ae
9 changed files with 80 additions and 0 deletions
12
tasks/docker.yml
Normal file
12
tasks/docker.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
- name: Ensure Unifi Docker image is pulled
|
||||
docker_image:
|
||||
name: "{{ unifi_version }}"
|
||||
source: 'pull'
|
||||
|
||||
- name: Ensure Unifi systemd is installed
|
||||
copy:
|
||||
src: files/unifi.service
|
||||
dest: /etc/systemd/system/unifi.service
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
2
tasks/firewall.yml
Normal file
2
tasks/firewall.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
- name: open bareos port
|
||||
firewalld: port=9102/tcp zone=public permanent=true state=enabled immediate=yes
|
3
tasks/hostname.yml
Normal file
3
tasks/hostname.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- name: Set a hostname
|
||||
ansible.builtin.hostname:
|
||||
name: "{{ unifi_hostname }}"
|
18
tasks/packete.yml
Normal file
18
tasks/packete.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
- name: Chrony installieren
|
||||
dnf: name=chrony update_cache=no state=latest
|
||||
|
||||
- name: repository holen
|
||||
shell:
|
||||
"dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo"
|
||||
|
||||
- name: repository holen docker
|
||||
shell:
|
||||
"dnf install -y docker-ce --nobest"
|
||||
|
||||
- name: PIP3 installieren
|
||||
dnf: name=python3-pip update_cache=no state=latest
|
||||
|
||||
- name: docker-python
|
||||
shell:
|
||||
"pip3 install docker"
|
||||
|
3
tasks/starten.yml
Normal file
3
tasks/starten.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- name: Dienste starten
|
||||
shell:
|
||||
"systemctl start docker; systemctl enable docker; systemctl daemon-reload; systemctl start unifi"
|
4
tasks/update.yml
Normal file
4
tasks/update.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- name: Upgrade all packages
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
Loading…
Add table
Add a link
Reference in a new issue