Ajout Alma en cours

This commit is contained in:
stef
2026-02-17 23:01:51 +00:00
parent f3855df1a8
commit 7c8f30ce06
7 changed files with 114 additions and 99 deletions

View File

@@ -4,14 +4,29 @@
debug: var=ansible_os_family
- name: include os variables
include_vars: "{{ansible_os_family}}.yml"
include_vars: "{{ ansible_os_family }}.yml"
tags: always
- name: Prepare RHEL
- name: Prepare Alma
when: ansible_distribution == "AlmaLinux"
block:
- name: add gpg
ansible.builtin.dnf:
name: gnupg2
state: present
- name: Import a key from a url
ansible.builtin.rpm_key:
state: present
key: https://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-B5333005
- name: Add Package
ansible.builtin.dnf:
name: "https://repo.zabbix.com/zabbix/{{ zabbix_version }}/release/alma/{{ ansible_distribution_major_version }}/noarch/zabbix-release-latest-{{ zabbix_version }}.el{{ ansible_distribution_major_version }}.noarch.rpm"
state: present
- name: Prepare RH like
when: ansible_os_family == "RedHat"
block:
- name: Alma Repo
ansible.builtin.shell:
cmd: "rpm -Uvh {{repo}}"
- name: disable firewall
ansible.builtin.service:
name: firewalld
@@ -20,17 +35,16 @@
- name: clean repo
ansible.builtin.shell:
cmd: dnf clean all
when: ansible_os_family == "RedHat"
- name: Prepare Debian
block:
- name: Debian Repo
ansible.builtin.apt:
deb: "{{repo}}"
- name: Mise à jour le cache des paquets
ansible.builtin.apt:
update_cache: yes
when: ansible_os_family == "Debian"
block:
- name: Debian Repo
ansible.builtin.apt:
deb: "{{repo}}"
- name: Mise à jour le cache des paquets
ansible.builtin.apt:
update_cache: yes
- name: Database - Install
when: role == "db"
@@ -47,11 +61,11 @@
tags:
- install_srv
- name: Proxy - Install
ansible.builtin.include_tasks: "{{ansible_os_family}}/install-proxy.yml"
tags:
- install_proxy
when: role == "proxy"
# - name: Proxy - Install
# ansible.builtin.include_tasks: "{{ansible_os_family}}/install-proxy.yml"
# tags:
# - install_proxy
# when: role == "proxy"
- name: Front - Install