During troubleshooting of Ansible issues it is useful to know how to enable debug mode and increase the level of verbosity. To enable debug and increase verbosity in Ansible you can pass the corresponding environment variables on the command line or define these settings in Ansible configuration file. Warning: The debug output can also include […]
In this article i am showing how to clear Git history by removing all commits. You may need this if you want to delete sensitive data from the history of Git commits. After such cleanup you will have the latest version of your Git repository, but with the one commit only. Be aware that after […]
In Ansible playbooks, it is often a good practice to test if a variable exists and what is its value. Particularity this helps to avoid different “VARIABLE IS NOT DEFINED” errors in Ansible playbooks. In this context there are several useful tests that you can apply using Jinja2 filters in Ansible. In this article, i’ll […]
Every command or application returns an exit status, also known as a return status or exit code. A successful command or application returns a 0, while an unsuccessful one returns a non-zero value that usually can be interpreted as an error code. In Linux you can get the exit status of a last command by […]
To connect to a Git repository with authentication over HTTP(S), every time it needs to set a username and password. You can configure Git to remember a username and password by storing them in a remote URL or by using Git credential helper. In this article i am showing how to clone Git repository by […]
By default, the pip install command installs the latest version of a package. However, it is often necessary to install an old version of a package to much some specific requirements. In this post i am showing how to install the specific version of a package using the pip install command.
Instead of committing directly in local master branch, a good developer creates a new branch each time he starts working on a new bug or feature. To create a new branch there is a git branch command. Below i will show the examples of how to create a new local branch in Git from another […]
What is an environment variable in Windows? An environment variable is a dynamic “object” containing an editable value which may be used by one or more software programs in Windows. In this note i am showing how to set an environment variable in Windows from the command-line prompt (CMD) and from the Windows PowerShell. In […]
The grep command in Linux is widely used for parsing files and searching for useful data in the outputs of different commands. The findstr command is a Windows grep equivalent in a Windows command-line prompt (CMD). In a Windows PowerShell the alternative for grep is the Select-String command. Below you will find some examples of […]
What is an environment variable in Windows? An environment variable is a dynamic “object” containing an editable value which may be used by one or more software programs in Windows. In this note i am showing how to list environment variables and display their values from the Windows command-line prompt and from the PowerShell.