diff --git a/handlers/main.yml b/handlers/main.yml index c13356a..eb93844 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,6 +1,13 @@ --- # handlers file for drone_runner_exec +- name: Apply installation + ansible.builtin.command: + argv: + - /usr/bin/rpm-ostree + - apply-live + become: true + - name: Restart drone-runner-exec.service ansible.builtin.systemd: enabled: true diff --git a/meta/main.yml b/meta/main.yml index 1496cb7..1bbb578 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,7 +1,7 @@ galaxy_info: namespace: ykn author: pulsar89.5 - description: Rôle de déploiement d'un runner-exec drone.io + description: Deploy and configure borgmatic runner-exec for drone.io license: GPL-3.0-or-later @@ -11,9 +11,6 @@ galaxy_info: - name: Debian versions: - all - - name: CoreOS - varsions: - - 41 dependencies: - role: users diff --git a/tasks/configuration.yml b/tasks/configuration.yml index cff7cfe..c797182 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -27,7 +27,7 @@ group: "{{ drone_runner_exec_user }}" mode: u=rwX,g=rX,o=rX become: true - notify: Redémarrer drone-runner-exec.service + notify: Restart drone-runner-exec.service - name: Get service facts ansible.builtin.service_facts: @@ -56,4 +56,4 @@ group: root mode: u=rwX,g=rX,o=rX become: true - notify: Redémarrer drone-runner-exec.service + notify: Restart drone-runner-exec.service diff --git a/tasks/installation-apt.yml b/tasks/installation-apt.yml deleted file mode 100644 index ecc7d29..0000000 --- a/tasks/installation-apt.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# tasks file for ansible - -- name: Install prerequisites - ansible.builtin.apt: - name: "{{ drone_runner_exec_prerequisites }}" - become: true diff --git a/tasks/installation-atomic_container.yml b/tasks/installation-atomic_container.yml deleted file mode 100644 index 8c8e808..0000000 --- a/tasks/installation-atomic_container.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# tasks file for borgmatic - -- name: Install prerequisites - ansible.builtin.command: - argv: "{{ rpm_ostree + drone_runner_exec_prerequisites }}" - creates: /sysroot/ostree/repo/refs/heads/rpmostree/pkg/borgmatic - become: true - vars: - rpm_ostree: - - /usr/bin/rpm-ostree - - install - - --allow-inactive - - --assumeyes - - --idempotent - notify: Apply installation - -- name: Flush handlers - meta: flush_handlers diff --git a/tasks/installation-service.yml b/tasks/installation.yml similarity index 85% rename from tasks/installation-service.yml rename to tasks/installation.yml index 178e6d7..bb835c2 100644 --- a/tasks/installation-service.yml +++ b/tasks/installation.yml @@ -1,5 +1,10 @@ --- -# tasks file for drone_runner_exec +# tasks file for ansible + +- name: Install prerequisites + ansible.builtin.apt: + name: "{{ drone_runner_exec_prerequisites }}" + become: true - name: Get version file ansible.builtin.uri: diff --git a/tasks/main.yml b/tasks/main.yml index cef8f9f..142e233 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,13 +1,9 @@ --- # tasks file for drone_runner_exec -- name: Include installation tasks - ansible.builtin.include_tasks: - file: installation-{{ ansible_facts['pkg_mgr'] }}.yml - -- name: Import service installation tasks +- name: Import installation tasks ansible.builtin.import_tasks: - file: installation-service.yml + file: installation.yml - name: Import configuration tasks ansible.builtin.import_tasks: