diff --git a/roles/enable_modules/tasks/main.yml b/roles/enable_modules/tasks/main.yml index f6e4b9c1b66d2f60a6bd07a037c86719f716d5e1..f7d6e4adae679c1439d76d41c665c99b44e1b1bd 100644 --- a/roles/enable_modules/tasks/main.yml +++ b/roles/enable_modules/tasks/main.yml @@ -13,25 +13,25 @@ when: default_modules == "lmod" - name: remove modulecmd bash - file: path=/etc/profile.d/modulecmd.sh state=absent + file: path=/etc/profile.d/zz_modulecmd.sh state=absent become: true become_user: root when: default_modules == "lmod" - name: remove modulcmd csh - file: path=/etc/profile.d/modulecmd.csh state=absent + file: path=/etc/profile.d/zz_modulecmd.csh state=absent become: true become_user: root when: default_modules == "lmod" - name: template modulecmd bash - template: src=modulecmd.sh.j2 dest=/etc/profile.d/modulecmd.sh + template: src=modulecmd.sh.j2 dest=/etc/profile.d/zz_modulecmd.sh become: true become_user: root when: default_modules == "modulecmd" - name: template modulecmd csh - template: src=modulecmd.csh.j2 dest=/etc/profile.d/modulecmd.csh + template: src=modulecmd.csh.j2 dest=/etc/profile.d/zz_modulecmd.csh become: true become_user: root when: default_modules == "modulecmd" diff --git a/roles/nagios_server/templates/nagios3.conf.j2 b/roles/nagios_server/templates/nagios3.conf.j2 new file mode 100644 index 0000000000000000000000000000000000000000..76bc11b7d2810b01b75b206da5a65f4badd94698 --- /dev/null +++ b/roles/nagios_server/templates/nagios3.conf.j2 @@ -0,0 +1,76 @@ +# apache configuration for nagios 3.x +# note to users of nagios 1.x and 2.x: +# throughout this file are commented out sections which preserve +# backwards compatibility with bookmarks/config for older nagios versios. +# simply look for lines following "nagios 1.x:" and "nagios 2.x" comments. + +ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3 +ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3 +# nagios 1.x: +#ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3 +#ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3 +# nagios 2.x: +#ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3 +#ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3 +Alias /nagios3/stylesheets /etc/nagios3/stylesheets +# nagios 1.x: +#Alias /nagios/stylesheets /etc/nagios3/stylesheets +# nagios 2.x: +#Alias /nagios2/stylesheets /etc/nagios3/stylesheets + +# Where the HTML pages live +Alias /nagios3 /usr/share/nagios3/htdocs +# nagios 2.x: +#Alias /nagios2 /usr/share/nagios3/htdocs +# nagios 1.x: +#Alias /nagios /usr/share/nagios3/htdocs + + +LDAPTrustedGlobalCert CA_BASE64 /etc/ssl/certs/cacert.crt + +<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)> + Options FollowSymLinks + + DirectoryIndex index.php index.html + + AllowOverride AuthConfig + + + <IfVersion < 2.3> + Order Allow,Deny + Allow From All + </IfVersion> + + <IfVersion >= 2.3> + Require all denied + </IfVersion> + + AuthType Basic + AuthName "Authentication" + AuthBasicProvider ldap + AuthLDAPURL {{ ldapURI }}/{{ ldapBase }}?uid?sub?{{ ldap_access_filter }} + AuthLDAPBindDN {{ ldapBindDN }} + AuthLDAPBindPassword {{ ldapBindDNPassword }} + AuthLDAPBindAuthoritative off + AuthLDAPGroupAttributeIsDN off + AuthLDAPGroupAttribute memberUid + <RequireAll> + Require valid-user + Require ldap-group cn={{ sudo_group }},{{ ldapGroupBase }} + </RequireAll> + +</DirectoryMatch> + +<Directory /usr/share/nagios3/htdocs> + Options +ExecCGI +</Directory> + +# Enable this ScriptAlias if you want to enable the grouplist patch. +# See http://apan.sourceforge.net/download.html for more info +# It allows you to see a clickable list of all hostgroups in the +# left pane of the Nagios web interface +# XXX This is not tested for nagios 2.x use at your own peril +#ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi +# nagios 1.x: +#ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi + diff --git a/roles/nhc/files/scripts/check_numa.nhc b/roles/nhc/files/scripts/check_numa.nhc new file mode 100644 index 0000000000000000000000000000000000000000..a261f73a559a19df6c1f4e18f9c69dfffb8fa86f --- /dev/null +++ b/roles/nhc/files/scripts/check_numa.nhc @@ -0,0 +1,21 @@ +#!/bin/bash + +function check_numa() { +#echo ">>> Checking Numa Configuration >>>>>>>>>>>>>>>>>>>>>>>>>" +#TODO: currently checks if N sockets is 2. Really need to check N(sockets)<N(processors) + +#CPU(s): 2 +#Socket(s): 2 + +NSOCKETS=`lscpu | grep Socket | awk '{print $2}'` +#NCPU=`lscpu | grep "^CPU.s.:" | awk '{print $2}'` +#echo "NSOCKETS is $NSOCKETS" +#echo "NCPU is $NCPU" +if [ $NSOCKETS -ne 2 ] +then + die 1 " $FUNCNAME ERROR NUMA on node not configured properly. Number of sockets is $NSOCKETS" + return 1 +fi +return 0 +} +