diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-12-22 11:42:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-12-22 11:42:15 +0000 |
commit | d93f0b4e79bcf822dfb264a82e879f45038628d1 (patch) | |
tree | 76d71ba9f071ef0f9d8ebaabf447259a1cf7593d /ansible/roles/enable_hugepages_on_boot/tasks/main.yml | |
parent | 9bef739e89f3b230c9e0a53c2286a440017ec948 (diff) | |
parent | d2c4c4f8a798506ee88d0412ee1ab7cae5f394e5 (diff) |
Merge "Bugfix in role enable_hugepages_on_boot"
Diffstat (limited to 'ansible/roles/enable_hugepages_on_boot/tasks/main.yml')
-rwxr-xr-x | ansible/roles/enable_hugepages_on_boot/tasks/main.yml | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml index 29432d2e4..75526eb19 100755 --- a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml +++ b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml @@ -31,34 +31,37 @@ msg: "Hugepages already set by someone else" when: is_mine_huge.stdout == "" and is_huge.stdout != "" -- name: use 16 for auto num_hugepages and 1G size - set_fact: - num_hugepages: 8 - when: num_hugepages|default("auto") == "auto" +- name: configure hugepages as idempotent block + block: + - name: use 8 for auto num_hugepages and 1G size + set_fact: + num_hugepages: 8 + when: num_hugepages|default("auto") == "auto" -- name: set hugepages in grub - lineinfile: - dest: /etc/default/grub - regexp: '{{ hugepage_param_regex }}' - line: '{{ hugepage_param }}' - state: present + - name: set hugepages in grub + lineinfile: + dest: /etc/default/grub + regexp: '{{ hugepage_param_regex }}' + line: '{{ hugepage_param }}' + state: present -- name: create hugetables mount - file: - path: "{{ hugetable_mount }}" - state: directory + - name: create hugetables mount + file: + path: "{{ hugetable_mount }}" + state: directory -- name: mount hugetlbfs - mount: - name: "{{ hugetable_mount }}" - src: nodev - fstype: hugetlbfs - state: present + - name: mount hugetlbfs + mount: + name: "{{ hugetable_mount }}" + src: nodev + fstype: hugetlbfs + state: present -- service: - name: procps - enabled: yes + - service: + name: procps + enabled: yes -- include: manual_modify_grub.yml - # only tested on Ubuntu, kernel line is probably different on other distros - when: ansible_distribution == "Ubuntu" + - include: manual_modify_grub.yml + # only tested on Ubuntu, kernel line is probably different on other distros + when: ansible_distribution == "Ubuntu" + when: is_mine_huge.stdout == "" |