This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ansible_runner | |
def run(): | |
config = { | |
"project_dir": "./assets/project", # source directory | |
"playbook":"self_test.yml", # roles are relative to playbooks: use roles_path for other locations | |
"private_data_dir": "./data", # run-time directory | |
"inventory": ["inventory/localhost.yml"], | |
"suppress_env_files": True, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import logging | |
import time | |
import boto3 | |
import botocore | |
AWS_REGION="eu-west-2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://pre-commit.com for more information | |
# See https://pre-commit.com/hooks.html for more hooks | |
repos: | |
- repo: https://github.com/adrienverge/yamllint | |
rev: v1.32.0 | |
hooks: | |
- args: | |
- --config-file | |
- .yamllint.yaml | |
id: yamllint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
PROJECT_NAME: labs | |
CI_DEFAULT_IMAGE: alpine:3.18.2 | |
CI_TF_IMAGE: $CI_DEFAULT_IMAGE | |
RELEASE_VERSION: $CI_COMMIT_SHORT_SHA | |
.action_tag_release: | |
image: registry.gitlab.com/gitlab-org/release-cli:latest | |
script: | |
- echo "Tag release $ENVIRONMENT-$COMPONENT_NAME-$STACK_VARIANT-$RELEASE_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Ubuntu | |
aws ec2 describe-images \ | |
--owners 099720109477 \ | |
--filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-focal-20.04-arm64-server-????????" "Name=state,Values=available" \ | |
--query "reverse(sort_by(Images, &CreationDate))[:1].ImageId" \ | |
--output text | |
## Amazon Linux 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws iam create-user --user-name aaa --tags Key=sje:resource:email,[email protected] Key=sje:resource:phase,Value=poc | |
aws iam attach-user-policy --user-name aaa --policy-arn arn:aws:iam::aws:policy/AdministratorAccess | |
aws iam create-access-key --user-name aaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@type": "MessageCard", | |
"@context": "http://schema.org/extensions", | |
"themeColor": "0076D7", | |
"summary": "integration-fictional-api Failed Smoke Tests on UAT", | |
"sections": [{ | |
"activityTitle": "integration-fictional-api Failed Smoke Tests on UAT", | |
"activitySubtitle": "Commit: fd17b15", | |
"activityImage": "https://img.icons8.com/flat-round/64/000000/error--v1.png", | |
"facts": [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@type": "MessageCard", | |
"@context": "http://schema.org/extensions", | |
"themeColor": "0076D7", | |
"summary": "integration-fictional-api Failed Smoke Tests on UAT", | |
"sections": [{ | |
"activityTitle": "integration-fictional-api Failed Smoke Tests on UAT", | |
"activitySubtitle": "Commit: fd17b15", | |
"activityImage": "https://img.icons8.com/flat-round/64/000000/error--v1.png", | |
"facts": [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@type": "MessageCard", | |
"@context": "http://schema.org/extensions", | |
"themeColor": "0076D7", | |
"summary": "integration-fictional-api Deployed to UAT", | |
"sections": [{ | |
"activityTitle": "integration-fictional-api Deployed to UAT", | |
"activitySubtitle": "Commit: fd17b15", | |
"activityImage": "https://img.icons8.com/flat-round/64/000000/info.png", | |
"facts": [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@type": "MessageCard", | |
"@context": "http://schema.org/extensions", | |
"themeColor": "0076D7", | |
"summary": "integration-fictional-api Deployed to UAT", | |
"sections": [{ | |
"activityTitle": "integration-fictional-api Deployed to UAT", | |
"activitySubtitle": "Commit: fd17b15", | |
"activityImage": "https://img.icons8.com/flat-round/48/000000/info.png" | |
}] |
NewerOlder