the field 'hosts' is required and cannot have empty values
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:
then the task is faied with error:
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
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:
I guess this is because you need to define a default value to your
hostsvariable using Jinja2 syntax. Mine is:hosts: "{{ custom_host | default('invalid') }}"
Here is my ansible directory tree,all playbooks hosts is jinja2 syntax variable
still same error