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

Support skip_role_on_error in 23+2 more roles (Stages 6-9)

This commit is contained in:
root 2022-06-18 13:55:05 -04:00
parent 83ea6ce852
commit 8749e66a0b
33 changed files with 914 additions and 743 deletions

View file

@ -19,15 +19,15 @@
quiet: yes
- block:
- name: Install AWStats if 'awstats_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: awstats_installed is undefined
- name: Enable/Disable/Restart NGINX
include_tasks: nginx.yml
- name: Add 'awstats' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -43,3 +43,10 @@
value: "{{ awstats_install }}"
- option: awstats_enabled
value: "{{ awstats_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Calibre-Web if 'calibreweb_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: calibreweb_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'calibre-web' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -56,3 +56,10 @@
value: "{{ calibreweb_port }}"
- option: calibreweb_settings_database
value: "{{ calibreweb_settings_database }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -0,0 +1,29 @@
# http://box:8080 & http://box:8080/mobile WORK BUT OTHER URL'S LIKE http://box/calibre ARE A MESS (BOOKS RARELY DISPLAY)
#
# 2018-08-27 POSSIBLE FIX...CONSIDER THIS ProxyPass / ProxyPassReverse TECHNIQUE:
# https://github.com/iiab/iiab/tree/master/roles/calibre-web/templates/calibre-web.conf.j2
# (anyway this works great for calibre-web, allowing http://box/books
# to work even better than http://box:8083 when box == 192.168.0.x !)
#
#- name: Attempt to enable http://box/calibre via Apache (UNTESTED)
# command: a2ensite calibre.conf
# when: apache_installed and calibre_enabled
#
#- name: Attempt to disable http://box/calibre via Apache (UNTESTED)
# command: a2dissite calibre.conf
# when: apache_installed and not calibre_enabled
- name: Enable & (Re)Start 'calibre-serve' service, if calibre_enabled
systemd:
daemon_reload: yes
name: calibre-serve
enabled: yes
state: restarted
when: calibre_enabled
- name: Disable & Stop 'calibre-serve' service, if not calibre_enabled
systemd:
name: calibre-serve
enabled: no
state: stopped
when: not calibre_enabled

View file

@ -19,48 +19,13 @@
quiet: yes
- block:
- name: Install Calibre if 'calibre_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: calibre_installed is undefined
# http://box:8080 & http://box:8080/mobile WORK BUT OTHER URL'S LIKE http://box/calibre ARE A MESS (BOOKS RARELY DISPLAY)
#
# 2018-08-27 POSSIBLE FIX...CONSIDER THIS ProxyPass / ProxyPassReverse TECHNIQUE:
# https://github.com/iiab/iiab/tree/master/roles/calibre-web/templates/calibre-web.conf.j2
# (anyway this works great for calibre-web, allowing http://box/books
# to work even better than http://box:8083 when box == 192.168.0.x !)
#
#- name: Attempt to enable http://box/calibre via Apache (UNTESTED)
# command: a2ensite calibre.conf
# when: apache_installed and calibre_enabled
#
#- name: Attempt to disable http://box/calibre via Apache (UNTESTED)
# command: a2dissite calibre.conf
# when: apache_installed and not calibre_enabled
- name: Enable & (Re)Start 'calibre-serve' service, if calibre_enabled
systemd:
daemon_reload: yes
name: calibre-serve
enabled: yes
state: restarted
when: calibre_enabled
- name: Disable & Stop 'calibre-serve' service, if not calibre_enabled
systemd:
name: calibre-serve
enabled: no
state: stopped
when: not calibre_enabled
#- name: Enable/Disable/Restart Apache if primary
# include_tasks: apache.yml
# when: not nginx_enabled
#
#- name: Enable/Disable/Restart NGINX if primary
# include_tasks: nginx.yml
# when: nginx_enabled
- include_tasks: enable-or-disable.yml
- name: Add 'calibre' variable values to {{ iiab_ini_file }}
ini_file:
@ -81,3 +46,10 @@
value: "{{ calibre_port }}"
- option: calibre_enabled
value: "{{ calibre_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,13 @@
quiet: yes
- block:
- name: Install Captive Portal if 'captiveportal_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: captiveportal_installed is undefined
- name: Enable or Disable Captive Portal
include_tasks: enable-or-disable.yml
- include_tasks: enable-or-disable.yml
- name: Add 'captiveportal' variable values to {{ iiab_ini_file }}
ini_file:
@ -43,3 +42,10 @@
value: "{{ captiveportal_install }}"
- option: captiveportal_enabled
value: "{{ captiveportal_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -1,3 +1,19 @@
- name: Enable & Restart 'gitea' systemd service, if gitea_enabled
systemd:
name: gitea
daemon_reload: yes
enabled: yes
state: restarted
when: gitea_enabled
- name: Disable & Stop 'gitea' systemd service, if not gitea_enabled
systemd:
name: gitea
enabled: no
state: stopped
when: not gitea_enabled
- name: Enable http://box{{ gitea_url }} via NGINX, by installing {{ nginx_conf_dir }}/gitea-nginx.conf from template
template:
src: gitea-nginx.conf.j2

View file

@ -19,29 +19,13 @@
quiet: yes
- block:
- name: Install Gitea {{ gitea_version }} if 'gitea_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: gitea_installed is undefined
- name: Enable & Restart 'gitea' systemd service, if gitea_enabled
systemd:
name: gitea
daemon_reload: yes
enabled: yes
state: restarted
when: gitea_enabled
- name: Disable & Stop 'gitea' systemd service, if not gitea_enabled
systemd:
name: gitea
enabled: no
state: stopped
when: not gitea_enabled
- name: Enable/Disable/Restart NGINX
include_tasks: nginx.yml
- include_tasks: enable-or-disable.yml
- name: Add 'gitea' to list of services at {{ iiab_ini_file }}
ini_file:
@ -62,3 +46,10 @@
value: "{{ gitea_run_directory }}"
- option: gitea_url
value: "{{ gitea_url }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -1,3 +1,19 @@
- name: Enable & Restart 'internetarchive' systemd service, if internetarchive_enabled
systemd:
name: internetarchive
daemon_reload: yes
enabled: yes
state: restarted
when: internetarchive_enabled
- name: Disable & Stop 'internetarchive' systemd service, if not internetarchive_enabled
systemd:
name: internetarchive
enabled: no
state: stopped
when: not internetarchive_enabled
- name: Enable http://box/archive via NGINX, by installing {{ nginx_conf_dir }}/internetarchive-nginx.conf from template
template:
src: internetarchive-nginx.conf.j2 # TO DO: roles/internetarchive/templates/internetarchive-nginx.conf.j2

View file

@ -19,8 +19,10 @@
quiet: yes
- block:
# 2020-02-11: @mitra42 & @holta agree (#2247) that the following 2-stanza
# "UPDATE internetarchive" block should run whenever one isn't installing
# "UPDATE internetarchive" portion should run whenever one isn't installing
# (or reinstalling) internetarchive, for now. We're aware this means slowness
# during "./runrole internetarchive" but that's very intentional for now -- as
# it leads to more testing of more recent versions of internetarchive, which
@ -29,20 +31,18 @@
# --upgrade internetarchive" or "./runrole --update internetarchive" or such,
# as may evolve @ https://github.com/iiab/iiab/pull/2238#discussion_r376168178
- block: # BEGIN 2-STANZA BLOCK
- name: "UPGRADE: Stop 'internetarchive' systemd service, if internetarchive_installed is defined"
systemd:
name: internetarchive
daemon_reload: yes
state: stopped
when: internetarchive_installed is defined
- name: "UPGRADE: Run 'yarn upgrade' in {{ internetarchive_dir }}, if internetarchive_installed is defined"
shell: yarn config set child-concurrency 1 && yarn install && yarn upgrade
args:
chdir: "{{ internetarchive_dir }}"
when: internetarchive_installed is defined # END 2-STANZA BLOCK
when: internetarchive_installed is defined
# "ELSE" INSTALL...
@ -51,30 +51,7 @@
when: internetarchive_installed is undefined
# ENABLE/DISABLE/RESTART SYSTEMD SERVICE & WEB SERVERS AS NEC ?
- name: Enable & Restart 'internetarchive' systemd service, if internetarchive_enabled
systemd:
name: internetarchive
daemon_reload: yes
enabled: yes
state: restarted
when: internetarchive_enabled
- name: Disable & Stop 'internetarchive' systemd service, if not internetarchive_enabled
systemd:
name: internetarchive
enabled: no
state: stopped
when: not internetarchive_enabled
# - name: Enable/Disable/Restart Apache if primary
# include_tasks: apache.yml
# when: apache_installed is defined and not nginx_enabled
- name: Enable/Disable/Restart NGINX if primary
include_tasks: nginx.yml
#when: nginx_enabled
- include_tasks: enable-or-disable.yml
- name: Add 'internetarchive' variable values to {{ iiab_ini_file }}
@ -92,3 +69,10 @@
value: "{{ internetarchive_install }}"
- option: internetarchive_enabled
value: "{{ internetarchive_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Jupyter if jupyterhub_installed not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: jupyterhub_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'jupyterhub' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -42,3 +42,10 @@
value: "{{ jupyterhub_install }}"
- option: jupyterhub_enabled
value: "{{ jupyterhub_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -0,0 +1,14 @@
- name: Enable & (Re)Start 'kalite-serve' service, if kalite_enabled
systemd:
daemon_reload: yes
name: kalite-serve
enabled: yes
state: restarted
when: kalite_enabled
- name: Disable & Stop 'kalite-serve' service, if not kalite_enabled
systemd:
name: kalite-serve
enabled: no
state: stopped
when: not kalite_enabled

View file

@ -19,26 +19,13 @@
quiet: yes
- block:
- name: Install KA Lite if 'kalite_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: kalite_installed is undefined
- name: Enable & (Re)Start 'kalite-serve' service, if kalite_enabled
systemd:
daemon_reload: yes
name: kalite-serve
enabled: yes
state: restarted
when: kalite_enabled
- name: Disable & Stop 'kalite-serve' service, if not kalite_enabled
systemd:
name: kalite-serve
enabled: no
state: stopped
when: not kalite_enabled
- include_tasks: enable-or-disable.yml
- name: Add 'kalite' variable values to {{ iiab_ini_file }}
ini_file:
@ -59,3 +46,10 @@
value: "{{ kalite_root }}"
- option: port
value: "{{ kalite_server_port }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Kiwix if 'kiwix_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: kiwix_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'kiwix' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}"
@ -54,3 +54,10 @@
value: "{{ iiab_zim_path }}"
- option: kiwix_library_xml
value: "{{ kiwix_library_xml }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,6 +19,8 @@
quiet: yes
- block:
#- name: "Set 'kolibri_provision: False' for a more lightweight (re)install"
# set_fact:
# kolibri_provision: False
@ -53,3 +55,10 @@
value: "{{ kolibri_exec_path }}"
- option: kolibri_port
value: "{{ kolibri_http_port }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,15 +19,15 @@
quiet: yes
- block:
- name: Install MediaWiki {{ mediawiki_version }} if 'mediawiki_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: mediawiki_installed is undefined
- name: Enable/Disable/Restart NGINX
include_tasks: nginx.yml
- name: Add 'mediawiki' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -55,3 +55,10 @@
value: "{{ mediawiki_url }}"
- option: mediawiki_full_url
value: "{{ mediawiki_full_url }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Minetest if 'minetest_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: provision.yml # i.e. install.yml in other roles
when: minetest_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'minetest' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -48,3 +48,10 @@
value: "{{ minetest_port }}"
- option: minetest_world_dir
value: "{{ minetest_world_dir }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -1,6 +1,7 @@
- name: Enable & (Re)Start 'mongodb.service' if mongodb_enabled
systemd:
name: mongodb
daemon_reload: yes
enabled: yes
state: restarted
when: mongodb_enabled

View file

@ -52,9 +52,8 @@
when: mongodb_installed is undefined
# when: mongodb_installed is undefined and not (ansible_architecture == "aarch64" and is_debian_10 and not is_raspbian)
- name: Enable or Disable MongoDB, if mongodb_installed is defined (sugarizer.service auto-starts MongoDB as nec, so doesn't need this or care what happens here!)
- name: Enable or Disable MongoDB (FYI sugarizer.service auto-starts MongoDB as nec, so doesn't need this or care what happens here!)
include_tasks: enable-or-disable.yml
when: mongodb_installed is defined
- name: Add 'mongodb' variable values to {{ iiab_ini_file }}
ini_file:

View file

@ -19,6 +19,8 @@
quiet: yes
- block:
# 2019-07-06: The 'monit' package was suddenly removed from Debian 10.0.0
# "Buster" during the very final days prior to release, as confirmed by the
# sudden disappearance of these 2 pages:
@ -59,3 +61,10 @@
value: '"Monit is a background service monitor which can correct problems, send email, restart services."'
- option: enabled
value: "{{ monit_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Mosquitto if 'mosquitto_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: mosquitto_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'mosquitto' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -42,3 +42,10 @@
value: "{{ mosquitto_install }}"
- option: mosquitto_enabled
value: "{{ mosquitto_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -1,3 +1,19 @@
- name: Enable & Start 'munin-node' systemd service
systemd:
name: munin-node
daemon_reload: yes
enabled: yes
state: started
when: munin_enabled
- name: Disable & Stop 'munin-node' systemd service
systemd:
name: munin-node
enabled: no
state: stopped
when: not munin_enabled
- name: Enable http://box/munin via NGINX, by installing {{ nginx_conf_dir }}/munin24-nginx.conf from template
template:
src: munin24-nginx.conf.j2

View file

@ -19,29 +19,13 @@
quiet: yes
- block:
- name: Install Munin if 'munin_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: munin_installed is undefined
- name: Enable & Start 'munin-node' systemd service
systemd:
name: munin-node
daemon_reload: yes
enabled: yes
state: started
when: munin_enabled
- name: Disable & Stop 'munin-node' systemd service
systemd:
name: munin-node
enabled: no
state: stopped
when: not munin_enabled
- name: Enable/Disable/Restart NGINX
include_tasks: nginx.yml
- include_tasks: enable-or-disable.yml
- name: Add 'munin' variable values to {{ iiab_ini_file }}
ini_file:
@ -58,3 +42,10 @@
value: "{{ munin_install }}"
- option: munin_enabled
value: "{{ munin_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,15 +19,15 @@
quiet: yes
- block:
- name: Install Nextcloud if 'nextcloud_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: nextcloud_installed is undefined
- name: Enable/Disable/Restart NGINX
include_tasks: nginx.yml
- name: Add 'nextcloud' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -53,3 +53,10 @@
value: "{{ nextcloud_root_dir }}"
- option: nextcloud_data_dir
value: "{{ nextcloud_data_dir }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -35,11 +35,12 @@
var: nodejs_installed
- block:
- name: Install Node.js if 'nodejs_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: nodejs_installed is undefined
- name: Add 'nodejs' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -55,3 +56,10 @@
value: "{{ nodejs_install }}"
- option: nodejs_enabled
value: "{{ nodejs_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Node-RED if nodered_installed is not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: nodered_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'nodered' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -42,3 +42,10 @@
value: "{{ nodered_install }}"
- option: nodered_enabled
value: "{{ nodered_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -11,15 +11,14 @@
quiet: yes
- block:
- name: Install OSM Vector Maps if 'osm_vector_maps_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: osm_vector_maps_installed is undefined
- name: Enable/Disable/Reload NGINX for OSM, if nginx_enabled
include_tasks: nginx.yml
#when: nginx_enabled # NGINX is mandatory starting with IIAB 7.2
- name: Add 'osm-vector-maps' variable values to {{ iiab_ini_file }}
ini_file:
@ -36,3 +35,10 @@
value: "{{ osm_vector_maps_install }}"
- option: osm_vector_maps_enabled
value: "{{ osm_vector_maps_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,6 +19,8 @@
quiet: yes
- block:
- name: Install PBX if pbx_installed is not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: pbx_installed is undefined
@ -45,3 +47,10 @@
value: "{{ pbx_install }}"
- option: pbx_enabled
value: "{{ pbx_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,15 +19,15 @@
quiet: yes
- block:
- name: "INCOMPLETE WITHOUT APACHE AS OF 2021-07-06: Install phpMyAdmin if 'phpmyadmin_installed' not defined, e.g. in {{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: phpmyadmin_installed is undefined
- name: INCOMPLETE WITHOUT APACHE AS OF 2021-07-06
include_tasks: enable-or-disable.yml
- name: Add 'phpmyadmin' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -45,3 +45,10 @@
value: "{{ phpmyadmin_enabled }}"
- option: path
value: /opt/phpmyadmin
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -0,0 +1,14 @@
- name: Enable & Start 'postgresql-iiab' systemd service, if postgresql_enabled
systemd:
name: postgresql-iiab
daemon_reload: yes
enabled: yes
state: started
when: postgresql_enabled
- name: Disable & Stop 'postgresql-iiab' systemd service, if not postgresql_enabled
systemd:
name: postgresql-iiab
enabled: no
state: stopped
when: not postgresql_enabled

View file

@ -26,26 +26,13 @@
var: postgresql_installed
- block:
- name: Install PostgreSQL if 'postgresql_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: postgresql_installed is undefined
- name: Enable & Start 'postgresql-iiab' systemd service, if postgresql_enabled
systemd:
name: postgresql-iiab
daemon_reload: yes
enabled: yes
state: started
when: postgresql_enabled
- name: Disable & Stop 'postgresql-iiab' systemd service, if not postgresql_enabled
systemd:
name: postgresql-iiab
enabled: no
state: stopped
when: not postgresql_enabled
- include_tasks: enable-or-disable.yml
- name: Add 'postgresql' variable values to {{ iiab_ini_file }}
ini_file:
@ -62,3 +49,10 @@
value: "{{ postgresql_install }}"
- option: postgresql_enabled
value: "{{ postgresql_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Transmission if 'transmission_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: transmission_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'transmission' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -65,3 +65,10 @@
# 2020-04-14: better to redact passwords from /etc/iiab/iiab.ini etc, so iiab-diagnostics command doesn't publish these, etc
#- option: transmission_password
# value: "{{ transmission_password }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install vnStat if 'vnstat_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: vnstat_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'vnstat' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -42,3 +42,10 @@
value: "{{ vnstat_install }}"
- option: vnstat_enabled
value: "{{ vnstat_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -21,6 +21,8 @@
quiet: yes
- block:
- name: Provision MySQL DB for WordPress, if 'wordpress_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: setup.yml
when: wordpress_installed is undefined # and not installing
@ -61,3 +63,10 @@
value: "{{ wp_url }}"
- option: wp_full_url
value: "{{ wp_full_url }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error