chore(snippets): review commands after use

This commit is contained in:
Michele Cereda
2025-02-25 20:08:34 +03:00
parent 87db16042f
commit 01aa5b159a
6 changed files with 21 additions and 6 deletions

View File

@@ -151,9 +151,12 @@ pulumi down -t 'targetResourceUrn'
pulumi dn -s 'stack' --exclude-protected
# View the selected stack
pulumi stack --show-name
# View stacks' state.
pulumi stack
pulumi stack -ius 'stack'
pulumi stack -ius 'stack-name'
pulumi stack --show-ids --show-urns --show-name --show-secrets
# List stacks.

View File

@@ -63,9 +63,10 @@ ansible-navigator run 'playbook.yml' --execution-environment-image='ee/image'
ansible-navigator \
--container-options='--platform=linux/amd64' --pull-policy='missing' \
--mode='stdout' \
--execution-environment-volume-mounts="$HOME/.aws:/runner/.aws:ro" \
--set-environment-variable='ANSIBLE_VAULT_PASSWORD_FILE=vault.passwd.txt' \
--set-environment-variable='AWS_DEFAULT_REGION=eu-west-1' \
--pass-environment-variable='AWS_PROFILE' \
--execution-environment-volume-mounts="$HOME/.aws:/runner/.aws:ro" \
run \
--enable-prompts -i 'localhost,' \
'playbook.yml' \
@@ -108,7 +109,10 @@ ANSIBLE_VAULT_PASSWORD='ohSuchASecurePassword' ansible-vault encrypt --output 's
ansible-vault view 'ssh.key.pub' --vault-password-file 'password_file.txt'
ansible-vault edit 'ssh.key.pub'
ANSIBLE_VAULT_PASSWORD_FILE='password_file.txt' ansible-vault decrypt --output '.ssh/id_rsa' 'ssh.key'
diff 'some_role/files/ssh.key.plain' <(ansible-vault view --vault-password-file 'password_file.txt' 'some_role/files/ssh.key.enc')
ANSIBLE_VAULT_PASSWORD_FILE='password_file.txt' ansible-navigator \
--pass-environment-variable='ANSIBLE_VAULT_PASSWORD_FILE' run 'playbook_with_vault_encrypted_data.yml'
diff 'some_role/files/ssh.key.plain' \
<(ansible-vault view --vault-password-file 'password_file.txt' 'some_role/files/ssh.key.enc')
echo -e '$ANSIBLE_VAULT;1.1;AES256\n386462…86436' | ansible-vault decrypt --ask-vault-password
# List available plugins

View File

@@ -36,6 +36,7 @@ curl -fs --user 'admin:password' 'https://awx.example.org/api/v2/job_templates/'
# Show one job template
awx job_templates get "This job template's name" | jq -S '.' -
curl -fs --user 'admin:password' 'https://awx.example.org/api/v2/job_templates/' | jq '.results[]|select(.id==22)' -
# Modify job templates
awx job_templates modify '1' --extra_vars "@vars.yml"

View File

@@ -142,6 +142,10 @@ openssl pkcs12 -export -out 'certificate.pfx' -inkey 'private.key.pem' -in 'cert
# Convert PKCS#12 files (.pfx .p12) containing private keys and certificates to PEM
openssl pkcs12 -in 'keystore.pfx' -out 'keystore.pem' -nodes
# Show certificate details
openssl x509 -noout -dates -issuer -subject -in 'certificate.pem'
openssl s_client -connect 'www.google.com:443' | openssl x509 -noout -dates -issuer -subject
##
# TLS client

View File

@@ -120,9 +120,9 @@ curl -fsS --url 'http://localhost:3000/api/v1/alerts/config' -X 'POST' \
"service_type": "slack",
"service_config": "{\"slot_lag_mb_alert_threshold\":15000,\"open_connections_alert_threshold\":20,\"auth_token\":\"xoxb-012345678901-0123456789012-1234ABcdEFGhijKLMnopQRST\",\"channel_ids\":[\"C01K23X4567\"]}",
"alert_for_mirrors": [
"odoo_pg_to_sf",
"pikachu_ke_pg_to_sf",
"pikachu_zm_pg_to_sf"
"odoo_postgres_to_snowflake",
"product_korea_postgres_to_snowflake",
"product_zimbabwe_postgres_to_snowflake"
]
}
}'

View File

@@ -64,6 +64,9 @@ find '.' -type f -name 'Pulumi.yaml' -not -path "*/node_modules/*" -exec dirname
find '.' -type f -name 'Pulumi.yaml' -not -path "*/node_modules/*" -exec dirname {} + | xargs -pn '1' pulumi preview --parallel "$(nproc)" --cwd
find '.' -type f -name 'Pulumi.yaml' -not -path "*/node_modules/*" -exec dirname {} + | xargs -pn '1' pulumi refresh --parallel "$(nproc)" -s 'dev' --non-interactive -v '3' --cwd
# View the selected stack
pulumi stack --show-name
# Rename stacks
pulumi stack rename -s 'dev' 'staging'
# When the project name (and backend) changed