Browse code

Fix freeform actions with FQCN. (#72958)

Felix Fontein authored on 2021/01/11 07:28:47
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,2 @@
0
+bugfixes:
1
+- Freeform actions did not work with ``ansible.builtin.`` or ``ansible.legacy.`` FQCN (https://github.com/ansible/ansible/pull/72958).
... ...
@@ -30,14 +30,14 @@ from ansible.utils.sentinel import Sentinel
30 30
 
31 31
 
32 32
 # For filtering out modules correctly below
33
-FREEFORM_ACTIONS = frozenset((
33
+FREEFORM_ACTIONS = frozenset(add_internal_fqcns((
34 34
     'command',
35 35
     'win_command',
36 36
     'shell',
37 37
     'win_shell',
38 38
     'script',
39 39
     'raw'
40
-))
40
+)))
41 41
 
42 42
 RAW_PARAM_MODULES = FREEFORM_ACTIONS.union(add_internal_fqcns((
43 43
     'include',
... ...
@@ -32,6 +32,12 @@
32 32
       - tar.warnings | length() == 1
33 33
       - '"Consider using the unarchive module rather than running ''tar''" in tar.warnings[0]'
34 34
 
35
+- name: use command with `ansible.builtin.` FQCN
36
+  ansible.builtin.command: /bin/ls
37
+
38
+- name: use command with `ansible.legacy.` FQCN
39
+  ansible.legacy.command: /bin/ls
40
+
35 41
 - name: use command to execute chown
36 42
   command: chown -h
37 43
   register: chown