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

removed log file, print log to stdout, added allow fail to ansible lint for now

Former-commit-id: 2962d656
parent a4c41cd1
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ ansiblelint:
script:
- echo "stage ansiblelint"
- cd CICD
- python ansiblelint/run_lint.py master_playbook.yml
- python ansiblelint/run_lint.py --targets master_playbook.yml
build_cluster_cicd:
......@@ -95,6 +95,7 @@ build_cluster_cicd:
ansible_create_cluster_stage:
stage: ansible_create_cluster_stage
allow_failure: false
tags:
- ansible
before_script:
......
logdir
......@@ -94,7 +94,9 @@ 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 13 E201 INFO Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml 35 E201 INFO Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml 37 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
......
......@@ -26,6 +26,7 @@ plays/roles/jasons_ssh_ca/handlers/main.yml 2 E502 MEDIUM All tasks should be na
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/mysql/tasks/mysql_server.yml 32 E503 MEDIUM Tasks that run when changed should likely be handlers
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
......
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/mysql/tasks/mysql_server.yml 32 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 40 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 44 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
......
......@@ -139,9 +139,13 @@ 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:13: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml:32: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml:32: [E503] [MEDIUM] Tasks that run when changed should likely be handlers
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/mysql/tasks/mysql_server.yml:37: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml:40: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml:44: [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
......
......@@ -49,6 +49,7 @@ def main():
cmd += ' 2>&1 | tee {}'.format(str(logfile.resolve()))
# print(cmd)
output = subprocess.check_output(cmd, shell=True)
print(output.decode())
output = output.decode().splitlines()
# print(output)
output = [parse_rule_output(line) for line in output]
......@@ -65,8 +66,6 @@ def main():
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
......
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