mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-29 10:54:41 +00:00
Merge pull request #56 from ansible-collections/49-missing-pr-65424
Fix examples to use from_yaml filter with lookup
This commit is contained in:
@@ -216,24 +216,24 @@ EXAMPLES = '''
|
|||||||
If the definition file has been encrypted with Ansible Vault it will automatically be decrypted.
|
If the definition file has been encrypted with Ansible Vault it will automatically be decrypted.
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
definition: "{{ lookup('file', '/testing/deployment.yml') }}"
|
definition: "{{ lookup('file', '/testing/deployment.yml') | from_yaml }}"
|
||||||
|
|
||||||
- name: Read definition file from the Ansible controller file system after Jinja templating
|
- name: Read definition file from the Ansible controller file system after Jinja templating
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
definition: "{{ lookup('template', '/testing/deployment.yml') }}"
|
definition: "{{ lookup('template', '/testing/deployment.yml') | from_yaml }}"
|
||||||
|
|
||||||
- name: fail on validation errors
|
- name: fail on validation errors
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
definition: "{{ lookup('template', '/testing/deployment.yml') }}"
|
definition: "{{ lookup('template', '/testing/deployment.yml') | from_yaml }}"
|
||||||
validate:
|
validate:
|
||||||
fail_on_error: yes
|
fail_on_error: yes
|
||||||
|
|
||||||
- name: warn on validation errors, check for unexpected properties
|
- name: warn on validation errors, check for unexpected properties
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
definition: "{{ lookup('template', '/testing/deployment.yml') }}"
|
definition: "{{ lookup('template', '/testing/deployment.yml') | from_yaml }}"
|
||||||
validate:
|
validate:
|
||||||
fail_on_error: no
|
fail_on_error: no
|
||||||
strict: yes
|
strict: yes
|
||||||
|
|||||||
Reference in New Issue
Block a user