diff --git a/roles/set_semaphore_count/tasks/main.yml b/roles/set_semaphore_count/tasks/main.yml index a8e975f5ff11619391363b4e42be842ac67c3c7b..01203f6d9fbbfb0de5d564bb045e10430e9a0a07 100644 --- a/roles/set_semaphore_count/tasks/main.yml +++ b/roles/set_semaphore_count/tasks/main.yml @@ -5,13 +5,40 @@ when: SEM_COUNT is not defined - name: test value debug: msg="Value of semaphores is {{ SEM_COUNT }} " #" -- name: Template set_semaphores.service file - template: src=set_semaphores.service.j2 dest=/etc/systemd/system/set_semaphores.service +- name: Place comment line in file + lineinfile: + path: /etc/sysctl.d/88-setSemaphore.conf + line: "#set large semaphore count. Needed for Gamess." + state: present + create: yes + owner: root + group: root + mode: "u+rwx,o=rx,g=rx" become: true become_user: root -- name: enable and start set_semaphores service - service: name="set_semaphores" state=started enabled=true + +- name: Place comment line in file + lineinfile: + path: /etc/sysctl.d/88-setSemaphore.conf + line: "#https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-setting_semaphores-setting_semaphore_parameters " + state: present become: true become_user: root +- name: Place comment line in file + lineinfile: + path: /etc/sysctl.d/88-setSemaphore.conf + line: "kernel.sem={{ SEM_COUNT }}" + state: present + create: yes + owner: root + group: root + mode: "u+rwx,o=rx,g=rx" + become: true + become_user: root + +- name: set semaphore count now + shell: "/usr/bin/echo {{ SEM_COUNT }} > /proc/sys/kernel/sem" + become: true + become_user: root