Skip to content

Commit ba664f1

Browse files
committed
support tuned in ansible-init
1 parent 2650f0b commit ba664f1

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

ansible/roles/compute_init/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ it also requires an image build with the role name added to the
4949
| bootstrap.yml | sshd | None at present | No |
5050
| bootstrap.yml | dnf_repos | None at present [2] | - |
5151
| bootstrap.yml | squid | Not relevant for compute nodes | n/a |
52-
| bootstrap.yml | tuned | None | - |
52+
| bootstrap.yml | tuned | Fully supported | No |
5353
| bootstrap.yml | freeipa_server | Not relevant for compute nodes | n/a |
5454
| bootstrap.yml | cockpit | None required - use image build | No |
5555
| bootstrap.yml | firewalld | Not relevant for compute nodes | n/a |

ansible/roles/compute_init/files/compute-init.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
enable_compute: "{{ os_metadata.meta.compute | default(false) | bool }}"
1010
enable_resolv_conf: "{{ os_metadata.meta.resolv_conf | default(false) | bool }}"
1111
enable_etc_hosts: "{{ os_metadata.meta.etc_hosts | default(false) | bool }}"
12+
enable_tuned: "{{ os_metadata.meta.tuned | default(false) | bool }}"
1213
enable_nfs: "{{ os_metadata.meta.nfs | default(false) | bool }}"
1314
enable_manila: "{{ os_metadata.meta.manila | default(false) | bool }}"
1415
enable_basic_users: "{{ os_metadata.meta.basic_users | default(false) | bool }}"
@@ -17,6 +18,12 @@
1718
# TODO: "= role defaults" - could be moved to a vars_file: on play with similar precedence effects
1819
resolv_conf_nameservers: []
1920

21+
tuned_profile_baremetal: hpc-compute
22+
tuned_profile_vm: virtual-guest
23+
tuned_profile: "{{ tuned_profile_baremetal if ansible_virtualization_role != 'guest' else tuned_profile_vm }}"
24+
tuned_enabled: true
25+
tuned_started: true
26+
2027
nfs_client_mnt_point: "/mnt"
2128
nfs_client_mnt_options:
2229
nfs_client_mnt_state: mounted
@@ -125,6 +132,10 @@
125132
mode: 0644
126133
when: enable_etc_hosts
127134

135+
- name: Configure tuned
136+
include_tasks: tasks/tuned.yml
137+
when: enable_tuned
138+
128139
# NFS client mount
129140
- name: If nfs-clients is present
130141
include_tasks: tasks/nfs-clients.yml

ansible/roles/compute_init/tasks/install.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
dest: files/NetworkManager-dns-none.conf
3333
- src: ../../basic_users/filter_plugins/filter_keys.py
3434
dest: filter_plugins/filter_keys.py
35+
- src: ../../tuned/tasks/configure.yml
36+
dest: tasks/tuned.yml
3537
- src: ../../stackhpc.nfs/tasks/nfs-clients.yml
3638
dest: tasks/nfs-clients.yml
3739

0 commit comments

Comments
 (0)