diff --git a/README.md b/README.md index 042b81e..4f46817 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Red Hat Certified Specialist in Ansible Automation (EX407) Preparation Course - [Understanding Core Components of Ansible Part 2](#understanding-core-components-of-ansible-part-2) - [A Brief Tour of the Ansible Configuration File](#a-brief-tour-of-the-ansible-configuration-file) - [LAB Getting Started with Ansible](#lab-getting-started-with-ansible) +- [Run Ad-Hoc Ansible Commands](#run-ad-hoc-ansible-commands) + - [Run Ad-Hoc Ansible Commands](#run-ad-hoc-ansible-commands) ## Understanding Core Components of Ansible ### Understanding Core Components of Ansible Part 1 @@ -189,4 +191,46 @@ ansible ALL=(ALL) NOPASSWD: ALL - `ansible -i /home/ansible/inventory node1 -m ping` - `ansible -i /home/ansible/inventory node2 -m ping` - To redirect output of a successful command to `/home/ansible/output`: - - `ansible -i /home/ansible/inventory node1 -m ping > /home/ansible/output` \ No newline at end of file + - `ansible -i /home/ansible/inventory node1 -m ping > /home/ansible/output` + + +## Run Ad-Hoc Ansible Commands +### Run Ad-Hoc Ansible Commands +Learn how to use ad-hoc ansible commands for simple system managment. This lecture covers one of the key objectives for Red Hat exam 407. + +- Overview: + - What is an ad-hoc command in Ansible? + - Use cases for ad-hoc commands + - Ad-hoc vs Playbook + - Ansible command syntax + - Common modules + +- What is an ad-hoc command in Ansible + - You can run ansible either ad-hoc or as a playbook + - Both methods have the same capabilities + - Ad-hoc commands are effectively one-liners + +- Use cases for Ad-hoc + - Operational commands + - Checking log contents + - Daemon control + - Process management + - Informational commands + - Check installed software + - Check system properties + - Gather system performance information + - Research + - Work with unfamiliar modules on test systems + - Practice for playbook engineering + +##### Ad-hoc vs Playbook + +![img](https://github.com/Bes0n/EX407-Ansible-Automation/blob/master/images/img2.png) + +##### Common Modules + +![img](https://github.com/Bes0n/EX407-Ansible-Automation/blob/master/images/img3.png) + +![img](https://github.com/Bes0n/EX407-Ansible-Automation/blob/master/images/img4.png) + +![img](https://github.com/Bes0n/EX407-Ansible-Automation/blob/master/images/img5.png) \ No newline at end of file diff --git a/images/img2.png b/images/img2.png new file mode 100644 index 0000000..0ad2856 Binary files /dev/null and b/images/img2.png differ diff --git a/images/img3.png b/images/img3.png new file mode 100644 index 0000000..2557e83 Binary files /dev/null and b/images/img3.png differ diff --git a/images/img4.png b/images/img4.png new file mode 100644 index 0000000..40bfb78 Binary files /dev/null and b/images/img4.png differ diff --git a/images/img5.png b/images/img5.png new file mode 100644 index 0000000..5986f46 Binary files /dev/null and b/images/img5.png differ