nicholasamorim / ansible-role-harbor

An Ansible Role that installs Harbor.
MIT License
24 stars 29 forks source link

By default, Uncompressing Harbor installer is skipped #3

Open ghost opened 5 years ago

ghost commented 5 years ago

When you first run the role you get:

TASK [ Uncompressing Harbor installer...] ************************************************
skipping: [test_server]

That is probably because unarchive sees that {{ harbor_install_dir }}/harbor already exists. It is created by

- name: "Creating Harbor directory... ({{ harbor_install_dir }}/harbor)"
  file: ...
nicholasamorim commented 5 years ago

So here's a question, what would be an effective way to check if Harbor is installed?

Technically, we could check folder, files inside the folder or if the docker image exist. But none of these strike me as particularly solid. Or we shouldn't check that and just override whatever is there?

Suggestions?

ghost commented 5 years ago

Removing the /harbor in https://github.com/nicholasamorim/ansible-role-harbor/blob/d792c5f89276ca605730624ef61f37245183cc1b/tasks/main.yml#L13 was a quick fix but yes it would be good that it's more solid. If there is no customization or data in the direction (which I don't think there is), overriding could be good. It's probably good in general if you want your infra "compliant" to what you set with the script so for other things EXCEPT the ssl certificate (for example, in my case I use my own and don't want it disappearing :D), it might be good to overwrite. What do you think?