-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Description
Summary
In some recent Ansible update, this task started producing a deprecation warning:
- name: see if project scripts exist for this project locally
become: no
local_action:
module: stat
path: "{{ playbook_dir }}/project_scripts"
register: project_script_stat
The warning:
[DEPRECATION WARNING]: Using a mapping for `action` is deprecated. This feature will be removed from ansible-core version 2.23.
Seems to be connected to #84101.
In https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_delegation.html the mapping syntax is still suggested for local_action with multiple parameters, and for a good reason: the single line string version is pretty ghastly for those.
I disagree with the characterization of esotericity in the linked issue, and contrary to its claims, this functionality was not undocumented. I suspect the mapping version of local_action is not going to be undeprecated, unless it was an accidental casualty of the deprecation of action, so a documentation issue it shall be.
Issue Type
Documentation Report
Component Name
ansible.builtin.local_action
Ansible Version
$ ansible --version
ansible [core 2.20.0]
config file = /Users/jklaiho/Projects/SomeClient/ansible/ansible.cfg
configured module search path = ['/Users/jklaiho/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/jklaiho/.local/share/mise/installs/python/3.13.6/lib/python3.13/site-packages/ansible
ansible collection location = /Users/jklaiho/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/jklaiho/.local/share/mise/installs/python/3.13.6/bin/ansible
python version = 3.13.6 (main, Aug 14 2025, 16:05:41) [Clang 20.1.4 ] (/Users/jklaiho/.local/share/mise/installs/python/3.13.6/bin/python3.13)
jinja version = 3.1.6
pyyaml version = 6.0.2 (with libyaml v0.2.5)Configuration
Not relevant to this issue, I believe.OS / Environment
macOS Sequoia 15.7.2
Additional Information
None that isn't apparent from the main description.
Code of Conduct
- I agree to follow the Ansible Code of Conduct