From 3d7c936c35f7b08df6f474eee66c5ba5cf7a2e23 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 10 Nov 2017 14:45:51 -0500 Subject: [PATCH 1/4] Clarified OS's in sugarizer/tasks/main.yml --- roles/sugarizer/tasks/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/sugarizer/tasks/main.yml b/roles/sugarizer/tasks/main.yml index 29764d060..22f61e9b2 100644 --- a/roles/sugarizer/tasks/main.yml +++ b/roles/sugarizer/tasks/main.yml @@ -12,16 +12,16 @@ src={{ sugarizer_location }}/{{ sugarizer_version }} state=link -- name: Set up apt sources on is_debuntu +- name: Set up apt sources (debuntu) shell: curl -sL https://deb.nodesource.com/setup_6.x | bash - when: internet_available and is_debuntu -- name: Install nodejs=6.* which includes /usr/bin/npm - is_debuntu +- name: Install nodejs=6.* which includes /usr/bin/npm (debuntu) package: name=nodejs=6.* state=present when: internet_available and is_debuntu -- name: Install npm non is_debuntu +- name: Install npm (OS's other than debuntu) package: name={{ item }} state=present when: internet_available and not is_debuntu @@ -55,20 +55,20 @@ # dest=/etc/apache2/sites-enabled/sugarizer.conf # state=link -- name: Create the express framework for node.js - ALL less F18 +- name: Create the express framework for node.js (OS's other than Fedora 18) shell: npm install args: 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 +- name: Create the express framework for node.js (Fedora 18) shell: npm install args: chdir: "{{ sugarizer_location }}/sugarizer/server" when: is_F18 and not npm_exists -- name: Enable services - All +- name: Enable services (all OS's) service: name={{ item.name }} enabled=yes state=restarted @@ -76,7 +76,7 @@ - { name: sugarizer } when: sugarizer_enabled -- name: Disable services - All +- name: Disable services (all OS's) service: name={{ item.name }} enabled=no state=stopped @@ -84,7 +84,7 @@ - { name: sugarizer } when: not sugarizer_enabled -- name: Add Sugarizer to service list +- name: Add 'sugarizer' to service list ini_file: dest='{{ service_filelist }}' section=sugarizer option='{{ item.option }}' From 0a2198dbed217ba8152bfad69adc53b5e948bb4b Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 10 Nov 2017 14:58:05 -0500 Subject: [PATCH 2/4] OS explanation untangled in 0-init/tasks/main.yml --- roles/0-init/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index 3bb8defd2..b3b9d9503 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -27,7 +27,7 @@ iiab_stage: '{{ ansible_local.local_facts.stage }}' # Networking uses a different file for the rpi -- name: Discover if this is a RPi -- if so assume it is running Raspbian +- name: Discover if this is running Raspbian -- if so assume it is an RPi set_fact: rpi_model: "rpi" is_rpi: True @@ -134,7 +134,7 @@ set_fact: mysql_service: mariadb -- name: Set mysqld_service to mysqld (etc) for Fedora 18 +- name: Set mysqld_service to mysqld etc (Fedora 18) set_fact: mysql_service: mysqld no_NM_reload: True From ef63e6e3561af814caf1668c2f3d4fb701f6f1e4 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 10 Nov 2017 15:33:19 -0500 Subject: [PATCH 3/4] AWStats OS clarifs in Ansible output --- roles/awstats/tasks/install.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/awstats/tasks/install.yml b/roles/awstats/tasks/install.yml index 0e10e5c33..06273e9a5 100644 --- a/roles/awstats/tasks/install.yml +++ b/roles/awstats/tasks/install.yml @@ -8,7 +8,7 @@ tags: - download -- name: Install AWStats package +- name: Install AWStats package (debuntu) package: name={{ item }} state=present with_items: @@ -18,7 +18,7 @@ tags: - download -- name: enable cgi execution +- name: enable cgi execution (debuntu) command: a2enmod cgi when: is_debuntu @@ -33,7 +33,7 @@ - "{{ awstats_data_dir }}" - "{{ apache_log_dir }}" -- name: Install the Apache config for AWStats +- name: Install the Apache config for AWStats (debuntu) 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 AWStats +- name: Install the Apache config for AWStats (OS's other than debuntu) template: src=apache-awstats.conf dest=/etc/{{ apache_config_dir }}/awstats.conf owner=root @@ -49,7 +49,7 @@ mode=0644 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 (debuntu) template: src=logrotate.d.apache2 dest=/etc/logrotate.d/apache2 when: is_debuntu @@ -63,13 +63,13 @@ command: mv /etc/awstats/awstats.conf /etc/awstats/awstats.conf.dist when: awstats.stat.islnk is defined and not awstats.stat.islnk -- name: Enable AWStats +- name: Enable AWStats (debuntu) file: src=/etc/apache2/sites-available/awstats.conf path=/etc/apache2/sites-enabled/awstats.conf state=link when: awstats_enabled and is_debuntu -- name: Disable AWStats +- name: Disable AWStats (debuntu) file: path=/etc/apache2/sites-enabled/awstats.conf state=absent when: not awstats_enabled and is_debuntu @@ -88,10 +88,10 @@ state=link when: awstats_enabled -- name: On first enabling of AWStats, summarize httpd logs up to now +- name: On first enabling of AWStats, summarize httpd logs up to now (OS's other than debuntu) shell: /bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=schoolserver -update 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 (debuntu) shell: /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -config=schoolserver -update when: awstats_enabled and is_debuntu From 1692a71eacbfe2c99d12006f30081462a817f7ae Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 11 Nov 2017 07:36:47 -0500 Subject: [PATCH 4/4] echo "{}" > /etc/iiab/config_vars.yml when /etc/iiab created (for now, so runtags works) --- iiab-install | 1 + 1 file changed, 1 insertion(+) diff --git a/iiab-install b/iiab-install index d4cb39bef..30e356005 100755 --- a/iiab-install +++ b/iiab-install @@ -72,6 +72,7 @@ echo "Placed /etc/ansible/facts.d/local_facts.fact into position." STAGE=0 if [ ! -f /etc/iiab/iiab.env ]; then mkdir -p /etc/iiab + echo "{}" > /etc/iiab/config_vars.yml else if [[ `grep STAGE= /etc/iiab/iiab.env` ]]; then source /etc/iiab/iiab.env