debian-forge-composer/templates/packer/ansible/roles/common/tasks/worker-initialization-service.yml
Sanne Raymaekers 13aae7d532 templates/packer: invert tag logic
With the rpmcopy or rpmrepo_osbuild tags, the `Install worker rpm` stage
got skipped on RHEL and CI. Invert the tag logic and use `--tags`
instead of `--skip-tags`.
2024-05-21 09:40:11 +02:00

48 lines
1.1 KiB
YAML

---
- name: Copy worker initialization service
tags:
- always
copy:
src: "{{ playbook_dir }}/roles/common/files/worker-initialization.service"
dest: /etc/systemd/system/
- name: Enable worker initialization service
tags:
- always
systemd:
name: worker-initialization.service
enabled: yes
daemon_reload: yes # make sure the new service is loaded before enabling it
- name: Create a directory for initialization scripts
tags:
- always
file:
path: /usr/local/libexec/worker-initialization-scripts
state: directory
- name: Copy scripts used by the initialization service
tags:
- always
copy:
src: "{{ item }}"
dest: /usr/local/libexec/worker-initialization-scripts
mode: preserve
with_fileglob:
- "{{ playbook_dir }}/roles/common/files/worker-initialization-scripts/*"
- name: Copy worker executor service
tags:
- always
copy:
src: "{{ playbook_dir }}/roles/common/files/worker-executor.service"
dest: /etc/systemd/system/
- name: Enable worker executor service
tags:
- always
systemd:
name: worker-executor.service
enabled: yes
daemon_reload: yes