From 195799343576874c9a7d67580732c035cb13510c Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 7 Jul 2020 12:59:43 -0500 Subject: [PATCH 01/11] OSM- ensure php{{ php_version }}-sqlite3 is installed --- roles/osm-vector-maps/tasks/install.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/osm-vector-maps/tasks/install.yml b/roles/osm-vector-maps/tasks/install.yml index d50c414d4..c9e199ecc 100644 --- a/roles/osm-vector-maps/tasks/install.yml +++ b/roles/osm-vector-maps/tasks/install.yml @@ -1,3 +1,8 @@ +- name: Install php{{ php_version }}-sqlite3 + package: + name: "php{{ php_version }}-sqlite3" + state: present + - name: Ensure directory {{ vector_map_path }}/maplist/assets exists file: path: "{{ vector_map_path }}/maplist/assets" # /library/www/osm-vector-maps From e29ad5b142bdc998288c6c68e9a057f1ce13442b Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 7 Jul 2020 13:02:00 -0500 Subject: [PATCH 02/11] httpd roles can be optional, move php -curl, -sqlite3 to common location in mysql with other php packages --- roles/httpd/tasks/install.yml | 16 ++++++++-------- roles/mysql/tasks/install.yml | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/roles/httpd/tasks/install.yml b/roles/httpd/tasks/install.yml index e5f919821..ddb4a48ce 100644 --- a/roles/httpd/tasks/install.yml +++ b/roles/httpd/tasks/install.yml @@ -5,8 +5,8 @@ name: - "{{ apache_service }}" # apache2 on Debuntu - "libapache2-mod-php{{ php_version }}" # 2020-06-15: Required (e.g. for Elgg, Moodle & possibly others) now that mysql/tasks/install.yml installs "php{{ php_version }}-common" rather than the full "php{{ php_version }}" - - "php{{ php_version }}" - - "php{{ php_version }}-curl" +# - "php{{ php_version }}" +# - "php{{ php_version }}-curl" state: present when: is_debuntu | bool # when: is_debian | bool @@ -32,12 +32,12 @@ # is the only role that needs it? # # Legacy Comment: SQLite3 no longer included in another package -- name: Install php{{ php_version }}-sqlite3 (raspbian-9+ or debian-9+ or ubuntu-18+) - package: - name: "php{{ php_version }}-sqlite3" - #when: is_raspbian_9 or is_debian_9 or is_ubuntu_18 - when: is_debuntu and (not is_debian_8) and (not is_ubuntu_16) - #when: (is_debian and ansible_distribution_major_version == "9") or is_ubuntu_18 +#- name: Install php{{ php_version }}-sqlite3 (raspbian-9+ or debian-9+ or ubuntu-18+) +# package: +# name: "php{{ php_version }}-sqlite3" +# #when: is_raspbian_9 or is_debian_9 or is_ubuntu_18 +# when: is_debuntu and (not is_debian_8) and (not is_ubuntu_16) +# #when: (is_debian and ansible_distribution_major_version == "9") or is_ubuntu_18 - name: 'Install 4 packages: httpd, mod_authnz_external, php, php-curl (redhat)' package: diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index 9c7d5678f..4b5104799 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -12,12 +12,14 @@ - mariadb-client # - php{{ php_version }} # On Ubuntu 20.04 (and prob other OS's) this forces the install of: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php{{ php_version }} ETC - php{{ php_version }}-common # 2020-05-21: @jvonau suggests this to avoid Apache above. Or its superset php{{ php_version }}-cli if absolutely nec? + - php{{ php_version }}-curl - php{{ php_version }}-mysql - php-pear - php{{ php_version }}-gd - php{{ php_version }}-imap - php{{ php_version }}-ldap - php{{ php_version }}-odbc + - php{{ php_version }}-sqlite3 - php{{ php_version }}-xml # Was below - php{{ php_version }}-xmlrpc state: present From 168716f077af9579d9327bc8f40e27c898dec73b Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 7 Jul 2020 14:22:07 -0400 Subject: [PATCH 03/11] mysql/tasks/install.yml: 9 -> 11 php packages --- roles/mysql/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index 4b5104799..14a77a196 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -5,7 +5,7 @@ # - 7 DB config # - 2 record as installed -- name: 'Install MySQL packages: mariadb-server, mariadb-client, and 9 php packages (debuntu)' +- name: 'Install MySQL packages: mariadb-server, mariadb-client, and 11 php packages (debuntu)' package: name: - mariadb-server From 1783a52a90c56ce8c0831d1b36678e0bc09afa33 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 7 Jul 2020 13:27:49 -0500 Subject: [PATCH 04/11] remove number of packages --- roles/mysql/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index 14a77a196..6d61cd4dc 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -5,7 +5,7 @@ # - 7 DB config # - 2 record as installed -- name: 'Install MySQL packages: mariadb-server, mariadb-client, and 11 php packages (debuntu)' +- name: 'Install MySQL packages: mariadb-server, mariadb-client, and php packages (debuntu)' package: name: - mariadb-server From 4f177f1b65f07947aa76992f86522cdc61e21393 Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Thu, 9 Jul 2020 18:50:56 -0400 Subject: [PATCH 05/11] change resize service to use growpart, which must be installed for raspios --- roles/1-prep/tasks/raspberry_pi.yml | 1 + roles/1-prep/templates/iiab-rpi-max-rootfs.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index adb7a0a46..3c9ed54ad 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -39,6 +39,7 @@ - iw - rfkill - wireless-tools + - cloud-guest-utils state: present - name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails diff --git a/roles/1-prep/templates/iiab-rpi-max-rootfs.sh b/roles/1-prep/templates/iiab-rpi-max-rootfs.sh index 02c8cbe15..42f4d1c65 100644 --- a/roles/1-prep/templates/iiab-rpi-max-rootfs.sh +++ b/roles/1-prep/templates/iiab-rpi-max-rootfs.sh @@ -14,7 +14,7 @@ if [ -f /.resize-rootfs ];then root_part_no=${root_part: (-1)} # Resize partition - parted -s /dev/$root_dev resizepart $root_part_no 100% + growpart /dev/$root_dev resizepart $root_part_no resize2fs /dev/$root_part rm /.resize-rootfs fi From e24862cfcfbc18c30c359ce264d9c6ae97855b31 Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Fri, 10 Jul 2020 08:47:31 -0400 Subject: [PATCH 06/11] syntax --- roles/1-prep/templates/iiab-rpi-max-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/1-prep/templates/iiab-rpi-max-rootfs.sh b/roles/1-prep/templates/iiab-rpi-max-rootfs.sh index 42f4d1c65..d24788602 100644 --- a/roles/1-prep/templates/iiab-rpi-max-rootfs.sh +++ b/roles/1-prep/templates/iiab-rpi-max-rootfs.sh @@ -14,7 +14,7 @@ if [ -f /.resize-rootfs ];then root_part_no=${root_part: (-1)} # Resize partition - growpart /dev/$root_dev resizepart $root_part_no + growpart /dev/$root_dev $root_part_no resize2fs /dev/$root_part rm /.resize-rootfs fi From 0c54429381b7fe5e494459c2224636e3919260c0 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 10 Jul 2020 10:02:18 -0400 Subject: [PATCH 07/11] Experiment: install sqlite3 within osm-vector-maps only --- roles/mysql/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index 6d61cd4dc..d0e0b27c4 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -5,7 +5,7 @@ # - 7 DB config # - 2 record as installed -- name: 'Install MySQL packages: mariadb-server, mariadb-client, and php packages (debuntu)' +- name: 'Install MySQL packages: mariadb-server, mariadb-client, and ~10 php packages (debuntu)' package: name: - mariadb-server @@ -19,7 +19,7 @@ - php{{ php_version }}-imap - php{{ php_version }}-ldap - php{{ php_version }}-odbc - - php{{ php_version }}-sqlite3 + # - php{{ php_version }}-sqlite3 # 2020-07-10: Experimentally install this within roles/osm-vector-maps/tasks/install.yml only, as part of OSM fix PR #2464 for #2461. - php{{ php_version }}-xml # Was below - php{{ php_version }}-xmlrpc state: present From 987be7398c4c39ee4cc597a5e8f1bcdb0129420c Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 11 Jul 2020 12:47:04 -0400 Subject: [PATCH 08/11] Try moving install of 10 php packages to www_base/tasks/main.yml --- roles/mysql/tasks/install.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index d0e0b27c4..a2209e6e8 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -5,26 +5,16 @@ # - 7 DB config # - 2 record as installed -- name: 'Install MySQL packages: mariadb-server, mariadb-client, and ~10 php packages (debuntu)' +- name: 'Install MySQL packages: mariadb-server, mariadb-client (debuntu)' package: name: - mariadb-server - mariadb-client - # - php{{ php_version }} # On Ubuntu 20.04 (and prob other OS's) this forces the install of: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php{{ php_version }} ETC - - php{{ php_version }}-common # 2020-05-21: @jvonau suggests this to avoid Apache above. Or its superset php{{ php_version }}-cli if absolutely nec? - - php{{ php_version }}-curl - - php{{ php_version }}-mysql - - php-pear - - php{{ php_version }}-gd - - php{{ php_version }}-imap - - php{{ php_version }}-ldap - - php{{ php_version }}-odbc - # - php{{ php_version }}-sqlite3 # 2020-07-10: Experimentally install this within roles/osm-vector-maps/tasks/install.yml only, as part of OSM fix PR #2464 for #2461. - - php{{ php_version }}-xml # Was below - - php{{ php_version }}-xmlrpc state: present when: is_debuntu | bool +# 2020-07-11: ~10 PHP package installs moved to roles/www_base/tasks/main.yml + # - name: "Install packages: mysql, MySQL-python and 9 php packages (OS's other than debuntu)" # package: # name: From 8b4358bdbc78a1196692c2be5546652465bf55a8 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 11 Jul 2020 12:47:25 -0400 Subject: [PATCH 09/11] Try moving install of 10 php packages to www_base/tasks/main.yml --- roles/www_base/tasks/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/roles/www_base/tasks/main.yml b/roles/www_base/tasks/main.yml index 4ee7dd2a7..f4bfb1917 100644 --- a/roles/www_base/tasks/main.yml +++ b/roles/www_base/tasks/main.yml @@ -1,6 +1,24 @@ # Role "www_base" runs here, probably in 3-BASE-SERVER. # Role "www_options" runs later, likely in 4-SERVER-OPTIONS. +- name: 'Install ~10 php packages (debuntu)' + package: + name: + # - php{{ php_version }} # On Ubuntu 20.04 (and prob other OS's) this forces the install of: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php{{ php_version }} ETC + - php{{ php_version }}-common # 2020-05-21: @jvonau suggests this to avoid Apache above. Or its superset php{{ php_version }}-cli if absolutely nec? + - php{{ php_version }}-curl + - php{{ php_version }}-gd + - php{{ php_version }}-imap + - php{{ php_version }}-ldap + - php{{ php_version }}-mysql + - php{{ php_version }}-odbc + - php-pear + # - php{{ php_version }}-sqlite3 # 2020-07-10: Experimentally install this within roles/osm-vector-maps/tasks/install.yml only, as part of OSM fix PR #2464 for #2461. + - php{{ php_version }}-xml # Was below + - php{{ php_version }}-xmlrpc + state: present + when: is_debuntu | bool + - name: Using html.yml include_tasks: html.yml From 4ffb1f50a1f46f02b6130698100ea6a2a4d00fbc Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 11 Jul 2020 12:50:20 -0400 Subject: [PATCH 10/11] Explanation in mysql/tasks/install.yml --- roles/mysql/tasks/install.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/mysql/tasks/install.yml b/roles/mysql/tasks/install.yml index a2209e6e8..23baf1f4a 100644 --- a/roles/mysql/tasks/install.yml +++ b/roles/mysql/tasks/install.yml @@ -13,7 +13,9 @@ state: present when: is_debuntu | bool -# 2020-07-11: ~10 PHP package installs moved to roles/www_base/tasks/main.yml +# 2020-07-11: +# 10 PHP package installs moved to roles/www_base/tasks/main.yml +# php{{ php_version }}-sqlite3 install moved to roles/osm-vector-maps/tasks/install.yml # - name: "Install packages: mysql, MySQL-python and 9 php packages (OS's other than debuntu)" # package: From 3c381bef0771a73082297e8df74db093d512c96b Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 11 Jul 2020 12:57:36 -0400 Subject: [PATCH 11/11] Comment in www_base/tasks/main.yml --- roles/www_base/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/www_base/tasks/main.yml b/roles/www_base/tasks/main.yml index f4bfb1917..f19bea409 100644 --- a/roles/www_base/tasks/main.yml +++ b/roles/www_base/tasks/main.yml @@ -1,7 +1,7 @@ # Role "www_base" runs here, probably in 3-BASE-SERVER. # Role "www_options" runs later, likely in 4-SERVER-OPTIONS. -- name: 'Install ~10 php packages (debuntu)' +- name: 'Install ~10 PHP packages (debuntu)' package: name: # - php{{ php_version }} # On Ubuntu 20.04 (and prob other OS's) this forces the install of: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php{{ php_version }} ETC