diff --git a/tasks/configure_ssh_keys.yml b/tasks/configure_ssh_keys.yml index 77827a1281c467b3c47f657badab6573d5bfd168..ad48a72041ec6f0bca7ecc083604d6a9034044ad 100644 --- a/tasks/configure_ssh_keys.yml +++ b/tasks/configure_ssh_keys.yml @@ -5,3 +5,15 @@ state: present key: "{{ vault_ssh_access.ssh_key }}" comment: "{{ vault_ssh_access.ssh_comment }}" + +- name: copy deploykey files to managed servers + copy: + src: "{{ role_path }}/../ansible_vaults/{{ role_name }}/{{ item }}" + dest: "~/.ssh/{{ item }}" + owner: "root" + group: "root" + mode: 0400 + loop: + - "id_ed25519_deploykey" + - "id_ed25519_deploykey.pub" + diff --git a/templates/test_exit_strategy.sh.j2 b/templates/test_exit_strategy.sh.j2 index 205bdb6d340e53072747b7d2c085e96538364e45..9840055a65fe1938ce516a71178c18a287b4c957 100644 --- a/templates/test_exit_strategy.sh.j2 +++ b/templates/test_exit_strategy.sh.j2 @@ -45,20 +45,14 @@ esac echo "${MESSAGE}" | tee -a "${LOGFILE}" -### GET EXIT SCRIPT FROM GITHUB ### -git clone "{{ vault_git_repo_url_exitstrategy }}" | tee -a +EXIT_PERL="/usr/local/bin/rosettaExitStrategy/perl/exit_strategy.pl" +EXIT_DB="/tmp/exit.db" -EXIT_PERL="${HOME}/rosettaExitStrategy/perl/exit_strategy.pl" - -### GENERATE EXIT SQL SCRIPT ### +### GENERATE EXIT DATABASE ### date | tee -a "${LOGFILE}" echo -e "\n### GENERATE EXIT SQL SCRIPT ###\n" | tee -a "${LOGFILE}" -perl "${EXIT_PERL}" "${SQLFILE}" "${MOUNTPOINT}" 2>> "${LOGFILE}" +perl "${EXIT_PERL}" "${EXIT_DB}" "${MOUNTPOINT}" 2>> "${LOGFILE}" [[ $? -ne 0 ]] && echo "ERROR: Couldn't create SQLite database, exiting." && exit 10 date | tee -a "${LOGFILE}" - -### TIDY UP ### -rm -r ~/rosettaExitStrategy - exit 0 diff --git a/vars/sanitytest.vault.example b/vars/sanitytest.vault.example index fb10c2e8ffa996667687888ea1ef619830482638..219f919dfabaf13c775a07f362d23f84934710db 100644 --- a/vars/sanitytest.vault.example +++ b/vars/sanitytest.vault.example @@ -3,11 +3,7 @@ # ANY CONFIDENTIAL EDITS SHOULD GO TO THE ENCRYPTED VAULT FILE! # VARIABLES THAT ARE NOT CONFIDENTIAL CAN GO TO A SEPARATE "*.YML" FILE. -vault_git_repo_url_updatechecks: "<URL>" -vault_git_repo_url_exitstrategy: "<URL>" - -vault_db_user: "<USERNAME>" -vault_db_group: "<GROUPNAME>" +vault_slub_git_repo_fqdn: "<URL>" vault_groups: - name: "<GROUPNAME>"