Skip to content

Instantly share code, notes, and snippets.

View ColOfAbRiX's full-sized avatar

Fabrizio Colonna ColOfAbRiX

View GitHub Profile
@ColOfAbRiX
ColOfAbRiX / detect_cloud_platform.yml
Last active July 28, 2022 21:26
Ansible gist to detect the cloud platform on which a VM is running
---
#
# Detects the cloud provider on which the VM is running and sets accordingly the
# following variables:
# cloud_platform_is_aws=true when on AWS, false otherwise
# cloud_platform_is_gcp=true when on GCP, false otherwise
# cloud_platform_is_azure=true when on Azure, false otherwise
# cloud_platform_name:
# - 'azure' when on Azure
# - 'aws' when on AWS
@ColOfAbRiX
ColOfAbRiX / PackerAmazonImport.json
Last active June 30, 2017 16:52
AWS IAM policy with minimum permissions required by the packer post-processor amazon-import. I built the policy looking directly at the API calls made by packer.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:DeleteObject",
"s3:PutObject",
"s3:GetObject"
],
"Effect": "Allow",