diff --git a/playbook-svc-idm.yml b/playbook-svc-idm.yml index ad89fa8..ca2cb61 100644 --- a/playbook-svc-idm.yml +++ b/playbook-svc-idm.yml @@ -52,7 +52,7 @@ ipaadmin_password: "{{ipa_password}}" defaultgroup: "{{idm_default_group}}" defaultshell: /bin/bash - homedirectory: /nfs/home + homedirectory: /home - name: Trim ansible.builtin.shell: fstrim -av diff --git a/playbook-svc-login.yml b/playbook-svc-login.yml index 1fb360a..21f0703 100644 --- a/playbook-svc-login.yml +++ b/playbook-svc-login.yml @@ -7,6 +7,10 @@ - include_tasks: tasks/backup_or_restore_host_keys.yml - include_tasks: tasks/setup_unattended_security_updates.yml + - name: Setup missing Slurm dependencies + ansible.builtin.dnf: + name: ["/bin/mailx", "Lmod"] + - name: Setup motd ansible.builtin.copy: content: "{{login_message_of_the_day}}" @@ -30,6 +34,11 @@ state: enabled permanent: true + - name: Remove stale CA from past IPA joins + ansible.builtin.file: + state: absent + path: /etc/ipa/ca.crt + roles: - role: linux-system-roles.postfix postfix_conf: { relayhost: "{{postfix_smtp_relay}}" } @@ -47,6 +56,7 @@ openhpc_slurm_service_enabled: true openhpc_login_only_nodes: "{{inventory_hostname}}" openhpc_cluster_name: "{{mgmt_cluster_name}}" + openhpc_module_system_install: false - role: freeipa.ansible_freeipa.ipaclient state: present diff --git a/playbook-svc-mgmt.yml b/playbook-svc-mgmt.yml index 655f924..97a8550 100644 --- a/playbook-svc-mgmt.yml +++ b/playbook-svc-mgmt.yml @@ -4,11 +4,12 @@ pre_tasks: - include_tasks: tasks/setup_backup_dir.yml + - include_tasks: tasks/backup_or_restore_host_keys.yml - include_tasks: tasks/setup_unattended_security_updates.yml - name: Setup missing Slurm dependencies ansible.builtin.dnf: - name: ["/bin/mailx"] + name: ["/bin/mailx", "Lmod"] roles: - role: linux-system-roles.postfix @@ -50,6 +51,7 @@ openhpc_packages: [] openhpc_slurm_partitions: - name: dummy # empty partition causes slurm to stall, we'll delete this partition later to make slurm start + openhpc_module_system_install: false - role: freeipa.ansible_freeipa.ipaclient state: present @@ -280,7 +282,7 @@ ipaadmin_password: "{{ipa_password}}" name: auto.rds1 location: default - mount: "/nfs" + mount: "/-" state: present - name: Create rds1 mount keys @@ -288,7 +290,7 @@ ipaadmin_password: "{{ipa_password}}" location: default mapname: auto.rds1 - key: "{{item}}" # points to /nfs/{{item}} + key: "/{{item}}" info: "mgmt.{{domain}}:/mnt/rds1/{{item}}" state: present loop: "{{mgmt_exported_directories}}" diff --git a/staging.rb b/staging.rb index dcabef8..a37119f 100644 --- a/staging.rb +++ b/staging.rb @@ -113,7 +113,7 @@ def self.write_inventory(pve_ip:, storage_pool:, extra_hosts:, host_common_hash: mgmt_compute_dhcp_start: '10.10.10.150', mgmt_compute_dhcp_end: '10.10.10.254', mgmt_webhook_port: '808', - mgmt_exported_directories: %w[home shared], + mgmt_exported_directories: %w[home shared opt], mgmt_cluster_name: 'staging' } login_node_vars = { diff --git a/tasks/tests.yml b/tasks/tests.yml index 3da45a8..9f97bfd 100644 --- a/tasks/tests.yml +++ b/tasks/tests.yml @@ -2,10 +2,21 @@ ansible.builtin.shell: pwd register: dir -- ansible.builtin.fail: +- name: Assert home dir path is correct + ansible.builtin.fail: msg: "Bad home dir path" when: - - dir.rc != 0 or dir.stdout.strip() != "/nfs/home/" + ansible_user + - dir.rc != 0 or dir.stdout.strip() != "/home/" + ansible_user + +- name: Get df + ansible.builtin.shell: df + register: df + +- name: Assert mountpoint is correct + ansible.builtin.fail: + msg: "Missing mount in df" + when: + - df.rc != 0 or 'mgmt.{{domain}}:/mnt/rds1/home' not in df.stdout - name: Get srun node hostnames ansible.builtin.shell: srun --nodelist={{node}} hostname