mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #2147 from holta/clean-excess-bool-casts-etc
(1) Clean Munin (2) rm excess '| bool' (casts to boolean) (3) Experimentally comment out Ansible tags (4) Fix 3 /etc/iiab/iiab.ini descriptions
This commit is contained in:
commit
f80b7ff7c6
44 changed files with 168 additions and 219 deletions
|
@ -26,38 +26,31 @@
|
|||
path: /etc/systemd/system/iptables.service
|
||||
state: absent
|
||||
|
||||
#- name: Remove iptables-xs.service file from /etc
|
||||
# file:
|
||||
# path: /etc/systemd/system/iptables-xs.service
|
||||
# state: absent
|
||||
|
||||
- name: Install package iptables-persistent (debuntu)
|
||||
package:
|
||||
name: iptables-persistent
|
||||
state: present
|
||||
when: is_debuntu | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install package iptables-services (OS's other than debuntu)
|
||||
package:
|
||||
name: iptables-services
|
||||
state: present
|
||||
when: not is_debuntu
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install /etc/sysconfig/iptables-config from template
|
||||
template:
|
||||
src: iptables-config
|
||||
dest: /etc/sysconfig/iptables-config
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0644'
|
||||
|
||||
- name: Install /etc/network/if-pre-up.d/iptables from template (debuntu)
|
||||
template:
|
||||
src: iptables
|
||||
dest: /etc/network/if-pre-up.d/iptables
|
||||
mode: 0755
|
||||
mode: '0755'
|
||||
when: is_debuntu | bool
|
||||
|
|
|
@ -132,17 +132,16 @@
|
|||
with_items:
|
||||
- hostapd_8188_i386
|
||||
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and internet_available
|
||||
tags:
|
||||
- xo
|
||||
#tags: xo
|
||||
|
||||
- name: Put the substitute in place
|
||||
copy:
|
||||
src: "{{ downloads_dir }}/hostapd_8188_i386"
|
||||
dest: /usr/sbin/hostapd
|
||||
backup: yes
|
||||
mode: 0775
|
||||
owner: root
|
||||
group: root
|
||||
# owner: root
|
||||
# group: root
|
||||
mode: '0775'
|
||||
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5"
|
||||
|
||||
- name: Reboot system
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
tags: debug_info
|
||||
#tags: debug_info
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- name: Install AWStats if awstats_install
|
||||
include_tasks: install.yml
|
||||
when: awstats_install | bool and not awstats_installed is defined
|
||||
when: awstats_install and not awstats_installed is defined
|
||||
|
||||
- name: Enable AWStats
|
||||
include_tasks: enable.yml
|
||||
when: awstats_install | bool or awstats_installed is defined
|
||||
when: awstats_install or awstats_installed is defined
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: Install AzuraCast if azuracast_install
|
||||
include_tasks: install.yml
|
||||
when: azuracast_install | bool and not azuracast_installed is defined | bool
|
||||
when: azuracast_install and not azuracast_installed is defined | bool
|
||||
|
||||
# TODO figure out what to turn off for azuracast
|
||||
#- name: Enable AzuraCast
|
||||
# include_tasks: enable.yml
|
||||
# when: azuracast_install | bool or azuracast_installed is defined | bool
|
||||
# when: azuracast_install or azuracast_installed is defined | bool
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
- option: name
|
||||
value: calibre-web
|
||||
- option: description
|
||||
value: '"calibre-web is a web app providing a clean interface for browsing, reading and downloading e-books."'
|
||||
value: '"Calibre-Web is a web app providing a clean interface for browsing, reading and downloading e-books."'
|
||||
- option: calibreweb_url1
|
||||
value: "{{ calibreweb_url1 }}"
|
||||
- option: calibreweb_url2
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
name: cups
|
||||
state: present
|
||||
when: cups_install | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install our own /etc/cups/cupsd.conf from template, to permit local LAN admin
|
||||
template:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- docker
|
||||
- python-docker-py
|
||||
when: docker_install | bool
|
||||
tags: download
|
||||
#tags: download
|
||||
|
||||
- name: put the systemd startup file in place
|
||||
template: src=docker.service
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- name: Install DokuWiki
|
||||
include_tasks: install.yml
|
||||
when: dokuwiki_install | bool and not dokuwiki_installed is defined
|
||||
when: dokuwiki_install and not dokuwiki_installed is defined
|
||||
|
||||
- name: Enable DokuWiki
|
||||
include_tasks: enable.yml
|
||||
when: dokuwiki_install | bool or dokuwiki_installed is defined
|
||||
when: dokuwiki_install or dokuwiki_installed is defined
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
package:
|
||||
name: ejabberd
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
#- name: Configure ejabberd
|
||||
# template:
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
state=present
|
||||
with_items:
|
||||
- ejabberd-2.1.11
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
when: not is_debuntu
|
||||
|
||||
# need to use lineinfile and better regexp
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
- option: name
|
||||
value: gitea
|
||||
- option: description
|
||||
value: '"Gitea: Git with a cup of tea"'
|
||||
value: '"Gitea is like GitHub for more offline communities: Git with a cup of tea"'
|
||||
- option: gitea_run_directory
|
||||
value: "{{ gitea_run_directory }}"
|
||||
- option: gitea_url
|
||||
|
|
|
@ -4,16 +4,14 @@
|
|||
systemd:
|
||||
name: gitea
|
||||
state: stopped
|
||||
tags:
|
||||
- pre-install
|
||||
#tags: pre-install
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Ensure group gitea exists
|
||||
group:
|
||||
name: gitea
|
||||
state: present
|
||||
tags:
|
||||
- pre-install
|
||||
#tags: pre-install
|
||||
|
||||
- name: Create user gitea
|
||||
user:
|
||||
|
@ -21,8 +19,7 @@
|
|||
comment: Gitea daemon account
|
||||
groups: gitea
|
||||
home: "{{ gitea_home }}"
|
||||
tags:
|
||||
- pre-install
|
||||
#tags: pre-install
|
||||
|
||||
- name: Create Gitea directory structure
|
||||
file:
|
||||
|
@ -31,19 +28,17 @@
|
|||
owner: gitea
|
||||
group: gitea
|
||||
with_items: "{{ gitea_subdirectories }}"
|
||||
tags:
|
||||
- pre-install
|
||||
#tags: pre-install
|
||||
|
||||
- name: Make directories data, indexers, and log writable
|
||||
file:
|
||||
path: "{{ gitea_root_directory }}/{{ item }}"
|
||||
mode: 0750
|
||||
mode: '0750'
|
||||
with_items:
|
||||
- data
|
||||
- indexers
|
||||
- log
|
||||
tags:
|
||||
- pre-install
|
||||
#tags: pre-install
|
||||
|
||||
# Download, verify, and link Gitea binary
|
||||
|
||||
|
@ -56,27 +51,22 @@
|
|||
get_url:
|
||||
url: "{{ gitea_download_url }}"
|
||||
dest: "{{ gitea_install_path }}"
|
||||
mode: 0775
|
||||
tags:
|
||||
- install
|
||||
mode: '0775'
|
||||
#tags: install
|
||||
when: internet_available | bool
|
||||
|
||||
- name: Download Gitea GPG signature
|
||||
get_url:
|
||||
url: "{{ gitea_integrity_url }}"
|
||||
dest: "{{ gitea_checksum_path }}"
|
||||
tags:
|
||||
- never
|
||||
- verify
|
||||
#tags: never, verify
|
||||
when: internet_available | bool
|
||||
|
||||
- name: Verify Gitea binary with GPG signature
|
||||
shell: |
|
||||
gpg --keyserver pgp.mit.edu --recv {{ gitea_gpg_key }}
|
||||
gpg --verify {{ gitea_checksum_path }} {{ gitea_install_path }}
|
||||
tags:
|
||||
- never
|
||||
- verify
|
||||
#tags: never, verify
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Link Gitea
|
||||
|
@ -86,8 +76,7 @@
|
|||
owner: gitea
|
||||
group: gitea
|
||||
state: link
|
||||
tags:
|
||||
- install
|
||||
#tags: install
|
||||
|
||||
# Configure Gitea
|
||||
|
||||
|
@ -102,9 +91,8 @@
|
|||
state: directory
|
||||
owner: root
|
||||
group: gitea
|
||||
mode: 0770
|
||||
tags:
|
||||
- config
|
||||
mode: '0770'
|
||||
#tags: config
|
||||
|
||||
- name: Create app.ini
|
||||
template:
|
||||
|
@ -112,7 +100,7 @@
|
|||
dest: /etc/gitea/app.ini
|
||||
owner: root
|
||||
group: gitea
|
||||
mode: 0664
|
||||
mode: '0664'
|
||||
|
||||
# Create systemd service & prepare Apache for http://box/gitea
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
- "php{{ php_version }}-curl"
|
||||
state: present
|
||||
when: is_debian | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: 'Install 2 packages: apache2, php (ubuntu)'
|
||||
package:
|
||||
|
@ -20,8 +19,7 @@
|
|||
- php
|
||||
state: present
|
||||
when: is_ubuntu | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
# 2019-05-30: It's interesting that http://box.lan/admin and everything seems
|
||||
# to work even without php{{ php_version }}-sqlite3 as confirmed on Ubuntu
|
||||
|
@ -52,8 +50,7 @@
|
|||
- php-curl
|
||||
state: present
|
||||
when: is_redhat | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
# remove symlinks for mpm-event, replace with mpm-prefork
|
||||
- name: Remove both mpm_event symlinks from /etc/apache2/mods-enabled (debuntu)
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
- include_tasks: install.yml
|
||||
tags:
|
||||
- base
|
||||
#tags: base
|
||||
|
||||
- include_tasks: html.yml
|
||||
tags:
|
||||
- base
|
||||
#tags: base
|
||||
|
||||
# Partially fixes search @ http://box/modules/es-wikihow (on RPi anyway) see https://github.com/iiab/iiab/issues/829
|
||||
- include_tasks: php-stem.yml
|
||||
tags:
|
||||
- base
|
||||
#tags: base
|
||||
|
||||
- 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: refresh-wiki-docs.sh
|
||||
dest: /usr/bin/iiab-refresh-wiki-docs
|
||||
mode: 0755
|
||||
mode: '0755'
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
- xinetd
|
||||
- xs-rsync
|
||||
- incron
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Configure idmgr
|
||||
template: backup=yes
|
||||
|
|
|
@ -4,5 +4,4 @@
|
|||
- screen
|
||||
- lynx
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
- include_tasks: admin-user.yml
|
||||
tags:
|
||||
- base
|
||||
#tags: base
|
||||
when: iiab_admin_user_install | bool
|
||||
|
||||
- include_tasks: access.yml
|
||||
tags:
|
||||
- base
|
||||
#tags: base
|
||||
|
||||
- name: Add 'iiab-admin' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
|
@ -25,7 +23,7 @@
|
|||
template:
|
||||
src: sshpwd-profile-iiab.sh
|
||||
dest: /etc/profile.d/
|
||||
mode: 0644
|
||||
mode: '0644'
|
||||
|
||||
- name: Is this LXDE-pi?
|
||||
stat:
|
||||
|
@ -36,7 +34,7 @@
|
|||
template:
|
||||
src: sshpwd-lxde-iiab.sh
|
||||
dest: /etc/xdg/lxsession/LXDE-pi/
|
||||
mode: 0755
|
||||
mode: '0755'
|
||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debuntu
|
||||
|
||||
# 2019-03-07: This popup (/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh) does
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- name: Install Kolibri
|
||||
include_tasks: install.yml
|
||||
when: kolibri_install | bool and not kolibri_installed is defined
|
||||
when: kolibri_install and not kolibri_installed is defined
|
||||
|
||||
- name: Enable Kolibri
|
||||
include_tasks: enable.yml
|
||||
when: kolibri_install | bool or kolibri_installed is defined
|
||||
when: kolibri_install or kolibri_installed is defined
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- name: Install Lokole {{ lokole_version }} if lokole_install
|
||||
include_tasks: install.yml
|
||||
when: lokole_install | bool and not lokole_installed is defined
|
||||
when: lokole_install and not lokole_installed is defined
|
||||
|
||||
- name: Enable Lokole
|
||||
include_tasks: enable.yml
|
||||
when: lokole_install | bool or lokole_installed is defined
|
||||
when: lokole_install or lokole_installed is defined
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
- option: name
|
||||
value: mediawiki
|
||||
- option: description
|
||||
value: '"mediawiki is a blog and web site management application."'
|
||||
value: '"MediaWiki is a blog and web site management application, from the people who create Wikipedia."'
|
||||
- option: mediawiki_src
|
||||
value: "{{ mediawiki_src }}"
|
||||
- option: mediawiki_abs_path
|
||||
|
|
|
@ -5,4 +5,3 @@
|
|||
- name: Enable MediaWiki
|
||||
include_tasks: enable.yml
|
||||
when: mediawiki_install or mediawiki_installed is defined
|
||||
# when: mediawiki_enabled | bool
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
- mongodb # 2019-01-31: this package does not exist on (cannot be installed on) Debian 10, SEE #1437
|
||||
state: present
|
||||
when: internet_available and not is_rpi
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
# 2019-02-02: Sugarizer with Node.js 10.x requires MongoDB 2.6+ so
|
||||
# https://andyfelong.com/2017/08/mongodb-3-0-14-for-raspbian-stretch/
|
||||
|
|
|
@ -2,16 +2,14 @@
|
|||
package:
|
||||
name: monit
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install chkconfig package (debian-8)
|
||||
package:
|
||||
name: chkconfig
|
||||
state: present
|
||||
when: is_debian and ansible_distribution_major_version == "8"
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install /etc/monitrc from template
|
||||
template:
|
||||
|
@ -20,7 +18,7 @@
|
|||
dest: /etc/monitrc
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
mode: '0600'
|
||||
|
||||
# - name: Install config file /etc/monit.d/watchdog from template (NEVER RUNS, WHY?)
|
||||
# template:
|
||||
|
@ -29,7 +27,7 @@
|
|||
# owner: root
|
||||
# group: root
|
||||
# force: yes
|
||||
# mode: 0755
|
||||
# mode: '0755'
|
||||
# register: monit_config
|
||||
# when: False # IS THIS A BUG ?
|
||||
# until: monit_config | success
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- name: "Install Moodle"
|
||||
include_tasks: install.yml
|
||||
when: moodle_install | bool and not moodle_installed is defined
|
||||
when: moodle_install and not moodle_installed is defined
|
||||
|
||||
- name: Enable Moodle
|
||||
include_tasks: enable.yml
|
||||
when: moodle_install | bool or moodle_installed is defined
|
||||
when: moodle_install or moodle_installed is defined
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
with_items:
|
||||
- mosquitto
|
||||
- mosquitto-clients
|
||||
tags: download
|
||||
#tags: download
|
||||
|
||||
- name: Disable & Stop 'mosquitto' service
|
||||
systemd:
|
||||
|
@ -17,7 +17,7 @@
|
|||
file:
|
||||
path: /etc/mosquitto/passwd
|
||||
state: touch
|
||||
mode: "u=rw,g=r,o=r" # 0644
|
||||
mode: "u=rw,g=r,o=r" # '0644'
|
||||
|
||||
- name: Populate /etc/mosquitto/passwd with actual username/password
|
||||
shell: mosquitto_passwd -b /etc/mosquitto/passwd "{{ mosquitto_user }}" "{{ mosquitto_password }}"
|
||||
|
@ -28,7 +28,7 @@
|
|||
dest: /etc/mosquitto/conf.d/websockets.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
mode: '0755'
|
||||
|
||||
- name: "Add 'mosquitto_installed: True' to {{ iiab_state_file }}"
|
||||
lineinfile:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- include_tasks: install.yml
|
||||
when: mosquitto_install | bool and not mosquitto_installed is defined
|
||||
when: mosquitto_install and not mosquitto_installed is defined
|
||||
|
||||
- include_tasks: enable.yml
|
||||
when: mosquitto_install | bool or mosquitto_installed is defined
|
||||
when: mosquitto_install or mosquitto_installed is defined
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
- name: If MySQL is enabled, let Munin monitor it
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: /etc/munin/plugins/
|
||||
with_items:
|
||||
- /usr/share/munin/plugins/mysql_
|
||||
- /usr/share/munin/plugins/mysql_bytes
|
||||
- /usr/share/munin/plugins/mysql_innodb
|
||||
- /usr/share/munin/plugins/mysql_isam_space_
|
||||
- /usr/share/munin/plugins/mysql_queries
|
||||
- /usr/share/munin/plugins/mysql_slowqueries
|
||||
- /usr/share/munin/plugins/mysql_threads
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Enable & Start munin-node systemd service
|
||||
- name: Enable & Start 'munin-node' systemd service
|
||||
systemd:
|
||||
name: munin-node
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
||||
when: munin_enabled | bool
|
||||
|
||||
- name: Disable munin-node service if not munin_enabled
|
||||
- name: Disable 'munin-node' systemd service
|
||||
systemd:
|
||||
name: munin-node
|
||||
enabled: no
|
||||
state: stopped
|
||||
when: not munin_enabled
|
||||
|
||||
- name: Create symlink munin24.conf from sites-enabled to sites-available (debuntu)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/munin24.conf
|
||||
path: /etc/apache2/sites-enabled/munin24.conf
|
||||
state: link
|
||||
when: munin_enabled and not nginx_enabled
|
||||
# Apache
|
||||
|
||||
- name: Remove symlink /etc/apache2/sites-enabled/munin24.conf if not munin_enabled (debuntu)
|
||||
file:
|
||||
path: /etc/apache2/sites-enabled/munin24.conf
|
||||
state: absent
|
||||
when: not munin_enabled or nginx_enabled
|
||||
- name: Enable http://box/munin via Apache
|
||||
command: a2ensite munin24.conf
|
||||
when: apache_install and munin_enabled # and not nginx_enabled
|
||||
|
||||
- name: Install /etc/nginx/conf.d/munin24-nginx.conf, from templates
|
||||
- name: Disable http://box/munin via Apache
|
||||
command: a2dissite munin24.conf
|
||||
when: apache_install and not munin_enabled # or nginx_enabled
|
||||
|
||||
- name: Restart Apache systemd service ({{ apache_service }})
|
||||
systemd:
|
||||
name: "{{ apache_service }}" # apache2 or httpd, as set in /opt/iiab/iiab/vars/<OS>.yml
|
||||
state: restarted
|
||||
when: apache_enabled | bool
|
||||
|
||||
# NGINX
|
||||
|
||||
- name: Enable http://box/munin via NGINX, by installing {{ nginx_config_dir }}/munin24-nginx.conf from template
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- { src: 'munin24-nginx.conf.j2', dest: '/etc/nginx/conf.d/munin24-nginx.conf' }
|
||||
when: munin_enabled | bool and nginx_enabled | bool
|
||||
src: munin24-nginx.conf.j2
|
||||
dest: "{{ nginx_config_dir }}/munin24-nginx.conf" # /etc/nginx/conf.d
|
||||
when: munin_enabled and nginx_enabled
|
||||
|
||||
- name: Disable http://box/munin via NGINX, by installing {{ nginx_config_dir }}/munin24-nginx.conf
|
||||
file:
|
||||
path: "{{ nginx_config_dir }}/munin24-nginx.conf" # /etc/nginx/conf.d
|
||||
state: absent
|
||||
when: not munin_enabled
|
||||
|
||||
- name: Restart 'nginx' systemd service
|
||||
systemd:
|
||||
name: nginx
|
||||
state: restarted
|
||||
when: nginx_enabled | bool
|
||||
|
||||
|
||||
- name: Add 'munin' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
|
@ -60,7 +60,7 @@
|
|||
- option: name
|
||||
value: Munin
|
||||
- option: description
|
||||
value: '"Munin is a networked resource monitoring tool that can help analyze resource trends and \"what just happened to kill our performance?\" problems."'
|
||||
value: '"Munin is a networked resource monitoring tool that can help analyze resource trends and ''what just happened to kill our performance?'' problems."'
|
||||
- option: installed
|
||||
value: "{{ munin_install }}"
|
||||
- option: enabled
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
- libcgi-fast-perl
|
||||
- libapache2-mod-fcgid
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
when: is_debuntu | bool
|
||||
|
||||
- name: "Install 2 packages: munin, munin-node (OS's other than debuntu)"
|
||||
|
@ -17,17 +16,16 @@
|
|||
- munin
|
||||
- munin-node
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
when: not is_debuntu
|
||||
|
||||
- name: Install /etc/munin/munin.conf and Apache's munin24.conf, from templates
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: 0644
|
||||
with_items:
|
||||
- { src: 'munin.conf.j2', dest: '/etc/munin/munin.conf' }
|
||||
- { src: 'munin24.conf.j2', dest: '/etc/{{ apache_config_dir }}/munin24.conf' }
|
||||
|
@ -37,8 +35,20 @@
|
|||
path: /etc/munin/munin-htpasswd
|
||||
name: Admin
|
||||
password: changeme
|
||||
create: yes
|
||||
state: present
|
||||
|
||||
- name: If MySQL is enabled, let Munin monitor it
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: /etc/munin/plugins/
|
||||
with_items:
|
||||
- /usr/share/munin/plugins/mysql_
|
||||
- /usr/share/munin/plugins/mysql_bytes
|
||||
- /usr/share/munin/plugins/mysql_innodb
|
||||
- /usr/share/munin/plugins/mysql_isam_space_
|
||||
- /usr/share/munin/plugins/mysql_queries
|
||||
- /usr/share/munin/plugins/mysql_slowqueries
|
||||
- /usr/share/munin/plugins/mysql_threads
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: "Add 'munin_installed: True' to {{ iiab_state_file }}"
|
||||
lineinfile:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- name: Install munin
|
||||
include_tasks: install.yml
|
||||
when: munin_install | bool and not munin_installed is defined
|
||||
when: munin_install and not munin_installed is defined
|
||||
|
||||
- name: Enable munin
|
||||
include_tasks: enable.yml
|
||||
when: munin_install | bool or munin_installed is defined
|
||||
when: munin_install or munin_installed is defined
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
- php{{ php_version }}-xmlrpc
|
||||
state: present
|
||||
when: is_debuntu | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install php{{ php_version }}-xml (ubuntu or debian 9+)
|
||||
package:
|
||||
|
@ -45,18 +44,15 @@
|
|||
- php-xmlrpc
|
||||
state: present
|
||||
when: not is_debuntu
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- include_tasks: centos.yml
|
||||
when: ansible_distribution == "CentOS"
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- include_tasks: fedora.yml
|
||||
when: ansible_distribution == "Fedora"
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
|
||||
# 2019-07-03 @jvonau @holta: the next 50 lines (6 stanzas) double MariaDB's
|
||||
|
@ -129,7 +125,7 @@
|
|||
src: my.cnf.j2
|
||||
dest: /root/.my.cnf
|
||||
owner: root
|
||||
mode: 0600
|
||||
mode: '0600'
|
||||
when: mysql_enabled | bool
|
||||
|
||||
# 'localhost' needs to be the last item for idempotency, see
|
||||
|
|
|
@ -177,10 +177,8 @@
|
|||
dest: "{{ iiab_env_file }}"
|
||||
regexp: '^IIAB_WAN_DEVICE=*'
|
||||
line: 'IIAB_WAN_DEVICE="{{ iiab_wan_iface }}"'
|
||||
state: present
|
||||
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
||||
tags:
|
||||
- network
|
||||
#tags: network
|
||||
|
||||
- name: Record IIAB_LAN_DEVICE to {{ iiab_env_file }}
|
||||
lineinfile:
|
||||
|
@ -189,8 +187,7 @@
|
|||
line: 'IIAB_LAN_DEVICE="{{ iiab_lan_iface }}"'
|
||||
state: present
|
||||
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
||||
tags:
|
||||
- network
|
||||
#tags: network
|
||||
|
||||
- name: Add 'computed_network' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
package:
|
||||
name: dansguardian
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install /etc/dansguardian/dansguardian.conf from template (Fedora)
|
||||
template:
|
||||
|
|
|
@ -84,8 +84,7 @@
|
|||
src: network/wifi-slave.j2
|
||||
dest: "/etc/sysconfig/network-scripts/ifcfg-{{ iiab_wireless_lan_iface }}"
|
||||
when: iiab_lan_iface == "br0" and iiab_wireless_lan_iface != "none"
|
||||
tags:
|
||||
- network
|
||||
#tags: network
|
||||
|
||||
- include_tasks: enable_wan.yml
|
||||
when: not installing and not iiab_demo_mode
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
- name: Configure wondershaper
|
||||
include_tasks: wondershaper.yml
|
||||
when: wondershaper_install | bool or wondershaper_installed is defined
|
||||
when: wondershaper_install or wondershaper_installed is defined
|
||||
#tags: network, wondershaper
|
||||
|
||||
- name: (Re)Install named
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
name: "{{ proxy }}"
|
||||
state: stopped
|
||||
async: 120
|
||||
when: squid_install | bool or squid_installed is defined
|
||||
when: squid_install or squid_installed is defined
|
||||
|
||||
- name: Stop DansGuardian
|
||||
systemd:
|
||||
name: dansguardian
|
||||
state: stopped
|
||||
when: dansguardian_install | bool or dansguardian_installed is defined
|
||||
when: dansguardian_install or dansguardian_installed is defined
|
||||
|
||||
- name: Restart DansGuardian service (dansguardian) except Ubuntu which needs reboot to activate
|
||||
systemd:
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#grep -r "not nginx_enabled" roles/
|
||||
#roles/calibre-web/tasks/main.yml: when: calibreweb_enabled | bool and not nginx_enabled | bool
|
||||
#roles/calibre-web/tasks/main.yml: when: calibreweb_enabled and not nginx_enabled | bool
|
||||
#roles/calibre-web/tasks/main.yml: when: not nginx_enabled | bool
|
||||
#roles/kolibri/tasks/main.yml: when: kolibri_enabled | bool and not nginx_enabled | bool
|
||||
#roles/kolibri/tasks/main.yml: when: kolibri_enabled and not nginx_enabled | bool
|
||||
#roles/kolibri/tasks/main.yml: when: not nginx_enabled | bool
|
||||
#roles/kiwix/tasks/kiwix_install.yml: when: kiwix_enabled | bool and not nginx_enabled | bool
|
||||
#roles/kiwix/tasks/kiwix_install.yml: when: kiwix_enabled and not nginx_enabled | bool
|
||||
#roles/kiwix/tasks/kiwix_install.yml: when: not nginx_enabled | bool
|
||||
#roles/nginx/tasks/main.yml: when: not nginx_enabled | bool
|
||||
#roles/nginx/tasks/main.yml: when: not nginx_enabled | bool
|
||||
#roles/sugarizer/tasks/install.yml: when: sugarizer_enabled | bool and not nginx_enabled | bool
|
||||
#roles/sugarizer/tasks/install.yml: when: sugarizer_enabled | bool and not nginx_enabled | bool
|
||||
#roles/sugarizer/tasks/install.yml: when: sugarizer_enabled and not nginx_enabled | bool
|
||||
#roles/sugarizer/tasks/install.yml: when: sugarizer_enabled and not nginx_enabled | bool
|
||||
|
||||
- name: Enable Gitea for Apache
|
||||
command: a2ensite gitea.conf
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- include_tasks: install.yml
|
||||
when: nodered_install | bool and not nodered_installed is defined
|
||||
when: nodered_install and not nodered_installed is defined
|
||||
|
||||
- include_tasks: enable.yml
|
||||
when: nodered_install | bool or nodered_installed is defined
|
||||
when: nodered_install or nodered_installed is defined
|
||||
|
|
|
@ -2,24 +2,21 @@
|
|||
package:
|
||||
name: postgresql
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install postgresql-client (debuntu)
|
||||
package:
|
||||
name: postgresql-client
|
||||
state: present
|
||||
when: is_debuntu | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install postgresql-server (OS's other than debuntu)
|
||||
package:
|
||||
name: postgresql-server
|
||||
state: present
|
||||
when: not is_debuntu
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install /etc/systemd/system/postgresql-iiab.service from template
|
||||
template:
|
||||
|
@ -27,14 +24,14 @@
|
|||
dest: /etc/systemd/system/postgresql-iiab.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
mode: '0644'
|
||||
|
||||
- name: Create PostgreSQL data dir /library/pgsql-iiab, owned by postgres:postgres
|
||||
file:
|
||||
path: /library/pgsql-iiab
|
||||
owner: postgres
|
||||
group: postgres
|
||||
mode: 0700
|
||||
mode: '0700'
|
||||
state: directory
|
||||
|
||||
- name: Make sure locale {{ postgresql_locale }} is enabled (debuntu) # en_US.UTF-8
|
||||
|
@ -72,7 +69,7 @@
|
|||
dest: /library/pgsql-iiab/postgresql.conf
|
||||
owner: postgres
|
||||
group: postgres
|
||||
mode: 0640
|
||||
mode: '0640'
|
||||
|
||||
# Probably Not Nec! Given stanza below does the same.
|
||||
- name: 'Stop postgresql service: /etc/init.d/postgresql stop (debuntu)'
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
path: "{{ shared_dir }}"
|
||||
owner: "{{ smbuser }}"
|
||||
group: "{{ smbuser }}"
|
||||
mode: 0777
|
||||
mode: '0777'
|
||||
state: directory
|
||||
|
||||
# Install and configure samba server (requires ports 137, 138, 139, 445 open).
|
||||
|
@ -21,9 +21,7 @@
|
|||
- samba-common
|
||||
- cifs-utils
|
||||
state: present
|
||||
tags:
|
||||
- samba
|
||||
- download
|
||||
#tags: samba, download
|
||||
|
||||
- name: Install /etc/samba/smb.conf from template
|
||||
template:
|
||||
|
@ -41,8 +39,7 @@
|
|||
name: "{{ smb_service }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
tags:
|
||||
- samba
|
||||
#tags: samba
|
||||
when: samba_enabled | bool
|
||||
|
||||
- name: Enable & Start NetBIOS name server ({{ nmb_service }})
|
||||
|
@ -50,8 +47,7 @@
|
|||
name: "{{ nmb_service }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
tags:
|
||||
- samba
|
||||
#tags: samba
|
||||
when: samba_enabled | bool
|
||||
|
||||
- name: Disable Samba if not samba_enabled
|
||||
|
@ -59,8 +55,7 @@
|
|||
name: "{{ smb_service }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
tags:
|
||||
- samba
|
||||
#tags: samba
|
||||
when: not samba_enabled
|
||||
|
||||
- name: Disable NetBIOS name server ({{ nmb_service }}) if not samba_enabled
|
||||
|
@ -68,8 +63,7 @@
|
|||
name: "{{ nmb_service }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
tags:
|
||||
- samba
|
||||
#tags: samba
|
||||
when: not samba_enabled
|
||||
|
||||
- name: Add 'samba' variable values to {{ iiab_ini_file }}
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
- active-document
|
||||
- restful-document
|
||||
- python-xappy
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Create sugar-stats directory tree
|
||||
file: path={{ item }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- name: Install 'sugarizer' if sugarizer_install and not Debian 10+
|
||||
include_tasks: install.yml
|
||||
when: not sugarizer_installed is defined and sugarizer_install | bool and not ((is_debian and not is_raspbian) and (not is_debian_8) and (not is_debian_9))
|
||||
when: not sugarizer_installed is defined and sugarizer_install and not ((is_debian and not is_raspbian) and (not is_debian_8) and (not is_debian_9))
|
||||
|
||||
- name: Enable 'sugarizer' if sugarizer_enabled
|
||||
include_tasks: enable.yml
|
||||
|
|
|
@ -2,26 +2,22 @@
|
|||
- name: Install Xfce group of packages
|
||||
shell: "yum groupinstall -y xfce"
|
||||
when: xo_model == "none" and internet_available and ansible_distribution_version <= "20"
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install X11 group of packages
|
||||
shell: "yum groupinstall -y 'X Window system'"
|
||||
when: xo_model == "none" and internet_available and ansible_distribution_version <= "20"
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install Xfce group of packages
|
||||
shell: yum groupinstall -y "Xfce Desktop" --exclude fedora-release\*
|
||||
when: xo_model == "none" and internet_available and ansible_distribution_version >= "21"
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install X Windows on CentOS
|
||||
shell: yum groupinstall -y "Server with GUI"
|
||||
when: internet_available and ansible_distribution == "CentOS"
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Download TeamViewer software
|
||||
get_url:
|
||||
|
@ -29,8 +25,7 @@
|
|||
dest: "{{ yum_packages_dir }}/{{ teamviewer_rpm_file }}"
|
||||
timeout: "{{ download_timeout }}"
|
||||
when: internet_available | bool
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
# F22 has issues with yum localinstall exclude for now
|
||||
- name: Do the install of TeamViewer, pulling in any required dependencies
|
||||
|
|
|
@ -2,16 +2,15 @@
|
|||
package:
|
||||
name: vnstat
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
#tags: download
|
||||
|
||||
- name: Install /etc/vnstat.conf from template
|
||||
template:
|
||||
src: vnstat.conf.j2
|
||||
dest: /etc/vnstat.conf
|
||||
mode: 0744
|
||||
owner: root
|
||||
group: root
|
||||
# owner: root
|
||||
# group: root
|
||||
mode: '0744'
|
||||
|
||||
- name: Create database for WAN to collect vnStat data
|
||||
shell: /usr/bin/vnstat -i {{ iiab_wan_iface }}
|
||||
|
@ -23,6 +22,7 @@
|
|||
- name: Enable & Start vnStat's systemd service
|
||||
systemd:
|
||||
name: vnstat
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue