semaphoreui/semaphore

Feature: Ability to assign multiple inventories to a task template

invy opened this issue · 0 comments

invy commented

Related to

Web-Frontend (what users interact with), Web-Backend (APIs), Ansible (task execution)

Impact

must have

Missing Feature

When using ansible directly from command line, you can specify multiple inventories as the sequence of "-i" arguments, e.g.:

ansible-playbook -i common_variables.yml -i groups/staging/staging_hosts.yml deploy_something.yml

In Ansible Semaphore UI however you can only attach one Inventory to a Task Template, which is linked only with one file.

This feature became more important after the introduction of separate repositories for inventory files. Previously we've been using Inventory Script, which was collecting all inventory files, which it was taking from the environment variable.

If we could just attach multiple inventories to a task, it would significantly simplify the workflow:

  • no need to use inventory script
  • no need to specify extra environment variables

Implementation

There should be possible attach multiple inventories to the task templates, which will correspondingly transformed into the sequence of "-i" arguments passed to ansible.

Design

No response