-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #169 -- add systemd env options #174
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -45,3 +45,10 @@ rke2_config: {} | |||||
# See https://docs.rke2.io/helm/#automatically-deploying-manifests-and-helm-charts | ||||||
# Add manifest files by specifying the directory path on the control host | ||||||
# manifest_config_file_path: "{{ playbook_dir }}/sample_files/manifest/" | ||||||
|
||||||
# See https://docs.rke2.io/advanced#configuring-an-http-proxy | ||||||
# Add proxy information for the systemd environment | ||||||
# systemd-extra-env: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
# #- HTTP_PROXY=http://your-proxy.example.com:8888 | ||||||
# #- HTTPS_PROXY=http://your-proxy.example.com:8888 | ||||||
# #- NO_PROXY=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 |
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: {} |
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 }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
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 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe is it better to use handlers ? |
||||||
ansible.builtin.systemd: | ||||||
daemon_reload: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.