Skip to content
Snippets Groups Projects
Commit 0b874ca5 authored by Luhan Cheng's avatar Luhan Cheng
Browse files

added ansible lint

parent cab51112
No related branches found
No related tags found
3 merge requests!297Cicd merge back,!284Cicd,!282CICD
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 138 E301 HIGH Commands should not change things if nothing needs doing
plays/roles/gpu/tasks/main.yml 138 E305 HIGH Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml 148 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 1 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 6 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 37 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 51 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 64 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 77 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 96 E305 HIGH Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 101 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 133 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 152 E201 INFO Trailing whitespace
plays/roles/gpu/tasks/main.yml 168 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 3 E201 INFO Trailing whitespace
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 8 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 33 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 34 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 44 E201 INFO Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml 45 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/roles/gpu/tasks/main.yml 133 E302 VERY_HIGH chmod used in place of argument mode to file module
plays/roles/slurm-common/tasks/createSlurmDirectories.yml 38 E103 VERY_HIGH Deprecated sudo feature
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 1 E302 VERY_HIGH rm used in place of argument state=absent to file module
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 6 E302 VERY_HIGH rm used in place of argument state=absent to file module
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 96 E302 VERY_HIGH rm used in place of argument state=absent to file module
plays/roles/slurm-common/tasks/installSlurmFromSource.yml 101 E302 VERY_HIGH ln used in place of argument state=link to file module
plays/roles/slurmdb-config/tasks/main.yml 24 E103 VERY_HIGH Deprecated sudo feature
plays/roles/slurmdb-config/tasks/main.yml 28 E103 VERY_HIGH Deprecated sudo feature
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:133: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:133: [E302] [VERY_HIGH] chmod used in place of argument mode to file module
plays/roles/gpu/tasks/main.yml:138: [E301] [HIGH] Commands should not change things if nothing needs doing
plays/roles/gpu/tasks/main.yml:138: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml:148: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/gpu/tasks/main.yml:152: [E201] [INFO] Trailing whitespace
plays/roles/gpu/tasks/main.yml:168: [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:38: [E103] [VERY_HIGH] Deprecated sudo feature
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:1: [E302] [VERY_HIGH] rm used in place of argument state=absent to file module
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:1: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:3: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:6: [E302] [VERY_HIGH] rm used in place of argument state=absent to file module
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:6: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:8: [E201] [INFO] Trailing whitespace
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:37: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:51: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:64: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:77: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:96: [E302] [VERY_HIGH] rm used in place of argument state=absent to file module
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:96: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:101: [E302] [VERY_HIGH] ln used in place of argument state=link to file module
plays/roles/slurm-common/tasks/installSlurmFromSource.yml:101: [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:24: [E103] [VERY_HIGH] Deprecated sudo feature
plays/roles/slurmdb-config/tasks/main.yml:28: [E103] [VERY_HIGH] Deprecated sudo feature
plays/roles/slurmdb-config/tasks/main.yml:33: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:34: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:44: [E201] [INFO] Trailing whitespace
plays/roles/slurmdb-config/tasks/main.yml:45: [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
from collections import defaultdict
def parse_argument():
parser = ArgumentParser("ansible lint runner with customized spec")
parser.add_argument('--spec', type=str, nargs='?', help="yaml file which defines warning and error rules")
parser.add_argument('targets', type=str, nargs='+', help="role or task to lint")
parser.add_argument('--logdir', type=Path, default=Path('./ansiblelint/logdir'), 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)
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()
if args.spec is not None:
with open(args.spec, 'r') as f:
spec = yaml.load(f)
for k,v in spec.items():
cmd = cmd_template + ' '.join(['-t ' + str(tag) for tag in v])
cmd += ' ' + ' '.join(args.targets)
logfile = args.logdir.joinpath(k)
cmd += ' 2>&1 | tee {}'.format(str(logfile.resolve()))
output = subprocess.check_output(cmd, shell=True)
output = output.decode().splitlines()
output = [parse_rule_output(line) for line in output]
outputs[k] = output
# outputs.append(output)
else:
cmd = cmd_template
cmd += ' ' + ' '.join(args.targets)
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()
output = [parse_rule_output(line) for line in output]
# group by serverity
output = group_by(output, 3)
# print(output.keys())
for k,v in output.items():
if (k == 'HIGH' or 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
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