Author: Ansible Pilot

Download a file using an HTTPS proxy via environment variables – Ansible get_url and environment

How to automate the download of a file and verify the checksum using an HTTPS proxy with Ansible module get_url and “https_proxy” environment statement. https://www.ansiblepilot.com/articles/download-a-file-using-an-https-proxy-via-environment-variables-working-with-proxies-ansible-environment-statement/ Learn Ansible in the course…

Backup With Robocopy on Windows – Ansible module win_robocopy

How to automate the backup synchronization of an “examples” folder to “examples-backup” on Windows using RoboCopy with Ansible module win_robocopy. https://www.ansiblepilot.com/articles/backup-with-robocopy-on-windows-ansible-module-win_robocopy/ Learn Ansible in the course by 150+ examples: https://courses.ansiblepilot.com/ansiblebyexamples…

How to install Ansible with PIP, the Python package manager – Ansible install

How to install Ansible with PIP – the Python package manager. https://www.ansiblepilot.com/articles/how-to-install-ansible-with-pip-ansible-install/ Learn Ansible in course by 100+ examples: https://courses.ansiblepilot.com/ansiblebyexamples FREE Top 10 Best Practices of Ansible Automation: save time,…

Download a file in Windows-like systems – Ansible module win_get_url

How to automate the download of a file, verify the checksum and save wherever you want in Windows-like systems with Ansible module win_get_url. https://www.ansiblepilot.com/articles/download-a-file-in-windows-like-systems-ansible-module-win_get_url/ Timestamps 00:00 Introduction 00:20 ansible.windows.win_get_url Ansible…

Read an environment variable – Ansible lookup plugin env

How to automate the reading of HOME environmental variable and use it in your Ansible Playbook code with lookup plugin env. https://www.ansiblepilot.com/articles/read-an-environment-variable-ansible-lookup-plugin-env/ Learn Ansible in course by 100+ examples: https://courses.ansiblepilot.com/ansiblebyexamples FREE…

Create a VMware vSphere Virtual Machine – Ansible module vmware_guest

How to automate the creation of a virtual machine guest with 1 CPU, 1 GB RAM, and 10 GB storage thin-provisioned using Ansible Playbook and vmware_guest module. https://www.ansiblepilot.com/articles/create-a-vmware-vsphere-virtual-machine-ansible-module-vmware_guest/ Learn Ansible…

Test Windows host availability – Ansible module win_ping

How to test Windows host availability? Today we’re going to talk about the simplest way to test if a Windows-managed host is available to receive our commands. Ansible module win_ping.…

#Shorts How to install Ansible with PIP #ansible #automation #linux #python

How to install Ansible with PIP – the Python package manager. https://www.ansiblepilot.com/ Learn Ansible in course by 90+ examples: https://courses.ansiblepilot.com/ansiblebyexamples My Book reading list: https://amzn.to/31fK9qN The Art Of War by…

(Solved) Windows 11 Error 0x80370102 WSL: Windows Subsystem for Linux – Ansible Troubleshooting

How to troubleshoot the Windows 11 WSL: Windows Subsystem for Linux – Error: 0x80370102 The virtual machine could not be started because a required feature is not installed. How to…

#shorts Reboot Windows hosts Ansible module win_reboot #ansible #windows #reboot

Learn Ansible in course by 90+ examples: https://courses.ansiblepilot.com/ansiblebyexamples My Book reading list: https://amzn.to/31fK9qN The Art Of War by Sun Tzu https://amzn.to/3Ec7Sq0 Unlimited Memory: How to Use Advanced Learning Strategies to…

Backup Config on Mikrotik RouterOS – Ansible Network community.routeros

How to automate network device configuration backup for Mikrotik RouterOS network appliances connecting via SSH protocol using the username and password credentials and save it to a file using Ansible…

Load and Unload Kernel Modules in Linux – Ansible module modprobe

How to automate the Linux Kernel module loading of the “dummy” module with parameters on an example machine with Ansible. https://www.ansiblepilot.com/articles/load-and-unload-kernel-modules-in-linux-ansible-module-modprobe/ Timestamps 00:00 Introduction 00:21 community.general.modprobe Ansible module 00:57 parameters of…

Vulnerability Scanner Detector Log4Shell Remote Code Execution Log4j (CVE-2021–44228) —Ansible log4j

How to automate the Vulnerability Scanner or Detector provided by Red Hat RHSB-2021–009 Log4Shell — Remote Code Execution — log4j (CVE-2021–44228) on Linux with Ansible Playbook. Installation of dependency, GPG…

Set the SELinux Policy States and Modes on Linux – Ansible module selinux

How to automate the setting and verification of the “enforcing” SELinux mode and state with “targeted” policy and relabel the filesystem if necessary on Linux target with Ansible. https://www.ansiblepilot.com/articles/set-the-selinux-policy-states-and-modes-on-linux-ansible-module-selinux/ Timestamps 00:00…

Enable user account – Ansible module user

How to enable a user without password lock and with the appropriate shell in Linux. https://www.ansiblepilot.com/articles/enable-user-account-ansible-module-user/ Timestamps 00:00 Introduction 00:18 ansible.builtin.user Ansible module 01:02 parameters of ansible.builtin.user 02:41 user module…

Rolling Update RedHat like systems – Ansible module yum

Maintaining in a consistent state your fleet of machines is one of the most time-consuming tasks of the System Administrator. I’m going to show you how to perform Rolling Update…

Ansible modules - win_command vs win_shell

How to automate the execution of PowerShell or cmd.exe code on windows target hosts using Ansible Playbook with win_command and win_shell modules. https://www.ansiblepilot.com/articles/ansible-modules-win_command-vs-win_shell/ Learn Ansible in the course by 150+…

Check if a file exists – Ansible module stat

How to check if a file exists in Ansible? I’m going to show you a live demo and some simple Ansible code. I’m going to show you how to combine…

Rename file or directory – Ansible module copy and file

How to rename a file or directory foo, check the file existence, and perform the verification in a live demo and some simple Ansible code. https://www.ansiblepilot.com/articles/rename-file-or-directory-ansible-module-copy-and-file/ Timestamps 00:00 Introduction 00:23…

Write a Variable to File - Ansible module copy vs template

How to save the value of a variable to file using the Ansible copy vs template modules. Included the comparison and a step-by-step example. https://www.ansiblepilot.com/articles/write-a-variable-to-a-file-ansible-module-copy-vs-template/ Learn Ansible in the course…

Download and Use Ansible Galaxy Collection – ansible-galaxy and requirements.yml

How to Download and use the Ansible Collection community.general re-using Ansible artifacts (tasks, variables, defaults, handlers, modules, and plugins) published in Ansible Galaxy directory. https://www.ansiblepilot.com/ Learn Ansible in the course…

Create an empty file in Windows-like systems – Ansible module win_file

How to automate the creation of an empty “example.txt” in the Desktop of your users in Windows-like systems with Ansible Playbook. https://www.ansiblepilot.com/articles/create-an-empty-file-in-windows-like-systems-ansible-module-win_file/ Timestamps 00:00 Introduction 00:19 ansible.windows.win_file Ansible module 00:58…

(Solved) Windows 10 Error 0x80370102 WSL: Windows Subsystem for Linux – Ansible Troubleshooting

How to troubleshoot the Windows 10 WSL: Windows Subsystem for Linux – Error: 0x80370102 The virtual machine could not be started because a required feature is not installed. How to…

How to Pass Variables to Ansible Playbook in the command line? – Ansible extra variables

How to pass or override an Ansible Playbook variable from the command line in plaintext, JSON, or YAML. Very useful to combine some script, automation, or shell variables. Example with…

Add Windows Registry on Windows-like systems – Ansible module win_regedit

How to automate the creation of the Windows Registry key “name” and “value” under a specified “path” on Windows-like systems with Ansible Playbook using win_regedit module. https://www.ansiblepilot.com/articles/add-windows-registry-on-windows-like-systems-ansible-module-win_regedit/ Learn Ansible in…

Change user password – Ansible module user

How to write an Ansible Playbook to assign the password “password” to an “example” user account in a Linux system with SHA512 encryption. https://www.ansiblepilot.com/articles/disable-user-account-ansible-module-user/ Timestamps 00:00 Introduction 00:20 ansible.builtin.user Ansible…