mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-11-21 14:48:37 +00:00
Fix ansible-lint no-changed-when and execution-environment schema warnings (#1196)
* Fix ansible-lint no-changed-when and execution-environment schema warnings Add `changed_when: false` to example command tasks in the kubectl connection plugin to resolve no-changed-when warnings from ansible-lint. Add `version: 3` to meta/execution-environment.yml to satisfy the schema[execution-environment] rule requiring the version property. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add changelog fragment for ansible-lint warning fixes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix changelog fragment YAML formatting Quote strings to avoid YAML parsing ambiguity in the trivial section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d9e0218dba
commit
a7922e498c
@@ -196,6 +196,7 @@ EXAMPLES = r"""
|
||||
# and requires python to be installed in the image
|
||||
- name: Run a command in a pod
|
||||
ansible.builtin.command: echo "Hello, World!"
|
||||
changed_when: false
|
||||
|
||||
- name: Run a command in a pod using local kubectl with inventory variables
|
||||
# Example inventory:
|
||||
@@ -220,6 +221,7 @@ EXAMPLES = r"""
|
||||
# and requires python to be installed in the image
|
||||
- name: Run a command in a pod
|
||||
ansible.builtin.command: echo "Hello, World!"
|
||||
changed_when: false
|
||||
|
||||
- name: Run a command in a pod using dynamic inventory
|
||||
hosts: localhost
|
||||
@@ -253,6 +255,7 @@ EXAMPLES = r"""
|
||||
# be aware that the command is executed as the user that started the container
|
||||
# and requires python to be installed in the image
|
||||
ansible.builtin.command: echo "Hello, World!"
|
||||
changed_when: false
|
||||
delegate_to: "{{ my_app_pod_name }}"
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user