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

Merge branch 'cron' into 'master'

Cron

See merge request hpc-team/ansible_cluster_in_a_box!290
parents 740d7b28 0d8ded9b
No related branches found
No related tags found
1 merge request!290Cron
- hosts: 'all'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
tasks:
- { name: set use shared state, set_fact: usesharedstatedir=False }
- { name: set hostgroup, set_fact: hostgroup='ComputeNodes' }
tags: [ always ]
- hosts: 'all'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
strategy: free
roles:
# - { role: disable_selinux, tags: [ disableselinux ] }
- { role: upgrade }
- { role: set_password }
- { role: etcHosts, tags: [ networking ] }
# - { role: config_repos, tags: [ repos ] }
- hosts: 'DesktopNodes,ComputeNodes,LoginNodes,ManagementNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
strategy: free
roles:
- { role: disable_selinux, tags: [ disableselinux ] }
- { role: ldapclient, tags: [ authentication ] }
- { role: ssh-password-login, tags: [ authentication ] }
- { role: enable_sudo_group, tags: [ authentication, sudo ] }
- { role: move_homedir }
- { role: calculateKnownHosts, tags: [ calculateKnownHosts ] }
- { role: SSHKnownHosts, tags: [ known_hosts ] }
- { role: jasons_ssh_ca, tags: [ ssh_ca ] }
- hosts: 'DesktopNodes,ComputeNodes,LoginNodes,VisNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
tasks:
- { name: set use shared state, set_fact: usesharedstatedir=False }
tags: [ always ]
- hosts: 'DesktopNodes,ComputeNodes,LoginNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
strategy: free
roles:
- { role: move_homedir, tags: [ authentication, filesystems ] }
- { role: nfs-client, nfsMounts: "{{ computeNfsMounts }}", tags: [ filesystems ] }
- { role: slurm-common, tags: [ slurm, slurm-common ] }
- { role: lmod, tags: [ other ] }
- { role: enable_modules, default_modules: "lmod", tags: [ other ] }
- { role: postfix, tags: [ mail, other ] }
- hosts: 'VisNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
roles:
- { role: gpu, tags: [ gpu ] }
- hosts: 'DesktopNodes,ComputeNodes,LoginNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
roles:
- { role: slurm_config, tags: [slurm, slurm_config] }
- hosts: 'DesktopNodes,ComputeNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
strategy: free
roles:
- { role: slurm-start, start_slurmd: True, tags: [ slurm, slurmstart ] }
- { role: mate-de-install, tags: [ mate-de-install ] } # TODO this crashes for everything except cmca
../files
\ No newline at end of file
---
- hosts: 'all'
tasks:
- include_vars: vars/passwords.yml
- include_vars: vars/names.yml
- include_vars: vars/ldapConfig.yml
- include_vars: vars/filesystems.yml
- include_vars: vars/slurm.yml
- include_vars: vars/vars.yml
- hosts: 'all'
tasks:
- { name: setup, setup: }
- hosts: 'ManagementNodes'
roles:
- { role: calculateSlurmConf }
---
# just calculates an etc hosts
- hosts: 'all'
tasks:
- include_vars: vars/passwords.yml
- include_vars: vars/names.yml
- include_vars: vars/ldapConfig.yml
- include_vars: vars/filesystems.yml
- include_vars: vars/slurm.yml
- include_vars: vars/vars.yml
- hosts: 'all'
tasks:
- { name: setup, setup: }
- hosts: 'ManagementNodes'
roles:
- { role: calculateEtcHosts }
#- hosts: 'NFSNodes'
# roles:
# - { role: calculateExports }
# Basic stuff to make the nodes functionl
# i.e. upgrade operating systems, etc
#
- hosts: 'ManagementNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
tasks:
# - { name: set hostgroup, set_fact: hostgroup='ManagementNodes' }
- { name: set use shared state, set_fact: usesharedstatedir=True }
tags: [ always ]
- hosts: 'ManagementNodes'
strategy: free
gather_facts: False
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
roles:
# - { role: ldapclient, tags: [ authentication ] }
# - { role: ssh-password-login }
# - { role: enable_sudo_group }
# - { role: make_filesystems, volumes: "{{ glustervolumes }}" }
# - { role: gluster_server, volname: "gv", brickmnt: '/gbrick', gluster_servers: "{{ groups['ManagementNodes'] }}", replicas: 2, tags: [ gluster_server ] }
# - { role: gluster_volcreate, volname: "gv", gluster_servers: "{{ groups['ManagementNodes'] }}", brickmnt: '/gbrick', replicas: 2 }
# - { role: gluster_client, volname: "gv", gluster_servers: ['mgmt0','mgmt1','sql0'], volmnt: '/glusterVolume' }
- { role: nfs-client, nfsMounts: "{{ mgmtNfsMounts }}", tags: [ nfs ] }
- { role: slurmdb-config, tags: [ slurm, slurmdb-config ] }
- { role: slurm-common, tags: [ slurm, slurm-common ] }
- { role: slurm_config, tags: [ slurm, slurm-config ] }
- { role: slurm-start, start_slurmdbd: True, start_slurmctld: True, tags: [ slurm-start ] }
# - { role: provision_slurm, use_active_directory: False, lockpath: "/mnt/home", tags: [ slurm ] }
# - { role: provision_homedir, use_active_directory: False, mntpt: "/mnt/home", tags: [ provisioning ] }
# Role to initialize nfs and SQL Nodes
#
#
- hosts: 'all'
tasks:
- { name: setup, setup: }
tags: [ always ]
#we need this here to gather facts and fill required variables.
- hosts: 'ManagementNodes'
gather_facts: True
tasks:
- include_vars: vars/passwords.yml
- include_vars: vars/names.yml
- include_vars: vars/ldapConfig.yml
- include_vars: vars/filesystems.yml
- include_vars: vars/slurm.yml
- include_vars: vars/vars.yml
- { name: set hostgroup, set_fact: hostgroup='ManagementNodes' }
- { name: set use shared state, set_fact: usesharedstatedir=True }
tags: [ always ]
- hosts: 'SQLNodes,NFSNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
pre_tasks:
- { name: set hostgroup, set_fact: hostgroup='SQLNodes', tags: [ always ] }
- { name: set use shared state, set_fact: usesharedstatedir=True, tags: [ always ] }
- hosts: 'SQLNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
strategy: free
gather_facts: True
roles:
- { role: upgrade, tags: [ upgrade ] }
- { role: make_filesystems, volumes: "{{ dbvolumes }}" }
- { role: mysql, mysql_type: mysql_server, mysql_root_password: "{{ sqlrootPasswd }}", mysql_user_name: slurmdb, mysql_user_db_name: slurm_acct_db, mysql_user_hosts_group: "{{ groups['ManagementNodes'] }}", mysql_user_password: "{{ slurmdb_passwd }}", tags: [ database ] }
- { role: slurm-mysql-config, tags: [database,slurmdb] }
tags: [ sql ]
- hosts: 'NFSNodes'
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
strategy: free
gather_facts: False
roles:
- { role: make_filesystems, volumes: "{{ nfsvolumes }}" }
tasks:
- { name: make homedir, file: { path: /nfsvol/home, state: directory }, become: true, become_user: root }
- { name: make usr_local, file: { path: /nfsvol/usr_local_centos7, state: directory }, become: true, become_user: root }
- { name: make projects, file: { path: /nfsvol/projects, state: directory }, become: true, become_user: root }
- { name: make projects, file: { path: /nfsvol/scratch, state: directory }, become: true, become_user: root }
tags: [ nfs ]
- hosts: 'NFSNodes'
strategy: free
gather_facts: False
vars_files:
- vars/passwords.yml
- vars/names.yml
- vars/ldapConfig.yml
- vars/filesystems.yml
- vars/slurm.yml
- vars/vars.yml
roles:
- { role: nfs-server }
tags: [ nfs ]
../roles
\ No newline at end of file
../vars
\ No newline at end of file
- name: Adding pamd access for users who can run cron jobs
lineinfile:
path: /etc/security/access.conf
state: present
insertbefore: '^-:ALL EXCEPT root systems ec2-user debian ubuntu admin :ALL'
line: '+: cron-users : cron crond :0'
become: true
become_user: root
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