- 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: etcHosts, tags: [ networking ] }
  - { role: config_repos, tags: [ repos ] }
  - { role: upgrade, tags: [ upgrade ]}
  - { role: set_password }
  - { role: ntp }
  - { role: set_timezone }


- 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 ] }

