ansible gluster packages with vars centos-repo.yaml


[root@localhost ~]# ls -ltr *y*ml

-rw-r--r-- 1 root root 168 Oct  6 11:10 centos-repo.yaml
-rw-r--r-- 1 root root 347 Oct  6 11:16 gluster.yml
[root@localhost ~]# pwd
/root
[root@localhost ~]#


[root@localhost ~]# cat centos-repo.yaml 
---
- name: install repo
  hosts: ansible
  connection: local
  tasks:
  - name: install repo centos-release-gluster
    yum: name=centos-release-gluster state=present
[root@localhost ~]#



[root@localhost ~]# cat gluster.yml 
---
- name: install  gluster
  hosts: ansible
  connection: local
  gather_facts: no
  vars:
    file: centos-repo.yaml
  tasks:
  - name: install   glusterfs
    yum: name=glusterfs state=present
  - name: install  glusterfs-fuse
    yum: name=glusterfs-fuse state=present
  - name: install  glusterfs-server
    yum: name=glusterfs-server state=present
[root@localhost ~]#



[root@localhost ~]# ansible-playbook gluster.yml 

PLAY [install gluster] **********************************************************

TASK [install  glusterfs] *******************************************************
changed: [192.168.0.107]
changed:  [192.168.0.106]

TASK [install  glusterfs-fuse] ***************************************************
changed: [192.168.0.106]
changed:  [192.168.0.107]

TASK [install  glusterfs-server] *************************************************
changed: [192.168.0.107]
changed:  [192.168.0.106]

PLAY RECAP *********************************************************************
192.168.0.106              : ok=0    changed=3    unreachable=0    failed=0   
192.168.0.107              : ok=0    changed=3    unreachable=0    failed=0   

[root@localhost ~]# rpm -qa | grep gluster
glusterfs-libs-6.5-1.el7.x86_64
glusterfs-6.5-1.el7.x86_64
glusterfs-server-6.5-1.el7.x86_64
glusterfs-client-xlators-6.5-1.el7.x86_64
glusterfs-api-6.5-1.el7.x86_64
glusterfs-cli-6.5-1.el7.x86_64
glusterfs-fuse-6.5-1.el7.x86_64
centos-release-gluster6-1.0-1.el7.centos.noarch
[root@localhost ~]# 

Comments