From 74c14c67439ff2d5e24dfb142c7fadf701fb6712 Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Mon, 3 Aug 2020 10:30:45 -0500 Subject: Strip spaces in module names in explicit actions (#71040) * Strip spaces in module names in explicit actions Change: - When an action is called like "action: copy foo=bar", strip spaces around the action name. - This allows "action: copy foo=bar" to work as expected. Test Plan: - New integration tests Tickets: - Fixes #62136 Signed-off-by: Rick Elrod --- .../targets/parsing/roles/test_good_parsing/tasks/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/integration/targets/parsing') diff --git a/test/integration/targets/parsing/roles/test_good_parsing/tasks/main.yml b/test/integration/targets/parsing/roles/test_good_parsing/tasks/main.yml index 0fb1337e86..d225c0f9f9 100644 --- a/test/integration/targets/parsing/roles/test_good_parsing/tasks/main.yml +++ b/test/integration/targets/parsing/roles/test_good_parsing/tasks/main.yml @@ -202,3 +202,16 @@ - should_not_omit_1 is defined - should_not_omit_2 is defined - should_not_omit_3 == "__omit_place_holder__afb6b9bc3d20bfeaa00a1b23a5930f89" + +- name: Ensure module names are stripped of extra spaces (local_action) + local_action: set_fact b="b" + register: la_set_fact_b + +- name: Ensure module names are stripped of extra spaces (action) + action: set_fact c="c" + register: la_set_fact_c + +- assert: + that: + - b == "b" + - c == "c" -- cgit v1.2.3