root@localhost ~]# cat clustering.yml
---
- name: Install cluster and resilent storage on ansible nodes
hosts: ansible
connection: local
gather_facts: no
tasks:
- name: Disable SELinux
selinux:
state: disabled
- name: firewalld is stopped and disabled
service: name=firewalld state=stopped enabled=no
- name: high availability is installed
yum: name='@High Availability' state=present
- name: resilent storage is installed
yum: name='@Resilient Storage' state=present
~
root@localhost ~]# ansible-playbook clustering.yml
PLAY [Install cluster and resilent storage on ansible nodes] *******************
TASK [Disable SELinux] *********************************************************
changed:[192.168.0.107]
changed: [192.168.0.106]
TASK [firewalld is stopped and disabled] ***************************************
changed: [192.168.0.106]
changed: [192.168.0.107]
TASK [high availability is installed] ******************************************
changed: [192.168.0.107]
changed:[192.168.0.106]
TASK [resilent storage is installed] *******************************************
changed: [192.168.0.106]
changed: [192.168.0.107]
PLAY RECAP *********************************************************************
192.168.0.106 : ok=4 changed=4 unreachable=0 failed=0
192.168.0.107 : ok=4 changed=4 unreachable=0 failed=0
[root@localhost ~]# yum groupremove 'High Availability'
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.nbrc.ac.in
* extras: mirror.nbrc.ac.in
* updates: mirror.nbrc.ac.in
No environment named High Availability exists
Resolving Dependencies
--> Running transaction check
---> Package fence-agents-aliyun.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-all.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-aws.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-azure-arm.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-gce.x86_64 0:4.2.1-24.el7 will be erased
---> Package omping.x86_64 0:0.0.4-6.el7 will be erased
---> Package pacemaker.x86_64 0:1.1.20-5.el7_7.1 will be erased
---> Package pacemaker-doc.x86_64 0:1.1.20-5.el7_7.1 will be erased
---> Package pcs.x86_64 0:0.9.167-3.el7.centos.1 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
fence-agents-aliyun x86_64 4.2.1-24.el7 @base 22 M
fence-agents-all x86_64 4.2.1-24.el7 @base 0.0
fence-agents-aws x86_64 4.2.1-24.el7 @base 4.9 k
fence-agents-azure-arm x86_64 4.2.1-24.el7 @base 28 k
fence-agents-gce x86_64 4.2.1-24.el7 @base 2.9 M
omping x86_64 0.0.4-6.el7 @base 66 k
pacemaker x86_64 1.1.20-5.el7_7.1 @updates 1.2 M
pacemaker-doc x86_64 1.1.20-5.el7_7.1 @updates 111 k
pcs x86_64 0.9.167-3.el7.centos.1 @updates 11 M
Transaction Summary
================================================================================
Remove 9 Packages
Installed size: 37 M
Is this ok [y/N]:
root@localhost ~]# yum groupremove 'Resilient Storage'
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.nbrc.ac.in
* extras: mirror.nbrc.ac.in
* updates: mirror.nbrc.ac.in
No environment named Resilient Storage exists
Resolving Dependencies
--> Running transaction check
---> Package dlm.x86_64 0:4.0.7-1.el7 will be erased
---> Package gfs2-utils.x86_64 0:3.1.10-9.el7 will be erased
---> Package lvm2-cluster.x86_64 7:2.02.185-2.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
dlm x86_64 4.0.7-1.el7 @base 172 k
gfs2-utils x86_64 3.1.10-9.el7 @base 934 k
lvm2-cluster x86_64 7:2.02.185-2.el7 @base 1.5 M
Transaction Summary
================================================================================
Remove 3 Packages
Installed size: 2.5 M
Is this ok [y/N]:
---
- name: Install cluster and resilent storage on ansible nodes
hosts: ansible
connection: local
gather_facts: no
tasks:
- name: Disable SELinux
selinux:
state: disabled
- name: firewalld is stopped and disabled
service: name=firewalld state=stopped enabled=no
- name: high availability is installed
yum: name='@High Availability' state=present
- name: resilent storage is installed
yum: name='@Resilient Storage' state=present
~
root@localhost ~]# ansible-playbook clustering.yml
PLAY [Install cluster and resilent storage on ansible nodes] *******************
TASK [Disable SELinux] *********************************************************
changed:[192.168.0.107]
changed: [192.168.0.106]
TASK [firewalld is stopped and disabled] ***************************************
changed: [192.168.0.106]
changed: [192.168.0.107]
TASK [high availability is installed] ******************************************
changed: [192.168.0.107]
changed:[192.168.0.106]
TASK [resilent storage is installed] *******************************************
changed: [192.168.0.106]
changed: [192.168.0.107]
PLAY RECAP *********************************************************************
192.168.0.106 : ok=4 changed=4 unreachable=0 failed=0
192.168.0.107 : ok=4 changed=4 unreachable=0 failed=0
[root@localhost ~]# yum groupremove 'High Availability'
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.nbrc.ac.in
* extras: mirror.nbrc.ac.in
* updates: mirror.nbrc.ac.in
No environment named High Availability exists
Resolving Dependencies
--> Running transaction check
---> Package fence-agents-aliyun.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-all.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-aws.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-azure-arm.x86_64 0:4.2.1-24.el7 will be erased
---> Package fence-agents-gce.x86_64 0:4.2.1-24.el7 will be erased
---> Package omping.x86_64 0:0.0.4-6.el7 will be erased
---> Package pacemaker.x86_64 0:1.1.20-5.el7_7.1 will be erased
---> Package pacemaker-doc.x86_64 0:1.1.20-5.el7_7.1 will be erased
---> Package pcs.x86_64 0:0.9.167-3.el7.centos.1 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
fence-agents-aliyun x86_64 4.2.1-24.el7 @base 22 M
fence-agents-all x86_64 4.2.1-24.el7 @base 0.0
fence-agents-aws x86_64 4.2.1-24.el7 @base 4.9 k
fence-agents-azure-arm x86_64 4.2.1-24.el7 @base 28 k
fence-agents-gce x86_64 4.2.1-24.el7 @base 2.9 M
omping x86_64 0.0.4-6.el7 @base 66 k
pacemaker x86_64 1.1.20-5.el7_7.1 @updates 1.2 M
pacemaker-doc x86_64 1.1.20-5.el7_7.1 @updates 111 k
pcs x86_64 0.9.167-3.el7.centos.1 @updates 11 M
Transaction Summary
================================================================================
Remove 9 Packages
Installed size: 37 M
Is this ok [y/N]:
root@localhost ~]# yum groupremove 'Resilient Storage'
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.nbrc.ac.in
* extras: mirror.nbrc.ac.in
* updates: mirror.nbrc.ac.in
No environment named Resilient Storage exists
Resolving Dependencies
--> Running transaction check
---> Package dlm.x86_64 0:4.0.7-1.el7 will be erased
---> Package gfs2-utils.x86_64 0:3.1.10-9.el7 will be erased
---> Package lvm2-cluster.x86_64 7:2.02.185-2.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
dlm x86_64 4.0.7-1.el7 @base 172 k
gfs2-utils x86_64 3.1.10-9.el7 @base 934 k
lvm2-cluster x86_64 7:2.02.185-2.el7 @base 1.5 M
Transaction Summary
================================================================================
Remove 3 Packages
Installed size: 2.5 M
Is this ok [y/N]:
Comments
Post a Comment