File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ addons:
13
13
14
14
install :
15
15
# Install ansible
16
- - pip install ansible
16
+ - pip install ansible ansible-lint
17
17
18
18
# Check ansible version
19
19
- ansible --version
@@ -27,6 +27,11 @@ install:
27
27
script :
28
28
# Basic role syntax check
29
29
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
30
+
31
+ # Run Ansible lint against the role
32
+ - ansible-lint tasks/main.yml
33
+
34
+ # Test the custom filters
30
35
- ansible-playbook tests/filter.yml -i tests/inventory -i tests/inventory-mock-groups
31
36
32
37
notifications :
Original file line number Diff line number Diff line change 2
2
- name : Fail if slurm_control_host or slurm_cluster_name or slurm_partitions are undefined
3
3
fail :
4
4
msg : " Undefined slurm_control_host or slurm_cluster_name or slurm_partitions."
5
- when :
5
+ when :
6
6
slurm_control_host == none or
7
7
slurm_cluster_name == none or
8
8
slurm_partitions | length == 0
40
40
- name : Retrieve Munge key from Slurm control host
41
41
slurp :
42
42
src : " /etc/munge/munge.key"
43
- register : slurm_munge_key
43
+ register : slurm_munge_key
44
44
when : inventory_hostname == slurm_control_host
45
45
46
46
- name : Write Munge key
67
67
owner : root
68
68
group : root
69
69
mode : 0644
70
- notify :
70
+ notify :
71
71
- Restart SLURM service
72
72
73
73
- name : Flush handlers
77
77
# the handler, ensure it's running here.
78
78
- name : Ensure SLURM services are running
79
79
service :
80
- name : " {{slurm_service}}"
81
- state : " {{'started' if slurm_service_enabled| bool else 'stopped'}}"
80
+ name : " {{ slurm_service }}"
81
+ state : " {{ 'started' if slurm_service_enabled | bool else 'stopped' }}"
82
82
83
83
# Install OpenHPC runtime
84
84
- name : Ensure selected OpenHPC packages are installed
85
85
yum :
86
- name : " {{openhpc_packages}}"
86
+ name : " {{ openhpc_packages }}"
87
87
state : present
88
88
...
You can’t perform that action at this time.
0 commit comments