mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
patch 0002
This commit is contained in:
parent
3a1d427ea0
commit
cb344d7d47
60 changed files with 211 additions and 172 deletions
|
@ -111,7 +111,7 @@
|
||||||
- name: Set mysql service name to mysql for debian
|
- name: Set mysql service name to mysql for debian
|
||||||
set_fact:
|
set_fact:
|
||||||
mysql_service: mysql
|
mysql_service: mysql
|
||||||
when: ansible_distribution == "Debian"
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Fedora 20
|
- name: Fedora 20
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
- name: get the uuidgen program
|
- name: get the uuidgen program
|
||||||
package: name=uuid-runtime
|
package: name=uuid-runtime
|
||||||
state=present
|
state=present
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
# for rpi, without rtc, we need time as soon as possible
|
# for rpi, without rtc, we need time as soon as possible
|
||||||
- name: Install chrony package
|
- name: Install chrony package
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
src=xsce-extra.repo
|
src=xsce-extra.repo
|
||||||
owner=root
|
owner=root
|
||||||
mode=0666
|
mode=0666
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Install xsce-testing repos
|
- name: Install xsce-testing repos
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
src=xsce-testing.repo
|
src=xsce-testing.repo
|
||||||
owner=root
|
owner=root
|
||||||
mode=0666
|
mode=0666
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Install rpmfusion-free-updates repo -- for exfat
|
- name: Install rpmfusion-free-updates repo -- for exfat
|
||||||
template: dest=/etc/yum.repos.d/rpmfusion-free-updates.repo
|
template: dest=/etc/yum.repos.d/rpmfusion-free-updates.repo
|
||||||
|
|
|
@ -36,11 +36,11 @@
|
||||||
lineinfile: regexp="^CONF_SWAPSIZE"
|
lineinfile: regexp="^CONF_SWAPSIZE"
|
||||||
line=CONF_SWAPSIZE=500
|
line=CONF_SWAPSIZE=500
|
||||||
dest=/etc/dphys-swapfile
|
dest=/etc/dphys-swapfile
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: restart the swqp service
|
- name: restart the swqp service
|
||||||
command: /etc/init.d/dphys-swapfile restart
|
command: /etc/init.d/dphys-swapfile restart
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Add rpi rootfs resizing service
|
- name: Add rpi rootfs resizing service
|
||||||
template: src={{ item.src }}
|
template: src={{ item.src }}
|
||||||
|
|
|
@ -40,5 +40,5 @@
|
||||||
backup=no
|
backup=no
|
||||||
|
|
||||||
- include: net_mods.yml
|
- include: net_mods.yml
|
||||||
when: not is_debian and not is_F18
|
when: not is_debuntu and not is_F18
|
||||||
|
|
||||||
|
|
|
@ -13,18 +13,18 @@
|
||||||
- name: get the createrepo program
|
- name: get the createrepo program
|
||||||
package: name=createrepo
|
package: name=createrepo
|
||||||
state=present
|
state=present
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Create local repo
|
- name: Create local repo
|
||||||
shell: createrepo {{ yum_packages_dir }}
|
shell: createrepo {{ yum_packages_dir }}
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Install local repo file.
|
- name: Install local repo file.
|
||||||
template: dest=/etc/yum.repos.d/xsce-local.repo
|
template: dest=/etc/yum.repos.d/xsce-local.repo
|
||||||
src=local.repo
|
src=local.repo
|
||||||
owner=root
|
owner=root
|
||||||
mode=0644
|
mode=0644
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Install yum packages
|
- name: Install yum packages
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
- linux-firmware
|
- linux-firmware
|
||||||
- syslog
|
- syslog
|
||||||
- xml-common
|
- xml-common
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- inetutils-syslogd
|
- inetutils-syslogd
|
||||||
- wpasupplicant
|
- wpasupplicant
|
||||||
when: ansible_distribution == "Debian"
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
- glibc # CVE-2015-7547
|
- glibc # CVE-2015-7547
|
||||||
- bash
|
- bash
|
||||||
- iptables
|
- iptables
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
- libc6
|
- libc6
|
||||||
- bash
|
- bash
|
||||||
- iptables
|
- iptables
|
||||||
when: ansible_distribution == "Debian"
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
|
|
@ -13,18 +13,18 @@
|
||||||
- name: get the createrepo program
|
- name: get the createrepo program
|
||||||
package: name=createrepo
|
package: name=createrepo
|
||||||
state=present
|
state=present
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Create local repo
|
- name: Create local repo
|
||||||
shell: createrepo {{ yum_packages_dir }}
|
shell: createrepo {{ yum_packages_dir }}
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Install local repo file.
|
- name: Install local repo file.
|
||||||
template: dest=/etc/yum.repos.d/xsce-local.repo
|
template: dest=/etc/yum.repos.d/xsce-local.repo
|
||||||
src=local.repo
|
src=local.repo
|
||||||
owner=root
|
owner=root
|
||||||
mode=0644
|
mode=0644
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Install yum packages
|
- name: Install yum packages
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
- linux-firmware
|
- linux-firmware
|
||||||
- syslog
|
- syslog
|
||||||
- xml-common
|
- xml-common
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- inetutils-syslogd
|
- inetutils-syslogd
|
||||||
- wpasupplicant
|
- wpasupplicant
|
||||||
when: ansible_distribution == "Debian"
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
- glibc # CVE-2015-7547
|
- glibc # CVE-2015-7547
|
||||||
- bash
|
- bash
|
||||||
- iptables
|
- iptables
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
- libc6
|
- libc6
|
||||||
- bash
|
- bash
|
||||||
- iptables
|
- iptables
|
||||||
when: ansible_distribution == "Debian"
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
- name: Do the same if running on raspbian
|
- name: Do the same if running on raspbian
|
||||||
template: src=lxde_ssh_warn.sh
|
template: src=lxde_ssh_warn.sh
|
||||||
dest=/home/pi/.config/lxsession/LXDE-pi/
|
dest=/home/pi/.config/lxsession/LXDE-pi/
|
||||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debian
|
when: lx.stat.isdir is defined and lx.staat.isdir and is_rpi and is_debuntu
|
||||||
|
|
||||||
- name: put a autostart line to check for default password in LXDE
|
- name: put a autostart line to check for default password in LXDE
|
||||||
lineinfile: line=@/home/pi/.config/lxsession/LXDE-pi/lxde_ssh_warn.sh
|
lineinfile: line=@/home/pi/.config/lxsession/LXDE-pi/lxde_ssh_warn.sh
|
||||||
dest=/home/pi/.config/lxsession/LXDE-pi/autostart
|
dest=/home/pi/.config/lxsession/LXDE-pi/autostart
|
||||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debian
|
when: lx.stat.isdir is defined and lx.staat.isdir and is_rpi and is_debuntu
|
||||||
|
|
||||||
- name: Base Server Installed
|
- name: Base Server Installed
|
||||||
command: echo Base Server Installed
|
command: echo Base Server Installed
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
- name: Stop postgresql service
|
- name: Stop postgresql service
|
||||||
command: "/etc/init.d/postgresql stop"
|
command: "/etc/init.d/postgresql stop"
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: postgresql_install and is_debian
|
when: postgresql_install and is_debuntu
|
||||||
|
|
||||||
- name: Start postgresql service
|
- name: Start postgresql service
|
||||||
service: name=postgresql-xs
|
service: name=postgresql-xs
|
||||||
|
|
|
@ -6,4 +6,4 @@ dependencies:
|
||||||
- { role: kalite, tags: ['kalite','edu-apps'], when: kalite_install }
|
- { role: kalite, tags: ['kalite','edu-apps'], when: kalite_install }
|
||||||
- { role: kiwix, tags: ['kiwix','edu-apps'], when: kiwix_install }
|
- { role: kiwix, tags: ['kiwix','edu-apps'], when: kiwix_install }
|
||||||
- { role: sugarizer, tags: ['sugarizer','edu-apps'], when: sugarizer_install }
|
- { role: sugarizer, tags: ['sugarizer','edu-apps'], when: sugarizer_install }
|
||||||
- { role: debian_schooltool, tags: ['schooltool','debian_schooltool','edu-apps'], when: debian_schooltool_install and is_debian }
|
- { role: debian_schooltool, tags: ['schooltool','debian_schooltool','edu-apps'], when: debian_schooltool_install and is_debuntu }
|
||||||
|
|
|
@ -79,19 +79,19 @@
|
||||||
|
|
||||||
- name: enable mod_expires for debian
|
- name: enable mod_expires for debian
|
||||||
command: a2enmod expires
|
command: a2enmod expires
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: create the link which enables the site
|
- name: create the link which enables the site
|
||||||
file: src=/etc/apache2/sites-available/xs-activity-server.conf
|
file: src=/etc/apache2/sites-available/xs-activity-server.conf
|
||||||
dest=/etc/apache2/sites-enabled/xs-activity-server.conf
|
dest=/etc/apache2/sites-enabled/xs-activity-server.conf
|
||||||
state=link
|
state=link
|
||||||
when: activity_server_enabled and is_debian
|
when: activity_server_enabled and is_debuntu
|
||||||
|
|
||||||
- name: delete the link which enables the site
|
- name: delete the link which enables the site
|
||||||
file: src=/etc/apache2/sites-available/xs-activity-server.conf
|
file: src=/etc/apache2/sites-available/xs-activity-server.conf
|
||||||
dest=/etc/apache2/sites-enabled/xs-activity-server.conf
|
dest=/etc/apache2/sites-enabled/xs-activity-server.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not activity_server_enabled and is_debian
|
when: not activity_server_enabled and is_debuntu
|
||||||
|
|
||||||
|
|
||||||
- name: Copy xs-activity-server usbmount file
|
- name: Copy xs-activity-server usbmount file
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
with_items:
|
with_items:
|
||||||
- libapache2-mod-authnz-external
|
- libapache2-mod-authnz-external
|
||||||
- apache2-utils
|
- apache2-utils
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: enable cgi execution
|
- name: enable cgi execution
|
||||||
command: a2enmod cgi
|
command: a2enmod cgi
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Create directory for awstat to use as intermediate summary storage
|
- name: Create directory for awstat to use as intermediate summary storage
|
||||||
file: path={{ item }}
|
file: path={{ item }}
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0644
|
mode=0644
|
||||||
when: awstats_enabled and is_debian
|
when: awstats_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Install the Apache config for Advanced Web Statistics
|
- name: Install the Apache config for Advanced Web Statistics
|
||||||
template: src=apache-awstats.conf
|
template: src=apache-awstats.conf
|
||||||
|
@ -47,12 +47,12 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0644
|
mode=0644
|
||||||
when: awstats_enabled and not is_debian
|
when: awstats_enabled and not is_debuntu
|
||||||
|
|
||||||
- name: make sure logrotate does not make logs unreadable
|
- name: make sure logrotate does not make logs unreadable
|
||||||
template: src=logrotate.d.apache2
|
template: src=logrotate.d.apache2
|
||||||
dest=/etc/logrotate.d/apache2
|
dest=/etc/logrotate.d/apache2
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: See if awstats package installed a config file
|
- name: See if awstats package installed a config file
|
||||||
stat: path=/etc/awstats/awstats.conf
|
stat: path=/etc/awstats/awstats.conf
|
||||||
|
@ -68,12 +68,12 @@
|
||||||
file: src=/etc/apache2/sites-available/awstats.conf
|
file: src=/etc/apache2/sites-available/awstats.conf
|
||||||
path=/etc/apache2/sites-enabled/awstats.conf
|
path=/etc/apache2/sites-enabled/awstats.conf
|
||||||
state=link
|
state=link
|
||||||
when: awstats_enabled and is_debian
|
when: awstats_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Disable Awstats
|
- name: Disable Awstats
|
||||||
file: path=/etc/apache2/sites-enabled/awstats.conf
|
file: path=/etc/apache2/sites-enabled/awstats.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not awstats_enabled and is_debian
|
when: not awstats_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Install the awstats config for Advanced Web Statistics
|
- name: Install the awstats config for Advanced Web Statistics
|
||||||
template: src=awstats.schoolserver.conf.j2
|
template: src=awstats.schoolserver.conf.j2
|
||||||
|
@ -91,9 +91,9 @@
|
||||||
|
|
||||||
- name: On first enabling of awstats, summarize httpd logs up to now
|
- name: On first enabling of awstats, summarize httpd logs up to now
|
||||||
shell: /bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=schoolserver -update
|
shell: /bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=schoolserver -update
|
||||||
when: awstats_enabled and not is_debian
|
when: awstats_enabled and not is_debuntu
|
||||||
|
|
||||||
- name: On first enabling of awstats, summarize httpd logs up to now
|
- name: On first enabling of awstats, summarize httpd logs up to now
|
||||||
shell: /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -config=schoolserver -update
|
shell: /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -config=schoolserver -update
|
||||||
when: awstats_enabled and is_debian
|
when: awstats_enabled and is_debuntu
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
# Example: "/pathtotools/logresolvemerge.pl *.log |"
|
# Example: "/pathtotools/logresolvemerge.pl *.log |"
|
||||||
#
|
#
|
||||||
|
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/{{ apache_service }}/access.log* |"
|
LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/{{ apache_service }}/access.log* |"
|
||||||
{% else %}
|
{% else %}
|
||||||
LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/httpd/access_log* |"
|
LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/httpd/access_log* |"
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
file: src=/etc/apache2/sites-available/calibre.conf
|
file: src=/etc/apache2/sites-available/calibre.conf
|
||||||
dest=/etc/apache2/sites-enabled/calibre.conf
|
dest=/etc/apache2/sites-enabled/calibre.conf
|
||||||
state=link
|
state=link
|
||||||
when: is_debian and calibre_enabled
|
when: is_debuntu and calibre_enabled
|
||||||
|
|
||||||
- name: Enable Calibre server
|
- name: Enable Calibre server
|
||||||
service: name=calibre-serve
|
service: name=calibre-serve
|
||||||
|
|
|
@ -5,7 +5,7 @@ After=syslog.target network.target local-fs.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/var/run/calibre.pid
|
PIDFile=/var/run/calibre.pid
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
ExecStart=/usr/bin/calibre-server --daemonize --pidfile=/var/run/calibre.pid --port={{ calibre_port }} --with-library={{ calibre_dbpath }}
|
ExecStart=/usr/bin/calibre-server --daemonize --pidfile=/var/run/calibre.pid --port={{ calibre_port }} --with-library={{ calibre_dbpath }}
|
||||||
{% else %}
|
{% else %}
|
||||||
ExecStart=/bin/calibre-server --daemonize --pidfile=/var/run/calibre.pid --port={{ calibre_port }} --with-library={{ calibre_dbpath }}
|
ExecStart=/bin/calibre-server --daemonize --pidfile=/var/run/calibre.pid --port={{ calibre_port }} --with-library={{ calibre_dbpath }}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
file: src=/etc/apache2/sites-available/cups.conf
|
file: src=/etc/apache2/sites-available/cups.conf
|
||||||
dest=/etc/apache2/sites-enabled/cups.conf
|
dest=/etc/apache2/sites-enabled/cups.conf
|
||||||
state=link
|
state=link
|
||||||
when: cups_enabled and is_debian
|
when: cups_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Enable services for cups
|
- name: Enable services for cups
|
||||||
service: name={{ item }}
|
service: name={{ item }}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
- redis-server
|
- redis-server
|
||||||
- libjpeg-dev
|
- libjpeg-dev
|
||||||
- xvfb
|
- xvfb
|
||||||
when: debian_schooltool_install and is_debian
|
when: debian_schooltool_install and is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
file: path=/etc/apache2/sites-enabled/dokuwiki.conf
|
file: path=/etc/apache2/sites-enabled/dokuwiki.conf
|
||||||
src=/etc/apache2/sites-available/dokuwiki.conf
|
src=/etc/apache2/sites-available/dokuwiki.conf
|
||||||
state=link
|
state=link
|
||||||
when: dokuwiki_enabled and is_debian
|
when: dokuwiki_enabled and is_debuntu
|
||||||
|
|
||||||
- name: disable the dokuwiki
|
- name: disable the dokuwiki
|
||||||
file: path=/etc/apache2/sites-enabled/dokuwiki.conf
|
file: path=/etc/apache2/sites-enabled/dokuwiki.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not dokuwiki_enabled and is_debian
|
when: not dokuwiki_enabled and is_debuntu
|
||||||
|
|
||||||
|
|
||||||
- name: Change permissions on engine directory so apache can write
|
- name: Change permissions on engine directory so apache can write
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
- ejabberd-2.1.11
|
- ejabberd-2.1.11
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Install ejabberd packages
|
- name: Install ejabberd packages
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
- ejabberd
|
- ejabberd
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Configure ejabberd
|
- name: Configure ejabberd
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
|
@ -38,12 +38,12 @@
|
||||||
- name: Put the startup script in place - debian
|
- name: Put the startup script in place - debian
|
||||||
template: src='ejabberd-xs.init'
|
template: src='ejabberd-xs.init'
|
||||||
dest='/etc/init.d/ejabberd-xs'
|
dest='/etc/init.d/ejabberd-xs'
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Put the startup script in place - non debian
|
- name: Put the startup script in place - non debian
|
||||||
template: src='ejabberd-xs.init'
|
template: src='ejabberd-xs.init'
|
||||||
dest='/usr/libexec/ejabberd-xs'
|
dest='/usr/libexec/ejabberd-xs'
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Remove ejabberd_domain if domain changes
|
- name: Remove ejabberd_domain if domain changes
|
||||||
file: path=/etc/sysconfig/ejabberd_domain_name
|
file: path=/etc/sysconfig/ejabberd_domain_name
|
||||||
|
|
|
@ -92,12 +92,12 @@
|
||||||
file: path=/etc/apache2/sites-enabled/elgg.conf
|
file: path=/etc/apache2/sites-enabled/elgg.conf
|
||||||
src=/etc/apache2/sites-available/elgg.conf
|
src=/etc/apache2/sites-available/elgg.conf
|
||||||
state=link
|
state=link
|
||||||
when: elgg_enabled and is_debian
|
when: elgg_enabled and is_debuntu
|
||||||
|
|
||||||
- name: disable elgg
|
- name: disable elgg
|
||||||
file: path=/etc/apache2/sites-enabled/elgg.conf
|
file: path=/etc/apache2/sites-enabled/elgg.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not elgg_enabled and is_debian
|
when: not elgg_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Change permissions on engine directory so apache can write
|
- name: Change permissions on engine directory so apache can write
|
||||||
file: path=/opt/elgg/engine/ owner={{ apache_data }} mode=0755 state=directory
|
file: path=/opt/elgg/engine/ owner={{ apache_data }} mode=0755 state=directory
|
||||||
|
|
|
@ -10,6 +10,16 @@
|
||||||
- download
|
- download
|
||||||
when: is_debian
|
when: is_debian
|
||||||
|
|
||||||
|
- name: Install httpd required packages
|
||||||
|
package: name={{ item }}
|
||||||
|
state=present
|
||||||
|
with_items:
|
||||||
|
- apache2
|
||||||
|
- php
|
||||||
|
tags:
|
||||||
|
- download
|
||||||
|
when: is_ubuntu
|
||||||
|
+
|
||||||
- name: Install httpd required packages
|
- name: Install httpd required packages
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
|
@ -20,13 +30,13 @@
|
||||||
# - php-sqlite
|
# - php-sqlite
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: not is_debian
|
when: is_redhat
|
||||||
|
|
||||||
- name: remove the default apache2 config file
|
- name: remove the default apache2 config file
|
||||||
file: path=/etc/apache2/sites-enabled/000-default.conf
|
file: path=/etc/apache2/sites-enabled/000-default.conf
|
||||||
src=/etc/apache2/sites-available/000-default.conf
|
src=/etc/apache2/sites-available/000-default.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: is_debian
|
+ when: is_debuntu
|
||||||
|
|
||||||
- name: Create httpd config files
|
- name: Create httpd config files
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
|
@ -47,7 +57,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- mpm_event.conf
|
- mpm_event.conf
|
||||||
- mpm_event.load
|
- mpm_event.load
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: create symlinks for mpm-prefork
|
- name: create symlinks for mpm-prefork
|
||||||
file: path=/etc/apache2/mods-enabled/{{ item }}
|
file: path=/etc/apache2/mods-enabled/{{ item }}
|
||||||
|
@ -56,7 +66,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- mpm_prefork.conf
|
- mpm_prefork.conf
|
||||||
- mpm_prefork.load
|
- mpm_prefork.load
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: turn on mod_proxy
|
- name: turn on mod_proxy
|
||||||
command: a2enmod {{ item }}
|
command: a2enmod {{ item }}
|
||||||
|
@ -65,7 +75,7 @@
|
||||||
- proxy_html
|
- proxy_html
|
||||||
- headers
|
- headers
|
||||||
- rewrite
|
- rewrite
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: create symlinks for enabling our site
|
- name: create symlinks for enabling our site
|
||||||
file: path=/etc/apache2/sites-enabled/{{ item }}
|
file: path=/etc/apache2/sites-enabled/{{ item }}
|
||||||
|
@ -73,12 +83,12 @@
|
||||||
state=link
|
state=link
|
||||||
with_items:
|
with_items:
|
||||||
- 010-xsce.conf
|
- 010-xsce.conf
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Remove the default site container
|
- name: Remove the default site container
|
||||||
file: dest=/etc/apache2/000-default.conf
|
file: dest=/etc/apache2/000-default.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Create http pid dir
|
- name: Create http pid dir
|
||||||
file: path=/var/run/{{ apache_user }}
|
file: path=/var/run/{{ apache_user }}
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
- liblzma-dev
|
- liblzma-dev
|
||||||
- libapache2-mod-wsgi
|
- libapache2-mod-wsgi
|
||||||
- libapache2-mod-xsendfile
|
- libapache2-mod-xsendfile
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: fix the pip bug (incompatible with requests)
|
- name: fix the pip bug (incompatible with requests)
|
||||||
command: easy_install --upgrade pip
|
command: easy_install --upgrade pip
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Install IIAB required packages
|
- name: Install IIAB required packages
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
- xz-devel
|
- xz-devel
|
||||||
- mod_wsgi
|
- mod_wsgi
|
||||||
- mod_xsendfile
|
- mod_xsendfile
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -115,12 +115,12 @@
|
||||||
file: src=/etc/apache2/sites-available/iiab.conf
|
file: src=/etc/apache2/sites-available/iiab.conf
|
||||||
dest=/etc/apache2/sites-enabled/iiab.conf
|
dest=/etc/apache2/sites-enabled/iiab.conf
|
||||||
state=link
|
state=link
|
||||||
when: iiab_enabled and is_debian
|
when: iiab_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Remove the link from sites-enabled to sites-available
|
- name: Remove the link from sites-enabled to sites-available
|
||||||
file: dest=/etc/apache2/sites-enabled/iiab.conf
|
file: dest=/etc/apache2/sites-enabled/iiab.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not iiab_enabled and is_debian
|
when: not iiab_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Create link to cgi
|
- name: Create link to cgi
|
||||||
file: src=/bin/iiab.wsgi
|
file: src=/bin/iiab.wsgi
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
state=link
|
state=link
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Create link to cgi
|
- name: Create link to cgi
|
||||||
file: src=/usr/local/bin/iiab.wsgi
|
file: src=/usr/local/bin/iiab.wsgi
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
state=link
|
state=link
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Restart httpd service
|
- name: Restart httpd service
|
||||||
service: name={{ apache_service }}
|
service: name={{ apache_service }}
|
||||||
|
@ -147,12 +147,12 @@
|
||||||
state=directory
|
state=directory
|
||||||
owner={{ apache_user }}
|
owner={{ apache_user }}
|
||||||
group={{ apache_user }}
|
group={{ apache_user }}
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: copy the default.ini with our location of /library/knowledge
|
- name: copy the default.ini with our location of /library/knowledge
|
||||||
template: src=defaults.ini
|
template: src=defaults.ini
|
||||||
dest=/usr/local/lib/python2.7/dist-packages/iiab/defaults.ini
|
dest=/usr/local/lib/python2.7/dist-packages/iiab/defaults.ini
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: add iiab to service list
|
- name: add iiab to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -5,7 +5,7 @@ XSendFilePath /
|
||||||
|
|
||||||
WSGIScriptAlias /iiab {{ doc_root }}/iiab.wsgi
|
WSGIScriptAlias /iiab {{ doc_root }}/iiab.wsgi
|
||||||
|
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
Alias /iiabstatic /usr/local/lib/python2.7/dist-packages/iiab/static
|
Alias /iiabstatic /usr/local/lib/python2.7/dist-packages/iiab/static
|
||||||
|
|
||||||
<Directory /usr/local/lib/python2.7/dist-packages/iiab/static>
|
<Directory /usr/local/lib/python2.7/dist-packages/iiab/static>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
- proxy
|
- proxy
|
||||||
- proxy_html
|
- proxy_html
|
||||||
- rewrite
|
- rewrite
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Unarchive it to permanent location - bin only
|
- name: Unarchive it to permanent location - bin only
|
||||||
unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#TODO: create systemd script
|
#TODO: create systemd script
|
||||||
- name: Enable monit service
|
- name: Enable monit service
|
||||||
command: chkconfig monit on
|
command: chkconfig monit on
|
||||||
|
when: is_debian
|
||||||
|
|
||||||
#- name: Restart monit service
|
#- name: Restart monit service
|
||||||
# command: service monit restart
|
# command: service monit restart
|
||||||
|
|
|
@ -4,7 +4,7 @@ After={{ apache_service }}.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
ExecStart=/etc/init.d/moodle-xs-init start
|
ExecStart=/etc/init.d/moodle-xs-init start
|
||||||
{% else $}
|
{% else $}
|
||||||
ExecStart=/usr/libexec/moodle-xs-init start
|
ExecStart=/usr/libexec/moodle-xs-init start
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- python-psycopg2
|
- python-psycopg2
|
||||||
- php-pgsql
|
- php-pgsql
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
with_items:
|
||||||
- python-psycopg2
|
- python-psycopg2
|
||||||
- php5-pgsql
|
- php{{ php_version }}-pgsql
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -72,12 +72,12 @@
|
||||||
file: path=/etc/apache2/sites-enabled/022-moodle.conf
|
file: path=/etc/apache2/sites-enabled/022-moodle.conf
|
||||||
src=/etc/apache2/sites-available/022-moodle.conf
|
src=/etc/apache2/sites-available/022-moodle.conf
|
||||||
state=link
|
state=link
|
||||||
when: moodle_enabled and is_debian
|
when: moodle_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Disable moodle
|
- name: Disable moodle
|
||||||
file: path=/etc/apache2/sites-enabled/022-moodle.conf
|
file: path=/etc/apache2/sites-enabled/022-moodle.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not moodle_enabled and is_debian
|
when: not moodle_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Start postgresql-xs
|
- name: Start postgresql-xs
|
||||||
service: name=postgresql-xs
|
service: name=postgresql-xs
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
- libapache2-mod-fcgid
|
- libapache2-mod-fcgid
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Install munin package
|
- name: Install munin package
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
- munin-node
|
- munin-node
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Copy munin config file
|
- name: Copy munin config file
|
||||||
template: src={{ item.src }}
|
template: src={{ item.src }}
|
||||||
|
@ -48,13 +48,13 @@
|
||||||
file: src=/etc/apache2/sites-available/munin24.conf
|
file: src=/etc/apache2/sites-available/munin24.conf
|
||||||
dest=/etc/apache2/sites-enabled/munin24.conf
|
dest=/etc/apache2/sites-enabled/munin24.conf
|
||||||
state=link
|
state=link
|
||||||
when: munin_enabled and is_debian
|
when: munin_enabled and is_debuntu
|
||||||
|
|
||||||
- name: disable apache lookup
|
- name: disable apache lookup
|
||||||
file: src=/etc/apache2/sites-available/munin24.conf
|
file: src=/etc/apache2/sites-available/munin24.conf
|
||||||
dest=/etc/apache2/sites-enabled/munin24.conf
|
dest=/etc/apache2/sites-enabled/munin24.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not munin_enabled and is_debian
|
when: not munin_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Disable munin-node service when it becomes disabled
|
- name: Disable munin-node service when it becomes disabled
|
||||||
service: name=munin-node
|
service: name=munin-node
|
||||||
|
|
|
@ -5,16 +5,16 @@
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
- mariadb-client
|
- mariadb-client
|
||||||
- python-mysqldb
|
- python-mysqldb
|
||||||
- php5
|
- php{{ php_version }}
|
||||||
- php5-mysql
|
- php{{ php_version }}-mysql
|
||||||
- php-pear
|
- php-pear
|
||||||
- php5-gd
|
- php{{ php_version }}-gd
|
||||||
- php5-imap
|
- php{{ php_version }}-imap
|
||||||
- php5-ldap
|
- php{{ php_version }}-ldap
|
||||||
- php5-odbc
|
- php{{ php_version }}-odbc
|
||||||
- php-xml-parser
|
- php-xml-parser
|
||||||
- php5-xmlrpc
|
- php{{ php_version }}-xmlrpc
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
- php-odbc
|
- php-odbc
|
||||||
- php-xml
|
- php-xml
|
||||||
- php-xmlrpc
|
- php-xmlrpc
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
- libnss-mdns
|
- libnss-mdns
|
||||||
- avahi-daemon
|
- avahi-daemon
|
||||||
- avahi-discover
|
- avahi-discover
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
- nss-mdns
|
- nss-mdns
|
||||||
- avahi
|
- avahi
|
||||||
- avahi-tools
|
- avahi-tools
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
user: name=avahi
|
user: name=avahi
|
||||||
createhome=no
|
createhome=no
|
||||||
shell=/bin/false
|
shell=/bin/false
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Install avahi announce config files
|
- name: Install avahi announce config files
|
||||||
template: src=avahi/schoolserver.service
|
template: src=avahi/schoolserver.service
|
||||||
|
@ -43,12 +43,12 @@
|
||||||
- name: Grab a clean copy of ssh.service
|
- name: Grab a clean copy of ssh.service
|
||||||
copy: src='/usr/share/doc/{{ avahi_ver.stdout }}/ssh.service'
|
copy: src='/usr/share/doc/{{ avahi_ver.stdout }}/ssh.service'
|
||||||
dest='/etc/avahi/services/'
|
dest='/etc/avahi/services/'
|
||||||
when: avahi_ver.stdout != "" and not is_debian
|
when: avahi_ver.stdout != "" and not is_debuntu
|
||||||
|
|
||||||
- name: Grab a clean copy of ssh.service
|
- name: Grab a clean copy of ssh.service
|
||||||
copy: src='/usr/share/doc/avahi-daemon/examples/ssh.service'
|
copy: src='/usr/share/doc/avahi-daemon/examples/ssh.service'
|
||||||
dest='/etc/avahi/services/'
|
dest='/etc/avahi/services/'
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: set ssh port for avahi
|
- name: set ssh port for avahi
|
||||||
lineinfile: dest=/etc/avahi/services/ssh.service
|
lineinfile: dest=/etc/avahi/services/ssh.service
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
owner=dansguardian
|
owner=dansguardian
|
||||||
group=dansguardian
|
group=dansguardian
|
||||||
mode=0640
|
mode=0640
|
||||||
when: ansible_distribution == "Debian"
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Copy dansguardian config file for CentOS
|
- name: Copy dansguardian config file for CentOS
|
||||||
template: src=squid/dansguardian.conf.centos.j2
|
template: src=squid/dansguardian.conf.centos.j2
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
- name: Install dhcp package
|
- name: Install dhcp package
|
||||||
package: name=isc-dhcp-server
|
package: name=isc-dhcp-server
|
||||||
state=present
|
state=present
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Install dhcp package
|
- name: Install dhcp package
|
||||||
package: name=dhcp
|
package: name=dhcp
|
||||||
state=present
|
state=present
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
- name: Create dhcpd needed files
|
- name: Create dhcpd needed files
|
||||||
command: touch /var/lib/dhcpd/dhcpd.leases
|
command: touch /var/lib/dhcpd/dhcpd.leases
|
||||||
creates=/var/lib/dhcpd/dhcpd.leases
|
creates=/var/lib/dhcpd/dhcpd.leases
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
||||||
- name: Check leases permissions
|
- name: Check leases permissions
|
||||||
file: path=/var/lib/dhcpd/dhcpd.leases
|
file: path=/var/lib/dhcpd/dhcpd.leases
|
||||||
|
@ -37,4 +37,4 @@
|
||||||
group=dhcpd
|
group=dhcpd
|
||||||
mode=0644
|
mode=0644
|
||||||
state=file
|
state=file
|
||||||
when: ansible_distribution != "Debian"
|
when: is_redhat
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
lineinfile: regexp='^CONFIG'
|
lineinfile: regexp='^CONFIG'
|
||||||
line='CONFIG=/etc/{{ proxy }}/squid-xs.conf'
|
line='CONFIG=/etc/{{ proxy }}/squid-xs.conf'
|
||||||
dest=/etc/init.d/{{ proxy }}
|
dest=/etc/init.d/{{ proxy }}
|
||||||
when: squid_enabled and is_debian
|
when: squid_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Disable squid service
|
- name: Disable squid service
|
||||||
service: name={{ proxy }}
|
service: name={{ proxy }}
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
- name: Restart hostapd if slave is inactive
|
- name: Restart hostapd if slave is inactive
|
||||||
service: name=hostapd.service
|
service: name=hostapd.service
|
||||||
state=restarted
|
state=restarted
|
||||||
when: is_debian and xsce_lan_iface == "br0" and item|trim == ""
|
when: is_debuntu and xsce_lan_iface == "br0" and item|trim == ""
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ wifi_slave.stdout }}"
|
- "{{ wifi_slave.stdout }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
- name: Disable firewalld service
|
- name: Disable firewalld service
|
||||||
service: name=firewalld
|
service: name=firewalld
|
||||||
enabled=no
|
enabled=no
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Use larger hammer to disable firewalld (2 symbolic links involved)
|
- name: Use larger hammer to disable firewalld (2 symbolic links involved)
|
||||||
shell: "systemctl disable firewalld.service"
|
shell: "systemctl disable firewalld.service"
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Mask firewalld service
|
- name: Mask firewalld service
|
||||||
shell: 'systemctl mask firewalld'
|
shell: 'systemctl mask firewalld'
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: not installing and not is_debian
|
when: not installing and not is_debuntu
|
||||||
|
|
||||||
- name: Stop firewalld service
|
- name: Stop firewalld service
|
||||||
service: name=firewalld
|
service: name=firewalld
|
||||||
state=stopped
|
state=stopped
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: not installing and not is_debian
|
when: not installing and not is_debuntu
|
||||||
|
|
||||||
- name: Remove iptables.service file from /etc
|
- name: Remove iptables.service file from /etc
|
||||||
file: path=/etc/systemd/system/iptables.service
|
file: path=/etc/systemd/system/iptables.service
|
||||||
|
@ -29,14 +29,14 @@
|
||||||
- name: Install iptables service package
|
- name: Install iptables service package
|
||||||
package: name=iptables-persistent
|
package: name=iptables-persistent
|
||||||
state=present
|
state=present
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Install iptables service package
|
- name: Install iptables service package
|
||||||
package: name=iptables-services
|
package: name=iptables-services
|
||||||
state=present
|
state=present
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -53,4 +53,4 @@
|
||||||
- name: Install debian config
|
- name: Install debian config
|
||||||
template: src=gateway/iptables dest=/etc/network/if-pre-up.d/iptables
|
template: src=gateway/iptables dest=/etc/network/if-pre-up.d/iptables
|
||||||
mode=0755
|
mode=0755
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
|
@ -93,17 +93,17 @@
|
||||||
- include: ifcfg_mods.yml
|
- include: ifcfg_mods.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
when: ansible_distribution != 'Debian' and not installing
|
when: is_redhat and not installing
|
||||||
|
|
||||||
- include: debian.yml
|
- include: debian.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
when: is_debian and not is_rpi and not installing
|
when: is_debuntu and not is_rpi and not installing
|
||||||
|
|
||||||
- include: rpi_debian.yml
|
- include: rpi_debian.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
when: is_debian and is_rpi and not installing
|
when: is_debuntu and is_rpi and not installing
|
||||||
|
|
||||||
- name: Create xs network flags
|
- name: Create xs network flags
|
||||||
template: src=network/{{ item }}.j2
|
template: src=network/{{ item }}.j2
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- bind9
|
- bind9
|
||||||
- bind9utils
|
- bind9utils
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- bind
|
- bind
|
||||||
- bind-utils
|
- bind-utils
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -78,15 +78,15 @@
|
||||||
file: src=/etc/{{ apache_config_dir }}/dns-jail.conf
|
file: src=/etc/{{ apache_config_dir }}/dns-jail.conf
|
||||||
path=/etc/{{ apache_service }}/sites-enabled/dns-jail.conf
|
path=/etc/{{ apache_service }}/sites-enabled/dns-jail.conf
|
||||||
state=link
|
state=link
|
||||||
when: is_debian and dns_jail_enabled
|
when: is_debuntu and dns_jail_enabled
|
||||||
|
|
||||||
- name: Separate enabling/disabling required for debian
|
- name: Separate enabling/disabling required for debian
|
||||||
file: src=/etc/{{ apache_config_dir }}/dns-jail.conf
|
file: src=/etc/{{ apache_config_dir }}/dns-jail.conf
|
||||||
path=/etc/{{ apache_service }}/sites-enabled/dns-jail.conf
|
path=/etc/{{ apache_service }}/sites-enabled/dns-jail.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: is_debian and not dns_jail_enabled
|
when: is_debuntu and not dns_jail_enabled
|
||||||
|
|
||||||
- name: Separate enabling/disabling required for non debian
|
- name: Separate enabling/disabling required for non debian
|
||||||
file: path=/etc/{{ apache_config_dir }}/dns-jail.conf
|
file: path=/etc/{{ apache_config_dir }}/dns-jail.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not is_debian and not dns_jail_enabled
|
when: not is_debuntu and not dns_jail_enabled
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
- name: add a reference to name server in resolv.conf
|
- name: add a reference to name server in resolv.conf
|
||||||
lineinfile: line="nameserver 127.0.0.1"
|
lineinfile: line="nameserver 127.0.0.1"
|
||||||
dest=/etc/resolvconf/resolv.conf.d/head
|
dest=/etc/resolvconf/resolv.conf.d/head
|
||||||
when: named_enabled and is_debian and dns_started.changed
|
when: named_enabled and is_debuntu and dns_started.changed
|
||||||
|
|
||||||
- name: Stop dansguardian
|
- name: Stop dansguardian
|
||||||
service: name=dansguardian
|
service: name=dansguardian
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
IPTABLES=/sbin/iptables
|
IPTABLES=/sbin/iptables
|
||||||
IPTABLES_DATA=/etc/iptables.up.rules
|
IPTABLES_DATA=/etc/iptables.up.rules
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -35,7 +35,7 @@ $IPTABLES -A INPUT -p udp --dport 5984 -j DROP
|
||||||
if [ "x$WANIF" == "x" ]; then
|
if [ "x$WANIF" == "x" ]; then
|
||||||
clear_fw
|
clear_fw
|
||||||
# save the rule set
|
# save the rule set
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
netfilter-persistent save
|
netfilter-persistent save
|
||||||
{% else %}
|
{% else %}
|
||||||
iptables-save > $IPTABLES_DATA
|
iptables-save > $IPTABLES_DATA
|
||||||
|
@ -118,7 +118,7 @@ fi
|
||||||
# Enable routing.
|
# Enable routing.
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
# save the whole rule set now
|
# save the whole rule set now
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
netfilter-persistent save
|
netfilter-persistent save
|
||||||
{% else %}
|
{% else %}
|
||||||
iptables-save > $IPTABLES_DATA
|
iptables-save > $IPTABLES_DATA
|
||||||
|
|
|
@ -49,11 +49,11 @@
|
||||||
|
|
||||||
- name: put up_wan in place for debian
|
- name: put up_wan in place for debian
|
||||||
template: src=up_wan dest=/usr/lib/xsce/up_wan
|
template: src=up_wan dest=/usr/lib/xsce/up_wan
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: put dispatcher up for NM
|
- name: put dispatcher up for NM
|
||||||
template: src=15-openvpn dest=/etc/NetworkManager/dispatcher.d/
|
template: src=15-openvpn dest=/etc/NetworkManager/dispatcher.d/
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: check for manually configured openvpn tunnel
|
- name: check for manually configured openvpn tunnel
|
||||||
stat: path=/etc/openvpn/xsce-vpn.conf
|
stat: path=/etc/openvpn/xsce-vpn.conf
|
||||||
|
@ -62,11 +62,11 @@
|
||||||
# note that ansible does not currently handle @ in a service name
|
# note that ansible does not currently handle @ in a service name
|
||||||
- name: enable the openvpn tunnel at boot time
|
- name: enable the openvpn tunnel at boot time
|
||||||
shell: systemctl enable openvpn@xscenet.service
|
shell: systemctl enable openvpn@xscenet.service
|
||||||
when: openvpn_enabled and not stat.exists is defined and is_debian
|
when: openvpn_enabled and not stat.exists is defined and is_debuntu
|
||||||
|
|
||||||
- name: enable the openvpn tunnel at boot time for Debian
|
- name: enable the openvpn tunnel at boot time for Debian
|
||||||
shell: update-rc.d openvpn enable
|
shell: update-rc.d openvpn enable
|
||||||
when: openvpn_enabled and not stat.exists is defined and is_debian
|
when: openvpn_enabled and not stat.exists is defined and is_debuntu
|
||||||
|
|
||||||
- name: start the openvpn tunnel now
|
- name: start the openvpn tunnel now
|
||||||
shell: systemctl start openvpn@xscenet.service
|
shell: systemctl start openvpn@xscenet.service
|
||||||
|
@ -88,11 +88,11 @@
|
||||||
|
|
||||||
- name: stop starting the openvpn tunnel at boot time
|
- name: stop starting the openvpn tunnel at boot time
|
||||||
shell: systemctl disable openvpn@xscenet.service
|
shell: systemctl disable openvpn@xscenet.service
|
||||||
when: not openvpn_enabled and not is_debian
|
when: not openvpn_enabled and not is_debuntu
|
||||||
|
|
||||||
- name: stop starting the openvpn tunnel at boot time for Debian
|
- name: stop starting the openvpn tunnel at boot time for Debian
|
||||||
shell: update-rc.d openvpn disable
|
shell: update-rc.d openvpn disable
|
||||||
when: not openvpn_enabled and is_debian
|
when: not openvpn_enabled and is_debuntu
|
||||||
|
|
||||||
- name: stop openvpn tunnel immediately
|
- name: stop openvpn tunnel immediately
|
||||||
shell: systemctl stop openvpn@xscenet.service
|
shell: systemctl stop openvpn@xscenet.service
|
||||||
|
|
|
@ -21,7 +21,7 @@ source /etc/init.d/functions
|
||||||
SERVER=/usr/bin/ncat
|
SERVER=/usr/bin/ncat
|
||||||
PID_FILE=/var/run/openvpn/announce.pid
|
PID_FILE=/var/run/openvpn/announce.pid
|
||||||
HANDLE=${HANDLE// /_}
|
HANDLE=${HANDLE// /_}
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
ID=`printf "HANDLE = %s|UUID = %s|" $HANDLE $UUID`
|
ID=`printf "HANDLE = %s|UUID = %s|" $HANDLE $UUID`
|
||||||
$SERVER -l -k -p1705 --exec "/bin/echo $ID" &
|
$SERVER -l -k -p1705 --exec "/bin/echo $ID" &
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
file: path=/etc/apache2/sites-enabled/owncloud.conf
|
file: path=/etc/apache2/sites-enabled/owncloud.conf
|
||||||
src=/etc/apache2/sites-available/owncloud.conf
|
src=/etc/apache2/sites-available/owncloud.conf
|
||||||
state=link
|
state=link
|
||||||
when: owncloud_enabled and is_debian
|
when: owncloud_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Disable owncloud
|
- name: Disable owncloud
|
||||||
file: path=/etc/apache2/sites-enabled/owncloud.conf
|
file: path=/etc/apache2/sites-enabled/owncloud.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not owncloud_enabled and is_debian
|
when: not owncloud_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Restart apache, so it picks up the new aliases
|
- name: Restart apache, so it picks up the new aliases
|
||||||
service: name={{ apache_service }} state=restarted
|
service: name={{ apache_service }} state=restarted
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
- libapache2-mod-wsgi
|
- libapache2-mod-wsgi
|
||||||
- libxml2-dev
|
- libxml2-dev
|
||||||
- libxslt-dev
|
- libxslt-dev
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
- mod_wsgi
|
- mod_wsgi
|
||||||
- libxml2-devel
|
- libxml2-devel
|
||||||
- libxslt-devel
|
- libxslt-devel
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -180,12 +180,12 @@
|
||||||
file: path=/etc/apache2/sites-enabled/pathagar.conf
|
file: path=/etc/apache2/sites-enabled/pathagar.conf
|
||||||
src=/etc/apache2/sites-available/pathagar.conf
|
src=/etc/apache2/sites-available/pathagar.conf
|
||||||
state=link
|
state=link
|
||||||
when: pathagar_enabled and is_debian
|
when: pathagar_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Disable pathagar
|
- name: Disable pathagar
|
||||||
file: path=/etc/apache2/sites-enabled/pathagar.conf
|
file: path=/etc/apache2/sites-enabled/pathagar.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not pathagar_enabled and is_debian
|
when: not pathagar_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Restart http
|
- name: Restart http
|
||||||
service: name={{ apache_service }}
|
service: name={{ apache_service }}
|
||||||
|
|
|
@ -24,12 +24,12 @@
|
||||||
file: path=/etc/apache2/sites-enabled/phpmyadmin.conf
|
file: path=/etc/apache2/sites-enabled/phpmyadmin.conf
|
||||||
src=/etc/apache2/sites-available/phpmyadmin.conf
|
src=/etc/apache2/sites-available/phpmyadmin.conf
|
||||||
state=link
|
state=link
|
||||||
when: phpmyadmin_enabled and is_debian
|
when: phpmyadmin_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Remove the alias into Apache config when not enabled
|
- name: Remove the alias into Apache config when not enabled
|
||||||
file: path=/etc/apache2/sites-enabled/phpmyadmin.conf
|
file: path=/etc/apache2/sites-enabled/phpmyadmin.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not phpmyadmin_enabled and is_debian
|
when: not phpmyadmin_enabled and is_debuntu
|
||||||
|
|
||||||
- name: add phpmyadmin to service list
|
- name: add phpmyadmin to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
|
|
||||||
- name: Install postgresql for debian
|
- name: Install postgresql for debian
|
||||||
package: name=postgresql-client
|
package: name=postgresql-client
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Install postgresql for fedora
|
- name: Install postgresql for fedora
|
||||||
package: name=postgresql-server
|
package: name=postgresql-server
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
@ -35,21 +35,26 @@
|
||||||
- name: make sure that the en_US locale is enabled
|
- name: make sure that the en_US locale is enabled
|
||||||
lineinfile: dest=/etc/locale.gen
|
lineinfile: dest=/etc/locale.gen
|
||||||
line="{{ postgresql_locale }} UTF-8"
|
line="{{ postgresql_locale }} UTF-8"
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: generate the selected locales
|
- name: generate the selected locales
|
||||||
command: /usr/sbin/locale-gen
|
command: /usr/sbin/locale-gen
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Initialize the postgres db
|
- name: Initialize the postgres db
|
||||||
command: su - postgres -c "/usr/lib/postgresql/9.4/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-xs"
|
command: su - postgres -c "/usr/lib/postgresql/9.4/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-xs"
|
||||||
creates=/library/pgsql-xs/pg_hba.conf
|
creates=/library/pgsql-xs/pg_hba.conf
|
||||||
when: is_debian
|
when: is_debian
|
||||||
|
|
||||||
|
- name: Initialize the postgres db
|
||||||
|
command: su - postgres -c "/usr/lib/postgresql/9.5/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-xs"
|
||||||
|
creates=/library/pgsql-xs/pg_hba.conf
|
||||||
|
when: is_ubuntu
|
||||||
|
|
||||||
- name: Initialize the postgres db
|
- name: Initialize the postgres db
|
||||||
command: su - postgres -c "/usr/bin/initdb -E 'UTF-8' --lc-collate={{ postgresql_locale }} --lc-ctype={{ postgresql_locale }} -D /library/pgsql-xs"
|
command: su - postgres -c "/usr/bin/initdb -E 'UTF-8' --lc-collate={{ postgresql_locale }} --lc-ctype={{ postgresql_locale }} -D /library/pgsql-xs"
|
||||||
creates=/library/pgsql-xs/pg_hba.conf
|
creates=/library/pgsql-xs/pg_hba.conf
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Configure postgres
|
- name: Configure postgres
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=PostgreSQL database server
|
Description=PostgreSQL database server
|
||||||
After=network.target
|
After=network.target
|
||||||
|
@ -27,9 +27,9 @@ Environment=PGSTARTTIMEOUT=270
|
||||||
|
|
||||||
Environment=PGDATA=/library/pgsql-xs
|
Environment=PGDATA=/library/pgsql-xs
|
||||||
|
|
||||||
ExecStart=/usr/lib/postgresql/9.4/bin/pg_ctl start -D ${PGDATA} -s -w -t ${PGSTARTTIMEOUT}
|
ExecStart=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl start -D ${PGDATA} -s -w -t ${PGSTARTTIMEOUT}
|
||||||
ExecStop=/usr/lib/postgresql/9.4/bin/pg_ctl stop -D ${PGDATA} -s -m fast
|
ExecStop=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl stop -D ${PGDATA} -s -m fast
|
||||||
ExecReload=/usr/lib/postgresql/9.4/bin/pg_ctl reload -D ${PGDATA} -s
|
ExecReload=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl reload -D ${PGDATA} -s
|
||||||
|
|
||||||
# Give a reasonable amount of time for the server to start up/shut down.
|
# Give a reasonable amount of time for the server to start up/shut down.
|
||||||
# Ideally, the timeout for starting PostgreSQL server should be handled more
|
# Ideally, the timeout for starting PostgreSQL server should be handled more
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
file: path=/etc/apache2/sites-enabled/rachel.conf
|
file: path=/etc/apache2/sites-enabled/rachel.conf
|
||||||
src=/etc/apache2/sites-available/rachel.conf
|
src=/etc/apache2/sites-available/rachel.conf
|
||||||
state=link
|
state=link
|
||||||
when: rachel_enabled and is_debian
|
when: rachel_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Remove RACHEL conf file if we are disabled
|
- name: Remove RACHEL conf file if we are disabled
|
||||||
file: path=/etc/apache2/sites-enabled/rachel.conf
|
file: path=/etc/apache2/sites-enabled/rachel.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not rachel_enabled and is_debian
|
when: not rachel_enabled and is_debuntu
|
||||||
|
|
||||||
# This probably doesn't work, but we can't get search to work either
|
# This probably doesn't work, but we can't get search to work either
|
||||||
- name: Create link to rachel mysql db from mysql data dir
|
- name: Create link to rachel mysql db from mysql data dir
|
||||||
|
|
|
@ -40,13 +40,13 @@
|
||||||
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
|
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
|
||||||
dest=/etc/apache2/sites-enabled/content_dir.conf
|
dest=/etc/apache2/sites-enabled/content_dir.conf
|
||||||
state=link
|
state=link
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: remove the link that enables in debian
|
- name: remove the link that enables in debian
|
||||||
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
|
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
|
||||||
dest=/etc/apache2/sites-enabled/content_dir.conf
|
dest=/etc/apache2/sites-enabled/content_dir.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: is_debian and not usb_lib_enabled
|
when: is_debuntu and not usb_lib_enabled
|
||||||
|
|
||||||
- name: remove apache config for content directory
|
- name: remove apache config for content directory
|
||||||
file: name=/etc/{{ apache_config_dir }}/content_dir.conf
|
file: name=/etc/{{ apache_config_dir }}/content_dir.conf
|
||||||
|
|
|
@ -15,7 +15,7 @@ CONTENT_LINK="{{ doc_root }}/local_content/$CONTENT_LINK_USB"
|
||||||
logger -p user.notice -t "70-usb-library" -- "Attempting to remove link $CONTENT_LINK."
|
logger -p user.notice -t "70-usb-library" -- "Attempting to remove link $CONTENT_LINK."
|
||||||
|
|
||||||
if [ -L $CONTENT_LINK ]; then
|
if [ -L $CONTENT_LINK ]; then
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
/bin/rm $CONTENT_LINK
|
/bin/rm $CONTENT_LINK
|
||||||
{% else %}
|
{% else %}
|
||||||
/usr/bin/rm $CONTENT_LINK
|
/usr/bin/rm $CONTENT_LINK
|
||||||
|
|
|
@ -74,13 +74,13 @@
|
||||||
file: path=/etc/apache2/sites-enabled/wordpress.conf
|
file: path=/etc/apache2/sites-enabled/wordpress.conf
|
||||||
src=/etc/apache2/sites-available/wordpress.conf
|
src=/etc/apache2/sites-available/wordpress.conf
|
||||||
state=link
|
state=link
|
||||||
when: wordpress_enabled and is_debian
|
when: wordpress_enabled and is_debuntu
|
||||||
|
|
||||||
|
|
||||||
- name: Remove httpd conf file if we are disabled
|
- name: Remove httpd conf file if we are disabled
|
||||||
file: path=/etc/apache2/sites-enabled/wordpress.conf
|
file: path=/etc/apache2/sites-enabled/wordpress.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not wordpress_enabled and is_debian
|
when: not wordpress_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Restart apache, so it picks up the new aliases
|
- name: Restart apache, so it picks up the new aliases
|
||||||
service: name={{ apache_service }} state=restarted
|
service: name={{ apache_service }} state=restarted
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
with_items:
|
||||||
- apache2
|
- apache2
|
||||||
- php5
|
- php{{ php_version }}
|
||||||
|
- php{{ php_version }}-mysql
|
||||||
- build-essential
|
- build-essential
|
||||||
- php5-dev
|
|
||||||
- php-pear
|
- php-pear
|
||||||
- python-dev
|
- python-dev
|
||||||
- python-pip
|
- python-pip
|
||||||
|
@ -14,8 +14,15 @@
|
||||||
- pkg-config
|
- pkg-config
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
|
- name: install ubuntu connector apache to php
|
||||||
|
package: libapache2-mod-php
|
||||||
|
state=present
|
||||||
|
tags:
|
||||||
|
- download
|
||||||
|
when: is_ubuntu
|
||||||
|
|
||||||
- name: Install packages for cmdsrv
|
- name: Install packages for cmdsrv
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
|
@ -35,7 +42,7 @@
|
||||||
- cracklib-python
|
- cracklib-python
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: check the config_vars.yml file
|
- name: check the config_vars.yml file
|
||||||
stat: path=/etc/xsce/config_vars.yml
|
stat: path=/etc/xsce/config_vars.yml
|
||||||
|
@ -155,7 +162,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0644
|
mode=0644
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Create cmdsrv.conf file
|
- name: Create cmdsrv.conf file
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
|
@ -164,7 +171,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0644
|
mode=0644
|
||||||
when: not is_debian
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Create a folder for xsce-cmdsrv executable not on path
|
- name: Create a folder for xsce-cmdsrv executable not on path
|
||||||
file: path=/usr/lib/xsce
|
file: path=/usr/lib/xsce
|
||||||
|
@ -193,6 +200,20 @@
|
||||||
- { src: 'cmdsrv/zmq.ini', dest: '/etc/php5/apache2/conf.d/20-zmq.ini', mode: '0755'}
|
- { src: 'cmdsrv/zmq.ini', dest: '/etc/php5/apache2/conf.d/20-zmq.ini', mode: '0755'}
|
||||||
when: is_debian
|
when: is_debian
|
||||||
|
|
||||||
|
- name: Create xsce-cmdsrv service
|
||||||
|
template: backup=yes
|
||||||
|
src={{ item.src }}
|
||||||
|
dest={{ item.dest }}
|
||||||
|
mode={{ item.mode }}
|
||||||
|
with_items:
|
||||||
|
- { src: 'cmdsrv/xsce-cmdsrv-init.j2', dest: '/etc/init.d/xsce-cmdsrv', mode: '0755'}
|
||||||
|
- { src: 'cmdsrv/zmq.ini', dest: '/etc/php/7.0/mods-available/20-zmq.ini', mode: '0755'}
|
||||||
|
when: is_ubuntu
|
||||||
|
|
||||||
|
- name: Enable the ubuntu php config file
|
||||||
|
command: phpenmod 20-zmq.ini
|
||||||
|
when: is_ubuntu
|
||||||
|
|
||||||
- name: Create xsce-cmdsrv service
|
- name: Create xsce-cmdsrv service
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
src={{ item.src }}
|
src={{ item.src }}
|
||||||
|
@ -201,7 +222,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'cmdsrv/xsce-cmdsrv-init.j2', dest: '/usr/libexec/xsce-cmdsrv', mode: '0755'}
|
- { src: 'cmdsrv/xsce-cmdsrv-init.j2', dest: '/usr/libexec/xsce-cmdsrv', mode: '0755'}
|
||||||
- { src: 'cmdsrv/zmq.ini', dest: '/etc/php.d/20-zmq.ini', mode: '0755'}
|
- { src: 'cmdsrv/zmq.ini', dest: '/etc/php.d/20-zmq.ini', mode: '0755'}
|
||||||
when: not is_debian
|
when: is_redhat
|
||||||
|
|
||||||
- name: Enable xsce-cmdsrv service
|
- name: Enable xsce-cmdsrv service
|
||||||
service: name=xsce-cmdsrv
|
service: name=xsce-cmdsrv
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
with_items:
|
with_items:
|
||||||
- libapache2-mod-authnz-external
|
- libapache2-mod-authnz-external
|
||||||
- pwauth
|
- pwauth
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Enable ssl
|
- name: Enable ssl
|
||||||
apache2_module: name=ssl
|
apache2_module: name=ssl
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Create admin-console directory tree
|
- name: Create admin-console directory tree
|
||||||
file: path={{ item }}
|
file: path={{ item }}
|
||||||
|
@ -84,33 +84,33 @@
|
||||||
- name: Remove the debian default config which gets in the way
|
- name: Remove the debian default config which gets in the way
|
||||||
file: dest=/etc/apache2/sites-enabled/000-default.conf
|
file: dest=/etc/apache2/sites-enabled/000-default.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
# without ssl
|
# without ssl
|
||||||
- name: Make the xs-console enabled in apache2
|
- name: Make the xs-console enabled in apache2
|
||||||
file: state=link
|
file: state=link
|
||||||
dest=/etc/apache2/sites-enabled/xs-console.conf
|
dest=/etc/apache2/sites-enabled/xs-console.conf
|
||||||
src=/etc/{{ apache_config_dir }}/xs-console.conf
|
src=/etc/{{ apache_config_dir }}/xs-console.conf
|
||||||
when: is_debian and not adm_cons_force_ssl
|
when: is_debuntu and not adm_cons_force_ssl
|
||||||
|
|
||||||
- name: Make the xs-console ssl version disabled in apache2
|
- name: Make the xs-console ssl version disabled in apache2
|
||||||
file: state=absent
|
file: state=absent
|
||||||
dest=/etc/apache2/sites-enabled/xs-console-ssl.conf
|
dest=/etc/apache2/sites-enabled/xs-console-ssl.conf
|
||||||
src=/etc/{{ apache_config_dir }}/xs-console-ssl.conf
|
src=/etc/{{ apache_config_dir }}/xs-console-ssl.conf
|
||||||
when: is_debian and not adm_cons_force_ssl
|
when: is_debuntu and not adm_cons_force_ssl
|
||||||
|
|
||||||
# with ssl
|
# with ssl
|
||||||
- name: add link for admin-console config file with ssl support
|
- name: add link for admin-console config file with ssl support
|
||||||
file: path=/etc/apache2/sites-enabled/xs-console-ssl.conf
|
file: path=/etc/apache2/sites-enabled/xs-console-ssl.conf
|
||||||
src=/etc/{{ apache_config_dir }}/xs-console-ssl.conf
|
src=/etc/{{ apache_config_dir }}/xs-console-ssl.conf
|
||||||
state=link
|
state=link
|
||||||
when: is_debian and adm_cons_force_ssl
|
when: is_debuntu and adm_cons_force_ssl
|
||||||
|
|
||||||
- name: remove link for admin-console config file with ssl support
|
- name: remove link for admin-console config file with ssl support
|
||||||
file: path=/etc/apache2/sites-enabled/xs-console.conf
|
file: path=/etc/apache2/sites-enabled/xs-console.conf
|
||||||
src=/etc/{{ apache_config_dir }}/xs-console.conf
|
src=/etc/{{ apache_config_dir }}/xs-console.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: adm_cons_force_ssl and is_debian
|
when: adm_cons_force_ssl and is_debuntu
|
||||||
|
|
||||||
- name: Install admin-console service
|
- name: Install admin-console service
|
||||||
template: src=console/cmd-service.php
|
template: src=console/cmd-service.php
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
file: src=/etc/{{ apache_config_dir }}/xsce-home-page.conf
|
file: src=/etc/{{ apache_config_dir }}/xsce-home-page.conf
|
||||||
dest=/etc/apache2/sites-enabled/xsce-home-page.conf
|
dest=/etc/apache2/sites-enabled/xsce-home-page.conf
|
||||||
state=link
|
state=link
|
||||||
when: is_debian
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Create the home directory
|
- name: Create the home directory
|
||||||
file: dest={{ doc_root }}/home
|
file: dest={{ doc_root }}/home
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
# Command Server on the XSCE School server
|
# Command Server on the XSCE School server
|
||||||
#
|
#
|
||||||
# Source function library
|
# Source function library
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
. /lib/lsb/init-functions
|
. /lib/lsb/init-functions
|
||||||
{% else %}
|
{% else %}
|
||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
|
@ -47,7 +47,7 @@ RETVAL=0
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
# Start daemons.
|
# Start daemons.
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
log_daemon_msg "Starting $prog: " "cmdsrv"
|
log_daemon_msg "Starting $prog: " "cmdsrv"
|
||||||
if start-stop-daemon --start --oknodo --quiet --exec $SERVER \
|
if start-stop-daemon --start --oknodo --quiet --exec $SERVER \
|
||||||
--pidfile $PID_FILE -- $OPTS; then
|
--pidfile $PID_FILE -- $OPTS; then
|
||||||
|
|
|
@ -5,7 +5,7 @@ After=syslog.target network.target local-fs.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/var/run/xsce-cmdsrv.pid
|
PIDFile=/var/run/xsce-cmdsrv.pid
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
ExecStart=/etc/init.d/xsce-cmdsrv start
|
ExecStart=/etc/init.d/xsce-cmdsrv start
|
||||||
{% else %}
|
{% else %}
|
||||||
ExecStart=/usr/libexec/xsce-cmdsrv start
|
ExecStart=/usr/libexec/xsce-cmdsrv start
|
||||||
|
|
|
@ -8,7 +8,7 @@ Alias /admin "{{ admin_console_path }}"
|
||||||
AddExternalAuth pwauth /usr/sbin/pwauth
|
AddExternalAuth pwauth /usr/sbin/pwauth
|
||||||
SetExternalAuthMethod pwauth pipe
|
SetExternalAuthMethod pwauth pipe
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||||
|
|
|
@ -8,7 +8,7 @@ Alias /admin "{{ admin_console_path }}"
|
||||||
require valid-user
|
require valid-user
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
{% if is_debian %}
|
{% if is_debuntu %}
|
||||||
<IfModule mod_authnz_external.c>
|
<IfModule mod_authnz_external.c>
|
||||||
AddExternalAuth pwauth /usr/sbin/pwauth
|
AddExternalAuth pwauth /usr/sbin/pwauth
|
||||||
SetExternalAuthMethod pwauth pipe
|
SetExternalAuthMethod pwauth pipe
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -x
|
||||||
|
|
||||||
# copy var files to /etc/xsce for subsequent use
|
# copy var files to /etc/xsce for subsequent use
|
||||||
mkdir -p /etc/xsce
|
mkdir -p /etc/xsce
|
||||||
|
@ -22,7 +22,7 @@ then
|
||||||
. /etc/xsce/xsce.env
|
. /etc/xsce/xsce.env
|
||||||
cd $XSCE_DIR
|
cd $XSCE_DIR
|
||||||
else
|
else
|
||||||
XSCE_DIR=/opt/schoolserver/xsce
|
XSCE_DIR=/opt/schoolserver/iiab
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f xsce.yml ]
|
if [ ! -f xsce.yml ]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
is_debian: false
|
is_debian: false
|
||||||
is_debuntu: false
|
is_debuntu: false
|
||||||
is_centos: false
|
is_centos: false
|
||||||
|
is_redhat: true
|
||||||
dns_service: named
|
dns_service: named
|
||||||
dns_user: named
|
dns_user: named
|
||||||
proxy: squid
|
proxy: squid
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
is_debian: false
|
is_debian: false
|
||||||
is_debuntu: false
|
is_debuntu: false
|
||||||
is_centos: false
|
is_centos: false
|
||||||
|
is_redhat: true
|
||||||
dns_service: named
|
dns_service: named
|
||||||
dns_user: named
|
dns_user: named
|
||||||
proxy: squid
|
proxy: squid
|
||||||
|
|
|
@ -11,7 +11,7 @@ doc_base: "{{ content_base }}/www"
|
||||||
doc_root: "{{ doc_base }}/html"
|
doc_root: "{{ doc_base }}/html"
|
||||||
|
|
||||||
xsce_base: /opt/schoolserver
|
xsce_base: /opt/schoolserver
|
||||||
xsce_dir: "{{ xsce_base }}/xsce"
|
xsce_dir: "{{ xsce_base }}/iiab"
|
||||||
pip_packages_dir: "{{ xsce_base }}/pip-packages"
|
pip_packages_dir: "{{ xsce_base }}/pip-packages"
|
||||||
yum_packages_dir: "{{ xsce_base }}/yum-packages"
|
yum_packages_dir: "{{ xsce_base }}/yum-packages"
|
||||||
downloads_dir: "{{ xsce_base }}/downloads"
|
downloads_dir: "{{ xsce_base }}/downloads"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue