Skip to content
Snippets Groups Projects
Commit b137f5e3 authored by Chris Hines's avatar Chris Hines
Browse files

remove silly vim backup files

parent d61f2cc7
No related branches found
No related tags found
3 merge requests!518modifications to playbooks because 1. we're not using ldap 2. we're mounting...,!517modifications to playbooks because 1. we're not using ldap 2. we're mounting...,!513modifications to playbooks because 1. we're not using ldap 2. we're mounting...
Host 192.168.*
ProxyJump={{ ansible_user }}@{{ bastion_floating_ip }}
StrictHostKeyChecking=no
ServerAliveInterval 60
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
server_packages:
- python
- python-dev
- libmariadb-dev
- python3-pip
- libapache2-mod-wsgi
- python3-mysql.connector
- mariadb-server
- python3-mysqldb
- python3-pymysql
client_packages:
- python3
- python3-pymysql
- mariadb-client
sqlServiceName: "mariadb"
---
- name: define nhc_src_url
set_fact:
nhc_src_url: "http://consistency0/src/{{ nhc_version }}.tar.gz"
when: nhc_src_url is not defined
- name: check existing installation
stat: path="{{ nhc_dir }}/sbin/nhc"
register: nhc_binary
- 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: download nhc
get_url:
url: "{{ nhc_src_url }}"
checksum: "{{ nhc_src_checksum }}"
dest: "{{ src_base }}/nhc.tar.gz"
when: nhc_src_checksum is defined
- name: download nhc
get_url:
url: "{{ nhc_src_url }}"
dest: "{{ src_base }}/nhc.tar.gz"
when: nhc_src_checksum is not defined
- name: unarchive nhc
unarchive:
args:
src: "{{ src_base }}/nhc.tar.gz"
copy: no
dest: "{{ src_base }}"
creates: "{{ nhc_src_dir }}/autogen.sh"
when: not nhc_binary.stat.exists
- name: build nhc
shell: ./autogen.sh && ./configure --prefix={{ nhc_dir }} && make
args:
chdir: "{{ nhc_src_dir }}"
creates: "{{ nhc_src_dir }}/configure"
when: not nhc_binary.stat.exists
- name: install nhc
shell: make install
become: true
args:
chdir: "{{ nhc_src_dir }}"
when: not nhc_binary.stat.exists
- name: ensure sysconfig dir exists
file: dest=/etc/sysconfig state=directory owner=root group=root mode=755
become: true
- name: copy nhc sysconfig script
template: dest=/etc/sysconfig/nhc src=nhc.sysconfig.j2 mode=644
become: true
- name: copy nhc log rotate script
template: dest=/etc/logrotate.d/nhc src=nhclog.j2 mode=644
become: true
- name: install nhc config file
copy: src=nhc.conf dest={{ nhc_dir }}/etc/nhc/{{ nhc_config_file }}
become: true
become_user: root
- name: install nhc scripts
copy: src=scripts/ dest={{ nhc_dir }}/etc/nhc/scripts/
become: true
become_user: root
#test NAT is working by pinging an external address, i.e. a license server, or by default Google Public DNS
- set_fact:
EXTERNAL_IP_ADDRESS: "8.8.8.8"
when: EXTERNAL_IP_ADDRESS is undefined
- name: install nhc NAT check
template: dest="{{ nhc_dir }}/etc/nhc/scripts/check_nat.nhc" src=check_nat.nhc.j2
become: true
become_user: root
when: ADD_NHC_NAT_CHECK is defined
- name: test if munge is already isntalled
stat: path="{{ munge_dir }}/bin/munge"
register: munge_binary
- name: Create munge directory if it does not exist
file:
path: "{{ munge_src_dir | dirname }}"
state: directory
owner: "{{ ansible_user }}"
group: root
mode: u=rwx,g=rx,o=rx
become: true
- name: define munge_src_url
set_fact:
munge_src_url: "http://consistency0/src/munge-{{ munge_version }}.tar.bz2"
when: munge_src_url is not defined
- name: download munge
get_url:
url: "{{ munge_src_url }}"
checksum: "{{ munge_src_checksum }}"
dest: "{{ munge_src_dir | dirname }}/munge_src"
when: munge_src_checksum is defined
- name: download munge
get_url:
url: "{{ munge_src_url }}"
dest: "{{ munge_src_dir | dirname }}/munge_src"
when: munge_src_checksum is not defined
- name: unarchive munge
unarchive:
src: "{{ munge_src_dir | dirname }}/munge_src"
dest: "{{ munge_src_dir | dirname }}"
remote_src: yes
creates: "{{ munge_src_dir }}"
- name: build munge
shell: ./bootstrap ; ./configure --prefix={{ munge_dir }} && make
args:
chdir: "{{ munge_src_dir }}"
creates: "{{ munge_src_dir }}/src/munge/munge"
when: not munge_binary.stat.exists
- name: install munge
shell: make install
become: true
args:
chdir: "{{ munge_src_dir }}"
creates: "{{ munge_dir }}/bin/munge"
when: not munge_binary.stat.exists
- 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
register: systemd_script_installed
when: use_systemd is not defined
- name: copy slurm init script if OS contains systemd
template: dest=/etc/systemd/system/munge.service src=munge.service.j2 mode=644
become: true
when: use_systemd is defined
- name: reload systemd
shell: systemctl daemon-reload
become: true
when: use_systemd is defined and systemd_script_installed.changed
- name: define ucx_src_url
set_fact:
ucx_src_url: "http://consistency0/src/ucx_1_8_0.tar.gz"
when: ucx_src_url is not defined
- name: define slurm_src_url
set_fact:
slurm_src_url: "http://consistency0/src/slurm-{{ slurm_version }}.tar.bz2"
when: slurm_src_url is not defined
- name: Create ucx directory if it does not exist
file:
path: "{{ src_base }}"
state: directory
owner: "{{ ansible_user }}"
group: root
mode: u=rwx,g=rx,o=rx
become: true
- name: remove all install
file:
path: "{{ slurm_src_dir }}"
state: absent
become: true
when: force_slurm_recompile is defined
- name: remove all install
file:
path: "{{ slurm_dir }}"
state: absent
become: true
when: force_slurm_recompile is defined
- name: download slurm
get_url:
url: "{{ slurm_src_url }}"
checksum: "{{ slurm_src_checksum }}"
dest: "{{ src_base }}/slurm_src"
when: slurm_src_checksum is defined
- name: download slurm
get_url:
url: "{{ slurm_src_url }}"
dest: "{{ src_base }}/slurm_src"
when: slurm_src_checksum is not defined
- name: unarchive slurm
unarchive:
src: "{{ src_base }}/slurm_src"
dest: "{{ src_base }}"
remote_src: yes
creates: "{{ slurm_src_dir }}"
- name: stat srun
stat: path="{{ slurm_dir }}/bin/srun"
register: stat_srun
- name: stat ucx
stat:
path: "{{ ucx_dir }}"
register: stat_ucx
- name: Create ucx directory if it does not exist
file:
path: "{{ ucx_dir }}"
state: directory
owner: root
group: root
mode: u=rwx,g=rx,o=rx
become: true
when: not stat_ucx.stat.exists
- name: download ucx
get_url:
url: "{{ ucx_src_url }}"
checksum: "{{ ucx_src_checksum }}"
dest: "{{ src_base }}/ucx_src"
when: ucx_src_checksum is defined
- name: download ucx
get_url:
url: "{{ ucx_src_url }}"
dest: "{{ src_base }}/ucx_src"
when: ucx_src_checksum is not defined
- name: unarchive ucx
unarchive:
args:
src: "{{ src_base }}/ucx_src"
copy: no
dest: "{{ src_base }}"
creates: "{{ ucx_src_dir }}"
become: true
register: newucx
- name: install ucx
shell: "./contrib/configure-release --prefix={{ ucx_dir }} && make -j8 && make install"
args:
chdir: "{{ ucx_src_dir }}"
creates: "{{ ucx_dir }}/bin/ucx_info"
become: true
# when: not stat_ucx.stat.exists
- name: configure slurm centos
command: "{{ slurm_src_dir }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix={{ pmix_dir }} --with-ucx={{ ucx_dir }}"
args:
creates: "{{ slurm_dir }}/bin/srun"
chdir: "{{ slurm_src_dir }}"
when:
- force_slurm_recompile is defined or not stat_srun.stat.exists
- ansible_os_family == 'RedHat'
- name: configure slurm ubuntu
command: "{{ slurm_src_dir }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix --with-ucx={{ ucx_dir }}"
args:
creates: "{{ slurm_dir }}/bin/srun"
chdir: "{{ slurm_src_dir }}"
when:
- force_slurm_recompile is defined or not stat_srun.stat.exists
- ansible_os_family == 'Debian'
- name: build slurm
command: make
args:
creates: "{{ slurm_dir }}/bin/srun"
chdir: "{{ slurm_src_dir }}"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: install slurm
shell: make install
become: true
args:
chdir: "{{ slurm_src_dir }}"
creates: "{{ slurm_dir }}/bin/srun"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: build pam_slurm
shell: "make && make install"
args:
chdir: "{{ slurm_src_dir }}/contribs/pam"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
become: true
- name: build pam_slurm_adopt
make:
chdir: "{{ slurm_src_dir }}/contribs/pam_slurm_adopt"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: install pam_slurm_adopt
make:
chdir: "{{ slurm_src_dir }}/contribs/pam_slurm_adopt"
target: install
when: force_slurm_recompile is defined or not stat_srun.stat.exists
become: true
- name: remove exist-slurm-latest-link
file:
path: /opt/slurm-latest
state: absent
become: true
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: put slurm-latest-link
file:
src: "{{ slurm_dir }}"
dest: /opt/slurm-latest
state: link
become: true
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: add slurm log rotate config
template: src=slurmlog.j2 dest=/etc/logrotate.d/slurm mode=644
become: true
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