Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/module_helper/tasks/msimpleda.yml

raw
1 # Copyright (c) 2021, Alexei Znamensky
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 - set_fact:
6 attr2_depr_dict:
7 msg: Attribute attr2 is deprecated
8 version: 9.9.9
9 collection_name: community.general
10 # With Data Tagging, the deprecation dict looks a bit different:
11 attr2_depr_dict_dt:
12 msg: Attribute attr2 is deprecated
13 version: 9.9.9
14 collection_name: community.general
15 deprecator:
16 resolved_name: community.general
17 type: collection
18 # Latest version:
19 attr2_depr_dict_dt2:
20 msg: Attribute attr2 is deprecated
21 version: 9.9.9
22 collection_name: community.general
23 deprecator:
24 resolved_name: community.general
25 type: ~
26
27 - name: test msimpleda 1
28 msimpleda:
29 a: 1
30 register: simple1
31
32 - name: assert simple1
33 assert:
34 that:
35 - simple1.a == 1
36 - simple1.attr1 == "abc"
37 - >-
38 ("deprecations" not in simple1) or (
39 attr2_depr_dict not in simple1.deprecations and
40 attr2_depr_dict_dt not in simple1.deprecations and
41 attr2_depr_dict_dt2 not in simple1.deprecations
42 )
43
44 - name: test msimpleda 2
45 msimpleda:
46 a: 2
47 register: simple2
48
49 - name: Show results
50 debug:
51 var: simple2
52
53 - name: assert simple2
54 assert:
55 that:
56 - simple2.a == 2
57 - simple2.attr2 == "def"
58 - '"deprecations" in simple2'
59 - >-
60 attr2_depr_dict in simple2.deprecations or
61 attr2_depr_dict_dt in simple2.deprecations or
62 attr2_depr_dict_dt2 in simple2.deprecations