diff --git a/README.md b/README.md index 4f46817..d377586 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Red Hat Certified Specialist in Ansible Automation (EX407) Preparation Course - [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) + - [Demonstration: Ansible Ad-Hoc Commands Part 1](#demonstration-ansible-ad-hoc-commands-part-1) + ## Understanding Core Components of Ansible ### Understanding Core Components of Ansible Part 1 @@ -233,4 +235,16 @@ Learn how to use ad-hoc ansible commands for simple system managment. This lectu ![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 +![img](https://github.com/Bes0n/EX407-Ansible-Automation/blob/master/images/img5.png) + + +### Demonstration: Ansible Ad-Hoc Commands Part 1 +documenation for specific modules can be collected using the ansible-doc command described in https://linuxacademy.com/cp/courses/lesson/course/2035/lesson/1/module/198 + +- Let's use `yum` as an example of ad-hoc command + - `ansible myserver.example.com -i inv.ini -m yum -b -a "name=elinks state=latest"` - install **elinks** with **latest** version + - `-i` - key for inventory host file + - `-m yum` - use `yum` module + - `-b` - become (by default become **root**) + - `-a "name=elinks state=latest"` - arguments. For `yum` module we're using **name** and **state** + - `ansible myserver.example.com -i inv.ini -m yum -b -a "name=elinks state=absent"` - state **absent** will uninstall **elinks** diff --git a/images/img4.png b/images/img4.png index 40bfb78..50bf9d4 100644 Binary files a/images/img4.png and b/images/img4.png differ