Skip to content
Snippets Groups Projects
Commit a6cf708b authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

Merge branch 'ubuntu' into 'master'

Ubuntu

See merge request hpc-team/ansible_cluster_in_a_box!293

Former-commit-id: bc27708d
parents 6340a752 627b3229
No related branches found
No related tags found
No related merge requests found
......@@ -15,4 +15,13 @@
- nfs-utils-lib
when: ansible_os_family == "RedHat" and ansible_distribution_major_version < "7"
- name: install dependencies nfs-common ubuntu
apt:
name: nfs-common
state: present
update_cache: yes
become: true
become_user: root
when: ansible_distribution == 'Ubuntu'
- include: mountFileSystem.yml
......@@ -4,6 +4,6 @@
mount: name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }}" fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items: "{{ nfsMounts }}"
become: true
ignore_errors: true
ignore_errors: false
register: firstMount
when: nfsMounts is defined
......@@ -6,4 +6,3 @@
- nfs-kernel-server
apt: "name={{ item }} state=present"
become: true
......@@ -29,7 +29,15 @@
become: true
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"
- name: "Run exportfs"
command: /usr/sbin/exportfs -a
become: true
when: ansible_os_family == "Debian"
- name: "Start the Server"
service: "name=nfs-kernel-server state=started enabled=true"
become: true
when: ansible_os_family == "Debian"
......@@ -4,15 +4,29 @@
become: true
become_user: root
- name: restart ntpd
- name: restart ntpd redhat
service: name=ntpd state=restarted
become: true
become_user: root
when: ansible_os_family == "RedHat"
- name: ensure ntpd is enabled and started
- name: ensure ntpd is enabled and started redhat
service: name=ntpd state=started enabled=yes
become: true
become_user: root
when: ansible_os_family == "RedHat"
- name: restart ntpd ubuntu
service: name=ntp state=restarted
become: true
become_user: root
when: ansible_os_family == "Debian"
- name: ensure ntpd is enabled and started ubuntu
service: name=ntp state=started enabled=yes
become: true
become_user: root
when: ansible_os_family == "Debian"
- name: set local timezone
file: path=/etc/localtime state=link src={{ TIMEZONE_PATH }}
......
#!/bin/env python
#!/usr/bin/env python
# prints a list of NIDIA devices and their type in json format for
# parsing by ansible program;
# fields are 'name':'gpu' (fixed)
......
......@@ -3,25 +3,22 @@
with_items:
- libcgroup
become: True
become_method: sudo
when: ansible_os_family == "RedHat"
- name: apt install cgroup
apt: name={{ item }} state=installed update_cache=yes
with_items:
- cgmanager
- cgmanager-utils
- libcgmanager0
package:
state: installed
name:
- libcgroup1
- cgroupfs-mount
- cgroup-tools
when: ansible_os_family == "Debian"
become: True
become_method: sudo
- name: config cgroup.conf file
template: dest={{ slurm_dir }}/etc/cgroup.conf src=cgroup.conf.j2 mode=644
become: True
become_method: sudo
- name: config cgroup_allowed_devices.conf file
template: dest={{ slurm_dir }}/etc/cgroup_allowed_devices.conf src=cgroup_allowed_devices.conf.j2 mode=644
become: True
become_method: sudo
......@@ -27,11 +27,16 @@
creates: "{{ munge_dir }}/bin/munge"
when: not munge_binary.stat.exists
- name: set use_systemd
- name: set use_systemd Redhat
set_fact:
use_systemd: True
when: (ansible_distribution == "CentOS" or ansible_distribution == "RedHat") and ( ansible_distribution_major_version == "7")
- name: set use_systemd Debian
set_fact:
use_systemd: True
when: ansible_os_family == "Debian"
- name: copy init script
template: dest=/etc/init.d/munge src=munge.initd.j2 mode=755
become: true
......
......@@ -44,13 +44,14 @@
with_items:
- gcc
- wget
- libssl-dev
- libssl-dev # downgrade needed for bionic see https://github.com/dun/munge/issues/54
- libpam0g-dev
- libbz2-dev
- make
- perl
- libdbi-perl
- lua5.2
- liblua5.2-dev
- hwloc
- libhwloc-dev
when: ansible_os_family == "Debian"
......
......@@ -2,3 +2,10 @@
template: src=slurm.cnf.j2 dest=/etc/my.cnf.d/slurm.cnf
become: true
become_user: root
when: ansible_os_family == "RedHat"
- name: "Copy slurm db tuning config"
template: src=slurm.cnf.j2 dest=/etc/mysql/mariadb.conf.d/slurm.cnf
become: true
become_user: root
when: ansible_os_family == "Debian"
\ No newline at end of file
......@@ -6,10 +6,10 @@
become_user: root
when: ansible_os_family=="Debian"
- name: apt-get upgrade
apt: upgrade=safe
become: true
when: ansible_os_family=="Debian"
#- name: apt-get upgrade
# apt: upgrade=safe
# become: true
# when: ansible_os_family=="Debian"
- name: yum remove
yum: name=ipa-client-common state=absent
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment