diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-10-10 12:54:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 12:54:03 -0700 |
commit | bb4df1cf799d66493b0679f0993cd0a1fe829a00 (patch) | |
tree | 180ed9708afe47b1c554bab0c70f7ec33007b828 /roles/tuned/tasks | |
parent | 48126155eade2d030398f69dc5ee32838ec08480 (diff) | |
parent | 17e38ad8c62ac8f1c8f983e63181f69879a45d85 (diff) | |
download | openshift-bb4df1cf799d66493b0679f0993cd0a1fe829a00.tar.gz openshift-bb4df1cf799d66493b0679f0993cd0a1fe829a00.tar.bz2 openshift-bb4df1cf799d66493b0679f0993cd0a1fe829a00.tar.xz openshift-bb4df1cf799d66493b0679f0993cd0a1fe829a00.zip |
Merge pull request #5645 from jmencak/tuned-role-lb
Automatic merge from submit-queue.
Separate tuned daemon setup into a role.
Also adding support for the loadbalancer. It is important to raise ARP cache limits on HA setups with loadbalancers serving 1k+ nodes.
Diffstat (limited to 'roles/tuned/tasks')
-rw-r--r-- | roles/tuned/tasks/main.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/roles/tuned/tasks/main.yml b/roles/tuned/tasks/main.yml new file mode 100644 index 000000000..e95d274d5 --- /dev/null +++ b/roles/tuned/tasks/main.yml @@ -0,0 +1,39 @@ +--- +- name: Check for tuned package + command: rpm -q tuned + args: + warn: no + register: tuned_installed + changed_when: false + failed_when: false + +- name: Tuned service setup + block: + - name: Set tuned OpenShift variables + set_fact: + openshift_tuned_guest_profile: "{{ 'atomic-guest' if openshift.common.is_atomic else 'virtual-guest' }}" + + - name: Ensure directory structure exists + file: + state: directory + dest: '{{ tuned_etc_directory }}/{{ item.path }}' + with_filetree: '{{ tuned_templates_source }}' + when: item.state == 'directory' + + - name: Ensure files are populated from templates + template: + src: '{{ item.src }}' + dest: '{{ tuned_etc_directory }}/{{ item.path }}' + with_filetree: '{{ tuned_templates_source }}' + when: item.state == 'file' + + - name: Make tuned use the recommended tuned profile on restart + file: path=/etc/tuned/active_profile state=absent + + - name: Restart tuned service + systemd: + state: restarted + daemon_reload: yes + name: tuned + + when: tuned_installed.rc == 0 | bool |