From b6580e7f3ad77b0b65cf463ca7ff3acba9efb55c Mon Sep 17 00:00:00 2001 From: Arky Date: Sun, 1 Oct 2017 16:45:11 +0700 Subject: [PATCH 1/4] Using Ansible file module to fix warnings Using Ansible file modules instead of 'chmod' to recursively change iiab_base directory permissions. Fixes warning in #324 --- roles/kiwix/tasks/kiwix_install.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/kiwix/tasks/kiwix_install.yml b/roles/kiwix/tasks/kiwix_install.yml index b0d5ec5dc..355662934 100644 --- a/roles/kiwix/tasks/kiwix_install.yml +++ b/roles/kiwix/tasks/kiwix_install.yml @@ -72,7 +72,10 @@ # workaround because unarchive does not set ownership properly - name: Set kiwix ownership - command: "chown -R root:root {{ iiab_base }}" + file: path="{{ iiab_base }}" + owner=root + group=root + recurse=yes # workaround because kiwix-serve does not stay running - name: Make an entry in crontab to restart every hour From 2d433d287234641bee1aef37a3c7fe514d862b91 Mon Sep 17 00:00:00 2001 From: Arky Date: Sun, 1 Oct 2017 17:03:24 +0700 Subject: [PATCH 2/4] Using Ansible get_url module to fix warnings Using Ansible 'get_url' modules instead of 'wget' to download usbmout package. Fixes warnings in bug #327 --- roles/2-common/tasks/packages.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/2-common/tasks/packages.yml b/roles/2-common/tasks/packages.yml index 3e2a88611..2c1b68ace 100644 --- a/roles/2-common/tasks/packages.yml +++ b/roles/2-common/tasks/packages.yml @@ -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!!! @@ -39,7 +39,9 @@ when: is_redhat - name: Download usbmount -- not in debian-9 - command: wget {{ iiab_download_url }}/usbmount_0.0.14.1_all.deb -P {{ downloads_dir }} + get_url: + url: "{{ iiab_download_url }}/usbmount_0.0.14.1_all.deb" + dest: "{{ downloads_dir }}" when: is_debian_9 - name: Install usbmount for debian-9 @@ -97,7 +99,7 @@ - python-pip - python-setuptools - python-virtualenv - + - name: Update common packages (not debian package: name={{ item }} state=latest @@ -124,7 +126,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 From b6bec948302fa62d03793742d3a55e6122213f2d Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 9 Nov 2017 05:54:54 -0500 Subject: [PATCH 3/4] file: path="{{ iiab_base }}/kiwix" --- roles/kiwix/tasks/kiwix_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kiwix/tasks/kiwix_install.yml b/roles/kiwix/tasks/kiwix_install.yml index 355662934..ebb5511c2 100644 --- a/roles/kiwix/tasks/kiwix_install.yml +++ b/roles/kiwix/tasks/kiwix_install.yml @@ -72,7 +72,7 @@ # workaround because unarchive does not set ownership properly - name: Set kiwix ownership - file: path="{{ iiab_base }}" + file: path="{{ iiab_base }}/kiwix" owner=root group=root recurse=yes From 41033ba949a4efd47fe6a8aca833bc936ad80ddf Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 9 Nov 2017 12:21:57 -0600 Subject: [PATCH 4/4] br0 - single interface mis-detection --- roles/network/tasks/detected_network.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/network/tasks/detected_network.yml b/roles/network/tasks/detected_network.yml index 6848199dc..29b0bd73d 100644 --- a/roles/network/tasks/detected_network.yml +++ b/roles/network/tasks/detected_network.yml @@ -144,12 +144,12 @@ - name: 2 or more devices on the LAN - use bridging set_fact: iiab_lan_iface: br0 - when: num_lan_interfaces >= 2 and not is_rpi + when: num_lan_interfaces|int >= 2 and not is_rpi - name: For Debian, always use bridging - except RPi set_fact: iiab_lan_iface: br0 - when: num_lan_interfaces >= 1 and is_debuntu and not is_rpi + when: num_lan_interfaces|int >= 1 and is_debuntu and not is_rpi - name: WiFi is on the LAN - use bridging - except RPi set_fact: