collection 교체

This commit is contained in:
정훈 변
2024-02-23 16:37:40 +09:00
parent b494779b5b
commit 3fd554eee9
38862 changed files with 220204 additions and 6600073 deletions

View File

@@ -155,15 +155,15 @@ Examples
b:
c:
d:
- 0
- 1
- 0
- 1
after:
a:
b:
c:
d:
- 2
- 3
- 2
- 3
- name: Show the difference in json format
ansible.utils.fact_diff:
@@ -189,8 +189,8 @@ Examples
- name: Show the difference in path format
ansible.utils.fact_diff:
before: "{{ before|ansible.utils.to_paths }}"
after: "{{ after|ansible.utils.to_paths }}"
before: "{{ before | ansible.utils.to_paths }}"
after: "{{ after | ansible.utils.to_paths }}"
# TASK [ansible.utils.fact_diff] **************************************
# --- before
@@ -207,8 +207,8 @@ Examples
- name: Show the difference in yaml format
ansible.utils.fact_diff:
before: "{{ before|to_nice_yaml }}"
after: "{{ after|to_nice_yaml }}"
before: "{{ before | to_nice_yaml }}"
after: "{{ after | to_nice_yaml }}"
# TASK [ansible.utils.fact_diff] **************************************
# --- before
@@ -240,10 +240,10 @@ Examples
- name: Update the description of eth1/100
ansible.utils.update_fact:
updates:
- path: "pre['response']['phys-items']['PhysIf-list'][{{ index }}]['descr']"
value: "Configured by ansible {{ 100 | random }}"
- path: "pre['response']['phys-items']['PhysIf-list'][{{ index }}]['descr']"
value: "Configured by ansible {{ 100 | random }}"
vars:
index: "{{ pre['response']['phys-items']['PhysIf-list']|ansible.utils.index_of('eq', 'eth1/100', 'id') }}"
index: "{{ pre['response']['phys-items']['PhysIf-list'] | ansible.utils.index_of('eq', 'eth1/100', 'id') }}"
register: updated
- name: Apply the configuration
@@ -260,8 +260,8 @@ Examples
- name: Show the difference
ansible.utils.fact_diff:
before: "{{ pre.response|ansible.utils.to_paths }}"
after: "{{ post.response|ansible.utils.to_paths }}"
before: "{{ pre.response | ansible.utils.to_paths }}"
after: "{{ post.response | ansible.utils.to_paths }}"
# TASK [ansible.utils.fact_diff] *********************************************
# --- before