Update ansible code
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Adrien Reslinger 2022-08-16 14:55:44 +02:00
parent 8402c78e99
commit 82bdb9a37d
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
4 changed files with 39 additions and 32 deletions

View file

@ -0,0 +1,5 @@
# https://github.com/lm-sensors/lm-sensors/tree/master/configs/Asus/H87-Pro.conf
chip "nct6791-*"
label fan2 "Watter Pompe"
label fan6 "cpu_opt"

View file

@ -0,0 +1,2 @@
# https://support.google.com/titansecuritykey/answer/9148044?hl=fr
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="18d1|096e", ATTRS{idProduct}=="5026|0858|085b", TAG+="uaccess"

View file

@ -6,13 +6,13 @@ galaxy_info:
galaxy_tags: []
license: GPL2
platforms:
- name: CentOS
version:
- 7
- 8
- 9
- name: RedHat
version:
- 7
- 8
- 9
- name: CentOS
version:
- 7
- 8
- 9
- name: RedHat
version:
- 7
- 8
- 9

View file

@ -1,10 +1,10 @@
---
- block:
- name: Include vars for {{ ansible_os_family }}
include_vars: "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
ansible.builtin.include_vars: "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
- name: Change /bin/sh link on Ubuntu
file:
ansible.builtin.file:
src: "bash"
dest: "/bin/sh"
owner: root
@ -14,7 +14,7 @@
- "ansible_distribution == 'Ubuntu'"
- name: Install EPEL repo definition packages for {{ ansible_os_family }} on x86_64 and aarch64 plateform
package:
ansible.builtin.package:
name: "{{ item }}"
update_cache: true
state: present
@ -27,7 +27,7 @@
- not ansible_machine == "armv6l"
- name: Install EPEL repo definition packages for OracleLinux on x86_64 and aarch64 plateform
package:
ansible.builtin.package:
name: "{{ item }}"
update_cache: true
state: present
@ -39,7 +39,7 @@
- not ansible_machine == "armv6l"
- name: Install EPEL repo definition for {{ ansible_os_family }} on ARM 32b plateform
template:
ansible.builtin.template:
src: etc/yum.repos.d/epel_arm.repo.j2
dest: /etc/yum.repos.d/epel.repo
owner: root
@ -52,13 +52,13 @@
# or ansible_machine == "armv6l"
- name: Install base packages for {{ ansible_os_family }}
package:
ansible.builtin.package:
name: "{{ base_packages }}"
update_cache: true
state: present
- name: echo 'LANG="{{ locale }}"' > /etc/locale.conf
template:
ansible.builtin.template:
src: locale.conf.j2
dest: /etc/locale.conf
owner: root
@ -79,7 +79,7 @@
# UTC
- name: "Configure auto update for RHEL 7 linux family"
template:
ansible.builtin.template:
src: etc/yum/yum-cron.conf.j2
dest: /etc/yum/yum-cron.conf
owner: root
@ -91,7 +91,7 @@
- ansible_distribution_major_version == '7'
- name: "Configure auto update for RHEL 8/9 linux family"
template:
ansible.builtin.template:
src: etc/dnf/automatic.conf.j2
dest: /etc/dnf/automatic.conf
owner: root
@ -103,7 +103,7 @@
- ansible_distribution_major_version >= '8'
- name: enable a timer for dnf-automatic for RHEL 8 linux family
systemd:
ansible.builtin.systemd:
name: dnf-automatic.timer
state: started
enabled: true
@ -114,7 +114,7 @@
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/managing_monitoring_and_updating_the_kernel/index#applying-patches-with-kernel-live-patching_managing-monitoring-and-updating-the-kernel
- name: Install kpatch packages on RedHat Enterprise Linux 8/9
package:
ansible.builtin.package:
name:
- kpatch
- kpatch-dnf
@ -128,7 +128,7 @@
- ansible_distribution_major_version >= '8'
- name: "Configure kernel auto update for RedHat Enterprise Linux 8/9"
copy:
ansible.builtin.copy:
src: etc/dnf/plugins/kpatch.conf
dest: /etc/dnf/plugins/kpatch.conf
owner: root
@ -140,7 +140,7 @@
- ansible_distribution_major_version >= '8'
- name: enable kernel auto update for RHEL 8/9 linux family
systemd:
ansible.builtin.systemd:
name: kpatch.service
state: started
enabled: true
@ -150,13 +150,13 @@
- ansible_distribution_major_version >= '8'
# - name: upgrade all packages
# package:
# ansible.builtin.package:
# name: "*"
# update_cache: true
# state: latest
- name: Install install_pxe.sh script
copy:
ansible.builtin.copy:
src: usr/local/sbin/install_pxe.sh
dest: /usr/local/sbin/install_pxe.sh
owner: root
@ -164,35 +164,35 @@
mode: 0755
- name: Enable rngd service
service:
ansible.builtin.service:
name: rngd
state: started
enabled: true
- name: Ensure rngd service is started
service:
ansible.builtin.service:
name: rngd
state: started
- name: Compress logs
replace:
ansible.builtin.replace:
path: /etc/logrotate.conf
regexp: '^#compress'
replace: 'compress'
- block:
- name: Verify if hosts.deny TCP_Wrappers file exists
stat:
ansible.builtin.stat:
path: "/etc/hosts.deny"
register: hostsdeny
check_mode: false
- name: Verify if hosts.allow TCP_Wrappers file exists
stat:
ansible.builtin.stat:
path: "/etc/hosts.allow"
register: hostsallow
check_mode: false
- name: Install hosts.deny TCP_Wrappers file
copy:
ansible.builtin.copy:
src: "hosts.deny"
dest: "/etc/hosts.deny"
owner: root
@ -201,7 +201,7 @@
when:
- not hostsdeny.stat.exists
- name: Install hosts.allow TCP_Wrappers file
copy:
ansible.builtin.copy:
src: "hosts.allow"
dest: "/etc/hosts.allow"
owner: root