Skip to content

Host specific tasks: on() and select() in YAML? #3785

Answered by wivaku
wivaku asked this question in Help needed
Discussion options

You must be logged in to vote

While checking the JSON Schema, I noticed select is available. But it expects a string, which based on my test expects a single hostname (as opposed to the PHP version where you provide a filter, e.g. $hosts = select('type=web,env=prod');)

So e.g.

hosts:
  production:
    # ...
  staging:
    # ...

tasks:
  mytask:
    - select: production
    # - cd: ...
    # - run: ...

The schema lists as possible properties:

  • string: cd, run, run_locally, desc
  • object: upload, download
  • boolean: once, hidden
  • number: limit

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wivaku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant