ansible redhat cluster gui
[root@localhost ~]# cat clustersuite.yml
- hosts: localhost
user: root
become: yes
become_method: sudo
tasks:
- name: high availability is installed
yum: name='@High Availability' state=latest
- name: resilent storage is installed
yum: name='@Resilient Storage' state=latest
- name: install pcs pacemaker fence-agent-all
command: yum install pcs pacemaker fence-agents-all
- name: pcsd is running and enabled
service:
name=pcsd
state=restarted
enabled=yes
[root@localhost ~]#
[root@localhost ~]# ansible-playbook clustersuite.yml
PLAY [localhost] *************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************
ok: [localhost]
TASK [high availability is installed] ****************************************************************************************************************
changed: [localhost]
TASK [resilent storage is installed] *****************************************************************************************************************
changed: [localhost]
TASK [install pcs pacemaker fence-agent-all] *********************************************************************************************************
[WARNING]: Consider using yum module rather than running yum
changed: [localhost]
TASK [pcsd is running and enabled] *******************************************************************************************************************
changed: [localhost]
PLAY RECAP *******************************************************************************************************************************************
localhost : ok=5 changed=4 unreachable=0 failed=0
[root@localhost ~]#
- hosts: localhost
user: root
become: yes
become_method: sudo
tasks:
- name: high availability is installed
yum: name='@High Availability' state=latest
- name: resilent storage is installed
yum: name='@Resilient Storage' state=latest
- name: install pcs pacemaker fence-agent-all
command: yum install pcs pacemaker fence-agents-all
- name: pcsd is running and enabled
service:
name=pcsd
state=restarted
enabled=yes
[root@localhost ~]#
[root@localhost ~]# ansible-playbook clustersuite.yml
PLAY [localhost] *************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************
ok: [localhost]
TASK [high availability is installed] ****************************************************************************************************************
changed: [localhost]
TASK [resilent storage is installed] *****************************************************************************************************************
changed: [localhost]
TASK [install pcs pacemaker fence-agent-all] *********************************************************************************************************
[WARNING]: Consider using yum module rather than running yum
changed: [localhost]
TASK [pcsd is running and enabled] *******************************************************************************************************************
changed: [localhost]
PLAY RECAP *******************************************************************************************************************************************
localhost : ok=5 changed=4 unreachable=0 failed=0
[root@localhost ~]#
https://docs.google.com/document/d/e/2PACX-1vRcEikeIqMxRHNHyBUIV_GMN_fObTACqIoLbQmTuJXx2VekpApqISdGt3_AfVDyX7BBNhaSs0-kQ6Uy/pub
on all nodes
firewall-cmd --permanent --add-service=high-availability; firewall-cmd --reload
root@localhost ~]# pcs cluster auth controller compute
Username: hacluster
Password:
controller: Authorized
compute: Authorized
on all nodes
firewall-cmd --permanent --add-service=high-availability; firewall-cmd --reload
root@localhost ~]# pcs cluster auth controller compute
Username: hacluster
Password:
controller: Authorized
compute: Authorized
[root@compute ~]# pcs cluster auth controller compute
controller: Already authorized
compute: Already authorized
[root@compute ~]#
Comments
Post a Comment