File tree Expand file tree Collapse file tree 3 files changed +71
-0
lines changed Expand file tree Collapse file tree 3 files changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Update Passwords
3
+ hosts : workshop_instances
4
+ tasks :
5
+ # For some instances, they don't come pre-configured with a password, so we do that now.
6
+ - name : Generate a host-specific password
7
+ # Here we use the echo/cat pattern in order to generate lightly salted versions.
8
+ # Mostly useful if you have one workshop, then another.
9
+ command : |
10
+ /usr/bin/pwgen -H /etc/hostname 10 1
11
+ register : actual_pw
12
+
13
+ - name : Set a password if requested
14
+ user :
15
+ name : ubuntu
16
+ password : " {{ actual_pw.stdout | password_hash('sha512', 'gatGATgat') }}"
17
+
18
+ - name : " Output password for admins"
19
+ debug :
20
+ msg : " password: {{ inventory_hostname }} {{ actual_pw.stdout }}"
Original file line number Diff line number Diff line change
1
+ [galaxyservers]
2
+ {{ inventory_hostname }} ansible_connection =local ansible_user =ubuntu
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Bring machines up to specific point
3
+ hosts : workshop_instances
4
+ vars :
5
+ # 2022-03-30 # Before any changes, last step of step 4 # CVMFS = step-5
6
+ git_gat_version : b4e777e9f64e05ab0beb05c5b2b1f4428f2c58d4
7
+ tasks :
8
+ - name : Git checkout
9
+ ansible.builtin.git :
10
+ repo : ' https://github.com/hexylena/git-gat/'
11
+ dest : galaxy/
12
+ version : " {{ git_gat_version }}"
13
+ force : yes
14
+
15
+ - name : Fix ansible
16
+ command : pip install -U ansible
17
+
18
+ # BEGIN CVMFS Hacks
19
+ - name : Wipe out CVMFS
20
+ command : rm -rf roles/galaxyproject.cvmfs/
21
+ args :
22
+ chdir : galaxy/
23
+
24
+ - name : Hackily use latest version of CVMFS role.
25
+ ansible.builtin.lineinfile :
26
+ path : galaxy/requirements.yml
27
+ regexp : ' version: 0.2.13'
28
+ line : ' version: 0.2.16'
29
+ # END CVMFS Hacks
30
+
31
+ - name : Install deps
32
+ command : ansible-galaxy install -r requirements.yml -p roles
33
+ args :
34
+ chdir : galaxy/
35
+
36
+ - name : Setup hosts file
37
+ ansible.builtin.template :
38
+ src : templates/hosts
39
+ dest : galaxy/hosts
40
+
41
+ - name : Setup vault password
42
+ ansible.builtin.copy :
43
+ content : " password"
44
+ dest : galaxy/.vault-password.txt
45
+
46
+ - name : Setup Galaxy
47
+ command : ansible-playbook galaxy.yml
48
+ args :
49
+ chdir : galaxy/
You can’t perform that action at this time.
0 commit comments