Skip to content
Snippets Groups Projects
Verified Commit eaac835f authored by Jörg Sachse's avatar Jörg Sachse
Browse files

feat: run shellcheck during Molecule Verify stage

parent a846ca19
No related branches found
No related tags found
No related merge requests found
Pipeline #10571 failed
...@@ -42,3 +42,15 @@ ...@@ -42,3 +42,15 @@
that: "'MediaConch Command Line Interface' in mediaconch_output.stdout" that: "'MediaConch Command Line Interface' in mediaconch_output.stdout"
success_msg: MediaConch runs as expected. success_msg: MediaConch runs as expected.
fail_msg: MediaConch couldn't be run without errors. fail_msg: MediaConch couldn't be run without errors.
- name: Install shellcheck.
ansible.builtin.dnf:
name: "ShellCheck"
state: latest
become: true
- name: Run shellcheck for deployed Shell scripts.
ansible.builtin.command:
cmd: "shellcheck --shell=bash {{ item }}"
loop:
- "/usr/local/bin/nfs_timeout_notification.service.sh"
become: true
...@@ -57,6 +57,7 @@ provisioner: ...@@ -57,6 +57,7 @@ provisioner:
# https://stackoverflow.com/questions/57435811/ansible-molecule-pass-multiple-vault-ids # https://stackoverflow.com/questions/57435811/ansible-molecule-pass-multiple-vault-ids
# vault_identity_list: "@$HOME/.ansible/roles/lza_install_common.pass, @$HOME/.ansible/roles/passfile_1.pass" # vault_identity_list: "@$HOME/.ansible/roles/lza_install_common.pass, @$HOME/.ansible/roles/passfile_1.pass"
vault_identity_list: "../../../lza_install_common.pass, ../../../lza_rosetta_app.pass" vault_identity_list: "../../../lza_install_common.pass, ../../../lza_rosetta_app.pass"
stdout_callback: debug
vvv: false vvv: false
playbooks: playbooks:
# create: ../resources/playbooks/create.yml # create: ../resources/playbooks/create.yml
......
...@@ -20,6 +20,14 @@ ...@@ -20,6 +20,14 @@
update_cache: true update_cache: true
state: latest state: latest
- name: create directory
ansible.builtin.file:
path: "/operational_shared/software/"
state: directory
mode: "0o755"
owner: "{{ vault_rosetta_user }}"
group: "{{ vault_rosetta_group }}"
- name: check MediaConch symlink - name: check MediaConch symlink
ansible.builtin.stat: ansible.builtin.stat:
path: "/operational_shared/software/mediaconch" path: "/operational_shared/software/mediaconch"
......
...@@ -4,7 +4,7 @@ WAIT_BETWEEN_MAILS_IN_SECONDS={{ vault_nfs_timeout_notification_service.wait_bet ...@@ -4,7 +4,7 @@ WAIT_BETWEEN_MAILS_IN_SECONDS={{ vault_nfs_timeout_notification_service.wait_bet
NO_MAIL_UNTIL_EPOCH=0; NO_MAIL_UNTIL_EPOCH=0;
journalctl -f | while read -r LINE; do journalctl -f | while read -r LINE; do
TIMEOUT=$(echo "${LINE}" | grep "nfs.*timed out"); TIMEOUT=$(echo "${LINE}" | grep "nfs.*timed out");
if [[ ! -z "${TIMEOUT}" ]]; then if [[ -n "${TIMEOUT}" ]]; then
TIME=$(date +%s); TIME=$(date +%s);
if [[ "${TIME}" -ge "${NO_MAIL_UNTIL_EPOCH}" ]]; then if [[ "${TIME}" -ge "${NO_MAIL_UNTIL_EPOCH}" ]]; then
NO_MAIL_UNTIL_EPOCH=$((TIME + WAIT_BETWEEN_MAILS_IN_SECONDS)); NO_MAIL_UNTIL_EPOCH=$((TIME + WAIT_BETWEEN_MAILS_IN_SECONDS));
...@@ -13,4 +13,4 @@ journalctl -f | while read -r LINE; do ...@@ -13,4 +13,4 @@ journalctl -f | while read -r LINE; do
fi; fi;
fi; fi;
TIMEOUT=""; TIMEOUT="";
done; done;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment