mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
remove when install
This commit is contained in:
parent
0fd9a9ac52
commit
4d4c428667
8 changed files with 108 additions and 116 deletions
|
@ -6,19 +6,16 @@
|
|||
- name: AZURACAST
|
||||
include_role:
|
||||
name: azuracast
|
||||
when: azuracast_install | bool
|
||||
tags: azuracast
|
||||
|
||||
- name: DOKUWIKI
|
||||
include_role:
|
||||
name: dokuwiki
|
||||
when: dokuwiki_install | bool
|
||||
tags: dokuwiki
|
||||
|
||||
- name: MEDIAWIKI
|
||||
include_role:
|
||||
name: mediawiki
|
||||
when: mediawiki_install | bool
|
||||
tags: mediawiki
|
||||
|
||||
# UNMAINTAINED
|
||||
|
@ -31,37 +28,31 @@
|
|||
- name: ELGG
|
||||
include_role:
|
||||
name: elgg
|
||||
when: elgg_install | bool
|
||||
tags: elgg
|
||||
|
||||
- name: GITEA
|
||||
include_role:
|
||||
name: gitea
|
||||
when: gitea_install | bool
|
||||
tags: gitea
|
||||
|
||||
- name: LOKOLE
|
||||
include_role:
|
||||
name: lokole
|
||||
when: lokole_install | bool
|
||||
tags: lokole
|
||||
|
||||
- name: MOSQUITTO
|
||||
include_role:
|
||||
name: mosquitto
|
||||
when: mosquitto_install | bool
|
||||
tags: mosquitto
|
||||
|
||||
- name: NODE-RED
|
||||
include_role:
|
||||
name: nodered
|
||||
when: nodered_install | bool
|
||||
tags: nodered
|
||||
|
||||
- name: NEXTCLOUD
|
||||
include_role:
|
||||
name: nextcloud
|
||||
when: nextcloud_install | bool
|
||||
tags: nextcloud
|
||||
|
||||
#- name: OWNCLOUD
|
||||
|
@ -79,7 +70,6 @@
|
|||
- name: WORDPRESS
|
||||
include_role:
|
||||
name: wordpress
|
||||
when: wordpress_install | bool
|
||||
tags: wordpress
|
||||
|
||||
- name: Recording STAGE 6 HAS COMPLETED ====================
|
||||
|
|
|
@ -6,31 +6,26 @@
|
|||
- name: KALITE
|
||||
include_role:
|
||||
name: kalite
|
||||
when: kalite_install | bool
|
||||
tags: kalite
|
||||
|
||||
- name: KOLIBRI
|
||||
include_role:
|
||||
name: kolibri
|
||||
when: kolibri_install | bool
|
||||
tags: kolibri
|
||||
|
||||
- name: KIWIX
|
||||
include_role:
|
||||
name: kiwix
|
||||
when: kiwix_install | bool
|
||||
tags: kiwix
|
||||
|
||||
- name: MOODLE
|
||||
include_role:
|
||||
name: moodle
|
||||
when: moodle_install | bool
|
||||
tags: olpc, moodle
|
||||
|
||||
- name: OSM-VECTOR-MAPS
|
||||
include_role:
|
||||
name: osm-vector-maps
|
||||
when: osm_vector_maps_install | bool
|
||||
tags: osm, maps
|
||||
|
||||
# UNMAINTAINED
|
||||
|
@ -50,7 +45,6 @@
|
|||
- name: SUGARIZER
|
||||
include_role:
|
||||
name: sugarizer
|
||||
when: sugarizer_install | bool
|
||||
tags: sugarizer
|
||||
|
||||
- name: Recording STAGE 7 HAS COMPLETED ========================
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
- name: AWSTATS
|
||||
include_role:
|
||||
name: awstats
|
||||
when: awstats_install | bool
|
||||
tags: awstats
|
||||
|
||||
- name: MONIT
|
||||
|
@ -24,7 +23,6 @@
|
|||
- name: MUNIN
|
||||
include_role:
|
||||
name: munin
|
||||
when: munin_install | bool
|
||||
tags: munin
|
||||
|
||||
- name: PHPMYADMIN
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
- name: INTERNETARCHIVE
|
||||
include_role:
|
||||
name: internetarchive
|
||||
when: internetarchive_install | bool
|
||||
tags: internetarchive
|
||||
|
||||
# Until porting complete (@jvonau helping transition to Python 3)
|
||||
|
@ -31,20 +30,17 @@
|
|||
- name: MINETEST
|
||||
include_role:
|
||||
name: minetest
|
||||
when: minetest_install | bool
|
||||
tags: minetest
|
||||
|
||||
# KEEP AT THE END as this installs dependencies from Debian's 'testing' branch!
|
||||
- name: CALIBRE
|
||||
include_role:
|
||||
name: calibre
|
||||
when: calibre_install | bool
|
||||
tags: calibre
|
||||
|
||||
- name: CALIBRE-WEB
|
||||
include_role:
|
||||
name: calibre-web
|
||||
when: calibreweb_install | bool
|
||||
tags: calibre-web
|
||||
|
||||
- name: Recording STAGE 9 HAS COMPLETED ====================
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
dependencies:
|
||||
- { role: nodejs, tags: ['nodejs'], when: internetarchive_install | bool }
|
||||
- { role: yarn, tags: ['yarn'], when: internetarchive_install | bool }
|
47
roles/internetarchive/tasks/enable.yml
Normal file
47
roles/internetarchive/tasks/enable.yml
Normal file
|
@ -0,0 +1,47 @@
|
|||
- name: Create symlink internetarchive.conf from sites-enabled to sites-available, for short URL http://box/archive (if debuntu and internetarchive_enabled)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/internetarchive.conf
|
||||
path: /etc/apache2/sites-enabled/internetarchive.conf
|
||||
state: link
|
||||
when: is_debuntu and internetarchive_enabled
|
||||
|
||||
- name: Remove symlink /etc/apache2/sites-enabled/internetarchive.conf (if debuntu and not internetarchive_enabled)
|
||||
file:
|
||||
path: /etc/apache2/sites-enabled/internetarchive.conf
|
||||
state: absent
|
||||
when: is_debuntu and not internetarchive_enabled
|
||||
|
||||
# RESTART/ENABLE SYSTEMD SERVICE
|
||||
- name: Disable 'internetarchive' systemd service (if not internetarchive_enabled)
|
||||
systemd:
|
||||
name: internetarchive
|
||||
enabled: no
|
||||
when: not internetarchive_enabled
|
||||
|
||||
- name: Enable & Restart 'internetarchive' systemd service (if internetarchive_enabled)
|
||||
systemd:
|
||||
name: internetarchive
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: restarted
|
||||
when: internetarchive_enabled | bool
|
||||
|
||||
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box/archive (not just http://box:{{ internetarchive_port }})
|
||||
systemd:
|
||||
name: "{{ apache_service }}" # httpd or apache2
|
||||
state: restarted
|
||||
when: internetarchive_enabled | bool
|
||||
|
||||
- name: Add 'internetarchive' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}"
|
||||
section: internetarchive
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
with_items:
|
||||
- option: name
|
||||
value: Internet Archive Offline
|
||||
- option: description
|
||||
value: '"Dweb-mirror is intended to make the Internet Archive experience and UI available offline."'
|
||||
- option: internetarchive_enabled
|
||||
value: "{{ internetarchive_enabled }}"
|
53
roles/internetarchive/tasks/install.yml
Normal file
53
roles/internetarchive/tasks/install.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
- name: Install NodeJS
|
||||
include_role:
|
||||
name: nodejs
|
||||
|
||||
- name: Install Yarn
|
||||
include_role:
|
||||
name: yarn
|
||||
|
||||
- name: Install packages needed by Internet Archive Offline
|
||||
package:
|
||||
name:
|
||||
- libsecret-1-dev
|
||||
state: present
|
||||
|
||||
- name: Create directory {{ internetarchive_dir }}
|
||||
file:
|
||||
path: "{{ internetarchive_dir }}"
|
||||
state: directory
|
||||
owner: "root"
|
||||
|
||||
- name: Run yarn install to get needed modules (CAN TAKE ~15 MINUTES)
|
||||
shell: yarn config set child-concurrency 1 && yarn add @internetarchive/dweb-mirror
|
||||
args:
|
||||
chdir: "{{ internetarchive_dir }}"
|
||||
creates: "{{ internetarchive_dir }}/node_modules/@internetarchive/dweb-mirror/internetarchive"
|
||||
when: internet_available | bool
|
||||
register: internetarchive_installing
|
||||
|
||||
- name: Create directory /library/archiveorg
|
||||
file:
|
||||
path: "/library/archiveorg"
|
||||
state: directory
|
||||
owner: "root"
|
||||
|
||||
# CONFIG FILES
|
||||
|
||||
- name: "Install from templates: internetarchive.service (systemd), internetarchive.conf (Apache)"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
with_items:
|
||||
- { src: 'internetarchive.service.j2', dest: '/etc/systemd/system/internetarchive.service' }
|
||||
- { src: 'internetarchive.conf', dest: '/etc/apache2/sites-available/internetarchive.conf' }
|
||||
|
||||
- name: Add 'internetarchive_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^internetarchive_installed'
|
||||
line: 'internetarchive_installed: True'
|
||||
state: present
|
|
@ -1,115 +1,32 @@
|
|||
# We need a recent version of node
|
||||
|
||||
- name: FAIL (STOP INSTALLING) IF nodejs_version is not set to 10.x or 12.x
|
||||
fail:
|
||||
msg: "Internet Archive install cannot proceed, as it currently requires Node.js 10.x or 12.x, and your nodejs_version is set to {{ nodejs_version }}. Please check the value of nodejs_version in /opt/iiab/iiab/vars/default_vars.yml and possibly also /etc/iiab/local_vars.yml"
|
||||
when: internetarchive_install and (nodejs_version != "10.x") and (nodejs_version != "12.x")
|
||||
|
||||
- name: Install packages needed by Internet Archive Offline
|
||||
package:
|
||||
name:
|
||||
- libsecret-1-dev
|
||||
state: present
|
||||
|
||||
- name: Create directory {{ internetarchive_dir }}
|
||||
file:
|
||||
path: "{{ internetarchive_dir }}"
|
||||
state: directory
|
||||
owner: "root"
|
||||
|
||||
- name: Run yarn install to get needed modules (CAN TAKE ~15 MINUTES)
|
||||
shell: yarn config set child-concurrency 1 && yarn add @internetarchive/dweb-mirror
|
||||
args:
|
||||
chdir: "{{ internetarchive_dir }}"
|
||||
creates: "{{ internetarchive_dir }}/node_modules/@internetarchive/dweb-mirror/internetarchive"
|
||||
when: internet_available | bool
|
||||
register: internetarchive_installing
|
||||
|
||||
- name: Create directory /library/archiveorg
|
||||
file:
|
||||
path: "/library/archiveorg"
|
||||
state: directory
|
||||
owner: "root"
|
||||
- name: Install Yarn and Internet Archive
|
||||
include_tasks: install.yml
|
||||
when: internetarchive_install and not internetarchive_installed is defined
|
||||
|
||||
- name: Set --reinstall fact
|
||||
set_fact:
|
||||
internetarchive_upgrade: True
|
||||
when: reinstall is defined
|
||||
|
||||
|
||||
# CONFIG FILES
|
||||
|
||||
- name: "Install from templates: internetarchive.service (systemd), internetarchive.conf (Apache)"
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
with_items:
|
||||
- { src: 'internetarchive.service.j2', dest: '/etc/systemd/system/internetarchive.service' }
|
||||
- { src: 'internetarchive.conf', dest: '/etc/apache2/sites-available/internetarchive.conf' }
|
||||
|
||||
- name: Create symlink internetarchive.conf from sites-enabled to sites-available, for short URL http://box/archive (if debuntu and internetarchive_enabled)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/internetarchive.conf
|
||||
path: /etc/apache2/sites-enabled/internetarchive.conf
|
||||
state: link
|
||||
when: is_debuntu and internetarchive_enabled
|
||||
|
||||
- name: Remove symlink /etc/apache2/sites-enabled/internetarchive.conf (if debuntu and not internetarchive_enabled)
|
||||
file:
|
||||
path: /etc/apache2/sites-enabled/internetarchive.conf
|
||||
state: absent
|
||||
when: is_debuntu and not internetarchive_enabled
|
||||
|
||||
|
||||
# STOP SYSTEMD SERVICE
|
||||
- name: Stop 'internetarchive' systemd service
|
||||
systemd:
|
||||
name: internetarchive
|
||||
daemon_reload: yes
|
||||
state: stopped
|
||||
when: internetarchive_enabled and internetarchive_upgrade
|
||||
|
||||
- name: 'Update pre-existing install: yarn upgrade'
|
||||
shell: yarn config set child-concurrency 1 && yarn install && yarn upgrade
|
||||
args:
|
||||
chdir: "{{ internetarchive_dir }}"
|
||||
when: not internetarchive_installing.changed and internetarchive_upgrade
|
||||
when: internetarchive_enabled and internetarchive_upgrade
|
||||
|
||||
# RESTART/ENABLE SYSTEMD SERVICE
|
||||
- name: Disable 'internetarchive' systemd service (if not internetarchive_enabled)
|
||||
systemd:
|
||||
name: internetarchive
|
||||
enabled: no
|
||||
when: not internetarchive_enabled
|
||||
|
||||
# with "systemctl daemon-reload" in case mongodb.service changed, etc
|
||||
- name: Enable & Restart 'internetarchive' systemd service (if internetarchive_enabled)
|
||||
systemd:
|
||||
name: internetarchive
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: restarted
|
||||
when: internetarchive_enabled | bool
|
||||
|
||||
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box/archive (not just http://box:{{ internetarchive_port }})
|
||||
systemd:
|
||||
name: "{{ apache_service }}" # httpd or apache2
|
||||
state: restarted
|
||||
when: internetarchive_enabled | bool
|
||||
|
||||
|
||||
- name: Add 'internetarchive' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}"
|
||||
section: internetarchive
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
with_items:
|
||||
- option: name
|
||||
value: Internet Archive Offline
|
||||
- option: description
|
||||
value: '"Dweb-mirror is intended to make the Internet Archive experience and UI available offline."'
|
||||
- option: internetarchive_enabled
|
||||
value: "{{ internetarchive_enabled }}"
|
||||
- name: Enable Internet Archive
|
||||
include_tasks: enable.yml
|
||||
when: internetarchive_install or internetarchive_installed is defined
|
||||
|
|
Loading…
Add table
Reference in a new issue