evolinux-base: add tags to hardawre tasks
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Jérémy Lecour 2021-07-07 14:32:38 +02:00 committed by Jérémy Lecour
parent b362fadc80
commit 73352f55d7
1 changed files with 44 additions and 1 deletions

View File

@ -3,6 +3,8 @@
apt:
name: pciutils
state: present
tags:
- packages
## Broadcom NetXtreme II
@ -12,6 +14,8 @@
register: broadcom_netextreme_search
failed_when: False
changed_when: False
tags:
- packages
# TODO: add the "non-free" part to the existing sources
# instead of adding a new source
@ -22,6 +26,8 @@
tasks_from: basics.yml
vars:
apt_basics_components: "main contrib non-free"
tags:
- packages
when: broadcom_netextreme_search.rc == 0
## RAID
@ -36,11 +42,15 @@
register: raidmodel
changed_when: "'FAILED' in raidmodel.stdout"
failed_when: "'FAILED' in raidmodel.stdout"
tags:
- packages
- name: Look for legacy apt keyring
stat:
path: /etc/apt/trusted.gpg
register: _trusted_gpg_keyring
tags:
- packages
- name: HPE Smart Storage Administrator (ssacli) is present
block:
@ -50,6 +60,8 @@
keyring: /etc/apt/trusted.gpg
state: absent
when: _trusted_gpg_keyring.stat.exists
tags:
- packages
- name: HPE GPG key is installed
copy:
@ -59,14 +71,21 @@
mode: "0644"
owner: root
group: root
tags:
- packages
- name: Add HPE repository
apt_repository:
repo: 'deb https://downloads.linux.hpe.com/SDR/repo/mcp {{ ansible_distribution_release }}/current non-free'
state: present
tags:
- packages
- name: Install HPE Smart Storage Administrator (ssacli)
apt:
name: ssacli
tags:
- packages
when:
- "'Hewlett-Packard Company Smart Array' in raidmodel.stdout"
- "'Adaptec Smart Storage PQI' in raidmodel.stdout"
@ -80,6 +99,8 @@
src: check_hpraid.cron.sh
dest: /etc/cron.{{ evolinux_cron_checkhpraid_frequency | mandatory }}/check_hpraid
mode: "0755"
tags:
- config
when: "'Adaptec Smart Storage PQI' in raidmodel.stdout"
- name: Install and configure cciss-vol-status (HP gen <10)
@ -88,12 +109,16 @@
apt:
name: cciss-vol-status
state: present
tags:
- packages
- name: cciss-vol-statusd init script is present (HP gen <10)
template:
src: hardware/cciss-vol-statusd.j2
dest: /etc/init.d/cciss-vol-statusd
mode: "0755"
tags:
- packages
- name: Configure cciss-vol-statusd (HP gen <10)
lineinfile:
@ -101,12 +126,17 @@
line: 'MAILTO="{{ raid_alert_email or general_alert_email | mandatory }}"'
regexp: 'MAILTO='
create: yes
tags:
- config
- name: Enable cciss-vol-status in systemd (HP gen <10)
service:
name: cciss-vol-statusd
enabled: true
state: restarted
tags:
- packages
- config
when: "'Hewlett-Packard Company Smart Array' in raidmodel.stdout"
- name: MegaRAID SAS package is present
@ -116,6 +146,8 @@
id: "23B3D3B4"
keyring: /etc/apt/trusted.gpg
state: absent
tags:
- packages
when: _trusted_gpg_keyring.stat.exists
- name: HWRaid GPG key is installed
@ -126,12 +158,16 @@
mode: "0644"
owner: root
group: root
tags:
- packages
when: ansible_distribution_major_version is version('9', '>=')
- name: Add HW tool repository
apt_repository:
repo: 'deb http://hwraid.le-vert.net/debian {{ ansible_distribution_release }} main'
state: present
tags:
- packages
- name: Install packages for DELL/LSI hardware
apt:
@ -139,18 +175,25 @@
- megacli
- megaclisas-status
allow_unauthenticated: yes
tags:
- packages
- name: Configure packages for DELL/LSI hardware
template:
src: hardware/megaclisas-statusd.j2
dest: /etc/default/megaclisas-statusd
mode: "0755"
tags:
- config
- name: Enable DELL/LSI hardware in systemd
service:
name: megaclisas-statusd
enabled: true
state: started
state: restarted
tags:
- packages
- config
when: "'MegaRAID' in raidmodel.stdout"
- meta: flush_handlers