forked from rancherfederal/rke2-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rancherfederal#169 -- add systemd env options
- Loading branch information
Ben Hosmer
committed
Nov 17, 2023
1 parent
7ae082d
commit 37ebdaf
Showing
5 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,5 @@ rke2_versioned_yum_repo: | |
enabled: yes | ||
|
||
rke2_config: {} | ||
|
||
systemd_extra_env: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
- name: Systemd env file | ||
become: true | ||
when: (systemd_extra_env is defined) and (systemd_extra_env|length > 0) | ||
block: | ||
|
||
- name: Add the systemd env file | ||
ansible.builtin.blockinfile: | ||
path: /etc/default/rke2-{{ caller_role_name }} | ||
marker: "#{mark} ANSIBLE MANAGED FILE" | ||
create: true | ||
mode: '640' | ||
owner: root | ||
group: root | ||
block: | | ||
{% for item in systemd_extra_env %} | ||
{{ item }} | ||
{% endfor %} | ||
- name: Reload the systemd daemon | ||
ansible.builtin.systemd: | ||
daemon_reload: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters