Skip to content

Instantly share code, notes, and snippets.

View prasanjit-'s full-sized avatar
🇮🇳

Prasanjit Singh prasanjit-

🇮🇳
View GitHub Profile
@prasanjit-
prasanjit- / pedantically_commented_playbook.yml
Created June 3, 2017 06:39 — forked from karlehr/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@prasanjit-
prasanjit- / migrate-redis.py
Created November 20, 2017 20:39 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@prasanjit-
prasanjit- / docker-cleanup-resources.md
Created January 25, 2018 14:10 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@prasanjit-
prasanjit- / ansible_variable_precedence.md
Created June 6, 2019 20:09 — forked from ekreutz/ansible_variable_precedence.md
Ansible variable precedence (order, hierarchy)