Skip to content
Snippets Groups Projects
Commit a4c41cd1 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

Merge branch 'cicd' of gitlab.erc.monash.edu.au:hpc-team/ansible_cluster_in_a_box into cicd

Former-commit-id: ed3c1ecf
parents e6082632 484e7c01
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ variables: ...@@ -6,7 +6,7 @@ variables:
stages: stages:
# - integration_test_downstream # working but unwanted here # - integration_test_downstream # working but unwanted here
# - trigger_pipeline_in_B # working but unwanted here # - trigger_pipeline_in_B # working but unwanted here
- yamllint - lint
- heat - heat
- ansible_create_cluster_stage - ansible_create_cluster_stage
- push_button_spawn_cluster - push_button_spawn_cluster
...@@ -51,16 +51,26 @@ stages: ...@@ -51,16 +51,26 @@ stages:
# #- CICD/.gitlab-ci.yml # #- CICD/.gitlab-ci.yml
yamllint: yamllint:
stage: yamllint stage: lint
allow_failure: true allow_failure: true
tags: tags:
- yamllint - yamllint
script: script:
- echo "stage yamllint" - echo "stage yamllint"
- cd CICD - cd CICD
- ansible-lint -c .yamllintconf.yaml -x ANSIBLE0002 master_playbook.yml # - ansible-lint -c .yamllintconf.yaml -x ANSIBLE0002 master_playbook.yml
- yamllint -c ./.yamllintheat.yaml ./heat - yamllint -c ./.yamllintheat.yaml ./heat
ansiblelint:
stage: lint
tags:
- ansiblelint
script:
- echo "stage ansiblelint"
- cd CICD
- python ansiblelint/run_lint.py master_playbook.yml
build_cluster_cicd: build_cluster_cicd:
stage: heat stage: heat
allow_failure: false allow_failure: false
......
filepath line rule serverity rule description
plays/roles/calculateEtcHosts/tasks/main.yml 8 E301 HIGH Commands should not change things if nothing needs doing
plays/roles/config_repos/tasks/main.yml 52 E301 HIGH Commands should not change things if nothing needs doing
plays/roles/config_repos/tasks/main.yml 52 E305 HIGH Use shell only when shell functionality is required
plays/roles/config_repos/tasks/main.yml 67 E305 HIGH Use shell only when shell functionality is required
plays/roles/config_repos/tasks/main.yml 72 E305 HIGH Use shell only when shell functionality is required
plays/roles/config_repos/tasks/main.yml 77 E305 HIGH Use shell only when shell functionality is required
plays/roles/etcHosts/tasks/main.yml 13 E305 HIGH Use shell only when shell functionality is required
plays/roles/etcHosts/tasks/main.yml 26 E305 HIGH Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml 56 E305 HIGH Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml 140 E305 HIGH Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml 145 E301 HIGH Commands should not change things if nothing needs doing
plays/roles/gpu/tasks/main.yml 145 E305 HIGH Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml 155 E305 HIGH Use shell only when shell functionality is required
plays/roles/move_homedir/tasks/main.yml 9 E305 HIGH Use shell only when shell functionality is required
plays/roles/nfs-client/meta/main.yml 2 E701 HIGH No 'galaxy_info' found
plays/roles/nfs-server/meta/main.yml 2 E701 HIGH No 'galaxy_info' found
plays/roles/slurm-common/tasks/installMungeFromSource.yml 22 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installMungeFromSource.yml 46 E303 HIGH systemctl used in place of systemd module
plays/roles/slurm-common/tasks/installMungeFromSource.yml 46 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 41 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 55 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 68 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 81 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/main.yml 81 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/main.yml 124 E601 HIGH Don't compare to literal True/False
plays/roles/slurm-common/tasks/main.yml 129 E601 HIGH Don't compare to literal True/False
plays/roles/slurm-common/tasks/main.yml 145 E601 HIGH Don't compare to literal True/False
plays/roles/slurm-start/tasks/main.yml 41 E303 HIGH systemctl used in place of systemd module
plays/roles/slurm-start/tasks/main.yml 41 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-start/tasks/main.yml 46 E303 HIGH systemctl used in place of systemd module
plays/roles/slurm-start/tasks/main.yml 46 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-start/tasks/main.yml 51 E303 HIGH systemctl used in place of systemd module
plays/roles/slurm-start/tasks/main.yml 51 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-start/tasks/main.yml 66 E301 HIGH Commands should not change things if nothing needs doing
plays/roles/slurm-start/tasks/main.yml 66 E305 HIGH Use shell only when shell functionality is required
plays/roles/upgrade/tasks/main.yml 66 E305 HIGH Use shell only when shell functionality is required
filepath line rule serverity rule description
plays/allnodes.yml 2 E201 INFO Trailing whitespace
plays/allnodes.yml 3 E201 INFO Trailing whitespace
plays/allnodes.yml 6 E201 INFO Trailing whitespace
plays/allnodes.yml 7 E201 INFO Trailing whitespace
plays/allnodes.yml 8 E201 INFO Trailing whitespace
plays/allnodes.yml 15 E201 INFO Trailing whitespace
plays/allnodes.yml 16 E201 INFO Trailing whitespace
plays/allnodes.yml 19 E201 INFO Trailing whitespace
plays/allnodes.yml 20 E201 INFO Trailing whitespace
plays/allnodes.yml 21 E201 INFO Trailing whitespace
plays/allnodes.yml 32 E201 INFO Trailing whitespace
plays/allnodes.yml 33 E201 INFO Trailing whitespace
plays/allnodes.yml 36 E201 INFO Trailing whitespace
plays/allnodes.yml 37 E201 INFO Trailing whitespace
plays/allnodes.yml 38 E201 INFO Trailing whitespace
plays/computenodes.yml 3 E201 INFO Trailing whitespace
plays/computenodes.yml 4 E201 INFO Trailing whitespace
plays/computenodes.yml 7 E201 INFO Trailing whitespace
plays/computenodes.yml 8 E201 INFO Trailing whitespace
plays/computenodes.yml 9 E201 INFO Trailing whitespace
plays/computenodes.yml 15 E201 INFO Trailing whitespace
plays/computenodes.yml 16 E201 INFO Trailing whitespace
plays/computenodes.yml 19 E201 INFO Trailing whitespace
plays/computenodes.yml 20 E201 INFO Trailing whitespace
plays/computenodes.yml 21 E201 INFO Trailing whitespace
plays/init_slurmconf.yml 4 E201 INFO Trailing whitespace
plays/init_slurmconf.yml 7 E201 INFO Trailing whitespace
plays/init_slurmconf.yml 8 E201 INFO Trailing whitespace
plays/init_slurmconf.yml 9 E201 INFO Trailing whitespace
plays/make_files.yml 17 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 6 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 7 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 10 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 11 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 12 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 21 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 22 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 25 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 26 E201 INFO Trailing whitespace
plays/mgmtnodes.yml 27 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 9 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 14 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 17 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 18 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 19 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 23 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 25 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 26 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 29 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 30 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 31 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 37 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 38 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 41 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 42 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 43 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 52 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 54 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 55 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 58 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 59 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 60 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 74 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 75 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 78 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 79 E201 INFO Trailing whitespace
plays/nfssqlnodes.yml 80 E201 INFO Trailing whitespace
plays/roles/calculateEtcHosts/tasks/main.yml 11 E201 INFO Trailing whitespace
plays/roles/calculateKnownHosts/tasks/main.yml 4 E201 INFO Trailing whitespace
plays/roles/config_repos/tasks/main.yml 4 E201 INFO Trailing whitespace
plays/roles/config_repos/tasks/main.yml 5 E201 INFO Trailing whitespace
plays/roles/enable_modules/tasks/main.yml 4 E201 INFO Trailing whitespace
plays/roles/etcHosts/tasks/main.yml 29 E201 INFO Trailing whitespace
plays/roles/etcHosts/tasks/main.yml 42 E201 INFO Trailing whitespace
plays/roles/etcHosts/tasks/main.yml 44 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 2 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 11 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 53 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 69 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 80 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 84 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 88 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 93 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 115 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 159 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 175 E201 INFO Trailing whitespace
plays/roles/jasons_ssh_ca/tasks/main.yml 10 E201 INFO Trailing whitespace
plays/roles/ldapclient/handlers/main.yml 2 E201 INFO Trailing whitespace
plays/roles/ldapclient/tasks/installOpenLdap.yml 3 E201 INFO Trailing whitespace
plays/roles/ldapclient/tasks/installOpenLdap.yml 13 E201 INFO Trailing whitespace
plays/roles/ldapclient/tasks/installOpenLdap.yml 14 E201 INFO Trailing whitespace
plays/roles/ldapclient/tasks/main.yml 3 E201 INFO Trailing whitespace
plays/roles/ldapclient/tasks/main.yml 5 E201 INFO Trailing whitespace
plays/roles/move_homedir/tasks/main.yml 3 E201 INFO Trailing whitespace
plays/roles/mysql/handlers/main.yml 2 E201 INFO Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml 35 E201 INFO Trailing whitespace
plays/roles/nfs-client/handlers/main.yml 6 E201 INFO Trailing whitespace
plays/roles/nfs-client/tasks/main.yml 6 E201 INFO Trailing whitespace
plays/roles/nfs-client/tasks/mountFileSystem.yml 1 E201 INFO Trailing whitespace
plays/roles/nfs-client/tasks/mountFileSystem.yml 6 E201 INFO Trailing whitespace
plays/roles/nfs-common/handlers/main.yml 1 E201 INFO Trailing whitespace
plays/roles/nfs-common/handlers/main.yml 2 E201 INFO Trailing whitespace
plays/roles/nfs-common/tasks/aptPackages.yml 2 E201 INFO Trailing whitespace
plays/roles/nfs-common/tasks/yumPackages.yml 1 E201 INFO Trailing whitespace
plays/roles/nfs-common/tasks/yumPackages.yml 2 E201 INFO Trailing whitespace
plays/roles/nfs-common/tasks/yumPackages.yml 4 E201 INFO Trailing whitespace
plays/roles/nfs-server/tasks/startServer.yml 1 E201 INFO Trailing whitespace
plays/roles/postfix/handlers/main.yml 2 E201 INFO Trailing whitespace
plays/roles/postfix/tasks/main.yml 12 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml 15 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml 25 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml 27 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml 59 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml 1 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml 9 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml 14 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml 15 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installMungeFromSource.yml 31 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installMungeFromSource.yml 33 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 12 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/main.yml 108 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/main.yml 124 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/main.yml 136 E201 INFO Trailing whitespace
plays/roles/slurm-start/tasks/main.yml 3 E201 INFO Trailing whitespace
plays/roles/slurm-start/tasks/main.yml 6 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 29 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 30 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 31 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 32 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 37 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 38 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 48 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 49 E201 INFO Trailing whitespace
plays/roles/ssh-password-login/tasks/main.yml 6 E201 INFO Trailing whitespace
plays/roles/ssh-password-login/tasks/main.yml 9 E201 INFO Trailing whitespace
plays/roles/ssh-password-login/tasks/main.yml 21 E201 INFO Trailing whitespace
plays/roles/upgrade/tasks/main.yml 56 E201 INFO Trailing whitespace
plays/roles/upgrade/tasks/main.yml 58 E201 INFO Trailing whitespace
plays/roles/upgrade/tasks/main.yml 64 E201 INFO Trailing whitespace
plays/roles/upgrade/tasks/main.yml 70 E201 INFO Trailing whitespace
plays/roles/upgrade/tasks/main.yml 73 E201 INFO Trailing whitespace
plays/roles/upgrade/tasks/main.yml 90 E201 INFO Trailing whitespace
filepath line rule serverity rule description
plays/roles/config_repos/tasks/main.yml 54 E206 LOW Variables should have spaces before and after: {{ var_name }}
plays/roles/lmod/tasks/main.yml 39 E206 LOW Variables should have spaces before and after: {{ var_name }}
plays/roles/lmod/tasks/main.yml 48 E206 LOW Variables should have spaces before and after: {{ var_name }}
plays/roles/slurm-common/tasks/createSlurmDirectories.yml 43 E206 LOW Variables should have spaces before and after: {{ var_name }}
plays/roles/slurm-start/tasks/main.yml 67 E206 LOW Variables should have spaces before and after: {{ var_name }}
filepath line rule serverity rule description
plays/init_slurmconf.yml 4 E502 MEDIUM All tasks should be named
plays/init_slurmconf.yml 5 E502 MEDIUM All tasks should be named
plays/init_slurmconf.yml 6 E502 MEDIUM All tasks should be named
plays/init_slurmconf.yml 7 E502 MEDIUM All tasks should be named
plays/init_slurmconf.yml 8 E502 MEDIUM All tasks should be named
plays/init_slurmconf.yml 9 E502 MEDIUM All tasks should be named
plays/make_files.yml 5 E502 MEDIUM All tasks should be named
plays/make_files.yml 6 E502 MEDIUM All tasks should be named
plays/make_files.yml 7 E502 MEDIUM All tasks should be named
plays/make_files.yml 8 E502 MEDIUM All tasks should be named
plays/make_files.yml 9 E502 MEDIUM All tasks should be named
plays/make_files.yml 10 E502 MEDIUM All tasks should be named
plays/nfssqlnodes.yml 14 E502 MEDIUM All tasks should be named
plays/nfssqlnodes.yml 15 E502 MEDIUM All tasks should be named
plays/nfssqlnodes.yml 16 E502 MEDIUM All tasks should be named
plays/nfssqlnodes.yml 17 E502 MEDIUM All tasks should be named
plays/nfssqlnodes.yml 18 E502 MEDIUM All tasks should be named
plays/nfssqlnodes.yml 19 E502 MEDIUM All tasks should be named
plays/roles/config_repos/tasks/main.yml 43 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/etcHosts/tasks/main.yml 5 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/etcHosts/tasks/main.yml 18 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/gpu/tasks/main.yml 72 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/gpu/tasks/main.yml 109 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/jasons_ssh_ca/handlers/main.yml 2 E502 MEDIUM All tasks should be named
plays/roles/jasons_ssh_ca/tasks/main.yml 2 E502 MEDIUM All tasks should be named
plays/roles/lmod/tasks/main.yml 2 E502 MEDIUM All tasks should be named
plays/roles/mysql/tasks/main.yml 2 E502 MEDIUM All tasks should be named
plays/roles/slurm-common/tasks/installMungeFromSource.yml 46 E503 MEDIUM Tasks that run when changed should likely be handlers
plays/roles/slurm-common/tasks/main.yml 95 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/slurm-start/tasks/main.yml 41 E503 MEDIUM Tasks that run when changed should likely be handlers
plays/roles/slurm-start/tasks/main.yml 46 E503 MEDIUM Tasks that run when changed should likely be handlers
plays/roles/slurm-start/tasks/main.yml 51 E503 MEDIUM Tasks that run when changed should likely be handlers
plays/roles/upgrade/tasks/main.yml 50 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/upgrade/tasks/main.yml 59 E306 MEDIUM Shells that use pipes should set the pipefail option
filepath line rule serverity rule description
plays/nfssqlnodes.yml 49 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/lmod/tasks/main.yml 52 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 38 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 42 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/upgrade/tasks/main.yml 20 E403 VERY_LOW Package installs should not use latest
plays/roles/upgrade/tasks/main.yml 32 E403 VERY_LOW Package installs should not use latest
plays/roles/upgrade/tasks/main.yml 38 E403 VERY_LOW Package installs should not use latest
plays/roles/upgrade/tasks/main.yml 44 E403 VERY_LOW Package installs should not use latest
plays/allnodes.yml:2: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:3: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:6: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:7: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:8: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:15: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:16: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:19: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:20: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:21: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:32: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:33: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:36: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:37: [E201] [INFO] Trailing whitespace
plays/allnodes.yml:38: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:3: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:4: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:7: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:8: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:9: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:15: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:16: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:19: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:20: [E201] [INFO] Trailing whitespace
plays/computenodes.yml:21: [E201] [INFO] Trailing whitespace
plays/init_slurmconf.yml:4: [E201] [INFO] Trailing whitespace
plays/init_slurmconf.yml:4: [E502] [MEDIUM] All tasks should be named
plays/init_slurmconf.yml:5: [E502] [MEDIUM] All tasks should be named
plays/init_slurmconf.yml:6: [E502] [MEDIUM] All tasks should be named
plays/init_slurmconf.yml:7: [E201] [INFO] Trailing whitespace
plays/init_slurmconf.yml:7: [E502] [MEDIUM] All tasks should be named
plays/init_slurmconf.yml:8: [E201] [INFO] Trailing whitespace
plays/init_slurmconf.yml:8: [E502] [MEDIUM] All tasks should be named
plays/init_slurmconf.yml:9: [E201] [INFO] Trailing whitespace
plays/init_slurmconf.yml:9: [E502] [MEDIUM] All tasks should be named
plays/make_files.yml:5: [E502] [MEDIUM] All tasks should be named
plays/make_files.yml:6: [E502] [MEDIUM] All tasks should be named
plays/make_files.yml:7: [E502] [MEDIUM] All tasks should be named
plays/make_files.yml:8: [E502] [MEDIUM] All tasks should be named
plays/make_files.yml:9: [E502] [MEDIUM] All tasks should be named
plays/make_files.yml:10: [E502] [MEDIUM] All tasks should be named
plays/make_files.yml:17: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:6: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:7: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:10: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:11: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:12: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:21: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:22: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:25: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:26: [E201] [INFO] Trailing whitespace
plays/mgmtnodes.yml:27: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:9: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:14: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:14: [E502] [MEDIUM] All tasks should be named
plays/nfssqlnodes.yml:15: [E502] [MEDIUM] All tasks should be named
plays/nfssqlnodes.yml:16: [E502] [MEDIUM] All tasks should be named
plays/nfssqlnodes.yml:17: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:17: [E502] [MEDIUM] All tasks should be named
plays/nfssqlnodes.yml:18: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:18: [E502] [MEDIUM] All tasks should be named
plays/nfssqlnodes.yml:19: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:19: [E502] [MEDIUM] All tasks should be named
plays/nfssqlnodes.yml:23: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:25: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:26: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:29: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:30: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:31: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:37: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:38: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:41: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:42: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:43: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:49: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/nfssqlnodes.yml:52: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:54: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:55: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:58: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:59: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:60: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:74: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:75: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:78: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:79: [E201] [INFO] Trailing whitespace
plays/nfssqlnodes.yml:80: [E201] [INFO] Trailing whitespace
plays/roles/calculateEtcHosts/tasks/main.yml:8: [E301] [HIGH] Commands should not change things if nothing needs doing
plays/roles/calculateEtcHosts/tasks/main.yml:11: [E201] [INFO] Trailing whitespace
plays/roles/calculateKnownHosts/tasks/main.yml:4: [E201] [INFO] Trailing whitespace
plays/roles/config_repos/tasks/main.yml:4: [E201] [INFO] Trailing whitespace
plays/roles/config_repos/tasks/main.yml:5: [E201] [INFO] Trailing whitespace
plays/roles/config_repos/tasks/main.yml:43: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/config_repos/tasks/main.yml:52: [E301] [HIGH] Commands should not change things if nothing needs doing
plays/roles/config_repos/tasks/main.yml:52: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/config_repos/tasks/main.yml:54: [E206] [LOW] Variables should have spaces before and after: {{ var_name }}
plays/roles/config_repos/tasks/main.yml:67: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/config_repos/tasks/main.yml:72: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/config_repos/tasks/main.yml:77: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/enable_modules/tasks/main.yml:4: [E201] [INFO] Trailing whitespace
plays/roles/etcHosts/tasks/main.yml:5: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/etcHosts/tasks/main.yml:13: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/etcHosts/tasks/main.yml:18: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/etcHosts/tasks/main.yml:26: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/etcHosts/tasks/main.yml:29: [E201] [INFO] Trailing whitespace
plays/roles/etcHosts/tasks/main.yml:42: [E201] [INFO] Trailing whitespace
plays/roles/etcHosts/tasks/main.yml:44: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:11: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:53: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:56: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml:69: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:72: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/gpu/tasks/main.yml:80: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:84: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:88: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:93: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:109: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/gpu/tasks/main.yml:115: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:140: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml:145: [E301] [HIGH] Commands should not change things if nothing needs doing
plays/roles/gpu/tasks/main.yml:145: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml:155: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml:159: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:175: [E201] [INFO] Trailing whitespace
plays/roles/jasons_ssh_ca/handlers/main.yml:2: [E502] [MEDIUM] All tasks should be named
plays/roles/jasons_ssh_ca/tasks/main.yml:2: [E502] [MEDIUM] All tasks should be named
plays/roles/jasons_ssh_ca/tasks/main.yml:10: [E201] [INFO] Trailing whitespace
plays/roles/ldapclient/handlers/main.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/ldapclient/tasks/installOpenLdap.yml:3: [E201] [INFO] Trailing whitespace
plays/roles/ldapclient/tasks/installOpenLdap.yml:13: [E201] [INFO] Trailing whitespace
plays/roles/ldapclient/tasks/installOpenLdap.yml:14: [E201] [INFO] Trailing whitespace
plays/roles/ldapclient/tasks/main.yml:3: [E201] [INFO] Trailing whitespace
plays/roles/ldapclient/tasks/main.yml:5: [E201] [INFO] Trailing whitespace
plays/roles/lmod/tasks/main.yml:2: [E502] [MEDIUM] All tasks should be named
plays/roles/lmod/tasks/main.yml:39: [E206] [LOW] Variables should have spaces before and after: {{ var_name }}
plays/roles/lmod/tasks/main.yml:48: [E206] [LOW] Variables should have spaces before and after: {{ var_name }}
plays/roles/lmod/tasks/main.yml:52: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/move_homedir/tasks/main.yml:3: [E201] [INFO] Trailing whitespace
plays/roles/move_homedir/tasks/main.yml:9: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/mysql/handlers/main.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/main.yml:2: [E502] [MEDIUM] All tasks should be named
plays/roles/mysql/tasks/mysql_server.yml:35: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml:38: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml:42: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/nfs-client/handlers/main.yml:6: [E201] [INFO] Trailing whitespace
plays/roles/nfs-client/meta/main.yml:2: [E701] [HIGH] No 'galaxy_info' found
plays/roles/nfs-client/tasks/main.yml:6: [E201] [INFO] Trailing whitespace
plays/roles/nfs-client/tasks/mountFileSystem.yml:1: [E201] [INFO] Trailing whitespace
plays/roles/nfs-client/tasks/mountFileSystem.yml:6: [E201] [INFO] Trailing whitespace
plays/roles/nfs-common/handlers/main.yml:1: [E201] [INFO] Trailing whitespace
plays/roles/nfs-common/handlers/main.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/nfs-common/tasks/aptPackages.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/nfs-common/tasks/yumPackages.yml:1: [E201] [INFO] Trailing whitespace
plays/roles/nfs-common/tasks/yumPackages.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/nfs-common/tasks/yumPackages.yml:4: [E201] [INFO] Trailing whitespace
plays/roles/nfs-server/meta/main.yml:2: [E701] [HIGH] No 'galaxy_info' found
plays/roles/nfs-server/tasks/startServer.yml:1: [E201] [INFO] Trailing whitespace
plays/roles/postfix/handlers/main.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/postfix/tasks/main.yml:12: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml:15: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml:25: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml:27: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/createSlurmDirectories.yml:43: [E206] [LOW] Variables should have spaces before and after: {{ var_name }}
plays/roles/slurm-common/tasks/createSlurmDirectories.yml:59: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml:1: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml:9: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml:14: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installCgroup.yml:15: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installMungeFromSource.yml:22: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installMungeFromSource.yml:31: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installMungeFromSource.yml:33: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installMungeFromSource.yml:46: [E303] [HIGH] systemctl used in place of systemd module
plays/roles/slurm-common/tasks/installMungeFromSource.yml:46: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installMungeFromSource.yml:46: [E503] [MEDIUM] Tasks that run when changed should likely be handlers
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:12: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:41: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:55: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:68: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:81: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/main.yml:81: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/main.yml:95: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/slurm-common/tasks/main.yml:108: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/main.yml:124: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/main.yml:124: [E601] [HIGH] Don't compare to literal True/False
plays/roles/slurm-common/tasks/main.yml:129: [E601] [HIGH] Don't compare to literal True/False
plays/roles/slurm-common/tasks/main.yml:136: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/main.yml:145: [E601] [HIGH] Don't compare to literal True/False
plays/roles/slurm-start/tasks/main.yml:3: [E201] [INFO] Trailing whitespace
plays/roles/slurm-start/tasks/main.yml:6: [E201] [INFO] Trailing whitespace
plays/roles/slurm-start/tasks/main.yml:41: [E303] [HIGH] systemctl used in place of systemd module
plays/roles/slurm-start/tasks/main.yml:41: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-start/tasks/main.yml:41: [E503] [MEDIUM] Tasks that run when changed should likely be handlers
plays/roles/slurm-start/tasks/main.yml:46: [E303] [HIGH] systemctl used in place of systemd module
plays/roles/slurm-start/tasks/main.yml:46: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-start/tasks/main.yml:46: [E503] [MEDIUM] Tasks that run when changed should likely be handlers
plays/roles/slurm-start/tasks/main.yml:51: [E303] [HIGH] systemctl used in place of systemd module
plays/roles/slurm-start/tasks/main.yml:51: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-start/tasks/main.yml:51: [E503] [MEDIUM] Tasks that run when changed should likely be handlers
plays/roles/slurm-start/tasks/main.yml:66: [E301] [HIGH] Commands should not change things if nothing needs doing
plays/roles/slurm-start/tasks/main.yml:66: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-start/tasks/main.yml:67: [E206] [LOW] Variables should have spaces before and after: {{ var_name }}
plays/roles/slurmdb-config/tasks/main.yml:29: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:30: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:31: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:32: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:37: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:38: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:48: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:49: [E201] [INFO] Trailing whitespace
plays/roles/ssh-password-login/tasks/main.yml:6: [E201] [INFO] Trailing whitespace
plays/roles/ssh-password-login/tasks/main.yml:9: [E201] [INFO] Trailing whitespace
plays/roles/ssh-password-login/tasks/main.yml:21: [E201] [INFO] Trailing whitespace
plays/roles/upgrade/tasks/main.yml:20: [E403] [VERY_LOW] Package installs should not use latest
plays/roles/upgrade/tasks/main.yml:32: [E403] [VERY_LOW] Package installs should not use latest
plays/roles/upgrade/tasks/main.yml:38: [E403] [VERY_LOW] Package installs should not use latest
plays/roles/upgrade/tasks/main.yml:44: [E403] [VERY_LOW] Package installs should not use latest
plays/roles/upgrade/tasks/main.yml:50: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/upgrade/tasks/main.yml:56: [E201] [INFO] Trailing whitespace
plays/roles/upgrade/tasks/main.yml:58: [E201] [INFO] Trailing whitespace
plays/roles/upgrade/tasks/main.yml:59: [E306] [MEDIUM] Shells that use pipes should set the pipefail option
plays/roles/upgrade/tasks/main.yml:64: [E201] [INFO] Trailing whitespace
plays/roles/upgrade/tasks/main.yml:66: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/upgrade/tasks/main.yml:70: [E201] [INFO] Trailing whitespace
plays/roles/upgrade/tasks/main.yml:73: [E201] [INFO] Trailing whitespace
plays/roles/upgrade/tasks/main.yml:90: [E201] [INFO] Trailing whitespace
import yaml
from argparse import ArgumentParser
import subprocess
from pathlib import Path
import re
import sys
import os
from collections import defaultdict
def parse_argument():
parser = ArgumentParser("ansible lint runner with customized spec")
parser.add_argument('--targets', type=str, nargs='*',
help="path to roles or playbook targets")
parser.add_argument('--logdir', type=Path, default=Path( __file__ + '/../logdir').resolve(), nargs='?', help='log directory default to ./ansiblelint/logdir')
args = parser.parse_args()
args.logdir.mkdir(exist_ok=True)
return args
def parse_rule_output(line):
# (filepath, line, rule, severity, rule_desc)
expression = '(.*\.yml):([0-9]+): \[(.*)\] \[(.*)\] (.*$)'
matched = re.match(expression, line)
# print(line)
matched_groups = matched.groups()
return matched_groups
def group_by(output, idx):
res = defaultdict(list)
for i in output:
# print(i)
res[i[idx]].append(i)
return res
cmd_template = "ansible-lint --parseable-severity --nocolor "
outputs = defaultdict()
def main():
exit_code = 0
args = parse_argument()
for item in args.logdir.iterdir():
item.unlink()
cmd = cmd_template
if args.targets is not None:
cmd += ' ' + ' '.join(args.targets)
else:
rolenames = [str(i.resolve())
for i in Path(__file__ + '/../../plays/roles').resolve().iterdir() if i.is_dir()]
cmd += ' ' + ' '.join(rolenames)
# print(cmd)
logfile = args.logdir.joinpath('logfile')
cmd += ' 2>&1 | tee {}'.format(str(logfile.resolve()))
# print(cmd)
output = subprocess.check_output(cmd, shell=True)
output = output.decode().splitlines()
# print(output)
output = [parse_rule_output(line) for line in output]
# group by serverity
output = group_by(output, 3)
# print(output.keys())
# print(output.keys())
for k,v in output.items():
# print(k, v)
if (k=='VERY_HIGH') and len(v) != 0:
exit_code = 1
current_log = args.logdir.joinpath(k).resolve()
with current_log.open(mode='w') as f:
f.writelines(['filepath\tline\trule\tserverity\trule description\n'])
# print(v[-1])
# return
f.writelines(['\t'.join(list(i)) + '\n' for i in v])
sys.exit(exit_code)
# return
if __name__ == "__main__":
main()
---
# https://docs.ansibl.com/ansibl-lint/ruls/dfault_ruls.html
error:
- 101
- 102
- 103
- 104
- 202
- 304
- 306
- 401
- 402
- 403
- 404
- 501
- 502
- 701
warning:
- 105
- 201
- 203
- 204
- 205
- 206
- 301
- 302
- 303
- 305
- 503
- 504
- 601
- 602
- 702
- 703
- 704
...@@ -130,8 +130,15 @@ ...@@ -130,8 +130,15 @@
template: src=xserver.j2 dest=/etc/pam.d/xserver template: src=xserver.j2 dest=/etc/pam.d/xserver
become: true become: true
- name: build nvidia driver - name: chmod nvidia driver builder
shell: chmod 755 /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run; /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run --silent file:
path: /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run
mode: 0755
become: true
when: install_driver
- name: build nvidia driver
shell: /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run
become: true become: true
when: install_driver when: install_driver
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
- name: create slurmdbdpiddir directory - name: create slurmdbdpiddir directory
file: path={{ slurmdbdpiddir }} state=directory owner=slurm group=slurm mode=755 file: path={{ slurmdbdpiddir }} state=directory owner=slurm group=slurm mode=755
sudo: true become: true
- name: create shared state directory - name: create shared state directory
file: path={{slurmsharedstatedir }} state=directory owner=slurm group=slurm mode=750 file: path={{slurmsharedstatedir }} state=directory owner=slurm group=slurm mode=750
......
- name: remove all install - name: remove all install
shell: rm -rf /tmp/slurm-{{ slurm_version }} file:
become: true path: "/tmp/slurm-{{ slurm_version }}"
when: force_slurm_recompile is defined state: absent
become: true
when: force_slurm_recompile is defined
- name: remove all install - name: remove all install
shell: rm -rf {{ slurm_dir }} file:
become: true path: "{{ slurm_dir }}"
when: force_slurm_recompile is defined state: absent
become: true
when: force_slurm_recompile is defined
- name: unarchive slurm - name: unarchive slurm
unarchive: unarchive:
...@@ -94,14 +98,19 @@ ...@@ -94,14 +98,19 @@
become: true become: true
- name: remove exist-slurm-latest-link - name: remove exist-slurm-latest-link
shell: rm -f /opt/slurm-latest file:
become: true path: /opt/slurm-latest
when: force_slurm_recompile is defined or not stat_srun.stat.exists state: absent
become: true
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: put slurm-latest-link - name: put slurm-latest-link
shell: ln -s {{ slurm_dir }} /opt/slurm-latest file:
become: true src: "{{ slurm_dir }}"
when: force_slurm_recompile is defined or not stat_srun.stat.exists dest: /opt/slurm-latest
state: link
become: true
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: add slurm log rotate config - name: add slurm log rotate config
template: src=slurmlog.j2 dest=/etc/logrotate.d/slurm mode=644 template: src=slurmlog.j2 dest=/etc/logrotate.d/slurm mode=644
......
...@@ -23,11 +23,15 @@ ...@@ -23,11 +23,15 @@
- name: create slurm group - name: create slurm group
group: name=slurm system=yes gid=497 group: name=slurm system=yes gid=497
sudo: true become: true
- name: create slurm user # this is duplicated from slurm-common - name: create slurm user # this is duplicated from slurm-common
user: name=slurm group=slurm system=yes createhome=no uid=497 user:
sudo: true name: slurm
group: slurm
system: yes
createhome: no uid=497
become: true
- name: install slurmdb.conf - name: install slurmdb.conf
copy: copy:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment