@@ -23,6 +23,7 @@ type ProvisionCommand struct {
2323 flags * flag.FlagSet
2424 extraVars string
2525 tags string
26+ skipTags string
2627 Trellis * trellis.Trellis
2728 verbose bool
2829}
@@ -32,6 +33,7 @@ func (c *ProvisionCommand) init() {
3233 c .flags .Usage = func () { c .UI .Info (c .Help ()) }
3334 c .flags .StringVar (& c .extraVars , "extra-vars" , "" , "Additional variables which are passed through to Ansible as 'extra-vars'" )
3435 c .flags .StringVar (& c .tags , "tags" , "" , "only run roles and tasks tagged with these values" )
36+ c .flags .StringVar (& c .skipTags , "skip-tags" , "" , "skip roles and tasks tagged with these values" )
3537 c .flags .BoolVar (& c .verbose , "verbose" , false , "Enable Ansible's verbose mode" )
3638}
3739
@@ -82,6 +84,10 @@ func (c *ProvisionCommand) Run(args []string) int {
8284 playbook .AddArg ("--tags" , c .tags )
8385 }
8486
87+ if c .skipTags != "" {
88+ playbook .AddArg ("--skip-tags" , c .skipTags )
89+ }
90+
8591 if environment == "development" {
8692 os .Setenv ("ANSIBLE_HOST_KEY_CHECKING" , "false" )
8793 playbook .SetName ("dev.yml" )
@@ -135,6 +141,7 @@ Arguments:
135141
136142Options:
137143 --extra-vars (multiple) Set additional variables as key=value or YAML/JSON, if filename prepend with @
144+ --skip-tags (multiple) Skip roles and tasks tagged with these values
138145 --tags (multiple) Only run roles and tasks tagged with these values
139146 --verbose Enable Ansible's verbose mode
140147 -h, --help Show this help
@@ -150,6 +157,7 @@ func (c *ProvisionCommand) AutocompleteArgs() complete.Predictor {
150157func (c * ProvisionCommand ) AutocompleteFlags () complete.Flags {
151158 return complete.Flags {
152159 "--extra-vars" : complete .PredictNothing ,
160+ "--skip-tags" : complete .PredictNothing ,
153161 "--tags" : complete .PredictNothing ,
154162 "--verbose" : complete .PredictNothing ,
155163 }
0 commit comments