Anderson, Craig (ca846m) 9f71952feb osconfig cleanup
This patchset allows users to select the context in which certain
osconfig tasks run, rather than a hard-coded assumption.

It also adds scripts directories which are run in these contexts.

Change-Id: I695c3078b4d883a506c243bc715a509f6844c126
2021-02-24 00:04:33 -08:00

15 lines
472 B
YAML

- name: "Systemd | Writing user-provided systemd unit {{ item.name }}"
template:
src: generic-file-writer.j2
dest: "/etc/systemd/system/{{ item.name }}"
loop: "{{ systemd }}"
when: run_context in item.run_contexts
- name: "Systemd | Configuring user-provided systemd unit {{ item.name }}"
systemd:
name: "{{ item.name }}"
enabled: "{{ item.enabled }}"
force: "{{ item.force }}"
loop: "{{ systemd }}"
when: run_context in item.run_contexts