feat: Add compatibility with CoreOS
This commit is contained in:
parent
7c5742451b
commit
7240552dfc
@ -1,9 +1,6 @@
|
||||
---
|
||||
# defaults file for ansible
|
||||
|
||||
elbisna_prerequisites:
|
||||
- pipx
|
||||
|
||||
elbisna_inject_packages:
|
||||
- netaddr
|
||||
- dnspython
|
||||
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
# handlers file for ansible
|
||||
|
||||
- name: Redémarrer le système
|
||||
ansible.builtin.reboot:
|
||||
- name: Apply installation
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- /usr/bin/rpm-ostree
|
||||
- apply-live
|
||||
become: true
|
||||
|
@ -11,5 +11,8 @@ galaxy_info:
|
||||
- name: Debian
|
||||
versions:
|
||||
- all
|
||||
- name: CoreOS
|
||||
versions:
|
||||
- 41
|
||||
|
||||
dependencies: []
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
# tasks file for ansible
|
||||
|
||||
- name: Déployer le mot de passe vault
|
||||
- name: Deploy vault password
|
||||
ansible.builtin.copy:
|
||||
dest: "~{{ elbisna_user }}/.ansible_vault_passwd"
|
||||
content: "{{ elbisna_vault_passwd }}"
|
||||
@ -12,7 +12,7 @@
|
||||
become: true
|
||||
diff: false
|
||||
|
||||
- name: Déployer la configuration
|
||||
- name: Deploy ansible.cfg
|
||||
ansible.builtin.template:
|
||||
src: ansible.cfg.j2
|
||||
dest: "~{{ elbisna_user }}/.ansible.cfg"
|
||||
|
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,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