So I had a role where I needed to define lots of variables. I decided to split them over multiple files like this:
my_app/defaults/main/
main.yml
another.yml
yet_another.yml
Unfortunately there is no repo for vagrant-packages to install .deb-packages from (see an ages old issue), so here's an ugly hack to install the latest version of vagrant through Ansible.
- name: Find latest vagrant-version
shell: wget -qO - https://releases.hashicorp.com/vagrant/ | grep -o 'vagrant_[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | sed 's/vagrant_//'| head -1
register: vagrant_version.
- name: Install vagrant
More often than not, I typed a couple of commands and realized that I will need those more often.
So I redirected my history into a file history > somefile.sh
and edited that, removing line numbers and timestamps.
Tedious work that can be automated with the following shell-function for bash.
qs () {
# Quickly turns a shell-session into a script.
# --------------------------------------------
# The function will
It happened to me in my first IT job. I was told to rm a couple of outdated keyfiles. Of course they weren't named in a human readable manner. And of course I tab-completed to the wrong directory...
AAAAAAAAAAAAHHHH!!!
Of course, there was no such thing as "undelete" on the linux-box in question.
So your boss just jumped in, because he remembered that things need to be GDPR-compliant within the next few hours...
And of course he forgot to send the necessary mailing to your newsletter-subscribers.
And of course it's all properly documented in a haphazard mix of excel-files (each of which has a different layout),
text-files, v-cards and the like...
So now you need to extract those email addresses from all those files, because doing it manually will never finish in time.