Open main menu

CDOT Wiki β

Changes

OPS435 Ansible

275 bytes added, 02:46, 24 November 2019
Part 3: Sample runs for using some Ansible's built-in modules
== Part 3: Sample runs for using some Ansible's built-in modules ==
: "yum" is a built-in ansible module. You can get detail information about an ansible module with the following command:<source lang="bash">
ansible-doc yum
</source>
: The following command demonstrates how to install the "epel-release" package with the "yum" module:
<pre>
[rchan@centos7 ansible]$ ansible 192.168.99.153 -m yum -a "name=epel-release state=present"
]
}
 
[rchan@centos7 ansible]$ ansible 192.168.99.153 -m yum -a "name=epel-release state=present" -u root
192.168.99.153 | SUCCESS => {
]
}
 
[rchan@centos7 ansible]$ ansible 192.168.99.153 -m yum -a "name=epel-release state=latest" -u root
192.168.99.153 | SUCCESS => {
1,760
edits