mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Misc Fixes: Clean up whitespace warnings
This commit is contained in:
parent
2203107f85
commit
3abb27bbed
44 changed files with 121 additions and 135 deletions
|
@ -76,7 +76,7 @@
|
||||||
wifi1: "{{ item|trim }}"
|
wifi1: "{{ item|trim }}"
|
||||||
discovered_wireless_iface: "{{ item|trim }}"
|
discovered_wireless_iface: "{{ item|trim }}"
|
||||||
when: item|trim != "" and item|trim != discovered_wan_iface
|
when: item|trim != "" and item|trim != discovered_wan_iface
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ wireless_list1.stdout_lines }}"
|
- "{{ wireless_list1.stdout_lines }}"
|
||||||
|
|
||||||
# WIRELESS -- Sigh... Not all drivers update /proc/net/wireless correctly
|
# WIRELESS -- Sigh... Not all drivers update /proc/net/wireless correctly
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
state=present
|
state=present
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Test for UUID file
|
- name: Test for UUID file
|
||||||
stat: path=/etc/iiab/uuid
|
stat: path=/etc/iiab/uuid
|
||||||
register: uuid_file
|
register: uuid_file
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
when: ansible_distribution == "Fedora" and ansible_machine == "armv7l" and ansible_distribution_version|int >= 22
|
when: ansible_distribution == "Fedora" and ansible_machine == "armv7l" and ansible_distribution_version|int >= 22
|
||||||
|
|
||||||
- name: install yum from Fedora 23 for arm!!!
|
- 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
|
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!!!
|
- name: install yum if it has been dropped from our distribution -- Fedora 22 uses dnf!!!
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
- python-pip
|
- python-pip
|
||||||
- python-setuptools
|
- python-setuptools
|
||||||
- python-virtualenv
|
- python-virtualenv
|
||||||
|
|
||||||
- name: Update common packages (not debian
|
- name: Update common packages (not debian
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=latest
|
state=latest
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
# service: name=NetworkManager
|
# service: name=NetworkManager
|
||||||
# state=restarted
|
# state=restarted
|
||||||
# when: not installing
|
# 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
|
# mods are preformed
|
||||||
|
|
||||||
- name: Install optional exFAT packages for CentOS
|
- name: Install optional exFAT packages for CentOS
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
get_url: url="{{ iiab_download_url }}/{{ item }}" dest={{ downloads_dir}}/{{ item }}
|
get_url: url="{{ iiab_download_url }}/{{ item }}" dest={{ downloads_dir}}/{{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- hostapd_8188_i386
|
- 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:
|
tags:
|
||||||
- xo
|
- xo
|
||||||
|
|
||||||
|
@ -131,5 +131,3 @@
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
async: 300
|
async: 300
|
||||||
poll: 120
|
poll: 120
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
# Add your role to this list and then uncomment dependencies. Adding a tag is handy for testing.
|
# Add your role to this list and then uncomment dependencies. Adding a tag is handy for testing.
|
||||||
#dependencies:
|
#dependencies:
|
||||||
|
|
|
@ -12,29 +12,29 @@
|
||||||
- /library/xs-activity-server/lang_templates
|
- /library/xs-activity-server/lang_templates
|
||||||
- /library/xs-activity-server/www.0
|
- /library/xs-activity-server/www.0
|
||||||
- /library/xs-activity-server/tmp
|
- /library/xs-activity-server/tmp
|
||||||
|
|
||||||
# Wish synchronize worked, but it doesn't
|
# 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/
|
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 }}
|
copy: src={{ item }}
|
||||||
dest=/library/xs-activity-server/www.0
|
dest=/library/xs-activity-server/www.0
|
||||||
mode=0755
|
mode=0755
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- www.0/index.html.*
|
- www.0/index.html.*
|
||||||
|
|
||||||
- name: Point www to www.0 as default
|
- name: Point www to www.0 as default
|
||||||
file: src=/library/xs-activity-server/www.0
|
file: src=/library/xs-activity-server/www.0
|
||||||
dest=/library/xs-activity-server/www
|
dest=/library/xs-activity-server/www
|
||||||
owner=root
|
owner=root
|
||||||
group=admin
|
group=admin
|
||||||
state=link
|
state=link
|
||||||
|
|
||||||
- name: Chown language templates
|
- name: Chown language templates
|
||||||
file: path=/library/xs-activity-server/lang_templates
|
file: path=/library/xs-activity-server/lang_templates
|
||||||
mode=0644
|
mode=0644
|
||||||
owner=root
|
owner=root
|
||||||
|
@ -49,8 +49,8 @@
|
||||||
mode=0755
|
mode=0755
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
state=directory
|
state=directory
|
||||||
|
|
||||||
- name: Install Python module
|
- name: Install Python module
|
||||||
copy: src=xs_activities/__init__.py
|
copy: src=xs_activities/__init__.py
|
||||||
dest=/usr/lib/python2.7/site-packages/xs_activities
|
dest=/usr/lib/python2.7/site-packages/xs_activities
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
|
|
||||||
- name: Copy scripts to /usr/bin
|
- name: Copy scripts to /usr/bin
|
||||||
copy: src={{ item }}
|
copy: src={{ item }}
|
||||||
dest=/usr/bin
|
dest=/usr/bin
|
||||||
mode=0755
|
mode=0755
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
# For it only supports client's language code
|
# For it only supports client's language code
|
||||||
|
|
||||||
# TODO: Upload Activity via web interface
|
# 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
|
# 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
|
# 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
|
value: /activities
|
||||||
- option: enabled
|
- option: enabled
|
||||||
value: "{{ xo_services_enabled }}"
|
value: "{{ xo_services_enabled }}"
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
- name: Install xs-authserver from pypi
|
- name: Install xs-authserver from pypi
|
||||||
pip: name=xs-authserver
|
pip: name=xs-authserver
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
- name: install gunicorn
|
- name: install gunicorn
|
||||||
package: name=python-gunicorn
|
package: name=python-gunicorn
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- name: Install awstats package
|
- name: Install awstats package
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
with_items:
|
||||||
- awstats
|
- awstats
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Install awstats package
|
- name: Install awstats package
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
with_items:
|
||||||
- libapache2-mod-authnz-external
|
- libapache2-mod-authnz-external
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
- "{{ awstats_data_dir }}"
|
- "{{ awstats_data_dir }}"
|
||||||
- "{{ apache_log_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
|
template: src=apache.conf
|
||||||
dest=/etc/{{ apache_config_dir }}/awstats.conf
|
dest=/etc/{{ apache_config_dir }}/awstats.conf
|
||||||
owner=root
|
owner=root
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
mode=0644
|
mode=0644
|
||||||
when: awstats_enabled and is_debuntu
|
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
|
||||||
dest=/etc/{{ apache_config_dir }}/awstats.conf
|
dest=/etc/{{ apache_config_dir }}/awstats.conf
|
||||||
owner=root
|
owner=root
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
state=absent
|
state=absent
|
||||||
when: not awstats_enabled and is_debuntu
|
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
|
||||||
dest=/etc/awstats/awstats.schoolserver.conf
|
dest=/etc/awstats/awstats.schoolserver.conf
|
||||||
owner=root
|
owner=root
|
||||||
|
@ -95,4 +95,3 @@
|
||||||
- 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_debuntu
|
when: awstats_enabled and is_debuntu
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- include: install.yml
|
- include: install.yml
|
||||||
when: awstats_install
|
when: awstats_install
|
||||||
|
|
||||||
- name: Add awstats to service list
|
- name: Add awstats to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
section=awstats
|
section=awstats
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
shell: "{{ downloads_dir }}/calibre-installer.py >> /dev/null"
|
shell: "{{ downloads_dir }}/calibre-installer.py >> /dev/null"
|
||||||
args:
|
args:
|
||||||
creates: /usr/bin/calibre-uninstall
|
creates: /usr/bin/calibre-uninstall
|
||||||
when: calibre_install and ansible_distribution == 'CentOS'
|
when: calibre_install and ansible_distribution == 'CentOS'
|
||||||
|
|
||||||
- name: Install Calibre rpms
|
- name: Install Calibre rpms
|
||||||
# the fedora rpm arm version, though older, takes care of dependencies, and exists
|
# the fedora rpm arm version, though older, takes care of dependencies, and exists
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
when: cups_install
|
when: cups_install
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Put our own config file in place, to permit local lan admin
|
- name: Put our own config file in place, to permit local lan admin
|
||||||
template: dest=/etc/cups/cupsd.conf
|
template: dest=/etc/cups/cupsd.conf
|
||||||
src=cupsd.conf
|
src=cupsd.conf
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- name: Get the Dokuwiki software
|
- name: Get the Dokuwiki software
|
||||||
get_url: url="{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz" dest={{ downloads_dir}}/
|
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
|
- name: Copy it to permanent location /library
|
||||||
unarchive: src={{ downloads_dir }}/{{ dokuwiki_version }}.tgz dest=/library creates=/library/{{ dokuwiki_version }}/VERSION
|
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
|
src=/etc/apache2/sites-available/dokuwiki.conf
|
||||||
state=link
|
state=link
|
||||||
when: dokuwiki_enabled and is_debuntu
|
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
|
||||||
|
@ -29,4 +29,3 @@
|
||||||
|
|
||||||
- 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
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
register: ejabberd_config
|
register: ejabberd_config
|
||||||
|
|
||||||
- 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_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
command: /etc/sysconfig/olpc-scripts/setup.d/xs-rsync
|
command: /etc/sysconfig/olpc-scripts/setup.d/xs-rsync
|
||||||
creates=/etc/xinetd.d/xs-rsyncd
|
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
|
command: /bin/cp /etc/init.d/idmgr /usr/libexec/idmgr.init
|
||||||
creates=/usr/libexec/idmgr.init
|
creates=/usr/libexec/idmgr.init
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- name: Create iiab-admin user and password
|
- name: Create iiab-admin user and password
|
||||||
user: name={{ iiab_admin_user }}
|
user: name={{ iiab_admin_user }}
|
||||||
password={{ iiab_admin_passw_hash }}
|
password={{ iiab_admin_passw_hash }}
|
||||||
update_password=on_create
|
update_password=on_create
|
||||||
|
|
||||||
- name: Create a wheel group
|
- name: Create a wheel group
|
||||||
group: name=wheel
|
group: name=wheel
|
||||||
state=present
|
state=present
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
- name: Add user to wheel group
|
- name: Add user to wheel group
|
||||||
user: name={{ iiab_admin_user }} groups=wheel,sudo
|
user: name={{ iiab_admin_user }} groups=wheel,sudo
|
||||||
|
|
||||||
- name: Create root .ssh
|
- name: Create root .ssh
|
||||||
file: path=/root/.ssh
|
file: path=/root/.ssh
|
||||||
mode=0700
|
mode=0700
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0600
|
mode=0600
|
||||||
|
|
||||||
# backup=yes
|
# backup=yes
|
||||||
|
|
||||||
- name: edit the sudoers file--first make it editable
|
- name: edit the sudoers file--first make it editable
|
||||||
|
@ -42,15 +42,14 @@
|
||||||
dest=/etc/sudoers
|
dest=/etc/sudoers
|
||||||
|
|
||||||
- name: lets wheel sudo without password
|
- name: lets wheel sudo without password
|
||||||
lineinfile:
|
lineinfile:
|
||||||
line: "%wheel ALL= NOPASSWD: ALL"
|
line: "%wheel ALL= NOPASSWD: ALL"
|
||||||
dest: /etc/sudoers
|
dest: /etc/sudoers
|
||||||
|
|
||||||
- name: remove the line which requires tty
|
- name: remove the line which requires tty
|
||||||
lineinfile: regexp=requiretty
|
lineinfile: regexp=requiretty
|
||||||
state=absent
|
state=absent
|
||||||
dest=/etc/sudoers
|
dest=/etc/sudoers
|
||||||
|
|
||||||
- name: end editing the sudoers file-- protect it again
|
- name: end editing the sudoers file-- protect it again
|
||||||
shell: chmod 0440 /etc/sudoers
|
shell: chmod 0440 /etc/sudoers
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- mongodb-server
|
- mongodb-server
|
||||||
- mongodb
|
- mongodb
|
||||||
when: internet_available
|
when: internet_available
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Update main config file
|
- name: Update main config file
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
src=monitrc
|
src=monitrc
|
||||||
dest=/etc/monitrc
|
dest=/etc/monitrc
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
with_items: watchdog
|
with_items: watchdog
|
||||||
register: monit_config
|
register: monit_config
|
||||||
when: false
|
when: false
|
||||||
until: monit_config | success
|
until: monit_config | success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 1
|
delay: 1
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
- php{{ php_version }}-curl
|
- php{{ php_version }}-curl
|
||||||
# - php{{ php_version }}-zip
|
# - php{{ php_version }}-zip
|
||||||
- php{{ php_version }}-gd
|
- php{{ php_version }}-gd
|
||||||
# - php{{ php_version }}-mbstring
|
# - php{{ php_version }}-mbstring
|
||||||
# mbstring is now included in php-cli
|
# mbstring is now included in php-cli
|
||||||
- php{{ php_version }}-cli
|
- php{{ php_version }}-cli
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: php-zip debian 8-9 changed name
|
- name: php-zip debian 8-9 changed name
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
mode=0755
|
mode=0755
|
||||||
state=directory
|
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 }}
|
file: path={{ moodle_data }}
|
||||||
owner={{ apache_user }}
|
owner={{ apache_user }}
|
||||||
group={{ apache_user }}
|
group={{ apache_user }}
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
- name: Execute moodle startup script
|
- name: Execute moodle startup script
|
||||||
shell: '{{ moodle_base }}/moodle_installer'
|
shell: '{{ moodle_base }}/moodle_installer'
|
||||||
when: config.stat.exists is defined and not config.stat.exists
|
when: config.stat.exists is defined and not config.stat.exists
|
||||||
|
|
||||||
- name: Give apache permission to read config file
|
- name: Give apache permission to read config file
|
||||||
# command: chown -R {{ apache_user }} {{ moodle_base }}
|
# command: chown -R {{ apache_user }} {{ moodle_base }}
|
||||||
file: path={{ moodle_base }}/config.php
|
file: path={{ moodle_base }}/config.php
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
package: name=php-xml-parser state=present
|
package: name=php-xml-parser state=present
|
||||||
when: is_debian_8
|
when: is_debian_8
|
||||||
|
|
||||||
- name: Install MySQL
|
- name: Install MySQL
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
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"'
|
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
|
- option: enabled
|
||||||
value: "{{ mysql_enabled }}"
|
value: "{{ mysql_enabled }}"
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
register: avahi_ver
|
register: avahi_ver
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- 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/'
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# debian.yml
|
# debian.yml
|
||||||
# Start out making simplifying assumptions
|
# Start out making simplifying assumptions
|
||||||
# 1. we are dealing with a rpi3
|
# 1. we are dealing with a rpi3
|
||||||
# 2. Gui inputs define the config -- auto config is more difficult
|
# 2. Gui inputs define the config -- auto config is more difficult
|
||||||
# a. gui_desired_network_role
|
# a. gui_desired_network_role
|
||||||
# b. hostapd_enabled
|
# 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
|
# 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
|
# 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)
|
# 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
|
# 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
|
- name: in upgrade from earlier 6.2, delete the resolvconf
|
||||||
package: name=resolvconf
|
package: name=resolvconf
|
||||||
state=absent
|
state=absent
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
template: dest=/etc/network/interfaces
|
template: dest=/etc/network/interfaces
|
||||||
src=network/interfaces.j2
|
src=network/interfaces.j2
|
||||||
|
|
||||||
- name: Copy the bridge script
|
- name: Copy the bridge script
|
||||||
template: dest=/etc/network/interfaces.d/iiab
|
template: dest=/etc/network/interfaces.d/iiab
|
||||||
src=network/iiab.j2
|
src=network/iiab.j2
|
||||||
register: interface
|
register: interface
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
- name: restart the networking service
|
- name: restart the networking service
|
||||||
service: name=networking state=restarted
|
service: name=networking state=restarted
|
||||||
when: interface.changed
|
when: interface.changed
|
||||||
|
|
||||||
- name: start up hostapd again
|
- name: start up hostapd again
|
||||||
service: name=hostapd state=started
|
service: name=hostapd state=started
|
||||||
when: interface.changed
|
when: interface.changed
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
enabled=no
|
enabled=no
|
||||||
when: not wondershaper_enabled and wondershaper_install
|
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
|
- name: Grab clean copy of iiab-gen-iptables
|
||||||
template: src={{ item.0 }}
|
template: src={{ item.0 }}
|
||||||
dest={{ item.1 }}
|
dest={{ item.1 }}
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: iiab_lan_iface != "none" and not installing and not iiab_demo_mode
|
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
|
- name: Enabling ifcfg slaves
|
||||||
shell: nmcli conn up id "System {{ item|trim }}"
|
shell: nmcli conn up id "System {{ item|trim }}"
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
@ -95,4 +95,3 @@
|
||||||
- "{{ lan_list_result.stdout_lines }}"
|
- "{{ lan_list_result.stdout_lines }}"
|
||||||
|
|
||||||
# testpoint confirm with 'nmcli c show' 'brctl show'
|
# testpoint confirm with 'nmcli c show' 'brctl show'
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
when: not installing and not is_debuntu
|
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
|
||||||
state=absent
|
state=absent
|
||||||
|
|
||||||
- name: Remove iptables-xs.service file from /etc
|
- 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
|
state=absent
|
||||||
|
|
||||||
- name: Install iptables service package
|
- name: Install iptables service package
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
- include: computed_services.yml
|
- include: computed_services.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
- include: enable_services.yml
|
- include: enable_services.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
template: src=named/{{ dns_service }}.service
|
template: src=named/{{ dns_service }}.service
|
||||||
dest=/etc/systemd/system/{{ dns_service }}.service
|
dest=/etc/systemd/system/{{ dns_service }}.service
|
||||||
mode=0644
|
mode=0644
|
||||||
|
|
||||||
- name: The dns-jail redirect requires the named.blackhole,disabling recursion
|
- name: The dns-jail redirect requires the named.blackhole,disabling recursion
|
||||||
# in named-iiab.conf, and the redirection of 404 error documents to /
|
# in named-iiab.conf, and the redirection of 404 error documents to /
|
||||||
template: src=named/dns-jail.conf dest=/etc/{{ apache_config_dir }}/
|
template: src=named/dns-jail.conf dest=/etc/{{ apache_config_dir }}/
|
||||||
|
@ -77,16 +77,16 @@
|
||||||
- name: Separate enabling required for debian
|
- name: Separate enabling 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=link
|
state=link
|
||||||
when: is_debuntu 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_debuntu 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_debuntu and not dns_jail_enabled
|
when: not is_debuntu and not dns_jail_enabled
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
# The preferred method of disabling the LAN would be to set iiab_lan_enabled:
|
# The preferred method of disabling the LAN would be to set iiab_lan_enabled:
|
||||||
# False before getting here but we are here...
|
# False before getting here but we are here...
|
||||||
# Well if we got here something changed with the gateway and ifcfg-WAN maybe
|
# 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
|
# 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
|
# 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.
|
# way we can try the interfaces one by one starting with device_gw.
|
||||||
|
|
||||||
# Setting up three way conditions with the results
|
# Setting up three way conditions with the results
|
||||||
# skipped|changed|failed
|
# 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
|
# We only got here by way of no detected gateway, lets see if we can pick-up
|
||||||
# transient change like cable issues.
|
# transient change like cable issues.
|
||||||
|
|
||||||
- name: BAD DHCP defaults
|
- name: BAD DHCP defaults
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
service: name=dhcpd state=stopped
|
service: name=dhcpd state=stopped
|
||||||
|
|
||||||
### clear all connections first
|
### 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
|
- name: No ifcfg-WAN known
|
||||||
debug: msg="NO WAN known"
|
debug: msg="NO WAN known"
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
- name: Trying wifi first
|
- name: Trying wifi first
|
||||||
shell: nmcli conn up id {{ ap_name.stdout }}
|
shell: nmcli conn up id {{ ap_name.stdout }}
|
||||||
register: try_wifi
|
register: try_wifi
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: ap_name is defined and ap_named.changed
|
when: ap_name is defined and ap_named.changed
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
# We have the DEVICE?
|
# We have the DEVICE?
|
||||||
- name: Now setting iiab_wan_iface based on wifi
|
- name: Now setting iiab_wan_iface based on wifi
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_wan_iface: "{{ dhcp_wifi_results.stdout }}"
|
iiab_wan_iface: "{{ dhcp_wifi_results.stdout }}"
|
||||||
dhcp_good: True
|
dhcp_good: True
|
||||||
when: dhcp_wifi_results.stdout is defined and dhcp_wifi_results.stdout != ""
|
when: dhcp_wifi_results.stdout is defined and dhcp_wifi_results.stdout != ""
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
|
|
||||||
# We have the DEVICE?
|
# We have the DEVICE?
|
||||||
- name: Now setting iiab_wan_iface via nmcli
|
- name: Now setting iiab_wan_iface via nmcli
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_wan_iface: "{{ dhcp_1BY1_results.stdout }}"
|
iiab_wan_iface: "{{ dhcp_1BY1_results.stdout }}"
|
||||||
dhcp_good: True
|
dhcp_good: True
|
||||||
when: dhcp_1BY1_results.stdout is defined and dhcp_1BY1_results.stdout != "" and not has_WAN
|
when: dhcp_1BY1_results.stdout is defined and dhcp_1BY1_results.stdout != "" and not has_WAN
|
||||||
|
@ -138,4 +138,3 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_lan_iface: "none"
|
iiab_lan_iface: "none"
|
||||||
when: dhcp_good and adapter_count.stdout|int == "1"
|
when: dhcp_good and adapter_count.stdout|int == "1"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# rpi_debian.yml
|
# rpi_debian.yml
|
||||||
# Start out making simplifying assumptions
|
# Start out making simplifying assumptions
|
||||||
# 1. we are dealing with a rpi3
|
# 1. we are dealing with a rpi3
|
||||||
# 2. Gui inputs define the config -- auto config is more difficult
|
# 2. Gui inputs define the config -- auto config is more difficult
|
||||||
# a. gui_desired_network_role
|
# a. gui_desired_network_role
|
||||||
# b. hostapd_enabled
|
# 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
|
# 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
|
# 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)
|
# 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
|
# 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
|
- name: Raspbian stock has openresolv which is not available in debian, off it
|
||||||
package: name=openresolv
|
package: name=openresolv
|
||||||
state=absent
|
state=absent
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
gui_desired_network_role: "LanController"
|
gui_desired_network_role: "LanController"
|
||||||
when: not gui_desired_network_role is defined
|
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
|
template: dest=/etc/network/interfaces
|
||||||
src=network/interfaces.j2
|
src=network/interfaces.j2
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
template: dest=/etc/dhcpcd.conf
|
template: dest=/etc/dhcpcd.conf
|
||||||
src=network/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
|
template: dest=/etc/network/interfaces.d/iiab
|
||||||
src=network/iiab.j2
|
src=network/iiab.j2
|
||||||
register: interface
|
register: interface
|
||||||
|
@ -53,12 +53,12 @@
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: interface.changed
|
when: interface.changed
|
||||||
|
|
||||||
- name: and remove the device
|
- name: and remove the device
|
||||||
command: brctl delbr br0
|
command: brctl delbr br0
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: interface.changed
|
when: interface.changed
|
||||||
|
|
||||||
- name: reset the eth0 interface
|
- name: reset the eth0 interface
|
||||||
command: ifdown eth0
|
command: ifdown eth0
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: interface.changed
|
when: interface.changed
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
- name: restart the networking service
|
- name: restart the networking service
|
||||||
service: name=networking state=restarted
|
service: name=networking state=restarted
|
||||||
when: interface.changed
|
when: interface.changed
|
||||||
|
|
||||||
- name: start up hostapd again
|
- name: start up hostapd again
|
||||||
service: name=hostapd state=started
|
service: name=hostapd state=started
|
||||||
when: interface.changed
|
when: interface.changed
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# but we use the tar file to get the latest version; really only benefits the xo4 on fedora 18
|
# but we use the tar file to get the latest version; really only benefits the xo4 on fedora 18
|
||||||
- name: Get the nextcloud software
|
- name: Get the nextcloud software
|
||||||
get_url: url="{{ nextcloud_dl_url }}"/{{ nextcloud_src_file }} dest={{ downloads_dir }}/{{ nextcloud_src_file }}
|
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
|
- name: Copy it to permanent location /opt
|
||||||
unarchive: src={{ downloads_dir }}/{{ nextcloud_src_file }} dest=/opt/
|
unarchive: src={{ downloads_dir }}/{{ nextcloud_src_file }} dest=/opt/
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
- name: Get the nextcloud software
|
- name: Get the nextcloud software
|
||||||
get_url: url={{ nextcloud_dl_url }}/{{ nextcloud_src_file }} dest={{ downloads_dir }}/{{ nextcloud_src_file }}
|
get_url: url={{ nextcloud_dl_url }}/{{ nextcloud_src_file }} dest={{ downloads_dir }}/{{ nextcloud_src_file }}
|
||||||
when: internet_available
|
when: internet_available
|
||||||
async: 900
|
async: 900
|
||||||
poll: 15
|
poll: 15
|
||||||
tags:
|
tags:
|
||||||
|
@ -138,4 +138,3 @@
|
||||||
value: "{{ nextcloud_src_file }}"
|
value: "{{ nextcloud_src_file }}"
|
||||||
- option: enabled
|
- option: enabled
|
||||||
value: "{{ nextcloud_enabled }}"
|
value: "{{ nextcloud_enabled }}"
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
# the install wizard does not succeed if already installed
|
# the install wizard does not succeed if already installed
|
||||||
- name: Determine if nextcloud is installed
|
- name: Determine if nextcloud is installed
|
||||||
shell: >
|
shell: >
|
||||||
sudo -u {{ apache_user }} php
|
sudo -u {{ apache_user }} php
|
||||||
'{{ nextcloud_prefix }}/nextcloud/occ' status |
|
'{{ nextcloud_prefix }}/nextcloud/occ' status |
|
||||||
gawk '/installed:/ { print $3 }'
|
gawk '/installed:/ { print $3 }'
|
||||||
register: returned
|
register: returned
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
group=root
|
group=root
|
||||||
mode=0755
|
mode=0755
|
||||||
|
|
||||||
- name: Create the directory for scripts
|
- name: Create the directory for scripts
|
||||||
file: dest=/etc/openvpn/scripts
|
file: dest=/etc/openvpn/scripts
|
||||||
state=directory
|
state=directory
|
||||||
owner=root
|
owner=root
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
register: owncloud_page
|
register: owncloud_page
|
||||||
|
|
||||||
- name: Install owncloud package
|
- name: Install owncloud package
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
with_items:
|
||||||
- curl
|
- curl
|
||||||
|
@ -40,19 +40,19 @@
|
||||||
|
|
||||||
- name: Get the owncloud software
|
- name: Get the owncloud software
|
||||||
get_url: url={{ iiab_download_url }}/{{ owncloud_src_file }} dest={{ downloads_dir }}/{{ owncloud_src_file }}
|
get_url: url={{ iiab_download_url }}/{{ owncloud_src_file }} dest={{ downloads_dir }}/{{ owncloud_src_file }}
|
||||||
when: internet_available
|
when: internet_available
|
||||||
async: 300
|
async: 300
|
||||||
poll: 5
|
poll: 5
|
||||||
|
|
||||||
- name: Copy it to permanent location /opt
|
- name: Copy it to permanent location /opt
|
||||||
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
|
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
|
||||||
dest={{ owncloud_prefix }}
|
dest={{ owncloud_prefix }}
|
||||||
creates={{ owncloud_prefix }}/owncloud/version.php
|
creates={{ owncloud_prefix }}/owncloud/version.php
|
||||||
when: not is_F18
|
when: not is_F18
|
||||||
|
|
||||||
# ansible 1.4.1 does not have "creates"
|
# ansible 1.4.1 does not have "creates"
|
||||||
- name: Copy it to permanent location /opt
|
- name: Copy it to permanent location /opt
|
||||||
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
|
unarchive: src={{ downloads_dir }}/{{ owncloud_src_file }}
|
||||||
dest={{ owncloud_prefix }}
|
dest={{ owncloud_prefix }}
|
||||||
when: is_F18
|
when: is_F18
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,3 @@
|
||||||
lineinfile: regexp='overwrite.cli.url'
|
lineinfile: regexp='overwrite.cli.url'
|
||||||
state=absent
|
state=absent
|
||||||
dest="{{ owncloud_prefix }}/owncloud/config/config.php"
|
dest="{{ owncloud_prefix }}/owncloud/config/config.php"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- name: Remove if exist pathagar rpm version
|
- name: Remove if exist pathagar rpm version
|
||||||
package: name=pathagar
|
package: name=pathagar
|
||||||
state=absent
|
state=absent
|
||||||
|
|
||||||
- name: Install pathagar pre requisites (both fedora and debian)
|
- name: Install pathagar pre requisites (both fedora and debian)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- name: Get the phpmyadmin software
|
- name: Get the phpmyadmin software
|
||||||
get_url: url="{{ iiab_download_url }}/{{ phpMyAdmin }}" dest="{{ downloads_dir}}/phpMyAdmin.zip"
|
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
|
- name: Copy it to permanent location /opt
|
||||||
unarchive: src={{ downloads_dir }}/phpMyAdmin.zip dest=/opt/
|
unarchive: src={{ downloads_dir }}/phpMyAdmin.zip dest=/opt/
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
# Install and configure samba server (requires ports 137, 138, 139, 445 open).
|
# Install and configure samba server (requires ports 137, 138, 139, 445 open).
|
||||||
- name: Ensure Samba-related packages are installed.
|
- name: Ensure Samba-related packages are installed.
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
with_items:
|
||||||
- samba
|
- samba
|
||||||
|
@ -26,25 +26,25 @@
|
||||||
|
|
||||||
- name: Ensure Samba is running and set to start on boot.
|
- name: Ensure Samba is running and set to start on boot.
|
||||||
service: name={{ smb_service }} state=started enabled=yes
|
service: name={{ smb_service }} state=started enabled=yes
|
||||||
tags:
|
tags:
|
||||||
- samba
|
- samba
|
||||||
when : samba_enabled
|
when : samba_enabled
|
||||||
|
|
||||||
- name: netbios name server is running and set to start on boot.
|
- name: netbios name server is running and set to start on boot.
|
||||||
service: name={{ nmb_service }} state=started enabled=yes
|
service: name={{ nmb_service }} state=started enabled=yes
|
||||||
tags:
|
tags:
|
||||||
- samba
|
- samba
|
||||||
when : samba_enabled
|
when : samba_enabled
|
||||||
|
|
||||||
- name: Disable Samba if that is wanted
|
- name: Disable Samba if that is wanted
|
||||||
service: name={{ smb_service }} state=stopped enabled=no
|
service: name={{ smb_service }} state=stopped enabled=no
|
||||||
tags:
|
tags:
|
||||||
- samba
|
- samba
|
||||||
when : not samba_enabled
|
when : not samba_enabled
|
||||||
|
|
||||||
- name: Disable Samba name server if that is wanted
|
- name: Disable Samba name server if that is wanted
|
||||||
service: name={{ nmb_service }} state=stopped enabled=no
|
service: name={{ nmb_service }} state=stopped enabled=no
|
||||||
tags:
|
tags:
|
||||||
- samba
|
- samba
|
||||||
when : not samba_enabled
|
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"'
|
value: '"Samba is a Microsoft compatible remote file access system - generalized to CIFS --common internet file system"'
|
||||||
- option: enabled
|
- option: enabled
|
||||||
value: "{{ samba_enabled }}"
|
value: "{{ samba_enabled }}"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- name: Disable root login with password
|
- name: Disable root login with password
|
||||||
lineinfile: dest=/etc/ssh/sshd_config
|
lineinfile: dest=/etc/ssh/sshd_config
|
||||||
regexp='^PermitRootLogin'
|
regexp='^PermitRootLogin'
|
||||||
line='PermitRootLogin without-password'
|
line='PermitRootLogin without-password'
|
||||||
|
|
|
@ -32,13 +32,13 @@
|
||||||
service: name=sugar-stats-server
|
service: name=sugar-stats-server
|
||||||
enabled=yes
|
enabled=yes
|
||||||
when: sugar_stats_enabled
|
when: sugar_stats_enabled
|
||||||
|
|
||||||
- name: Disable sugar-stats service
|
- name: Disable sugar-stats service
|
||||||
service: name=sugar-stats-server
|
service: name=sugar-stats-server
|
||||||
enabled=no
|
enabled=no
|
||||||
when: not sugar_stats_enabled
|
when: not sugar_stats_enabled
|
||||||
|
|
||||||
- include: statistics-consolidation.yml
|
- include: statistics-consolidation.yml
|
||||||
|
|
||||||
- name: Add sugar-stats to service list
|
- name: Add sugar-stats to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- name: Download the latest stable version of sugarizer from location under our control
|
- name: Download the latest stable version of sugarizer from location under our control
|
||||||
get_url: url={{ iiab_download_url }}/{{ sugarizer_version }}.tar.gz
|
get_url: url={{ iiab_download_url }}/{{ sugarizer_version }}.tar.gz
|
||||||
dest={{ downloads_dir }}/{{ sugarizer_version }}.tar.gz
|
dest={{ downloads_dir }}/{{ sugarizer_version }}.tar.gz
|
||||||
|
|
||||||
#fixme
|
#fixme
|
||||||
- name: Untar it to target location
|
- name: Untar it to target location
|
||||||
command: tar xzf {{ downloads_dir }}/{{ sugarizer_version }}.tar.gz -C {{ sugarizer_location }}
|
command: tar xzf {{ downloads_dir }}/{{ sugarizer_version }}.tar.gz -C {{ sugarizer_location }}
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
npm_exists: True
|
npm_exists: True
|
||||||
when: npm.stat.exists is defined and npm.stat.exists
|
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 }}
|
template: src={{ item.src }}
|
||||||
dest={{ item.dest }}
|
dest={{ item.dest }}
|
||||||
owner=root
|
owner=root
|
||||||
|
@ -60,14 +60,14 @@
|
||||||
- name: Create the express framework for node.js - ALL less F18
|
- name: Create the express framework for node.js - ALL less F18
|
||||||
shell: npm install
|
shell: npm install
|
||||||
args:
|
args:
|
||||||
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
||||||
creates: "{{ sugarizer_location }}/sugarizer/server/node_modules"
|
creates: "{{ sugarizer_location }}/sugarizer/server/node_modules"
|
||||||
when: not is_F18 and not npm_exists
|
when: not is_F18 and not npm_exists
|
||||||
|
|
||||||
- name: Create the express framework for node.js - F18
|
- name: Create the express framework for node.js - F18
|
||||||
shell: npm install
|
shell: npm install
|
||||||
args:
|
args:
|
||||||
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
||||||
when: is_F18 and not npm_exists
|
when: is_F18 and not npm_exists
|
||||||
|
|
||||||
- name: enable services - All
|
- name: enable services - All
|
||||||
|
@ -95,6 +95,6 @@
|
||||||
- option: name
|
- option: name
|
||||||
value: Sugarizer
|
value: Sugarizer
|
||||||
- option: description
|
- 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
|
- option: enabled
|
||||||
value: "{{ sugarizer_enabled }}"
|
value: "{{ sugarizer_enabled }}"
|
||||||
|
|
|
@ -18,21 +18,21 @@
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Install X Windows on CentOS
|
- 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"
|
when: internet_available and ansible_distribution == "CentOS"
|
||||||
tags:
|
tags:
|
||||||
- download
|
- 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 }}"
|
get_url: url="{{ teamviewer_url }}/{{ teamviewer_rpm_file }}" dest="{{ yum_packages_dir }}/{{ teamviewer_rpm_file }}"
|
||||||
when: internet_available
|
when: internet_available
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
# F22 has issues with yum localinstall exclude for now
|
# F22 has issues with yum localinstall exclude for now
|
||||||
- name: Do the install of teamviewer, pulling in any required dependencies
|
- name: Do the install of teamviewer, pulling in any required dependencies
|
||||||
shell: "yum localinstall -y {{ yum_packages_dir }}/{{ teamviewer_rpm_file }}"
|
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"
|
and xo_model == "none" and ansible_distribution_version <= "21"
|
||||||
|
|
||||||
- name: making local copy available
|
- name: making local copy available
|
||||||
|
@ -45,4 +45,3 @@
|
||||||
with_items:
|
with_items:
|
||||||
- teamviewer*
|
- teamviewer*
|
||||||
when: teamviewer_install and xo_model == "none" and ansible_distribution_version >= "22"
|
when: teamviewer_install and xo_model == "none" and ansible_distribution_version >= "22"
|
||||||
|
|
||||||
|
|
|
@ -34,24 +34,24 @@
|
||||||
- name: Add apache config for content directory
|
- name: Add apache config for content directory
|
||||||
template: src=content_dir.conf
|
template: src=content_dir.conf
|
||||||
dest=/etc/{{ apache_config_dir }}
|
dest=/etc/{{ apache_config_dir }}
|
||||||
when: usb_lib_enabled
|
when: usb_lib_enabled
|
||||||
|
|
||||||
- name: create the link to enable for debian
|
- name: create the link to enable for 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=link
|
state=link
|
||||||
when: is_debuntu
|
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_debuntu 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
|
||||||
state=absent
|
state=absent
|
||||||
when: not usb_lib_enabled
|
when: not usb_lib_enabled
|
||||||
|
|
||||||
- name: Add usb-lib to service list
|
- name: Add usb-lib to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: put the config file in place
|
- name: put the config file in place
|
||||||
template: src=vnstat.conf.j2
|
template: src=vnstat.conf.j2
|
||||||
dest=/etc/vnstat.conf
|
dest=/etc/vnstat.conf
|
||||||
mode=0744
|
mode=0744
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
|
|
||||||
- name: create database for wan to collect vnstat data
|
- name: create database for wan to collect vnstat data
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- name: Get the WordPress software
|
- name: Get the WordPress software
|
||||||
get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}" dest={{ downloads_dir}}/
|
get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}" dest={{ downloads_dir}}/
|
||||||
register: wp_download_output
|
register: wp_download_output
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
- name: Copy it to permanent location /library
|
- name: Copy it to permanent location /library
|
||||||
unarchive: src={{ wp_download_output.dest }} dest=/library
|
unarchive: src={{ wp_download_output.dest }} dest=/library
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue