Skip to content

Conversation

@zakame
Copy link

@zakame zakame commented Mar 18, 2014

Implement an --all flag to enable Cinnamon to run tasks on all roles, as described in #34.

zakame added 2 commits March 18, 2014 12:25
Refactor so we can use this method later to initialize our cinnamon
config without having to run a task first.
Add an `--all` flag that can be specified instead of a role name to
allow Cinnamon to run given tasks on all roles.
@kentaro
Copy link
Owner

kentaro commented Mar 18, 2014

LGTM cc: @shibayu36

@shibayu36
Copy link
Collaborator

I think

$ cinnamon :all deploy

is better than

$ cinnamon --all deploy

--(option) is for global setting, but --all is only for role. Also the first argument for cinnamon command is for role. so I think using the special keyword like :all for the first argument is better than --all for the global option.

how do you think about that? @zakame

@zakame
Copy link
Author

zakame commented Mar 19, 2014

I thought about that too; in fact, we have a similar internal implementation of that at work, but that one simply aggregated all hosts from the roles into one, discarding role-specific parameters.

I chose the Getopt::Long option so I can call tasks on all roles regardless of CLI param ordering (the only ordering observed would be the way the tasks are called, e.g.)

$ cinnamon --all --config=my/alt/deploy.pl do:this do:that do:next

and in going along with the global option, I'd think --all would refer to the global role.

Finally, I don't know if other folks using Cinnamon may be doing their own hacks regarding this and have an :all role already on their configs, so in anticipating that, I think the long option would also be safer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants