Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_sanitytest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
ansible_lza_sanitytest
Commits
06f3517a
Commit
06f3517a
authored
3 years ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
feat: checkout exit script from Git using deploy key
parent
cafca9be
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/configure_ssh_keys.yml
+12
-0
12 additions, 0 deletions
tasks/configure_ssh_keys.yml
templates/test_exit_strategy.sh.j2
+4
-10
4 additions, 10 deletions
templates/test_exit_strategy.sh.j2
vars/sanitytest.vault.example
+1
-5
1 addition, 5 deletions
vars/sanitytest.vault.example
with
17 additions
and
15 deletions
tasks/configure_ssh_keys.yml
+
12
−
0
View file @
06f3517a
...
@@ -5,3 +5,15 @@
...
@@ -5,3 +5,15 @@
state
:
present
state
:
present
key
:
"
{{
vault_ssh_access.ssh_key
}}"
key
:
"
{{
vault_ssh_access.ssh_key
}}"
comment
:
"
{{
vault_ssh_access.ssh_comment
}}"
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"
This diff is collapsed.
Click to expand it.
templates/test_exit_strategy.sh.j2
+
4
−
10
View file @
06f3517a
...
@@ -45,20 +45,14 @@ esac
...
@@ -45,20 +45,14 @@ esac
echo
"
${
MESSAGE
}
"
|
tee
-a
"
${
LOGFILE
}
"
echo
"
${
MESSAGE
}
"
|
tee
-a
"
${
LOGFILE
}
"
### GET EXIT SCRIPT FROM GITHUB ###
EXIT_PERL
=
"/usr/local/bin/rosettaExitStrategy/perl/exit_strategy.pl"
git clone
"{{ vault_git_repo_url_exitstrategy }}"
|
tee
-a
EXIT_DB
=
"/tmp/exit.db"
EXIT_PERL
=
"
${
HOME
}
/rosettaExitStrategy/perl/exit_strategy.pl"
### GENERATE EXIT DATABASE ###
### GENERATE EXIT SQL SCRIPT ###
date
|
tee
-a
"
${
LOGFILE
}
"
date
|
tee
-a
"
${
LOGFILE
}
"
echo
-e
"
\n
### GENERATE EXIT SQL SCRIPT ###
\n
"
|
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
[[
$?
-ne
0
]]
&&
echo
"ERROR: Couldn't create SQLite database, exiting."
&&
exit
10
date
|
tee
-a
"
${
LOGFILE
}
"
date
|
tee
-a
"
${
LOGFILE
}
"
### TIDY UP ###
rm
-r
~/rosettaExitStrategy
exit
0
exit
0
This diff is collapsed.
Click to expand it.
vars/sanitytest.vault.example
+
1
−
5
View file @
06f3517a
...
@@ -3,11 +3,7 @@
...
@@ -3,11 +3,7 @@
# ANY CONFIDENTIAL EDITS SHOULD GO TO THE ENCRYPTED VAULT FILE!
# ANY CONFIDENTIAL EDITS SHOULD GO TO THE ENCRYPTED VAULT FILE!
# VARIABLES THAT ARE NOT CONFIDENTIAL CAN GO TO A SEPARATE "*.YML" FILE.
# VARIABLES THAT ARE NOT CONFIDENTIAL CAN GO TO A SEPARATE "*.YML" FILE.
vault_git_repo_url_updatechecks: "<URL>"
vault_slub_git_repo_fqdn: "<URL>"
vault_git_repo_url_exitstrategy: "<URL>"
vault_db_user: "<USERNAME>"
vault_db_group: "<GROUPNAME>"
vault_groups:
vault_groups:
- name: "<GROUPNAME>"
- name: "<GROUPNAME>"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment