Closed ypid closed 7 years ago
With this PR setup, when the user runs debops service/cryptsetup
, the debops.cryptsetup
role will be applied two times - once from the plain version, once from the persistent paths version, correct? This happens even when you just run debops
by itself through the site.yml
playbook.
I dunno... Roles are idempotent, but they are run multiple times one after the other... I guess that the current playbook layout and single tree structure is starting to show its limits.
@drybjed No, the role is only run once because the user is expected to chose one host group for each host, not both. So either debops_service_cryptsetup_persistent_paths
or debops_service_cryptsetup
as documented in the getting started of the role.
Sure, the role should be idempotent :wink:
A second directory level could be used, would you prefer that?
@ypid I haven't noticed the different host group names, good catch. I suppose that in that case it's a good solution. It could be better with some namespaces in inventory groups because their names start to be very long but let's go with this for now.
As for additional subdirectories, some kind of tab completion for the debops
command would probably come in handy at some point, along with script overhaul.
Related to: https://github.com/debops/ansible-cryptsetup/pull/23
I would propose that once a role has gotten more then one playbook, the plain/stripped down playbook gets renamed to
cryptsetup-plain.yml
(or a more precise name if there is one, see below) and a newcryptsetup.yml
playbook gets created which includes all the role playbooks. This way, the user can still call the main/meta playbook and does not know which particular variant of the playbook is used for a particular host. @drybjed Do you agree with this proposal?Other examples: https://github.com/debops/ansible-owncloud/tree/master/docs/playbooks