forked from marvel-nccr/quantum-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
114 lines (112 loc) · 3.68 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
- name: Install ansible prerequisites
hosts: default
gather_facts: no
roles:
- marvel-nccr.ansible-prerequisites
- name: Add vm user
hosts: default
gather_facts: no
pre_tasks:
- name: import global variables
tags: always
include_vars:
file: globalconfig.yml
- name: test global config
debug:
msg: RUNNING PLAYBOOK FOR '{{ vm_name }}' VERSION '{{ vm_version }}'
- name: testing ansible environment
debug:
msg: Connecting to host '{{ inventory_hostname }}' as user '{{ ansible_user }}'
roles:
- name: add user {{ vm_user }} with key
role: marvel-nccr.add-user
vars:
add_user_name: "{{ vm_user }}"
add_user_password: "{{ vm_password }}"
add_user_sudo: True
# Note: it is important to pass variables to roles within a 'vars' group
# If they are passed on the same indentation level as the role, the variable is
# set correctly inside the role, but following roles will read the *default*
# value of the variable (as defined inside the role).
- name: set up the VM
hosts: default
become: True
become_user: "{{ vm_user }}"
pre_tasks:
- name: import global variables
tags: always
include_vars:
file: globalconfig.yml
vars:
- release_notes: True
- run_tests: False
- clean: False
- root_user: root
- cloud_platform: virtualbox
roles:
- role: marvel-nccr.simulationbase
tags: simulationbase
vars:
simulationbase_vm_user: "{{ vm_user }}"
simulationbase_vm_user_public_key: "{{ lookup('file', './keys/aiida_tutorial_aiidaaccount.pub') }}"
simulationbase_hostname: "{{ vm_hostname }}"
simulationbase_codes_folder: "{{ vm_codes_folder }}"
- role: marvel-nccr.ubuntu-desktop
tags: ubuntu_desktop
vars:
ubuntu_desktop_browser: "{{ vm_browser }}"
ubuntu_desktop_vm_user: "{{ vm_user }}"
when: not vm_headless
- role: marvel-nccr.quantum-mobile-customizations
tags: customizations
vars:
qm_customizations_vm_user: "{{ vm_user }}"
qm_customizations_vm_password: "{{ vm_password }}"
qm_customizations_vm_name: "{{ vm_name }}"
qm_customizations_vm_version: "{{ vm_version }}"
qm_customizations_vm_author: "{{ vm_author }}"
qm_customizations_headless: "{{ vm_headless }}"
qm_customizations_codes_folder: "{{ vm_codes_folder }}"
qm_customizations_examples_folder: "{{ vm_examples_folder }}"
- role: marvel-nccr.editors
tags: editors
- role: marvel-nccr.torque
tags: torque
vars:
torque_hostname: "{{ vm_hostname }}"
torque_cpus: "{{ vm_cpus }}"
- role: marvel-nccr.quantum-espresso
tags: quantum_espresso
vars:
quantum_espresso_code_folder: "{{ vm_codes_folder }}"
- role: marvel-nccr.yambo
tags: yambo
vars:
yambo_code_folder: "{{ vm_codes_folder }}"
- role: marvel-nccr.fleur
tags: fleur
vars:
fleur_code_folder: "{{ vm_codes_folder }}"
- role: marvel-nccr.siesta
tags: siesta
vars:
siesta_code_folder: "{{ vm_codes_folder }}"
- role: marvel-nccr.cp2k
tags: cp2k
vars:
cp2k_code_folder: "{{ vm_codes_folder }}"
- role: marvel-nccr.wannier90
tags: wannier90
vars:
wannier90_code_folder: "{{ vm_codes_folder }}"
- role: marvel-nccr.aiida
tags: aiida
vars:
aiida_code_folder: "{{ vm_codes_folder }}"
aiida_localhost_cpus: "{{ vm_cpus }}"
aiida_examples_folder: "{{ vm_examples_folder }}"
- role: marvel-nccr.aiidalab
tags: aiidalab
vars:
aiidalab_headless: "{{ vm_headless }}"