1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge branch 'iiab:master' into less-apache

This commit is contained in:
A Holt 2021-08-04 14:14:17 -04:00 committed by GitHub
commit 4ccf1c235d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 277 additions and 256 deletions

View file

@ -30,6 +30,8 @@
#- openssh-server # ssh (Raspbian) or openssh-server (other OS's) already installed by 1-prep's roles/sshd/tasks/main.yml
- pandoc # For /usr/bin/iiab-refresh-wiki-docs
- pastebinit # For /usr/bin/iiab-diagnostics
#- python3-pip # 2021-07-29: Already installed by /opt/iiab/iiab/scripts/ansible -- this auto-installs 'python3-setuptools' and 'python3' etc
#- python3-venv # 2021-07-30: For Ansible module 'pip' used in roles like {calibre-web, jupyterhub, lokole} -- whereas roles/kalite uses (virtual) package 'virtualenv' for Python 2 -- all these 3+1 IIAB roles install 'python3-venv' for themselves. FYI: Debian 11 auto-installs 'python3-venv' when you install 'python3' -- whereas Ubuntu (e.g. 20.04 & 21.10) and RaspiOS 10 do not.
- rsync
#- screen # Installed by 1-prep's roles/iiab-admin/tasks/access.yml
- sqlite3

View file

@ -1,4 +1,4 @@
- name: "Install ImageMagick package: imagemagick"
- name: "Install packages: imagemagick, python3-venv"
package:
name:
- imagemagick

View file

@ -13,6 +13,11 @@
when: nodejs_installed is undefined
- name: "Install package: python3-venv"
package:
name: python3-venv
state: present
- name: Make 3 directories to hold JupyterHub config
file:
state: directory
@ -40,8 +45,8 @@
- jupyterhub-systemdspawner
virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub
virtualenv_site_packages: no
virtualenv_command: /usr/bin/virtualenv
virtualenv_python: python3
virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2021-07-29: This works on RaspiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below
#virtualenv_python: python3 # 2021-07-29: Was needed when above line was 'virtualenv_command: virtualenv' (generally for Python 2)
extra_args: "--no-cache-dir"
when: internet_available

View file

@ -11,13 +11,14 @@
# ignore_errors: yes
# when: is_raspbian
- name: Install python2, if Raspbian/Debian > 10 or Ubuntu > 19
- name: 'Install packages: python2, python-setuptools, virtualenv (for Python 2)'
package:
name:
- python2
- python-setuptools # provides setuptools-44 last version compatible with python2
- python-setuptools # Provides setuptools-44 on recent OS's (last version compatible with python2)
- virtualenv # For Ansible module 'pip' when used with 'virtualenv_command: /usr/bin/virtualenv' and 'virtualenv_python: python2.7' -- compare package 'python3-venv' used by roles {calibre-web, jupyterhub, lokole}
state: present
when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
#when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
# 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
- name: Use pip to pin setuptools to 44 in {{ kalite_venv }} if Raspbian/Debian > 10 or Ubuntu > 19

View file

@ -1,11 +1,12 @@
- name: "Install 4 packages: munin, munin-node, munin-plugins-extra, libcgi-fast-perl"
- name: "Install 5 packages: libcgi-fast-perl, munin, munin-node, munin-plugins-extra, python3-passlib"
package:
name:
#- libapache2-mod-fcgid
- libcgi-fast-perl
- munin
- munin-node
- munin-plugins-extra
- libcgi-fast-perl
#- libapache2-mod-fcgid
- python3-passlib # For Ansible module 'htpasswd' in Ansible collection community.general -- used just below
state: present
- name: Establish username/password Admin/changeme in /etc/munin/munin-htpasswd

View file

@ -12,6 +12,7 @@
- mariadb-client
#- php{{ php_version }}-common # Auto-installed as an apt dependency. REGARDLESS: php{{ php_version }}-common superset php{{ php_version }}-cli is auto-installed by php{{ php_version }}-fpm in nginx/tasks/install.yml
- php{{ php_version }}-mysql # Likewise installed in nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/install.yml
- python3-pymysql # For Ansible modules {mysql_db, mysql_user} in Ansible collection community.mysql -- used in MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx}
state: present
# 2020-07-11:

View file

@ -7,11 +7,12 @@
# 2019-07-04: FOR A SOMEWHAT MORE MODERN "VERSION DETECTOR" SEE:
# github.com/iiab/iiab/blob/master/roles/nextcloud/tasks/install.yml#L1-L40
- name: Try to run 'nodejs -v' to get Node.js version
# 'node -v' doesn't work with older versions e.g. Ubuntu 16.04's nodejs 4.2.6
- name: Try to run 'node -v' to get Node.js version
# 'node -v' doesn't work with older versions e.g. Ubuntu 16.04's Node.js 4.2.6
# 'nodejs -v' doesn't work with newer versions e.g. Node.js 16.x
# Both below convert v10.15.1 to 10.x, but this is safer: (removes non-digits)
shell: nodejs -v | sed 's/[^0-9]*//' | sed 's/[^0-9].*/.x/'
#shell: nodejs -v | sed 's/^[vV]//' | sed 's/\..*/.x/'
shell: node -v | sed 's/[^0-9]*//' | sed 's/[^0-9].*/.x/'
#shell: node -v | sed 's/^[vV]//' | sed 's/\..*/.x/'
register: nodejs_version_installed
#- debug:
@ -32,12 +33,13 @@
# /etc/iiab/local_vars.yml -- then re-run this IIAB installer.
# when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stderr == ""
# 2021-08-04: Regardless, nodesource.com (below) overwrites /etc/apt/sources.list.d/nodesource.list
# Forces < 16.x or > 16.x to be removed, ignored if file is absent
- name: Remove /etc/apt/sources.list.d/nodesource.list if nodejs_version_installed.stdout is not {{ nodejs_version }}
file:
state: absent
path: /etc/apt/sources.list.d/nodesource.list
when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stdout != ""
#- name: Remove /etc/apt/sources.list.d/nodesource.list if nodejs_version_installed.stdout is not {{ nodejs_version }}
# file:
# state: absent
# path: /etc/apt/sources.list.d/nodesource.list
# when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stdout != ""
# BRUTAL but ensures consistency across OS's / distros like Raspbian Desktop & Ubermix that often include an older version of Node.js
# Forces < 16.x or > 16.x to be uninstalled
@ -45,9 +47,9 @@
package:
name: nodejs
state: absent
when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stdout != ""
when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version
#when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stdout != ""
# Forces == 16.x
- name: Warn if Node.js {{ nodejs_version}} already installed & might be updated
debug:
msg: "WARN: YOUR Node.js {{ nodejs_version }} MIGHT NOW BE UPDATED USING nodesource.com"
@ -65,12 +67,12 @@
# state: absent
# when: internet_available and is_debuntu
- name: Set up Node.js {{ nodejs_version }} apt sources
- name: Run 'curl -sL https://deb.nodesource.com/setup_{{ nodejs_version }} | bash -' to overwrite /etc/apt/sources.list.d/nodesource.list
shell: curl -sL https://deb.nodesource.com/setup_{{ nodejs_version }} | bash -
args:
warn: no
creates: /etc/apt/sources.list.d/nodesource.list
when: internet_available
#args:
# warn: no
# creates: /etc/apt/sources.list.d/nodesource.list
#when: internet_available # 2021-08-04: Better to fail & notify implementer!
#when: internet_available and (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17)
# NOT NEC TO TEST FOR is_raspbian_8 OR is_raspbian_9 AS /opt/iiab/iiab/vars/<OS>.yml
# DEFINES THESE AS SUBSETS OF is_debian_8 OR is_debian_9 (FOR NOW!)
@ -86,15 +88,9 @@
name: nodejs
state: latest
#state: present
when: internet_available
#when: internet_available # 2021-08-04: Better to fail & notify implementer!
#when: internet_available and (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17)
# - name: Set up & install Node.js {{ nodejs_version }} which includes /usr/bin/npm (redhat)
# shell: curl -sL https://rpm.nodesource.com/setup_{{ nodejs_version }} | bash -
# args:
# warn: no
# when: internet_available and is_redhat
# 2018-07-14: BOTH STEPS ABOVE TAKE TIME, but Raspbian (apt offers npm
# 1.4.21) & Debian 9 (apt offers no npm!) STILL NEED the above

View file

@ -1,18 +1,12 @@
- name: "Install packages: nmap, openvpn, sudo"
- name: "Install packages: ncat, nmap, openvpn, sudo"
package:
name:
- ncat # Newer versions of NMap do not include NCat, needed to announce /etc/iiab/openvpn_handle (if Debian > 9 or Ubuntu > 18)
- nmap
- openvpn
- sudo # (1) Should be installed prior to installing IIAB, (2) Can also be installed by 1-prep here, (3) Is definitely installed by 1-prep's roles/iiab-admin/tasks/sudo-prereqs.yml, (4) Used to be installed by roles/2-common/tasks/packages.yml (but that's too late!)
state: present
# Newer versions of NMap do not include NCat, needed to announce /etc/iiab/openvpn_handle
- name: Install Ncat package (if Debian > 9 or Ubuntu > 18)
package:
name: ncat
state: present
when: is_debuntu and not (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18)
- name: Install ssh public keys for remote support (if openvpn_install)
lineinfile:
line: "{{ item.pubkey }}"

View file

@ -2,10 +2,10 @@
#- name: Asterisk - Install dependencies
# include: asterisk_dependencies.yml
- name: Asterisk - Download software to {{ downloads_dir }}
- name: Asterisk - Download {{ asterisk_url }}/{{ asterisk_src_file }} to {{ downloads_dir }}
get_url:
url: "{{ asterisk_url }}/{{ asterisk_src_file }}"
dest: "{{ downloads_dir }}/{{ asterisk_src_file }}" # e.g. /opt/iiab/downloads/asterisk-18-current.tar.gz
dest: "{{ downloads_dir }}" # e.g. /opt/iiab/downloads/asterisk-18-current.tar.gz
timeout: "{{ download_timeout }}"
when: internet_available
@ -16,15 +16,15 @@
- name: Asterisk - FAIL (force Ansible to exit) IF {{ downloads_dir }}/{{ asterisk_src_file }} doesn't exist
fail:
msg: "{{ downloads_dir }}/{{ asterisk_src_file }} is REQUIRED in order to install."
msg: "{{ downloads_dir }}/{{ asterisk_src_file }} is REQUIRED to install Asterisk."
when: not asterisk_src.stat.exists
- name: Asterisk - Create install source dir {{ asterisk_src_dir }}
- name: Asterisk - Create source dir {{ asterisk_src_dir }}
file:
path: "{{ asterisk_src_dir }}" # /opt/iiab/asterisk
state: directory
- name: Asterisk - Extract source
- name: Asterisk - Extract to source dir (root:root)
unarchive:
src: "{{ downloads_dir }}/{{ asterisk_src_file }}"
dest: "{{ asterisk_src_dir }}"
@ -33,6 +33,7 @@
extra_opts: [--strip-components=1]
creates: "{{ asterisk_src_dir }}/Makefile"
# 2021-08-03: Asterisk's install_prereq script (stanza just below) installs
# 'aptitude' regardless, within handle_debian() here:
# https://github.com/asterisk/asterisk/blob/master/contrib/scripts/install_prereq#L262-L271
@ -54,7 +55,7 @@
chdir: "{{ asterisk_src_dir }}"
creates: addons/mp3/mpg123.h
- name: Asterisk - Run the configure script
- name: Asterisk - Run './configure --with-jansson-bundled'
command: ./configure --with-jansson-bundled
args:
chdir: "{{ asterisk_src_dir }}"
@ -101,6 +102,7 @@
args:
chdir: "{{ asterisk_src_dir }}"
- name: Asterisk - Ensure group 'asterisk' exists
group:
name: asterisk

View file

@ -1,49 +1,50 @@
- name: chan_dongle - Download software to /opt/iiab/downloads
- name: chan_dongle - Download {{ chan_dongle_url }}/{{ chan_dongle_src_file }} to {{ downloads_dir }}
get_url:
url: "{{ chan_dongle_url }}/{{ chan_dongle_src_file }}"
dest: "{{ downloads_dir }}/{{ chan_dongle_src_file }}"
url: "{{ chan_dongle_url }}/{{ chan_dongle_src_file }}" # /opt/iiab/downloads/master.zip
dest: "{{ downloads_dir }}/{{ chan_dongle_src_file }}" # Keep name as "master.zip" whereas browsers rename it to asterisk-chan-dongle-master.zip
timeout: "{{ download_timeout }}"
when: internet_available
- name: chan_dongle - Check for /opt/iiab/downloads/{{ chan_dongle_src_file }}
- name: chan_dongle - Check for {{ downloads_dir }}/{{ chan_dongle_src_file }}
stat:
path: "{{ downloads_dir }}/{{ chan_dongle_src_file }}"
register: chan_dongle_src
- name: chan_dongle - FAIL (force Ansible to exit) IF /opt/iiab/downloads/{{ chan_dongle_src_file }} doesn't exist
fail:
msg: "{ downloads_dir }}/{{ chan_dongle_src_file }} is REQUIRED in order to install."
msg: "{ downloads_dir }}/{{ chan_dongle_src_file }} is REQUIRED to install chan_dongle."
when: not chan_dongle_src.stat.exists
- name: chan_dongle - Create install source directory
- name: chan_dongle - Create source dir {{ chan_dongle_src_dir }}
file:
path: "{{ chan_dongle_src_dir }}"
path: "{{ chan_dongle_src_dir }}" # /opt/iiab/chan_dongle
state: directory
- name: chan_dongle - Extract source
- name: chan_dongle - Extract to {{ downloads_dir }} (root:root)
unarchive:
src: "{{ downloads_dir }}/{{ chan_dongle_src_file }}"
dest: "{{ downloads_dir }}"
owner: root
group: root
- name: chan_dongle - move to {{ chan_dongle_src_dir }}
- name: chan_dongle - Run 'rsync -av {{ downloads_dir }}/asterisk-chan-dongle-master/ {{ chan_dongle_src_dir }}'
command: rsync -av {{ downloads_dir }}/asterisk-chan-dongle-master/ {{ chan_dongle_src_dir }}
args:
chdir: "{{ downloads_dir }}"
- name: chan_dongle - Run the bootstrap script
command: "./bootstrap"
- name: chan_dongle - Run './bootstrap'
command: ./bootstrap
args:
chdir: "{{ chan_dongle_src_dir }}"
creates: "{{ chan_dongle_src_dir }}/configure"
- name: chan_dongle - Find out asterisk version
shell: asterisk -V |cut -d " " -f 2
- name: chan_dongle - Run 'asterisk -V | cut -d " " -f 2' for asterisk_ver
shell: asterisk -V | cut -d " " -f 2
register: asterisk_ver
- name: chan_dongle - Run the configure script
command: "./configure --with-astversion={{asterisk_ver.stdout}}"
- name: chan_dongle - Run './configure --with-astversion={{ asterisk_ver.stdout }}'
command: ./configure --with-astversion={{ asterisk_ver.stdout }}
args:
chdir: "{{ chan_dongle_src_dir }}"
creates: "{{ chan_dongle_src_dir }}/Makefile"
@ -60,9 +61,8 @@
chdir: "{{ chan_dongle_src_dir }}"
creates: "/usr/lib/asterisk/modules/chan_dongle.so"
- name: chan_dongle - Copy dongle.conf over
- name: chan_dongle - Run 'cp {{ chan_dongle_src_dir }}/etc/dongle.conf /etc/asterisk/'
command: cp {{ chan_dongle_src_dir }}/etc/dongle.conf /etc/asterisk/
args:
chdir: "{{ chan_dongle_src_dir }}"
creates: "/etc/asterisk/dongle.conf"

View file

@ -1,18 +1,29 @@
- name: Enable & (Re)start 'asterisk' systemd service (if pbx_enabled)
systemd:
daemon_reload: yes
name: asterisk
enabled: yes
state: restarted
when: pbx_enabled
# 2021-08-04: Stanza below commonly causes systemd error "Asterisk is already
# running. /etc/init.d/asterisk will exit now" (initial installs especially?)
#
# But without this stanza, 'systemctl restart freepbx' all alone during initial
# install ALSO fails to start Asterisk reliably, on Ubuntu 20.04 & Debian 11 :/
#
# Yes /etc/systemd/system/freepbx.service is supposed to run 'fwconsole stop'
# then 'fwconsole start' reliably, as many web posts recommend, But No Dice!
#
# Do we need something like 'RestartSec=3' in freepbx.service ??
#
#- name: Enable & (Re)start 'asterisk' systemd service (if pbx_enabled)
# systemd:
# daemon_reload: yes
# name: asterisk
# enabled: yes
# state: restarted
# when: pbx_enabled
- name: Disable & Stop 'asterisk' systemd service (if not pbx_enabled)
systemd:
daemon_reload: yes
name: asterisk
enabled: no
state: stopped
when: not pbx_enabled
#- name: Disable & Stop 'asterisk' systemd service (if not pbx_enabled)
# systemd:
# daemon_reload: yes
# name: asterisk
# enabled: no
# state: stopped
# when: not pbx_enabled
- name: Enable & (Re)start 'freepbx' systemd service (if pbx_enabled)

View file

@ -1,10 +1,10 @@
- name: FreePBX - Install dependencies
include: freepbx_dependencies.yml
- name: FreePBX - Download software to {{ downloads_dir }}/{{ freepbx_src_file }}
- name: FreePBX - Download {{ freepbx_url }}/{{ freepbx_src_file }} to {{ downloads_dir }}
get_url:
url: "{{ freepbx_url }}/{{ freepbx_src_file }}"
dest: "{{ downloads_dir }}/{{ freepbx_src_file }}" # e.g. /opt/iiab/downloads/freepbx-16.0-latest.tgz
dest: "{{ downloads_dir }}" # e.g. /opt/iiab/downloads/freepbx-16.0-latest.tgz
timeout: "{{ download_timeout }}"
when: internet_available
@ -15,15 +15,15 @@
- name: FreePBX - FAIL (force Ansible to exit) IF {{ downloads_dir }}/{{ freepbx_src_file }} doesn't exist
fail:
msg: "{ downloads_dir }}/{{ freepbx_src_file }} is REQUIRED in order to install."
msg: "{{ downloads_dir }}/{{ freepbx_src_file }} is REQUIRED to install FreePBX."
when: not freepbx_src.stat.exists
- name: FreePBX - Create install source dir {{ freepbx_src_dir }}
- name: FreePBX - Create source dir {{ freepbx_src_dir }}
file:
path: "{{ freepbx_src_dir }}" # /opt/iiab/freepbx
state: directory
- name: FreePBX - Extract source
- name: FreePBX - Extract to source dir (root:root)
unarchive:
src: "{{ downloads_dir }}/{{ freepbx_src_file }}"
dest: "{{ freepbx_src_dir }}"
@ -32,15 +32,18 @@
extra_opts: [--strip-components=1]
creates: "{{ freepbx_src_dir }}/install"
- name: FreePBX - Patch FreePBX source - IIAB Bug 1685
patch:
src: roles/pbx/templates/71-freepbx-framework.patch
dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/BMO/Framework.class.php"
# 2021-08-04: FreePBX 16 no longer needs this FreePBX 15 patch
# - name: FreePBX - Patch FreePBX source - IIAB Bug 1685
# patch:
# src: roles/pbx/templates/71-freepbx-framework.patch
# dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/BMO/Framework.class.php"
# 2021-08-04: FreePBX 16 no longer needs this FreePBX 15 patch
# - name: FreePBX - Patch FreePBX source - wants [] not {}
# patch:
# src: roles/pbx/templates/pbx.patch
# dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/Composer/vendor/neitanod/forceutf8/src/ForceUTF8/Encoding.php"
- name: FreePBX - Patch FreePBX source - wants [] not {}
patch:
src: roles/pbx/templates/pbx.patch
dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/Composer/vendor/neitanod/forceutf8/src/ForceUTF8/Encoding.php"
- name: FreePBX - Disable & Stop 'asterisk' systemd service
systemd:
@ -101,19 +104,17 @@
group: asterisk
recurse: yes
- name: FreePBX - Install (just run once) - CAN TAKE 12 MIN OR LONGER!
command: ./start_asterisk start
- name: FreePBX - 2-stage install (just run once) - CAN TAKE 12 MIN OR LONGER!
command: "{{ item }}"
args:
chdir: "{{ freepbx_src_dir }}"
creates: "{{ freepbx_install_dir }}"
with_items:
- ./start_asterisk start
- ./install -n --webroot {{ freepbx_install_dir }} --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
- name: FreePBX - Install (just run once) - CAN TAKE 12 MIN OR LONGER!
command: ./install -n --webroot {{ freepbx_install_dir }} --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
args:
chdir: "{{ freepbx_src_dir }}"
creates: "{{ freepbx_install_dir }}"
# 2021-08-02: FreePBX 16 seems to no longer need this FreePBX 15 patch?
# 2021-08-04: FreePBX 16 no longer needs this FreePBX 15 patch
# - name: FreePBX - Patch FreePBX source - disable get_magic_quotes_gpc()
# patch:
# src: roles/pbx/templates/pbx2.patch
@ -124,11 +125,17 @@
src: odbc.ini.j2
dest: /etc/odbc.ini
- name: FreePBX - Install /etc/systemd/system/freepbx.service systemd unit file from template (root:root, 0644 by default)
template:
src: freepbx.service.j2
dest: /etc/systemd/system/freepbx.service
- name: FreePBX - Install /etc/apache2/sites-available/freepbx.conf from template ({{ apache_user }}:{{ apache_user }}, 0644 by default)
template:
src: freepbx.conf.j2
dest: /etc/apache2/sites-available/freepbx.conf
owner: "{{ apache_user }}"
owner: "{{ apache_user }}" # www-data
group: "{{ apache_user }}"
- name: FreePBX - Add directive "Listen {{ pbx_http_port }}" to /etc/apache2/ports.conf
@ -136,8 +143,3 @@
path: /etc/apache2/ports.conf
line: "Listen {{ pbx_http_port }}"
# insertafter: Listen 80
- name: FreePBX - Install /etc/systemd/system/freepbx.service systemd unit file from template (root:root, 0644 by default)
template:
src: freepbx.service.j2
dest: /etc/systemd/system/freepbx.service

View file

@ -7,6 +7,9 @@ Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start
ExecStop=/usr/sbin/fwconsole stop
# 2021-08-04: Does this help Asterisk (re)start reliably, as FreePBX install completes?
# PR #2908: https://github.com/iiab/iiab/blob/master/roles/pbx/tasks/enable-or-disable.yml
RestartSec=3
[Install]
WantedBy=multi-user.target

View file

@ -3,6 +3,7 @@
name:
- postgresql
- postgresql-client
- python3-psycopg2 # For Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml
state: present
- name: Install /etc/systemd/system/postgresql-iiab.service from template (0644 by default)