|
|
|
@ -11,8 +11,16 @@ |
|
|
|
|
set_fact: unifi_install_mode="none" |
|
|
|
|
tags: unifi |
|
|
|
|
|
|
|
|
|
- name: Remove mongodb from base repo |
|
|
|
|
yum: name=mongodb-server state=absent |
|
|
|
|
when: |
|
|
|
|
- ansible_os_family == 'RedHat' |
|
|
|
|
- ansible_distribution_major_version is version('8','<') |
|
|
|
|
tags: unifi |
|
|
|
|
|
|
|
|
|
- name: Install dependencies |
|
|
|
|
yum: name={{ unifi_packages }} |
|
|
|
|
notify: restart unifi |
|
|
|
|
tags: unifi |
|
|
|
|
|
|
|
|
|
- name: Create a system account to run unifi |
|
|
|
@ -188,17 +196,11 @@ |
|
|
|
|
when: unifi_unit.changed |
|
|
|
|
tags: unifi |
|
|
|
|
|
|
|
|
|
# Only supported on el8 as el7 provides mongodb-server but no mongodump |
|
|
|
|
# It'd be possible to migrate existing el7 server from base mongodb to |
|
|
|
|
# the one provided by upstream repo though |
|
|
|
|
- name: Deploy pre and post backup hooks |
|
|
|
|
template: src={{ item }}-backup.sh.j2 dest=/etc/backup/{{ item }}.d/unifi mode=755 |
|
|
|
|
loop: |
|
|
|
|
- pre |
|
|
|
|
- post |
|
|
|
|
when: |
|
|
|
|
- ansible_os_family == 'RedHat' |
|
|
|
|
- ansible_distribution_major_version is version('8','>=') |
|
|
|
|
tags: unifi |
|
|
|
|
|
|
|
|
|
- name: Start and enable the service |
|
|
|
|