Skip to content
This repository has been archived by the owner on May 29, 2021. It is now read-only.

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

Open
ShyamsundarR opened this issue Mar 15, 2018 · 2 comments

Comments

@ShyamsundarR
Copy link
Collaborator

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
  1. Scheme 2 to fix problem:
- name: Install Gluster client on all servers
  hosts: all:!pcp-aggregators
  become: true
  roles:
  - gluster-client

- name: Install Gluster client on all servers
  hosts: pcp-aggregators:&all
  become: true
  roles:
  - gluster-client
@JohnStrunk
Copy link
Owner

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
Copy link
Collaborator Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants