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