Ansible: for each loop
Example of how to do a for each (foreach) loop in a task with a predefined dictionary.
Example for Python
for key, value in dictionary.items(): # do stuff
Keep a container running on Kubernetes
This is just an example about how to keep running a pod without exit, this helps to do troubleshooting or test, this approach is not good to use in other cases.
Kubectl autocompletion in MacOS
MacOS comes with a really old bash version. Check the version from the environment variable..
$ echo $BASH_VERSION 3.2.57(1)-release
We can install a newer version of bash via Homebrew package manager, get Homebrew from here https://brew.sh.
Quick commands for Kops.
First set the environment variable
$ export NAME=kubernetes-cluster.example.com $ export KOPS_STATE_STORE=s3://kops
Ansible - Encrypt and Decrypt files
Ansible provide an easy way to encrypt or decrypt files to keep sensitive data in our playbooks. For example, you can have a template which has some username and password and you can keep encrypted.
Running Bludit in a Docker
Bludit is a flat-file CMS (content management system) which you can make you website or blog in a few minutes. Bludit is quite easy to install you just need a webserver with PHP support, but if you want to test it or avoid install a webserver you can use the official Docker image.