fgci-org / fgci-ansible

:microscope: Collection of the Finnish Grid and Cloud Infrastructure Ansible playbooks
MIT License
54 stars 18 forks source link

Add hosts-int role #151

Closed jabl closed 8 years ago

jabl commented 8 years ago

This role populates /etc/hosts on the nodes based on the int_ip_addr and ib_ip_addr host variables. Should help https://github.com/CSC-IT-Center-for-Science/fgci-ansible/issues/129.

I'll add the role to local.yml in a follow-up commit, in case you want to wait a while for sites to catch up.

martbhell commented 8 years ago

This role overwrites and populates /etc/hosts by default. Is this what we want to do?

jabl commented 8 years ago

Well, yes! Note that it doesn't change /etc/hosts on the install node (where already the pxe_config role generates /etc/hosts), nor on the admin node (where we have our IPMI hosts that we don't want to overwrite). All other hosts should have the default empty /etc/hosts.

One could of course alternatively do the full monty as described in https://github.com/CSC-IT-Center-for-Science/fgci-ansible/issues/129, but this is simpler and all the data comes from ansible in either case.

martbhell commented 8 years ago

Would you be OK with enabling travis testing of this role 1? I can submit a PR to get the testing working afterwards. I'd like to be able to view the proposed hosts file in there before enabling the role.

jabl commented 8 years ago

Yes, of course. I pulled your changes, I'll push a new tag once everything is working.

martbhell commented 8 years ago

Thanks. Looks like travis went green on the first try :balloon: The hosts file from this role looks better than the one from pxe_config for the admin,grid and install nodes. So there's some improvements one could make there but they also depend on what people put in their inventory files so maybe best to not update.

Please make a new release/requirements.yml update and we're good to go.

martbhell commented 8 years ago

The role's metafile is the default one, you could update that too if you're at it. I guess ansible-galaxy won't complain.

jabl commented 8 years ago

Yup, updated the meta file and pushed v1.0.2.

jabl commented 8 years ago

Do you want me to update local.yml as a separate pull request, or should I push to this branch?

martbhell commented 8 years ago

Separate PR please.