working with ad-hoc part 1
This commit is contained in:
16
README.md
16
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)
|
- [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)
|
||||||
- [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
|
||||||
### Understanding Core Components of Ansible Part 1
|
### 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
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
### 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**
|
||||||
|
|||||||
BIN
images/img4.png
BIN
images/img4.png
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user