Skip to content
Snippets Groups Projects
topplay.yml 2.59 KiB
Newer Older
Chris Hines's avatar
Chris Hines committed
# First we need hostname -f to return the correct domain

Chris Hines's avatar
Chris Hines committed
  - {role: etcHosts, domain: 'test.massive.org.au' }
Chris Hines's avatar
Chris Hines committed
# Create an x509 CA. Certificates are used for the VPN, the ldap server and the web server (karaage)
Chris Hines's avatar
Chris Hines committed
- hosts: ManagmentNodes[0]
Chris Hines's avatar
Chris Hines committed
- hosts: 'ManagmentNodes'
Chris Hines's avatar
Chris Hines committed
    x509_ca_server: "{{ groups['ManagmentNodes'][0] }}"
    ldapDomain: "dc=test,dc=massive,dc=org,dc=au"
  roles:
  - { role: OpenVPN-Server }
Chris Hines's avatar
Chris Hines committed
  - { role: ldapserver }
Chris Hines's avatar
Chris Hines committed
    x509_ca_server: "{{ groups['ManagmentNodes'][0] }}"
    smtp_smarthost: "does_not_exist.massive.org.au"
    ldapDomain: "dc=test,dc=massive,dc=org,dc=au"
Chris Hines's avatar
Chris Hines committed
    ldapURL: "ldaps://{{ hostvars[groups['ManagmentNodes'][0]]['ansible_fqdn'] }}"
Chris Hines's avatar
Chris Hines committed
# The next two tasks, apply the VPN and recalcuate /etc/hosts. Comment them if you are on a secure network
Chris Hines's avatar
Chris Hines committed
- hosts: ComputeNodes
Chris Hines's avatar
Chris Hines committed
    x509_ca_server: "{{ groups['ManagmentNodes'][0] }}"
    openvpn_servers: "{{ groups['ManagmentNodes'] }}"
Chris Hines's avatar
Chris Hines committed
    - { role: OpenVPN-Client }
Chris Hines's avatar
Chris Hines committed
  - {role: etcHosts, domain: 'test.massive.org.au' }

# These tasks build some software (slurm, munge and openmpi) and copy them back to localhost. Skip if you have some other way of getting 
# copyies of these software

- hosts: ComputeNodes[0]
  vars:
    slurm_version: 14.11.0
    munge_version: 0.5.11
  roles:
    - { role: slurm-build }

# Slurm and openmpi tasks assume copies of the software in /tmp under a very specific directory strucutre (created by the build tasks above) Modifiy 
# the roles if you have a different way of installing the software
- hosts: ComputeNodes:ManagmentNodes:LoginNodes
Chris Hines's avatar
Chris Hines committed
  vars:
    slurm_version: 14.11.0
    munge_version: 0.5.11
    slurmqueues: 
Chris Hines's avatar
Chris Hines committed
      - {name: batch, group: ComputeNodes}
    slurmctrl: "{{ groups['ManagmentNodes'][0] }}"
Chris Hines's avatar
Chris Hines committed
  roles:
Chris Hines's avatar
Chris Hines committed
      - { role: slurm, slurm_use_vpn: true} # change to false if you are on a secure network
Chris Hines's avatar
Chris Hines committed
      - { role: test_user }

Chris Hines's avatar
Chris Hines committed
# These tasks build some software (slurm, munge and openmpi) and copy them back to localhost. Skip if you have some other way of getting 
# copyies of these software

- hosts: ComputeNodes[0]
  vars:
    openmpi_version: 1.8.3
  roles:
    - { role: openmpi-build }

# Slurm and openmpi tasks assume copies of the software in /tmp under a very specific directory strucutre (created by the build tasks above) Modifiy 
# the roles if you have a different way of installing the software

- hosts: ComputeNodes:ManagmentNodes:LoginNodes
Chris Hines's avatar
Chris Hines committed
  vars:
    openmpi_version: 1.8.3
  roles:
      - { role: openmpi }