restructured playbooks, cleanup
This commit is contained in:
120
play.yml
120
play.yml
@@ -1,116 +1,10 @@
|
||||
---
|
||||
- hosts: all
|
||||
vars_files:
|
||||
- vars-auth.yml
|
||||
- vars-influx.yml
|
||||
tasks:
|
||||
- name: "install epel repo" # for htop etc.
|
||||
yum:
|
||||
name: epel-release
|
||||
state: present
|
||||
- name: base setup
|
||||
import_playbook: base.yml
|
||||
|
||||
- name: "install tools"
|
||||
yum:
|
||||
name: [ vim-enhanced, htop, screen, bind-utils, nmap-ncat, net-tools ]
|
||||
state: present
|
||||
- name: setup htcondor
|
||||
import_playbook: htcondor.yml
|
||||
when: '"htcondor" in group_names'
|
||||
|
||||
- name: "install ssh-key"
|
||||
authorized_key:
|
||||
user: thoto
|
||||
key: "{{ssh_key}}"
|
||||
state: present
|
||||
|
||||
- hosts: htcondor
|
||||
pre_tasks:
|
||||
- name: "install htcondor repo"
|
||||
yum:
|
||||
name: https://research.cs.wisc.edu/htcondor/repo/8.9/htcondor-release-current.el7.noarch.rpm
|
||||
state: present
|
||||
tags: htcondor
|
||||
|
||||
- name: "install htcondor software "
|
||||
yum:
|
||||
name: htcondor-ce
|
||||
state: present
|
||||
tags: htcondor
|
||||
|
||||
- name: "remove minicondor configuration"
|
||||
yum:
|
||||
name: minicondor
|
||||
state: absent
|
||||
tags: htcondor
|
||||
|
||||
- name: "setup singularity"
|
||||
import_tasks: "singularity.yml"
|
||||
tags: singularity
|
||||
|
||||
roles:
|
||||
- name: "setup docker"
|
||||
role: docker
|
||||
tags: docker
|
||||
|
||||
- name: "setup htcondor test environment in docker containers"
|
||||
role: docker-htcondor
|
||||
tags:
|
||||
- htcondor-containered
|
||||
- htcondor
|
||||
|
||||
- hosts: slurm, cobald
|
||||
vars:
|
||||
container_privileged: True
|
||||
slurm_num_nodes: 10
|
||||
tasks:
|
||||
- name: "setup docker"
|
||||
import_role: name=docker
|
||||
tags: docker
|
||||
|
||||
- name: "get facts from existing cobald instance (i.e. hostname)"
|
||||
include_role:
|
||||
name: cobald
|
||||
tasks_from: facts
|
||||
apply:
|
||||
tags: slurm, cobald, slurm-config
|
||||
tags: slurm, cobald, slurm-config
|
||||
vars:
|
||||
container_name: cobald
|
||||
|
||||
- name: "setup slurm test environment in docker containers"
|
||||
include_role:
|
||||
name: slurm
|
||||
apply:
|
||||
tags: slurm
|
||||
vars:
|
||||
slurm_user: slurm # or root
|
||||
slurm_user_accounts:
|
||||
- name: cobald
|
||||
dir: /var/lib/cobald
|
||||
num_nodes: "{{slurm_num_nodes}}"
|
||||
extra_nodes:
|
||||
- name: cobald
|
||||
hostname: "{{cobald_container_hostname}}" # from cobald/facts.yml above
|
||||
# hostname is used as NodeHostname, which is used slurms "networking
|
||||
# code" (https://bugs.schedmd.com/show_bug.cgi?id=8615).
|
||||
# It works either way around, but one of NodeName or NodeHostname has
|
||||
# to match the container name (-n flag, not --hostname) since when
|
||||
# submitting tasks to the slurm controller, it matches access
|
||||
# permissions against a reverse lookup of the submitting ip address.
|
||||
# Docker always and unconfigureably resolves the container ip in any
|
||||
# network to containername.netname, where containername is the
|
||||
# containers runtime name (not hostname supplied!) and netname is
|
||||
# the network name in host environment. We should run our own dns...
|
||||
docker_network: slurm
|
||||
when: '"slurm" in group_names'
|
||||
tags: slurm, cobald, slurm-config
|
||||
# tags: cobald requires some slurm facts, so cobald tag is included here
|
||||
|
||||
- name: "install cobald"
|
||||
include_role:
|
||||
name: cobald
|
||||
apply:
|
||||
tags: cobald
|
||||
vars:
|
||||
cobald_slurm: True
|
||||
container_name: cobald
|
||||
# docker_network: slurm # overriden by vars/slurm.yml
|
||||
when: '"cobald" in group_names'
|
||||
tags: cobald, influxdb
|
||||
- name: setup slurm and cobald
|
||||
import_playbook: cobald.yml
|
||||
|
Reference in New Issue
Block a user