Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Allow objects in local_action
Browse files Browse the repository at this point in the history
  • Loading branch information
pawel-baclawski authored and ssbarnea committed Apr 1, 2022
1 parent e9479d2 commit 3aba257
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion f/ansible-playbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@
},
"local_action": {
"title": "Local Action",
"type": "string"
"type": ["string", "object"]
},
"loop": {
"title": "Loop",
Expand Down
2 changes: 1 addition & 1 deletion f/ansible-tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
},
"local_action": {
"title": "Local Action",
"type": "string"
"type": ["string", "object"]
},
"loop": {
"title": "Loop",
Expand Down
3 changes: 3 additions & 0 deletions negative_test/playbooks/local_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- hosts: localhost
tasks:
- local_action: [] # <-- only string or dict is allowed
1 change: 1 addition & 0 deletions negative_test/playbooks/tasks/local_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- local_action: [] # <-- only string or dict is allowed
5 changes: 5 additions & 0 deletions test/playbooks/local_action_dict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- hosts: localhost
tasks:
- local_action:
module: ansible.builtin.debug
msg: hello
3 changes: 3 additions & 0 deletions test/playbooks/local_action_string.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- hosts: localhost
tasks:
- local_action: "ansible.builtin.debug msg=hello"
3 changes: 3 additions & 0 deletions test/playbooks/tasks/local_action_dict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- local_action:
module: ansible.builtin.debug
msg: hello
1 change: 1 addition & 0 deletions test/playbooks/tasks/local_action_string.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- local_action: "ansible.builtin.debug msg=hello"

0 comments on commit 3aba257

Please sign in to comment.