JohnStrunk / oso-gluster-ansible

Ansible for configuring Gluster to back OpenShift.io
Apache License 2.0
0 stars 4 forks source link

install-servers playbook, installs gluster client on servers exclusive to pcp-aggregators group as well #25

Open ShyamsundarR opened 6 years ago

ShyamsundarR commented 6 years ago

Ran the following command: ansible-ec2 -l g-us-east-1a-c00,g-us-east-1a-c01,pcp-aggregators playbooks/install-servers.yml

This installs the Glsuter client onto the mgmt server as well (which was exclusive to the pcp-aggregators group). Although in error, it would be nice to fix this. The problem is due to host: all inclusion here: https://github.com/JohnStrunk/oso-gluster-ansible/blob/master/playbooks/install-servers.yml#L12 (or if the code changes the hosts line in the play "Instal gluster client everywhere" in the file playbooks/install-servers.yml.

Possible fixes are:

  1. Scheme 1 to fix problem:

    - name: Install Gluster client on all servers
    hosts: gluster-servers
    become: true
    roles:
    - gluster-client
  2. Scheme 2 to fix problem:

    
    - name: Install Gluster client on all servers
    hosts: all:!pcp-aggregators
    become: true
    roles:
    - gluster-client
JohnStrunk commented 6 years ago

IIUC, the issue is that we're installing the gluster client onto the aggregator/jump host and we may not want that. I'll also add to it that a playbook called install-servers should really only be installing on servers.

If you agree w/ the above, perhaps we could go with:

- name: Install Gluster on servers
  hosts: gluster-servers
  become: true
  roles:
  - gluster-server
  - gluster-client
  - pcp-collector

and get rid of the "client" play altogether.

An (appropriately) named install-clients.yml could then be used separately and with a -l to install the client as desired. This would just be an independent playbook, not in the site.yml triggered tasks.

ShyamsundarR commented 6 years ago

and get rid of the "client" play altogether.

An (appropriately) named install-clients.yml could then be used separately and with a -l to install the client as desired. This would just be an independent playbook, not in the site.yml triggered tasks.

Yes, this is fine, basically we are folding the 2 plays here into one, and hence not having one which says "installing clients..." (also as the hosts list is the same for both). The need for a client install only play is fine, as well more as a helper for later I would assume.