From 287da8f58fc5b9ac5dc667b0bd5854b189c794a5 Mon Sep 17 00:00:00 2001 From: Lilian Roller Date: Wed, 17 Jul 2019 14:02:01 +0200 Subject: [PATCH] Add exception for old pi --- .ansible-lint | 1 + tasks/main.yml | 11 ++++++++--- tasks/os_info.yml | 2 +- tasks/sources.yml | 9 ++++++--- vars/main.yml | 8 ++++---- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index c1648fc..e652a03 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,2 +1,3 @@ skip_list: - '403' + - '204' diff --git a/tasks/main.yml b/tasks/main.yml index e7b8a59..5200013 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,21 +16,22 @@ update_cache: yes cache_valid_time: 43200 when: - ansible_os_family == 'Debian' + - ansible_os_family == 'Debian' + - ansible_machine != 'armv6l' - name: Install common base packages [all] become: yes package: name: "{{ base_packages }}" state: present + when: ansible_machine != 'armv6l' - name: Install common base packages [Fedora] become: yes package: name: "{{ fedora_packages }}" state: present - when: - ansible_distribution == 'Fedora' + when: ansible_distribution == 'Fedora' - name: install packages for everyone except centos/rhel become: true @@ -41,6 +42,8 @@ - ansible_os_family != 'RedHat' - ansible_distribution_version != "14.04" - ansible_distribution_version != "12.04" + - ansible_distribution_release != 'wheezy' + - ansible_machine != 'armv6l' - name: Install extra packages become: true @@ -50,6 +53,7 @@ when: - packages_extra is defined - packages_extra != '[]' + - ansible_machine != 'armv6l' - name: Remove rpcbind, nfs-common become: yes @@ -58,6 +62,7 @@ - rpcbind - nfs-common state: absent + when: ansible_machine != 'armv6l' - name: Upgrade all packages to latest become: true diff --git a/tasks/os_info.yml b/tasks/os_info.yml index 0f12047..caa294f 100644 --- a/tasks/os_info.yml +++ b/tasks/os_info.yml @@ -1,4 +1,4 @@ --- - name: Print OS Infos debug: - msg: " ansible_os_family = '{{ ansible_os_family }}'\n ansible_distribution = '{{ ansible_distribution }}'\n\n\n ansible_hostname = '{{ ansible_hostname }}'\n ansible_fqdn = '{{ ansible_fqdn }}'\n" + msg: " ansible_os_family = '{{ ansible_os_family }}'\n ansible_distribution = '{{ ansible_distribution }}'\n ansible_distribution_version = '{{ ansible_distribution_version }}'\n ansible_distribution_release = '{{ ansible_distribution_release }}'\n ansible_machine = '{{ ansible_machine }}'\n\n\n ansible_hostname = '{{ ansible_hostname }}'\n ansible_fqdn = '{{ ansible_fqdn }}'\n" diff --git a/tasks/sources.yml b/tasks/sources.yml index f5a0063..c14b1b4 100644 --- a/tasks/sources.yml +++ b/tasks/sources.yml @@ -9,8 +9,9 @@ state: present update_cache: yes cache_valid_time: 43200 - when: ansible_distribution == 'Debian' - + when: + - ansible_distribution == 'Debian' + - ansible_machine != 'armv6l' - name: add eth zurich apt become: true @@ -21,8 +22,9 @@ - add_ethz | bool - ansible_distribution == 'Debian' - ansible_distribution_release == "wheezy" or ansible_distribution_release == "buster" + - ansible_machine != 'armv6l' -- name: iremove eth zurich apt +- name: remove eth zurich apt become: true apt_repository: repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main @@ -30,3 +32,4 @@ when: - not add_ethz | bool - ansible_distribution == 'Debian' + - ansible_machine != 'armv6l' diff --git a/vars/main.yml b/vars/main.yml index e213424..0bfa48d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -14,17 +14,17 @@ base_packages: - net-tools - links -debian_packages: +debian_packages: + - debian-goodies - molly-guard - mtr-tiny - knot-dnsutils - - aptitude - python-apt - python3-apt - fio - - debian-goodies - apt-dater-host - apt-transport-https + - aptitude packages_for_all_except_rhel: - ranger @@ -47,5 +47,5 @@ fedora_packages: - python3-pip - python3 -playbook_version_number: 8961 # should be over ninethousand +playbook_version_number: 8964 # should be over ninethousand playbook_version_path: '/etc/ansible-version/base-packages_ffbsee_or_chaos-bodensee_github.version'