[EVO] S'assurer que les paquets pipx sont dans le path
This commit is contained in:
parent
4c9b9c2054
commit
56ae62915c
@ -1,12 +1,9 @@
|
||||
---
|
||||
# defaults file for ansible
|
||||
|
||||
elbisna_prerequisites:
|
||||
- pipx
|
||||
|
||||
elbisna_pip_packages:
|
||||
- ansible
|
||||
elbisna_inject_packages:
|
||||
- netaddr
|
||||
- dnspython
|
||||
|
||||
elbisna_vault_passwd: ""
|
||||
|
||||
|
13
handlers/main.yml
Normal file
13
handlers/main.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
# handlers file for ansible
|
||||
|
||||
- name: Apply installation
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- /usr/bin/rpm-ostree
|
||||
- apply-live
|
||||
become: true
|
||||
|
||||
- name: Redémarrer le système
|
||||
ansible.builtin.reboot:
|
||||
become: true
|
8
tasks/installation-apt.yml
Normal file
8
tasks/installation-apt.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
# tasks file for ansible
|
||||
|
||||
- name: Install prerequisites package
|
||||
ansible.builtin.apt:
|
||||
install_recommends: false
|
||||
name: pipx
|
||||
become: true
|
18
tasks/installation-atomic_container.yml
Normal file
18
tasks/installation-atomic_container.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
# tasks file for borgmatic
|
||||
|
||||
- name: Install prerequisites package
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- /usr/bin/rpm-ostree
|
||||
- install
|
||||
- --allow-inactive
|
||||
- --assumeyes
|
||||
- --idempotent
|
||||
- pipx
|
||||
creates: /sysroot/ostree/repo/refs/heads/rpmostree/pkg/borgmatic
|
||||
become: true
|
||||
notify: Apply installation
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
31
tasks/installation-service.yml
Normal file
31
tasks/installation-service.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
# tasks file for ansible
|
||||
|
||||
- name: Install ansible
|
||||
community.general.pipx:
|
||||
name: ansible
|
||||
state: latest
|
||||
install_deps: true
|
||||
become: true
|
||||
environment:
|
||||
PIPX_HOME: /opt/pipx
|
||||
PIPX_BIN_DIR: /usr/local/bin
|
||||
|
||||
- name: Inject packages
|
||||
community.general.pipx:
|
||||
name: ansible
|
||||
inject_packages: "{{ elbisna_inject_packages }}"
|
||||
state: inject
|
||||
become: true
|
||||
environment:
|
||||
PIPX_HOME: /opt/pipx
|
||||
PIPX_BIN_DIR: /usr/local/bin
|
||||
|
||||
- name: Upgrade ansible
|
||||
community.general.pipx:
|
||||
name: ansible
|
||||
state: upgrade_all
|
||||
become: true
|
||||
environment:
|
||||
PIPX_HOME: /opt/pipx
|
||||
PIPX_BIN_DIR: /usr/local/bin
|
@ -1,17 +0,0 @@
|
||||
---
|
||||
# tasks file for ansible
|
||||
|
||||
- name: Installer les prérequis
|
||||
ansible.builtin.apt:
|
||||
install_recommends: false
|
||||
name: "{{ elbisna_prerequisites }}"
|
||||
become: true
|
||||
|
||||
- name: Installer ansible
|
||||
community.general.pipx:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
install_deps: true
|
||||
become: true
|
||||
become_user: "{{ elbisna_user }}"
|
||||
loop: "{{ elbisna_pip_packages }}"
|
@ -1,10 +1,14 @@
|
||||
---
|
||||
# tasks file for ansible
|
||||
|
||||
- name: Importer les tâches d'installation
|
||||
tags: installation
|
||||
ansible.builtin.import_tasks: installation.yml
|
||||
- name: Include installation tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: installation-{{ ansible_facts['pkg_mgr'] }}.yml
|
||||
|
||||
- name: Importer les tâches de configuration
|
||||
tags: configuration
|
||||
ansible.builtin.import_tasks: configuration.yml
|
||||
- name: Import pipx installation tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: installation-service.yml
|
||||
|
||||
- name: Import configuration tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: configuration.yml
|
||||
|
Loading…
x
Reference in New Issue
Block a user