mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Try apache2 in freepbx_depedencies.yml (not roles/httpd)
This commit is contained in:
parent
a00a7d767a
commit
5e93f3b267
4 changed files with 52 additions and 34 deletions
|
@ -16,10 +16,22 @@
|
|||
state: present
|
||||
|
||||
# 2020-10-16: Removed per #2560
|
||||
#- name: Add user '{{ apache_user }}' to shadow group, so it can authenticate Admin Console
|
||||
# user:
|
||||
# name: "{{ apache_user }}" # www-data or apache, per /opt/iiab/iiab/vars/<OS>.yml
|
||||
# groups: shadow
|
||||
# - name: Add user '{{ apache_user }}' to shadow group, so it can authenticate Admin Console
|
||||
# user:
|
||||
# name: "{{ apache_user }}" # www-data or apache, per /opt/iiab/iiab/vars/<OS>.yml
|
||||
# groups: shadow
|
||||
|
||||
# - name: 'Create group: admin'
|
||||
# group:
|
||||
# name: admin
|
||||
|
||||
# - name: Add user {{ apache_user }} (from variable apache_user) to groups shadow
|
||||
# user:
|
||||
# name: "{{ apache_user }}" # www-data on Debuntu
|
||||
# #groups: admin,shadow
|
||||
# groups: shadow # 2020-06-04: shadow nec for Admin Console login (this line had been clobbering user www-data's membership in group shadow, as set earlier by nginx/tasks/install.yml, SEE #2431)
|
||||
# createhome: no
|
||||
# append: yes
|
||||
|
||||
- name: Remove NGINX default config /etc/nginx/sites-enabled/default
|
||||
file:
|
||||
|
|
|
@ -125,9 +125,6 @@
|
|||
# dest: "{{ freepbx_install_dir }}/admin/libraries/view.functions.php"
|
||||
|
||||
|
||||
# - pause:
|
||||
|
||||
|
||||
- name: FreePBX - 2-step install (just run once) - CAN TAKE 3-12 MIN OR LONGER!
|
||||
command: "{{ item }}"
|
||||
args:
|
||||
|
@ -206,16 +203,16 @@
|
|||
|
||||
- block:
|
||||
|
||||
- name: FreePBX - Install /etc/apache2/sites-available/freepbx.conf from template ({{ apache_user }}:{{ apache_user }}, 0644 by default)
|
||||
- name: FreePBX - Install /etc/{{ apache_service }}/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
|
||||
dest: /etc/{{ apache_service }}/sites-available/freepbx.conf # apache2
|
||||
owner: "{{ apache_user }}" # www-data
|
||||
group: "{{ apache_user }}"
|
||||
|
||||
- name: FreePBX - Add directive "Listen {{ pbx_http_port }}" to /etc/apache2/ports.conf
|
||||
- name: FreePBX - Add directive "Listen {{ pbx_http_port }}" to /etc/{{ apache_service }}/ports.conf
|
||||
lineinfile:
|
||||
path: /etc/apache2/ports.conf
|
||||
path: /etc/{{ apache_service }}/ports.conf
|
||||
line: "Listen {{ pbx_http_port }}"
|
||||
# insertafter: Listen 80
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
- name: FreePBX - Install ~19 dependencies (run 'php -m' or 'php -i' to verify PHP modules)
|
||||
- name: FreePBX - Install wget, git, unixodbc, sudo, net-tools, cron, sox + ~12 PHP dependencies (run 'php -m' or 'php -i' to verify PHP modules)
|
||||
package:
|
||||
name:
|
||||
- wget
|
||||
- git
|
||||
- unixodbc # for Asterisk CDR (Call Detail Records)
|
||||
- sudo # required by FreePBX install script
|
||||
- net-tools # required by FWConsole (command-line utility, that controls FreePBX)
|
||||
- cron # required by FreePBX UCP package (User Control Panel)
|
||||
- sox # required for CDR web-playback
|
||||
- unixodbc # For Asterisk CDR (Call Detail Records)
|
||||
- sudo # Required by FreePBX install script
|
||||
- net-tools # Required by FWConsole (command-line utility, that controls FreePBX)
|
||||
- cron # Required by FreePBX UCP package (User Control Panel)
|
||||
- sox # Required for CDR web-playback
|
||||
#- php{{ php_version }} # Basically drags in phpX.Y-cgi (already below!)
|
||||
- php{{ php_version }}-bcmath # Likewise installed in nextcloud/tasks/install.yml, wordpress/tasks/install.yml
|
||||
- php{{ php_version }}-cgi
|
||||
|
@ -27,13 +27,6 @@
|
|||
#- python-mysqldb # https://github.com/Yannik/ansible-role-freepbx/blob/master/tasks/freepbx.yml#L33
|
||||
state: latest
|
||||
|
||||
- name: "FreePBX - Install packages: libapache2-mod-php, libapache2-mpm-itk - if not pbx_try_nginx"
|
||||
package:
|
||||
name:
|
||||
- libapache2-mod-php # NOTE duplication: roles/httpd/tasks.install.yml installs libapache2-mod-php{{ php_version }} ostensibly for "Elgg, Moodle, etc"
|
||||
- libapache2-mpm-itk # To serve FreePBX through a VirtualHost as asterisk user (#2914: Is this possible via NGINX?)
|
||||
when: not pbx_try_nginx
|
||||
|
||||
# For PHP >= 8.0: phpX.Y-json is baked into PHP itself.
|
||||
# For PHP < 8.0: phpX.Y-json auto-installed by phpX.Y-fpm AND phpX.Y-cli in 3-base-server's nginx/tasks/install.yml, as confirmed by: apt rdepends phpX.Y-json
|
||||
#
|
||||
|
@ -42,3 +35,21 @@
|
|||
# name: php{{ php_version }}-json
|
||||
# state: present
|
||||
# when: php_version is version('8.0', '<')
|
||||
|
||||
- name: "FreePBX - Install Apache packages: {{ apache_service }}, libapache2-mod-php, libapache2-mpm-itk - if not pbx_try_nginx"
|
||||
package:
|
||||
name:
|
||||
- "{{ apache_service }}" # 2021-08-07: Install apache2 directly, as we prepare to deprecate roles/httpd
|
||||
- libapache2-mod-php # NOTE duplication: roles/httpd/tasks.install.yml installed libapache2-mod-php{{ php_version }} ostensibly for "Elgg, Moodle, etc"
|
||||
- libapache2-mpm-itk # To serve FreePBX through a VirtualHost as asterisk user (#2914: Is this possible via NGINX?)
|
||||
when: not pbx_try_nginx
|
||||
|
||||
# - name: 'Enable 5 Apache modules, as with "a2enmod" command: headers, proxy, proxy_html, proxy_http, rewrite (for http://box/kiwix, http://box/kolibri, http://box/nodered, etc)'
|
||||
# apache2_module:
|
||||
# name: "{{ item }}"
|
||||
# with_items:
|
||||
# - headers
|
||||
# - proxy
|
||||
# - proxy_html
|
||||
# - proxy_http
|
||||
# - rewrite
|
||||
|
|
|
@ -22,18 +22,16 @@
|
|||
# when: nodejs_version != "12.x"
|
||||
|
||||
|
||||
- block:
|
||||
# 2021-08-07: Moved to roles/pbx/tasks/freepbx_dependencies.yml
|
||||
|
||||
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
set_fact:
|
||||
apache_install: True
|
||||
apache_enabled: True
|
||||
# - name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
# set_fact:
|
||||
# apache_install: True
|
||||
# apache_enabled: True
|
||||
|
||||
- name: APACHE - run 'httpd' role
|
||||
include_role:
|
||||
name: httpd
|
||||
|
||||
when: not pbx_try_nginx
|
||||
# - name: APACHE - run 'httpd' role
|
||||
# include_role:
|
||||
# name: httpd
|
||||
|
||||
|
||||
- name: Install Asterisk
|
||||
|
|
Loading…
Add table
Reference in a new issue