Commit ad54ee91 authored by Maiken's avatar Maiken
Browse files

Removed duplicate after_cusdtom.yml file

parent 008891b8
---
#
# This playbook is for site-local customization to ElastiCluster's
# playbooks. It runs *after* any other playbook distributed with
# ElastiCluster has gotten its chance to run.
#
# An empty playbook is checked into the Git repository. If you make
# any local modifications, please run `git update-index
# --assume-unchanged after.yml` to avoid committing them accidentally
# into ElastiCluster's main branch.
# the nfs-server coincides with slurm-master or frontend
# the nfs-client coincides with slurm-worker or compute
#### Install shade to be able to use openstack ansible module
- hosts: all
tags:
- after
- local
tasks:
- name: Update packages
yum:
name: '*'
state: latest
exclude: kernel*
- name: Dependencies for shade
yum:
name: "{{ item }}"
state: present
with_items:
- epel-release
- python-devel
- openssl-devel
- "@Development Tools"
- python-pip
- name: Install shade
command: pip install shade
- hosts: all
tags:
- after
- local
tasks:
- name: Create grid group
group: name={{ group_name_grid }} state=present
- name: Create generic grid user
user: "name={{ user_name_grid }} group={{ group_name_grid }} state=present createhome=no"
#### Volumes on frontend
- hosts: frontend
tags:
- after
- local
tasks:
- name: openstack volume | create volume for frontend
environment: "{{ os_env }}"
os_volume:
state: present
size: "{{ item.size }}"
display_name: "{{ item.name }}"
with_items: "{{ blockstorage_frontend }}"
- name: openstack volume | attach volume to frontend host
environment: "{{ os_env }}"
os_server_volume:
state: present
server: "{{ cluster_name }}-{{ ansible_hostname }}"
volume: "{{ item.name }}"
device: "{{ item.src }}"
with_items: "{{ blockstorage_frontend }}"
- name: Create filesystem
filesystem:
fstype: "{{ item.fstype }}"
dev: "{{ item.src }}"
with_items: "{{ blockstorage_frontend }}"
- name: Ensure directories exist
file:
path: "{{ item.path }}"
state: directory
owner: "{{ user_name_grid }}"
group: "{{ group_name_grid }}"
mode: 0755
with_items: "{{ blockstorage_frontend }}"
- name: Add mountpoints in fstab
mount:
fstype: "{{ item.fstype }}"
path: "{{ item.path }}"
src: "{{ item.src }}"
state: mounted
with_items: "{{ blockstorage_frontend }}"
### Volumes on compute
- hosts: compute
tags:
- after
- local
tasks:
- name: openstack volume | create volume for compute
environment: "{{ os_env }}"
os_volume:
state: present
size: "{{ item.size }}"
display_name: "{{ item.name }}"
with_items: "{{ blockstorage_compute }}"
- name: openstack volume | attach volume to compute host
environment: "{{ os_env }}"
os_server_volume:
state: present
server: "{{ cluster_name }}-{{ ansible_hostname }}"
volume: "{{ item.name }}"
device: "{{ item.src }}"
with_items: "{{ blockstorage_compute }}"
- name: Create filesystem
filesystem:
fstype: "{{ item.fstype }}"
dev: "{{ item.src }}"
with_items: "{{ blockstorage_compute }}"
- name: Ensure directories exist
file:
path: "{{ item.path }}"
state: directory
owner: root
group: root
mode: 0755
with_items: "{{ blockstorage_compute }}"
- name: Add mountpoints in fstab
mount:
fstype: "{{ item.fstype }}"
path: "{{ item.path }}"
src: "{{ item.src }}"
state: mounted
with_items: "{{ blockstorage_compute }}"
###### Slurm hack
- hosts: all
tags:
- after
- local
tasks:
- name: Comment out the VSizeFactor for grid jobs
lineinfile:
path: /etc/slurm/slurm.conf
regexp: '^VSizeFactor'
line: '#VSizeFactor'
backup: yes
ignore_errors: yes
###### NFS
- hosts: frontend
tags:
- after
- local
tasks:
- name: After - Ensure shared dirs exist on nfs server
file:
path: '{{ item.path }}'
state: directory
owner: "{{ localuser }}"
group: "{{ localuser }}"
mode: 0755
with_items: '{{ NFS_EXPORTS }}'
- name: After - roles for nfs-server
include_role:
name: 'nfs-server'
- hosts: compute
tags:
- after
- local
tasks:
- name: 'ensure {{ item. mountpoint }} directory exists and owned by user'
file:
path: '{{ item.mountpoint }}'
state: directory
group: "{{ localuser }}"
owner: "{{ localuser }}"
mode: 0755
with_items: '{{ NFS_MOUNTS }}'
- name: After - mount nfs shares
mount:
name: '{{item.mountpoint}}'
src: '{{item.fs}}'
fstype: nfs
opts: '{{item.options|default("rw,async")}}'
state: mounted
with_items: '{{ NFS_MOUNTS }}'
- name: After - nfs-client - add to fstab
include_role:
name: 'nfs-client'
- name: After - Restart SLURMd after all config is done (debian)
service:
name: slurmd
state: restarted
when: '{{is_debian_compatible}} and ({{is_debian_8_or_later}} or {{is_ubuntu_15_10_or_later}})'
- name: After - Restart slurm-llnl after all config is done (debian)
service:
name: slurm-llnl
state: restarted
when: '{{is_debian_compatible}} and (not ({{is_debian_8_or_later}} or {{is_ubuntu_15_10_or_later}}))'
- name: After - Restart SLURMd after all config is done (rhel7)
service:
name: slurmd
state: restarted
when: '{{is_rhel7_compatible}}'
- name: After - Restart SLURMd after all config is done (rhel6)
service:
name: slurm
state: restarted
when: '{{is_rhel6_compatible}}'
...
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment