semaphoreui / semaphore

Modern UI for Ansible, Terraform, OpenTofu, Bash, Pulumi.

Home Page:https://semaphoreui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Playbook to update requirements.yml

zzecool opened this issue · comments

Related to

Service (scheduled tasks, alerts), Ansible (task execution), Docker

Impact

better user experience

Missing Feature

I was reading the documention about the /home/semaphore/requirements.yml at : https://docs.semui.co/administration-guide/installation_manually#ansible-collections-and-roles-1

I believe the most refined way to perform the actual installation or update is by using a Task in Semaphore for localhost.

1: Create and populate the requirements.yml.
2: Make a task with the following playbook.

---
- name: Install or upgrade Ansible collections and roles
  hosts: localhost
  tasks:
    - name: Install or upgrade collections
      command: ansible-galaxy collection install --upgrade -r /home/semaphore/requirements.yml
      ignore_errors: yes

    - name: Install roles
      command: ansible-galaxy role install --force -r /home/semaphore/requirements.yml
      ignore_errors: yes

3: Schedule it to run with cron.
4: You are always up to date.

Implementation

As a build in playbook untill you will add in the web interface a way to add collections and roles.

Design

No response

Why should this be defined as a playbook? If the requirements file is part of the repository it's getting updated before the playbook defined by the task starts.

Why should this be defined as a playbook? If the requirements file is part of the repository it's getting updated before the playbook defined by the task starts.

So your playbooks are more efficient.

How would this be more efficient?

How would this be more efficient?

Downloading the same things over and over again does not seem efficient to me.

Also you have a whole page in the Docs about the exact thing

image

So instead of this :

image

You use Ansible, make a playbook and run the Task throught the Semaphore UI.