LVM Configuration using Ansible in CentOS 7
1. Install epel repo on CentOS 7 system: # yum install epel-release -y 2. Install ansible using yum: # yum install ansible -y 3. Open '/etc/ansible/hosts' file and make a group called 'dbhosts' to add two hosts in it: # vi /etc/ansible/hosts [dbhosts] host1.example.com host2.example.com 4. Configure passwordless ssh to both host1 & host2 from ansible server: # ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: ce:7d:fd:65:4e:61:4e:a9:09:61:90:d2:75:1b:d1:1d root@server.example.com The key's randomart image is: +--[ RSA 2048]----+ | ..o. +oEo| | . o. . o..| | ...