|
|
@ -11,8 +11,16 @@ |
|
|
|
set_fact: unifi_install_mode="none" |
|
|
|
set_fact: unifi_install_mode="none" |
|
|
|
tags: unifi |
|
|
|
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 |
|
|
|
- name: Install dependencies |
|
|
|
yum: name={{ unifi_packages }} |
|
|
|
yum: name={{ unifi_packages }} |
|
|
|
|
|
|
|
notify: restart unifi |
|
|
|
tags: unifi |
|
|
|
tags: unifi |
|
|
|
|
|
|
|
|
|
|
|
- name: Create a system account to run unifi |
|
|
|
- name: Create a system account to run unifi |
|
|
@ -188,17 +196,11 @@ |
|
|
|
when: unifi_unit.changed |
|
|
|
when: unifi_unit.changed |
|
|
|
tags: unifi |
|
|
|
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 |
|
|
|
- name: Deploy pre and post backup hooks |
|
|
|
template: src={{ item }}-backup.sh.j2 dest=/etc/backup/{{ item }}.d/unifi mode=755 |
|
|
|
template: src={{ item }}-backup.sh.j2 dest=/etc/backup/{{ item }}.d/unifi mode=755 |
|
|
|
loop: |
|
|
|
loop: |
|
|
|
- pre |
|
|
|
- pre |
|
|
|
- post |
|
|
|
- post |
|
|
|
when: |
|
|
|
|
|
|
|
- ansible_os_family == 'RedHat' |
|
|
|
|
|
|
|
- ansible_distribution_major_version is version('8','>=') |
|
|
|
|
|
|
|
tags: unifi |
|
|
|
tags: unifi |
|
|
|
|
|
|
|
|
|
|
|
- name: Start and enable the service |
|
|
|
- name: Start and enable the service |
|
|
|