Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the field 'hosts' is required and cannot have empty values #2144

Open
seaurching opened this issue Jun 28, 2024 · 1 comment
Open

the field 'hosts' is required and cannot have empty values #2144

seaurching opened this issue Jun 28, 2024 · 1 comment

Comments

@seaurching
Copy link

Issue

Hellow,owner:
my playbook field hosts is an variables with {{ exec_group }}. The file is

- name: "test hosts ping"
  hosts: "{{ exec_group }}"
  roles: ["ping"]

The webui configured the list_enviromnent with emulate values, like this:
image

then the task is faied with error:
image

Impact

Ansible (task execution)

Installation method

Docker

Database

BoltDB

Browser

Microsoft Edge

Semaphore Version

v2.10.7

Ansible Version

No response

Logs & errors

No response

Manual installation - system information

No response

Configuration

No response

Additional information

No response

@ramiuslr
Copy link

I guess this is because you need to define a default value to your hosts variable using Jinja2 syntax.
Mine is:

hosts: "{{ custom_host | default('invalid') }}"

Then in the webui:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants