diff --git a/roles/apt-get-update/tasks/main.yml b/roles/apt-get-update/tasks/main.yml index 49e0217a1a170d17bee5ef958f7886903e0c1256..460364c28b119fa664cfa571f761dadb001891ae 100644 --- a/roles/apt-get-update/tasks/main.yml +++ b/roles/apt-get-update/tasks/main.yml @@ -3,8 +3,3 @@ apt: update_cache=True sudo: true when: ansible_os_family=="Debian" - -- name: apt-get upgrade - apt: upgrade=safe - sudo: true - when: ansible_os_family=="Debian" diff --git a/roles/calculateSlurmConf/templates/slurm.conf.j2 b/roles/calculateSlurmConf/templates/slurm.conf.j2 index 4cc03ad73081b03a877d3ec7a488115f6c92bc70..4fcd70df3a61433f99b8c571c02bad8e2c78e908 100644 --- a/roles/calculateSlurmConf/templates/slurm.conf.j2 +++ b/roles/calculateSlurmConf/templates/slurm.conf.j2 @@ -139,6 +139,10 @@ AccountingStorageEnforce=limits,safe # #GRES #GresTypes=gpu +# + +HealthCheckInterval=300 +HealthCheckProgram={{ nhc_dir }}/sbin/nhc # Fair share {% if slurmfairshare.def %} diff --git a/roles/gluster_client/files/glusterfs-epel.repo b/roles/config_repos/files/glusterfs-epel.repo similarity index 61% rename from roles/gluster_client/files/glusterfs-epel.repo rename to roles/config_repos/files/glusterfs-epel.repo index 843b4baef3cf4d81aca369e49c44b92c1599c3cf..015ad0bb9c3b8539d6e87fe999c69605b52910e5 100644 --- a/roles/gluster_client/files/glusterfs-epel.repo +++ b/roles/config_repos/files/glusterfs-epel.repo @@ -2,21 +2,21 @@ [glusterfs-epel] name=GlusterFS is a clustered file-system capable of scaling to several petabytes. -baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/EPEL.repo/epel-$releasever/$basearch/ +baseurl=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-$releasever/$basearch/ enabled=1 skip_if_unavailable=1 gpgcheck=0 [glusterfs-noarch-epel] name=GlusterFS is a clustered file-system capable of scaling to several petabytes. -baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/EPEL.repo/epel-$releasever/noarch +baseurl=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-$releasever/noarch enabled=1 skip_if_unavailable=1 gpgcheck=0 [glusterfs-source-epel] name=GlusterFS is a clustered file-system capable of scaling to several petabytes. - Source -baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/EPEL.repo/epel-$releasever/SRPMS +baseurl=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-$releasever/SRPMS enabled=0 skip_if_unavailable=1 gpgcheck=0 diff --git a/roles/config_repos/tasks/main.yml b/roles/config_repos/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..7ca82a84731bea394453dc4d9a07d24a90f640fe --- /dev/null +++ b/roles/config_repos/tasks/main.yml @@ -0,0 +1,49 @@ +--- +# this repository was broken on some CentOS images. Remove it. +- name: Removing the RDO repository + file: path=/etc/yum.repos.d/rdo-release.repo state=absent + sudo: true + +- name: add gluster repo + copy: src=glusterfs-epel.repo dest=/etc/yum.repos.d/glusterfs-epel.repo + sudo: true + when: ansible_os_family == 'RedHat' + + +- name: add epel on CentOS 7 + shell: rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm + sudo: true + when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" + ignore_errors: true + +- name: Install epel-release + yum: name=epel-release-7-5.noarch state=present + sudo: true + when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" + +#- name: Enable epel +# command: yum-config-manager --enable epel +# sudo: true +# when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" + +# Use mate DE on systems that have moved to gnome3, since there is no gpu acceleration by default on NeCTAR openstack +# Trusty (Ubuntu 14.04 LTS) needs repos added. Wheezy (Debian Stable) gets mate from backports, Utopic (Ubuntu 14.10) Jessie (Debian testing) and Sid (Debian unstable) get it by default +- name: add repos apt + shell: "add-apt-repository -y ppa:ubuntu-mate-dev/ppa" + sudo: true + when: ansible_distribution_release == 'trusty' + +- name: add repos apt + shell: "add-apt-repository -y ppa:ubuntu-mate-dev/trusty-mate" + sudo: true + when: ansible_distribution_release == 'trusty' + +- name: add repos apt + shell: "add-apt-repository -y ppa:gluster/glusterfs-3.7" + sudo: true + when: ansible_distribution == 'Ubuntu' + +- name: apt-get update + apt: update_cache=True + sudo: true + when: ansible_os_family=="Debian" diff --git a/roles/enable_lmod/tasks/main.yml b/roles/enable_lmod/tasks/main.yml index 5c1ff887b0969578ee0a0aaa52d4603e1472b9c7..4676f706030c27b4b86e35a342e26fb3ae9ad74b 100644 --- a/roles/enable_lmod/tasks/main.yml +++ b/roles/enable_lmod/tasks/main.yml @@ -1,16 +1,6 @@ --- - include_vars: "{{ ansible_os_family }}.yml" -- name: Install epel-release - yum: name=epel-release-7-5.noarch state=present - sudo: true - when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - -- name: Enable epel - command: yum-config-manager --enable epel - sudo: true - when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - - name: install lua yum: name={{ item }} state=installed with_items: diff --git a/roles/gluster_client/tasks/main.yml b/roles/gluster_client/tasks/main.yml index 68d24002695056b5b32337510a22bb5b48f187f6..7c769da5dbf8558cf13ac35d6b6c0db5e2098642 100644 --- a/roles/gluster_client/tasks/main.yml +++ b/roles/gluster_client/tasks/main.yml @@ -1,8 +1,4 @@ --- -- name: add repo - copy: src=glusterfs-epel.repo dest=/etc/yum.repos.d/glusterfs-epel.repo - sudo: true - when: ansible_os_family == 'RedHat' - name: install gluster yum: name={{ item }} state='latest' diff --git a/roles/gluster_server/files/glusterfs-epel.repo b/roles/gluster_server/files/glusterfs-epel.repo deleted file mode 100644 index 6cac832a40534526c9e689321cb8a8b1f271c5f7..0000000000000000000000000000000000000000 --- a/roles/gluster_server/files/glusterfs-epel.repo +++ /dev/null @@ -1,22 +0,0 @@ -# Place this file in your /etc/yum.repos.d/ directory - -[glusterfs-epel] -name=GlusterFS is a clustered file-system capable of scaling to several petabytes. -baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/LATEST/EPEL.repo/epel-$releasever/$basearch/ -enabled=1 -skip_if_unavailable=1 -gpgcheck=0 - -[glusterfs-noarch-epel] -name=GlusterFS is a clustered file-system capable of scaling to several petabytes. -baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/LATEST/EPEL.repo/epel-$releasever/noarch -enabled=1 -skip_if_unavailable=1 -gpgcheck=0 - -[glusterfs-source-epel] -name=GlusterFS is a clustered file-system capable of scaling to several petabytes. - Source -baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/LATEST/EPEL.repo/epel-$releasever/SRPMS -enabled=0 -skip_if_unavailable=1 -gpgcheck=0 diff --git a/roles/gluster_server/tasks/main.yml b/roles/gluster_server/tasks/main.yml index 82dcabaa4088bec82eb7168983735fdb9cddae5a..0d7660cc275ec7563112a46afe89e894a0640219 100644 --- a/roles/gluster_server/tasks/main.yml +++ b/roles/gluster_server/tasks/main.yml @@ -1,10 +1,5 @@ --- -- name: add repo - copy: src=glusterfs-epel.repo dest=/etc/yum.repos.d/glusterfs-epel.repo - sudo: true - when: ansible_os_family == 'RedHat' - - name: install gluster yum: name={{ item }} state='latest' when: ansible_os_family == 'RedHat' diff --git a/roles/lmod/tasks/main.yml b/roles/lmod/tasks/main.yml index 6c84ac239a44e85745de9f1bc10f5777e085bfb3..393a4f0058132827daa29be45ad5fe6b9df5f53f 100644 --- a/roles/lmod/tasks/main.yml +++ b/roles/lmod/tasks/main.yml @@ -1,28 +1,6 @@ --- - include_vars: "{{ ansible_os_family }}.yml" -- name: add epel on CentOS 7 - shell: rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm - sudo: true - when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - ignore_errors: true - -#- name: add epel on CentOS 7 -# shell: yum -y update -# sudo: true -# when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - -- name: Install epel-release - yum: name=epel-release-7-5.noarch state=present - sudo: true - when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - -- name: Enable epel - command: yum-config-manager --enable epel - sudo: true - when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - - - name: install lua yum: name={{ item }} state=installed with_items: diff --git a/roles/setupKnownHosts/tasks/main.yml b/roles/setupKnownHosts/tasks/main.yml deleted file mode 100644 index ad1ebffe3ffe2c98ef37a7aecfa739af6f06bde1..0000000000000000000000000000000000000000 --- a/roles/setupKnownHosts/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ -- name: "Templating /etc/ssh/known_hosts" - template: src=known_hosts.j2 dest=/etc/ssh/ssh_known_hosts owner=root group=root mode=644 - sudo: true - register: sshknownhost - -- name: encrypt the hosts file - shell: ssh-keygen -H -f /etc/ssh/ssh_known_hosts - sudo: true - when: sshknownhost.changed - -- name: set read permissions - file: path=/etc/ssh/ssh_known_hosts owner=root group=root mode=644 state=file - sudo: true - -- name: delete ssh_known_hosts.old - file: path=/etc/ssh/ssh_known_hosts.old state=absent - sudo: true - diff --git a/roles/setupKnownHosts/templates/known_hosts.j2 b/roles/setupKnownHosts/templates/known_hosts.j2 deleted file mode 100644 index 47eb314c25eff70eba4a1007fbcfee8489147f27..0000000000000000000000000000000000000000 --- a/roles/setupKnownHosts/templates/known_hosts.j2 +++ /dev/null @@ -1,22 +0,0 @@ -{% set nodelist = [] %} -{% for node in groups['all'] %} -{% for interface in hostvars[node]['ansible_interfaces'] %} -{% if interface != "lo" %} -{% if hostvars[node]['ansible_ssh_host_key_rsa_public'] %} -{% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'keytype':'ssh-rsa', 'key': hostvars[node]['ansible_ssh_host_key_rsa_public']} %} -{% if nodelist.append(host) %} -{% endif %} -{% endif %} -{% if 'ansible_ssh_host_key_ecdsa_public' in hostvars[node] and hostvars[node]['ansible_ssh_host_key_ecdsa_public'] %} -{% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'keytype':'ecdsa-sha2-nistp256', 'key': hostvars[node]['ansible_ssh_host_key_ecdsa_public']} %} -{% if nodelist.append(host) %} -{% endif %} -{% endif %} -{% endif %} -{% endfor %} -{% endfor %} - -{% for host in nodelist %} -{{ host.ip }} {{ host.keytype }} {{ host.key }} -{{ host.name }} {{ host.keytype }} {{ host.key }} -{% endfor %} diff --git a/roles/slurm-common/tasks/installNhc.yml b/roles/slurm-common/tasks/installNhc.yml index 9d48a4e7adf23c6e61f6e06a356b2bb43fa69acf..be576b400466658e2f50fa869bb13c1b77ef3602 100644 --- a/roles/slurm-common/tasks/installNhc.yml +++ b/roles/slurm-common/tasks/installNhc.yml @@ -1,25 +1,36 @@ -- name: Download nhc source - shell: wget https://cvl.massive.org.au/warewulf-nhc-{{ nhc_version }}.tar.gz -# shell: wget http://warewulf.lbl.gov/downloads/releases/warewulf-nhc/warewulf-nhc-{{ nhc_version }}.tar.gz - args: - chdir: /tmp - creates: /tmp/warewulf-nhc-{{ nhc_version }}.tar.gz +--- +- name: install automake + yum: name=automake state=present + become: true + become_user: root + when: ansible_os_family=='RedHat' + +- name: install automake + apt: name=automake state=present + become: true + become_user: root + when: ansible_os_family=='Debian' -- name: untar nhc - shell: tar zxf /tmp/warewulf-nhc-{{ nhc_version }}.tar.gz +- name: unarchive nhc + unarchive: args: - chdir: /tmp + src: "https://github.com/mej/nhc/archive/{{ nhc_version }}.tar.gz" + copy: no + dest: /tmp + creates: /tmp/nhc-{{ nhc_version }}/autogen.sh + - name: build nhc - shell: ./configure --prefix={{ nhc_dir }} && make + shell: ./autogen.sh && ./configure --prefix={{ nhc_dir }} && make args: - chdir: /tmp/warewulf-nhc-{{ nhc_version }} + chdir: /tmp/nhc-{{ nhc_version }} + creates: /tmp/nhc-{{ nhc_version }}/configure - name: install nhc shell: make install sudo: true args: - chdir: /tmp/warewulf-nhc-{{ nhc_version }} + chdir: /tmp/nhc-{{ nhc_version }} - name: ensure sysconfig dir exists file: dest=/etc/sysconfig state=directory owner=root group=root mode=755 @@ -43,8 +54,9 @@ register: generate_nhc_config_file - name: generate config file - shell: "{{ nhc_dir }}/sbin/nhc-genconf -d -c {{ nhc_dir }}/etc/nhc/{{ nhc_config_file }} CONFDIR={{ nhc_dir }}/etc/nhc" + shell: "{{ nhc_dir }}/sbin/nhc-genconf -c {{ nhc_dir }}/etc/nhc/{{ nhc_config_file }} CONFDIR={{ nhc_dir }}/etc/nhc" sudo: true + ignore_errors: true when: generate_nhc_config_file - name: config file extension @@ -54,7 +66,3 @@ sudo: true when: nhc_user_conf is defined and generate_nhc_config_file -- name: start cron job - cron: name=nhc_monitor job={{ nhc_dir }}/sbin/nhc_cron user=root minute=*/5 state=present - sudo: true - diff --git a/roles/upgrade/tasks/main.yml b/roles/upgrade/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..58a50ac0a19561e44b952d800033d9c1c9dacdac --- /dev/null +++ b/roles/upgrade/tasks/main.yml @@ -0,0 +1,11 @@ +--- +- name: apt-get upgrade + apt: upgrade=safe + sudo: true + when: ansible_os_family=="Debian" + +- name: yum upgrade + yum: name=* state=latest + become: true + become_user: root + when: ansible_os_family=="RedHat" diff --git a/roles/vncserver/tasks/main.yml b/roles/vncserver/tasks/main.yml index 13c13dc639c66a9c031ecdfce3b5d84482de367e..e79ed591803e7f285e737167d9e3c12656ebfbaf 100644 --- a/roles/vncserver/tasks/main.yml +++ b/roles/vncserver/tasks/main.yml @@ -5,24 +5,6 @@ - include_vars: "CentOS_7_x86_64.yml" when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" -# Use mate DE on systems that have moved to gnome3, since there is no gpu acceleration by default on NeCTAR openstack -# Trusty (Ubuntu 14.04 LTS) needs repos added. Wheezy (Debian Stable) gets mate from backports, Utopic (Ubuntu 14.10) Jessie (Debian testing) and Sid (Debian unstable) get it by default -- name: add repos apt - shell: "add-apt-repository -y ppa:ubuntu-mate-dev/ppa" - sudo: true - when: ansible_distribution_release == 'trusty' - -- name: add repos apt - shell: "add-apt-repository -y ppa:ubuntu-mate-dev/trusty-mate" - sudo: true - when: ansible_distribution_release == 'trusty' - -- name: add epel on CentOS 7 - shell: rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm - sudo: true - when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - ignore_errors: true - - name: install system packages apt apt: name={{ item }} state=present update_cache=true force=yes sudo: true