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