1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

Merge pull request #428 from arky/misc-checks

Misc Fixes: Clean up whitespace warnings
This commit is contained in:
A Holt 2017-10-19 16:50:33 -04:00 committed by GitHub
commit 1d8e946b91
44 changed files with 121 additions and 135 deletions

View file

@ -76,7 +76,7 @@
wifi1: "{{ item|trim }}"
discovered_wireless_iface: "{{ item|trim }}"
when: item|trim != "" and item|trim != discovered_wan_iface
with_items:
with_items:
- "{{ wireless_list1.stdout_lines }}"
# WIRELESS -- Sigh... Not all drivers update /proc/net/wireless correctly

View file

@ -21,7 +21,7 @@
state=present
when: is_debuntu
- name: Test for UUID file
- name: Test for UUID file
stat: path=/etc/iiab/uuid
register: uuid_file

View file

@ -3,7 +3,7 @@
when: ansible_distribution == "Fedora" and ansible_machine == "armv7l" and ansible_distribution_version|int >= 22
- name: install yum from Fedora 23 for arm!!!
shell: dnf install -y https://kojipkgs.fedoraproject.org//packages/yum/3.4.3/506.fc23/noarch/yum-3.4.3-506.fc23.noarch.rpm python-dnf
shell: dnf install -y https://kojipkgs.fedoraproject.org//packages/yum/3.4.3/506.fc23/noarch/yum-3.4.3-506.fc23.noarch.rpm python-dnf
when: ansible_distribution == "Fedora" and ansible_machine == "armv7l" and ansible_distribution_version|int >= 22
- name: install yum if it has been dropped from our distribution -- Fedora 22 uses dnf!!!
@ -97,7 +97,7 @@
- python-pip
- python-setuptools
- python-virtualenv
- name: Update common packages (not debian
package: name={{ item }}
state=latest
@ -124,7 +124,7 @@
# service: name=NetworkManager
# state=restarted
# when: not installing
# the above should use a handler - all reboots should wait until all
# the above should use a handler - all reboots should wait until all
# mods are preformed
- name: Install optional exFAT packages for CentOS

View file

@ -112,7 +112,7 @@
get_url: url="{{ iiab_download_url }}/{{ item }}" dest={{ downloads_dir}}/{{ item }}
with_items:
- hostapd_8188_i386
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and internet_available
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and internet_available
tags:
- xo
@ -131,5 +131,3 @@
ignore_errors: yes
async: 300
poll: 120

View file

@ -1,3 +1,2 @@
# Add your role to this list and then uncomment dependencies. Adding a tag is handy for testing.
#dependencies:

View file

@ -12,29 +12,29 @@
- /library/xs-activity-server/lang_templates
- /library/xs-activity-server/www.0
- /library/xs-activity-server/tmp
# Wish synchronize worked, but it doesn't
- name: Copy language templates
- name: Copy language templates
command: rsync -a {{iiab_dir}}/roles/activity-server/files/lang_templates /library/xs-activity-server/
- name: Copy default index files
- name: Copy default index files
copy: src={{ item }}
dest=/library/xs-activity-server/www.0
mode=0755
owner=root
group=root
with_fileglob:
- www.0/index.html.*
- www.0/index.html.*
- name: Point www to www.0 as default
file: src=/library/xs-activity-server/www.0
dest=/library/xs-activity-server/www
dest=/library/xs-activity-server/www
owner=root
group=admin
state=link
- name: Chown language templates
state=link
- name: Chown language templates
file: path=/library/xs-activity-server/lang_templates
mode=0644
owner=root
@ -49,8 +49,8 @@
mode=0755
owner=root
group=root
state=directory
state=directory
- name: Install Python module
copy: src=xs_activities/__init__.py
dest=/usr/lib/python2.7/site-packages/xs_activities
@ -58,7 +58,7 @@
owner=root
group=root
- name: Copy scripts to /usr/bin
- name: Copy scripts to /usr/bin
copy: src={{ item }}
dest=/usr/bin
mode=0755
@ -105,7 +105,7 @@
# For it only supports client's language code
# TODO: Upload Activity via web interface
# and figure out what to do with olpc_activities.service
# and figure out what to do with olpc_activities.service
# short term addition of link for upload-activity server
# ln -sf /usr/share/xs-config/cfg/html/top/en/cntr_upl_activity.php {{ doc_root }}/upload_activity.php
@ -130,4 +130,3 @@
value: /activities
- option: enabled
value: "{{ xo_services_enabled }}"

View file

@ -4,7 +4,7 @@
- name: Install xs-authserver from pypi
pip: name=xs-authserver
when: internet_available
when: internet_available
- name: install gunicorn
package: name=python-gunicorn

View file

@ -1,5 +1,5 @@
- name: Install awstats package
package: name={{ item }}
package: name={{ item }}
state=present
with_items:
- awstats
@ -9,7 +9,7 @@
- download
- name: Install awstats package
package: name={{ item }}
package: name={{ item }}
state=present
with_items:
- libapache2-mod-authnz-external
@ -33,7 +33,7 @@
- "{{ awstats_data_dir }}"
- "{{ apache_log_dir }}"
- name: Install the Apache config for Advanced Web Statistics
- name: Install the Apache config for Advanced Web Statistics
template: src=apache.conf
dest=/etc/{{ apache_config_dir }}/awstats.conf
owner=root
@ -41,7 +41,7 @@
mode=0644
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
dest=/etc/{{ apache_config_dir }}/awstats.conf
owner=root
@ -74,7 +74,7 @@
state=absent
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
dest=/etc/awstats/awstats.schoolserver.conf
owner=root
@ -95,4 +95,3 @@
- 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
when: awstats_enabled and is_debuntu

View file

@ -1,6 +1,6 @@
- include: install.yml
when: awstats_install
- name: Add awstats to service list
ini_file: dest='{{ service_filelist }}'
section=awstats

View file

@ -10,7 +10,7 @@
shell: "{{ downloads_dir }}/calibre-installer.py >> /dev/null"
args:
creates: /usr/bin/calibre-uninstall
when: calibre_install and ansible_distribution == 'CentOS'
when: calibre_install and ansible_distribution == 'CentOS'
- name: Install Calibre rpms
# the fedora rpm arm version, though older, takes care of dependencies, and exists

View file

@ -7,7 +7,7 @@
when: cups_install
tags:
- download
- name: Put our own config file in place, to permit local lan admin
template: dest=/etc/cups/cupsd.conf
src=cupsd.conf

View file

@ -1,6 +1,6 @@
- name: Get the Dokuwiki software
get_url: url="{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz" dest={{ downloads_dir}}/
when: internet_available
when: internet_available
- name: Copy it to permanent location /library
unarchive: src={{ downloads_dir }}/{{ dokuwiki_version }}.tgz dest=/library creates=/library/{{ dokuwiki_version }}/VERSION
@ -17,7 +17,7 @@
src=/etc/apache2/sites-available/dokuwiki.conf
state=link
when: dokuwiki_enabled and is_debuntu
- name: disable the dokuwiki
file: path=/etc/apache2/sites-enabled/dokuwiki.conf
state=absent
@ -29,4 +29,3 @@
- name: Restart apache, so it picks up the new aliases
service: name={{ apache_service }} state=restarted

View file

@ -26,7 +26,7 @@
register: ejabberd_config
- name: Put the startup script in place - debian
template: src='ejabberd-xs.init'
template: src='ejabberd-xs.init'
dest='/etc/init.d/ejabberd-xs'
when: is_debuntu

View file

@ -33,7 +33,7 @@
command: /etc/sysconfig/olpc-scripts/setup.d/xs-rsync
creates=/etc/xinetd.d/xs-rsyncd
- name: Copy idmgr init script
- name: Copy idmgr init script
command: /bin/cp /etc/init.d/idmgr /usr/libexec/idmgr.init
creates=/usr/libexec/idmgr.init

View file

@ -1,8 +1,8 @@
- name: Create iiab-admin user and password
user: name={{ iiab_admin_user }}
user: name={{ iiab_admin_user }}
password={{ iiab_admin_passw_hash }}
update_password=on_create
- name: Create a wheel group
group: name=wheel
state=present
@ -14,7 +14,7 @@
- name: Add user to wheel group
user: name={{ iiab_admin_user }} groups=wheel,sudo
- name: Create root .ssh
file: path=/root/.ssh
mode=0700
@ -29,7 +29,7 @@
owner=root
group=root
mode=0600
# backup=yes
- name: edit the sudoers file--first make it editable
@ -42,15 +42,14 @@
dest=/etc/sudoers
- name: lets wheel sudo without password
lineinfile:
lineinfile:
line: "%wheel ALL= NOPASSWD: ALL"
dest: /etc/sudoers
- name: remove the line which requires tty
lineinfile: regexp=requiretty
state=absent
lineinfile: regexp=requiretty
state=absent
dest=/etc/sudoers
- name: end editing the sudoers file-- protect it again
shell: chmod 0440 /etc/sudoers

View file

@ -4,7 +4,7 @@
with_items:
- mongodb-server
- mongodb
when: internet_available
when: internet_available
tags:
- download

View file

@ -11,7 +11,7 @@
tags:
- download
- name: Update main config file
- name: Update main config file
template: backup=yes
src=monitrc
dest=/etc/monitrc
@ -29,7 +29,7 @@
with_items: watchdog
register: monit_config
when: false
until: monit_config | success
until: monit_config | success
retries: 5
delay: 1

View file

@ -16,9 +16,9 @@
- php{{ php_version }}-curl
# - php{{ php_version }}-zip
- php{{ php_version }}-gd
# - php{{ php_version }}-mbstring
# - php{{ php_version }}-mbstring
# mbstring is now included in php-cli
- php{{ php_version }}-cli
- php{{ php_version }}-cli
when: is_debuntu
- name: php-zip debian 8-9 changed name
@ -54,7 +54,7 @@
mode=0755
state=directory
- name: Create a moodle data dir with apache permission to write
- name: Create a moodle data dir with apache permission to write
file: path={{ moodle_data }}
owner={{ apache_user }}
group={{ apache_user }}
@ -127,7 +127,7 @@
- name: Execute moodle startup script
shell: '{{ moodle_base }}/moodle_installer'
when: config.stat.exists is defined and not config.stat.exists
- name: Give apache permission to read config file
# command: chown -R {{ apache_user }} {{ moodle_base }}
file: path={{ moodle_base }}/config.php

View file

@ -26,7 +26,7 @@
package: name=php-xml-parser state=present
when: is_debian_8
- name: Install MySQL
- name: Install MySQL
package: name={{ item }}
state=present
with_items:
@ -118,4 +118,3 @@
value: '"mySQL is a widely used database service on the Internet which runs on many platforms, and is often offered and available at hosting Internet Service Providers"'
- option: enabled
value: "{{ mysql_enabled }}"

View file

@ -39,7 +39,7 @@
register: avahi_ver
ignore_errors: True
changed_when: false
- name: Grab a clean copy of ssh.service
copy: src='/usr/share/doc/{{ avahi_ver.stdout }}/ssh.service'
dest='/etc/avahi/services/'

View file

@ -1,15 +1,15 @@
# debian.yml
# Start out making simplifying assumptions
# Start out making simplifying assumptions
# 1. we are dealing with a rpi3
# 2. Gui inputs define the config -- auto config is more difficult
# a. gui_desired_network_role
# b. hostapd_enabled
# c. gui_static_wan_ip
# c. gui_static_wan_ip
# 3. In appliance mode: wan (and wlan0) is either static or dhcp under br0, and hostapd off
# 4. In lan_controller: wan is off, eth0 and wlan0 under br0
# 5. In gateway: eth0 is wan, and wlan0 is under br0 (only one adapter under br0)
# 6. As a slight concess to auto config, if eth1 exists, make it wan, and force gateway
- name: in upgrade from earlier 6.2, delete the resolvconf
package: name=resolvconf
state=absent
@ -33,7 +33,7 @@
template: dest=/etc/network/interfaces
src=network/interfaces.j2
- name: Copy the bridge script
- name: Copy the bridge script
template: dest=/etc/network/interfaces.d/iiab
src=network/iiab.j2
register: interface
@ -54,7 +54,7 @@
- name: restart the networking service
service: name=networking state=restarted
when: interface.changed
- name: start up hostapd again
service: name=hostapd state=started
when: interface.changed

View file

@ -99,7 +99,7 @@
enabled=no
when: not wondershaper_enabled and wondershaper_install
# check-LAN should be iptables.yml remove later
# check-LAN should be iptables.yml remove later
- name: Grab clean copy of iiab-gen-iptables
template: src={{ item.0 }}
dest={{ item.1 }}

View file

@ -86,7 +86,7 @@
ignore_errors: True
when: iiab_lan_iface != "none" and not installing and not iiab_demo_mode
# we could do the DEVICE name stuff for a cleaner looking nmcli
# we could do the DEVICE name stuff for a cleaner looking nmcli
- name: Enabling ifcfg slaves
shell: nmcli conn up id "System {{ item|trim }}"
ignore_errors: True
@ -95,4 +95,3 @@
- "{{ lan_list_result.stdout_lines }}"
# testpoint confirm with 'nmcli c show' 'brctl show'

View file

@ -19,11 +19,11 @@
when: not installing and not is_debuntu
- name: Remove iptables.service file from /etc
file: path=/etc/systemd/system/iptables.service
file: path=/etc/systemd/system/iptables.service
state=absent
- name: Remove iptables-xs.service file from /etc
file: path=/etc/systemd/system/iptables-xs.service
file: path=/etc/systemd/system/iptables-xs.service
state=absent
- name: Install iptables service package

View file

@ -107,7 +107,7 @@
- include: computed_services.yml
tags:
- network
- include: enable_services.yml
tags:
- network

View file

@ -68,7 +68,7 @@
template: src=named/{{ dns_service }}.service
dest=/etc/systemd/system/{{ dns_service }}.service
mode=0644
- name: The dns-jail redirect requires the named.blackhole,disabling recursion
# in named-iiab.conf, and the redirection of 404 error documents to /
template: src=named/dns-jail.conf dest=/etc/{{ apache_config_dir }}/
@ -77,16 +77,16 @@
- name: Separate enabling required for debian
file: src=/etc/{{ apache_config_dir }}/dns-jail.conf
path=/etc/{{ apache_service }}/sites-enabled/dns-jail.conf
state=link
state=link
when: is_debuntu and dns_jail_enabled
- name: Separate enabling/disabling required for debian
file: src=/etc/{{ apache_config_dir }}/dns-jail.conf
path=/etc/{{ apache_service }}/sites-enabled/dns-jail.conf
state=absent
state=absent
when: is_debuntu and not dns_jail_enabled
- name: Separate enabling/disabling required for non debian
file: path=/etc/{{ apache_config_dir }}/dns-jail.conf
state=absent
state=absent
when: not is_debuntu and not dns_jail_enabled

View file

@ -1,16 +1,16 @@
# The preferred method of disabling the LAN would be to set iiab_lan_enabled:
# False before getting here but we are here...
# Well if we got here something changed with the gateway and ifcfg-WAN maybe
# no longer accurate. Note if DEVICE= is any ifcfg files the listed DEVICE
# becomes bound to the NAME in the ifcfg file. With the LAN files out of the
# Well if we got here something changed with the gateway and ifcfg-WAN maybe
# no longer accurate. Note if DEVICE= is any ifcfg files the listed DEVICE
# becomes bound to the NAME in the ifcfg file. With the LAN files out of the
# way we can try the interfaces one by one starting with device_gw.
# Setting up three way conditions with the results
# skipped|changed|failed
# failure results in blowing away the ifcfg-WAN so lets make sure...
# failure results in blowing away the ifcfg-WAN so lets make sure...
# We only got here by way of no detected gateway, lets see if we can pick-up
# transient change like cable issues.
# We only got here by way of no detected gateway, lets see if we can pick-up
# transient change like cable issues.
- name: BAD DHCP defaults
set_fact:
@ -21,7 +21,7 @@
service: name=dhcpd state=stopped
### clear all connections first
# We should have the LAN torndown at this point.
# We should have the LAN torndown at this point.
- name: No ifcfg-WAN known
debug: msg="NO WAN known"
@ -34,7 +34,7 @@
- name: Trying wifi first
shell: nmcli conn up id {{ ap_name.stdout }}
register: try_wifi
register: try_wifi
ignore_errors: yes
when: ap_name is defined and ap_named.changed
@ -45,7 +45,7 @@
# We have the DEVICE?
- name: Now setting iiab_wan_iface based on wifi
set_fact:
set_fact:
iiab_wan_iface: "{{ dhcp_wifi_results.stdout }}"
dhcp_good: True
when: dhcp_wifi_results.stdout is defined and dhcp_wifi_results.stdout != ""
@ -103,7 +103,7 @@
# We have the DEVICE?
- name: Now setting iiab_wan_iface via nmcli
set_fact:
set_fact:
iiab_wan_iface: "{{ dhcp_1BY1_results.stdout }}"
dhcp_good: True
when: dhcp_1BY1_results.stdout is defined and dhcp_1BY1_results.stdout != "" and not has_WAN
@ -138,4 +138,3 @@
set_fact:
iiab_lan_iface: "none"
when: dhcp_good and adapter_count.stdout|int == "1"

View file

@ -1,15 +1,15 @@
# rpi_debian.yml
# Start out making simplifying assumptions
# Start out making simplifying assumptions
# 1. we are dealing with a rpi3
# 2. Gui inputs define the config -- auto config is more difficult
# a. gui_desired_network_role
# b. hostapd_enabled
# c. gui_static_wan_ip
# c. gui_static_wan_ip
# 3. In appliance mode: wan (and wlan0) is either static or dhcp under br0, and hostapd off
# 4. In lan_controller: wan is off, eth0 and wlan0 under br0
# 5. In gateway: eth0 is wan, and wlan0 is under br0 (only one adapter under br0)
# 6. As a slight concess to auto config, if eth1 exists, make it wan, and force gateway
- name: Raspbian stock has openresolv which is not available in debian, off it
package: name=openresolv
state=absent
@ -27,7 +27,7 @@
gui_desired_network_role: "LanController"
when: not gui_desired_network_role is defined
- name: Rewrite the /etc/network/interfaces file which we corrupted
- name: Rewrite the /etc/network/interfaces file which we corrupted
template: dest=/etc/network/interfaces
src=network/interfaces.j2
@ -35,7 +35,7 @@
template: dest=/etc/dhcpcd.conf
src=network/dhcpcd.conf
- name: Copy the network config script
- name: Copy the network config script
template: dest=/etc/network/interfaces.d/iiab
src=network/iiab.j2
register: interface
@ -53,12 +53,12 @@
ignore_errors: True
when: interface.changed
- name: and remove the device
- name: and remove the device
command: brctl delbr br0
ignore_errors: True
when: interface.changed
- name: reset the eth0 interface
- name: reset the eth0 interface
command: ifdown eth0
ignore_errors: True
when: interface.changed
@ -66,7 +66,7 @@
- name: restart the networking service
service: name=networking state=restarted
when: interface.changed
- name: start up hostapd again
service: name=hostapd state=started
when: interface.changed

View file

@ -5,7 +5,7 @@
# but we use the tar file to get the latest version; really only benefits the xo4 on fedora 18
- name: Get the nextcloud software
get_url: url="{{ nextcloud_dl_url }}"/{{ nextcloud_src_file }} dest={{ downloads_dir }}/{{ nextcloud_src_file }}
when: internet_available
when: internet_available
- name: Copy it to permanent location /opt
unarchive: src={{ downloads_dir }}/{{ nextcloud_src_file }} dest=/opt/

View file

@ -10,7 +10,7 @@
- name: Get the nextcloud software
get_url: url={{ nextcloud_dl_url }}/{{ nextcloud_src_file }} dest={{ downloads_dir }}/{{ nextcloud_src_file }}
when: internet_available
when: internet_available
async: 900
poll: 15
tags:
@ -138,4 +138,3 @@
value: "{{ nextcloud_src_file }}"
- option: enabled
value: "{{ nextcloud_enabled }}"

View file

@ -29,8 +29,8 @@
# the install wizard does not succeed if already installed
- name: Determine if nextcloud is installed
shell: >
sudo -u {{ apache_user }} php
'{{ nextcloud_prefix }}/nextcloud/occ' status |
sudo -u {{ apache_user }} php
'{{ nextcloud_prefix }}/nextcloud/occ' status |
gawk '/installed:/ { print $3 }'
register: returned

View file

@ -16,7 +16,7 @@
group=root
mode=0755
- name: Create the directory for scripts
- name: Create the directory for scripts
file: dest=/etc/openvpn/scripts
state=directory
owner=root

View file

@ -11,7 +11,7 @@
register: owncloud_page
- name: Install owncloud package
package: name={{ item }}
package: name={{ item }}
state=present
with_items:
- curl
@ -40,19 +40,19 @@
- name: Get the owncloud software
get_url: url={{ iiab_download_url }}/{{ owncloud_src_file }} dest={{ downloads_dir }}/{{ owncloud_src_file }}
when: internet_available
when: internet_available
async: 300
poll: 5
- name: Copy it to permanent location /opt
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
dest={{ owncloud_prefix }}
creates={{ owncloud_prefix }}/owncloud/version.php
when: not is_F18
# ansible 1.4.1 does not have "creates"
- name: Copy it to permanent location /opt
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
dest={{ owncloud_prefix }}
when: is_F18

View file

@ -33,4 +33,3 @@
lineinfile: regexp='overwrite.cli.url'
state=absent
dest="{{ owncloud_prefix }}/owncloud/config/config.php"

View file

@ -1,5 +1,5 @@
- name: Remove if exist pathagar rpm version
package: name=pathagar
package: name=pathagar
state=absent
- name: Install pathagar pre requisites (both fedora and debian)

View file

@ -1,6 +1,6 @@
- name: Get the phpmyadmin software
get_url: url="{{ iiab_download_url }}/{{ phpMyAdmin }}" dest="{{ downloads_dir}}/phpMyAdmin.zip"
when: internet_available
when: internet_available
- name: Copy it to permanent location /opt
unarchive: src={{ downloads_dir }}/phpMyAdmin.zip dest=/opt/

View file

@ -10,7 +10,7 @@
# Install and configure samba server (requires ports 137, 138, 139, 445 open).
- name: Ensure Samba-related packages are installed.
package: name={{ item }}
package: name={{ item }}
state=present
with_items:
- samba
@ -26,25 +26,25 @@
- name: Ensure Samba is running and set to start on boot.
service: name={{ smb_service }} state=started enabled=yes
tags:
tags:
- samba
when : samba_enabled
- name: netbios name server is running and set to start on boot.
service: name={{ nmb_service }} state=started enabled=yes
tags:
tags:
- samba
when : samba_enabled
- name: Disable Samba if that is wanted
service: name={{ smb_service }} state=stopped enabled=no
tags:
tags:
- samba
when : not samba_enabled
- name: Disable Samba name server if that is wanted
service: name={{ nmb_service }} state=stopped enabled=no
tags:
tags:
- samba
when : not samba_enabled
@ -60,4 +60,3 @@
value: '"Samba is a Microsoft compatible remote file access system - generalized to CIFS --common internet file system"'
- option: enabled
value: "{{ samba_enabled }}"

View file

@ -1,4 +1,4 @@
- name: Disable root login with password
- name: Disable root login with password
lineinfile: dest=/etc/ssh/sshd_config
regexp='^PermitRootLogin'
line='PermitRootLogin without-password'

View file

@ -32,13 +32,13 @@
service: name=sugar-stats-server
enabled=yes
when: sugar_stats_enabled
- name: Disable sugar-stats service
service: name=sugar-stats-server
enabled=no
when: not sugar_stats_enabled
- include: statistics-consolidation.yml
- include: statistics-consolidation.yml
- name: Add sugar-stats to service list
ini_file: dest='{{ service_filelist }}'

View file

@ -1,7 +1,7 @@
- name: Download the latest stable version of sugarizer from location under our control
get_url: url={{ iiab_download_url }}/{{ sugarizer_version }}.tar.gz
dest={{ downloads_dir }}/{{ sugarizer_version }}.tar.gz
#fixme
- name: Untar it to target location
command: tar xzf {{ downloads_dir }}/{{ sugarizer_version }}.tar.gz -C {{ sugarizer_location }}
@ -41,7 +41,7 @@
npm_exists: True
when: npm.stat.exists is defined and npm.stat.exists
- name: Create systemd files and copy our ini file
- name: Create systemd files and copy our ini file
template: src={{ item.src }}
dest={{ item.dest }}
owner=root
@ -60,14 +60,14 @@
- name: Create the express framework for node.js - ALL less F18
shell: npm install
args:
chdir: "{{ sugarizer_location }}/sugarizer/server"
chdir: "{{ sugarizer_location }}/sugarizer/server"
creates: "{{ sugarizer_location }}/sugarizer/server/node_modules"
when: not is_F18 and not npm_exists
- name: Create the express framework for node.js - F18
shell: npm install
args:
chdir: "{{ sugarizer_location }}/sugarizer/server"
chdir: "{{ sugarizer_location }}/sugarizer/server"
when: is_F18 and not npm_exists
- name: enable services - All
@ -95,6 +95,6 @@
- option: name
value: Sugarizer
- option: description
value: '"The Sugar Learning Platform is a leading learning platform that began in the famous One Laptop Per Child project. Sugarizer is a web implementation of that platform"'
value: '"The Sugar Learning Platform is a leading learning platform that began in the famous One Laptop Per Child project. Sugarizer is a web implementation of that platform"'
- option: enabled
value: "{{ sugarizer_enabled }}"

View file

@ -18,21 +18,21 @@
- download
- name: Install X Windows on CentOS
shell: yum groupinstall -y "Server with GUI"
shell: yum groupinstall -y "Server with GUI"
when: internet_available and ansible_distribution == "CentOS"
tags:
- download
- name: Get the teamviewer software
- name: Get the teamviewer software
get_url: url="{{ teamviewer_url }}/{{ teamviewer_rpm_file }}" dest="{{ yum_packages_dir }}/{{ teamviewer_rpm_file }}"
when: internet_available
when: internet_available
tags:
- download
# F22 has issues with yum localinstall exclude for now
- name: Do the install of teamviewer, pulling in any required dependencies
shell: "yum localinstall -y {{ yum_packages_dir }}/{{ teamviewer_rpm_file }}"
when: teamviewer_install and internet_available
when: teamviewer_install and internet_available
and xo_model == "none" and ansible_distribution_version <= "21"
- name: making local copy available
@ -45,4 +45,3 @@
with_items:
- teamviewer*
when: teamviewer_install and xo_model == "none" and ansible_distribution_version >= "22"

View file

@ -34,24 +34,24 @@
- name: Add apache config for content directory
template: src=content_dir.conf
dest=/etc/{{ apache_config_dir }}
when: usb_lib_enabled
when: usb_lib_enabled
- name: create the link to enable for debian
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
dest=/etc/apache2/sites-enabled/content_dir.conf
state=link
when: is_debuntu
- name: remove the link that enables in debian
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
dest=/etc/apache2/sites-enabled/content_dir.conf
state=absent
when: is_debuntu and not usb_lib_enabled
- name: remove apache config for content directory
file: name=/etc/{{ apache_config_dir }}/content_dir.conf
state=absent
when: not usb_lib_enabled
when: not usb_lib_enabled
- name: Add usb-lib to service list
ini_file: dest='{{ service_filelist }}'

View file

@ -8,10 +8,10 @@
- download
- name: put the config file in place
template: src=vnstat.conf.j2
dest=/etc/vnstat.conf
mode=0744
owner=root
template: src=vnstat.conf.j2
dest=/etc/vnstat.conf
mode=0744
owner=root
group=root
- name: create database for wan to collect vnstat data

View file

@ -1,7 +1,7 @@
- name: Get the WordPress software
get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}" dest={{ downloads_dir}}/
register: wp_download_output
when: internet_available
when: internet_available
- name: Copy it to permanent location /library
unarchive: src={{ wp_download_output.dest }} dest=/library