2020-03-08 19:26:05 +00:00
# Role "www_base" runs here, probably in 3-BASE-SERVER.
# Role "www_options" runs later, likely in 4-SERVER-OPTIONS.
2020-02-13 01:53:36 +00:00
2021-06-27 20:01:53 +00:00
# 2021-06-27: Antifragile roles can become less brittle by fully declaring
2021-06-30 12:03:19 +00:00
# their own dependencies (i.e. for modularity, separation-of-concerns,
2021-06-27 20:01:53 +00:00
# encapsulation, compartmentalization, scope sanity, etc).
#
#- name: Install 10 PHP packages (run 'php -m' or 'php -i' to verify)
# package:
# name:
2021-06-29 06:46:51 +00:00
# - php{{ php_version }} # On Ubuntu 20.04 (and prob other OS's) this unfortunately forces the install of: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php{{ php_version }} ETC
2021-06-27 22:25:49 +00:00
# - php{{ php_version }}-common # 2021-06-27: @jvonau suggested this (2020-05-21) to avoid Apache packages dragged in above. REGARDLESS: php{{ php_version }}-common superset php{{ php_version }}-cli is auto-installed by php{{ php_version }}-fpm in nginx/tasks/install.yml
2021-06-30 11:52:09 +00:00
# - php{{ php_version }}-curl # 2021-06-30: Installed in moodle/tasks/main.yml, nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/main.yml
# - php{{ php_version }}-gd # 2021-06-30: Installed in moodle/tasks/main.yml, nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml
# - php{{ php_version }}-imap # 2021-06-27: Installed in pbx/tasks/freepbx_dependencies.yml
2021-06-27 21:58:44 +00:00
# - php{{ php_version }}-ldap # 2021-06-27: Experimentally remove
2021-06-30 11:52:09 +00:00
# - php{{ php_version }}-mysql # 2021-06-30: Installed in mysql/tasks/install.yml, nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/main.yml
2021-06-27 21:58:44 +00:00
# - php{{ php_version }}-odbc # 2021-06-27: Experimentally remove
# - php-pear # 2021-06-27: REQUIRED BY ADMIN CONSOLE https://github.com/iiab/iiab-admin-console/blob/master/roles/cmdsrv/tasks/main.yml#L19
2021-06-30 11:52:09 +00:00
# - php{{ php_version }}-sqlite3 # 2020-07-10: Installed in osm-vector-maps/tasks/install.yml as part of OSM fix PR #2464 for #2461
# - php{{ php_version }}-xml # 2021-06-30: Installed in mediawiki/tasks/install.yml, moodle/tasks/install.yml, nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/main.yml
2021-06-27 21:58:44 +00:00
# - php{{ php_version }}-xmlrpc # 2021-06-27: Experimentally remove -- SEE EXPLANATION IN moodle/tasks/main.yml
2021-06-27 20:01:53 +00:00
# state: present
2020-07-11 16:47:25 +00:00
2021-12-26 19:07:14 +00:00
- name : Install html.yml
2020-04-19 15:53:18 +00:00
include_tasks : html.yml
2020-02-13 01:53:36 +00:00
2021-12-26 19:17:01 +00:00
- name : Install php-stem.yml if php_version == 7.4 and (ansible_machine == "armv6l" or ansible_machine == "armv7l" or ansible_machine == "aarch64" or ansible_machine == "x86_64")
2020-04-19 15:53:18 +00:00
include_tasks : php-stem.yml
2021-12-26 19:07:14 +00:00
when : php_version == 7.4 and (ansible_machine == "armv6l" or ansible_machine == "armv7l" or ansible_machine == "aarch64" or ansible_machine == "x86_64")
# or php_version == 8.0 or php_version == 8.1 (IIAB MIGHT SUPPORT THESE LATER IN 2022)
# or php_version == 7.2 or php_version == 7.3 (PROBABLY WORK, AT YOUR OWN RISK!)
2020-02-12 08:08:16 +00:00
2020-03-08 19:26:05 +00:00
- name : Create dir {{ doc_root }}/home -- if you customized var iiab_home_url e.g. in /etc/iiab/local_vars.yml, that dir is created later -- by www_options/tasks/main.yml
2020-02-12 10:23:57 +00:00
file :
state : directory
path : "{{ doc_root }}/home" # /library/www/html
owner : "{{ apache_user }}"
group : "{{ apache_user }}"
2020-02-12 08:08:16 +00:00
- name : Create dir {{ doc_root }}/info for http://box/info offline docs
file :
state : directory
path : "{{ doc_root }}/info" # /library/www/html
owner : "{{ apache_user }}"
group : "{{ apache_user }}"
- name : Install /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (Script can be run manually and/or at the end of Stage 4 = roles/4-server-options/tasks/main.yml)
template :
src : iiab-refresh-wiki-docs.sh
dest : /usr/bin/iiab-refresh-wiki-docs
mode : '0755'
2020-02-13 01:53:36 +00:00
2020-03-08 19:26:05 +00:00
# RECORD www_base AS INSTALLED
2020-02-13 01:53:36 +00:00
2020-03-08 19:26:05 +00:00
- name : "Set 'www_base_installed: True'"
2020-02-13 01:53:36 +00:00
set_fact :
2020-03-08 19:26:05 +00:00
www_base_installed : True
2020-02-13 01:53:36 +00:00
2020-03-08 19:26:05 +00:00
- name : "Add 'www_base_installed: True' to {{ iiab_state_file }}"
2020-02-13 01:53:36 +00:00
lineinfile :
path : "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
2020-03-08 19:26:05 +00:00
regexp : '^www_base_installed'
line: 'www_base_installed : True '