Note book to help you and me remember some tricks

Month June 2024

Ansible: Your shell command is executed slightly differently under ansible

You ansible shell command is executed slightly differently from what you could write manually inside your linux console.For instance the following command executed manually will display nothing. But the same command with ansible will display itself: The reason is that… Continue Reading →

Software developers how to locally test the sending of email inside your applications

Use docker mailDev https://hub.docker.com/r/maildev/maildev Then in your application you can configure the following smtp server localhost with smtp port 1025 localhost:1025 All the email you send will not go outside of your computer, but they will go inside the docker… Continue Reading →

Ansible shell execution: no environment variable are loaded

When you execute shell script with ansible module ansible.builtin.shell, bash is invoked as a non-interactive login shell. Consequently, environment variables from the user are not loaded. If you execute man bash, you’ll see: The solution is juste to explicitly load… Continue Reading →

© 2024 Software engineer >> Sysadmin >> Devops >> SRE

Up ↑