Update to 2020-11-30 19:00

master
Daniel Berteaud 4 years ago
parent a256a03c79
commit 3f8f9bffe6
  1. 3
      roles/unifi/meta/main.yml
  2. 14
      roles/unifi/tasks/main.yml
  3. 3
      roles/unifi/vars/CentOS-7.yml

@ -3,8 +3,5 @@
dependencies: dependencies:
- role: mkdir - role: mkdir
- role: repo_mongodb # MongoDB isn't in base repo anymore on EL8 - role: repo_mongodb # MongoDB isn't in base repo anymore on EL8
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version is version('8','>=')
vars: vars:
- mongo_major_version: 3.4 # Unifi recommends Mong 3.4 - mongo_major_version: 3.4 # Unifi recommends Mong 3.4

@ -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

@ -2,4 +2,5 @@
unifi_packages: unifi_packages:
- java-1.8.0-openjdk-headless - java-1.8.0-openjdk-headless
- mongodb-server - mongodb-org-server
- mongodb-org

Loading…
Cancel
Save