|
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" |
0 commit comments