From: Loic Dachary Date: Wed, 6 Apr 2016 19:04:16 +0000 (+0200) Subject: skip packages / repo unavailable on aarch64 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af1f8c86285cbc4a5cb483bf52f4fab12ab8fcd8;p=ceph-cm-ansible.git skip packages / repo unavailable on aarch64 Signed-off-by: Loic Dachary --- diff --git a/roles/testnode/tasks/apt/packages.yml b/roles/testnode/tasks/apt/packages.yml index c8072669..44dc7518 100644 --- a/roles/testnode/tasks/apt/packages.yml +++ b/roles/testnode/tasks/apt/packages.yml @@ -15,6 +15,16 @@ with_items: packages_to_upgrade when: packages_to_upgrade|length > 0 +- name: Upgrade non aarch64 packages + apt: + name: "{{ item }}" + state: latest + force: yes + with_items: non_aarch64_packages_to_upgrade + when: + non_aarch64_packages_to_upgrade|length > 0 and + ansible_architecture != "aarch64" + - name: Install packages apt: name: "{{ item }}" @@ -22,3 +32,10 @@ with_items: packages|list + common_packages|list when: packages|length > 0 or common_packages|length > 0 + +- name: Install non aarch64 packages + apt: + name: "{{ item }}" + state: present + with_items: non_aarch64_packages|list + non_aarch64_common_packages|list + when: ansible_architecture != "aarch64" diff --git a/roles/testnode/tasks/apt/repos.yml b/roles/testnode/tasks/apt/repos.yml index 131923c2..d1c4cd5e 100644 --- a/roles/testnode/tasks/apt/repos.yml +++ b/roles/testnode/tasks/apt/repos.yml @@ -29,6 +29,7 @@ group: root mode: 0644 register: sources + when: ansible_architecture != "aarch64" - name: Install apt keys apt_key: @@ -55,3 +56,4 @@ mode: 0644 with_items: apt_repos|list + common_apt_repos|list register: local_apt_repos + when: ansible_architecture != "aarch64" diff --git a/roles/testnode/tasks/main.yml b/roles/testnode/tasks/main.yml index 49f04c1e..7b0f536b 100644 --- a/roles/testnode/tasks/main.yml +++ b/roles/testnode/tasks/main.yml @@ -58,6 +58,11 @@ - include: setup-ubuntu.yml when: ansible_distribution == "Ubuntu" +- include: setup-ubuntu-non-aarch64.yml + when: + ansible_distribution == "Ubuntu" and + ansible_architecture != "aarch64" + # configure debian specific things - include: setup-debian.yml when: ansible_distribution == "Debian" diff --git a/roles/testnode/tasks/setup-ubuntu-non-aarch64.yml b/roles/testnode/tasks/setup-ubuntu-non-aarch64.yml new file mode 100644 index 00000000..48f21702 --- /dev/null +++ b/roles/testnode/tasks/setup-ubuntu-non-aarch64.yml @@ -0,0 +1,70 @@ +--- +- name: Upload weekly kernel-clean crontab. + template: + src: cron/kernel-clean + dest: /etc/cron.weekly/kernel-clean + owner: root + group: root + mode: 0755 + notify: + - restart cron + +- name: Upload /etc/grub.d/02_force_timeout. + template: + src: grub.d/02_force_timeout + dest: /etc/grub.d/02_force_timeout + owner: root + group: root + mode: 0755 + +- name: Enable kernel logging to console. + script: scripts/kernel_logging.sh creates=/kernel-logging-setup + register: kernel_logging + tags: + - kernel_logging + +- name: Update grub + command: update-grub + when: kernel_logging|changed + tags: + - kernel_logging + +- name: Upload ttyS1.conf. + template: + src: ttyS1.conf + dest: /etc/init/ttyS1.conf + owner: root + group: root + mode: 0644 + notify: + - start ttyS1 + +# this only runs on mira nodes +- name: Upload ttyS2.conf. + template: + src: ttyS2.conf + dest: /etc/init/ttyS2.conf + owner: root + group: root + mode: 0644 + notify: + - start ttyS2 + when: ansible_hostname | search("^mira*") + +- name: Enable kernel modules to load at boot time. + template: + src: modules + dest: /etc/modules + owner: root + group: root + mode: 0644 + +- name: Enabling auto-fsck fix to prevent boot hangup. + lineinfile: + dest: /etc/default/rcS + line: "FSCKFIX=yes" + regexp: "FSCKFIX=no" + # backrefs makes it so that if the regexp + # isn't found the file is left unchanged + backrefs: yes + state: present diff --git a/roles/testnode/tasks/setup-ubuntu.yml b/roles/testnode/tasks/setup-ubuntu.yml index 3e06e7af..d3599bf4 100644 --- a/roles/testnode/tasks/setup-ubuntu.yml +++ b/roles/testnode/tasks/setup-ubuntu.yml @@ -4,81 +4,11 @@ path: /etc/ceph state: absent -- name: Upload weekly kernel-clean crontab. - template: - src: cron/kernel-clean - dest: /etc/cron.weekly/kernel-clean - owner: root - group: root - mode: 0755 - notify: - - restart cron - # Install and configure cpan and Amazon::S3 - include: cpan.yml tags: - cpan -- name: Upload /etc/grub.d/02_force_timeout. - template: - src: grub.d/02_force_timeout - dest: /etc/grub.d/02_force_timeout - owner: root - group: root - mode: 0755 - -- name: Enable kernel logging to console. - script: scripts/kernel_logging.sh creates=/kernel-logging-setup - register: kernel_logging - tags: - - kernel_logging - -- name: Update grub - command: update-grub - when: kernel_logging|changed - tags: - - kernel_logging - -- name: Upload ttyS1.conf. - template: - src: ttyS1.conf - dest: /etc/init/ttyS1.conf - owner: root - group: root - mode: 0644 - notify: - - start ttyS1 - -# this only runs on mira nodes -- name: Upload ttyS2.conf. - template: - src: ttyS2.conf - dest: /etc/init/ttyS2.conf - owner: root - group: root - mode: 0644 - notify: - - start ttyS2 - when: ansible_hostname | search("^mira*") - -- name: Enable kernel modules to load at boot time. - template: - src: modules - dest: /etc/modules - owner: root - group: root - mode: 0644 - -- name: Enabling auto-fsck fix to prevent boot hangup. - lineinfile: - dest: /etc/default/rcS - line: "FSCKFIX=yes" - regexp: "FSCKFIX=no" - # backrefs makes it so that if the regexp - # isn't found the file is left unchanged - backrefs: yes - state: present - - include: nfs.yml tags: - nfs diff --git a/roles/testnode/vars/ubuntu.yml b/roles/testnode/vars/ubuntu.yml index 7acb8022..f10bd220 100644 --- a/roles/testnode/vars/ubuntu.yml +++ b/roles/testnode/vars/ubuntu.yml @@ -24,18 +24,15 @@ common_packages: - python-gevent # for running ceph - libedit2 - - libssl0.9.8 - cryptsetup-bin - xfsprogs - gdisk - parted ### # for setting BIOS settings - - smbios-utils ### - libcrypto++9 - libuuid1 - - libfcgi - btrfs-tools # for compiling helpers and such - libatomic-ops-dev @@ -45,7 +42,6 @@ common_packages: - attr - dbench - bonnie++ - - iozone3 - valgrind - python-nose - mpich2 @@ -60,7 +56,6 @@ common_packages: - libacl1-dev - bc - xfsdump - - dmapi - xfslibs-dev - libattr1-dev - quota @@ -68,7 +63,6 @@ common_packages: - libncurses5-dev - lvm2 ### - - sysprof - vim - pdsh - collectl @@ -104,9 +98,19 @@ common_packages: - nfs-common - nfs-kernel-server +non_aarch64_common_packages: + - libssl0.9.8 + - smbios-utils + - libfcgi + - iozone3 + - dmapi + - sysprof + packages_to_upgrade: - apt - apache2 + +non_aarch64_packages_to_upgrade: - libapache2-mod-fastcgi packages_to_remove: diff --git a/roles/testnode/vars/ubuntu_14.yml b/roles/testnode/vars/ubuntu_14.yml index e1af4184..6450c14e 100644 --- a/roles/testnode/vars/ubuntu_14.yml +++ b/roles/testnode/vars/ubuntu_14.yml @@ -6,9 +6,11 @@ # - "deb [arch=amd64] http://{{ mirror_host }}/blkin/ trusty main" packages: - - libgoogle-perftools4 - libboost-thread1.54.0 - mpich - qemu-system-x86 # - blkin - lttng-tools + +non_aarch64_packages: + - libgoogle-perftools4