Is there a way to provide flexibility to select a subset of hosts to deploy the code to based on the environment selected? Side note: It is not a release pipeline
- Get value for environment parameter
pipeline.yml
parameters:
- name: env
displayName: "Select the environment"
values:
- Development
- Regression
- name: target_hosts
displayName: "Target Hosts"
values:
# Populate host list based on env selected allowing multiple-choice selection (with checkboxes, not radio button)
- Based on the environment selected read from configs/{env}/inventory.yml and populate the parameter values:
inventory.yml
hosts:
- hostA
- hostB
- hostC
Or if there is an altogether better way to achieve this, please let me know. Thanks!