Skip to content

Commit 445ee45

Browse files
committed
Merge branch 'vtest-v1.157-cleanup' into vtest-v1.157-merge
2 parents fd0c7f6 + 4254e28 commit 445ee45

File tree

4 files changed

+40
-120
lines changed

4 files changed

+40
-120
lines changed

environments/nrel/hooks/pre.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
---
22

3+
- name: "Add a stack admin user"
4+
hosts: all
5+
# tags: pre_tasks_all
6+
become: true
7+
gather_facts: true
8+
tasks:
9+
- name: Does localhome/stack dir exist
10+
ansible.builtin.stat:
11+
path: /localhome/stack
12+
register: localstack
13+
14+
# - name: Does localhome/rocky dir exist
15+
# ansible.builtin.stat:
16+
# path: /localhome/rocky
17+
# register: localrockyuserdir
18+
19+
- name: Add stack user
20+
ansible.builtin.include_role:
21+
name: vs.core.stack_user
22+
when: not localstack.stat.exists
23+
24+
# - name: Add rocky user role
25+
# ansible.builtin.include_role:
26+
# name: vshpc.rocky_user
27+
# when: not localrockyuserdir.stat.exists
28+
# tags:
29+
# - add_stack_user
30+
tags:
31+
- add_stack_user
32+
33+
- name: A cp user home to /var/lib/USER
34+
hosts: all
35+
# tags: pre_tasks_all
36+
become: true
37+
gather_facts: false
38+
339
- name: "Do the preliminary node setups"
440
hosts: all
541
# tags: pre_tasks_all

environments/vtest/hooks/pre.yml

Lines changed: 4 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,4 @@
1-
# - name: Import parent hook
2-
# vars:
3-
# appliances_environment_root: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
4-
# ansible.builtin.import_playbook: "{{ appliances_environment_root }}/../nrel/hooks/pre.yml"
5-
6-
- name: "Add a stack admin user"
7-
hosts: all
8-
# tags: pre_tasks_all
9-
become: true
10-
gather_facts: true
11-
tasks:
12-
- name: Does localhome/stack dir exist
13-
ansible.builtin.stat:
14-
path: /localhome/stack
15-
register: localstack
16-
17-
# - name: Does localhome/rocky dir exist
18-
# ansible.builtin.stat:
19-
# path: /localhome/rocky
20-
# register: localrockyuserdir
21-
22-
- name: Add stack user
23-
ansible.builtin.include_role:
24-
name: vs.core.stack_user
25-
when: not localstack.stat.exists
26-
27-
# - name: Add rocky user role
28-
# ansible.builtin.include_role:
29-
# name: vshpc.rocky_user
30-
# when: not localrockyuserdir.stat.exists
31-
# tags:
32-
# - add_stack_user
33-
tags:
34-
- add_stack_user
35-
36-
- name: A cp user home to /var/lib/USER
37-
hosts: all
38-
# tags: pre_tasks_all
39-
become: true
40-
gather_facts: false
41-
42-
# tasks:
43-
# - name: Does home/USER dir exist
44-
# ansible.builtin.stat:
45-
# path: "/home/{{ appliances_local_users_ansible_user_name }}"
46-
# register: homerocky
47-
48-
# - name: Does var/lib/rocky dir exist
49-
# ansible.builtin.stat:
50-
# path: "/var/lib/{{ appliances_local_users_ansible_user_name }}"
51-
# register: varlibrocky
52-
53-
# - name: Cp homerocky to var/lib/ dir
54-
# ansible.builtin.command: cp -a /home/{{ appliances_local_users_ansible_user_name }} /var/lib/{{ appliances_local_users_ansible_user_name }}
55-
# when:
56-
# - homerocky.stat.exists
57-
# register: cph
58-
# changed_when: cph.rc != 0
59-
60-
# # - name: cp auth_keys
61-
# # shell: |
62-
# # cp -a /home/rocky/.ssh /var/lib/rocky/.ssh
63-
# # when:
64-
# # - varlibrocky.stat.exists
65-
# # - homerocky.stat.exists
66-
67-
# - name: Hack passwd file for localhome/rocky
68-
# ansible.builtin.lineinfile:
69-
# path: /etc/passwd
70-
# regexp: '^rocky.*1000.*'
71-
# line: "rocky:x:1000:1000:vsRockyUser:/var/lib/{{ appliances_local_users_ansible_user_name }}:/bin/bash"
72-
# tags:
73-
# - rocky_localhome
74-
75-
- name: "Do the preliminary node setups"
76-
hosts: all
77-
# tags: pre_tasks_all
78-
become: true
79-
tasks:
80-
- name: Does vs_pre_complete.txt exist
81-
ansible.builtin.stat:
82-
path: /root/vs_pre_complete.txt
83-
register: vs_pre_complete
84-
85-
- name: Pre tasks now
86-
ansible.builtin.include_role:
87-
name: vshpc.prov.pre-tasks
88-
when: not vs_pre_complete.stat.exists
89-
90-
# TODO: KBENDL - check compatibility with new playbook
91-
- name: "NREL pre - Mount cephfs volumes"
92-
hosts: all
93-
tags:
94-
- vs_pre
95-
- aco.core.cephfs
96-
become: true
97-
tasks:
98-
- name: Does ceph exist?
99-
ansible.builtin.stat:
100-
path: /etc/ceph
101-
register: vs_does_cephdir
102-
- name: CephFS now
103-
ansible.builtin.include_role:
104-
name: aco.core.cephfs
105-
tags:
106-
- aco.core.cephfs
107-
when: not vs_does_cephdir.stat.exists
108-
- name: Tmp umount /home
109-
ansible.builtin.shell: systemctl stop home.mount
110-
when: not vs_does_cephdir.stat.exists
111-
become: true
1+
- name: Import parent hook
2+
vars:
3+
appliances_environment_root: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
4+
import_playbook: "{{ appliances_environment_root }}/../nrel/hooks/pre.yml"

environments/vtest/inventory/group_vars/openhpc/hpc-tests.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)