Linux DevOps Automate Everything

AWS Cli Autocomplete

If you are using WSL and AWS Cli, you might be missing the TAB to autocomplete.

Follow the instruction below and behold the magic.

which aws_completer
complete -C '/usr/local/bin/aws_completer' aws

If it works, you have to keep this instruction started in every bash, so:

vim ~/.bashrc

Add the next line to the bottom of the file.

complete -C '/usr/local/bin/aws_completer' aws

Save, quit, start a new session and see if it worked.

AB

Ansible in WSL

Yet again another step to a better direction.

sudo apt-get -y install python-pip python-dev libffi-dev libssl-dev
pip install ansible
echo 'PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc

Soon I will try to use Vagrant with Windows being the host of the VMs

AB

Terraform in WSL

Unfortunatly, in my work, I have to use Windows It started as Windows 7 and now I’m using a Windows 10 (not fully updated).

This is the way I found to install Terraform quickly in WSL (Ubuntu).

cd /tmp
wget https://releases.hashicorp.com/terraform/0.11.1/terraform_0.11.1_linux_amd64.zip
sudo mkdir -p /opt/terraform
sudo unzip /tmp/terraform_0.11.1_linux_amd64.zip -d /opt/terraform
export PATH="/opt/terraform:$PATH"

As I’m testing this, I will probably use my Terraform Snap package in a near future and maybe be able to run a full Linux system.

AB

Quick vim tip

Who never opened a file with vim and then realized that you need to write but you forgot root?

###Easy fix: sudo vim ~/.vimrc add the following line

command W :execute ':silent w !sudo tee % > /dev/null' | :edit!

With this we only need to save the file like “:W”

AB

Testing feeds

Due to a request from a friend, I have managed a way to create a RSS feed (or in this case) a Atom feed to allow my blog viewers to follow new posts!

Hope you like it!

AB