[EVO] S'assurer que les paquets pipx sont dans le path #3
@ -1,12 +1,9 @@
|
|||||||
---
|
---
|
||||||
# defaults file for ansible
|
# defaults file for ansible
|
||||||
|
|
||||||
elbisna_prerequisites:
|
elbisna_inject_packages:
|
||||||
- pipx
|
|
||||||
|
|
||||||
elbisna_pip_packages:
|
|
||||||
- ansible
|
|
||||||
- netaddr
|
- netaddr
|
||||||
|
- dnspython
|
||||||
|
|
||||||
elbisna_vault_passwd: ""
|
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
|
# tasks file for ansible
|
||||||
|
|
||||||
- name: Importer les tâches d'installation
|
- name: Include installation tasks
|
||||||
tags: installation
|
ansible.builtin.include_tasks:
|
||||||
ansible.builtin.import_tasks: installation.yml
|
file: installation-{{ ansible_facts['pkg_mgr'] }}.yml
|
||||||
|
|
||||||
- name: Importer les tâches de configuration
|
- name: Import pipx installation tasks
|
||||||
tags: configuration
|
ansible.builtin.import_tasks:
|
||||||
ansible.builtin.import_tasks: configuration.yml
|
file: installation-service.yml
|
||||||
|
|
||||||
|
- name: Import configuration tasks
|
||||||
|
ansible.builtin.import_tasks:
|
||||||
|
file: configuration.yml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user