mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Debian9 (#91)
* do a special download and install of usbmount * misspelled iiab_download_url * misspell downloads_dir * diable php-sqlite * php version issues * fixes transferred from recognize branch * local_fact moved * remove preload * remove preload * spell ansible * debian9 sqlite3 * package needs name * remove prepped * use apt ratheer than ansible package for npm * monit disable chkconfig * moodle needs php-zip and php-mbstring * debian9 -> debian-9 * returen to os_ver nomenclature for OS.yml
This commit is contained in:
parent
842e617e42
commit
29b0b50885
13 changed files with 70 additions and 55 deletions
|
@ -8,17 +8,6 @@
|
|||
- set_fact:
|
||||
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}'
|
||||
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
|
||||
iiab_base_ver: '{{ ansible_local["local_facts"]["iiab_base_ver"] }}'
|
||||
iiab_preload: '{{ ansible_local["local_facts"]["iiab_preload"] }}'
|
||||
|
||||
- name: Defaulting iiab_base_ver
|
||||
set_fact:
|
||||
iiab_base_ver: 0
|
||||
when: iiab_base_ver == ""
|
||||
|
||||
- name: Defaulting iiab_prepped
|
||||
set_fact:
|
||||
iiab_prepped: False
|
||||
|
||||
- name: Set exFAT enabled for XOs
|
||||
set_fact:
|
||||
|
@ -39,10 +28,6 @@
|
|||
value: '{{ ansible_date_time["iso8601"] }}'
|
||||
- option: 'runtime_php'
|
||||
value: '{{ phplib_dir }}'
|
||||
- option: 'runtime_preload'
|
||||
value: '{{ iiab_preload }}'
|
||||
- option: 'runtime_base_ver'
|
||||
value: '{{ iiab_base_ver }}'
|
||||
- option: 'kernel'
|
||||
value: '{{ ansible_kernel }}'
|
||||
- option: 'memory_mb'
|
||||
|
@ -114,6 +99,7 @@
|
|||
mysql_service: mysql
|
||||
when: is_debuntu
|
||||
|
||||
# PLATFORM variables
|
||||
- name: Fedora 20
|
||||
set_fact:
|
||||
is_F20: True
|
||||
|
|
|
@ -51,21 +51,10 @@
|
|||
mode=0750
|
||||
state=directory
|
||||
|
||||
- name: local facts script
|
||||
template: src=local_facts.fact.j2
|
||||
dest=/etc/ansible/facts.d/local_facts.fact
|
||||
owner=root
|
||||
group=root
|
||||
mode=0700
|
||||
|
||||
- name: re-read facts
|
||||
setup: filter=ansible_local
|
||||
|
||||
- name: Set XO model and preload
|
||||
- name: Set XO model
|
||||
set_fact:
|
||||
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
|
||||
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}'
|
||||
iiab_preload: '{{ ansible_local["local_facts"]["iiab_preload"] }}'
|
||||
|
||||
- name: Install script to fully initialize network config, and/or collect data
|
||||
# calling iiab-network-reset w/ snapshot name, stores info, but aborts reset
|
||||
|
|
|
@ -38,7 +38,15 @@
|
|||
- xml-common
|
||||
when: is_redhat
|
||||
|
||||
- name: Install yum packages for Debian
|
||||
- name: Download usbmount -- not in debian-9
|
||||
command: wget {{ iiab_download_url }}/usbmount_0.0.14.1_all.deb -P {{ downloads_dir }}
|
||||
when: is_debian and ansible_distribution_major_version == "9"
|
||||
|
||||
- name: Install usbmount for debian-9
|
||||
command: apt install -y {{ downloads_dir }}/usbmount_0.0.14.1_all.deb
|
||||
when: is_debian and ansible_distribution_major_version == "9"
|
||||
|
||||
- name: Install packages for Debian
|
||||
package: name={{ item }}
|
||||
state=present
|
||||
with_items:
|
||||
|
|
|
@ -3,13 +3,21 @@
|
|||
state=present
|
||||
with_items:
|
||||
- apache2
|
||||
- php5
|
||||
- php5-curl
|
||||
- php5-sqlite
|
||||
- php{{ php_version }}
|
||||
- php{{ php_version }}-curl
|
||||
# - php{{ php_version }}-sqlite
|
||||
tags:
|
||||
- download
|
||||
when: is_debian
|
||||
|
||||
- name: Debian changed sqlite name
|
||||
package: name=php{{ php_version }}-sqlite
|
||||
when: is_debian and ansible_distribution_major_version == "8"
|
||||
|
||||
- name: Debian changed sqlite name
|
||||
package: name=php{{ php_version }}-sqlite3
|
||||
when: ansible_local.local_facts.os_ver == "debian-9"
|
||||
|
||||
- name: Install httpd required packages
|
||||
package: name={{ item }}
|
||||
state=present
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
tags:
|
||||
- download
|
||||
|
||||
- name: Install chkconfig package
|
||||
- name: Install chkconfig package -- not in debian 9
|
||||
package: name=chkconfig
|
||||
state=present
|
||||
when: is_debian
|
||||
when: is_debian and ansible_distribution_major_version == "8"
|
||||
tags:
|
||||
- download
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
#TODO: create systemd script
|
||||
- name: Enable monit service
|
||||
command: chkconfig monit on
|
||||
when: is_debian
|
||||
when: is_debian and ansible_local.local_facts.os_ver == "debian-8"
|
||||
|
||||
#- name: Restart monit service
|
||||
# command: service monit restart
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
- python-psycopg2
|
||||
- php{{ php_version }}-pgsql
|
||||
- php{{ php_version }}-curl
|
||||
# - php-zip debian has php-pclzip
|
||||
- php{{ php_version }}-zip
|
||||
- php{{ php_version }}-gd
|
||||
# - php-mbstring --perhaps debian libapache2-mod-php
|
||||
- php{{ php_version }}-mbstring
|
||||
when: is_debuntu
|
||||
|
||||
- name: Determine if moodle is already downloaded
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- php{{ php_version }}-imap
|
||||
- php{{ php_version }}-ldap
|
||||
- php{{ php_version }}-odbc
|
||||
- php-xml-parser
|
||||
- php{{ php_version }}-xml
|
||||
- php{{ php_version }}-xmlrpc
|
||||
when: is_debuntu
|
||||
tags:
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
shell: nmcli con delete id iiab-LAN
|
||||
ignore_errors: True
|
||||
changed_when: False
|
||||
when: iiab_prepped and (num_lan_interfaces != "0" or iiab_wireless_lan_iface != "none")
|
||||
when: (num_lan_interfaces != "0" or iiab_wireless_lan_iface != "none")
|
||||
|
||||
## vars/ users should set user_wan_iface to avoid messy redetect
|
||||
- include: redetect.yml
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
- network
|
||||
- domain
|
||||
|
||||
- name: Domain name did not change setting iiab_prepped
|
||||
set_fact:
|
||||
iiab_prepped: True
|
||||
when: not domainname.changed and iiab_base_ver == gui_version
|
||||
|
||||
##### Start static ip address info for first run #####
|
||||
#- include: static.yml
|
||||
|
@ -49,31 +45,26 @@
|
|||
- network
|
||||
|
||||
- include: named.yml
|
||||
# when: not iiab_prepped
|
||||
tags:
|
||||
- named
|
||||
- network
|
||||
|
||||
- include: dhcpd.yml
|
||||
# when: not iiab_prepped
|
||||
tags:
|
||||
- dhcpd
|
||||
- network
|
||||
|
||||
- include: squid.yml
|
||||
# when: not iiab_prepped
|
||||
tags:
|
||||
- squid
|
||||
- network
|
||||
|
||||
- include: wondershaper.yml
|
||||
when: not iiab_prepped
|
||||
tags:
|
||||
- wondershaper
|
||||
- network
|
||||
|
||||
- include: iptables.yml
|
||||
# when: not iiab_prepped
|
||||
tags:
|
||||
- iptables
|
||||
- network
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
- name: ubuntu and debian treat names differently
|
||||
package: name={{ item }} state=present
|
||||
with_items:
|
||||
- libapache2-mod-php5
|
||||
- libapache2-mod-php{{ php_version }}
|
||||
when: is_debian
|
||||
|
||||
- name: ubuntu and debian treat names differently
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
when: is_debuntu
|
||||
|
||||
- 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-iiab"
|
||||
command: su - postgres -c "/usr/lib/postgresql/{{ postgresql_version }}/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-iiab"
|
||||
creates=/library/pgsql-iiab/pg_hba.conf
|
||||
when: is_debian
|
||||
|
||||
|
|
|
@ -11,14 +11,23 @@
|
|||
state=link
|
||||
|
||||
- name: Install sugarizer required packages
|
||||
package: name={{ item }}
|
||||
package: name=nodejs
|
||||
state=present
|
||||
with_items:
|
||||
- nodejs
|
||||
- npm
|
||||
# - npm
|
||||
when: internet_available
|
||||
tags:
|
||||
- download
|
||||
|
||||
- name: Install npm non debian
|
||||
package: name=npm
|
||||
state=present
|
||||
when: internet_available and not is_debian
|
||||
|
||||
- name: Install npm on debian -- set up apt sources
|
||||
shell: curl -sL https://deb.nodesource.com/setup_6.x | bash -
|
||||
when: internet_available and is_debian
|
||||
|
||||
- name: Actually get it installed
|
||||
command: apt install -y npm
|
||||
when: internet_available and is_debian
|
||||
|
||||
- name: Create systemd files and copy our ini file
|
||||
template: src={{ item.src }}
|
||||
|
|
24
vars/debian-9.yml
Normal file
24
vars/debian-9.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
is_debian: True
|
||||
is_debuntu: True
|
||||
dns_service: bind9
|
||||
dns_user: bind
|
||||
proxy: squid
|
||||
proxy_user: proxy
|
||||
apache_service: apache2
|
||||
apache_config_dir: apache2/sites-available
|
||||
apache_user: www-data
|
||||
apache_log_dir: /var/log/apache2
|
||||
smb_service: smbd
|
||||
nmb_service: nmbd
|
||||
kalite_program: /usr/local/bin/kalite
|
||||
systemctl_program: /bin/systemctl
|
||||
mysql_service: mysql
|
||||
apache_log: /var/log/apache2/access.log
|
||||
# cups lp module not available in raspbian, causes systemd-modueles-load to fail
|
||||
# which in turn cause netfilter-persistent to fail, which is essential
|
||||
cups_install: True
|
||||
sshd_service: ssh
|
||||
php_version: 7.0
|
||||
postgresql_version: 9.6
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue