Skip to content

Instantly share code, notes, and snippets.

@ParagDoke
ParagDoke / gist:2ae20767fe884d54a291dbafc9ceb540
Created October 12, 2023 08:07
terraform-azurerm-storage-share-failure
2023-10-12T06:16:02.489Z [INFO] Terraform version: 1.6.1
2023-10-12T06:16:02.489Z [DEBUG] using github.com/hashicorp/go-tfe v1.34.0
2023-10-12T06:16:02.489Z [DEBUG] using github.com/hashicorp/hcl/v2 v2.18.1
2023-10-12T06:16:02.489Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2023-10-12T06:16:02.489Z [DEBUG] using github.com/zclconf/go-cty v1.14.1
2023-10-12T06:16:02.489Z [INFO] Go runtime version: go1.21.1
2023-10-12T06:16:02.489Z [INFO] CLI args: []string{"./terraform", "apply", "-no-color"}
2023-10-12T06:16:02.489Z [DEBUG] Attempting to open CLI config file: /home/rocket/.terraformrc
2023-10-12T06:16:02.489Z [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2023-10-12T06:16:02.489Z [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
#!/usr/bin/env bash
# vim:filetype=sh:tabstop=4:shiftwidth=4:expandtab:
set -e
start_at_year=2019
start_at_month=1
stop_at_year=2017
stop_at_month=10
@ParagDoke
ParagDoke / git2dot.bash
Last active October 23, 2018 08:28
Selective compressed git branch topology
#!/usr/bin/env bash
# vim:filetype=sh:tabstop=4:shiftwidth=4:expandtab:
set -e
typeset -A streams # associative array / map
relevant_commits=()
get_stream() {
local input=$1
@ParagDoke
ParagDoke / selective_debug.py
Created September 21, 2018 18:22
Ansible callback plugin with best of selective and debug callbacks
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
callback: selective_debug
type: stdout
short_description: selective formatted stdout/stderr display
@ParagDoke
ParagDoke / main.yml
Last active February 24, 2022 12:07
Conditionally loop over multiple ansible tasks
---
- name: test
hosts: localhost
connection: local
tasks:
- name: Invoke poller
vars:
url: http://localhost:8000/abc.json
validate_certs: yes
poll_interval: 10
@ParagDoke
ParagDoke / convert_ics_timezone.py
Created August 6, 2017 09:23
Convert ics files with aware datetimes to new timezone
#!/usr/bin/env python
# vim:filetype=python:expandtab:tabstop=4:shiftwidth=4:
"""
Copied from https://gist.github.com/deybhayden/1980583#file-convert_ics_timezone-py
I observed that dtstart.dt datetime objects were aware (not naive).
There was no need to identify oldtz. Original author's comments left below.
Parag Doke
Asia/Kolkata :-)
-----
@ParagDoke
ParagDoke / create-centos-box.bash
Last active November 2, 2020 15:21
Bash script to create a bare bones CentOS 7 VirtualBox VM with guest additions, as a local Vagrant box
#!/bin/bash -e
echo "Starting `basename $0`"
box_os=CentOS
box_os_version=7.1
echo "Searching for grep ..."
which grep
echo "Searching for sed ..."
which sed