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

Problem: CLI Arg in task only in JSON format #2367

Open
SysAdminShed opened this issue Sep 27, 2024 · 5 comments
Open

Problem: CLI Arg in task only in JSON format #2367

SysAdminShed opened this issue Sep 27, 2024 · 5 comments
Assignees
Labels

Comments

@SysAdminShed
Copy link

Issue

It would be great to not have to write in JSON the CLI args when running a task.

Currently to limit an Ansible playbooK I need to do :

image

But if I add the arg in the task template, it works without being in JSON format :

image

The goal would be to be able to limit the scope of an ansible playbook easily like in CLI without having to format in JSON every time.

Impact

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

Installation method

Package

Database

MySQL

Browser

Chrome

Semaphore Version

2.10.22-e44910d-1721658299

Ansible Version

ansible [core 2.14.14]

Logs & errors

No response

Manual installation - system information

    'c:.                              
    lkkkx, ..       ..   ,cc,           ----------------
    okkkk:ckkx'  .lxkkx.okkkkd          OS: AlmaLinux 9.4 x86_64
    .:llcokkx'  :kkkxkko:xkkd,          Host: VMware20,1
  .xkkkkdood:  ;kx,  .lkxlll;           Kernel: Linux 5.14.0-427.33.1.el9_44
   xkkx.       xk'     xkkkkk:          Uptime: 18 hours, 39 mins
   'xkx.       xd      .....,.          Packages: 1237 (rpm)
  .. :xkl'     :c      ..''..           Shell: bash 5.1.8
.dkx'  .:ldl:'. '  ':lollldkkxo;        Display (Virtual-1): 1280x800 @ 60 z

.''lkkko' ckkkx. Cursor: Adwaita
'xkkkd:kkd. .. ;' :kkxo. Terminal: /dev/pts/0
,xkkkd;kk' ,d; ld. ':dkd::cc, CPU: Intel(R) Xeon(R) Silver 4216 (z
.,,.;xkko'.';lxo. dx, :kkk'xkkkkc GPU: VMware SVGA II Adapter
'dkkkkkxo:. ;kx .kkk:;xkkd. Memory: 932.52 MiB / 15.34 GiB (6%)
..... .;dk:. lkk. :;, Swap: 0 B / 32.00 GiB (0%)
:kkkkkkkdoxkkx Disk (/): 7.35 GiB / 85.95 GiB (9%)s
,c,,;;;:xkkd. Local IP (ens33): 192.168.3.18/22
;kkkkl... Locale: en_CA.UTF-8
;kkkkl
,od;

Configuration

Inventory / task scope limitation.

Additional information

No response

@fiftin
Copy link
Collaborator

fiftin commented Sep 29, 2024

Hi @SysAdminShed

You are right. Looks like new args UI works not as expected :)

@fiftin fiftin added the bug label Sep 29, 2024
@fiftin fiftin self-assigned this Sep 29, 2024
@SysAdminShed
Copy link
Author

Wanted to add the following :

When adding multiple limit of the scope (with proper JSON format), it gives the following error :

9:51:06 AM
ERROR! the playbook: Producer could not be found

JSON format used : ["-l", "benchtest","benchtest2"]

@kingp0dd
Copy link

kingp0dd commented Nov 1, 2024

i tried limiting host by

["-l", "host"]

but getting error

ERROR! the playbook: ["-l", "host"] could not be found

@SysAdminShed
Copy link
Author

SysAdminShed commented Nov 1, 2024 via email

@kingp0dd
Copy link

kingp0dd commented Nov 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: To triage
Development

No branches or pull requests

3 participants