Ansible Ad-Hoc Commands – 1

# ansible all -i hosts –list-hosts (To see all hosts in inventory file named hosts) # ansible rl6 -i hosts –list-hosts (To see hosts of host group named rl6 created in inventory) # ansible ungrouped -i hosts –list-hosts (To see ungrouped hosts) # ansible rhel -i hosts –list-hosts (To see group parent to contains children […]

dnf command cheat sheet

# dnf –version (Check version of dnf) # dnf repolist (List enabled repositories) # dnf repolist all (List enabled and disabled repositories) # dnf install httpd (Install a package named httpd) # dnf install httpd (It will install directly install will not ask for yes or no) # dnf remove httpd (It will remove package) […]

Systemd Cheat Sheet

Systemd Services Command (Cheat Sheet) 1.VIEWING systemd INFORMATION systemctl list-dependencies              Show a unit’s dependencies systemctl list-sockets                   List sockets and what activates systemctl list-jobs                      View active systemd jobs systemctl list-unit-files      […]