role: move vars out of defaults, inline constant list
This commit is contained in:
parent
10a6e61586
commit
d07e6ca2fb
2 changed files with 3 additions and 12 deletions
|
@ -71,7 +71,7 @@
|
||||||
path: "{{ (tuned_amdgpu_profile_dir, item.1 + '-amdgpu-' + item.0) | ansible.builtin.path_join }}"
|
path: "{{ (tuned_amdgpu_profile_dir, item.1 + '-amdgpu-' + item.0) | ansible.builtin.path_join }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ amdgpu_profiles }}"
|
- ['default', 'overclock', 'peak']
|
||||||
- "{{ base_profiles }}"
|
- "{{ base_profiles }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ amdgpu_profiles }}"
|
- ['default', 'overclock', 'peak']
|
||||||
- "{{ base_profiles }}"
|
- "{{ base_profiles }}"
|
||||||
notify: Restart tuned
|
notify: Restart tuned
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
---
|
---
|
||||||
# defaults file for tuned_amdgpu
|
# defaults file for tuned_amdgpu
|
||||||
#
|
#
|
||||||
|
# adjust where profiles are rendered based on the 'tuned' release from package facts
|
||||||
# internals for profile power calculations
|
|
||||||
# item in the context of the with_nested loops in the play
|
|
||||||
profile_name: "{{ item.0 }}"
|
|
||||||
|
|
||||||
amdgpu_profiles:
|
|
||||||
- default
|
|
||||||
- overclock
|
|
||||||
- peak
|
|
||||||
|
|
||||||
tuned_amdgpu_profile_dir: "{{ '/etc/tuned' if ansible_facts['packages']['tuned'][0]['version'] is version('2.23.0', '<') else '/etc/tuned/profiles' }}"
|
tuned_amdgpu_profile_dir: "{{ '/etc/tuned' if ansible_facts['packages']['tuned'][0]['version'] is version('2.23.0', '<') else '/etc/tuned/profiles' }}"
|
Loading…
Reference in a new issue