From c3aba0f10e5d1641d77669f68ddb9173a0c8ca1d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 29 Apr 2022 13:01:25 +0200 Subject: [PATCH 0001/2104] Next expected release is 5.0.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 43726bfedb..6dc58b3f0f 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: community name: general -version: 5.0.0-a1 +version: 5.0.0 readme: README.md authors: - Ansible (https://github.com/ansible) From f055f4716154dfd3ace932069116d593cd30d6bf Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 2 May 2022 07:25:45 +0200 Subject: [PATCH 0002/2104] Document all filter and test plugins (#4597) * Fix/improve docs. * Document the a_module test. * Document the dict filter. * Linting. * Add more filter docs. * More filters. * Update BOTMETA. * Add another plugin. * Fix typos. * Add explicit entries. * Fix lookup documentation. --- .github/BOTMETA.yml | 24 ++++++- plugins/filter/counter.py | 29 ++++++++ plugins/filter/dict.py | 54 +++++++++++++++ plugins/filter/dict_kv.py | 32 +++++++++ plugins/filter/from_csv.py | 72 ++++++++++++++++++++ plugins/filter/groupby.py | 46 +++++++++++++ plugins/filter/hashids_decode.yml | 38 +++++++++++ plugins/filter/hashids_encode.yml | 38 +++++++++++ plugins/filter/jc.py | 61 +++++++++++++++++ plugins/filter/json_query.py | 101 ++++++++++++++++++++++++++++ plugins/filter/list.py | 91 +++++++++++++++++++++++++ plugins/filter/random_mac.py | 10 ++- plugins/filter/to_days.yml | 40 +++++++++++ plugins/filter/to_hours.yml | 40 +++++++++++ plugins/filter/to_milliseconds.yml | 40 +++++++++++ plugins/filter/to_minutes.yml | 40 +++++++++++ plugins/filter/to_months.yml | 40 +++++++++++ plugins/filter/to_seconds.yml | 10 +-- plugins/filter/to_time_unit.yml | 85 +++++++++++++++++++++++ plugins/filter/to_weeks.yml | 40 +++++++++++ plugins/filter/to_years.yml | 40 +++++++++++ plugins/filter/unicode_normalize.py | 40 +++++++++++ plugins/filter/version_sort.py | 29 ++++++++ plugins/lookup/cyberarkpassword.py | 21 +++--- plugins/modules/files/read_csv.py | 6 +- plugins/test/a_module.py | 33 +++++++++ 26 files changed, 1080 insertions(+), 20 deletions(-) create mode 100644 plugins/filter/hashids_decode.yml create mode 100644 plugins/filter/hashids_encode.yml create mode 100644 plugins/filter/to_days.yml create mode 100644 plugins/filter/to_hours.yml create mode 100644 plugins/filter/to_milliseconds.yml create mode 100644 plugins/filter/to_minutes.yml create mode 100644 plugins/filter/to_months.yml create mode 100644 plugins/filter/to_time_unit.yml create mode 100644 plugins/filter/to_weeks.yml create mode 100644 plugins/filter/to_years.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 0e32ec64b4..d1a85c2cbb 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -126,9 +126,13 @@ files: maintainers: giner $filters/from_csv.py: maintainers: Ajpantuso - $filters/groupby: + $filters/groupby.py: maintainers: felixfontein - $filters/hashids: + $filters/hashids.py: + maintainers: Ajpantuso + $filters/hashids_decode.yml: + maintainers: Ajpantuso + $filters/hashids_encode.yml: maintainers: Ajpantuso $filters/jc.py: maintainers: kellyjonbrazil @@ -140,8 +144,24 @@ files: maintainers: resmo $filters/unicode_normalize.py: maintainers: Ajpantuso + $filters/to_days.yml: + maintainers: resmo + $filters/to_hours.yml: + maintainers: resmo + $filters/to_milliseconds.yml: + maintainers: resmo + $filters/to_minutes.yml: + maintainers: resmo + $filters/to_months.yml: + maintainers: resmo $filters/to_seconds.yml: maintainers: resmo + $filters/to_time_unit.yml: + maintainers: resmo + $filters/to_weeks.yml: + maintainers: resmo + $filters/to_years.yml: + maintainers: resmo $filters/version_sort.py: maintainers: ericzolf $inventories/: diff --git a/plugins/filter/counter.py b/plugins/filter/counter.py index ad957fce21..5d7f365f94 100644 --- a/plugins/filter/counter.py +++ b/plugins/filter/counter.py @@ -5,6 +5,35 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: counter + short_description: Counts hashable elements in a sequence + version_added: 4.3.0 + author: Rémy Keil (@keilr) + description: + - Counts hashable elements in a sequence. + options: + _input: + description: A sequence. + type: list + elements: any + required: true +''' + +EXAMPLES = ''' +- name: Count occurences + ansible.builtin.debug: + msg: >- + {{ [1, 'a', 2, 2, 'a', 'b', 'a'] | community.general.counter }} + # Produces: {1: 1, 'a': 3, 2: 2, 'b': 1} +''' + +RETURN = ''' + _value: + description: A dictionary with the elements of the sequence as keys, and their number of occurance in the sequence as values. + type: dictionary +''' + from ansible.errors import AnsibleFilterError from ansible.module_utils.common._collections_compat import Sequence from collections import Counter diff --git a/plugins/filter/dict.py b/plugins/filter/dict.py index 3d20e752b1..f18ec1bc24 100644 --- a/plugins/filter/dict.py +++ b/plugins/filter/dict.py @@ -6,6 +6,60 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +DOCUMENTATION = ''' + name: dict + short_description: Convert a list of tuples into a dictionary + version_added: 3.0.0 + author: Felix Fontein (@felixfontein) + description: + - Convert a list of tuples into a dictionary. This is a filter version of the C(dict) function. + options: + _input: + description: A list of tuples (with exactly two elements). + type: list + elements: tuple + required: true +''' + +EXAMPLES = ''' +- name: Convert list of tuples into dictionary + ansible.builtin.set_fact: + dictionary: "{{ [[1, 2], ['a', 'b']] | community.general.dict }}" + # Result is {1: 2, 'a': 'b'} + +- name: Create a list of dictionaries with map and the community.general.dict filter + ansible.builtin.debug: + msg: >- + {{ values | map('zip', ['k1', 'k2', 'k3']) + | map('map', 'reverse') + | map('community.general.dict') }} + vars: + values: + - - foo + - 23 + - a + - - bar + - 42 + - b + # Produces the following list of dictionaries: + # { + # "k1": "foo", + # "k2": 23, + # "k3": "a" + # }, + # { + # "k1": "bar", + # "k2": 42, + # "k3": "b" + # } +''' + +RETURN = ''' + _value: + description: Whether the module or action plugin denoted by the input exists. + type: boolean +''' + def dict_filter(sequence): '''Convert a list of tuples to a dictionary. diff --git a/plugins/filter/dict_kv.py b/plugins/filter/dict_kv.py index 7ce6c3e44a..1a0957819e 100644 --- a/plugins/filter/dict_kv.py +++ b/plugins/filter/dict_kv.py @@ -5,6 +5,38 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: dict_kv + short_description: Convert a value to a dictionary with a single key-value pair + version_added: 1.3.0 + author: Stanislav German-Evtushenko (@giner) + description: + - Convert a value to a dictionary with a single key-value pair. + positional: key + options: + _input: + description: The value for the single key-value pair. + type: any + required: true + key: + description: The key for the single key-value pair. + type: any + required: true +''' + +EXAMPLES = ''' +- name: Create a one-element dictionary from a value + ansible.builtin.debug: + msg: "{{ 'myvalue' | dict_kv('mykey') }}" + # Produces the dictionary {'mykey': 'myvalue'} +''' + +RETURN = ''' + _value: + description: A dictionary with a single key-value pair. + type: dictionary +''' + def dict_kv(value, key): '''Return a dictionary with a single key-value pair diff --git a/plugins/filter/from_csv.py b/plugins/filter/from_csv.py index b66d47699b..8043e36385 100644 --- a/plugins/filter/from_csv.py +++ b/plugins/filter/from_csv.py @@ -7,6 +7,78 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +DOCUMENTATION = ''' + name: from_csv + short_description: Converts CSV text input into list of dicts + version_added: 2.3.0 + author: Andrew Pantuso (@Ajpantuso) + description: + - Converts CSV text input into list of dictionaries. + options: + _input: + description: A string containing a CSV document. + type: string + required: true + dialect: + description: + - The CSV dialect to use when parsing the CSV file. + - Possible values include C(excel), C(excel-tab) or C(unix). + type: str + default: excel + fieldnames: + description: + - A list of field names for every column. + - This is needed if the CSV does not have a header. + type: list + elements: str + delimiter: + description: + - A one-character string used to separate fields. + - When using this parameter, you change the default value used by I(dialect). + - The default value depends on the dialect used. + type: str + skipinitialspace: + description: + - Whether to ignore any whitespaces immediately following the delimiter. + - When using this parameter, you change the default value used by I(dialect). + - The default value depends on the dialect used. + type: bool + strict: + description: + - Whether to raise an exception on bad CSV input. + - When using this parameter, you change the default value used by I(dialect). + - The default value depends on the dialect used. + type: bool +''' + +EXAMPLES = ''' +- name: Create a list of dictionaries with map and the community.general.dict filter + ansible.builtin.debug: + msg: >- + {{ csv_data | community.genera.from_csv(dialect='unix') }} + vars: + csv_data: | + Column 1,Value + foo,23 + bar,42 + # Produces the following list of dictionaries: + # { + # "Column 1": "foo", + # "Value": "23", + # }, + # { + # "Column 1": "bar", + # "Value": "42", + # } +''' + +RETURN = ''' + _value: + description: A list with one dictionary per row. + type: list + elements: dictionary +''' + from ansible.errors import AnsibleFilterError from ansible.module_utils.common.text.converters import to_native diff --git a/plugins/filter/groupby.py b/plugins/filter/groupby.py index a2a85aa905..386a8b44cf 100644 --- a/plugins/filter/groupby.py +++ b/plugins/filter/groupby.py @@ -5,6 +5,52 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: groupby_as_dict + short_description: Transform a sequence of dictionaries to a dictionary where the dictionaries are indexed by an attribute + version_added: 3.1.0 + author: Felix Fontein (@felixfontein) + description: + - Transform a sequence of dictionaries to a dictionary where the dictionaries are indexed by an attribute. + positional: attribute + options: + _input: + description: A list of dictionaries + type: list + elements: dictionary + required: true + attribute: + description: The attribute to use as the key. + type: str + required: true +''' + +EXAMPLES = ''' +- name: Arrange a list of dictionaries as a dictionary of dictionaries + ansible.builtin.debug: + msg: "{{ sequence | community.general.groupby_as_dict('key') }}" + vars: + sequence: + - key: value + foo: bar + - key: other_value + baz: bar + # Produces the following nested structure: + # + # value: + # key: value + # foo: bar + # other_value: + # key: other_value + # baz: bar +''' + +RETURN = ''' + _value: + description: A dictionary containing the dictionaries from the list as values. + type: dictionary +''' + from ansible.errors import AnsibleFilterError from ansible.module_utils.common._collections_compat import Mapping, Sequence diff --git a/plugins/filter/hashids_decode.yml b/plugins/filter/hashids_decode.yml new file mode 100644 index 0000000000..50e07abc8c --- /dev/null +++ b/plugins/filter/hashids_decode.yml @@ -0,0 +1,38 @@ +DOCUMENTATION: + name: hashids_decode + short_description: Decodes a sequence of numbers from a YouTube-like hash + version_added: 3.0.0 + author: Andrew Pantuso (@Ajpantuso) + description: + - Decodes a sequence of numbers from a YouTube-like hash. + options: + _input: + description: A YouTube-like hash. + type: string + required: true + salt: + description: + - String to use as salt when hashing. + type: str + default: excel + alphabet: + description: + - String of 16 or more unique characters to produce a hash. + type: list + elements: str + min_length: + description: + - Minimum length of hash produced. + type: integer + +EXAMPLES: | + - name: Convert hash to list of integers + ansible.builtin.debug: + msg: "{{ 'o2fXhV' | community.general.hashids_decode }}" + # Produces: [1, 2, 3] + +RETURN: + _value: + description: A list of integers. + type: list + elements: integer diff --git a/plugins/filter/hashids_encode.yml b/plugins/filter/hashids_encode.yml new file mode 100644 index 0000000000..69816aac30 --- /dev/null +++ b/plugins/filter/hashids_encode.yml @@ -0,0 +1,38 @@ +DOCUMENTATION: + name: hashids_encode + short_description: Encodes YouTube-like hashes from a sequence of integers + version_added: 3.0.0 + author: Andrew Pantuso (@Ajpantuso) + description: + - Encodes YouTube-like hashes from a sequence of integers. + options: + _input: + description: A list of integers. + type: list + elements: integer + required: true + salt: + description: + - String to use as salt when hashing. + type: str + default: excel + alphabet: + description: + - String of 16 or more unique characters to produce a hash. + type: list + elements: str + min_length: + description: + - Minimum length of hash produced. + type: integer + +EXAMPLES: | + - name: Convert list of integers to hash + ansible.builtin.debug: + msg: "{{ [1, 2, 3] | community.general.hashids_encode }}" + # Produces: 'o2fXhV' + +RETURN: + _value: + description: A YouTube-like hash. + type: string diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index f8fc4ac5bd..094da26632 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -21,6 +21,67 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: jc + short_description: Convert output of many shell commands and file-types to JSON + version_added: 1.1.0 + author: Kelly Brazil (@kellyjonbrazil) + description: + - Convert output of many shell commands and file-types to JSON. + - Uses the L(jc library,https://github.com/kellyjonbrazil/jc). + positional: parser + options: + _input: + description: The data to convert. + type: string + required: true + parser: + description: + - The correct parser for the input data. + - For exmaple C(ifconfig). + - See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers. + type: string + required: true + quiet: + description: Set to C(false) to not suppress warnings. + type: boolean + default: true + raw: + description: Set to C(true) to return pre-processed JSON. + type: boolean + default: false + requirements: + - jc (https://github.com/kellyjonbrazil/jc) +''' + +EXAMPLES = ''' +- name: Run command + ansible.builtin.command: uname -a + register: result + +- name: Convert command's result to JSON + ansible.builtin.debug: + msg: "{{ result.stdout | community.general.jc('uname') }}" + # Possible output: + # + # "msg": { + # "hardware_platform": "x86_64", + # "kernel_name": "Linux", + # "kernel_release": "4.15.0-112-generic", + # "kernel_version": "#113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020", + # "machine": "x86_64", + # "node_name": "kbrazil-ubuntu", + # "operating_system": "GNU/Linux", + # "processor": "x86_64" + # } +''' + +RETURN = ''' + _value: + description: The processed output. + type: any +''' + from ansible.errors import AnsibleError, AnsibleFilterError import importlib diff --git a/plugins/filter/json_query.py b/plugins/filter/json_query.py index 9c835e8c71..e7fb891c6c 100644 --- a/plugins/filter/json_query.py +++ b/plugins/filter/json_query.py @@ -19,6 +19,107 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: json_query + short_description: Select a single element or a data subset from a complex data structure + description: + - This filter lets you query a complex JSON structure and iterate over it using a loop structure. + positional: expr + options: + _input: + description: + - The JSON data to query. + type: any + required: true + expr: + description: + - The query expression. + - See U(http://jmespath.org/examples.html) for examples. + type: string + required: true + requirements: + - jmespath +''' + +EXAMPLES = ''' +- name: Define data to work on in the examples below + ansible.builtin.set_fact: + domain_definition: + domain: + cluster: + - name: cluster1 + - name: cluster2 + server: + - name: server11 + cluster: cluster1 + port: '8080' + - name: server12 + cluster: cluster1 + port: '8090' + - name: server21 + cluster: cluster2 + port: '9080' + - name: server22 + cluster: cluster2 + port: '9090' + library: + - name: lib1 + target: cluster1 + - name: lib2 + target: cluster2 + +- name: Display all cluster names + ansible.builtin.debug: + var: item + loop: "{{ domain_definition | community.general.json_query('domain.cluster[*].name') }}" + +- name: Display all server names + ansible.builtin.debug: + var: item + loop: "{{ domain_definition | community.general.json_query('domain.server[*].name') }}" + +- name: Display all ports from cluster1 + ansible.builtin.debug: + var: item + loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}" + vars: + server_name_cluster1_query: "domain.server[?cluster=='cluster1'].port" + +- name: Display all ports from cluster1 as a string + ansible.builtin.debug: + msg: "{{ domain_definition | community.general.json_query('domain.server[?cluster==`cluster1`].port') | join(', ') }}" + +- name: Display all ports from cluster1 + ansible.builtin.debug: + var: item + loop: "{{ domain_definition | community.general.json_query('domain.server[?cluster==''cluster1''].port') }}" + +- name: Display all server ports and names from cluster1 + ansible.builtin.debug: + var: item + loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}" + vars: + server_name_cluster1_query: "domain.server[?cluster=='cluster2'].{name: name, port: port}" + +- name: Display all ports from cluster1 + ansible.builtin.debug: + msg: "{{ domain_definition | to_json | from_json | community.general.json_query(server_name_query) }}" + vars: + server_name_query: "domain.server[?starts_with(name,'server1')].port" + +- name: Display all ports from cluster1 + ansible.builtin.debug: + msg: "{{ domain_definition | to_json | from_json | community.general.json_query(server_name_query) }}" + vars: + server_name_query: "domain.server[?contains(name,'server1')].port" +''' + +RETURN = ''' + _value: + description: Whether the module or action plugin denoted by the input exists. + type: any +''' + from ansible.errors import AnsibleError, AnsibleFilterError try: diff --git a/plugins/filter/list.py b/plugins/filter/list.py index 4b21fb95fa..f8190d609b 100644 --- a/plugins/filter/list.py +++ b/plugins/filter/list.py @@ -5,6 +5,97 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: lists_mergeby + short_description: Merge two or more lists of dictionaries by a given attribute + version_added: 2.0.0 + author: Vladimir Botka (@vbotka) + description: + - Merge two or more lists by attribute I(index). Optional parameters 'recursive' and 'list_merge' + control the merging of the lists in values. The function merge_hash from ansible.utils.vars + is used. To learn details on how to use the parameters 'recursive' and 'list_merge' see + Ansible User's Guide chapter "Using filters to manipulate data" section "Combining + hashes/dictionaries". + positional: another_list, index + options: + _input: + description: A list of dictionaries. + type: list + elements: dictionary + required: true + another_list: + description: Another list of dictionaries. This parameter can be specified multiple times. + type: list + elements: dictionary + index: + description: + - The dictionary key that must be present in every dictionary in every list that is used to + merge the lists. + type: string + required: true + recursive: + description: + - Should the combine recursively merge nested dictionaries (hashes). + - "B(Note:) It does not depend on the value of the C(hash_behaviour) setting in C(ansible.cfg)." + type: boolean + default: false + list_merge: + description: + - Modifies the behaviour when the dictionaries (hashes) to merge contain arrays/lists. + type: string + default: replace + choices: + - replace + - keep + - append + - prepend + - append_rp + - prepend_rp +''' + +EXAMPLES = ''' +- name: Create a list of dictionaries with map and the community.general.dict filter + ansible.builtin.debug: + msg: >- + {{ list1 | community.general.lists_mergeby( + list2, + 'index', + recursive=True, + list_merge='append' + ) }}" + vars: + list1: + - index: a + value: 123 + - index: b + value: 42 + list2: + - index: a + foo: bar + - index: c + foo: baz + # Produces the following list of dictionaries: + # { + # "index": "a", + # "foo": "bar", + # "value": 123 + # }, + # { + # "index": "b", + # "value": 42 + # }, + # { + # "index": "c", + # "foo": "baz" + # } +''' + +RETURN = ''' + _value: + description: Whether the module or action plugin denoted by the input exists. + type: boolean +''' + from ansible.errors import AnsibleFilterError from ansible.module_utils.six import string_types from ansible.module_utils.common._collections_compat import Mapping, Sequence diff --git a/plugins/filter/random_mac.py b/plugins/filter/random_mac.py index fdcff4d9da..544cd0aa0b 100644 --- a/plugins/filter/random_mac.py +++ b/plugins/filter/random_mac.py @@ -40,15 +40,21 @@ DOCUMENTATION = ''' EXAMPLES = ''' - name: Random MAC given a prefix - debug: + ansible.builtin.debug: msg: "{{ '52:54:00' | community.general.random_mac }}" # => '52:54:00:ef:1c:03' - name: With a seed - debug: + ansible.builtin.debug: msg: "{{ '52:54:00' | community.general.random_mac(seed=inventory_hostname) }}" ''' +RETURN = ''' + _value: + description: The generated MAC. + type: string +''' + import re from random import Random, SystemRandom diff --git a/plugins/filter/to_days.yml b/plugins/filter/to_days.yml new file mode 100644 index 0000000000..e06c9463dc --- /dev/null +++ b/plugins/filter/to_days.yml @@ -0,0 +1,40 @@ +DOCUMENTATION: + name: to_days + short_description: Converte a duration string to days + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to days. + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into days + ansible.builtin.debug: + msg: "{{ '1y 7m 5d 30h' | community.general.to_days }}" + +RETURN: + _value: + description: Number of days. + type: float diff --git a/plugins/filter/to_hours.yml b/plugins/filter/to_hours.yml new file mode 100644 index 0000000000..976c3a6adf --- /dev/null +++ b/plugins/filter/to_hours.yml @@ -0,0 +1,40 @@ +DOCUMENTATION: + name: to_hours + short_description: Converte a duration string to hours + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to hours. + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into hours + ansible.builtin.debug: + msg: "{{ '7d 30h 20m 10s 123ms' | community.general.to_hours }}" + +RETURN: + _value: + description: Number of hours. + type: float diff --git a/plugins/filter/to_milliseconds.yml b/plugins/filter/to_milliseconds.yml new file mode 100644 index 0000000000..a4c59ce958 --- /dev/null +++ b/plugins/filter/to_milliseconds.yml @@ -0,0 +1,40 @@ +DOCUMENTATION: + name: to_milliseconds + short_description: Converte a duration string to milliseconds + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to milliseconds. + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into milliseconds + ansible.builtin.debug: + msg: "{{ '30h 20m 10s 123ms' | community.general.to_milliseconds }}" + +RETURN: + _value: + description: Number of milliseconds. + type: float diff --git a/plugins/filter/to_minutes.yml b/plugins/filter/to_minutes.yml new file mode 100644 index 0000000000..7dfeada29f --- /dev/null +++ b/plugins/filter/to_minutes.yml @@ -0,0 +1,40 @@ +DOCUMENTATION: + name: to_minutes + short_description: Converte a duration string to minutes + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to minutes. + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into minutes + ansible.builtin.debug: + msg: "{{ '30h 20m 10s 123ms' | community.general.to_minutes }}" + +RETURN: + _value: + description: Number of minutes. + type: float diff --git a/plugins/filter/to_months.yml b/plugins/filter/to_months.yml new file mode 100644 index 0000000000..84a94d2526 --- /dev/null +++ b/plugins/filter/to_months.yml @@ -0,0 +1,40 @@ +DOCUMENTATION: + name: to_months + short_description: Converte a duration string to months + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to months. + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into months + ansible.builtin.debug: + msg: "{{ '1y 7m 5d 30h' | community.general.to_months }}" + +RETURN: + _value: + description: Number of months. + type: float diff --git a/plugins/filter/to_seconds.yml b/plugins/filter/to_seconds.yml index af6ae82b09..0b09e98456 100644 --- a/plugins/filter/to_seconds.yml +++ b/plugins/filter/to_seconds.yml @@ -1,9 +1,9 @@ DOCUMENTATION: - name: community.general.to_seconds - short_description: Converte a date/time string to seconds + name: to_seconds + short_description: Converte a duration string to seconds version_added: 0.2.0 description: - - Parse a human readable time string and convert to seconds. + - Parse a human readable time duration string and convert to seconds. options: _input: description: @@ -26,12 +26,12 @@ DOCUMENTATION: - Number of days per month. default: 30 type: float - authors: + author: - René Moser (@resmo) EXAMPLES: | - name: Convert a duration into seconds - debug: + ansible.builtin.debug: msg: "{{ '30h 20m 10s 123ms' | community.general.to_seconds }}" RETURN: diff --git a/plugins/filter/to_time_unit.yml b/plugins/filter/to_time_unit.yml new file mode 100644 index 0000000000..43debef917 --- /dev/null +++ b/plugins/filter/to_time_unit.yml @@ -0,0 +1,85 @@ +DOCUMENTATION: + name: to_time_unit + short_description: Converte a duration string to the given time unit + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to the given time unit. + positional: unit + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + unit: + description: + - Time unit to convert the duration to. + default: ms + choices: + - millisecond + - milliseconds + - ms + - msec + - msecs + - msecond + - mseconds + - s + - sec + - secs + - second + - seconds + - h + - hour + - hours + - hs + - m + - min + - mins + - minute + - minutes + - ms + - d + - ds + - day + - days + - w + - ws + - week + - weeks + - mo + - mos + - month + - months + - y + - ys + - year + - years + type: string + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into seconds + ansible.builtin.debug: + msg: "{{ '1053d 17h 53m -10s 391ms' | community.general.to_time_unit('s') }}" + +RETURN: + _value: + description: Number of time units. + type: float diff --git a/plugins/filter/to_weeks.yml b/plugins/filter/to_weeks.yml new file mode 100644 index 0000000000..4626e35662 --- /dev/null +++ b/plugins/filter/to_weeks.yml @@ -0,0 +1,40 @@ +DOCUMENTATION: + name: to_weeks + short_description: Converte a duration string to weeks + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to weeks. + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into weeks + ansible.builtin.debug: + msg: "{{ '1y 7m 5d 30h' | community.general.to_weeks }}" + +RETURN: + _value: + description: Number of weeks. + type: float diff --git a/plugins/filter/to_years.yml b/plugins/filter/to_years.yml new file mode 100644 index 0000000000..4fb54b8753 --- /dev/null +++ b/plugins/filter/to_years.yml @@ -0,0 +1,40 @@ +DOCUMENTATION: + name: to_years + short_description: Converte a duration string to years + version_added: 0.2.0 + description: + - Parse a human readable time duration string and convert to years. + options: + _input: + description: + - The time string to convert. + - Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week, + C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec) + and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s) + can be added to a unit as well, so C(seconds) is the same as C(second). + - Valid strings are space separated combinations of an integer with an optional minus sign and a unit. + - Examples are C(1h), C(-5m), and C(3h -5m 6s). + type: string + required: true + year: + description: + - Number of days per year. + default: 365 + type: float + month: + description: + - Number of days per month. + default: 30 + type: float + author: + - René Moser (@resmo) + +EXAMPLES: | + - name: Convert a duration into years + ansible.builtin.debug: + msg: "{{ '1053d 30h' | community.general.to_years }}" + +RETURN: + _value: + description: Number of years. + type: float diff --git a/plugins/filter/unicode_normalize.py b/plugins/filter/unicode_normalize.py index 9afbf29e3f..30aed2005a 100644 --- a/plugins/filter/unicode_normalize.py +++ b/plugins/filter/unicode_normalize.py @@ -6,6 +6,46 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +DOCUMENTATION = ''' + name: unicode_normalize + short_description: Normalizes unicode strings to facilitate comparison of characters with normalized forms + version_added: 3.7.0 + author: Andrew Pantuso (@Ajpantuso) + description: + - Normalizes unicode strings to facilitate comparison of characters with normalized forms. + positional: form + options: + _input: + description: A unicode string. + type: string + required: true + form: + description: + - The normal form to use. + - See U(https://docs.python.org/3/library/unicodedata.html#unicodedata.normalize) for details. + type: string + default: NFC + choices: + - NFC + - NFD + - NFKC + - NFKD +''' + +EXAMPLES = ''' +- name: Normalize unicode string + ansible.builtin.set_fact: + dictionary: "{{ 'ä' | community.general.unicode_normalize('NFKD') }}" + # The resulting string has length 2: one letter is 'a', the other + # the diacritic combiner. +''' + +RETURN = ''' + _value: + description: The normalized unicode string of the specified normal form. + type: string +''' + from unicodedata import normalize from ansible.errors import AnsibleFilterError, AnsibleFilterTypeError diff --git a/plugins/filter/version_sort.py b/plugins/filter/version_sort.py index ac62ef8c8f..9d21691085 100644 --- a/plugins/filter/version_sort.py +++ b/plugins/filter/version_sort.py @@ -5,6 +5,35 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: version_sort + short_description: Sort a list according to version order instead of pure alphabetical one + version_added: 2.2.0 + author: Eric L. (@ericzolf) + description: + - Sort a list according to version order instead of pure alphabetical one. + options: + _input: + description: A list of strings to sort. + type: list + elements: string + required: true +''' + +EXAMPLES = ''' +- name: Convert list of tuples into dictionary + ansible.builtin.set_fact: + dictionary: "{{ ['2.1', '2.10', '2.9'] | community.general.version_sort }}" + # Result is ['2.1', '2.9', '2.10'] +''' + +RETURN = ''' + _value: + description: The list of strings sorted by version. + type: list + elements: string +''' + from ansible_collections.community.general.plugins.module_utils.version import LooseVersion diff --git a/plugins/lookup/cyberarkpassword.py b/plugins/lookup/cyberarkpassword.py index 80323c10fd..663ec38808 100644 --- a/plugins/lookup/cyberarkpassword.py +++ b/plugins/lookup/cyberarkpassword.py @@ -57,14 +57,19 @@ EXAMPLES = """ """ RETURN = """ - password: - description: - - The actual value stored - passprops: - description: properties assigned to the entry - type: dictionary - passwordchangeinprocess: - description: did the password change? +_result: + description: A list containing one dictionary. + type: list + elements: dictionary + contains: + password: + description: + - The actual value stored + passprops: + description: properties assigned to the entry + type: dictionary + passwordchangeinprocess: + description: did the password change? """ import os diff --git a/plugins/modules/files/read_csv.py b/plugins/modules/files/read_csv.py index 2d5644db2e..484a365e4c 100644 --- a/plugins/modules/files/read_csv.py +++ b/plugins/modules/files/read_csv.py @@ -48,19 +48,19 @@ options: delimiter: description: - A one-character string used to separate fields. - - When using this parameter, you change the default value used by C(dialect). + - When using this parameter, you change the default value used by I(dialect). - The default value depends on the dialect used. type: str skipinitialspace: description: - Whether to ignore any whitespaces immediately following the delimiter. - - When using this parameter, you change the default value used by C(dialect). + - When using this parameter, you change the default value used by I(dialect). - The default value depends on the dialect used. type: bool strict: description: - Whether to raise an exception on bad CSV input. - - When using this parameter, you change the default value used by C(dialect). + - When using this parameter, you change the default value used by I(dialect). - The default value depends on the dialect used. type: bool notes: diff --git a/plugins/test/a_module.py b/plugins/test/a_module.py index 565d1a14a2..ee5fdcacbc 100644 --- a/plugins/test/a_module.py +++ b/plugins/test/a_module.py @@ -4,6 +4,39 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +DOCUMENTATION = ''' + name: a_module + short_description: Test whether a given string refers to an existing module or action plugin + version_added: 4.0.0 + author: Felix Fontein (@felixfontein) + description: + - Test whether a given string refers to an existing module or action plugin. + - This can be useful in roles, which can use this to ensure that required modules are present ahead of time. + options: + _input: + description: A string denoting a fully qualified collection name (FQCN) of a module or action plugin. + type: string + required: true +''' + +EXAMPLES = ''' +- name: Make sure that community.aws.route53 is available + ansible.builtin.assert: + that: + - > + 'community.aws.route53' is community.general.a_module + +- name: Make sure that community.general.does_not_exist is not a module or action plugin + ansible.builtin.assert: + that: + - "'community.general.does_not_exist' is not community.general.a_module" +''' + +RETURN = ''' + _value: + description: Whether the module or action plugin denoted by the input exists. + type: boolean +''' from ansible.plugins.loader import action_loader, module_loader From 5cb7c2e45ec1be1d3ab64072ace9a21330823f78 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 2 May 2022 07:49:49 +0200 Subject: [PATCH 0003/2104] Small fixes. (#4605) --- plugins/filter/dict.py | 2 +- plugins/filter/from_csv.py | 2 +- plugins/filter/json_query.py | 2 +- plugins/filter/list.py | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/filter/dict.py b/plugins/filter/dict.py index f18ec1bc24..866e8f8dc2 100644 --- a/plugins/filter/dict.py +++ b/plugins/filter/dict.py @@ -56,7 +56,7 @@ EXAMPLES = ''' RETURN = ''' _value: - description: Whether the module or action plugin denoted by the input exists. + description: The dictionary having the provided key-value pairs. type: boolean ''' diff --git a/plugins/filter/from_csv.py b/plugins/filter/from_csv.py index 8043e36385..269cba046f 100644 --- a/plugins/filter/from_csv.py +++ b/plugins/filter/from_csv.py @@ -52,7 +52,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' -- name: Create a list of dictionaries with map and the community.general.dict filter +- name: Parse a CSV file's contents ansible.builtin.debug: msg: >- {{ csv_data | community.genera.from_csv(dialect='unix') }} diff --git a/plugins/filter/json_query.py b/plugins/filter/json_query.py index e7fb891c6c..7b04455181 100644 --- a/plugins/filter/json_query.py +++ b/plugins/filter/json_query.py @@ -116,7 +116,7 @@ EXAMPLES = ''' RETURN = ''' _value: - description: Whether the module or action plugin denoted by the input exists. + description: The result of the query. type: any ''' diff --git a/plugins/filter/list.py b/plugins/filter/list.py index f8190d609b..4848cc8785 100644 --- a/plugins/filter/list.py +++ b/plugins/filter/list.py @@ -54,7 +54,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' -- name: Create a list of dictionaries with map and the community.general.dict filter +- name: Merge two lists ansible.builtin.debug: msg: >- {{ list1 | community.general.lists_mergeby( @@ -92,8 +92,9 @@ EXAMPLES = ''' RETURN = ''' _value: - description: Whether the module or action plugin denoted by the input exists. - type: boolean + description: The merged list. + type: list + elements: dictionary ''' from ansible.errors import AnsibleFilterError From 8d375916052365710757794f5567a6ad9aa566d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Tue, 3 May 2022 17:46:36 +0200 Subject: [PATCH 0004/2104] doc: time_filter: fix duplicate (#4611) --- plugins/filter/to_time_unit.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/filter/to_time_unit.yml b/plugins/filter/to_time_unit.yml index 43debef917..436a4d6a80 100644 --- a/plugins/filter/to_time_unit.yml +++ b/plugins/filter/to_time_unit.yml @@ -43,7 +43,6 @@ DOCUMENTATION: - mins - minute - minutes - - ms - d - ds - day From dd9afc09a8bab0b8482a71104954182897ef0218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Wed, 4 May 2022 07:38:16 +0200 Subject: [PATCH 0005/2104] time_filter: allow 0 to return 0 (#4612) * time_filter: allow 0 to return 0 * add changelog * Update changelogs/fragments/4612-time_filter_zero.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4612-time_filter_zero.yml | 2 ++ plugins/filter/time.py | 5 +++++ tests/integration/targets/filter_time/tasks/main.yml | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 changelogs/fragments/4612-time_filter_zero.yml diff --git a/changelogs/fragments/4612-time_filter_zero.yml b/changelogs/fragments/4612-time_filter_zero.yml new file mode 100644 index 0000000000..8129725055 --- /dev/null +++ b/changelogs/fragments/4612-time_filter_zero.yml @@ -0,0 +1,2 @@ +minor_changes: + - to_time_unit filter plugins - the time filters has been extended to also allow ``0`` as input (https://github.com/ansible-collections/community.general/pull/4612). diff --git a/plugins/filter/time.py b/plugins/filter/time.py index 3b44ad0e49..f069780fe7 100644 --- a/plugins/filter/time.py +++ b/plugins/filter/time.py @@ -46,6 +46,11 @@ def multiply(factors): def to_time_unit(human_time, unit='ms', **kwargs): ''' Return a time unit from a human readable string ''' + + # No need to handle 0 + if human_time == "0": + return 0 + unit_to_short_form = UNIT_TO_SHORT_FORM unit_factors = UNIT_FACTORS diff --git a/tests/integration/targets/filter_time/tasks/main.yml b/tests/integration/targets/filter_time/tasks/main.yml index b3e8a55d14..7f0d092f34 100644 --- a/tests/integration/targets/filter_time/tasks/main.yml +++ b/tests/integration/targets/filter_time/tasks/main.yml @@ -4,6 +4,13 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +- name: test zero is 0 + assert: + that: + - "('0' | community.general.to_milliseconds) == 0" + - "('0' | community.general.to_seconds) == 0" + - "('0' | community.general.to_minutes) == 0" + - name: test to_milliseconds filter assert: that: From f8889d1dd82191afd045be5ec965b50ae96525d5 Mon Sep 17 00:00:00 2001 From: Adam Robinson Date: Thu, 5 May 2022 01:56:26 -0400 Subject: [PATCH 0006/2104] redfish_command: VirtualMediaInsert does not work with HPE iLO4 (#4596) * Inserted not supported in patch on some hardware Signed-off-by: Adam Robinson * return error for ilo4 options with no defaults * Update changelog Co-authored-by: Felix Fontein * make virtual_media_insert_via_patch backwards compatible Co-authored-by: Felix Fontein * remove ilo 4 specific properties check * return ExtendedInfo as a string if no Message * only worry about Inserted and WriteProtected * update changelog * fix for PEP8 * fix up comments * fix VirtualMediaEject for iLO4 as well * update changlog Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../4595-fix-VirtualMediaInsert-iLO4.yml | 10 +++++ plugins/module_utils/redfish_utils.py | 42 ++++++++++++++++--- 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml diff --git a/changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml b/changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml new file mode 100644 index 0000000000..ae632e08a4 --- /dev/null +++ b/changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml @@ -0,0 +1,10 @@ +bugfixes: + - redfish_command - the iLO4 Redfish implementation only supports the ``image_url`` parameter in + the underlying API calls to ``VirtualMediaInsert`` and ``VirtualMediaEject``. Any values set + (or the defaults) for ``write_protected`` or ``inserted`` will be ignored + (https://github.com/ansible-collections/community.general/pull/4596). +minor_changes: + - redfish_* modules - the contents of ``@Message.ExtendedInfo`` will be returned as a string in the event + that ``@Message.ExtendedInfo.Messages`` does not exist. This is likely more useful than the + standard HTTP error + (https://github.com/ansible-collections/community.general/pull/4596). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 5c7cff4a09..31750861f7 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -188,7 +188,12 @@ class RedfishUtils(object): body = error.read().decode('utf-8') data = json.loads(body) ext_info = data['error']['@Message.ExtendedInfo'] - msg = ext_info[0]['Message'] + # if the ExtendedInfo contains a user friendly message send it + # otherwise try to send the entire contents of ExtendedInfo + try: + msg = ext_info[0]['Message'] + except Exception: + msg = str(data['error']['@Message.ExtendedInfo']) except Exception: pass return msg @@ -2236,7 +2241,7 @@ class RedfishUtils(object): payload[param] = options.get(option) return payload - def virtual_media_insert_via_patch(self, options, param_map, uri, data): + def virtual_media_insert_via_patch(self, options, param_map, uri, data, image_only=False): # get AllowableValues ai = dict((k[:-24], {'AllowableValues': v}) for k, v in data.items() @@ -2245,6 +2250,13 @@ class RedfishUtils(object): payload = self._insert_virt_media_payload(options, param_map, data, ai) if 'Inserted' not in payload: payload['Inserted'] = True + + # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation + # Inserted and WriteProtected are not writable + if image_only: + del payload['Inserted'] + del payload['WriteProtected'] + # PATCH the resource response = self.patch_request(self.root_uri + uri, payload) if response['ret'] is False: @@ -2260,6 +2272,7 @@ class RedfishUtils(object): 'TransferProtocolType': 'transfer_protocol_type', 'TransferMethod': 'transfer_method' } + image_only = False image_url = options.get('image_url') if not image_url: return {'ret': False, @@ -2273,6 +2286,12 @@ class RedfishUtils(object): data = response['data'] if 'VirtualMedia' not in data: return {'ret': False, 'msg': "VirtualMedia resource not found"} + + # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation + # Inserted and WriteProtected are not writable + if data["FirmwareVersion"].startswith("iLO 4"): + image_only = True + virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: @@ -2315,7 +2334,7 @@ class RedfishUtils(object): 'msg': "%s action not found and PATCH not allowed" % '#VirtualMedia.InsertMedia'} return self.virtual_media_insert_via_patch(options, param_map, - uri, data) + uri, data, image_only) # get the action property action = data['Actions']['#VirtualMedia.InsertMedia'] @@ -2334,12 +2353,18 @@ class RedfishUtils(object): return response return {'ret': True, 'changed': True, 'msg': "VirtualMedia inserted"} - def virtual_media_eject_via_patch(self, uri): + def virtual_media_eject_via_patch(self, uri, image_only=False): # construct payload payload = { 'Inserted': False, 'Image': None } + + # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation + # Inserted is not writable + if image_only: + del payload['Inserted'] + # PATCH resource response = self.patch_request(self.root_uri + uri, payload) if response['ret'] is False: @@ -2360,6 +2385,13 @@ class RedfishUtils(object): data = response['data'] if 'VirtualMedia' not in data: return {'ret': False, 'msg': "VirtualMedia resource not found"} + + # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation + # Inserted is not writable + image_only = False + if data["FirmwareVersion"].startswith("iLO 4"): + image_only = True + virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: @@ -2384,7 +2416,7 @@ class RedfishUtils(object): return {'ret': False, 'msg': "%s action not found and PATCH not allowed" % '#VirtualMedia.EjectMedia'} - return self.virtual_media_eject_via_patch(uri) + return self.virtual_media_eject_via_patch(uri, image_only) else: # POST to the EjectMedia Action action = data['Actions']['#VirtualMedia.EjectMedia'] From 9462506edc529bf43f3302f51c3b1b9b68709fd7 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 5 May 2022 08:03:49 +0200 Subject: [PATCH 0007/2104] Rename single-filter plugins so that the filename equals the filter name. (#4625) --- .github/BOTMETA.yml | 4 ++-- changelogs/fragments/4625-fix-filter-filenames.yml | 2 ++ plugins/filter/{groupby.py => groupby_as_dict.py} | 0 plugins/filter/{list.py => lists_mergeby.py} | 0 .../{filter_groupby => filter_groupby_as_dict}/aliases | 0 .../{filter_groupby => filter_groupby_as_dict}/tasks/main.yml | 0 .../{filter_groupby => filter_groupby_as_dict}/vars/main.yml | 0 .../targets/{filter_list => filter_lists_mergeby}/aliases | 0 .../tasks/lists_mergeby_2-10.yml | 0 .../tasks/lists_mergeby_default.yml | 0 .../{filter_list => filter_lists_mergeby}/tasks/main.yml | 0 .../{filter_list => filter_lists_mergeby}/vars/main.yml | 0 12 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/4625-fix-filter-filenames.yml rename plugins/filter/{groupby.py => groupby_as_dict.py} (100%) rename plugins/filter/{list.py => lists_mergeby.py} (100%) rename tests/integration/targets/{filter_groupby => filter_groupby_as_dict}/aliases (100%) rename tests/integration/targets/{filter_groupby => filter_groupby_as_dict}/tasks/main.yml (100%) rename tests/integration/targets/{filter_groupby => filter_groupby_as_dict}/vars/main.yml (100%) rename tests/integration/targets/{filter_list => filter_lists_mergeby}/aliases (100%) rename tests/integration/targets/{filter_list => filter_lists_mergeby}/tasks/lists_mergeby_2-10.yml (100%) rename tests/integration/targets/{filter_list => filter_lists_mergeby}/tasks/lists_mergeby_default.yml (100%) rename tests/integration/targets/{filter_list => filter_lists_mergeby}/tasks/main.yml (100%) rename tests/integration/targets/{filter_list => filter_lists_mergeby}/vars/main.yml (100%) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index d1a85c2cbb..ecedff1e81 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -126,7 +126,7 @@ files: maintainers: giner $filters/from_csv.py: maintainers: Ajpantuso - $filters/groupby.py: + $filters/groupby_as_dict.py: maintainers: felixfontein $filters/hashids.py: maintainers: Ajpantuso @@ -137,7 +137,7 @@ files: $filters/jc.py: maintainers: kellyjonbrazil $filters/json_query.py: {} - $filters/list.py: + $filters/lists_mergeby.py: maintainers: vbotka $filters/random_mac.py: {} $filters/time.py: diff --git a/changelogs/fragments/4625-fix-filter-filenames.yml b/changelogs/fragments/4625-fix-filter-filenames.yml new file mode 100644 index 0000000000..d3c0eb5f92 --- /dev/null +++ b/changelogs/fragments/4625-fix-filter-filenames.yml @@ -0,0 +1,2 @@ +breaking_changes: + - "lists_mergeby and groupby_as_dict filter plugins - adjust filter plugin filename. This change is not visible to end-users, it only affects possible other collections importing Python paths (https://github.com/ansible-collections/community.general/pull/4625)." diff --git a/plugins/filter/groupby.py b/plugins/filter/groupby_as_dict.py similarity index 100% rename from plugins/filter/groupby.py rename to plugins/filter/groupby_as_dict.py diff --git a/plugins/filter/list.py b/plugins/filter/lists_mergeby.py similarity index 100% rename from plugins/filter/list.py rename to plugins/filter/lists_mergeby.py diff --git a/tests/integration/targets/filter_groupby/aliases b/tests/integration/targets/filter_groupby_as_dict/aliases similarity index 100% rename from tests/integration/targets/filter_groupby/aliases rename to tests/integration/targets/filter_groupby_as_dict/aliases diff --git a/tests/integration/targets/filter_groupby/tasks/main.yml b/tests/integration/targets/filter_groupby_as_dict/tasks/main.yml similarity index 100% rename from tests/integration/targets/filter_groupby/tasks/main.yml rename to tests/integration/targets/filter_groupby_as_dict/tasks/main.yml diff --git a/tests/integration/targets/filter_groupby/vars/main.yml b/tests/integration/targets/filter_groupby_as_dict/vars/main.yml similarity index 100% rename from tests/integration/targets/filter_groupby/vars/main.yml rename to tests/integration/targets/filter_groupby_as_dict/vars/main.yml diff --git a/tests/integration/targets/filter_list/aliases b/tests/integration/targets/filter_lists_mergeby/aliases similarity index 100% rename from tests/integration/targets/filter_list/aliases rename to tests/integration/targets/filter_lists_mergeby/aliases diff --git a/tests/integration/targets/filter_list/tasks/lists_mergeby_2-10.yml b/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_2-10.yml similarity index 100% rename from tests/integration/targets/filter_list/tasks/lists_mergeby_2-10.yml rename to tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_2-10.yml diff --git a/tests/integration/targets/filter_list/tasks/lists_mergeby_default.yml b/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_default.yml similarity index 100% rename from tests/integration/targets/filter_list/tasks/lists_mergeby_default.yml rename to tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_default.yml diff --git a/tests/integration/targets/filter_list/tasks/main.yml b/tests/integration/targets/filter_lists_mergeby/tasks/main.yml similarity index 100% rename from tests/integration/targets/filter_list/tasks/main.yml rename to tests/integration/targets/filter_lists_mergeby/tasks/main.yml diff --git a/tests/integration/targets/filter_list/vars/main.yml b/tests/integration/targets/filter_lists_mergeby/vars/main.yml similarity index 100% rename from tests/integration/targets/filter_list/vars/main.yml rename to tests/integration/targets/filter_lists_mergeby/vars/main.yml From b711038b3bb830c3e4d765df912bb5e0140209c9 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 5 May 2022 08:18:04 +0200 Subject: [PATCH 0008/2104] dig lookup: deprecate DLV record type (#4618) * Deprecate DLV record type. * Use correct name. --- changelogs/fragments/4618-dig-dlv.yml | 2 ++ plugins/lookup/dig.py | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4618-dig-dlv.yml diff --git a/changelogs/fragments/4618-dig-dlv.yml b/changelogs/fragments/4618-dig-dlv.yml new file mode 100644 index 0000000000..bc082d4093 --- /dev/null +++ b/changelogs/fragments/4618-dig-dlv.yml @@ -0,0 +1,2 @@ +deprecated_features: + - "dig lookup plugin - the ``DLV`` record type has been decommissioned in 2017 and support for it will be removed from community.general 6.0.0 (https://github.com/ansible-collections/community.general/pull/4618)." diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index 19ded61de7..291bac5e45 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -27,13 +27,15 @@ DOCUMENTATION = ''' This needs to be passed-in as an additional parameter to the lookup options: _terms: - description: domain(s) to query + description: Domain(s) to query. qtype: - description: record type to query + description: + - Record type to query. + - C(DLV) is deprecated and will be removed in community.general 6.0.0. default: 'A' choices: [A, ALL, AAAA, CNAME, DNAME, DLV, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT] flat: - description: If 0 each record is returned as a dictionary, otherwise a string + description: If 0 each record is returned as a dictionary, otherwise a string. default: 1 retry_servfail: description: Retry a nameserver if it returns SERVFAIL. @@ -163,6 +165,7 @@ RETURN = """ from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase from ansible.module_utils.common.text.converters import to_native +from ansible.utils.display import Display import socket try: @@ -178,6 +181,9 @@ except ImportError: HAVE_DNS = False +display = Display() + + def make_rdata_dict(rdata): ''' While the 'dig' lookup plugin supports anything which dnspython supports out of the box, the following supported_types list describes which @@ -326,6 +332,11 @@ class LookupModule(LookupBase): ret = [] + if qtype.upper() == 'DLV': + display.deprecated('The DLV record type has been decommissioned in 2017 and support for' + ' it will be removed from community.general 6.0.0', + version='6.0.0', collection_name='community.general') + if qtype.upper() == 'PTR': try: n = dns.reversename.from_address(domain) From 841b46ff6ad4a3853a908f78baf566bc9713ea42 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 5 May 2022 07:21:16 +0100 Subject: [PATCH 0009/2104] [opentelemetry][callback] fix warning when using the include_tasks (#4623) * opentelemetry: fix include_tasks missing _task_fields * opentelemetry: add uts for the include_tasks * opentelemetry: add changelog fragment * pep8: fix spaces --- .../4623-opentelemetry_bug_fix_include_tasks.yml | 2 ++ plugins/callback/opentelemetry.py | 2 +- .../unit/plugins/callback/test_opentelemetry.py | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml diff --git a/changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml b/changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml new file mode 100644 index 0000000000..a18ba62ef5 --- /dev/null +++ b/changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml @@ -0,0 +1,2 @@ +bugfixes: + - opentelemetry callback plugin - fix warning for the include_tasks (https://github.com/ansible-collections/community.general/pull/4623). diff --git a/plugins/callback/opentelemetry.py b/plugins/callback/opentelemetry.py index 8ef2ae3f4d..9da5179399 100644 --- a/plugins/callback/opentelemetry.py +++ b/plugins/callback/opentelemetry.py @@ -197,7 +197,7 @@ class OpenTelemetrySource(object): task = tasks_data[task_uuid] - if self.ansible_version is None and result._task_fields['args'].get('_ansible_version'): + if self.ansible_version is None and hasattr(result, '_task_fields') and result._task_fields['args'].get('_ansible_version'): self.ansible_version = result._task_fields['args'].get('_ansible_version') task.add_host(HostData(host_uuid, host_name, status, result)) diff --git a/tests/unit/plugins/callback/test_opentelemetry.py b/tests/unit/plugins/callback/test_opentelemetry.py index 74d647252b..41700fbcb7 100644 --- a/tests/unit/plugins/callback/test_opentelemetry.py +++ b/tests/unit/plugins/callback/test_opentelemetry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # (C) 2021, Victor Martinez # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) @@ -91,6 +92,21 @@ class TestOpentelemetry(unittest.TestCase): self.assertEqual(host_data.uuid, 'include') self.assertEqual(host_data.name, 'include') self.assertEqual(host_data.status, 'ok') + self.assertEqual(self.opentelemetry.ansible_version, None) + + def test_finish_task_include_with_ansible_version(self): + task_fields = {'args': {'_ansible_version': '1.2.3'}} + result = TaskResult(host=None, task=self.mock_task, return_data={}, task_fields=task_fields) + tasks_data = OrderedDict() + tasks_data['myuuid'] = self.my_task + + self.opentelemetry.finish_task( + tasks_data, + 'ok', + result + ) + + self.assertEqual(self.opentelemetry.ansible_version, '1.2.3') def test_get_error_message(self): test_cases = ( From 5a8422c8cbc1b49394741281406a949f0751a152 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 5 May 2022 18:23:00 +1200 Subject: [PATCH 0010/2104] consul: fixed bug in ConsulService when storing checks (#4590) * consul: fixed bug in ConsulService when storing checks * added changelog fragment * typo --- .../4590-consul-fix-service-checks.yaml | 2 ++ plugins/modules/clustering/consul/consul.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/4590-consul-fix-service-checks.yaml diff --git a/changelogs/fragments/4590-consul-fix-service-checks.yaml b/changelogs/fragments/4590-consul-fix-service-checks.yaml new file mode 100644 index 0000000000..42a5562a0e --- /dev/null +++ b/changelogs/fragments/4590-consul-fix-service-checks.yaml @@ -0,0 +1,2 @@ +bugfixes: + - consul - fixed bug where class ``ConsulService`` was overwriting the field ``checks``, preventing the addition of checks to a service (https://github.com/ansible-collections/community.general/pull/4590). diff --git a/plugins/modules/clustering/consul/consul.py b/plugins/modules/clustering/consul/consul.py index 9dc1a7713c..e06432b684 100644 --- a/plugins/modules/clustering/consul/consul.py +++ b/plugins/modules/clustering/consul/consul.py @@ -411,7 +411,7 @@ class ConsulService(object): self.address = address self.port = port self.tags = tags - self.checks = [] + self._checks = [] if loaded: self.id = loaded['ID'] self.name = loaded['Service'] @@ -424,8 +424,8 @@ class ConsulService(object): if self.port: optional['port'] = self.port - if len(self.checks) > 0: - optional['check'] = self.checks[0].check + if len(self._checks) > 0: + optional['check'] = self._checks[0].check consul_api.agent.service.register( self.name, @@ -435,13 +435,13 @@ class ConsulService(object): **optional) def add_check(self, check): - self.checks.append(check) + self._checks.append(check) def checks(self): - return self.checks + return self._checks def has_checks(self): - return len(self.checks) > 0 + return len(self._checks) > 0 def __eq__(self, other): return (isinstance(other, self.__class__) and @@ -459,8 +459,8 @@ class ConsulService(object): data['port'] = self.port if self.tags and len(self.tags) > 0: data['tags'] = self.tags - if len(self.checks) > 0: - data['check'] = self.checks[0].to_dict() + if len(self._checks) > 0: + data['check'] = self._checks[0].to_dict() return data From 532a26692c0eb07c582685a1d83eadc8723488fe Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 5 May 2022 18:23:52 +1200 Subject: [PATCH 0011/2104] vmadm: improvements (#4581) * improvements on vmadm * added changelog fragment * Update plugins/modules/cloud/smartos/vmadm.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/smartos/vmadm.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/smartos/vmadm.py Co-authored-by: Felix Fontein --- .../fragments/4581-vmadm-improvements.yaml | 2 + plugins/modules/cloud/smartos/vmadm.py | 40 +++++++------------ 2 files changed, 17 insertions(+), 25 deletions(-) create mode 100644 changelogs/fragments/4581-vmadm-improvements.yaml diff --git a/changelogs/fragments/4581-vmadm-improvements.yaml b/changelogs/fragments/4581-vmadm-improvements.yaml new file mode 100644 index 0000000000..e6b1778e0e --- /dev/null +++ b/changelogs/fragments/4581-vmadm-improvements.yaml @@ -0,0 +1,2 @@ +minor_changes: + - vmadm - minor refactoring and improvement on the module (https://github.com/ansible-collections/community.general/pull/4581). diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/cloud/smartos/vmadm.py index f2c57615b4..195adbafd2 100644 --- a/plugins/modules/cloud/smartos/vmadm.py +++ b/plugins/modules/cloud/smartos/vmadm.py @@ -415,7 +415,7 @@ from ansible.module_utils.common.text.converters import to_native def get_vm_prop(module, uuid, prop): # Lookup a property for the given VM. # Returns the property, or None if not found. - cmd = '{0} lookup -j -o {1} uuid={2}'.format(module.vmadm, prop, uuid) + cmd = [module.vmadm, 'lookup', '-j', '-o', prop, 'uuid={0}'.format(uuid)] (rc, stdout, stderr) = module.run_command(cmd) @@ -439,7 +439,7 @@ def get_vm_prop(module, uuid, prop): def get_vm_uuid(module, alias): # Lookup the uuid that goes with the given alias. # Returns the uuid or '' if not found. - cmd = '{0} lookup -j -o uuid alias={1}'.format(module.vmadm, alias) + cmd = [module.vmadm, 'lookup', '-j', '-o', 'uuid', 'alias={1}'.format(alias)] (rc, stdout, stderr) = module.run_command(cmd) @@ -466,7 +466,7 @@ def get_vm_uuid(module, alias): def get_all_vm_uuids(module): # Retrieve the UUIDs for all VMs. - cmd = '{0} lookup -j -o uuid'.format(module.vmadm) + cmd = [module.vmadm, 'lookup', '-j', '-o', 'uuid'] (rc, stdout, stderr) = module.run_command(cmd) @@ -520,6 +520,7 @@ def new_vm(module, uuid, vm_state): def vmadm_create_vm(module, payload_file): # Create a new VM using the provided payload. cmd = '{0} create -f {1}'.format(module.vmadm, payload_file) + cmd = [module.vmadm, 'create', '-f', payload_file] return module.run_command(cmd) @@ -541,20 +542,15 @@ def set_vm_state(module, vm_uuid, vm_state): 'rebooted': ['reboot', False] } - if p['force'] and cmds[vm_state][1]: - force = '-F' - else: - force = '' + command, forceable = cmds[vm_state] + force = ['-F'] if p['force'] and forceable else [] - cmd = 'vmadm {0} {1} {2}'.format(cmds[vm_state][0], force, vm_uuid) + cmd = [module.vmadm, command] + force + [vm_uuid] (rc, stdout, stderr) = module.run_command(cmd) match = re.match('^Successfully.*', stderr) - if match: - return True - else: - return False + return match is not None def create_payload(module, uuid): @@ -601,23 +597,17 @@ def vm_state_transition(module, uuid, vm_state): def is_valid_uuid(uuid): - if re.match('^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$', uuid, re.IGNORECASE): - return True - else: - return False + return re.match('^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$', uuid, re.IGNORECASE) is not None def validate_uuids(module): - # Perform basic UUID validation. - failed = [] + failed = [ + name + for name, pvalue in [(x, module.params[x]) for x in ['uuid', 'image_uuid']] + if pvalue and pvalue != '*' and not is_valid_uuid(pvalue) + ] - for u in [['uuid', module.params['uuid']], - ['image_uuid', module.params['image_uuid']]]: - if u[1] and u[1] != '*': - if not is_valid_uuid(u[1]): - failed.append(u[0]) - - if len(failed) > 0: + if failed: module.fail_json(msg='No valid UUID(s) found for: {0}'.format(", ".join(failed))) From 9f702946cdef908f114250f7d47601a77b85c7ff Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 5 May 2022 11:42:59 +0100 Subject: [PATCH 0012/2104] [opentelemetry][callback] fix hardcoded value for ansible_task_message (#4624) * [opentelemetry][callback] fix hardcoded value for ansible_task_message * opentelemetry: add changelog fragment --- .../fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml | 2 ++ plugins/callback/opentelemetry.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml diff --git a/changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml b/changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml new file mode 100644 index 0000000000..53d241eca8 --- /dev/null +++ b/changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml @@ -0,0 +1,2 @@ +bugfixes: + - opentelemetry callback plugin - fix task message attribute that is reported failed regardless of the task result (https://github.com/ansible-collections/community.general/pull/4624). diff --git a/plugins/callback/opentelemetry.py b/plugins/callback/opentelemetry.py index 9da5179399..1ea6e79622 100644 --- a/plugins/callback/opentelemetry.py +++ b/plugins/callback/opentelemetry.py @@ -258,8 +258,9 @@ class OpenTelemetrySource(object): else: res = host_data.result._result rc = res.get('rc', 0) - message = self.get_error_message(res) - enriched_error_message = self.enrich_error_message(res) + if host_data.status == 'failed': + message = self.get_error_message(res) + enriched_error_message = self.enrich_error_message(res) if host_data.status == 'failed': status = Status(status_code=StatusCode.ERROR, description=message) From 30780f66f29915409643578734238fed4dcf6b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Fri, 6 May 2022 17:31:42 +0200 Subject: [PATCH 0013/2104] ci: fix dependabot (#4635) --- .github/dependabot.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1cd413055f..23c4cb3b50 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,7 @@ +--- version: 2 updates: - package-ecosystem: "github-actions" directory: "/" - interval: - schedule: "weekly" + schedule: + interval: "weekly" From cf879443331b18a13911112d6b31a260888274e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 17:55:59 +0200 Subject: [PATCH 0014/2104] Bump actions/checkout from 2 to 3 (#4638) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 81884ac43f..2563a9b7f7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. From 720e0544f98334637779447c7454ce5ec821bcf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 17:56:45 +0200 Subject: [PATCH 0015/2104] Bump github/codeql-action from 1 to 2 (#4639) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2563a9b7f7..3b4a43eabf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,7 +24,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 # Override language selection by uncommenting this and choosing your languages # with: # languages: go, javascript, csharp, python, cpp, java @@ -32,7 +32,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -46,4 +46,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From 4b0245355eb0713421a293d4637d49c42efdb824 Mon Sep 17 00:00:00 2001 From: Andrea Tartaglia Date: Sun, 8 May 2022 07:45:15 +0100 Subject: [PATCH 0016/2104] change list.copy() with list[:] for py2 compat in terraform module (#4621) * change list.copy() with list[:] for py2 compat in terraform module * add changelog fragment * Update changelogs/fragments/4621-terraform-py2-compat.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4621-terraform-py2-compat.yml | 2 ++ plugins/modules/cloud/misc/terraform.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4621-terraform-py2-compat.yml diff --git a/changelogs/fragments/4621-terraform-py2-compat.yml b/changelogs/fragments/4621-terraform-py2-compat.yml new file mode 100644 index 0000000000..4bceafba6c --- /dev/null +++ b/changelogs/fragments/4621-terraform-py2-compat.yml @@ -0,0 +1,2 @@ +bugfixes: + - terraform - fix list initialization to support both Python 2 and Python 3 (https://github.com/ansible-collections/community.general/issues/4531). diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index 3c3662c6d2..4bdf559511 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -332,7 +332,7 @@ def build_plan(command, project_path, variables_args, state_file, targets, state if plan_path is None: f, plan_path = tempfile.mkstemp(suffix='.tfplan') - local_command = command.copy() + local_command = command[:] plan_command = [command[0], 'plan'] From e57fc54a109a999a09e2db6f477901db5a79058b Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Sun, 8 May 2022 08:45:55 +0200 Subject: [PATCH 0017/2104] Clarify ansible_pre_command_output (#4636) ##### SUMMARY Clarify what ansible_pre_command_output actually is ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr --- plugins/callback/logstash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/callback/logstash.py b/plugins/callback/logstash.py index d34928ff34..133010cbdb 100644 --- a/plugins/callback/logstash.py +++ b/plugins/callback/logstash.py @@ -45,7 +45,7 @@ DOCUMENTATION = r''' version_added: 1.0.0 default: ansible pre_command: - description: Executes command before run and result put to ansible_pre_command_output field. + description: Executes command before run and its result is added to the C(ansible_pre_command_output) logstash field. version_added: 2.0.0 ini: - section: callback_logstash From dc4cdb1a581a9b171e5b30a1ff055fbe9d3557ce Mon Sep 17 00:00:00 2001 From: nathannaveen <42319948+nathannaveen@users.noreply.github.com> Date: Sun, 8 May 2022 02:57:53 -0400 Subject: [PATCH 0018/2104] chore: Set permissions for GitHub actions (#4641) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3b4a43eabf..dfaf617752 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,9 +4,16 @@ on: schedule: - cron: '26 19 * * 1' +permissions: + contents: read + jobs: CodeQL-Build: + permissions: + actions: read # for github/codeql-action/init to get workflow details + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/autobuild to send a status report runs-on: ubuntu-latest steps: From b9266c31d0b29be5619e354e8651801e45cec054 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 8 May 2022 23:50:53 +1200 Subject: [PATCH 0019/2104] zfs: refactoring (#4650) * zfs: refactoring * added changelog fragment --- .../fragments/4650-zfs-improvements.yaml | 2 ++ plugins/modules/storage/zfs/zfs.py | 33 +++++++------------ 2 files changed, 13 insertions(+), 22 deletions(-) create mode 100644 changelogs/fragments/4650-zfs-improvements.yaml diff --git a/changelogs/fragments/4650-zfs-improvements.yaml b/changelogs/fragments/4650-zfs-improvements.yaml new file mode 100644 index 0000000000..96df5f5bcd --- /dev/null +++ b/changelogs/fragments/4650-zfs-improvements.yaml @@ -0,0 +1,2 @@ +minor_changes: + - zfs - minor refactoring in the code (https://github.com/ansible-collections/community.general/pull/4650). diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index a804753a16..e206a8f7ba 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -130,18 +130,15 @@ class Zfs(object): def exists(self): cmd = [self.zfs_cmd, 'list', '-t', 'all', self.name] - (rc, out, err) = self.module.run_command(' '.join(cmd)) - if rc == 0: - return True - else: - return False + rc, dummy, dummy = self.module.run_command(cmd) + return rc == 0 def create(self): if self.module.check_mode: self.changed = True return properties = self.properties - origin = self.module.params.get('origin', None) + origin = self.module.params.get('origin') cmd = [self.zfs_cmd] if "@" in self.name: @@ -167,31 +164,23 @@ class Zfs(object): if origin and action == 'clone': cmd.append(origin) cmd.append(self.name) - (rc, out, err) = self.module.run_command(' '.join(cmd)) - if rc == 0: - self.changed = True - else: - self.module.fail_json(msg=err) + self.module.run_command(cmd, check_rc=True) + self.changed = True def destroy(self): if self.module.check_mode: self.changed = True return cmd = [self.zfs_cmd, 'destroy', '-R', self.name] - (rc, out, err) = self.module.run_command(' '.join(cmd)) - if rc == 0: - self.changed = True - else: - self.module.fail_json(msg=err) + self.module.run_command(cmd, check_rc=True) + self.changed = True def set_property(self, prop, value): if self.module.check_mode: self.changed = True return cmd = [self.zfs_cmd, 'set', prop + '=' + str(value), self.name] - (rc, out, err) = self.module.run_command(cmd) - if rc != 0: - self.module.fail_json(msg=err) + self.module.run_command(cmd, check_rc=True) def set_properties_if_changed(self): diff = {'before': {'extra_zfs_properties': {}}, 'after': {'extra_zfs_properties': {}}} @@ -220,14 +209,14 @@ class Zfs(object): if self.enhanced_sharing: cmd += ['-e'] cmd += ['all', self.name] - rc, out, err = self.module.run_command(" ".join(cmd)) + rc, out, err = self.module.run_command(cmd) properties = dict() for line in out.splitlines(): prop, value, source = line.split('\t') # include source '-' so that creation-only properties are not removed # to avoids errors when the dataset already exists and the property is not changed # this scenario is most likely when the same playbook is run more than once - if source == 'local' or source == 'received' or source == '-': + if source in ('local', 'received', '-'): properties[prop] = value # Add alias for enhanced sharing properties if self.enhanced_sharing: @@ -242,7 +231,7 @@ def main(): argument_spec=dict( name=dict(type='str', required=True), state=dict(type='str', required=True, choices=['absent', 'present']), - origin=dict(type='str', default=None), + origin=dict(type='str'), extra_zfs_properties=dict(type='dict', default={}), ), supports_check_mode=True, From f17d2669fabd263b86a5db8a26d6641e904ca78a Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 8 May 2022 14:00:29 +0200 Subject: [PATCH 0020/2104] Disable failing test for CentOS 8. --- tests/integration/targets/cloud_init_data_facts/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml index d466ed0089..9565dc1199 100644 --- a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml @@ -15,6 +15,7 @@ when: - not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 14) - not (ansible_os_family == "Suse" and ansible_distribution_major_version|int != 42 and ansible_python.version.major != 3) + - not (ansible_distribution == "CentOS" and ansible_distribution_major_version|int == 8) # TODO: cannot start service - not (ansible_distribution == 'Archlinux') # TODO: package seems to be broken, cannot be downloaded from mirrors? - not (ansible_distribution == 'Alpine') # TODO: not sure what's wrong here, the module doesn't return what the tests expect block: From bca7f09b715ef6de87def4a9dcce2440aa91eb00 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 9 May 2022 17:10:49 +1200 Subject: [PATCH 0021/2104] ModuleHelper module utils: delegates unknown attributes to AnsibleModule (#4600) * ModuleHelper module util: delegates unknown attributes to AnsibleModule * added changelog fragment * delegate only a few selected attrs * Update plugins/module_utils/mh/base.py Co-authored-by: Felix Fontein * Update changelogs/fragments/4600-mh-delegate.yaml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4600-mh-delegate.yaml | 2 ++ plugins/module_utils/mh/base.py | 12 ++++++++++++ plugins/module_utils/mh/module_helper.py | 5 +++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/4600-mh-delegate.yaml diff --git a/changelogs/fragments/4600-mh-delegate.yaml b/changelogs/fragments/4600-mh-delegate.yaml new file mode 100644 index 0000000000..dadaefb0d7 --- /dev/null +++ b/changelogs/fragments/4600-mh-delegate.yaml @@ -0,0 +1,2 @@ +minor_changes: + - ModuleHelper module utils - ``ModuleHelperBase` now delegates the attributes ``check_mode``, ``get_bin_path``, ``warn``, and ``deprecate`` to the underlying ``AnsibleModule`` instance (https://github.com/ansible-collections/community.general/pull/4600). diff --git a/plugins/module_utils/mh/base.py b/plugins/module_utils/mh/base.py index 90c228b306..3d311de865 100644 --- a/plugins/module_utils/mh/base.py +++ b/plugins/module_utils/mh/base.py @@ -14,6 +14,9 @@ from ansible_collections.community.general.plugins.module_utils.mh.deco import m class ModuleHelperBase(object): module = None ModuleHelperException = _MHE + _delegated_to_module = ( + 'check_mode', 'get_bin_path', 'warn', 'deprecate', + ) def __init__(self, module=None): self._changed = False @@ -24,6 +27,15 @@ class ModuleHelperBase(object): if not isinstance(self.module, AnsibleModule): self.module = AnsibleModule(**self.module) + @property + def diff_mode(self): + return self.module._diff + + def __getattr__(self, attr): + if attr in self._delegated_to_module: + return getattr(self.module, attr) + raise AttributeError("ModuleHelperBase has no attribute '%s'" % (attr, )) + def __init_module__(self): pass diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 65842fd74e..71731411e0 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -44,7 +44,8 @@ class ModuleHelper(DeprecateAttrsMixin, VarsMixin, DependencyMixin, ModuleHelper version="6.0.0", collection_name="community.general", target=ModuleHelper, - module=self.module) + module=self.module, + ) def update_output(self, **kwargs): self.update_vars(meta={"output": True}, **kwargs) @@ -65,7 +66,7 @@ class ModuleHelper(DeprecateAttrsMixin, VarsMixin, DependencyMixin, ModuleHelper facts = self.vars.facts() if facts is not None: result['ansible_facts'] = {self.facts_name: facts} - if self.module._diff: + if self.diff_mode: diff = result.get('diff', {}) vars_diff = self.vars.diff() or {} result['diff'] = dict_merge(dict(diff), vars_diff) From 9e1af2d1bce7b30995b46a2fa2992a054c507e3a Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Mon, 9 May 2022 01:24:35 -0400 Subject: [PATCH 0022/2104] onepassword - Get first found config file (#4640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Get first found configuration file There are three valid places to get the configuration. https://developer.1password.com/docs/cli/about-biometric-unlock#remove-old-account-information * Use common config class * Add changelog fragment * Explicitly use new style classes for Python 2.7 compatibility This shouldn’t matter for lookups, but does matter for module_utils and modules since Python 2.7 is still supported on the managed node. * Update changelogs/fragments/4065-onepassword-config.yml Co-authored-by: Felix Fontein --- .../fragments/4065-onepassword-config.yml | 2 ++ plugins/lookup/onepassword.py | 13 +++++---- plugins/module_utils/onepassword.py | 29 +++++++++++++++++++ plugins/modules/identity/onepassword_info.py | 7 +++-- 4 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/4065-onepassword-config.yml create mode 100644 plugins/module_utils/onepassword.py diff --git a/changelogs/fragments/4065-onepassword-config.yml b/changelogs/fragments/4065-onepassword-config.yml new file mode 100644 index 0000000000..9d58a0e57f --- /dev/null +++ b/changelogs/fragments/4065-onepassword-config.yml @@ -0,0 +1,2 @@ +bugfixes: + - onepassword - search all valid configuration locations and use the first found (https://github.com/ansible-collections/community.general/pull/4640). diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index 9f97a90e71..e0be0cd27e 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -45,8 +45,8 @@ DOCUMENTATION = ''' description: Vault containing the item to retrieve (case-insensitive). If absent will search all vaults. notes: - This lookup will use an existing 1Password session if one exists. If not, and you have already - performed an initial sign in (meaning C(~/.op/config exists)), then only the C(master_password) is required. - You may optionally specify C(subdomain) in this scenario, otherwise the last used subdomain will be used by C(op). + performed an initial sign in (meaning C(~/.op/config), C(~/.config/op/config) or C(~/.config/.op/config) exists), then only the + C(master_password) is required. You may optionally specify C(subdomain) in this scenario, otherwise the last used subdomain will be used by C(op). - This lookup can perform an initial login by providing C(subdomain), C(username), C(secret_key), and C(master_password). - Due to the B(very) sensitive nature of these credentials, it is B(highly) recommended that you only pass in the minimal credentials needed at any given time. Also, store these credentials in an Ansible Vault using a key that is equal to or greater in strength @@ -105,12 +105,12 @@ from ansible.plugins.lookup import LookupBase from ansible.errors import AnsibleLookupError from ansible.module_utils.common.text.converters import to_bytes, to_text +from ansible_collections.community.general.plugins.module_utils.onepassword import OnePasswordConfig + class OnePass(object): - def __init__(self, path='op'): self.cli_path = path - self.config_file_path = os.path.expanduser('~/.op/config') self.logged_in = False self.token = None self.subdomain = None @@ -119,9 +119,11 @@ class OnePass(object): self.secret_key = None self.master_password = None + self._config = OnePasswordConfig() + def get_token(self): # If the config file exists, assume an initial signin has taken place and try basic sign in - if os.path.isfile(self.config_file_path): + if os.path.isfile(self._config.config_file_path): if not self.master_password: raise AnsibleLookupError('Unable to sign in to 1Password. master_password is required.') @@ -281,4 +283,5 @@ class LookupModule(LookupBase): values = [] for term in terms: values.append(op.get_field(term, field, section, vault)) + return values diff --git a/plugins/module_utils/onepassword.py b/plugins/module_utils/onepassword.py new file mode 100644 index 0000000000..3a86e22e16 --- /dev/null +++ b/plugins/module_utils/onepassword.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os + + +class OnePasswordConfig(object): + _config_file_paths = ( + "~/.op/config", + "~/.config/op/config", + "~/.config/.op/config", + ) + + def __init__(self): + self._config_file_path = "" + + @property + def config_file_path(self): + if self._config_file_path: + return self._config_file_path + + for path in self._config_file_paths: + realpath = os.path.expanduser(path) + if os.path.exists(realpath): + self._config_file_path = realpath + return self._config_file_path diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index 7170a33aed..6621092303 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -166,6 +166,8 @@ from subprocess import Popen, PIPE from ansible.module_utils.common.text.converters import to_bytes, to_native from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.onepassword import OnePasswordConfig + class AnsibleModuleError(Exception): def __init__(self, results): @@ -179,7 +181,6 @@ class OnePasswordInfo(object): def __init__(self): self.cli_path = module.params.get('cli_path') - self.config_file_path = '~/.op/config' self.auto_login = module.params.get('auto_login') self.logged_in = False self.token = None @@ -187,6 +188,8 @@ class OnePasswordInfo(object): terms = module.params.get('search_terms') self.terms = self.parse_search_terms(terms) + self._config = OnePasswordConfig() + def _run(self, args, expected_rc=0, command_input=None, ignore_errors=False): if self.token: # Adds the session token to all commands if we're logged in. @@ -299,7 +302,7 @@ class OnePasswordInfo(object): def get_token(self): # If the config file exists, assume an initial signin has taken place and try basic sign in - if os.path.isfile(self.config_file_path): + if os.path.isfile(self._config.config_file_path): if self.auto_login is not None: From cf55ef852e044d4d8be756522521cbf698d9fa22 Mon Sep 17 00:00:00 2001 From: vvatlin Date: Mon, 9 May 2022 06:38:10 +0100 Subject: [PATCH 0023/2104] [pritunl] add mac_addresses parameter (#4535) * add mac_addresses parameter * add changelog * remove debug line * add second blank line * add mac_addresses comparision * Update changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/pritunl/pritunl_user.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/pritunl/pritunl_user.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/pritunl/pritunl_user.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/pritunl/pritunl_user.py Co-authored-by: Felix Fontein Co-authored-by: vadim Co-authored-by: Felix Fontein --- ...35-pritunl-add-mac_addresses-parameter.yml | 3 +++ .../modules/net_tools/pritunl/pritunl_user.py | 21 ++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml diff --git a/changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml b/changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml new file mode 100644 index 0000000000..8a0626865d --- /dev/null +++ b/changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - pritunl_user - add ``mac_addresses`` parameter (https://github.com/ansible-collections/community.general/pull/4535). diff --git a/plugins/modules/net_tools/pritunl/pritunl_user.py b/plugins/modules/net_tools/pritunl/pritunl_user.py index 7ea4f18a44..0beb9720b6 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_user.py +++ b/plugins/modules/net_tools/pritunl/pritunl_user.py @@ -82,20 +82,29 @@ options: default: null description: - Enable/Disable Gravatar usage for the user I(user_name). + + user_mac_addresses: + type: list + elements: str + description: + - Allowed MAC addresses for the user I(user_name). + version_added: 5.0.0 """ EXAMPLES = """ - name: Create the user Foo with email address foo@bar.com in MyOrg community.general.pritunl_user: state: present - name: MyOrg + organization: MyOrg user_name: Foo user_email: foo@bar.com + user_mac_addresses: + - "00:00:00:00:00:99" - name: Disable the user Foo but keep it in Pritunl community.general.pritunl_user: state: present - name: MyOrg + organization: MyOrg user_name: Foo user_email: foo@bar.com user_disabled: yes @@ -103,7 +112,7 @@ EXAMPLES = """ - name: Make sure the user Foo is not part of MyOrg anymore community.general.pritunl_user: state: absent - name: MyOrg + organization: MyOrg user_name: Foo """ @@ -167,6 +176,7 @@ def add_or_update_pritunl_user(module): "groups": module.params.get("user_groups"), "disabled": module.params.get("user_disabled"), "gravatar": module.params.get("user_gravatar"), + "mac_addresses": module.params.get("user_mac_addresses"), "type": module.params.get("user_type"), } @@ -204,8 +214,8 @@ def add_or_update_pritunl_user(module): if user_params[key] is None: user_params[key] = users[0][key] - # 'groups' is a list comparison - if key == "groups": + # 'groups' and 'mac_addresses' are list comparison + if key == "groups" or key == "mac_addresses": if set(users[0][key]) != set(user_params[key]): user_params_changed = True @@ -323,6 +333,7 @@ def main(): user_groups=dict(required=False, type="list", elements="str", default=None), user_disabled=dict(required=False, type="bool", default=None), user_gravatar=dict(required=False, type="bool", default=None), + user_mac_addresses=dict(required=False, type="list", elements="str", default=None), ) ), From 72bffce2fee95cb9905d8b20f9573000600b5fd3 Mon Sep 17 00:00:00 2001 From: genofire Date: Mon, 9 May 2022 22:28:34 +0200 Subject: [PATCH 0024/2104] feat(ipa_dnsrecord): add multiple record support (#4578) Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ..._dnsrecord-add_multiple_record_support.yml | 3 + plugins/modules/identity/ipa/ipa_dnsrecord.py | 116 +++++++++++------- 2 files changed, 74 insertions(+), 45 deletions(-) create mode 100644 changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml diff --git a/changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml b/changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml new file mode 100644 index 0000000000..aef02c83d3 --- /dev/null +++ b/changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - ipa_dnsrecord - add new argument ``record_values``, mutually exclusive to ``record_value``, which supports multiple values for one record (https://github.com/ansible-collections/community.general/pull/4578). diff --git a/plugins/modules/identity/ipa/ipa_dnsrecord.py b/plugins/modules/identity/ipa/ipa_dnsrecord.py index 73b6695698..36f4cfdded 100644 --- a/plugins/modules/identity/ipa/ipa_dnsrecord.py +++ b/plugins/modules/identity/ipa/ipa_dnsrecord.py @@ -39,6 +39,8 @@ options: record_value: description: - Manage DNS record name with this value. + - Mutually exclusive with I(record_values), and exactly one of I(record_value) and I(record_values) has to be specified. + - Use I(record_values) if you need to specify multiple values. - In the case of 'A' or 'AAAA' record types, this will be the IP address. - In the case of 'A6' record type, this will be the A6 Record data. - In the case of 'CNAME' record type, this will be the hostname. @@ -47,12 +49,25 @@ options: - In the case of 'TXT' record type, this will be a text. - In the case of 'SRV' record type, this will be a service record. - In the case of 'MX' record type, this will be a mail exchanger record. - required: true type: str + record_values: + description: + - Manage DNS record name with this value. + - Mutually exclusive with I(record_values), and exactly one of I(record_value) and I(record_values) has to be specified. + - In the case of 'A' or 'AAAA' record types, this will be the IP address. + - In the case of 'A6' record type, this will be the A6 Record data. + - In the case of 'CNAME' record type, this will be the hostname. + - In the case of 'DNAME' record type, this will be the DNAME target. + - In the case of 'PTR' record type, this will be the hostname. + - In the case of 'TXT' record type, this will be a text. + - In the case of 'SRV' record type, this will be a service record. + - In the case of 'MX' record type, this will be a mail exchanger record. + type: list + elements: str record_ttl: description: - Set the TTL for the record. - - Applies only when adding a new or changing the value of record_value. + - Applies only when adding a new or changing the value of I(record_value) or I(record_values). required: false type: int state: @@ -77,12 +92,12 @@ EXAMPLES = r''' record_type: 'AAAA' record_value: '::1' -- name: Ensure that dns record exists with a TTL +- name: Ensure that dns records exists with a TTL community.general.ipa_dnsrecord: name: host02 zone_name: example.com record_type: 'AAAA' - record_value: '::1' + record_values: '::1,fe80::1' record_ttl: 300 ipa_host: ipa.example.com ipa_pass: topsecret @@ -118,7 +133,7 @@ EXAMPLES = r''' record_type: 'SRV' record_value: '10 50 88 ipa.example.com' -- name: Ensure an MX record is present +- name: Ensure an MX records are present community.general.ipa_dnsrecord: ipa_host: spider.example.com ipa_pass: Passw0rd! @@ -126,7 +141,9 @@ EXAMPLES = r''' zone_name: example.com record_name: '@' record_type: 'MX' - record_value: '1 mailserver.example.com' + record_values: + - '1 mailserver-01.example.com' + - '2 mailserver-02.example.com' - name: Ensure that dns record is removed community.general.ipa_dnsrecord: @@ -166,29 +183,31 @@ class DNSRecordIPAClient(IPAClient): def dnsrecord_add(self, zone_name=None, record_name=None, details=None): item = dict(idnsname=record_name) - if details['record_type'] == 'A': - item.update(a_part_ip_address=details['record_value']) - elif details['record_type'] == 'AAAA': - item.update(aaaa_part_ip_address=details['record_value']) - elif details['record_type'] == 'A6': - item.update(a6_part_data=details['record_value']) - elif details['record_type'] == 'CNAME': - item.update(cname_part_hostname=details['record_value']) - elif details['record_type'] == 'DNAME': - item.update(dname_part_target=details['record_value']) - elif details['record_type'] == 'PTR': - item.update(ptr_part_hostname=details['record_value']) - elif details['record_type'] == 'TXT': - item.update(txtrecord=details['record_value']) - elif details['record_type'] == 'SRV': - item.update(srvrecord=details['record_value']) - elif details['record_type'] == 'MX': - item.update(mxrecord=details['record_value']) if details.get('record_ttl'): item.update(dnsttl=details['record_ttl']) - return self._post_json(method='dnsrecord_add', name=zone_name, item=item) + for value in details['record_values']: + if details['record_type'] == 'A': + item.update(a_part_ip_address=value) + elif details['record_type'] == 'AAAA': + item.update(aaaa_part_ip_address=value) + elif details['record_type'] == 'A6': + item.update(a6_part_data=value) + elif details['record_type'] == 'CNAME': + item.update(cname_part_hostname=value) + elif details['record_type'] == 'DNAME': + item.update(dname_part_target=value) + elif details['record_type'] == 'PTR': + item.update(ptr_part_hostname=value) + elif details['record_type'] == 'TXT': + item.update(txtrecord=value) + elif details['record_type'] == 'SRV': + item.update(srvrecord=value) + elif details['record_type'] == 'MX': + item.update(mxrecord=value) + + self._post_json(method='dnsrecord_add', name=zone_name, item=item) def dnsrecord_mod(self, zone_name=None, record_name=None, details=None): item = get_dnsrecord_dict(details) @@ -205,24 +224,24 @@ class DNSRecordIPAClient(IPAClient): def get_dnsrecord_dict(details=None): module_dnsrecord = dict() - if details['record_type'] == 'A' and details['record_value']: - module_dnsrecord.update(arecord=details['record_value']) - elif details['record_type'] == 'AAAA' and details['record_value']: - module_dnsrecord.update(aaaarecord=details['record_value']) - elif details['record_type'] == 'A6' and details['record_value']: - module_dnsrecord.update(a6record=details['record_value']) - elif details['record_type'] == 'CNAME' and details['record_value']: - module_dnsrecord.update(cnamerecord=details['record_value']) - elif details['record_type'] == 'DNAME' and details['record_value']: - module_dnsrecord.update(dnamerecord=details['record_value']) - elif details['record_type'] == 'PTR' and details['record_value']: - module_dnsrecord.update(ptrrecord=details['record_value']) - elif details['record_type'] == 'TXT' and details['record_value']: - module_dnsrecord.update(txtrecord=details['record_value']) - elif details['record_type'] == 'SRV' and details['record_value']: - module_dnsrecord.update(srvrecord=details['record_value']) - elif details['record_type'] == 'MX' and details['record_value']: - module_dnsrecord.update(mxrecord=details['record_value']) + if details['record_type'] == 'A' and details['record_values']: + module_dnsrecord.update(arecord=details['record_values']) + elif details['record_type'] == 'AAAA' and details['record_values']: + module_dnsrecord.update(aaaarecord=details['record_values']) + elif details['record_type'] == 'A6' and details['record_values']: + module_dnsrecord.update(a6record=details['record_values']) + elif details['record_type'] == 'CNAME' and details['record_values']: + module_dnsrecord.update(cnamerecord=details['record_values']) + elif details['record_type'] == 'DNAME' and details['record_values']: + module_dnsrecord.update(dnamerecord=details['record_values']) + elif details['record_type'] == 'PTR' and details['record_values']: + module_dnsrecord.update(ptrrecord=details['record_values']) + elif details['record_type'] == 'TXT' and details['record_values']: + module_dnsrecord.update(txtrecord=details['record_values']) + elif details['record_type'] == 'SRV' and details['record_values']: + module_dnsrecord.update(srvrecord=details['record_values']) + elif details['record_type'] == 'MX' and details['record_values']: + module_dnsrecord.update(mxrecord=details['record_values']) if details.get('record_ttl'): module_dnsrecord.update(dnsttl=details['record_ttl']) @@ -243,9 +262,13 @@ def ensure(module, client): ipa_dnsrecord = client.dnsrecord_find(zone_name, record_name) + record_values = module.params['record_values'] + if module.params['record_value'] is not None: + record_values = [module.params['record_value']] + module_dnsrecord = dict( record_type=module.params['record_type'], - record_value=module.params['record_value'], + record_values=record_values, record_ttl=to_native(record_ttl, nonstring='passthru'), ) @@ -287,13 +310,16 @@ def main(): zone_name=dict(type='str', required=True), record_name=dict(type='str', aliases=['name'], required=True), record_type=dict(type='str', default='A', choices=record_types), - record_value=dict(type='str', required=True), + record_value=dict(type='str'), + record_values=dict(type='list', elements='str'), state=dict(type='str', default='present', choices=['present', 'absent']), record_ttl=dict(type='int', required=False), ) module = AnsibleModule( argument_spec=argument_spec, + mutually_exclusive=[['record_value', 'record_values']], + required_one_of=[['record_value', 'record_values']], supports_check_mode=True ) From 73cea82fe7e4def92ca5e1f97dddc3d900898b9b Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 10 May 2022 15:59:45 +1200 Subject: [PATCH 0025/2104] ansible_galaxy_install: added deprecation for ansible 2.9 and ansible-base 2.10 (#4601) * ansible_galaxy_install: added deprecation for ansible 2.9 and ansible-base 2.10 * added changelog fragment * Update plugins/modules/packaging/language/ansible_galaxy_install.py Co-authored-by: Felix Fontein * Update plugins/modules/packaging/language/ansible_galaxy_install.py Co-authored-by: Felix Fontein * Update plugins/modules/packaging/language/ansible_galaxy_install.py Co-authored-by: Felix Fontein * Update plugins/modules/packaging/language/ansible_galaxy_install.py Co-authored-by: Felix Fontein * ansible29 condition * Update plugins/modules/packaging/language/ansible_galaxy_install.py Co-authored-by: Felix Fontein * Update plugins/modules/packaging/language/ansible_galaxy_install.py Co-authored-by: Felix Fontein * Update plugins/modules/packaging/language/ansible_galaxy_install.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...y-install-deprecate-ansible29-and-210.yaml | 2 ++ .../language/ansible_galaxy_install.py | 22 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml diff --git a/changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml b/changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml new file mode 100644 index 0000000000..40b67375d6 --- /dev/null +++ b/changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml @@ -0,0 +1,2 @@ +deprecated_features: + - ansible_galaxy_install - deprecated support for ``ansible`` 2.9 and ``ansible-base`` 2.10 (https://github.com/ansible-collections/community.general/pull/4601). diff --git a/plugins/modules/packaging/language/ansible_galaxy_install.py b/plugins/modules/packaging/language/ansible_galaxy_install.py index 076e2b2d6a..968a8d093d 100644 --- a/plugins/modules/packaging/language/ansible_galaxy_install.py +++ b/plugins/modules/packaging/language/ansible_galaxy_install.py @@ -70,6 +70,17 @@ options: description: - Acknowledge using Ansible 2.9 with its limitations, and prevents the module from generating warnings about them. - This option is completely ignored if using a version of Ansible greater than C(2.9.x). + - Note that this option will be removed without any further deprecation warning once support + for Ansible 2.9 is removed from this module. + type: bool + default: false + ack_min_ansiblecore211: + description: + - Acknowledge the module is deprecating support for Ansible 2.9 and ansible-base 2.10. + - Support for those versions will be removed in community.general 8.0.0. + At the same time, this option will be removed without any deprecation warning! + - This option is completely ignored if using a version of ansible-core/ansible-base/Ansible greater than C(2.11). + - For the sake of conciseness, setting this parameter to C(true) implies I(ack_ansible29=true). type: bool default: false """ @@ -194,6 +205,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper): force=dict(type='bool', default=False), no_deps=dict(type='bool', default=False), ack_ansible29=dict(type='bool', default=False), + ack_min_ansiblecore211=dict(type='bool', default=False), ), mutually_exclusive=[('name', 'requirements_file')], required_one_of=[('name', 'requirements_file')], @@ -226,6 +238,14 @@ class AnsibleGalaxyInstall(CmdModuleHelper): def __init_module__(self): self.ansible_version = self._get_ansible_galaxy_version() + if self.ansible_version < (2, 11) and not self.vars.ack_min_ansiblecore211: + self.module.deprecate( + "Support for Ansible 2.9 and ansible-base 2.10 is being deprecated. " + "At the same time support for them is ended, also the ack_ansible29 option will be removed. " + "Upgrading is strongly recommended, or set 'ack_min_ansiblecore211' to supress this message.", + version="8.0.0", + collection_name="community.general", + ) self.is_ansible29 = self.ansible_version < (2, 10) if self.is_ansible29: self._RE_INSTALL_OUTPUT = re.compile(r"^(?:.*Installing '(?P\w+\.\w+):(?P[\d\.]+)'.*" @@ -281,7 +301,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper): self.vars.set("new_collections", {}) self.vars.set("new_roles", {}) self.vars.set("ansible29_change", False, change=True, output=False) - if not self.vars.ack_ansible29: + if not (self.vars.ack_ansible29 or self.vars.ack_min_ansiblecore211): self.module.warn("Ansible 2.9 or older: unable to retrieve lists of roles and collections already installed") if self.vars.requirements_file is not None and self.vars.type == 'both': self.module.warn("Ansible 2.9 or older: will install only roles from requirement files") From 358b579803c95f669cbe3f55ca602325433f6092 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 12 May 2022 08:05:18 +1200 Subject: [PATCH 0026/2104] rax_files_objects: refactoring (#4649) * rax_files_objects: refactoring - simplifications - use of comprehensions - better use of exceptions - improvements on the documentation blob - src and dest mutually exclusive in module definition * added changelog fragment * Update plugins/modules/cloud/rackspace/rax_files_objects.py Co-authored-by: Felix Fontein * rollback of mutually_exclusive Co-authored-by: Felix Fontein --- .../4649-rax-files-objects-improvements.yaml | 2 + .../cloud/rackspace/rax_files_objects.py | 186 ++++++------------ 2 files changed, 65 insertions(+), 123 deletions(-) create mode 100644 changelogs/fragments/4649-rax-files-objects-improvements.yaml diff --git a/changelogs/fragments/4649-rax-files-objects-improvements.yaml b/changelogs/fragments/4649-rax-files-objects-improvements.yaml new file mode 100644 index 0000000000..f32f744620 --- /dev/null +++ b/changelogs/fragments/4649-rax-files-objects-improvements.yaml @@ -0,0 +1,2 @@ +minor_changes: + - rax_files_objects - minor refactoring improving code quality (https://github.com/ansible-collections/community.general/pull/4649). diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index 3269fe0512..8f8793e375 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -13,14 +13,14 @@ DOCUMENTATION = ''' module: rax_files_objects short_description: Upload, download, and delete objects in Rackspace Cloud Files description: - - Upload, download, and delete objects in Rackspace Cloud Files + - Upload, download, and delete objects in Rackspace Cloud Files. options: clear_meta: description: - Optionally clear existing metadata when applying metadata to existing objects. - Selecting this option is only appropriate when setting type=meta + Selecting this option is only appropriate when setting I(type=meta). type: bool - default: 'no' + default: false container: type: str description: @@ -29,24 +29,23 @@ options: dest: type: str description: - - The destination of a "get" operation; i.e. a local directory, "/home/user/myfolder". + - The destination of a C(get) operation; i.e. a local directory, C(/home/user/myfolder). Used to specify the destination of an operation on a remote object; i.e. a file name, - "file1", or a comma-separated list of remote objects, "file1,file2,file17" + C(file1), or a comma-separated list of remote objects, C(file1,file2,file17). expires: type: int description: - - Used to set an expiration on a file or folder uploaded to Cloud Files. - Requires an integer, specifying expiration in seconds + - Used to set an expiration in seconds on an uploaded file or folder. meta: type: dict description: - - A hash of items to set as metadata values on an uploaded file or folder + - Items to set as metadata values on an uploaded file or folder. method: type: str description: - - The method of operation to be performed. For example, put to upload files - to Cloud Files, get to download files from Cloud Files or delete to delete - remote objects in Cloud Files + - > + The method of operation to be performed: C(put) to upload files, C(get) to download files or + C(delete) to remove remote objects in Cloud Files. choices: - get - put @@ -56,8 +55,8 @@ options: type: str description: - Source from which to upload files. Used to specify a remote object as a source for - an operation, i.e. a file name, "file1", or a comma-separated list of remote objects, - "file1,file2,file17". src and dest are mutually exclusive on remote-only object operations + an operation, i.e. a file name, C(file1), or a comma-separated list of remote objects, + C(file1,file2,file17). Parameters I(src) and I(dest) are mutually exclusive on remote-only object operations structure: description: - Used to specify whether to maintain nested directory structure when downloading objects @@ -239,13 +238,12 @@ def _upload_folder(cf, folder, container, ttl=None, headers=None): """ Uploads a folder to Cloud Files. """ total_bytes = 0 - for root, dirs, files in os.walk(folder): + for root, dummy, files in os.walk(folder): for fname in files: full_path = os.path.join(root, fname) obj_name = os.path.relpath(full_path, folder) obj_size = os.path.getsize(full_path) - cf.upload_file(container, full_path, - obj_name=obj_name, return_none=True, ttl=ttl, headers=headers) + cf.upload_file(container, full_path, obj_name=obj_name, return_none=True, ttl=ttl, headers=headers) total_bytes += obj_size return total_bytes @@ -270,21 +268,15 @@ def upload(module, cf, container, src, dest, meta, expires): cont_obj = None total_bytes = 0 - if dest and not is_dir: - try: + try: + if dest and not is_dir: cont_obj = c.upload_file(src, obj_name=dest, ttl=expires, headers=meta) - except Exception as e: - module.fail_json(msg=e.message) - elif is_dir: - try: + elif is_dir: total_bytes = _upload_folder(cf, src, c, ttl=expires, headers=meta) - except Exception as e: - module.fail_json(msg=e.message) - else: - try: + else: cont_obj = c.upload_file(src, ttl=expires, headers=meta) - except Exception as e: - module.fail_json(msg=e.message) + except Exception as e: + module.fail_json(msg=e.message) EXIT_DICT['success'] = True EXIT_DICT['container'] = c.name @@ -319,8 +311,7 @@ def download(module, cf, container, src, dest, structure): # Accept a single object name or a comma-separated list of objs # If not specified, get the entire container if src: - objs = src.split(',') - objs = map(str.strip, objs) + objs = map(str.strip, src.split(',')) else: objs = c.get_object_names() @@ -330,14 +321,10 @@ def download(module, cf, container, src, dest, structure): if not is_dir: module.fail_json(msg='dest must be a directory') - results = [] - for obj in objs: - try: - c.download_object(obj, dest, structure=structure) - except Exception as e: - module.fail_json(msg=e.message) - else: - results.append(obj) + try: + results = [c.download_object(obj, dest, structure=structure) for obj in objs] + except Exception as e: + module.fail_json(msg=e.message) len_results = len(results) len_objs = len(objs) @@ -360,33 +347,24 @@ def delete(module, cf, container, src, dest): comma-separated list to src OR dest (but not both). Omitting file name(s) assumes the entire container is to be deleted. """ - objs = None if src and dest: module.fail_json(msg="Error: ambiguous instructions; files to be deleted " "have been specified on both src and dest args") - elif dest: - objs = dest - else: - objs = src c = _get_container(module, cf, container) + objs = dest or src if objs: - objs = objs.split(',') - objs = map(str.strip, objs) + objs = map(str.strip, objs.split(',')) else: objs = c.get_object_names() num_objs = len(objs) - results = [] - for obj in objs: - try: - result = c.delete_object(obj) - except Exception as e: - module.fail_json(msg=e.message) - else: - results.append(result) + try: + results = [c.delete_object(obj) for obj in objs] + except Exception as e: + module.fail_json(msg=e.message) num_deleted = results.count(True) @@ -410,34 +388,25 @@ def get_meta(module, cf, container, src, dest): """ Get metadata for a single file, comma-separated list, or entire container """ - c = _get_container(module, cf, container) - - objs = None if src and dest: module.fail_json(msg="Error: ambiguous instructions; files to be deleted " "have been specified on both src and dest args") - elif dest: - objs = dest - else: - objs = src + c = _get_container(module, cf, container) + + objs = dest or src if objs: - objs = objs.split(',') - objs = map(str.strip, objs) + objs = map(str.strip, objs.split(',')) else: objs = c.get_object_names() - results = dict() - for obj in objs: - try: + try: + results = dict() + for obj in objs: meta = c.get_object(obj).get_metadata() - except Exception as e: - module.fail_json(msg=e.message) - else: - results[obj] = dict() - for k, v in meta.items(): - meta_key = k.split(META_PREFIX)[-1] - results[obj][meta_key] = v + results[obj] = dict((k.split(META_PREFIX)[-1], v) for k, v in meta.items()) + except Exception as e: + module.fail_json(msg=e.message) EXIT_DICT['container'] = c.name if results: @@ -451,28 +420,18 @@ def put_meta(module, cf, container, src, dest, meta, clear_meta): Passing a true value to clear_meta clears the metadata stored in Cloud Files before setting the new metadata to the value of "meta". """ - objs = None if src and dest: module.fail_json(msg="Error: ambiguous instructions; files to set meta" " have been specified on both src and dest args") - elif dest: - objs = dest - else: - objs = src - - objs = objs.split(',') - objs = map(str.strip, objs) + objs = dest or src + objs = map(str.strip, objs.split(',')) c = _get_container(module, cf, container) - results = [] - for obj in objs: - try: - result = c.get_object(obj).set_metadata(meta, clear=clear_meta) - except Exception as e: - module.fail_json(msg=e.message) - else: - results.append(result) + try: + results = [c.get_object(obj).set_metadata(meta, clear=clear_meta) for obj in objs] + except Exception as e: + module.fail_json(msg=e.message) EXIT_DICT['container'] = c.name EXIT_DICT['success'] = True @@ -487,43 +446,24 @@ def delete_meta(module, cf, container, src, dest, meta): all objects specified by src or dest (but not both), if any; otherwise it deletes keys on all objects in the container """ - objs = None if src and dest: module.fail_json(msg="Error: ambiguous instructions; meta keys to be " "deleted have been specified on both src and dest" " args") - elif dest: - objs = dest - else: - objs = src - - objs = objs.split(',') - objs = map(str.strip, objs) + objs = dest or src + objs = map(str.strip, objs.split(',')) c = _get_container(module, cf, container) - results = [] # Num of metadata keys removed, not objects affected - for obj in objs: - if meta: - for k, v in meta.items(): - try: - result = c.get_object(obj).remove_metadata_key(k) - except Exception as e: - module.fail_json(msg=e.message) - else: - results.append(result) - else: - try: - o = c.get_object(obj) - except pyrax.exc.NoSuchObject as e: - module.fail_json(msg=e.message) - - for k, v in o.get_metadata().items(): - try: - result = o.remove_metadata_key(k) - except Exception as e: - module.fail_json(msg=e.message) - results.append(result) + try: + for obj in objs: + o = c.get_object(obj) + results = [ + o.remove_metadata_key(k) + for k in (meta or o.get_metadata()) + ] + except Exception as e: + module.fail_json(msg=e.message) EXIT_DICT['container'] = c.name EXIT_DICT['success'] = True @@ -544,13 +484,13 @@ def cloudfiles(module, container, src, dest, method, typ, meta, clear_meta, 'incorrectly capitalized region name.') if typ == "file": + if method == 'get': + download(module, cf, container, src, dest, structure) + if method == 'put': upload(module, cf, container, src, dest, meta, expires) - elif method == 'get': - download(module, cf, container, src, dest, structure) - - elif method == 'delete': + if method == 'delete': delete(module, cf, container, src, dest) else: @@ -582,7 +522,7 @@ def main(): module = AnsibleModule( argument_spec=argument_spec, - required_together=rax_required_together() + required_together=rax_required_together(), ) if not HAS_PYRAX: From a4b475677759a67041e3781e1378419624aa0abc Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 12 May 2022 08:05:35 +1200 Subject: [PATCH 0027/2104] vmadm: minor refactoring (#4648) * vmadm: minor refactor - simplifications - adjusting comments - minor changes * added changelog fragment * Update plugins/modules/cloud/smartos/vmadm.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4648-vmadm-improvements-2.yaml | 2 + plugins/modules/cloud/smartos/vmadm.py | 41 +++++++------------ 2 files changed, 17 insertions(+), 26 deletions(-) create mode 100644 changelogs/fragments/4648-vmadm-improvements-2.yaml diff --git a/changelogs/fragments/4648-vmadm-improvements-2.yaml b/changelogs/fragments/4648-vmadm-improvements-2.yaml new file mode 100644 index 0000000000..180173e779 --- /dev/null +++ b/changelogs/fragments/4648-vmadm-improvements-2.yaml @@ -0,0 +1,2 @@ +minor_changes: + - vmadm - minor refactoring and improvement on the module (https://github.com/ansible-collections/community.general/pull/4648). diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/cloud/smartos/vmadm.py index 195adbafd2..c6b75e6b18 100644 --- a/plugins/modules/cloud/smartos/vmadm.py +++ b/plugins/modules/cloud/smartos/vmadm.py @@ -430,10 +430,8 @@ def get_vm_prop(module, uuid, prop): msg='Invalid JSON returned by vmadm for uuid lookup of {0}'.format(prop), details=to_native(e), exception=traceback.format_exc()) - if len(stdout_json) > 0 and prop in stdout_json[0]: - return stdout_json[0][prop] - else: - return None + if stdout_json: + return stdout_json[0].get(prop) def get_vm_uuid(module, alias): @@ -450,18 +448,15 @@ def get_vm_uuid(module, alias): # If no VM was found matching the given alias, we get back an empty array. # That is not an error condition as we might be explicitly checking it's # absence. - if stdout.strip() == '[]': - return None - else: - try: - stdout_json = json.loads(stdout) - except Exception as e: - module.fail_json( - msg='Invalid JSON returned by vmadm for uuid lookup of {0}'.format(alias), - details=to_native(e), exception=traceback.format_exc()) + try: + stdout_json = json.loads(stdout) + except Exception as e: + module.fail_json( + msg='Invalid JSON returned by vmadm for uuid lookup of {0}'.format(alias), + details=to_native(e), exception=traceback.format_exc()) - if len(stdout_json) > 0 and 'uuid' in stdout_json[0]: - return stdout_json[0]['uuid'] + if stdout_json: + return stdout_json[0].get('uuid') def get_all_vm_uuids(module): @@ -484,7 +479,7 @@ def get_all_vm_uuids(module): def new_vm(module, uuid, vm_state): payload_file = create_payload(module, uuid) - (rc, stdout, stderr) = vmadm_create_vm(module, payload_file) + (rc, dummy, stderr) = vmadm_create_vm(module, payload_file) if rc != 0: changed = False @@ -519,7 +514,6 @@ def new_vm(module, uuid, vm_state): def vmadm_create_vm(module, payload_file): # Create a new VM using the provided payload. - cmd = '{0} create -f {1}'.format(module.vmadm, payload_file) cmd = [module.vmadm, 'create', '-f', payload_file] return module.run_command(cmd) @@ -547,7 +541,7 @@ def set_vm_state(module, vm_uuid, vm_state): cmd = [module.vmadm, command] + force + [vm_uuid] - (rc, stdout, stderr) = module.run_command(cmd) + (dummy, dummy, stderr) = module.run_command(cmd) match = re.match('^Successfully.*', stderr) return match is not None @@ -632,7 +626,7 @@ def manage_all_vms(module, vm_state): if (not current_vm_state) or (get_vm_prop(module, uuid, 'state') != state): any_changed = True else: - any_changed = (vm_state_transition(module, uuid, vm_state) | any_changed) + any_changed = vm_state_transition(module, uuid, vm_state) or any_changed return any_changed @@ -774,14 +768,9 @@ def main(): elif module.check_mode: # Shortcut for check mode, if there is no VM yet, it will need to be created. # Or, if the VM is not in the desired state yet, it needs to transition. - if (not current_vm_state) or (get_vm_prop(module, uuid, 'state') != state): - result['changed'] = True - else: - result['changed'] = False - - module.exit_json(**result) - # No VM was found that matched the given ID (alias or uuid), so we create it. + result['changed'] = (not current_vm_state) or (get_vm_prop(module, uuid, 'state') != state) elif not current_vm_state: + # No VM was found that matched the given ID (alias or uuid), so we create it. result['changed'], result['uuid'] = new_vm(module, uuid, vm_state) else: # VM was found, operate on its state directly. From fbff98c5f2db060a1baf07569eb8b0c54bfb2b26 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 12 May 2022 17:10:34 +1200 Subject: [PATCH 0028/2104] gconftool2: improvements (#4647) * gconftool2: improvements * added changelog fragment * typo * Update changelogs/fragments/4647-gconftool2-command-arg.yaml Per recommendation from Felix. Danke! --- .../4647-gconftool2-command-arg.yaml | 2 ++ plugins/modules/system/gconftool2.py | 32 ++++++++----------- 2 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 changelogs/fragments/4647-gconftool2-command-arg.yaml diff --git a/changelogs/fragments/4647-gconftool2-command-arg.yaml b/changelogs/fragments/4647-gconftool2-command-arg.yaml new file mode 100644 index 0000000000..12913a0b90 --- /dev/null +++ b/changelogs/fragments/4647-gconftool2-command-arg.yaml @@ -0,0 +1,2 @@ +bugfixes: + - gconftool2 - properly escape values when passing them to ``gconftool-2`` (https://github.com/ansible-collections/community.general/pull/4647). diff --git a/plugins/modules/system/gconftool2.py b/plugins/modules/system/gconftool2.py index 6b9ce71213..86bb2f9259 100644 --- a/plugins/modules/system/gconftool2.py +++ b/plugins/modules/system/gconftool2.py @@ -99,45 +99,41 @@ class GConf2Preference(object): def call(self, call_type, fail_onerr=True): """ Helper function to perform gconftool-2 operations """ - config_source = '' - direct = '' + config_source = [] + direct = [] changed = False out = '' # If the configuration source is different from the default, create # the argument if self.config_source is not None and len(self.config_source) > 0: - config_source = "--config-source " + self.config_source + config_source = ["--config-source", self.config_source] # If direct is true, create the argument if self.direct: - direct = "--direct" + direct = ["--direct"] # Execute the call - cmd = "gconftool-2 " + cmd = ["gconftool-2"] try: # If the call is "get", then we don't need as many parameters and # we can ignore some if call_type == 'get': - cmd += "--get {0}".format(self.key) + cmd.extend(["--get", self.key]) # Otherwise, we will use all relevant parameters elif call_type == 'set': - cmd += "{0} {1} --type {2} --{3} {4} \"{5}\"".format(direct, - config_source, - self.value_type, - call_type, - self.key, - self.value) + cmd.extend(direct) + cmd.extend(config_source) + cmd.extend(["--type", self.value_type, "--{3}".format(call_type), self.key, self.value]) elif call_type == 'unset': - cmd += "--unset {0}".format(self.key) + cmd.extend(["--unset", self.key]) # Start external command - rc, out, err = self.ansible.run_command(cmd, use_unsafe_shell=True) + rc, out, err = self.ansible.run_command(cmd) - if len(err) > 0: - if fail_onerr: - self.ansible.fail_json(msg='gconftool-2 failed with ' - 'error: %s' % (str(err))) + if err and fail_onerr: + self.ansible.fail_json(msg='gconftool-2 failed with ' + 'error: %s' % (str(err))) else: changed = True From 7c9ad3082dec04ed106a79ca08a0edf0f4f04d29 Mon Sep 17 00:00:00 2001 From: Kamil Markowicz Date: Fri, 13 May 2022 14:30:28 -0400 Subject: [PATCH 0029/2104] .gitignore exclude of .DS_Store files created by macOS (#4671) * excludes .DS_Store files created by macOS * properly generate .gitignore w/ toptal.com * update previously defined jupyternotebook def to a valid one --- .gitignore | 104 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 83 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index c6c78b42e7..b95546f623 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -# Created by https://www.toptal.com/developers/gitignore/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv -# Edit at https://www.toptal.com/developers/gitignore?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv +# Created by https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks +# Edit at https://www.toptal.com/developers/gitignore?templates=vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks ### dotenv ### .env @@ -71,7 +71,19 @@ flycheck_*.el *_LOCAL_*.txt *_REMOTE_*.txt -#!! ERROR: jupyternotebook is undefined. Use list command to see defined gitignore types !!# +### JupyterNotebooks ### +# gitignore template for Jupyter Notebooks +# website: http://jupyter.org/ + +.ipynb_checkpoints +*/.ipynb_checkpoints/* + +# IPython +profile_default/ +ipython_config.py + +# Remove previous ipynb_checkpoints +# git rm -r .ipynb_checkpoints/ ### Linux ### @@ -87,6 +99,39 @@ flycheck_*.el # .nfs files are created when an open file is removed but is still being accessed .nfs* +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + ### PyCharm+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 @@ -151,6 +196,9 @@ atlassian-ide-plugin.xml # Cursive Clojure plugin .idea/replstate.xml +# SonarLint plugin +.idea/sonarlint/ + # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties @@ -164,20 +212,13 @@ fabric.properties .idea/caches/build_file_checksums.ser ### PyCharm+all Patch ### -# Ignores the whole .idea folder and all .iml files -# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. -.idea/ +.idea/* -# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 - -*.iml -modules.xml -.idea/misc.xml -*.ipr - -# Sonarlint plugin -.idea/sonarlint +!.idea/codeStyles +!.idea/runConfigurations ### pydev ### .pydevproject @@ -260,16 +301,13 @@ docs/_build/ target/ # Jupyter Notebook -.ipynb_checkpoints # IPython -profile_default/ -ipython_config.py # pyenv # For a library or package, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: -.python-version +# .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. @@ -278,7 +316,22 @@ ipython_config.py # install all needed dependencies. #Pipfile.lock -# PEP 582; used by e.g. github.com/David-OConnor/pyflow +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ # Celery stuff @@ -320,6 +373,13 @@ dmypy.json # Cython debug symbols cython_debug/ +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + ### Vim ### # Swap [._]*.s[a-v][a-z] @@ -381,6 +441,8 @@ tags # Cursive Clojure plugin +# SonarLint plugin + # Crashlytics plugin (for Android Studio and IntelliJ) # Editor-based Rest Client @@ -443,4 +505,4 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk -# End of https://www.toptal.com/developers/gitignore/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv +# End of https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks \ No newline at end of file From 5d72d1be2fb4c0655121798dbfb70a057adba4d5 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 14 May 2022 06:40:17 +1200 Subject: [PATCH 0030/2104] ModuleHelper: added a do_raise() method to MH base class (#4660) * ModuleHelper: added a do_raise() method to MH base class * added changelog fragment * Update changelogs/fragments/4660-mh-added-do-raise.yaml Co-authored-by: Felix Fontein * Update plugins/module_utils/mh/base.py Co-authored-by: Felix Fontein * using do_raise in CmdMixin * simplified do_raise() Co-authored-by: Felix Fontein --- changelogs/fragments/4660-mh-added-do-raise.yaml | 2 ++ plugins/module_utils/mh/base.py | 3 +++ plugins/module_utils/mh/mixins/cmd.py | 7 +++---- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/4660-mh-added-do-raise.yaml diff --git a/changelogs/fragments/4660-mh-added-do-raise.yaml b/changelogs/fragments/4660-mh-added-do-raise.yaml new file mode 100644 index 0000000000..01585afb96 --- /dev/null +++ b/changelogs/fragments/4660-mh-added-do-raise.yaml @@ -0,0 +1,2 @@ +minor_changes: + - ModuleHelper module utils - ``ModuleHelperBase`` now has a convenience method ``do_raise`` (https://github.com/ansible-collections/community.general/pull/4660). diff --git a/plugins/module_utils/mh/base.py b/plugins/module_utils/mh/base.py index 3d311de865..0871a527be 100644 --- a/plugins/module_utils/mh/base.py +++ b/plugins/module_utils/mh/base.py @@ -31,6 +31,9 @@ class ModuleHelperBase(object): def diff_mode(self): return self.module._diff + def do_raise(self, *args, **kwargs): + raise _MHE(*args, **kwargs) + def __getattr__(self, attr): if attr in self._delegated_to_module: return getattr(self.module, attr) diff --git a/plugins/module_utils/mh/mixins/cmd.py b/plugins/module_utils/mh/mixins/cmd.py index 88b89d159b..58d50fbdf8 100644 --- a/plugins/module_utils/mh/mixins/cmd.py +++ b/plugins/module_utils/mh/mixins/cmd.py @@ -128,8 +128,7 @@ class CmdMixin(object): for param in param_list: if isinstance(param, dict): if len(param) != 1: - raise self.ModuleHelperException("run_command parameter as a dict must " - "contain only one key: {0}".format(param)) + self.do_raise("run_command parameter as a dict must contain only one key: {0}".format(param)) _param = list(param.keys())[0] fmt = find_format(_param) value = param[_param] @@ -141,9 +140,9 @@ class CmdMixin(object): fmt = find_format(param) value = extra_params[param] else: - raise self.ModuleHelperException('Cannot determine value for parameter: {0}'.format(param)) + self.do_raise('Cannot determine value for parameter: {0}'.format(param)) else: - raise self.ModuleHelperException("run_command parameter must be either a str or a dict: {0}".format(param)) + self.do_raise("run_command parameter must be either a str or a dict: {0}".format(param)) cmd_args = add_arg_formatted_param(cmd_args, fmt, value) return cmd_args From bb5dfef1cc9df11eea6a1dedabffa395190d2064 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 14 May 2022 13:59:34 +0200 Subject: [PATCH 0031/2104] Prepare 5.0.0 release. --- changelogs/fragments/5.0.0.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/fragments/5.0.0.yml diff --git a/changelogs/fragments/5.0.0.yml b/changelogs/fragments/5.0.0.yml new file mode 100644 index 0000000000..781eb782c8 --- /dev/null +++ b/changelogs/fragments/5.0.0.yml @@ -0,0 +1 @@ +release_summary: This is release 5.0.0 of ``community.general``, released on 2022-05-17. From aeeb09f0da291ae1745f70158692b7f3da32eb9b Mon Sep 17 00:00:00 2001 From: Ge0rgi0s <34042518+Ge0rgi0s@users.noreply.github.com> Date: Mon, 16 May 2022 05:40:46 +0000 Subject: [PATCH 0032/2104] Set firstrun to avoid use before definition (#4667) * Set firstrun to avoid use before definition At the moment if zypper updates itself the parse_zypper_xml function calls itself with packages not None, but in check_mode zypper still needs to update itself -> rc = 103 and firstrun is undefined * Add changelog frament * Update changelogs/fragments/4651-zypper-checkmode-fix.yaml Co-authored-by: Felix Fontein Co-authored-by: Georg Vogt Co-authored-by: Felix Fontein --- changelogs/fragments/4651-zypper-checkmode-fix.yaml | 2 ++ plugins/modules/packaging/os/zypper.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/4651-zypper-checkmode-fix.yaml diff --git a/changelogs/fragments/4651-zypper-checkmode-fix.yaml b/changelogs/fragments/4651-zypper-checkmode-fix.yaml new file mode 100644 index 0000000000..403e4eead6 --- /dev/null +++ b/changelogs/fragments/4651-zypper-checkmode-fix.yaml @@ -0,0 +1,2 @@ +bugfixes: + - zypper - fix undefined variable when running in check mode (https://github.com/ansible-collections/community.general/pull/4667). diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/packaging/os/zypper.py index ab49051b17..07d71169ec 100644 --- a/plugins/modules/packaging/os/zypper.py +++ b/plugins/modules/packaging/os/zypper.py @@ -323,6 +323,8 @@ def parse_zypper_xml(m, cmd, fail_not_found=True, packages=None): if packages is None: firstrun = True packages = {} + else: + firstrun = False solvable_list = dom.getElementsByTagName('solvable') for solvable in solvable_list: name = solvable.getAttribute('name') From 00abaf6f8025b64437e64081aa5e98021a6d2867 Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Mon, 16 May 2022 02:45:12 -0400 Subject: [PATCH 0033/2104] Remove unsupported and unnecessary --no-emoji option (#4662) * Remove unsupported and unnecessary --no-emoji option `--no-emoji` causes errors in Yarn 2+ and should be unnecessary in Yarn 1.x; Yarn 1.x should only use emoji on supported interactive terminals. * Add changelog fragment * Update changelogs/fragments/4662-yarn-emoji.yml Co-authored-by: Felix Fontein * Update changelogs/fragments/4662-yarn-emoji.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4662-yarn-emoji.yml | 2 ++ plugins/modules/packaging/language/yarn.py | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/4662-yarn-emoji.yml diff --git a/changelogs/fragments/4662-yarn-emoji.yml b/changelogs/fragments/4662-yarn-emoji.yml new file mode 100644 index 0000000000..696188dd9b --- /dev/null +++ b/changelogs/fragments/4662-yarn-emoji.yml @@ -0,0 +1,2 @@ +breaking_changes: + - yarn - remove unsupported and unnecessary ``--no-emoji`` flag (https://github.com/ansible-collections/community.general/pull/4662). diff --git a/plugins/modules/packaging/language/yarn.py b/plugins/modules/packaging/language/yarn.py index 7df043c279..6ea9db5d26 100644 --- a/plugins/modules/packaging/language/yarn.py +++ b/plugins/modules/packaging/language/yarn.py @@ -147,7 +147,7 @@ invocation: } } out: - description: Output generated from Yarn with emojis removed. + description: Output generated from Yarn. returned: always type: str sample: "yarn add v0.16.1[1/4] Resolving packages...[2/4] Fetching packages...[3/4] Linking dependencies...[4/4] @@ -205,9 +205,6 @@ class Yarn(object): cmd.append('--registry') cmd.append(self.registry) - # always run Yarn without emojis when called via Ansible - cmd.append('--no-emoji') - # If path is specified, cd into that path and run the command. cwd = None if self.path and not self.globally: From 97c01174a2f79a25416cfba1113557fbda26e634 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 16 May 2022 12:35:01 +0200 Subject: [PATCH 0034/2104] Remove stable-1 and stable-2 from CI, demote stable-3 to weekly CI runs. --- .azure-pipelines/azure-pipelines.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index dbdcdd6d51..34ff29a215 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -24,15 +24,13 @@ schedules: always: true branches: include: - - stable-3 - stable-4 - cron: 0 11 * * 0 displayName: Weekly (old stable branches) always: true branches: include: - - stable-1 - - stable-2 + - stable-3 variables: - name: checkoutPath From da2dfd0706112625e8762a81f2cc1bd7c08a1aed Mon Sep 17 00:00:00 2001 From: Kirill Petrov Date: Tue, 17 May 2022 08:45:10 +0300 Subject: [PATCH 0035/2104] gitlab_hook: use None for non-existent attr in gitlab API response (#4668) * gitlab_hook: use empty string for non-existent attr in gitlab API response; * gitlab_hook: use None for non-existent attr in gitlab API response; * gitlab_hook: use None for non-existent attr in gitlab API response - add changelog fragment; * gitlab_hook: update changelog fragment for #4668 * Update changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml Co-authored-by: Felix Fontein --- .../4668-gitlab_hook-use-None-for-non-existent-attr.yml | 2 ++ plugins/modules/source_control/gitlab/gitlab_hook.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml diff --git a/changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml b/changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml new file mode 100644 index 0000000000..45a3f9f0b9 --- /dev/null +++ b/changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml @@ -0,0 +1,2 @@ +bugfixes: + - gitlab_hook - avoid errors during idempotency check when an attribute does not exist (https://github.com/ansible-collections/community.general/pull/4668). diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index cd6d2a3031..8a850b1c9e 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -257,7 +257,7 @@ class GitLabHook(object): for arg_key, arg_value in arguments.items(): if arguments[arg_key] is not None: - if getattr(hook, arg_key) != arguments[arg_key]: + if getattr(hook, arg_key, None) != arguments[arg_key]: setattr(hook, arg_key, arguments[arg_key]) changed = True From 2a9a8cf8082248c82b70b3570cd33876f0ba0e4e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 17 May 2022 13:40:08 +0200 Subject: [PATCH 0036/2104] Add stable-5 to the nightly CI runs. --- .azure-pipelines/azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 34ff29a215..7cfa691e4a 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -24,6 +24,7 @@ schedules: always: true branches: include: + - stable-5 - stable-4 - cron: 0 11 * * 0 displayName: Weekly (old stable branches) From 69e64376c2836e47483c9422667c046cea09222f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 17 May 2022 13:41:19 +0200 Subject: [PATCH 0037/2104] Reset changelog. --- CHANGELOG.rst | 296 -------- changelogs/changelog.yaml | 684 +----------------- .../fragments/4065-onepassword-config.yml | 2 - ...35-pritunl-add-mac_addresses-parameter.yml | 3 - ..._dnsrecord-add_multiple_record_support.yml | 3 - .../fragments/4581-vmadm-improvements.yaml | 2 - .../4590-consul-fix-service-checks.yaml | 2 - .../4595-fix-VirtualMediaInsert-iLO4.yml | 10 - changelogs/fragments/4600-mh-delegate.yaml | 2 - ...y-install-deprecate-ansible29-and-210.yaml | 2 - .../fragments/4612-time_filter_zero.yml | 2 - changelogs/fragments/4618-dig-dlv.yml | 2 - .../fragments/4621-terraform-py2-compat.yml | 2 - ...23-opentelemetry_bug_fix_include_tasks.yml | 2 - ...-opentelemetry_bug_fix_hardcoded_value.yml | 2 - .../fragments/4625-fix-filter-filenames.yml | 2 - .../4647-gconftool2-command-arg.yaml | 2 - .../fragments/4648-vmadm-improvements-2.yaml | 2 - .../4649-rax-files-objects-improvements.yaml | 2 - .../fragments/4650-zfs-improvements.yaml | 2 - .../fragments/4651-zypper-checkmode-fix.yaml | 2 - .../fragments/4660-mh-added-do-raise.yaml | 2 - changelogs/fragments/4662-yarn-emoji.yml | 2 - ...ab_hook-use-None-for-non-existent-attr.yml | 2 - changelogs/fragments/5.0.0.yml | 1 - 25 files changed, 2 insertions(+), 1033 deletions(-) delete mode 100644 changelogs/fragments/4065-onepassword-config.yml delete mode 100644 changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml delete mode 100644 changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml delete mode 100644 changelogs/fragments/4581-vmadm-improvements.yaml delete mode 100644 changelogs/fragments/4590-consul-fix-service-checks.yaml delete mode 100644 changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml delete mode 100644 changelogs/fragments/4600-mh-delegate.yaml delete mode 100644 changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml delete mode 100644 changelogs/fragments/4612-time_filter_zero.yml delete mode 100644 changelogs/fragments/4618-dig-dlv.yml delete mode 100644 changelogs/fragments/4621-terraform-py2-compat.yml delete mode 100644 changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml delete mode 100644 changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml delete mode 100644 changelogs/fragments/4625-fix-filter-filenames.yml delete mode 100644 changelogs/fragments/4647-gconftool2-command-arg.yaml delete mode 100644 changelogs/fragments/4648-vmadm-improvements-2.yaml delete mode 100644 changelogs/fragments/4649-rax-files-objects-improvements.yaml delete mode 100644 changelogs/fragments/4650-zfs-improvements.yaml delete mode 100644 changelogs/fragments/4651-zypper-checkmode-fix.yaml delete mode 100644 changelogs/fragments/4660-mh-added-do-raise.yaml delete mode 100644 changelogs/fragments/4662-yarn-emoji.yml delete mode 100644 changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml delete mode 100644 changelogs/fragments/5.0.0.yml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 48944c099e..7b796ddb34 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,299 +3,3 @@ Community General Release Notes =============================== .. contents:: Topics - -This changelog describes changes after version 4.0.0. - -v5.0.0-a1 -========= - -Release Summary ---------------- - -Alpha release for community.general 5.0.0. - -Major Changes -------------- - -- The community.general collection no longer supports Ansible 2.9 and ansible-base 2.10. While we take no active measures to prevent usage, we will remove a lot of compatibility code and other compatility measures that will effectively prevent using most content from this collection with Ansible 2.9, and some content of this collection with ansible-base 2.10. Both Ansible 2.9 and ansible-base 2.10 will very soon be End of Life and if you are still using them, you should consider upgrading to ansible-core 2.11 or later as soon as possible (https://github.com/ansible-collections/community.general/pull/4548). - -Minor Changes -------------- - -- Avoid internal ansible-core module_utils in favor of equivalent public API available since at least Ansible 2.9. This fixes some instances added since the last time this was fixed (https://github.com/ansible-collections/community.general/pull/4232). -- Remove vendored copy of ``distutils.version`` in favor of vendored copy included with ansible-core 2.12+. For ansible-core 2.11, uses ``distutils.version`` for Python < 3.12. There is no support for ansible-core 2.11 with Python 3.12+ (https://github.com/ansible-collections/community.general/pull/3988). -- aix_filesystem - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3833). -- aix_lvg - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3834). -- alternatives - add ``state`` parameter, which provides control over whether the alternative should be set as the active selection for its alternatives group (https://github.com/ansible-collections/community.general/issues/4543, https://github.com/ansible-collections/community.general/pull/4557). -- ansible_galaxy_install - added option ``no_deps`` to the module (https://github.com/ansible-collections/community.general/issues/4174). -- atomic_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- clc_alert_policy - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). -- clc_group - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). -- clc_loadbalancer - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). -- clc_server - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). -- cmd_runner module util - reusable command runner with consistent argument formatting and sensible defaults (https://github.com/ansible-collections/community.general/pull/4476). -- cobbler inventory plugin - add ``include_profiles`` option (https://github.com/ansible-collections/community.general/pull/4068). -- datadog_monitor - support new datadog event monitor of type `event-v2 alert` (https://github.com/ansible-collections/community.general/pull/4457) -- filesystem - add support for resizing btrfs (https://github.com/ansible-collections/community.general/issues/4465). -- gitlab - add more token authentication support with the new options ``api_oauth_token`` and ``api_job_token`` (https://github.com/ansible-collections/community.general/issues/705). -- gitlab - clean up modules and utils (https://github.com/ansible-collections/community.general/pull/3694). -- gitlab_group, gitlab_project - add new option ``avatar_path`` (https://github.com/ansible-collections/community.general/pull/3792). -- gitlab_group_variable - new ``variables`` parameter (https://github.com/ansible-collections/community.general/pull/4038 and https://github.com/ansible-collections/community.general/issues/4074). -- gitlab_project - add new option ``default_branch`` to gitlab_project (if ``readme = true``) (https://github.com/ansible-collections/community.general/pull/3792). -- gitlab_project_variable - new ``variables`` parameter (https://github.com/ansible-collections/community.general/issues/4038). -- hponcfg - revamped module using ModuleHelper (https://github.com/ansible-collections/community.general/pull/3840). -- icinga2 inventory plugin - added the ``display_name`` field to variables (https://github.com/ansible-collections/community.general/issues/3875, https://github.com/ansible-collections/community.general/pull/3906). -- icinga2 inventory plugin - implemented constructed interface (https://github.com/ansible-collections/community.general/pull/4088). -- icinga2 inventory plugin - inventory object names are changable using ``inventory_attr`` in your config file to the host object name, address, or display_name fields (https://github.com/ansible-collections/community.general/issues/3875, https://github.com/ansible-collections/community.general/pull/3906). -- ip_netns - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3822). -- ipa_dnszone - ``dynamicupdate`` is now a boolean parameter, instead of a string parameter accepting ``"true"`` and ``"false"``. Also the module is now idempotent with respect to ``dynamicupdate`` (https://github.com/ansible-collections/community.general/pull/3374). -- ipa_dnszone - add DNS zone synchronization support (https://github.com/ansible-collections/community.general/pull/3374). -- ipa_service - add ``skip_host_check`` parameter. (https://github.com/ansible-collections/community.general/pull/4417). -- ipmi_boot - add support for user-specified IPMI encryption key (https://github.com/ansible-collections/community.general/issues/3698). -- ipmi_power - add ``machine`` option to ensure the power state via the remote target address (https://github.com/ansible-collections/community.general/pull/3968). -- ipmi_power - add support for user-specified IPMI encryption key (https://github.com/ansible-collections/community.general/issues/3698). -- iso_extract - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3805). -- java_cert - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3835). -- jira - add support for Bearer token auth (https://github.com/ansible-collections/community.general/pull/3838). -- jira - when creating a comment, ``fields`` now is used for additional data (https://github.com/ansible-collections/community.general/pull/4304). -- keycloak_* modules - added connection timeout parameter when calling server (https://github.com/ansible-collections/community.general/pull/4168). -- keycloak_client - add ``always_display_in_console`` parameter (https://github.com/ansible-collections/community.general/issues/4390). -- keycloak_client - add ``default_client_scopes`` and ``optional_client_scopes`` parameters. (https://github.com/ansible-collections/community.general/pull/4385). -- keycloak_user_federation - add sssd user federation support (https://github.com/ansible-collections/community.general/issues/3767). -- ldap_entry - add support for recursive deletion (https://github.com/ansible-collections/community.general/issues/3613). -- linode inventory plugin - add support for caching inventory results (https://github.com/ansible-collections/community.general/pull/4179). -- linode inventory plugin - allow templating of ``access_token`` variable in Linode inventory plugin (https://github.com/ansible-collections/community.general/pull/4040). -- listen_ports_facts - add support for ``ss`` command besides ``netstat`` (https://github.com/ansible-collections/community.general/pull/3708). -- lists_mergeby filter plugin - add parameters ``list_merge`` and ``recursive``. These are only supported when used with ansible-base 2.10 or ansible-core, but not with Ansible 2.9 (https://github.com/ansible-collections/community.general/pull/4058). -- logentries - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3807). -- logstash_plugin - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3808). -- lxc_container - added ``wait_for_container`` parameter. If ``true`` the module will wait until the running task reports success as the status (https://github.com/ansible-collections/community.general/pull/4039). -- lxc_container - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3851). -- lxd connection plugin - make sure that ``ansible_lxd_host``, ``ansible_executable``, and ``ansible_lxd_executable`` work (https://github.com/ansible-collections/community.general/pull/3798). -- lxd inventory plugin - support virtual machines (https://github.com/ansible-collections/community.general/pull/3519). -- lxd_container - adds ``project`` option to allow selecting project for LXD instance (https://github.com/ansible-collections/community.general/pull/4479). -- lxd_container - adds ``type`` option which also allows to operate on virtual machines and not just containers (https://github.com/ansible-collections/community.general/pull/3661). -- lxd_profile - adds ``project`` option to allow selecting project for LXD profile (https://github.com/ansible-collections/community.general/pull/4479). -- mail callback plugin - add ``Message-ID`` and ``Date`` headers (https://github.com/ansible-collections/community.general/issues/4055, https://github.com/ansible-collections/community.general/pull/4056). -- mail callback plugin - properly use Ansible's option handling to split lists (https://github.com/ansible-collections/community.general/pull/4140). -- mattermost - add the possibility to send attachments instead of text messages (https://github.com/ansible-collections/community.general/pull/3946). -- mksysb - revamped the module using ``ModuleHelper`` (https://github.com/ansible-collections/community.general/pull/3295). -- module_helper module utils - added decorators ``check_mode_skip`` and ``check_mode_skip_returns`` for skipping methods when ``check_mode=True`` (https://github.com/ansible-collections/community.general/pull/3849). -- monit - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3821). -- nmap inventory plugin - add ``sudo`` option in plugin in order to execute ``sudo nmap`` so that ``nmap`` runs with elevated privileges (https://github.com/ansible-collections/community.general/pull/4506). -- nmcli - add ``wireguard`` connection type (https://github.com/ansible-collections/community.general/pull/3985). -- nmcli - add missing connection aliases ``802-3-ethernet`` and ``802-11-wireless`` (https://github.com/ansible-collections/community.general/pull/4108). -- nmcli - add multiple addresses support for ``ip4`` parameter (https://github.com/ansible-collections/community.general/issues/1088, https://github.com/ansible-collections/community.general/pull/3738). -- nmcli - add multiple addresses support for ``ip6`` parameter (https://github.com/ansible-collections/community.general/issues/1088). -- nmcli - add support for ``eui64`` and ``ipv6privacy`` parameters (https://github.com/ansible-collections/community.general/issues/3357). -- nmcli - adds ``routes6`` and ``route_metric6`` parameters for supporting IPv6 routes (https://github.com/ansible-collections/community.general/issues/4059). -- nmcli - remove nmcli modify dependency on ``type`` parameter (https://github.com/ansible-collections/community.general/issues/2858). -- nomad_job - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- nomad_job_info - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- npm - add ability to use ``production`` flag when ``ci`` is set (https://github.com/ansible-collections/community.general/pull/4299). -- open_iscsi - extended module to allow rescanning of established session for one or all targets (https://github.com/ansible-collections/community.general/issues/3763). -- opennebula - add the release action for VMs in the ``HOLD`` state (https://github.com/ansible-collections/community.general/pull/4036). -- opentelemetry_plugin - enrich service when using the ``docker_login`` (https://github.com/ansible-collections/community.general/pull/4104). -- opentelemetry_plugin - enrich service when using the ``jenkins``, ``hetzner`` or ``jira`` modules (https://github.com/ansible-collections/community.general/pull/4105). -- packet_device - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- packet_sshkey - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- packet_volume - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- pacman - add ``remove_nosave`` parameter to avoid saving modified configuration files as ``.pacsave`` files. (https://github.com/ansible-collections/community.general/pull/4316, https://github.com/ansible-collections/community.general/issues/4315). -- pacman - add ``stdout`` and ``stderr`` as return values (https://github.com/ansible-collections/community.general/pull/3758). -- pacman - now implements proper change detection for ``update_cache=true``. Adds ``cache_updated`` return value to when ``update_cache=true`` to report this result independently of the module's overall changed return value (https://github.com/ansible-collections/community.general/pull/4337). -- pacman - the module has been rewritten and is now much faster when using ``state=latest``. Operations are now done all packages at once instead of package per package and the configured output format of ``pacman`` no longer affect the module's operation. (https://github.com/ansible-collections/community.general/pull/3907, https://github.com/ansible-collections/community.general/issues/3783, https://github.com/ansible-collections/community.general/issues/4079) -- passwordstore lookup plugin - add configurable ``lock`` and ``locktimeout`` options to avoid race conditions in itself and in the ``pass`` utility it calls. By default, the plugin now locks on write operations (https://github.com/ansible-collections/community.general/pull/4194). -- pipx - added options ``editable`` and ``pip_args`` (https://github.com/ansible-collections/community.general/issues/4300). -- profitbricks - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- proxmox - add ``clone`` parameter (https://github.com/ansible-collections/community.general/pull/3930). -- proxmox - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- proxmox inventory plugin - add support for client-side jinja filters (https://github.com/ansible-collections/community.general/issues/3553). -- proxmox inventory plugin - add support for templating the ``url``, ``user``, and ``password`` options (https://github.com/ansible-collections/community.general/pull/4418). -- proxmox inventory plugin - add token authentication as an alternative to username/password (https://github.com/ansible-collections/community.general/pull/4540). -- proxmox inventory plugin - parse LXC configs returned by the proxmox API (https://github.com/ansible-collections/community.general/pull/4472). -- proxmox modules - move ``HAS_PROXMOXER`` check into ``module_utils`` (https://github.com/ansible-collections/community.general/pull/4030). -- proxmox modules - move common code into ``module_utils`` (https://github.com/ansible-collections/community.general/pull/4029). -- proxmox_kvm - added EFI disk support when creating VM with OVMF UEFI BIOS with new ``efidisk0`` option (https://github.com/ansible-collections/community.general/pull/4106, https://github.com/ansible-collections/community.general/issues/1638). -- proxmox_kwm - add ``win11`` to ``ostype`` parameter for Windows 11 and Windows Server 2022 support (https://github.com/ansible-collections/community.general/issues/4023, https://github.com/ansible-collections/community.general/pull/4191). -- proxmox_snap - add restore snapshot option (https://github.com/ansible-collections/community.general/pull/4377). -- proxmox_snap - fixed timeout value to correctly reflect time in seconds. The timeout was off by one second (https://github.com/ansible-collections/community.general/pull/4377). -- puppet - remove deprecation for ``show_diff`` parameter. Its alias ``show-diff`` is still deprecated and will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/3980). -- python_requirements_info - returns python version broken down into its components, and some minor refactoring (https://github.com/ansible-collections/community.general/pull/3797). -- redfish_command - add ``GetHostInterfaces`` command to enable reporting Redfish Host Interface information (https://github.com/ansible-collections/community.general/issues/3693). -- redfish_command - add ``IndicatorLedOn``, ``IndicatorLedOff``, and ``IndicatorLedBlink`` commands to the Systems category for controling system LEDs (https://github.com/ansible-collections/community.general/issues/4084). -- redfish_command - add ``SetHostInterface`` command to enable configuring the Redfish Host Interface (https://github.com/ansible-collections/community.general/issues/3632). -- redis - add authentication parameters ``login_user``, ``tls``, ``validate_certs``, and ``ca_certs`` (https://github.com/ansible-collections/community.general/pull/4207). -- scaleway inventory plugin - add profile parameter ``scw_profile`` (https://github.com/ansible-collections/community.general/pull/4049). -- scaleway_compute - add possibility to use project identifier (new ``project`` option) instead of deprecated organization identifier (https://github.com/ansible-collections/community.general/pull/3951). -- scaleway_volume - all volumes are systematically created on par1 (https://github.com/ansible-collections/community.general/pull/3964). -- seport - minor refactoring (https://github.com/ansible-collections/community.general/pull/4471). -- smartos_image_info - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- snap - add option ``options`` permitting to set options using the ``snap set`` command (https://github.com/ansible-collections/community.general/pull/3943). -- sudoers - add support for ``runas`` parameter (https://github.com/ansible-collections/community.general/issues/4379). -- svc - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3829). -- syslog_json - add option to skip logging of ``gather_facts`` playbook tasks; use v2 callback API (https://github.com/ansible-collections/community.general/pull/4223). -- terraform - adds ``terraform_upgrade`` parameter which allows ``terraform init`` to satisfy new provider constraints in an existing Terraform project (https://github.com/ansible-collections/community.general/issues/4333). -- udm_group - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). -- udm_share - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). -- vmadm - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- webfaction_app - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- webfaction_db - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). -- xattr - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3806). -- xfconf - added missing value types ``char``, ``uchar``, ``int64`` and ``uint64`` (https://github.com/ansible-collections/community.general/pull/4534). -- xfconf - minor refactor on the base class for the module (https://github.com/ansible-collections/community.general/pull/3919). -- zypper - add support for ``--clean-deps`` option to remove packages that depend on a package being removed (https://github.com/ansible-collections/community.general/pull/4195). - -Breaking Changes / Porting Guide --------------------------------- - -- Parts of this collection do not work with ansible-core 2.11 on Python 3.12+. Please either upgrade to ansible-core 2.12+, or use Python 3.11 or earlier (https://github.com/ansible-collections/community.general/pull/3988). -- The symbolic links used to implement flatmapping for all modules were removed and replaced by ``meta/runtime.yml`` redirects. This effectively breaks compatibility with Ansible 2.9 for all modules (without using their "long" names, which is discouraged and which can change without previous notice since they are considered an implementation detail) (https://github.com/ansible-collections/community.general/pull/4548). -- a_module test plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- archive - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- git_config - remove Ansible 2.9 and early ansible-base 2.10 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- java_keystore - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- lists_mergeby filter plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- maven_artifact - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- memcached cache plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- path_join filter plugin shim - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). -- redis cache plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - -Deprecated Features -------------------- - -- gem - the default of the ``norc`` option has been deprecated and will change to ``true`` in community.general 6.0.0. Explicitly specify a value to avoid a deprecation warning (https://github.com/ansible-collections/community.general/pull/4517). -- mail callback plugin - not specifying ``sender`` is deprecated and will be disallowed in community.general 6.0.0 (https://github.com/ansible-collections/community.general/pull/4140). -- module_helper module utils - deprecated the attribute ``ModuleHelper.VarDict`` (https://github.com/ansible-collections/community.general/pull/3801). -- nmcli - deprecate default hairpin mode for a bridge. This so we can change it to ``false`` in community.general 7.0.0, as this is also the default in ``nmcli`` (https://github.com/ansible-collections/community.general/pull/4334). -- pacman - from community.general 5.0.0 on, the ``changed`` status of ``update_cache`` will no longer be ignored if ``name`` or ``upgrade`` is specified. To keep the old behavior, add something like ``register: result`` and ``changed_when: result.packages | length > 0`` to your task (https://github.com/ansible-collections/community.general/pull/4329). -- proxmox inventory plugin - the current default ``true`` of the ``want_proxmox_nodes_ansible_host`` option has been deprecated. The default will change to ``false`` in community.general 6.0.0. To keep the current behavior, explicitly set ``want_proxmox_nodes_ansible_host`` to ``true`` in your inventory configuration. We suggest to already switch to the new behavior by explicitly setting it to ``false``, and by using ``compose:`` to set ``ansible_host`` to the correct value. See the examples in the plugin documentation for details (https://github.com/ansible-collections/community.general/pull/4466). -- vmadm - deprecated module parameter ``debug`` that was not used anywhere (https://github.com/ansible-collections/community.general/pull/4580). - -Removed Features (previously deprecated) ----------------------------------------- - -- ali_instance_info - removed the options ``availability_zone``, ``instance_ids``, and ``instance_names``. Use filter item ``zone_id`` instead of ``availability_zone``, filter item ``instance_ids`` instead of ``instance_ids``, and filter item ``instance_name`` instead of ``instance_names`` (https://github.com/ansible-collections/community.general/pull/4516). -- apt_rpm - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). -- compose - removed various deprecated aliases. Use the version with ``_`` instead of ``-`` instead (https://github.com/ansible-collections/community.general/pull/4516). -- dnsimple - remove support for dnsimple < 2.0.0 (https://github.com/ansible-collections/community.general/pull/4516). -- github_deploy_key - removed the deprecated alias ``2fa_token`` of ``otp`` (https://github.com/ansible-collections/community.general/pull/4516). -- homebrew, homebrew_cask - removed the deprecated alias ``update-brew`` of ``update_brew`` (https://github.com/ansible-collections/community.general/pull/4516). -- linode - removed the ``backupsenabled`` option. Use ``backupweeklyday`` or ``backupwindow`` to enable backups (https://github.com/ansible-collections/community.general/pull/4516). -- opkg - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). -- pacman - if ``update_cache=true`` is used with ``name`` or ``upgrade``, the changed state will now also indicate if only the cache was updated. To keep the old behavior - only indicate ``changed`` when a package was installed/upgraded -, use ``changed_when`` as indicated in the module examples (https://github.com/ansible-collections/community.general/pull/4516). -- pacman - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). -- proxmox, proxmox_kvm, proxmox_snap - no longer allow to specify a VM name that matches multiple VMs. If this happens, the modules now fail (https://github.com/ansible-collections/community.general/pull/4516). -- serverless - removed the ``functions`` option. It was not used by the module (https://github.com/ansible-collections/community.general/pull/4516). -- slackpkg - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). -- urpmi - removed the deprecated alias ``no-recommends`` of ``no_recommends`` (https://github.com/ansible-collections/community.general/pull/4516). -- urpmi - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). -- xbps - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). -- xfconf - the ``get`` state has been removed. Use the ``xfconf_info`` module instead (https://github.com/ansible-collections/community.general/pull/4516). - -Bugfixes --------- - -- Various modules and plugins - use vendored version of ``distutils.version`` instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/community.general/pull/3936). -- a_module test plugin - fix crash when testing a module name that was tombstoned (https://github.com/ansible-collections/community.general/pull/3660). -- alternatives - fix output parsing for alternatives groups (https://github.com/ansible-collections/community.general/pull/3976). -- cargo - fix detection of outdated packages when ``state=latest`` (https://github.com/ansible-collections/community.general/pull/4052). -- cargo - fix incorrectly reported changed status for packages with a name containing a hyphen (https://github.com/ansible-collections/community.general/issues/4044, https://github.com/ansible-collections/community.general/pull/4052). -- counter_enabled callback plugin - fix output to correctly display host and task counters in serial mode (https://github.com/ansible-collections/community.general/pull/3709). -- dconf - skip processes that disappeared while we inspected them (https://github.com/ansible-collections/community.general/issues/4151). -- dnsmadeeasy - fix failure on deleting DNS entries when API response does not contain monitor value (https://github.com/ansible-collections/community.general/issues/3620). -- dsv lookup plugin - raise an Ansible error if the wrong ``python-dsv-sdk`` version is installed (https://github.com/ansible-collections/community.general/pull/4422). -- filesize - add support for busybox dd implementation, that is used by default on Alpine linux (https://github.com/ansible-collections/community.general/pull/4288, https://github.com/ansible-collections/community.general/issues/4259). -- git_branch - remove deprecated and unnecessary branch ``unprotect`` method (https://github.com/ansible-collections/community.general/pull/4496). -- github_repo - ``private`` and ``description`` attributes should not be set to default values when the repo already exists (https://github.com/ansible-collections/community.general/pull/2386). -- gitlab_group - improve searching for projects inside group on deletion (https://github.com/ansible-collections/community.general/pull/4491). -- gitlab_group_members - handle more than 20 groups when finding a group (https://github.com/ansible-collections/community.general/pull/4491, https://github.com/ansible-collections/community.general/issues/4460, https://github.com/ansible-collections/community.general/issues/3729). -- gitlab_group_variable - add missing documentation about GitLab versions that support ``environment_scope`` and ``variable_type`` (https://github.com/ansible-collections/community.general/pull/4038). -- gitlab_group_variable - allow to set same variable name under different environment scopes. Due this change, the return value ``group_variable`` differs from previous version in check mode. It was counting ``updated`` values, because it was accidentally overwriting environment scopes (https://github.com/ansible-collections/community.general/pull/4038). -- gitlab_group_variable - fix idempotent change behaviour for float and integer variables (https://github.com/ansible-collections/community.general/pull/4038). -- gitlab_hook - handle more than 20 hooks when finding a hook (https://github.com/ansible-collections/community.general/pull/4491). -- gitlab_project - handle more than 20 namespaces when finding a namespace (https://github.com/ansible-collections/community.general/pull/4491). -- gitlab_project_members - handle more than 20 projects and users when finding a project resp. user (https://github.com/ansible-collections/community.general/pull/4491). -- gitlab_project_variable - ``value`` is not necessary when deleting variables (https://github.com/ansible-collections/community.general/pull/4150). -- gitlab_project_variable - add missing documentation about GitLab versions that support ``environment_scope`` and ``variable_type`` (https://github.com/ansible-collections/community.general/issues/4038). -- gitlab_project_variable - allow to set same variable name under different environment scopes. Due this change, the return value ``project_variable`` differs from previous version in check mode. It was counting ``updated`` values, because it was accidentally overwriting environment scopes (https://github.com/ansible-collections/community.general/issues/4038). -- gitlab_project_variable - fix idempotent change behaviour for float and integer variables (https://github.com/ansible-collections/community.general/issues/4038). -- gitlab_runner - make ``project`` and ``owned`` mutually exclusive (https://github.com/ansible-collections/community.general/pull/4136). -- gitlab_runner - use correct API endpoint to create and retrieve project level runners when using ``project`` (https://github.com/ansible-collections/community.general/pull/3965). -- gitlab_user - handle more than 20 users and SSH keys when finding a user resp. SSH key (https://github.com/ansible-collections/community.general/pull/4491). -- homebrew_cask - fix force install operation (https://github.com/ansible-collections/community.general/issues/3703). -- icinga2 inventory plugin - handle 404 error when filter produces no results (https://github.com/ansible-collections/community.general/issues/3875, https://github.com/ansible-collections/community.general/pull/3906). -- imc_rest - fixes the module failure due to the usage of ``itertools.izip_longest`` which is not available in Python 3 (https://github.com/ansible-collections/community.general/issues/4206). -- ini_file - when removing nothing do not report changed (https://github.com/ansible-collections/community.general/issues/4154). -- interfaces_file - fixed the check for existing option in interface (https://github.com/ansible-collections/community.general/issues/3841). -- jail connection plugin - replace deprecated ``distutils.spawn.find_executable`` with Ansible's ``get_bin_path`` to find the executable (https://github.com/ansible-collections/community.general/pull/3934). -- jira - fixed bug where module returns error related to dictionary key ``body`` (https://github.com/ansible-collections/community.general/issues/3419). -- keycloak - fix parameters types for ``defaultDefaultClientScopes`` and ``defaultOptionalClientScopes`` from list of dictionaries to list of strings (https://github.com/ansible-collections/community.general/pull/4526). -- keycloak_* - the documented ``validate_certs`` parameter was not taken into account when calling the ``open_url`` function in some cases, thus enforcing certificate validation even when ``validate_certs`` was set to ``false``. (https://github.com/ansible-collections/community.general/pull/4382) -- keycloak_user_federation - creating a user federation while specifying an ID (that does not exist yet) no longer fail with a 404 Not Found (https://github.com/ansible-collections/community.general/pull/4212). -- keycloak_user_federation - mappers auto-created by keycloak are matched and merged by their name and no longer create duplicated entries (https://github.com/ansible-collections/community.general/pull/4212). -- ldap_search - allow it to be used even in check mode (https://github.com/ansible-collections/community.general/issues/3619). -- linode inventory plugin - fix configuration handling relating to inventory filtering (https://github.com/ansible-collections/community.general/pull/4336). -- listen_ports_facts - local port regex was not handling well IPv6 only binding. Fixes the regex for ``ss`` (https://github.com/ansible-collections/community.general/pull/4092). -- lvol - allows logical volumes to be created with certain size arguments prefixed with ``+`` to preserve behavior of older versions of this module (https://github.com/ansible-collections/community.general/issues/3665). -- lxd connection plugin - replace deprecated ``distutils.spawn.find_executable`` with Ansible's ``get_bin_path`` to find the ``lxc`` executable (https://github.com/ansible-collections/community.general/pull/3934). -- lxd inventory plugin - do not crash if OS and release metadata are not present - (https://github.com/ansible-collections/community.general/pull/4351). -- mail callback plugin - fix crash on Python 3 (https://github.com/ansible-collections/community.general/issues/4025, https://github.com/ansible-collections/community.general/pull/4026). -- mail callback plugin - fix encoding of the name of sender and recipient (https://github.com/ansible-collections/community.general/issues/4060, https://github.com/ansible-collections/community.general/pull/4061). -- mksysb - fixed bug for parameter ``backup_dmapi_fs`` was passing the wrong CLI argument (https://github.com/ansible-collections/community.general/pull/3295). -- nmcli - fix returning "changed" when no mask set for IPv4 or IPv6 addresses on task rerun (https://github.com/ansible-collections/community.general/issues/3768). -- nmcli - fix returning "changed" when routes parameters set, also suggest new routes4 and routes6 format (https://github.com/ansible-collections/community.general/issues/4131). -- nmcli - fixed falsely reported changed status when ``mtu`` is omitted with ``dummy`` connections (https://github.com/ansible-collections/community.general/issues/3612, https://github.com/ansible-collections/community.general/pull/3625). -- nmcli - pass ``flags``, ``ingress``, ``egress`` params to ``nmcli`` (https://github.com/ansible-collections/community.general/issues/1086). -- nrdp callback plugin - fix error ``string arguments without an encoding`` (https://github.com/ansible-collections/community.general/issues/3903). -- opennebula inventory plugin - complete the implementation of ``constructable`` for opennebula inventory plugin. Now ``keyed_groups``, ``compose``, ``groups`` actually work (https://github.com/ansible-collections/community.general/issues/4497). -- opentelemetry - fix generating a trace with a task containing ``no_log: true`` (https://github.com/ansible-collections/community.general/pull/4043). -- opentelemetry_plugin - honour ``ignore_errors`` when a task has failed instead of reporting an error (https://github.com/ansible-collections/community.general/pull/3837). -- pacman - Use ``--groups`` instead of ``--group`` (https://github.com/ansible-collections/community.general/pull/4312). -- pacman - fix URL based package installation (https://github.com/ansible-collections/community.general/pull/4286, https://github.com/ansible-collections/community.general/issues/4285). -- pacman - fix ``upgrade=yes`` (https://github.com/ansible-collections/community.general/pull/4275, https://github.com/ansible-collections/community.general/issues/4274). -- pacman - fixed bug where ``absent`` state did not work for locally installed packages (https://github.com/ansible-collections/community.general/pull/4464). -- pacman - make sure that ``packages`` is always returned when ``name`` or ``upgrade`` is specified, also if nothing is done (https://github.com/ansible-collections/community.general/pull/4329). -- pacman - when the ``update_cache`` option is combined with another option such as ``upgrade``, report ``changed`` based on the actions performed by the latter option. This was the behavior in community.general 4.4.0 and before. In community.general 4.5.0, a task combining these options would always report ``changed`` (https://github.com/ansible-collections/community.general/pull/4318). -- passwordstore lookup plugin - fix error detection for non-English locales (https://github.com/ansible-collections/community.general/pull/4219). -- passwordstore lookup plugin - prevent returning path names as passwords by accident (https://github.com/ansible-collections/community.general/issues/4185, https://github.com/ansible-collections/community.general/pull/4192). -- passwordstore lookup plugin - replace deprecated ``distutils.util.strtobool`` with Ansible's ``convert_bool.boolean`` to interpret values for the ``create``, ``returnall``, ``overwrite``, 'backup``, and ``nosymbols`` options (https://github.com/ansible-collections/community.general/pull/3934). -- pipx - passes the correct command line option ``--include-apps`` (https://github.com/ansible-collections/community.general/issues/3791). -- pritunl - fixed bug where pritunl plugin api add unneeded data in ``auth_string`` parameter (https://github.com/ansible-collections/community.general/issues/4527). -- proxmox - fixed ``onboot`` parameter causing module failures when undefined (https://github.com/ansible-collections/community.general/issues/3844). -- proxmox inventory plugin - always convert strings that follow the ``key=value[,key=value[...]]`` form into dictionaries (https://github.com/ansible-collections/community.general/pull/4349). -- proxmox inventory plugin - fix error when parsing container with LXC configs (https://github.com/ansible-collections/community.general/issues/4472, https://github.com/ansible-collections/community.general/pull/4472). -- proxmox inventory plugin - fixed the ``description`` field being ignored if it contained a comma (https://github.com/ansible-collections/community.general/issues/4348). -- proxmox inventory plugin - fixed the ``tags_parsed`` field when Proxmox returns a single space for the ``tags`` entry (https://github.com/ansible-collections/community.general/pull/4378). -- proxmox_kvm - fix a bug when getting a state of VM without name will fail (https://github.com/ansible-collections/community.general/pull/4508). -- proxmox_kvm - fix error in check when creating or cloning (https://github.com/ansible-collections/community.general/pull/4306). -- proxmox_kvm - fix error when checking whether Proxmox VM exists (https://github.com/ansible-collections/community.general/pull/4287). -- python_requirements_info - fails if version operator used without version (https://github.com/ansible-collections/community.general/pull/3785). -- python_requirements_info - store ``mismatched`` return values per package as documented in the module (https://github.com/ansible-collections/community.general/pull/4078). -- say callback plugin - replace deprecated ``distutils.spawn.find_executable`` with Ansible's ``get_bin_path`` to find the ``say`` resp. ``espeak`` executables (https://github.com/ansible-collections/community.general/pull/3934). -- scaleway_user_data - fix double-quote added where no double-quote is needed to user data in scaleway's server (``Content-type`` -> ``Content-Type``) (https://github.com/ansible-collections/community.general/pull/3940). -- slack - add ``charset`` to HTTP headers to avoid Slack API warning (https://github.com/ansible-collections/community.general/issues/3932). -- terraform - fix command options being ignored during planned/plan in function ``build_plan`` such as ``lock`` or ``lock_timeout`` (https://github.com/ansible-collections/community.general/issues/3707, https://github.com/ansible-collections/community.general/pull/3726). -- vdo - fix options error (https://github.com/ansible-collections/community.general/pull/4163). -- xattr - fix exception caused by ``_run_xattr()`` raising a ``ValueError`` due to a mishandling of base64-encoded value (https://github.com/ansible-collections/community.general/issues/3673). -- xbps - fix error message that is reported when installing packages fails (https://github.com/ansible-collections/community.general/pull/4438). -- yarn - fix incorrect handling of ``yarn list`` and ``yarn global list`` output that could result in fatal error (https://github.com/ansible-collections/community.general/pull/4050). -- yarn - fix incorrectly reported status when installing a package globally (https://github.com/ansible-collections/community.general/issues/4045, https://github.com/ansible-collections/community.general/pull/4050). -- yarn - fix missing ``~`` expansion in yarn global install folder which resulted in incorrect task status (https://github.com/ansible-collections/community.general/issues/4045, https://github.com/ansible-collections/community.general/pull/4048). -- yum_versionlock - fix matching of existing entries with names passed to the module. Match yum and dnf lock format (https://github.com/ansible-collections/community.general/pull/4183). -- zone connection plugin - replace deprecated ``distutils.spawn.find_executable`` with Ansible's ``get_bin_path`` to find the executable (https://github.com/ansible-collections/community.general/pull/3934). -- zypper - fixed bug that caused zypper to always report [ok] and do nothing on ``state=present`` when all packages in ``name`` had a version specification (https://github.com/ansible-collections/community.general/issues/4371, https://github.com/ansible-collections/community.general/pull/4421). - -Known Issues ------------- - -- pacman - ``update_cache`` cannot differentiate between up to date and outdated package lists and will report ``changed`` in both situations (https://github.com/ansible-collections/community.general/pull/4318). -- pacman - binaries specified in the ``executable`` parameter must support ``--print-format`` in order to be used by this module. In particular, AUR helper ``yay`` is known not to currently support it (https://github.com/ansible-collections/community.general/pull/4312). - -New Plugins ------------ - -Filter -~~~~~~ - -- counter - Counts hashable elements in a sequence diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 4ae5ea7c43..3ec4909999 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1,682 +1,2 @@ -ancestor: 4.0.0 -releases: - 5.0.0-a1: - changes: - breaking_changes: - - Parts of this collection do not work with ansible-core 2.11 on Python 3.12+. - Please either upgrade to ansible-core 2.12+, or use Python 3.11 or earlier - (https://github.com/ansible-collections/community.general/pull/3988). - - The symbolic links used to implement flatmapping for all modules were removed - and replaced by ``meta/runtime.yml`` redirects. This effectively breaks compatibility - with Ansible 2.9 for all modules (without using their "long" names, which - is discouraged and which can change without previous notice since they are - considered an implementation detail) (https://github.com/ansible-collections/community.general/pull/4548). - - a_module test plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - - archive - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - - git_config - remove Ansible 2.9 and early ansible-base 2.10 compatibility - code (https://github.com/ansible-collections/community.general/pull/4548). - - java_keystore - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - - lists_mergeby filter plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - - maven_artifact - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - - memcached cache plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - - path_join filter plugin shim - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - - redis cache plugin - remove Ansible 2.9 compatibility code (https://github.com/ansible-collections/community.general/pull/4548). - bugfixes: - - Various modules and plugins - use vendored version of ``distutils.version`` - instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/community.general/pull/3936). - - a_module test plugin - fix crash when testing a module name that was tombstoned - (https://github.com/ansible-collections/community.general/pull/3660). - - alternatives - fix output parsing for alternatives groups (https://github.com/ansible-collections/community.general/pull/3976). - - cargo - fix detection of outdated packages when ``state=latest`` (https://github.com/ansible-collections/community.general/pull/4052). - - cargo - fix incorrectly reported changed status for packages with a name containing - a hyphen (https://github.com/ansible-collections/community.general/issues/4044, - https://github.com/ansible-collections/community.general/pull/4052). - - counter_enabled callback plugin - fix output to correctly display host and - task counters in serial mode (https://github.com/ansible-collections/community.general/pull/3709). - - dconf - skip processes that disappeared while we inspected them (https://github.com/ansible-collections/community.general/issues/4151). - - dnsmadeeasy - fix failure on deleting DNS entries when API response does not - contain monitor value (https://github.com/ansible-collections/community.general/issues/3620). - - dsv lookup plugin - raise an Ansible error if the wrong ``python-dsv-sdk`` - version is installed (https://github.com/ansible-collections/community.general/pull/4422). - - filesize - add support for busybox dd implementation, that is used by default - on Alpine linux (https://github.com/ansible-collections/community.general/pull/4288, - https://github.com/ansible-collections/community.general/issues/4259). - - git_branch - remove deprecated and unnecessary branch ``unprotect`` method - (https://github.com/ansible-collections/community.general/pull/4496). - - github_repo - ``private`` and ``description`` attributes should not be set - to default values when the repo already exists (https://github.com/ansible-collections/community.general/pull/2386). - - 'gitlab_group - improve searching for projects inside group on deletion (https://github.com/ansible-collections/community.general/pull/4491). - - ' - - 'gitlab_group_members - handle more than 20 groups when finding a group (https://github.com/ansible-collections/community.general/pull/4491, - https://github.com/ansible-collections/community.general/issues/4460, https://github.com/ansible-collections/community.general/issues/3729). - - ' - - gitlab_group_variable - add missing documentation about GitLab versions that - support ``environment_scope`` and ``variable_type`` (https://github.com/ansible-collections/community.general/pull/4038). - - 'gitlab_group_variable - allow to set same variable name under different environment - scopes. Due this change, the return value ``group_variable`` differs from - previous version in check mode. It was counting ``updated`` values, because - it was accidentally overwriting environment scopes (https://github.com/ansible-collections/community.general/pull/4038). - - ' - - gitlab_group_variable - fix idempotent change behaviour for float and integer - variables (https://github.com/ansible-collections/community.general/pull/4038). - - 'gitlab_hook - handle more than 20 hooks when finding a hook (https://github.com/ansible-collections/community.general/pull/4491). - - ' - - 'gitlab_project - handle more than 20 namespaces when finding a namespace - (https://github.com/ansible-collections/community.general/pull/4491). - - ' - - 'gitlab_project_members - handle more than 20 projects and users when finding - a project resp. user (https://github.com/ansible-collections/community.general/pull/4491). - - ' - - gitlab_project_variable - ``value`` is not necessary when deleting variables - (https://github.com/ansible-collections/community.general/pull/4150). - - gitlab_project_variable - add missing documentation about GitLab versions - that support ``environment_scope`` and ``variable_type`` (https://github.com/ansible-collections/community.general/issues/4038). - - 'gitlab_project_variable - allow to set same variable name under different - environment scopes. Due this change, the return value ``project_variable`` - differs from previous version in check mode. It was counting ``updated`` values, - because it was accidentally overwriting environment scopes (https://github.com/ansible-collections/community.general/issues/4038). - - ' - - gitlab_project_variable - fix idempotent change behaviour for float and integer - variables (https://github.com/ansible-collections/community.general/issues/4038). - - gitlab_runner - make ``project`` and ``owned`` mutually exclusive (https://github.com/ansible-collections/community.general/pull/4136). - - gitlab_runner - use correct API endpoint to create and retrieve project level - runners when using ``project`` (https://github.com/ansible-collections/community.general/pull/3965). - - 'gitlab_user - handle more than 20 users and SSH keys when finding a user - resp. SSH key (https://github.com/ansible-collections/community.general/pull/4491). - - ' - - homebrew_cask - fix force install operation (https://github.com/ansible-collections/community.general/issues/3703). - - icinga2 inventory plugin - handle 404 error when filter produces no results - (https://github.com/ansible-collections/community.general/issues/3875, https://github.com/ansible-collections/community.general/pull/3906). - - imc_rest - fixes the module failure due to the usage of ``itertools.izip_longest`` - which is not available in Python 3 (https://github.com/ansible-collections/community.general/issues/4206). - - ini_file - when removing nothing do not report changed (https://github.com/ansible-collections/community.general/issues/4154). - - interfaces_file - fixed the check for existing option in interface (https://github.com/ansible-collections/community.general/issues/3841). - - jail connection plugin - replace deprecated ``distutils.spawn.find_executable`` - with Ansible's ``get_bin_path`` to find the executable (https://github.com/ansible-collections/community.general/pull/3934). - - jira - fixed bug where module returns error related to dictionary key ``body`` - (https://github.com/ansible-collections/community.general/issues/3419). - - keycloak - fix parameters types for ``defaultDefaultClientScopes`` and ``defaultOptionalClientScopes`` - from list of dictionaries to list of strings (https://github.com/ansible-collections/community.general/pull/4526). - - keycloak_* - the documented ``validate_certs`` parameter was not taken into - account when calling the ``open_url`` function in some cases, thus enforcing - certificate validation even when ``validate_certs`` was set to ``false``. - (https://github.com/ansible-collections/community.general/pull/4382) - - keycloak_user_federation - creating a user federation while specifying an - ID (that does not exist yet) no longer fail with a 404 Not Found (https://github.com/ansible-collections/community.general/pull/4212). - - keycloak_user_federation - mappers auto-created by keycloak are matched and - merged by their name and no longer create duplicated entries (https://github.com/ansible-collections/community.general/pull/4212). - - ldap_search - allow it to be used even in check mode (https://github.com/ansible-collections/community.general/issues/3619). - - linode inventory plugin - fix configuration handling relating to inventory - filtering (https://github.com/ansible-collections/community.general/pull/4336). - - listen_ports_facts - local port regex was not handling well IPv6 only binding. - Fixes the regex for ``ss`` (https://github.com/ansible-collections/community.general/pull/4092). - - lvol - allows logical volumes to be created with certain size arguments prefixed - with ``+`` to preserve behavior of older versions of this module (https://github.com/ansible-collections/community.general/issues/3665). - - lxd connection plugin - replace deprecated ``distutils.spawn.find_executable`` - with Ansible's ``get_bin_path`` to find the ``lxc`` executable (https://github.com/ansible-collections/community.general/pull/3934). - - 'lxd inventory plugin - do not crash if OS and release metadata are not present - - (https://github.com/ansible-collections/community.general/pull/4351). - - ' - - mail callback plugin - fix crash on Python 3 (https://github.com/ansible-collections/community.general/issues/4025, - https://github.com/ansible-collections/community.general/pull/4026). - - mail callback plugin - fix encoding of the name of sender and recipient (https://github.com/ansible-collections/community.general/issues/4060, - https://github.com/ansible-collections/community.general/pull/4061). - - mksysb - fixed bug for parameter ``backup_dmapi_fs`` was passing the wrong - CLI argument (https://github.com/ansible-collections/community.general/pull/3295). - - nmcli - fix returning "changed" when no mask set for IPv4 or IPv6 addresses - on task rerun (https://github.com/ansible-collections/community.general/issues/3768). - - nmcli - fix returning "changed" when routes parameters set, also suggest new - routes4 and routes6 format (https://github.com/ansible-collections/community.general/issues/4131). - - nmcli - fixed falsely reported changed status when ``mtu`` is omitted with - ``dummy`` connections (https://github.com/ansible-collections/community.general/issues/3612, - https://github.com/ansible-collections/community.general/pull/3625). - - nmcli - pass ``flags``, ``ingress``, ``egress`` params to ``nmcli`` (https://github.com/ansible-collections/community.general/issues/1086). - - nrdp callback plugin - fix error ``string arguments without an encoding`` - (https://github.com/ansible-collections/community.general/issues/3903). - - opennebula inventory plugin - complete the implementation of ``constructable`` - for opennebula inventory plugin. Now ``keyed_groups``, ``compose``, ``groups`` - actually work (https://github.com/ansible-collections/community.general/issues/4497). - - 'opentelemetry - fix generating a trace with a task containing ``no_log: true`` - (https://github.com/ansible-collections/community.general/pull/4043).' - - opentelemetry_plugin - honour ``ignore_errors`` when a task has failed instead - of reporting an error (https://github.com/ansible-collections/community.general/pull/3837). - - pacman - Use ``--groups`` instead of ``--group`` (https://github.com/ansible-collections/community.general/pull/4312). - - pacman - fix URL based package installation (https://github.com/ansible-collections/community.general/pull/4286, - https://github.com/ansible-collections/community.general/issues/4285). - - pacman - fix ``upgrade=yes`` (https://github.com/ansible-collections/community.general/pull/4275, - https://github.com/ansible-collections/community.general/issues/4274). - - pacman - fixed bug where ``absent`` state did not work for locally installed - packages (https://github.com/ansible-collections/community.general/pull/4464). - - pacman - make sure that ``packages`` is always returned when ``name`` or ``upgrade`` - is specified, also if nothing is done (https://github.com/ansible-collections/community.general/pull/4329). - - pacman - when the ``update_cache`` option is combined with another option - such as ``upgrade``, report ``changed`` based on the actions performed by - the latter option. This was the behavior in community.general 4.4.0 and before. - In community.general 4.5.0, a task combining these options would always report - ``changed`` (https://github.com/ansible-collections/community.general/pull/4318). - - passwordstore lookup plugin - fix error detection for non-English locales - (https://github.com/ansible-collections/community.general/pull/4219). - - passwordstore lookup plugin - prevent returning path names as passwords by - accident (https://github.com/ansible-collections/community.general/issues/4185, - https://github.com/ansible-collections/community.general/pull/4192). - - passwordstore lookup plugin - replace deprecated ``distutils.util.strtobool`` - with Ansible's ``convert_bool.boolean`` to interpret values for the ``create``, - ``returnall``, ``overwrite``, 'backup``, and ``nosymbols`` options (https://github.com/ansible-collections/community.general/pull/3934). - - pipx - passes the correct command line option ``--include-apps`` (https://github.com/ansible-collections/community.general/issues/3791). - - pritunl - fixed bug where pritunl plugin api add unneeded data in ``auth_string`` - parameter (https://github.com/ansible-collections/community.general/issues/4527). - - proxmox - fixed ``onboot`` parameter causing module failures when undefined - (https://github.com/ansible-collections/community.general/issues/3844). - - proxmox inventory plugin - always convert strings that follow the ``key=value[,key=value[...]]`` - form into dictionaries (https://github.com/ansible-collections/community.general/pull/4349). - - proxmox inventory plugin - fix error when parsing container with LXC configs - (https://github.com/ansible-collections/community.general/issues/4472, https://github.com/ansible-collections/community.general/pull/4472). - - proxmox inventory plugin - fixed the ``description`` field being ignored if - it contained a comma (https://github.com/ansible-collections/community.general/issues/4348). - - proxmox inventory plugin - fixed the ``tags_parsed`` field when Proxmox returns - a single space for the ``tags`` entry (https://github.com/ansible-collections/community.general/pull/4378). - - proxmox_kvm - fix a bug when getting a state of VM without name will fail - (https://github.com/ansible-collections/community.general/pull/4508). - - proxmox_kvm - fix error in check when creating or cloning (https://github.com/ansible-collections/community.general/pull/4306). - - proxmox_kvm - fix error when checking whether Proxmox VM exists (https://github.com/ansible-collections/community.general/pull/4287). - - python_requirements_info - fails if version operator used without version - (https://github.com/ansible-collections/community.general/pull/3785). - - python_requirements_info - store ``mismatched`` return values per package - as documented in the module (https://github.com/ansible-collections/community.general/pull/4078). - - say callback plugin - replace deprecated ``distutils.spawn.find_executable`` - with Ansible's ``get_bin_path`` to find the ``say`` resp. ``espeak`` executables - (https://github.com/ansible-collections/community.general/pull/3934). - - scaleway_user_data - fix double-quote added where no double-quote is needed - to user data in scaleway's server (``Content-type`` -> ``Content-Type``) (https://github.com/ansible-collections/community.general/pull/3940). - - slack - add ``charset`` to HTTP headers to avoid Slack API warning (https://github.com/ansible-collections/community.general/issues/3932). - - terraform - fix command options being ignored during planned/plan in function - ``build_plan`` such as ``lock`` or ``lock_timeout`` (https://github.com/ansible-collections/community.general/issues/3707, - https://github.com/ansible-collections/community.general/pull/3726). - - vdo - fix options error (https://github.com/ansible-collections/community.general/pull/4163). - - xattr - fix exception caused by ``_run_xattr()`` raising a ``ValueError`` - due to a mishandling of base64-encoded value (https://github.com/ansible-collections/community.general/issues/3673). - - xbps - fix error message that is reported when installing packages fails (https://github.com/ansible-collections/community.general/pull/4438). - - yarn - fix incorrect handling of ``yarn list`` and ``yarn global list`` output - that could result in fatal error (https://github.com/ansible-collections/community.general/pull/4050). - - yarn - fix incorrectly reported status when installing a package globally - (https://github.com/ansible-collections/community.general/issues/4045, https://github.com/ansible-collections/community.general/pull/4050). - - yarn - fix missing ``~`` expansion in yarn global install folder which resulted - in incorrect task status (https://github.com/ansible-collections/community.general/issues/4045, - https://github.com/ansible-collections/community.general/pull/4048). - - yum_versionlock - fix matching of existing entries with names passed to the - module. Match yum and dnf lock format (https://github.com/ansible-collections/community.general/pull/4183). - - zone connection plugin - replace deprecated ``distutils.spawn.find_executable`` - with Ansible's ``get_bin_path`` to find the executable (https://github.com/ansible-collections/community.general/pull/3934). - - zypper - fixed bug that caused zypper to always report [ok] and do nothing - on ``state=present`` when all packages in ``name`` had a version specification - (https://github.com/ansible-collections/community.general/issues/4371, https://github.com/ansible-collections/community.general/pull/4421). - deprecated_features: - - gem - the default of the ``norc`` option has been deprecated and will change - to ``true`` in community.general 6.0.0. Explicitly specify a value to avoid - a deprecation warning (https://github.com/ansible-collections/community.general/pull/4517). - - mail callback plugin - not specifying ``sender`` is deprecated and will be - disallowed in community.general 6.0.0 (https://github.com/ansible-collections/community.general/pull/4140). - - module_helper module utils - deprecated the attribute ``ModuleHelper.VarDict`` - (https://github.com/ansible-collections/community.general/pull/3801). - - nmcli - deprecate default hairpin mode for a bridge. This so we can change - it to ``false`` in community.general 7.0.0, as this is also the default in - ``nmcli`` (https://github.com/ansible-collections/community.general/pull/4334). - - 'pacman - from community.general 5.0.0 on, the ``changed`` status of ``update_cache`` - will no longer be ignored if ``name`` or ``upgrade`` is specified. To keep - the old behavior, add something like ``register: result`` and ``changed_when: - result.packages | length > 0`` to your task (https://github.com/ansible-collections/community.general/pull/4329).' - - proxmox inventory plugin - the current default ``true`` of the ``want_proxmox_nodes_ansible_host`` - option has been deprecated. The default will change to ``false`` in community.general - 6.0.0. To keep the current behavior, explicitly set ``want_proxmox_nodes_ansible_host`` - to ``true`` in your inventory configuration. We suggest to already switch - to the new behavior by explicitly setting it to ``false``, and by using ``compose:`` - to set ``ansible_host`` to the correct value. See the examples in the plugin - documentation for details (https://github.com/ansible-collections/community.general/pull/4466). - - vmadm - deprecated module parameter ``debug`` that was not used anywhere (https://github.com/ansible-collections/community.general/pull/4580). - known_issues: - - pacman - ``update_cache`` cannot differentiate between up to date and outdated - package lists and will report ``changed`` in both situations (https://github.com/ansible-collections/community.general/pull/4318). - - pacman - binaries specified in the ``executable`` parameter must support ``--print-format`` - in order to be used by this module. In particular, AUR helper ``yay`` is known - not to currently support it (https://github.com/ansible-collections/community.general/pull/4312). - major_changes: - - The community.general collection no longer supports Ansible 2.9 and ansible-base - 2.10. While we take no active measures to prevent usage, we will remove a - lot of compatibility code and other compatility measures that will effectively - prevent using most content from this collection with Ansible 2.9, and some - content of this collection with ansible-base 2.10. Both Ansible 2.9 and ansible-base - 2.10 will very soon be End of Life and if you are still using them, you should - consider upgrading to ansible-core 2.11 or later as soon as possible (https://github.com/ansible-collections/community.general/pull/4548). - minor_changes: - - Avoid internal ansible-core module_utils in favor of equivalent public API - available since at least Ansible 2.9. This fixes some instances added since - the last time this was fixed (https://github.com/ansible-collections/community.general/pull/4232). - - Remove vendored copy of ``distutils.version`` in favor of vendored copy included - with ansible-core 2.12+. For ansible-core 2.11, uses ``distutils.version`` - for Python < 3.12. There is no support for ansible-core 2.11 with Python 3.12+ - (https://github.com/ansible-collections/community.general/pull/3988). - - aix_filesystem - calling ``run_command`` with arguments as ``list`` instead - of ``str`` (https://github.com/ansible-collections/community.general/pull/3833). - - aix_lvg - calling ``run_command`` with arguments as ``list`` instead of ``str`` - (https://github.com/ansible-collections/community.general/pull/3834). - - alternatives - add ``state`` parameter, which provides control over whether - the alternative should be set as the active selection for its alternatives - group (https://github.com/ansible-collections/community.general/issues/4543, - https://github.com/ansible-collections/community.general/pull/4557). - - ansible_galaxy_install - added option ``no_deps`` to the module (https://github.com/ansible-collections/community.general/issues/4174). - - atomic_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - clc_alert_policy - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). - - clc_group - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). - - clc_loadbalancer - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). - - clc_server - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). - - cmd_runner module util - reusable command runner with consistent argument - formatting and sensible defaults (https://github.com/ansible-collections/community.general/pull/4476). - - cobbler inventory plugin - add ``include_profiles`` option (https://github.com/ansible-collections/community.general/pull/4068). - - datadog_monitor - support new datadog event monitor of type `event-v2 alert` - (https://github.com/ansible-collections/community.general/pull/4457) - - filesystem - add support for resizing btrfs (https://github.com/ansible-collections/community.general/issues/4465). - - gitlab - add more token authentication support with the new options ``api_oauth_token`` - and ``api_job_token`` (https://github.com/ansible-collections/community.general/issues/705). - - gitlab - clean up modules and utils (https://github.com/ansible-collections/community.general/pull/3694). - - gitlab_group, gitlab_project - add new option ``avatar_path`` (https://github.com/ansible-collections/community.general/pull/3792). - - gitlab_group_variable - new ``variables`` parameter (https://github.com/ansible-collections/community.general/pull/4038 - and https://github.com/ansible-collections/community.general/issues/4074). - - gitlab_project - add new option ``default_branch`` to gitlab_project (if ``readme - = true``) (https://github.com/ansible-collections/community.general/pull/3792). - - gitlab_project_variable - new ``variables`` parameter (https://github.com/ansible-collections/community.general/issues/4038). - - hponcfg - revamped module using ModuleHelper (https://github.com/ansible-collections/community.general/pull/3840). - - icinga2 inventory plugin - added the ``display_name`` field to variables (https://github.com/ansible-collections/community.general/issues/3875, - https://github.com/ansible-collections/community.general/pull/3906). - - icinga2 inventory plugin - implemented constructed interface (https://github.com/ansible-collections/community.general/pull/4088). - - icinga2 inventory plugin - inventory object names are changable using ``inventory_attr`` - in your config file to the host object name, address, or display_name fields - (https://github.com/ansible-collections/community.general/issues/3875, https://github.com/ansible-collections/community.general/pull/3906). - - ip_netns - calling ``run_command`` with arguments as ``list`` instead of ``str`` - (https://github.com/ansible-collections/community.general/pull/3822). - - ipa_dnszone - ``dynamicupdate`` is now a boolean parameter, instead of a string - parameter accepting ``"true"`` and ``"false"``. Also the module is now idempotent - with respect to ``dynamicupdate`` (https://github.com/ansible-collections/community.general/pull/3374). - - ipa_dnszone - add DNS zone synchronization support (https://github.com/ansible-collections/community.general/pull/3374). - - ipa_service - add ``skip_host_check`` parameter. (https://github.com/ansible-collections/community.general/pull/4417). - - ipmi_boot - add support for user-specified IPMI encryption key (https://github.com/ansible-collections/community.general/issues/3698). - - ipmi_power - add ``machine`` option to ensure the power state via the remote - target address (https://github.com/ansible-collections/community.general/pull/3968). - - ipmi_power - add support for user-specified IPMI encryption key (https://github.com/ansible-collections/community.general/issues/3698). - - iso_extract - calling ``run_command`` with arguments as ``list`` instead of - ``str`` (https://github.com/ansible-collections/community.general/pull/3805). - - java_cert - calling ``run_command`` with arguments as ``list`` instead of - ``str`` (https://github.com/ansible-collections/community.general/pull/3835). - - jira - add support for Bearer token auth (https://github.com/ansible-collections/community.general/pull/3838). - - jira - when creating a comment, ``fields`` now is used for additional data - (https://github.com/ansible-collections/community.general/pull/4304). - - keycloak_* modules - added connection timeout parameter when calling server - (https://github.com/ansible-collections/community.general/pull/4168). - - keycloak_client - add ``always_display_in_console`` parameter (https://github.com/ansible-collections/community.general/issues/4390). - - keycloak_client - add ``default_client_scopes`` and ``optional_client_scopes`` - parameters. (https://github.com/ansible-collections/community.general/pull/4385). - - keycloak_user_federation - add sssd user federation support (https://github.com/ansible-collections/community.general/issues/3767). - - ldap_entry - add support for recursive deletion (https://github.com/ansible-collections/community.general/issues/3613). - - linode inventory plugin - add support for caching inventory results (https://github.com/ansible-collections/community.general/pull/4179). - - linode inventory plugin - allow templating of ``access_token`` variable in - Linode inventory plugin (https://github.com/ansible-collections/community.general/pull/4040). - - listen_ports_facts - add support for ``ss`` command besides ``netstat`` (https://github.com/ansible-collections/community.general/pull/3708). - - lists_mergeby filter plugin - add parameters ``list_merge`` and ``recursive``. - These are only supported when used with ansible-base 2.10 or ansible-core, - but not with Ansible 2.9 (https://github.com/ansible-collections/community.general/pull/4058). - - logentries - calling ``run_command`` with arguments as ``list`` instead of - ``str`` (https://github.com/ansible-collections/community.general/pull/3807). - - logstash_plugin - calling ``run_command`` with arguments as ``list`` instead - of ``str`` (https://github.com/ansible-collections/community.general/pull/3808). - - lxc_container - added ``wait_for_container`` parameter. If ``true`` the module - will wait until the running task reports success as the status (https://github.com/ansible-collections/community.general/pull/4039). - - lxc_container - calling ``run_command`` with arguments as ``list`` instead - of ``str`` (https://github.com/ansible-collections/community.general/pull/3851). - - lxd connection plugin - make sure that ``ansible_lxd_host``, ``ansible_executable``, - and ``ansible_lxd_executable`` work (https://github.com/ansible-collections/community.general/pull/3798). - - lxd inventory plugin - support virtual machines (https://github.com/ansible-collections/community.general/pull/3519). - - lxd_container - adds ``project`` option to allow selecting project for LXD - instance (https://github.com/ansible-collections/community.general/pull/4479). - - lxd_container - adds ``type`` option which also allows to operate on virtual - machines and not just containers (https://github.com/ansible-collections/community.general/pull/3661). - - lxd_profile - adds ``project`` option to allow selecting project for LXD profile - (https://github.com/ansible-collections/community.general/pull/4479). - - mail callback plugin - add ``Message-ID`` and ``Date`` headers (https://github.com/ansible-collections/community.general/issues/4055, - https://github.com/ansible-collections/community.general/pull/4056). - - mail callback plugin - properly use Ansible's option handling to split lists - (https://github.com/ansible-collections/community.general/pull/4140). - - mattermost - add the possibility to send attachments instead of text messages - (https://github.com/ansible-collections/community.general/pull/3946). - - mksysb - revamped the module using ``ModuleHelper`` (https://github.com/ansible-collections/community.general/pull/3295). - - module_helper module utils - added decorators ``check_mode_skip`` and ``check_mode_skip_returns`` - for skipping methods when ``check_mode=True`` (https://github.com/ansible-collections/community.general/pull/3849). - - monit - calling ``run_command`` with arguments as ``list`` instead of ``str`` - (https://github.com/ansible-collections/community.general/pull/3821). - - nmap inventory plugin - add ``sudo`` option in plugin in order to execute - ``sudo nmap`` so that ``nmap`` runs with elevated privileges (https://github.com/ansible-collections/community.general/pull/4506). - - nmcli - add ``wireguard`` connection type (https://github.com/ansible-collections/community.general/pull/3985). - - nmcli - add missing connection aliases ``802-3-ethernet`` and ``802-11-wireless`` - (https://github.com/ansible-collections/community.general/pull/4108). - - nmcli - add multiple addresses support for ``ip4`` parameter (https://github.com/ansible-collections/community.general/issues/1088, - https://github.com/ansible-collections/community.general/pull/3738). - - nmcli - add multiple addresses support for ``ip6`` parameter (https://github.com/ansible-collections/community.general/issues/1088). - - nmcli - add support for ``eui64`` and ``ipv6privacy`` parameters (https://github.com/ansible-collections/community.general/issues/3357). - - nmcli - adds ``routes6`` and ``route_metric6`` parameters for supporting IPv6 - routes (https://github.com/ansible-collections/community.general/issues/4059). - - nmcli - remove nmcli modify dependency on ``type`` parameter (https://github.com/ansible-collections/community.general/issues/2858). - - nomad_job - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - nomad_job_info - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - npm - add ability to use ``production`` flag when ``ci`` is set (https://github.com/ansible-collections/community.general/pull/4299). - - open_iscsi - extended module to allow rescanning of established session for - one or all targets (https://github.com/ansible-collections/community.general/issues/3763). - - opennebula - add the release action for VMs in the ``HOLD`` state (https://github.com/ansible-collections/community.general/pull/4036). - - opentelemetry_plugin - enrich service when using the ``docker_login`` (https://github.com/ansible-collections/community.general/pull/4104). - - opentelemetry_plugin - enrich service when using the ``jenkins``, ``hetzner`` - or ``jira`` modules (https://github.com/ansible-collections/community.general/pull/4105). - - packet_device - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - packet_sshkey - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - packet_volume - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - pacman - add ``remove_nosave`` parameter to avoid saving modified configuration - files as ``.pacsave`` files. (https://github.com/ansible-collections/community.general/pull/4316, - https://github.com/ansible-collections/community.general/issues/4315). - - pacman - add ``stdout`` and ``stderr`` as return values (https://github.com/ansible-collections/community.general/pull/3758). - - pacman - now implements proper change detection for ``update_cache=true``. - Adds ``cache_updated`` return value to when ``update_cache=true`` to report - this result independently of the module's overall changed return value (https://github.com/ansible-collections/community.general/pull/4337). - - pacman - the module has been rewritten and is now much faster when using ``state=latest``. - Operations are now done all packages at once instead of package per package - and the configured output format of ``pacman`` no longer affect the module's - operation. (https://github.com/ansible-collections/community.general/pull/3907, - https://github.com/ansible-collections/community.general/issues/3783, https://github.com/ansible-collections/community.general/issues/4079) - - passwordstore lookup plugin - add configurable ``lock`` and ``locktimeout`` - options to avoid race conditions in itself and in the ``pass`` utility it - calls. By default, the plugin now locks on write operations (https://github.com/ansible-collections/community.general/pull/4194). - - pipx - added options ``editable`` and ``pip_args`` (https://github.com/ansible-collections/community.general/issues/4300). - - profitbricks - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - proxmox - add ``clone`` parameter (https://github.com/ansible-collections/community.general/pull/3930). - - proxmox - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - proxmox inventory plugin - add support for client-side jinja filters (https://github.com/ansible-collections/community.general/issues/3553). - - proxmox inventory plugin - add support for templating the ``url``, ``user``, - and ``password`` options (https://github.com/ansible-collections/community.general/pull/4418). - - proxmox inventory plugin - add token authentication as an alternative to username/password - (https://github.com/ansible-collections/community.general/pull/4540). - - proxmox inventory plugin - parse LXC configs returned by the proxmox API (https://github.com/ansible-collections/community.general/pull/4472). - - proxmox modules - move ``HAS_PROXMOXER`` check into ``module_utils`` (https://github.com/ansible-collections/community.general/pull/4030). - - proxmox modules - move common code into ``module_utils`` (https://github.com/ansible-collections/community.general/pull/4029). - - proxmox_kvm - added EFI disk support when creating VM with OVMF UEFI BIOS - with new ``efidisk0`` option (https://github.com/ansible-collections/community.general/pull/4106, - https://github.com/ansible-collections/community.general/issues/1638). - - proxmox_kwm - add ``win11`` to ``ostype`` parameter for Windows 11 and Windows - Server 2022 support (https://github.com/ansible-collections/community.general/issues/4023, - https://github.com/ansible-collections/community.general/pull/4191). - - proxmox_snap - add restore snapshot option (https://github.com/ansible-collections/community.general/pull/4377). - - proxmox_snap - fixed timeout value to correctly reflect time in seconds. The - timeout was off by one second (https://github.com/ansible-collections/community.general/pull/4377). - - puppet - remove deprecation for ``show_diff`` parameter. Its alias ``show-diff`` - is still deprecated and will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/3980). - - python_requirements_info - returns python version broken down into its components, - and some minor refactoring (https://github.com/ansible-collections/community.general/pull/3797). - - redfish_command - add ``GetHostInterfaces`` command to enable reporting Redfish - Host Interface information (https://github.com/ansible-collections/community.general/issues/3693). - - redfish_command - add ``IndicatorLedOn``, ``IndicatorLedOff``, and ``IndicatorLedBlink`` - commands to the Systems category for controling system LEDs (https://github.com/ansible-collections/community.general/issues/4084). - - redfish_command - add ``SetHostInterface`` command to enable configuring the - Redfish Host Interface (https://github.com/ansible-collections/community.general/issues/3632). - - redis - add authentication parameters ``login_user``, ``tls``, ``validate_certs``, - and ``ca_certs`` (https://github.com/ansible-collections/community.general/pull/4207). - - scaleway inventory plugin - add profile parameter ``scw_profile`` (https://github.com/ansible-collections/community.general/pull/4049). - - scaleway_compute - add possibility to use project identifier (new ``project`` - option) instead of deprecated organization identifier (https://github.com/ansible-collections/community.general/pull/3951). - - scaleway_volume - all volumes are systematically created on par1 (https://github.com/ansible-collections/community.general/pull/3964). - - seport - minor refactoring (https://github.com/ansible-collections/community.general/pull/4471). - - smartos_image_info - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - snap - add option ``options`` permitting to set options using the ``snap set`` - command (https://github.com/ansible-collections/community.general/pull/3943). - - sudoers - add support for ``runas`` parameter (https://github.com/ansible-collections/community.general/issues/4379). - - svc - calling ``run_command`` with arguments as ``list`` instead of ``str`` - (https://github.com/ansible-collections/community.general/pull/3829). - - syslog_json - add option to skip logging of ``gather_facts`` playbook tasks; - use v2 callback API (https://github.com/ansible-collections/community.general/pull/4223). - - terraform - adds ``terraform_upgrade`` parameter which allows ``terraform - init`` to satisfy new provider constraints in an existing Terraform project - (https://github.com/ansible-collections/community.general/issues/4333). - - udm_group - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). - - udm_share - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556). - - vmadm - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - webfaction_app - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - webfaction_db - minor refactoring (https://github.com/ansible-collections/community.general/pull/4567). - - xattr - calling ``run_command`` with arguments as ``list`` instead of ``str`` - (https://github.com/ansible-collections/community.general/pull/3806). - - xfconf - added missing value types ``char``, ``uchar``, ``int64`` and ``uint64`` - (https://github.com/ansible-collections/community.general/pull/4534). - - xfconf - minor refactor on the base class for the module (https://github.com/ansible-collections/community.general/pull/3919). - - zypper - add support for ``--clean-deps`` option to remove packages that depend - on a package being removed (https://github.com/ansible-collections/community.general/pull/4195). - release_summary: Alpha release for community.general 5.0.0. - removed_features: - - ali_instance_info - removed the options ``availability_zone``, ``instance_ids``, - and ``instance_names``. Use filter item ``zone_id`` instead of ``availability_zone``, - filter item ``instance_ids`` instead of ``instance_ids``, and filter item - ``instance_name`` instead of ``instance_names`` (https://github.com/ansible-collections/community.general/pull/4516). - - apt_rpm - removed the deprecated alias ``update-cache`` of ``update_cache`` - (https://github.com/ansible-collections/community.general/pull/4516). - - compose - removed various deprecated aliases. Use the version with ``_`` instead - of ``-`` instead (https://github.com/ansible-collections/community.general/pull/4516). - - dnsimple - remove support for dnsimple < 2.0.0 (https://github.com/ansible-collections/community.general/pull/4516). - - github_deploy_key - removed the deprecated alias ``2fa_token`` of ``otp`` - (https://github.com/ansible-collections/community.general/pull/4516). - - homebrew, homebrew_cask - removed the deprecated alias ``update-brew`` of - ``update_brew`` (https://github.com/ansible-collections/community.general/pull/4516). - - linode - removed the ``backupsenabled`` option. Use ``backupweeklyday`` or - ``backupwindow`` to enable backups (https://github.com/ansible-collections/community.general/pull/4516). - - opkg - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). - - pacman - if ``update_cache=true`` is used with ``name`` or ``upgrade``, the - changed state will now also indicate if only the cache was updated. To keep - the old behavior - only indicate ``changed`` when a package was installed/upgraded - -, use ``changed_when`` as indicated in the module examples (https://github.com/ansible-collections/community.general/pull/4516). - - pacman - removed the deprecated alias ``update-cache`` of ``update_cache`` - (https://github.com/ansible-collections/community.general/pull/4516). - - proxmox, proxmox_kvm, proxmox_snap - no longer allow to specify a VM name - that matches multiple VMs. If this happens, the modules now fail (https://github.com/ansible-collections/community.general/pull/4516). - - serverless - removed the ``functions`` option. It was not used by the module - (https://github.com/ansible-collections/community.general/pull/4516). - - slackpkg - removed the deprecated alias ``update-cache`` of ``update_cache`` - (https://github.com/ansible-collections/community.general/pull/4516). - - urpmi - removed the deprecated alias ``no-recommends`` of ``no_recommends`` - (https://github.com/ansible-collections/community.general/pull/4516). - - urpmi - removed the deprecated alias ``update-cache`` of ``update_cache`` - (https://github.com/ansible-collections/community.general/pull/4516). - - xbps - removed the deprecated alias ``update-cache`` of ``update_cache`` (https://github.com/ansible-collections/community.general/pull/4516). - - xfconf - the ``get`` state has been removed. Use the ``xfconf_info`` module - instead (https://github.com/ansible-collections/community.general/pull/4516). - fragments: - - 1088-add_multiple_ipv6_address_support.yml - - 1088-nmcli_add_multiple_addresses_support.yml - - 2386-github_repo-fix-idempotency-issues.yml - - 3295-mksysb-revamp.yaml - - 3357-nmcli-eui64-and-ipv6privacy.yml - - 3374-add-ipa-ptr-sync-support.yml - - 3519-inventory-support-lxd-4.yml - - 3625-nmcli_false_changed_mtu_fix.yml - - 3632-add-redfish-host-interface-config-support.yml - - 3660-a_module-tombstone.yml - - 3661-lxd_container-add-vm-support.yml - - 3667-ldap_search.yml - - 3675-xattr-handle-base64-values.yml - - 3681-lvol-fix-create.yml - - 3693-add-redfish-host-interface-info-support.yml - - 3694-gitlab-cleanup.yml - - 3702-ipmi-encryption-key.yml - - 3703-force-install-homebrew-cask.yml - - 3708-listen_ports_facts-add-ss-support.yml - - 3709-support-batch-mode.yml - - 3726-terraform-missing-parameters-planned-fix.yml - - 3758-pacman-add-stdout-stderr.yml - - 3765-extend-open_iscsi-with-rescan.yml - - 3768-nmcli_fix_changed_when_no_mask_set.yml - - 3780-add-keycloak-sssd-user-federation.yml - - 3785-python_requirements_info-versionless-op.yaml - - 3792-improve_gitlab_group_and_project.yml - - 3797-python_requirements_info-improvements.yaml - - 3798-fix-lxd-connection-option-vars-support.yml - - 3800-pipx-include-apps.yaml - - 3801-mh-deprecate-vardict-attr.yaml - - 3805-iso_extract-run_command-list.yaml - - 3806-xattr-run_command-list.yaml - - 3807-logentries-run_command-list.yaml - - 3808-logstash_plugin-run_command-list.yaml - - 3821-monit-run-list.yaml - - 3822-ip_netns-run-list.yaml - - 3829-svc-run-list.yaml - - 3833-aix_filesystem-run-list.yaml - - 3834-aix-lvg-run-list.yaml - - 3835-java-cert-run-list.yaml - - 3837-opentelemetry_plugin-honour_ignore_errors.yaml - - 3838-jira-token.yaml - - 3840-hponcfg-mh-revamp.yaml - - 3849-mh-check-mode-decos.yaml - - 3851-lxc-container-run-list.yaml - - 3862-interfaces-file-fix-dup-option.yaml - - 3867-jira-fix-body.yaml - - 3874-proxmox-fix-onboot-param.yml - - 3875-icinga2-inv-fix.yml - - 3896-nmcli_vlan_missing_options.yaml - - 3907-pacman-speedup.yml - - 3909-nrdp_fix_string_args_without_encoding.yaml - - 3916-fix-vdo-options-type.yml - - 3919-xfconf-baseclass.yaml - - 3921-add-counter-filter-plugin.yml - - 3930-proxmox-add-clone.yaml - - 3933-slack-charset-header.yaml - - 3934-distutils.yml - - 3935-use-gitlab-instance-runner-to-create-runner.yml - - 3936-distutils.version.yml - - 3940_fix_contenttype_scaleway_user_data.yml - - 3943-add-option-options-to-snap-module.yml - - 3946-mattermost_attachments.yml - - 3951-scaleway_compute_add_project_id.yml - - 3964-scaleway_volume_add_region.yml - - 3968-ipmi_power-add-machine-option.yaml - - 3976-fix-alternatives-parsing.yml - - 3980-puppet-show_diff.yml - - 3985-nmcli-add-wireguard-connection-type.yml - - 3988-distutils-vendor-removed.yml - - 4026-fix-mail-callback.yml - - 4029-proxmox-refactor.yml - - 4030-proxmox-has-proxmoxer.yml - - 4036-onevm-add-release-action.yaml - - 4038-fix-and-rework-gitlb-project-variable.yml - - 4039-cluster-container-wait.yml - - 4040-linode-token-templating.yaml - - 4043-fix-no-log-opentelemetry.yml - - 4048-expand-tilde-in-yarn-global-install-folder.yaml - - 4049-profile-for-scaleway-inventory.yml - - 4050-properly-parse-json-lines-output-from-yarn.yaml - - 4052-fix-detection-of-installed-cargo-packages-with-hyphens.yaml - - 4056-add-missing-mail-headers.yml - - 4058-lists_mergeby-add-parameters.yml - - 4061-fix-mail-recipient-encoding.yml - - 4062-nmcli-ipv6-routes-support.yml - - 4068-add-include_file-option.yml - - 4078-python_requirements_info.yaml - - 4084-add-redfish-system-indicator-led.yml - - 4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml - - 4088-add-constructed-interface-for-icinga2-inventory.yml - - 4092-fix_local_ports_regex_listen_ports_facts.yaml - - 4104-opentelemetry_plugin-enrich_docker_login.yaml - - 4105-opentelemetry_plugin-enrich_jira_hetzner_jenkins_services.yaml - - 4106-proxmox-efidisk0-support.yaml - - 4108-nmcli-support-modifcation-without-type-param.yml - - 4131-nmcli_fix_reports_changed_for_routes4_parameter.yml - - 4136-gitlab_runner-make-project-owned-mutually-exclusive.yml - - 4140-mail-callback-options.yml - - 4150-gitlab-project-variable-absent-fix.yml - - 4151-dconf-catch-psutil-nosuchprocess.yaml - - 4154-ini_file_changed.yml - - 4168-add-keycloak-url-timeout.yml - - 4179-linode-inventory-cache.yaml - - 4183-fix-yum_versionlock.yaml - - 4191-proxmox-add-win11.yml - - 4192-improve-passwordstore-consistency.yml - - 4192-zypper-add-clean-deps.yml - - 4194-configurable-passwordstore-locking.yml - - 4206-imc-rest-module.yaml - - 4207-add-redis-tls-support.yml - - 4212-fixes-for-keycloak-user-federation.yml - - 4219-passwordstore-locale-fix.yml - - 4223-syslog-json-skip-syslog-option.yml - - 4232-text-converter-import.yml - - 4240-ansible_galaxy_install-no_deps.yml - - 4275-pacman-sysupgrade.yml - - 4286-pacman-url-pkgs.yml - - 4287-fix-proxmox-vm-chek.yml - - 4288-fix-4259-support-busybox-dd.yml - - 4299-npm-add-production-with-ci-flag.yml - - 4303-pipx-editable.yml - - 4304-jira-fields-in-comment.yml - - 4306-proxmox-fix-error-on-vm-clone.yml - - 4312-pacman-groups.yml - - 4316-pacman-remove-nosave.yml - - 4318-pacman-restore-old-changed-behavior.yml - - 4320-nmcli-hairpin.yml - - 4330-pacman-packages-update_cache.yml - - 4336-linode-inventory-filtering.yaml - - 4337-pacman-update_cache.yml - - 4349-proxmox-inventory-dict-facts.yml - - 4351-inventory-lxd-handling_metadata_wo_os_and_release.yml - - 4352-proxmox-inventory-filters.yml - - 4355-ldap-recursive-delete.yml - - 4377-allow-proxmox-snapshot-restoring.yml - - 4378-proxmox-inventory-tags.yml - - 4380-sudoers-runas-parameter.yml - - 4382-keycloak-add-missing-validate_certs-parameters.yml - - 4385-keycloak-client-default-optional-scopes.yml - - 4386-proxmox-support-templating-in-inventory-file.yml - - 4417-ipa_service-add-skip_host_check.yml - - 4421-zypper_package_version_handling_fix.yml - - 4422-warn-user-if-incorrect-SDK-version-is-installed.yaml - - 4429-keycloak-client-add-always-display-in-console.yml - - 4438-fix-error-message.yaml - - 4455-terraform-provider-upgrade.yml - - 4457-support-datadog-monitors-type-event-v2.yaml - - 4459-only-get-monitor-if-it-is-not-null-api-response.yaml - - 4464-pacman-fix-local-remove.yaml - - 4465-btrfs-resize.yml - - 4466-proxmox-ansible_host-deprecation.yml - - 4471-seport-refactor.yaml - - 4476-cmd_runner.yml - - 4479-add-project-support-for-lxd_container-and-lxd_profile.yml - - 4491-specify_all_in_list_calls.yaml - - 4492-proxmox_kvm_fix_vm_without_name.yaml - - 4496-remove-deprecated-method-in-gitlab-branch-module.yml - - 4506-sudo-in-nmap-inv-plugin.yaml - - 4516-deprecation-removals.yml - - 4517-gem-deprecate-norc.yml - - 4524-update-opennebula-inventory-plugin-to-match-documentation.yaml - - 4526-keycloak-realm-types.yaml - - 4530-fix-unauthorized-pritunl-request.yaml - - 4534-xfconf-added-value-types.yaml - - 4540-proxmox-inventory-token-auth.yml - - 4548-remove-2.9-2.10-compatibility.yml - - 4555-proxmox-lxc-key.yml - - 4556-remove-default-none-1.yml - - 4557-alternatives-add-state-parameter.yml - - 4567-remove-default-none-2.yml - - 4580-vmadm-deprecate-param-debug.yaml - - 5.0.0-a1.yml - - 705-gitlab-auth-support.yml - plugins: - filter: - - description: Counts hashable elements in a sequence - name: counter - namespace: null - release_date: '2022-04-29' +ancestor: 5.0.0 +releases: {} diff --git a/changelogs/fragments/4065-onepassword-config.yml b/changelogs/fragments/4065-onepassword-config.yml deleted file mode 100644 index 9d58a0e57f..0000000000 --- a/changelogs/fragments/4065-onepassword-config.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - onepassword - search all valid configuration locations and use the first found (https://github.com/ansible-collections/community.general/pull/4640). diff --git a/changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml b/changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml deleted file mode 100644 index 8a0626865d..0000000000 --- a/changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - pritunl_user - add ``mac_addresses`` parameter (https://github.com/ansible-collections/community.general/pull/4535). diff --git a/changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml b/changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml deleted file mode 100644 index aef02c83d3..0000000000 --- a/changelogs/fragments/4578-ipa_dnsrecord-add_multiple_record_support.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - ipa_dnsrecord - add new argument ``record_values``, mutually exclusive to ``record_value``, which supports multiple values for one record (https://github.com/ansible-collections/community.general/pull/4578). diff --git a/changelogs/fragments/4581-vmadm-improvements.yaml b/changelogs/fragments/4581-vmadm-improvements.yaml deleted file mode 100644 index e6b1778e0e..0000000000 --- a/changelogs/fragments/4581-vmadm-improvements.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - vmadm - minor refactoring and improvement on the module (https://github.com/ansible-collections/community.general/pull/4581). diff --git a/changelogs/fragments/4590-consul-fix-service-checks.yaml b/changelogs/fragments/4590-consul-fix-service-checks.yaml deleted file mode 100644 index 42a5562a0e..0000000000 --- a/changelogs/fragments/4590-consul-fix-service-checks.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - consul - fixed bug where class ``ConsulService`` was overwriting the field ``checks``, preventing the addition of checks to a service (https://github.com/ansible-collections/community.general/pull/4590). diff --git a/changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml b/changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml deleted file mode 100644 index ae632e08a4..0000000000 --- a/changelogs/fragments/4595-fix-VirtualMediaInsert-iLO4.yml +++ /dev/null @@ -1,10 +0,0 @@ -bugfixes: - - redfish_command - the iLO4 Redfish implementation only supports the ``image_url`` parameter in - the underlying API calls to ``VirtualMediaInsert`` and ``VirtualMediaEject``. Any values set - (or the defaults) for ``write_protected`` or ``inserted`` will be ignored - (https://github.com/ansible-collections/community.general/pull/4596). -minor_changes: - - redfish_* modules - the contents of ``@Message.ExtendedInfo`` will be returned as a string in the event - that ``@Message.ExtendedInfo.Messages`` does not exist. This is likely more useful than the - standard HTTP error - (https://github.com/ansible-collections/community.general/pull/4596). diff --git a/changelogs/fragments/4600-mh-delegate.yaml b/changelogs/fragments/4600-mh-delegate.yaml deleted file mode 100644 index dadaefb0d7..0000000000 --- a/changelogs/fragments/4600-mh-delegate.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ModuleHelper module utils - ``ModuleHelperBase` now delegates the attributes ``check_mode``, ``get_bin_path``, ``warn``, and ``deprecate`` to the underlying ``AnsibleModule`` instance (https://github.com/ansible-collections/community.general/pull/4600). diff --git a/changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml b/changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml deleted file mode 100644 index 40b67375d6..0000000000 --- a/changelogs/fragments/4601-ansible-galaxy-install-deprecate-ansible29-and-210.yaml +++ /dev/null @@ -1,2 +0,0 @@ -deprecated_features: - - ansible_galaxy_install - deprecated support for ``ansible`` 2.9 and ``ansible-base`` 2.10 (https://github.com/ansible-collections/community.general/pull/4601). diff --git a/changelogs/fragments/4612-time_filter_zero.yml b/changelogs/fragments/4612-time_filter_zero.yml deleted file mode 100644 index 8129725055..0000000000 --- a/changelogs/fragments/4612-time_filter_zero.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - to_time_unit filter plugins - the time filters has been extended to also allow ``0`` as input (https://github.com/ansible-collections/community.general/pull/4612). diff --git a/changelogs/fragments/4618-dig-dlv.yml b/changelogs/fragments/4618-dig-dlv.yml deleted file mode 100644 index bc082d4093..0000000000 --- a/changelogs/fragments/4618-dig-dlv.yml +++ /dev/null @@ -1,2 +0,0 @@ -deprecated_features: - - "dig lookup plugin - the ``DLV`` record type has been decommissioned in 2017 and support for it will be removed from community.general 6.0.0 (https://github.com/ansible-collections/community.general/pull/4618)." diff --git a/changelogs/fragments/4621-terraform-py2-compat.yml b/changelogs/fragments/4621-terraform-py2-compat.yml deleted file mode 100644 index 4bceafba6c..0000000000 --- a/changelogs/fragments/4621-terraform-py2-compat.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - terraform - fix list initialization to support both Python 2 and Python 3 (https://github.com/ansible-collections/community.general/issues/4531). diff --git a/changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml b/changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml deleted file mode 100644 index a18ba62ef5..0000000000 --- a/changelogs/fragments/4623-opentelemetry_bug_fix_include_tasks.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - opentelemetry callback plugin - fix warning for the include_tasks (https://github.com/ansible-collections/community.general/pull/4623). diff --git a/changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml b/changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml deleted file mode 100644 index 53d241eca8..0000000000 --- a/changelogs/fragments/4624-opentelemetry_bug_fix_hardcoded_value.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - opentelemetry callback plugin - fix task message attribute that is reported failed regardless of the task result (https://github.com/ansible-collections/community.general/pull/4624). diff --git a/changelogs/fragments/4625-fix-filter-filenames.yml b/changelogs/fragments/4625-fix-filter-filenames.yml deleted file mode 100644 index d3c0eb5f92..0000000000 --- a/changelogs/fragments/4625-fix-filter-filenames.yml +++ /dev/null @@ -1,2 +0,0 @@ -breaking_changes: - - "lists_mergeby and groupby_as_dict filter plugins - adjust filter plugin filename. This change is not visible to end-users, it only affects possible other collections importing Python paths (https://github.com/ansible-collections/community.general/pull/4625)." diff --git a/changelogs/fragments/4647-gconftool2-command-arg.yaml b/changelogs/fragments/4647-gconftool2-command-arg.yaml deleted file mode 100644 index 12913a0b90..0000000000 --- a/changelogs/fragments/4647-gconftool2-command-arg.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - gconftool2 - properly escape values when passing them to ``gconftool-2`` (https://github.com/ansible-collections/community.general/pull/4647). diff --git a/changelogs/fragments/4648-vmadm-improvements-2.yaml b/changelogs/fragments/4648-vmadm-improvements-2.yaml deleted file mode 100644 index 180173e779..0000000000 --- a/changelogs/fragments/4648-vmadm-improvements-2.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - vmadm - minor refactoring and improvement on the module (https://github.com/ansible-collections/community.general/pull/4648). diff --git a/changelogs/fragments/4649-rax-files-objects-improvements.yaml b/changelogs/fragments/4649-rax-files-objects-improvements.yaml deleted file mode 100644 index f32f744620..0000000000 --- a/changelogs/fragments/4649-rax-files-objects-improvements.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - rax_files_objects - minor refactoring improving code quality (https://github.com/ansible-collections/community.general/pull/4649). diff --git a/changelogs/fragments/4650-zfs-improvements.yaml b/changelogs/fragments/4650-zfs-improvements.yaml deleted file mode 100644 index 96df5f5bcd..0000000000 --- a/changelogs/fragments/4650-zfs-improvements.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - zfs - minor refactoring in the code (https://github.com/ansible-collections/community.general/pull/4650). diff --git a/changelogs/fragments/4651-zypper-checkmode-fix.yaml b/changelogs/fragments/4651-zypper-checkmode-fix.yaml deleted file mode 100644 index 403e4eead6..0000000000 --- a/changelogs/fragments/4651-zypper-checkmode-fix.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - zypper - fix undefined variable when running in check mode (https://github.com/ansible-collections/community.general/pull/4667). diff --git a/changelogs/fragments/4660-mh-added-do-raise.yaml b/changelogs/fragments/4660-mh-added-do-raise.yaml deleted file mode 100644 index 01585afb96..0000000000 --- a/changelogs/fragments/4660-mh-added-do-raise.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ModuleHelper module utils - ``ModuleHelperBase`` now has a convenience method ``do_raise`` (https://github.com/ansible-collections/community.general/pull/4660). diff --git a/changelogs/fragments/4662-yarn-emoji.yml b/changelogs/fragments/4662-yarn-emoji.yml deleted file mode 100644 index 696188dd9b..0000000000 --- a/changelogs/fragments/4662-yarn-emoji.yml +++ /dev/null @@ -1,2 +0,0 @@ -breaking_changes: - - yarn - remove unsupported and unnecessary ``--no-emoji`` flag (https://github.com/ansible-collections/community.general/pull/4662). diff --git a/changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml b/changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml deleted file mode 100644 index 45a3f9f0b9..0000000000 --- a/changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - gitlab_hook - avoid errors during idempotency check when an attribute does not exist (https://github.com/ansible-collections/community.general/pull/4668). diff --git a/changelogs/fragments/5.0.0.yml b/changelogs/fragments/5.0.0.yml deleted file mode 100644 index 781eb782c8..0000000000 --- a/changelogs/fragments/5.0.0.yml +++ /dev/null @@ -1 +0,0 @@ -release_summary: This is release 5.0.0 of ``community.general``, released on 2022-05-17. From ea456985f6efcb0f08e7359e0c290c43b8d0b8ae Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 17 May 2022 13:41:46 +0200 Subject: [PATCH 0038/2104] Next expected release is 5.1.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 6dc58b3f0f..66b2fc746a 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: community name: general -version: 5.0.0 +version: 5.1.0 readme: README.md authors: - Ansible (https://github.com/ansible) From 1a2fa802c0ccc4b6bef0c6d441050fd8d3a489f9 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 18 May 2022 05:26:06 +1200 Subject: [PATCH 0039/2104] [6.0.0] xfconf - deprecate parameter disable_facts (#4520) * xfconf: deprecate parameter disable_facts * added changelog fragment * changed deprecation to 8.0.0 * Update changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml Co-authored-by: Felix Fontein * added parameter deprecation Co-authored-by: Felix Fontein --- .../fragments/4520-xfconf-deprecate-disable-facts.yml | 2 ++ plugins/modules/system/xfconf.py | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml diff --git a/changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml b/changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml new file mode 100644 index 0000000000..d2af2bc9df --- /dev/null +++ b/changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml @@ -0,0 +1,2 @@ +deprecated_features: + - xfconf - deprecated parameter ``disable_facts``, as since version 4.0.0 it only allows value ``true`` (https://github.com/ansible-collections/community.general/pull/4520). diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index 8becd4a683..20213dd348 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -77,7 +77,7 @@ options: disable_facts: description: - The value C(false) is no longer allowed since community.general 4.0.0. - - This option will be deprecated in a future version, and eventually be removed. + - This option is deprecated, and will be removed in community.general 8.0.0. type: bool default: true version_added: 2.1.0 @@ -183,7 +183,11 @@ class XFConfProperty(CmdStateModuleHelper): choices=('string', 'int', 'double', 'bool', 'uint', 'uchar', 'char', 'uint64', 'int64', 'float')), value=dict(type='list', elements='raw'), force_array=dict(type='bool', default=False, aliases=['array']), - disable_facts=dict(type='bool', default=True), + disable_facts=dict( + type='bool', default=True, + removed_in_version='8.0.0', + removed_from_collection='community.general' + ), ), required_if=[('state', 'present', ['value', 'value_type'])], required_together=[('value', 'value_type')], From 8db265f99b4b0d2d4e2b1c339d3a787ed7c9d806 Mon Sep 17 00:00:00 2001 From: jixj5 <66418293+jixj5@users.noreply.github.com> Date: Wed, 18 May 2022 13:24:27 +0800 Subject: [PATCH 0040/2104] Update lenovoxcc module for compatibility with the virtualMedia resource location from Manager to System (#4682) * Update lenovoxcc module for compatibility due to redfish spec changes the virtualMedia resource location from Managers to Systems * Add changelogs fragment for PR 4682 * Update changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml Co-authored-by: Felix Fontein Co-authored-by: Tami YY3 Pan Co-authored-by: Felix Fontein --- ...bility-virtualmedia-resource-location.yaml | 2 + .../lenovoxcc/xcc_redfish_command.py | 122 +++++++++++++++++- .../lenovoxcc/test_xcc_redfish_command.py | 28 ++-- 3 files changed, 133 insertions(+), 19 deletions(-) create mode 100644 changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml diff --git a/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml b/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml new file mode 100644 index 0000000000..c15ee4d15c --- /dev/null +++ b/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml @@ -0,0 +1,2 @@ +bugfixes: + - xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). \ No newline at end of file diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index f082f6cd5c..bc54d0c148 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -305,6 +305,8 @@ class XCCRedfishUtils(RedfishUtils): continue if 'RDOC' in uri: continue + if 'Remote' in uri: + continue # if ejected, 'Inserted' should be False and 'ImageName' cleared if (not data.get('Inserted', False) and not data.get('ImageName')): @@ -312,13 +314,19 @@ class XCCRedfishUtils(RedfishUtils): return None, None def virtual_media_eject_one(self, image_url): - # locate and read the VirtualMedia resources - response = self.get_request(self.root_uri + self.manager_uri) + # read the VirtualMedia resources from systems + response = self.get_request(self.root_uri + self.systems_uri) if response['ret'] is False: return response data = response['data'] if 'VirtualMedia' not in data: - return {'ret': False, 'msg': "VirtualMedia resource not found"} + # read the VirtualMedia resources from manager + response = self.get_request(self.root_uri + self.manager_uri) + if response['ret'] is False: + return response + data = response['data'] + if 'VirtualMedia' not in data: + return {'ret': False, 'msg': "VirtualMedia resource not found"} virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: @@ -379,13 +387,20 @@ class XCCRedfishUtils(RedfishUtils): return self.virtual_media_eject_one(image_url) # eject all inserted media when no image_url specified - # read all the VirtualMedia resources - response = self.get_request(self.root_uri + self.manager_uri) + # read the VirtualMedia resources from systems + response = self.get_request(self.root_uri + self.systems_uri) if response['ret'] is False: return response data = response['data'] if 'VirtualMedia' not in data: - return {'ret': False, 'msg': "VirtualMedia resource not found"} + # read the VirtualMedia resources from manager + response = self.get_request(self.root_uri + self.manager_uri) + if response['ret'] is False: + return response + data = response['data'] + if 'VirtualMedia' not in data: + return {'ret': False, 'msg': "VirtualMedia resource not found"} + # read all the VirtualMedia resources virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: @@ -413,6 +428,95 @@ class XCCRedfishUtils(RedfishUtils): return {'ret': True, 'changed': True, 'msg': "VirtualMedia %s ejected" % str(ejected_media_list)} + def virtual_media_insert(self, options): + param_map = { + 'Inserted': 'inserted', + 'WriteProtected': 'write_protected', + 'UserName': 'username', + 'Password': 'password', + 'TransferProtocolType': 'transfer_protocol_type', + 'TransferMethod': 'transfer_method' + } + image_url = options.get('image_url') + if not image_url: + return {'ret': False, + 'msg': "image_url option required for VirtualMediaInsert"} + media_types = options.get('media_types') + + # read the VirtualMedia resources from systems + response = self.get_request(self.root_uri + self.systems_uri) + if response['ret'] is False: + return response + data = response['data'] + if 'VirtualMedia' not in data: + # read the VirtualMedia resources from manager + response = self.get_request(self.root_uri + self.manager_uri) + if response['ret'] is False: + return response + data = response['data'] + if 'VirtualMedia' not in data: + return {'ret': False, 'msg': "VirtualMedia resource not found"} + virt_media_uri = data["VirtualMedia"]["@odata.id"] + response = self.get_request(self.root_uri + virt_media_uri) + if response['ret'] is False: + return response + data = response['data'] + virt_media_list = [] + for member in data[u'Members']: + virt_media_list.append(member[u'@odata.id']) + resources, headers = self._read_virt_media_resources(virt_media_list) + + # see if image already inserted; if so, nothing to do + if self._virt_media_image_inserted(resources, image_url): + return {'ret': True, 'changed': False, + 'msg': "VirtualMedia '%s' already inserted" % image_url} + + # find an empty slot to insert the media + # try first with strict media_type matching + uri, data = self._find_empty_virt_media_slot( + resources, media_types, media_match_strict=True) + if not uri: + # if not found, try without strict media_type matching + uri, data = self._find_empty_virt_media_slot( + resources, media_types, media_match_strict=False) + if not uri: + return {'ret': False, + 'msg': "Unable to find an available VirtualMedia resource " + "%s" % ('supporting ' + str(media_types) + if media_types else '')} + + # confirm InsertMedia action found + if ('Actions' not in data or + '#VirtualMedia.InsertMedia' not in data['Actions']): + # try to insert via PATCH if no InsertMedia action found + h = headers[uri] + if 'allow' in h: + methods = [m.strip() for m in h.get('allow').split(',')] + if 'PATCH' not in methods: + # if Allow header present and PATCH missing, return error + return {'ret': False, + 'msg': "%s action not found and PATCH not allowed" + % '#VirtualMedia.InsertMedia'} + return self.virtual_media_insert_via_patch(options, param_map, + uri, data) + + # get the action property + action = data['Actions']['#VirtualMedia.InsertMedia'] + if 'target' not in action: + return {'ret': False, + 'msg': "target URI missing from Action " + "#VirtualMedia.InsertMedia"} + action_uri = action['target'] + # get ActionInfo or AllowableValues + ai = self._get_all_action_info_values(action) + # construct payload + payload = self._insert_virt_media_payload(options, param_map, data, ai) + # POST to action + response = self.post_request(self.root_uri + action_uri, payload) + if response['ret'] is False: + return response + return {'ret': True, 'changed': True, 'msg': "VirtualMedia inserted"} + def raw_get_resource(self, resource_uri): if resource_uri is None: return {'ret': False, 'msg': "resource_uri is missing"} @@ -640,7 +744,11 @@ def main(): # Organize by Categories / Commands if category == "Manager": - # execute only if we find a Manager service resource + # For virtual media resource locates on Systems service + result = rf_utils._find_systems_resource() + if result['ret'] is False: + module.fail_json(msg=to_native(result['msg'])) + # For virtual media resource locates on Managers service result = rf_utils._find_managers_resource() if result['ret'] is False: module.fail_json(msg=to_native(result['msg'])) diff --git a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py index 418474c578..7ee7ee2c18 100644 --- a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py @@ -72,14 +72,16 @@ class TestXCCRedfishCommand(unittest.TestCase): 'transfer_protocol_type': 'NFS' } }) - with patch.object(module.XCCRedfishUtils, '_find_managers_resource') as mock__find_managers_resource: - mock__find_managers_resource.return_value = {'ret': True, 'changed': True, 'msg': 'success'} + with patch.object(module.XCCRedfishUtils, '_find_systems_resource') as mock__find_systems_resource: + mock__find_systems_resource.return_value = {'ret': True, 'changed': True, 'msg': 'success'} + with patch.object(module.XCCRedfishUtils, '_find_managers_resource') as mock__find_managers_resource: + mock__find_managers_resource.return_value = {'ret': True, 'changed': True, 'msg': 'success'} - with patch.object(module.XCCRedfishUtils, 'virtual_media_insert') as mock_virtual_media_insert: - mock_virtual_media_insert.return_value = {'ret': True, 'changed': True, 'msg': 'success'} + with patch.object(module.XCCRedfishUtils, 'virtual_media_insert') as mock_virtual_media_insert: + mock_virtual_media_insert.return_value = {'ret': True, 'changed': True, 'msg': 'success'} - with self.assertRaises(AnsibleExitJson) as result: - module.main() + with self.assertRaises(AnsibleExitJson) as result: + module.main() def test_module_command_VirtualMediaEject_pass(self): set_module_args({ @@ -93,14 +95,16 @@ class TestXCCRedfishCommand(unittest.TestCase): 'image_url': "nfs://10.245.52.18:/home/nfs/bootable-sr635-20210111-autorun.iso", } }) - with patch.object(module.XCCRedfishUtils, '_find_managers_resource') as mock__find_managers_resource: - mock__find_managers_resource.return_value = {'ret': True, 'changed': True, 'msg': 'success'} + with patch.object(module.XCCRedfishUtils, '_find_systems_resource') as mock__find_systems_resource: + mock__find_systems_resource.return_value = {'ret': True, 'changed': True, 'msg': 'success'} + with patch.object(module.XCCRedfishUtils, '_find_managers_resource') as mock__find_managers_resource: + mock__find_managers_resource.return_value = {'ret': True, 'changed': True, 'msg': 'success'} - with patch.object(module.XCCRedfishUtils, 'virtual_media_eject') as mock_virtual_media_eject: - mock_virtual_media_eject.return_value = {'ret': True, 'changed': True, 'msg': 'success'} + with patch.object(module.XCCRedfishUtils, 'virtual_media_eject') as mock_virtual_media_eject: + mock_virtual_media_eject.return_value = {'ret': True, 'changed': True, 'msg': 'success'} - with self.assertRaises(AnsibleExitJson) as result: - module.main() + with self.assertRaises(AnsibleExitJson) as result: + module.main() def test_module_command_VirtualMediaEject_fail_when_required_args_missing(self): with self.assertRaises(AnsibleFailJson): From ae7f2f25cbe91a2507d33477cc01d7c91c8e7220 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 18 May 2022 22:28:10 +0200 Subject: [PATCH 0041/2104] Disable the OpenNebula integration tests. (#4692) --- tests/integration/targets/one_host/aliases | 1 + tests/integration/targets/one_template/aliases | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/integration/targets/one_host/aliases b/tests/integration/targets/one_host/aliases index 1ff4e0b13e..c3d15acf55 100644 --- a/tests/integration/targets/one_host/aliases +++ b/tests/integration/targets/one_host/aliases @@ -1,2 +1,3 @@ cloud/opennebula shippable/cloud/group1 +disabled # FIXME diff --git a/tests/integration/targets/one_template/aliases b/tests/integration/targets/one_template/aliases index 1ff4e0b13e..c3d15acf55 100644 --- a/tests/integration/targets/one_template/aliases +++ b/tests/integration/targets/one_template/aliases @@ -1,2 +1,3 @@ cloud/opennebula shippable/cloud/group1 +disabled # FIXME From db1010a417518f5b450e2b68bc8f1801318d4465 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 18 May 2022 22:30:58 +0200 Subject: [PATCH 0042/2104] Ignore import sanity errors until the modules can be fixed. (#4689) --- tests/sanity/ignore-2.14.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 164fc7daf5..96aef6cd3a 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -1,4 +1,5 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen +plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants @@ -26,6 +27,7 @@ plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/system/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice From 8421af1ea39b650dbd27ea2ddf9b97f865a56fcc Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 19 May 2022 14:48:03 +0200 Subject: [PATCH 0043/2104] certifi dropped Python 2 support (#4702) * certifi dropped Python 2 support. * Apparently the consul tests didn't use the constraints. --- tests/integration/targets/consul/meta/main.yml | 1 + tests/integration/targets/consul/tasks/main.yml | 2 ++ tests/utils/constraints.txt | 1 + 3 files changed, 4 insertions(+) diff --git a/tests/integration/targets/consul/meta/main.yml b/tests/integration/targets/consul/meta/main.yml index f9bb8406a4..e54aea9798 100644 --- a/tests/integration/targets/consul/meta/main.yml +++ b/tests/integration/targets/consul/meta/main.yml @@ -3,3 +3,4 @@ dependencies: - setup_pkg_mgr - setup_openssl - setup_remote_tmp_dir + - setup_remote_constraints diff --git a/tests/integration/targets/consul/tasks/main.yml b/tests/integration/targets/consul/tasks/main.yml index 1f7edce304..ab343029fd 100644 --- a/tests/integration/targets/consul/tasks/main.yml +++ b/tests/integration/targets/consul/tasks/main.yml @@ -12,12 +12,14 @@ - name: Install requests<2.20 (CentOS/RHEL 6) pip: name: requests<2.20 + extra_args: "-c {{ remote_constraints }}" register: result until: result is success when: ansible_distribution_file_variety|default() == 'RedHat' and ansible_distribution_major_version is version('6', '<=') - name: Install python-consul pip: name: python-consul + extra_args: "-c {{ remote_constraints }}" register: result until: result is success - name: Generate privatekey diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index 99636b6885..1c04d8152f 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -1,3 +1,4 @@ +certifi < 2022.5.18 ; python_version < '3.5' # certifi 2022.5.18 requires Python 3.5 or later coverage >= 4.2, < 5.0.0, != 4.3.2 ; python_version <= '3.7' # features in 4.2+ required, avoid known bug in 4.3.2 on python 2.6, coverage 5.0+ incompatible coverage >= 4.5.4, < 5.0.0 ; python_version > '3.7' # coverage had a bug in < 4.5.4 that would cause unit tests to hang in Python 3.8, coverage 5.0+ incompatible cryptography < 2.2 ; python_version < '2.7' # cryptography 2.2 drops support for python 2.6 From 319c29c2a2f0d3a299093e9f00240ca8a119a791 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 22 May 2022 17:20:30 +0200 Subject: [PATCH 0044/2104] Add RHEL 9.0, FreeBSD 13.1, Ubuntu 22.04 and Fedora 36 to CI, fix bug in filesystem module (#4700) * Add RHEL 9.0 and FreeBSD 13.1 to CI. * RHEL 9 has no pyOpenSSL apparently. * Adjust URL for EPEL. * Fix cargo install on FreeBSD 13.1. * Add Ubuntu 22.04 and Fedora 36 to CI. * Fix logic. * filesystem: do not die output line does not contain ':' * Skip django_manage tests on RHEL 9 as well. * homectl tests don't work with RHEL 9.0. * Improve error handling, improve fatresize output handling. * Skip Fedora 36. * Skip filesystem vfat tests on Ubuntu 22.04. There, resizing fails with a bug: Bug: Assertion (disk != NULL) at ../../libparted/disk.c:1620 in function ped_disk_get_partition_by_sector() failed. * 'trusty' is 14.04. Adding 22.04 to skip list. * Skip jail tests for FreeBSD 13.1. * Add config for postgres on Ubuntu 22.04. * Make CentOS 6 happy. * Adjust postgres version. * Try installing EPEL a bit differently. * Skip ufw and iso_extract tests on RHEL 9. * Skip odbc tests on RHEL 9. * Skip RHEL 9.0 for snap tests. * Add changelog fragment for filesystem code changes. --- .azure-pipelines/azure-pipelines.yml | 16 ++++++++-------- changelogs/fragments/4700-code-changes.yml | 3 +++ plugins/modules/system/filesystem.py | 19 +++++++++++-------- .../integration/targets/cargo/tasks/setup.yml | 12 +++++++++++- .../integration/targets/django_manage/aliases | 1 + .../targets/filesystem/tasks/main.yml | 3 +++ tests/integration/targets/homectl/aliases | 3 ++- .../targets/homectl/tasks/main.yml | 1 + tests/integration/targets/iso_extract/aliases | 2 ++ .../targets/iso_extract/meta/main.yml | 1 - .../targets/iso_extract/tasks/main.yml | 7 +++++++ .../integration/targets/monit/tasks/main.yml | 3 +++ tests/integration/targets/mqtt/tasks/main.yml | 2 +- tests/integration/targets/odbc/aliases | 1 + .../targets/pkgng/tasks/freebsd.yml | 5 ++++- .../targets/setup_epel/tasks/main.yml | 12 +++++++++++- .../targets/setup_openssl/vars/RedHat-9.yml | 4 ++++ .../vars/Ubuntu-22-py3.yml | 8 ++++++++ tests/integration/targets/setup_snap/aliases | 1 + .../targets/setup_snap/meta/main.yml | 1 - .../targets/setup_snap/tasks/D-RedHat-9.0.yml | 1 + .../targets/setup_snap/tasks/main.yml | 7 +++++++ tests/integration/targets/ufw/aliases | 7 +++---- tests/integration/targets/ufw/tasks/main.yml | 4 +++- 24 files changed, 96 insertions(+), 28 deletions(-) create mode 100644 changelogs/fragments/4700-code-changes.yml create mode 100644 tests/integration/targets/setup_openssl/vars/RedHat-9.yml create mode 100644 tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml create mode 100644 tests/integration/targets/setup_snap/aliases create mode 120000 tests/integration/targets/setup_snap/tasks/D-RedHat-9.0.yml diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 7cfa691e4a..551b79cf8e 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -177,12 +177,12 @@ stages: test: macos/12.0 - name: RHEL 7.9 test: rhel/7.9 - - name: RHEL 8.5 - test: rhel/8.5 + - name: RHEL 9.0 + test: rhel/9.0 - name: FreeBSD 12.3 test: freebsd/12.3 - - name: FreeBSD 13.0 - test: freebsd/13.0 + - name: FreeBSD 13.1 + test: freebsd/13.1 groups: - 1 - 2 @@ -253,14 +253,14 @@ stages: test: centos7 - name: Fedora 34 test: fedora34 - - name: Fedora 35 - test: fedora35 + - name: Fedora 36 + test: fedora36 - name: openSUSE 15 test: opensuse15 - name: Ubuntu 18.04 test: ubuntu1804 - - name: Ubuntu 20.04 - test: ubuntu2004 + - name: Ubuntu 22.04 + test: ubuntu2204 - name: Alpine 3 test: alpine3 groups: diff --git a/changelogs/fragments/4700-code-changes.yml b/changelogs/fragments/4700-code-changes.yml new file mode 100644 index 0000000000..d1b281d876 --- /dev/null +++ b/changelogs/fragments/4700-code-changes.yml @@ -0,0 +1,3 @@ +bugfixes: + - "filesystem - improve error messages when output cannot be parsed by including newlines in escaped form (https://github.com/ansible-collections/community.general/pull/4700)." + - "filesystem - handle ``fatresize --info`` output lines without ``:`` (https://github.com/ansible-collections/community.general/pull/4700)." diff --git a/plugins/modules/system/filesystem.py b/plugins/modules/system/filesystem.py index 9fb7810249..6b38c58183 100644 --- a/plugins/modules/system/filesystem.py +++ b/plugins/modules/system/filesystem.py @@ -268,7 +268,7 @@ class Ext(Filesystem): if None not in (block_size, block_count): break else: - raise ValueError(out) + raise ValueError(repr(out)) return block_size * block_count @@ -319,7 +319,7 @@ class XFS(Filesystem): if None not in (block_size, block_count): break else: - raise ValueError(out) + raise ValueError(repr(out)) return block_size * block_count @@ -364,7 +364,7 @@ class Btrfs(Filesystem): for line in stdout.splitlines(): if "Device size" in line: return int(line.split()[-1]) - raise ValueError(stdout) + raise ValueError(repr(stdout)) class Ocfs2(Filesystem): @@ -405,7 +405,7 @@ class F2fs(Filesystem): if None not in (sector_size, sector_count): break else: - raise ValueError(out) + raise ValueError(repr(out)) return sector_size * sector_count @@ -428,12 +428,15 @@ class VFAT(Filesystem): dummy, out, dummy = self.module.run_command([cmd, '--info', str(dev)], check_rc=True, environ_update=self.LANG_ENV) fssize = None for line in out.splitlines()[1:]: - param, value = line.split(':', 1) - if param.strip() == 'Size': + parts = line.split(':', 1) + if len(parts) < 2: + continue + param, value = parts + if param.strip() in ('Size', 'Cur size'): fssize = int(value.strip()) break else: - raise ValueError(out) + raise ValueError(repr(out)) return fssize @@ -477,7 +480,7 @@ class UFS(Filesystem): if None not in (fragmentsize, providersize): break else: - raise ValueError(out) + raise ValueError(repr(out)) return fragmentsize * providersize diff --git a/tests/integration/targets/cargo/tasks/setup.yml b/tests/integration/targets/cargo/tasks/setup.yml index 77104f6dfd..5315349c12 100644 --- a/tests/integration/targets/cargo/tasks/setup.yml +++ b/tests/integration/targets/cargo/tasks/setup.yml @@ -7,8 +7,18 @@ - set_fact: has_cargo: true when: - - ansible_system != 'FreeBSD' or ansible_distribution_version is version('13.0', '>') + - ansible_system != 'FreeBSD' - ansible_distribution != 'MacOSX' - ansible_distribution != 'RedHat' or ansible_distribution_version is version('8.0', '>=') - ansible_distribution != 'CentOS' or ansible_distribution_version is version('7.0', '>=') - ansible_distribution != 'Ubuntu' or ansible_distribution_version is version('18', '>=') + +- block: + - name: Install rust (containing cargo) + package: + name: rust + state: present + - set_fact: + has_cargo: true + when: + - ansible_system == 'FreeBSD' and ansible_distribution_version is version('13.0', '>') diff --git a/tests/integration/targets/django_manage/aliases b/tests/integration/targets/django_manage/aliases index d01e476f95..174bc11337 100644 --- a/tests/integration/targets/django_manage/aliases +++ b/tests/integration/targets/django_manage/aliases @@ -7,3 +7,4 @@ skip/rhel8.2 skip/rhel8.3 skip/rhel8.4 skip/rhel8.5 +skip/rhel9.0 diff --git a/tests/integration/targets/filesystem/tasks/main.yml b/tests/integration/targets/filesystem/tasks/main.yml index 7de9df8e97..70ff890cc7 100644 --- a/tests/integration/targets/filesystem/tasks/main.yml +++ b/tests/integration/targets/filesystem/tasks/main.yml @@ -58,6 +58,9 @@ - 'not (item.0.key == "vfat" and ansible_distribution == "Debian")' # TODO: figure out why it fails, fix it! # vfat resizing fails on ArchLinux - 'not (item.0.key == "vfat" and ansible_distribution == "Archlinux")' # TODO: figure out why it fails, fix it! + # vfat resizing fails on Ubuntu 22.04 + - 'not (item.0.key == "vfat" and ansible_distribution == "Ubuntu" and (ansible_facts.distribution_major_version | int == 22))' + # TODO: figure out why it fails, fix it! # btrfs-progs cannot be installed on ArchLinux - 'not (item.0.key == "btrfs" and ansible_distribution == "Archlinux")' # TODO: figure out why it fails, fix it! diff --git a/tests/integration/targets/homectl/aliases b/tests/integration/targets/homectl/aliases index a2c5a3a804..de4b90786f 100644 --- a/tests/integration/targets/homectl/aliases +++ b/tests/integration/targets/homectl/aliases @@ -2,4 +2,5 @@ shippable/posix/group1 skip/aix skip/freebsd skip/osx -skip/macos \ No newline at end of file +skip/macos +skip/rhel9.0 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/ diff --git a/tests/integration/targets/homectl/tasks/main.yml b/tests/integration/targets/homectl/tasks/main.yml index ded6173759..18943a782d 100644 --- a/tests/integration/targets/homectl/tasks/main.yml +++ b/tests/integration/targets/homectl/tasks/main.yml @@ -174,3 +174,4 @@ when: - systemd_version.rc == 0 and (systemd_version.stdout | regex_search('[0-9][0-9][0-9]') | int >= 245) and homectl_version.rc == 0 - ansible_distribution != 'Archlinux' # TODO! + - ansible_distribution != 'Fedora' or ansible_distribution_major_version|int < 36 # TODO! diff --git a/tests/integration/targets/iso_extract/aliases b/tests/integration/targets/iso_extract/aliases index 5de0229f66..1a89e39873 100644 --- a/tests/integration/targets/iso_extract/aliases +++ b/tests/integration/targets/iso_extract/aliases @@ -1,4 +1,6 @@ shippable/posix/group1 +needs/target/setup_epel destructive skip/aix skip/osx # FIXME +skip/rhel9.0 # FIXME diff --git a/tests/integration/targets/iso_extract/meta/main.yml b/tests/integration/targets/iso_extract/meta/main.yml index 07990bd4ef..56bc554611 100644 --- a/tests/integration/targets/iso_extract/meta/main.yml +++ b/tests/integration/targets/iso_extract/meta/main.yml @@ -1,4 +1,3 @@ dependencies: - setup_pkg_mgr - - setup_epel - setup_remote_tmp_dir diff --git a/tests/integration/targets/iso_extract/tasks/main.yml b/tests/integration/targets/iso_extract/tasks/main.yml index 18fd9b37a9..15f270cb05 100644 --- a/tests/integration/targets/iso_extract/tasks/main.yml +++ b/tests/integration/targets/iso_extract/tasks/main.yml @@ -25,6 +25,13 @@ - set_fact: output_test_dir: '{{ remote_tmp_dir }}/test_iso_extract' +- name: Install EPEL repository (RHEL only) + include_role: + name: setup_epel + when: + - ansible_distribution in ['RedHat', 'CentOS'] + - ansible_distribution_major_version is version('9', '<') + - name: Install 7zip import_tasks: 7zip.yml diff --git a/tests/integration/targets/monit/tasks/main.yml b/tests/integration/targets/monit/tasks/main.yml index 21404fe15a..8f6baeebe8 100644 --- a/tests/integration/targets/monit/tasks/main.yml +++ b/tests/integration/targets/monit/tasks/main.yml @@ -7,6 +7,9 @@ - name: Install EPEL repository (RHEL only) include_role: name: setup_epel + when: + - ansible_distribution in ['RedHat', 'CentOS'] + - ansible_distribution_major_version is version('9', '<') - name: create required directories become: yes diff --git a/tests/integration/targets/mqtt/tasks/main.yml b/tests/integration/targets/mqtt/tasks/main.yml index c5dcf3bec7..ddd37c11e1 100644 --- a/tests/integration/targets/mqtt/tasks/main.yml +++ b/tests/integration/targets/mqtt/tasks/main.yml @@ -6,4 +6,4 @@ - include: ubuntu.yml when: - ansible_distribution == 'Ubuntu' - - ansible_distribution_release not in ['trusty', 'focal'] + - ansible_distribution_release not in ['focal', 'jammy'] diff --git a/tests/integration/targets/odbc/aliases b/tests/integration/targets/odbc/aliases index 4ced527402..6e13799f82 100644 --- a/tests/integration/targets/odbc/aliases +++ b/tests/integration/targets/odbc/aliases @@ -3,4 +3,5 @@ shippable/posix/group1 skip/osx skip/macos skip/rhel8.0 +skip/rhel9.0 skip/freebsd diff --git a/tests/integration/targets/pkgng/tasks/freebsd.yml b/tests/integration/targets/pkgng/tasks/freebsd.yml index f5274d5c5d..b06f5a0333 100644 --- a/tests/integration/targets/pkgng/tasks/freebsd.yml +++ b/tests/integration/targets/pkgng/tasks/freebsd.yml @@ -461,7 +461,10 @@ # NOTE: FreeBSD 12.0 test runner receives a "connection reset by peer" after ~20% downloaded so we are # only running this on 12.1 or higher # - when: ansible_distribution_version is version('12.01', '>=') + # NOTE: FreeBSD 13.1 fails to update the package catalogue for unknown reasons (someone with FreeBSD + # knowledge has to take a look) + # + when: ansible_distribution_version is version('12.01', '>=') and ansible_distribution_version is version('13.1', '<') block: - name: Setup testjail include: setup-testjail.yml diff --git a/tests/integration/targets/setup_epel/tasks/main.yml b/tests/integration/targets/setup_epel/tasks/main.yml index 21627cfa1d..b848ac2144 100644 --- a/tests/integration/targets/setup_epel/tasks/main.yml +++ b/tests/integration/targets/setup_epel/tasks/main.yml @@ -7,4 +7,14 @@ yum: name: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm disable_gpg_check: true - when: ansible_facts.distribution in ['RedHat', 'CentOS'] + when: + - ansible_facts.distribution in ['RedHat', 'CentOS'] + - ansible_facts.distribution_major_version == '6' + +- name: Install EPEL + yum: + name: https://ci-files.testing.ansible.com/test/integration/targets/setup_epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm + disable_gpg_check: true + when: + - ansible_facts.distribution in ['RedHat', 'CentOS'] + - ansible_facts.distribution_major_version != '6' diff --git a/tests/integration/targets/setup_openssl/vars/RedHat-9.yml b/tests/integration/targets/setup_openssl/vars/RedHat-9.yml new file mode 100644 index 0000000000..587309dc07 --- /dev/null +++ b/tests/integration/targets/setup_openssl/vars/RedHat-9.yml @@ -0,0 +1,4 @@ +cryptography_package_name: python-cryptography +cryptography_package_name_python3: python3-cryptography +openssl_package_name: openssl +cryptography_from_pip: false diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml new file mode 100644 index 0000000000..b1521e4bc5 --- /dev/null +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml @@ -0,0 +1,8 @@ +postgresql_packages: + - "postgresql" + - "postgresql-common" + - "python3-psycopg2" + +pg_hba_location: "/etc/postgresql/14/main/pg_hba.conf" +pg_dir: "/var/lib/postgresql/14/main" +pg_ver: 14 diff --git a/tests/integration/targets/setup_snap/aliases b/tests/integration/targets/setup_snap/aliases new file mode 100644 index 0000000000..65e831523c --- /dev/null +++ b/tests/integration/targets/setup_snap/aliases @@ -0,0 +1 @@ +needs/target/setup_epel diff --git a/tests/integration/targets/setup_snap/meta/main.yml b/tests/integration/targets/setup_snap/meta/main.yml index 0e51c36ebd..5438ced5c3 100644 --- a/tests/integration/targets/setup_snap/meta/main.yml +++ b/tests/integration/targets/setup_snap/meta/main.yml @@ -1,3 +1,2 @@ dependencies: - setup_pkg_mgr - - setup_epel diff --git a/tests/integration/targets/setup_snap/tasks/D-RedHat-9.0.yml b/tests/integration/targets/setup_snap/tasks/D-RedHat-9.0.yml new file mode 120000 index 0000000000..0b06951496 --- /dev/null +++ b/tests/integration/targets/setup_snap/tasks/D-RedHat-9.0.yml @@ -0,0 +1 @@ +nothing.yml \ No newline at end of file diff --git a/tests/integration/targets/setup_snap/tasks/main.yml b/tests/integration/targets/setup_snap/tasks/main.yml index 26e02ddc56..6851a204f3 100644 --- a/tests/integration/targets/setup_snap/tasks/main.yml +++ b/tests/integration/targets/setup_snap/tasks/main.yml @@ -8,6 +8,13 @@ debug: msg: "Distribution '{{ ansible_facts.distribution }}', version '{{ ansible_facts.distribution_version }}', OS family '{{ ansible_facts.os_family }}'" +- name: Install EPEL repository (RHEL only) + include_role: + name: setup_epel + when: + - ansible_distribution in ['RedHat', 'CentOS'] + - ansible_distribution_major_version is version('9', '<') + - name: Include distribution specific tasks include_tasks: "{{ lookup('first_found', params) }}" vars: diff --git a/tests/integration/targets/ufw/aliases b/tests/integration/targets/ufw/aliases index 7ab34d8e5e..bb5347a578 100644 --- a/tests/integration/targets/ufw/aliases +++ b/tests/integration/targets/ufw/aliases @@ -3,10 +3,9 @@ skip/aix skip/osx skip/macos skip/freebsd -skip/rhel8.0 -skip/rhel8.0b -skip/rhel8.1b +skip/rhel8.0 # FIXME +skip/rhel9.0 # FIXME skip/docker needs/root -destructive needs/target/setup_epel +destructive diff --git a/tests/integration/targets/ufw/tasks/main.yml b/tests/integration/targets/ufw/tasks/main.yml index 3feb480cb0..ab9b109a18 100644 --- a/tests/integration/targets/ufw/tasks/main.yml +++ b/tests/integration/targets/ufw/tasks/main.yml @@ -8,7 +8,9 @@ - name: Install EPEL repository (RHEL only) include_role: name: setup_epel - when: ansible_distribution == 'RedHat' + when: + - ansible_distribution in ['RedHat', 'CentOS'] + - ansible_distribution_major_version is version('9', '<') - name: Install iptables (SuSE only) package: name: iptables From 6052776de138606fb23d7383476a321cb7ff2e00 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 23 May 2022 17:19:24 +1200 Subject: [PATCH 0045/2104] Multiple modules using ModuleHelper (#4674) * Multiple modules using ModuleHelper Replaced raising exception with calling method do_raise() in MH. Removed the importing of the exception class. * added changelog fragment --- changelogs/fragments/4674-use-mh-raise.yaml | 6 ++++++ plugins/modules/packaging/language/cpanm.py | 17 ++++++++-------- plugins/modules/packaging/language/pipx.py | 16 ++++++--------- plugins/modules/packaging/os/snap.py | 22 ++++++++++----------- plugins/modules/system/mksysb.py | 6 +++--- plugins/modules/system/xfconf.py | 4 ++-- 6 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 changelogs/fragments/4674-use-mh-raise.yaml diff --git a/changelogs/fragments/4674-use-mh-raise.yaml b/changelogs/fragments/4674-use-mh-raise.yaml new file mode 100644 index 0000000000..3e8ad13975 --- /dev/null +++ b/changelogs/fragments/4674-use-mh-raise.yaml @@ -0,0 +1,6 @@ +minor_changes: + - cpanm - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). + - pipx - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). + - snap - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). + - mksysb - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). + - xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). diff --git a/plugins/modules/packaging/language/cpanm.py b/plugins/modules/packaging/language/cpanm.py index 7b209d1fae..8c8f2ea1c3 100644 --- a/plugins/modules/packaging/language/cpanm.py +++ b/plugins/modules/packaging/language/cpanm.py @@ -134,7 +134,7 @@ EXAMPLES = ''' import os from ansible_collections.community.general.plugins.module_utils.module_helper import ( - ModuleHelper, CmdMixin, ArgFormat, ModuleHelperException + ModuleHelper, CmdMixin, ArgFormat ) @@ -171,10 +171,10 @@ class CPANMinus(CmdMixin, ModuleHelper): v = self.vars if v.mode == "compatibility": if v.name_check: - raise ModuleHelperException("Parameter name_check can only be used with mode=new") + self.do_raise("Parameter name_check can only be used with mode=new") else: if v.name and v.from_path: - raise ModuleHelperException("Parameters 'name' and 'from_path' are mutually exclusive when 'mode=new'") + self.do_raise("Parameters 'name' and 'from_path' are mutually exclusive when 'mode=new'") self.command = self.module.get_bin_path(v.executable if v.executable else self.command) self.vars.set("binary", self.command) @@ -190,17 +190,16 @@ class CPANMinus(CmdMixin, ModuleHelper): return rc == 0 - @staticmethod - def sanitize_pkg_spec_version(pkg_spec, version): + def sanitize_pkg_spec_version(self, pkg_spec, version): if version is None: return pkg_spec if pkg_spec.endswith('.tar.gz'): - raise ModuleHelperException(msg="parameter 'version' must not be used when installing from a file") + self.do_raise(msg="parameter 'version' must not be used when installing from a file") if os.path.isdir(pkg_spec): - raise ModuleHelperException(msg="parameter 'version' must not be used when installing from a directory") + self.do_raise(msg="parameter 'version' must not be used when installing from a directory") if pkg_spec.endswith('.git'): if version.startswith('~'): - raise ModuleHelperException(msg="operator '~' not allowed in version parameter when installing from git repository") + self.do_raise(msg="operator '~' not allowed in version parameter when installing from git repository") version = version if version.startswith('@') else '@' + version elif version[0] not in ('@', '~'): version = '~' + version @@ -228,7 +227,7 @@ class CPANMinus(CmdMixin, ModuleHelper): def process_command_output(self, rc, out, err): if self.vars.mode == "compatibility" and rc != 0: - raise ModuleHelperException(msg=err, cmd=self.vars.cmd_args) + self.do_raise(msg=err, cmd=self.vars.cmd_args) return 'is up to date' not in err and 'is up to date' not in out diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/packaging/language/pipx.py index 0b2276c6f8..0d1103000a 100644 --- a/plugins/modules/packaging/language/pipx.py +++ b/plugins/modules/packaging/language/pipx.py @@ -134,7 +134,7 @@ EXAMPLES = ''' import json from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdStateModuleHelper, ArgFormat, ModuleHelperException + CmdStateModuleHelper, ArgFormat ) from ansible.module_utils.facts.compat import ansible_facts @@ -153,9 +153,8 @@ class PipX(CmdStateModuleHelper): module = dict( argument_spec=dict( state=dict(type='str', default='install', - choices=[ - 'present', 'absent', 'install', 'uninstall', 'uninstall_all', - 'inject', 'upgrade', 'upgrade_all', 'reinstall', 'reinstall_all']), + choices=['present', 'absent', 'install', 'uninstall', 'uninstall_all', + 'inject', 'upgrade', 'upgrade_all', 'reinstall', 'reinstall_all']), name=dict(type='str'), source=dict(type='str'), install_deps=dict(type='bool', default=False), @@ -247,8 +246,7 @@ class PipX(CmdStateModuleHelper): def state_upgrade(self): if not self.vars.application: - raise ModuleHelperException( - "Trying to upgrade a non-existent application: {0}".format(self.vars.name)) + self.do_raise("Trying to upgrade a non-existent application: {0}".format(self.vars.name)) if self.vars.force: self.changed = True if not self.module.check_mode: @@ -262,16 +260,14 @@ class PipX(CmdStateModuleHelper): def state_reinstall(self): if not self.vars.application: - raise ModuleHelperException( - "Trying to reinstall a non-existent application: {0}".format(self.vars.name)) + self.do_raise("Trying to reinstall a non-existent application: {0}".format(self.vars.name)) self.changed = True if not self.module.check_mode: self.run_command(params=['state', 'name', 'python']) def state_inject(self): if not self.vars.application: - raise ModuleHelperException( - "Trying to inject packages into a non-existent application: {0}".format(self.vars.name)) + self.do_raise("Trying to inject packages into a non-existent application: {0}".format(self.vars.name)) if self.vars.force: self.changed = True if not self.module.check_mode: diff --git a/plugins/modules/packaging/os/snap.py b/plugins/modules/packaging/os/snap.py index f5df9d1a52..9ac56d09bd 100644 --- a/plugins/modules/packaging/os/snap.py +++ b/plugins/modules/packaging/os/snap.py @@ -147,7 +147,7 @@ import numbers from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdStateModuleHelper, ArgFormat, ModuleHelperException + CmdStateModuleHelper, ArgFormat ) @@ -218,8 +218,8 @@ class Snap(CmdStateModuleHelper): option_map = {} if not isinstance(json_subtree, dict): - raise ModuleHelperException("Non-dict non-leaf element encountered while parsing option map. " - "The output format of 'snap set' may have changed. Aborting!") + self.do_raise("Non-dict non-leaf element encountered while parsing option map. " + "The output format of 'snap set' may have changed. Aborting!") for key, value in json_subtree.items(): full_key = key if prefix is None else prefix + "." + key @@ -252,7 +252,7 @@ class Snap(CmdStateModuleHelper): option_map = self.convert_json_to_map(out) except Exception as e: - raise ModuleHelperException( + self.do_raise( msg="Parsing option map returned by 'snap get {0}' triggers exception '{1}', output:\n'{2}'".format(snap_name, str(e), out)) return option_map @@ -267,7 +267,7 @@ class Snap(CmdStateModuleHelper): result = out.splitlines()[1] match = self.__disable_re.match(result) if not match: - raise ModuleHelperException(msg="Unable to parse 'snap list {0}' output:\n{1}".format(snap_name, out)) + self.do_raise(msg="Unable to parse 'snap list {0}' output:\n{1}".format(snap_name, out)) notes = match.group('notes') return "disabled" not in notes.split(',') @@ -300,7 +300,7 @@ class Snap(CmdStateModuleHelper): else: msg = "Ooops! Snap installation failed while executing '{cmd}', please examine logs and " \ "error output for more details.".format(cmd=self.vars.cmd) - raise ModuleHelperException(msg=msg) + self.do_raise(msg=msg) def state_present(self): @@ -330,14 +330,14 @@ class Snap(CmdStateModuleHelper): if not match: msg = "Cannot parse set option '{option_string}'".format(option_string=option_string) - raise ModuleHelperException(msg) + self.do_raise(msg) snap_prefix = match.group("snap_prefix") selected_snap_name = snap_prefix[:-1] if snap_prefix else None if selected_snap_name is not None and selected_snap_name not in self.vars.name: msg = "Snap option '{option_string}' refers to snap which is not in the list of snap names".format(option_string=option_string) - raise ModuleHelperException(msg) + self.do_raise(msg) if selected_snap_name is None or (snap_name is not None and snap_name == selected_snap_name): key = match.group("key") @@ -360,11 +360,11 @@ class Snap(CmdStateModuleHelper): if rc != 0: if 'has no "configure" hook' in err: msg = "Snap '{snap}' does not have any configurable options".format(snap=snap_name) - raise ModuleHelperException(msg) + self.do_raise(msg) msg = "Cannot set options '{options}' for snap '{snap}': error={error}".format( options=" ".join(options_changed), snap=snap_name, error=err) - raise ModuleHelperException(msg) + self.do_raise(msg) if overall_options_changed: self.vars.options_changed = overall_options_changed @@ -385,7 +385,7 @@ class Snap(CmdStateModuleHelper): return msg = "Ooops! Snap operation failed while executing '{cmd}', please examine logs and " \ "error output for more details.".format(cmd=self.vars.cmd) - raise ModuleHelperException(msg=msg) + self.do_raise(msg=msg) def state_absent(self): self._generic_state_action(self.is_snap_installed, "snaps_removed", ['classic', 'channel', 'state']) diff --git a/plugins/modules/system/mksysb.py b/plugins/modules/system/mksysb.py index ddf9c171f3..8dd1b45cd0 100644 --- a/plugins/modules/system/mksysb.py +++ b/plugins/modules/system/mksysb.py @@ -99,7 +99,7 @@ msg: import os from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdModuleHelper, ArgFormat, ModuleHelperException + CmdModuleHelper, ArgFormat ) @@ -136,7 +136,7 @@ class MkSysB(CmdModuleHelper): def __init_module__(self): if not os.path.isdir(self.vars.storage_path): - raise ModuleHelperException("Storage path %s is not valid." % self.vars.storage_path) + self.do_raise("Storage path %s is not valid." % self.vars.storage_path) def __run__(self): if not self.module.check_mode: @@ -149,7 +149,7 @@ class MkSysB(CmdModuleHelper): def process_command_output(self, rc, out, err): if rc != 0: - raise ModuleHelperException("mksysb failed.") + self.do_raise("mksysb failed.") self.vars.msg = out diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index 20213dd348..d5ec16df22 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -146,7 +146,7 @@ RETURN = ''' ''' from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdStateModuleHelper, ArgFormat, ModuleHelperException + CmdStateModuleHelper, ArgFormat ) @@ -216,7 +216,7 @@ class XFConfProperty(CmdStateModuleHelper): self.vars.meta('value').set(initial_value=self.vars.previous_value) if self.module.params['disable_facts'] is False: - raise ModuleHelperException('Returning results as facts has been removed. Stop using disable_facts=false.') + self.do_raise('Returning results as facts has been removed. Stop using disable_facts=false.') def process_command_output(self, rc, out, err): if err.rstrip() == self.does_not: From 4d2bed1dde785239df0817a4a238ea5f3a98c11a Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 23 May 2022 17:22:15 +1200 Subject: [PATCH 0046/2104] consul: applied bugfix from issue (#4712) * applied bugfix from issue * added changelog fragment --- changelogs/fragments/4712-consul-bugfix.yaml | 2 ++ plugins/modules/clustering/consul/consul.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4712-consul-bugfix.yaml diff --git a/changelogs/fragments/4712-consul-bugfix.yaml b/changelogs/fragments/4712-consul-bugfix.yaml new file mode 100644 index 0000000000..bc63999b11 --- /dev/null +++ b/changelogs/fragments/4712-consul-bugfix.yaml @@ -0,0 +1,2 @@ +bugfixes: + - consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680). diff --git a/plugins/modules/clustering/consul/consul.py b/plugins/modules/clustering/consul/consul.py index e06432b684..9707d5431a 100644 --- a/plugins/modules/clustering/consul/consul.py +++ b/plugins/modules/clustering/consul/consul.py @@ -333,7 +333,7 @@ def add_service(module, service): service_id=result.id, service_name=result.name, service_port=result.port, - checks=[check.to_dict() for check in service.checks], + checks=[check.to_dict() for check in service.checks()], tags=result.tags) From 511e8e27acdf8ef018fe73d7305116d37ba481a8 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Mon, 23 May 2022 11:50:39 +0200 Subject: [PATCH 0047/2104] dig: remove support for the DLV record as the registry was decomissioned (#4613) * Remove support for the DLV record as the registry was decomissioned The DLV registry was decomissioned in 2017 (https://www.isc.org/blogs/dlv/) so it's high time we remove support for DLV records. * Remove DLV deprecation. Co-authored-by: Felix Fontein --- plugins/lookup/dig.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index 291bac5e45..bf11ce7669 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -31,9 +31,9 @@ DOCUMENTATION = ''' qtype: description: - Record type to query. - - C(DLV) is deprecated and will be removed in community.general 6.0.0. + - C(DLV) has been removed in community.general 6.0.0. default: 'A' - choices: [A, ALL, AAAA, CNAME, DNAME, DLV, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT] + choices: [A, ALL, AAAA, CNAME, DNAME, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT] flat: description: If 0 each record is returned as a dictionary, otherwise a string. default: 1 @@ -109,9 +109,6 @@ RETURN = """ DNAME: description: - target - DLV: - description: - - algorithm, digest_type, key_tag, digest DNSKEY: description: - flags, algorithm, protocol, key @@ -174,7 +171,7 @@ try: import dns.resolver import dns.reversename import dns.rdataclass - from dns.rdatatype import (A, AAAA, CNAME, DLV, DNAME, DNSKEY, DS, HINFO, LOC, + from dns.rdatatype import (A, AAAA, CNAME, DNAME, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, SOA, SPF, SRV, SSHFP, TLSA, TXT) HAVE_DNS = True except ImportError: @@ -196,7 +193,6 @@ def make_rdata_dict(rdata): AAAA: ['address'], CNAME: ['target'], DNAME: ['target'], - DLV: ['algorithm', 'digest_type', 'key_tag', 'digest'], DNSKEY: ['flags', 'algorithm', 'protocol', 'key'], DS: ['algorithm', 'digest_type', 'key_tag', 'digest'], HINFO: ['cpu', 'os'], @@ -226,8 +222,6 @@ def make_rdata_dict(rdata): if isinstance(val, dns.name.Name): val = dns.name.Name.to_text(val) - if rdata.rdtype == DLV and f == 'digest': - val = dns.rdata._hexify(rdata.digest).replace(' ', '') if rdata.rdtype == DS and f == 'digest': val = dns.rdata._hexify(rdata.digest).replace(' ', '') if rdata.rdtype == DNSKEY and f == 'key': @@ -332,11 +326,6 @@ class LookupModule(LookupBase): ret = [] - if qtype.upper() == 'DLV': - display.deprecated('The DLV record type has been decommissioned in 2017 and support for' - ' it will be removed from community.general 6.0.0', - version='6.0.0', collection_name='community.general') - if qtype.upper() == 'PTR': try: n = dns.reversename.from_address(domain) From d73789ba3a24b5abd6000d8de751454507e276b8 Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Tue, 24 May 2022 11:37:39 +0700 Subject: [PATCH 0048/2104] redfish_command: documentation typo and language (#4718) Fix typo "od" to "of" and language --- plugins/modules/remote_management/redfish/redfish_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index a38e18945e..3ecbb6d560 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -174,7 +174,7 @@ options: image_url: required: false description: - - The URL od the image the insert or eject + - The URL of the image to insert or eject type: str inserted: required: false From 88cd35fd45fa5e19b17526b0b9e2bff512b229c6 Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Wed, 25 May 2022 01:07:10 +0700 Subject: [PATCH 0049/2104] redfish modules: documentation language and formatting (#4722) * redfish_command: documentation language and formatting Update the documentation block with more English language more consistent with other modules and finish each description with a full stop. * redfish_command: do not end short desc in full stop * redfish_command: remove more "the" on documentation Remove "The" from beginning of descriptions. * redfish_command: start documentation description with capital case * redfish_config: update documentation language and format Add full stops at end of descriptions, small updates to language, ensure descriptions start with a capital case letter. * redfish_config: documentation consistency Use "username" for description similarly to redfish_command. * redfish_info: documentation formatting and language Update documentation block for consistency with other modules with full stop at end of descriptions and small language updates. * idrac_redfish_command: documentation formatting and language Update documentation block for consistency with other modules with full stop at end of descriptions and small language updates. * idrac_redfish_command: more doc consistency fixes Call it iDRAC everywhere and not sometimes OOB controller. * idrac_redfish_command: documentation formatting and language Update documentation block for consistency with other modules with full stop at end of descriptions and small language updates. * idrac_redfish_info: documentation formatting and language Update documentation block for consistency with other modules with full stop at end of descriptions and small language updates. * ilo_redfish_config: documentation formatting and language Update documentation block for consistency with other modules with full stop at end of descriptions and small language updates. * ilo_redfish_info: documentation formatting and language Update documentation block for consistency with other modules with full stop at end of descriptions and small language updates. * idrac_redfish_info: documentation language Call it "HTTP request" and not "URL request". * idrac_redfish_command: documentation language fix Call it "HTTP request" and not "URL request". * idrac_redfish_config: documentation language fix Call it "HTTP request" and not "URL request". * redfish_command: documentation language fix Call it "HTTP request" and not "URL request". * redfish_config: documentation language fix Call it "HTTP request" and not "URL request". * redfish_info: documentation language fix Call it "HTTP request" and not "URL request". * redfish_command: documentation language fix Boot device should be two words. Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../redfish/idrac_redfish_command.py | 18 +++--- .../redfish/idrac_redfish_config.py | 20 +++--- .../redfish/idrac_redfish_info.py | 18 +++--- .../redfish/ilo_redfish_config.py | 8 +-- .../redfish/ilo_redfish_info.py | 8 +-- .../redfish/redfish_command.py | 64 +++++++++---------- .../redfish/redfish_config.py | 26 ++++---- .../remote_management/redfish/redfish_info.py | 14 ++-- 8 files changed, 88 insertions(+), 88 deletions(-) diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_command.py b/plugins/modules/remote_management/redfish/idrac_redfish_command.py index 5e02154ed8..82a0f4b09a 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_command.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_command.py @@ -14,46 +14,46 @@ short_description: Manages Out-Of-Band controllers using iDRAC OEM Redfish APIs description: - Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action. - - For use with Dell iDRAC operations that require Redfish OEM extensions + - For use with Dell iDRAC operations that require Redfish OEM extensions. options: category: required: true description: - - Category to execute on OOB controller + - Category to execute on iDRAC. type: str command: required: true description: - - List of commands to execute on OOB controller + - List of commands to execute on iDRAC. type: list elements: str baseuri: required: true description: - - Base URI of OOB controller + - Base URI of iDRAC. type: str username: description: - - User for authentication with OOB controller + - Username for authenticating to iDRAC. type: str password: description: - - Password for authentication with OOB controller + - Password for authenticating to iDRAC. type: str auth_token: description: - - Security token for authentication with OOB controller + - Security token for authenticating to iDRAC. type: str version_added: 2.3.0 timeout: description: - - Timeout in seconds for URL requests to OOB controller + - Timeout in seconds for HTTP requests to iDRAC. default: 10 type: int resource_id: required: false description: - - The ID of the System, Manager or Chassis to modify + - ID of the System, Manager or Chassis to modify. type: str version_added: '0.2.0' diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_config.py b/plugins/modules/remote_management/redfish/idrac_redfish_config.py index adea4b11a9..683538e4b7 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_config.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_config.py @@ -20,50 +20,50 @@ options: required: true type: str description: - - Category to execute on iDRAC + - Category to execute on iDRAC. command: required: true description: - - List of commands to execute on iDRAC + - List of commands to execute on iDRAC. - I(SetManagerAttributes), I(SetLifecycleControllerAttributes) and I(SetSystemAttributes) are mutually exclusive commands when C(category) - is I(Manager) + is I(Manager). type: list elements: str baseuri: required: true description: - - Base URI of iDRAC + - Base URI of iDRAC. type: str username: description: - - User for authentication with iDRAC + - Username for authenticating to iDRAC. type: str password: description: - - Password for authentication with iDRAC + - Password for authenticating to iDRAC. type: str auth_token: description: - - Security token for authentication with OOB controller + - Security token for authenticating to iDRAC. type: str version_added: 2.3.0 manager_attributes: required: false description: - - dictionary of iDRAC attribute name and value pairs to update + - Dictionary of iDRAC attribute name and value pairs to update. default: {} type: 'dict' version_added: '0.2.0' timeout: description: - - Timeout in seconds for URL requests to iDRAC controller + - Timeout in seconds for HTTP requests to iDRAC. default: 10 type: int resource_id: required: false description: - - The ID of the System, Manager or Chassis to modify + - ID of the System, Manager or Chassis to modify. type: str version_added: '0.2.0' diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_info.py b/plugins/modules/remote_management/redfish/idrac_redfish_info.py index fb137acca3..7bfd81a78e 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_info.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_info.py @@ -14,44 +14,44 @@ short_description: Gather PowerEdge server information through iDRAC using Redfi description: - Builds Redfish URIs locally and sends them to remote iDRAC controllers to get information back. - - For use with Dell EMC iDRAC operations that require Redfish OEM extensions + - For use with Dell EMC iDRAC operations that require Redfish OEM extensions. - This module was called C(idrac_redfish_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(community.general.idrac_redfish_info) module no longer returns C(ansible_facts)! options: category: required: true description: - - Category to execute on iDRAC controller + - Category to execute on iDRAC. type: str command: required: true description: - - List of commands to execute on iDRAC controller + - List of commands to execute on iDRAC. - C(GetManagerAttributes) returns the list of dicts containing iDRAC, - LifecycleController and System attributes + LifecycleController and System attributes. type: list elements: str baseuri: required: true description: - - Base URI of iDRAC controller + - Base URI of iDRAC. type: str username: description: - - User for authentication with iDRAC controller + - Username for authenticating to iDRAC. type: str password: description: - - Password for authentication with iDRAC controller + - Password for authenticating to iDRAC. type: str auth_token: description: - - Security token for authentication with OOB controller + - Security token for authenticating to iDRAC. type: str version_added: 2.3.0 timeout: description: - - Timeout in seconds for URL requests to OOB controller + - Timeout in seconds for HTTP requests to iDRAC. default: 10 type: int diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_config.py b/plugins/modules/remote_management/redfish/ilo_redfish_config.py index 4640688407..3f9da0a4d8 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_config.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_config.py @@ -34,19 +34,19 @@ options: type: str username: description: - - User for authentication with iLO. + - Username for authenticating to iLO. type: str password: description: - - Password for authentication with iLO. + - Password for authenticating to iLO. type: str auth_token: description: - - Security token for authentication with OOB controller. + - Security token for authenticating to iLO. type: str timeout: description: - - Timeout in seconds for URL requests to iLO controller. + - Timeout in seconds for HTTP requests to iLO. default: 10 type: int attribute_name: diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/remote_management/redfish/ilo_redfish_info.py index 6773c4ae95..5f5be4f835 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_info.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_info.py @@ -34,19 +34,19 @@ options: type: str username: description: - - User for authentication with iLO. + - Username for authenticating to iLO. type: str password: description: - - Password for authentication with iLO. + - Password for authenticating to iLO. type: str auth_token: description: - - Security token for authentication with iLO. + - Security token for authenticating to iLO. type: str timeout: description: - - Timeout in seconds for URL requests to iLO. + - Timeout in seconds for HTTP requests to iLO. default: 10 type: int author: diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 3ecbb6d560..66609f97fb 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -21,35 +21,35 @@ options: category: required: true description: - - Category to execute on OOB controller + - Category to execute on OOB controller. type: str command: required: true description: - - List of commands to execute on OOB controller + - List of commands to execute on OOB controller. type: list elements: str baseuri: required: true description: - - Base URI of OOB controller + - Base URI of OOB controller. type: str username: description: - - Username for authentication with OOB controller + - Username for authenticating to OOB controller. type: str password: description: - - Password for authentication with OOB controller + - Password for authenticating to OOB controller. type: str auth_token: description: - - Security token for authentication with OOB controller + - Security token for authenticating to OOB controller. type: str version_added: 2.3.0 session_uri: description: - - URI of the session resource + - URI of the session resource. type: str version_added: 2.3.0 id: @@ -63,28 +63,28 @@ options: required: false aliases: [ account_username ] description: - - Username of account to add/delete/modify + - Username of account to add/delete/modify. type: str new_password: required: false aliases: [ account_password ] description: - - New password of account to add/modify + - New password of account to add/modify. type: str roleid: required: false aliases: [ account_roleid ] description: - - Role of account to add/modify + - Role of account to add/modify. type: str bootdevice: required: false description: - - bootdevice when setting boot configuration + - Boot device when setting boot configuration. type: str timeout: description: - - Timeout in seconds for URL requests to OOB controller + - Timeout in seconds for HTTP requests to OOB controller. default: 10 type: int boot_override_mode: @@ -96,117 +96,117 @@ options: uefi_target: required: false description: - - UEFI target when bootdevice is "UefiTarget" + - UEFI boot target when bootdevice is "UefiTarget". type: str boot_next: required: false description: - - BootNext target when bootdevice is "UefiBootNext" + - BootNext target when bootdevice is "UefiBootNext". type: str update_username: required: false aliases: [ account_updatename ] description: - - new update user name for account_username + - New user name for updating account_username. type: str version_added: '0.2.0' account_properties: required: false description: - - properties of account service to update + - Properties of account service to update. type: dict version_added: '0.2.0' resource_id: required: false description: - - The ID of the System, Manager or Chassis to modify + - ID of the System, Manager or Chassis to modify. type: str version_added: '0.2.0' update_image_uri: required: false description: - - The URI of the image for the update + - URI of the image for the update. type: str version_added: '0.2.0' update_protocol: required: false description: - - The protocol for the update + - Protocol for the update. type: str version_added: '0.2.0' update_targets: required: false description: - - The list of target resource URIs to apply the update to + - List of target resource URIs to apply the update to. type: list elements: str version_added: '0.2.0' update_creds: required: false description: - - The credentials for retrieving the update image + - Credentials for retrieving the update image. type: dict version_added: '0.2.0' suboptions: username: required: false description: - - The username for retrieving the update image + - Username for retrieving the update image. type: str password: required: false description: - - The password for retrieving the update image + - Password for retrieving the update image. type: str virtual_media: required: false description: - - The options for VirtualMedia commands + - Options for VirtualMedia commands. type: dict version_added: '0.2.0' suboptions: media_types: required: false description: - - The list of media types appropriate for the image + - List of media types appropriate for the image. type: list elements: str image_url: required: false description: - - The URL of the image to insert or eject + - URL of the image to insert or eject. type: str inserted: required: false description: - - Indicates if the image is treated as inserted on command completion + - Indicates that the image is treated as inserted on command completion. type: bool default: True write_protected: required: false description: - - Indicates if the media is treated as write-protected + - Indicates that the media is treated as write-protected. type: bool default: True username: required: false description: - - The username for accessing the image URL + - Username for accessing the image URL. type: str password: required: false description: - - The password for accessing the image URL + - Password for accessing the image URL. type: str transfer_protocol_type: required: false description: - - The network protocol to use with the image + - Network protocol to use with the image. type: str transfer_method: required: false description: - - The transfer method to use with the image + - Transfer method to use with the image. type: str strip_etag_quotes: description: diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index b903ceed77..39df23ab71 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -20,48 +20,48 @@ options: category: required: true description: - - Category to execute on OOB controller + - Category to execute on OOB controller. type: str command: required: true description: - - List of commands to execute on OOB controller + - List of commands to execute on OOB controller. type: list elements: str baseuri: required: true description: - - Base URI of OOB controller + - Base URI of OOB controller. type: str username: description: - - User for authentication with OOB controller + - Username for authenticating to OOB controller. type: str password: description: - - Password for authentication with OOB controller + - Password for authenticating to OOB controller. type: str auth_token: description: - - Security token for authentication with OOB controller + - Security token for authenticating to OOB controller. type: str version_added: 2.3.0 bios_attributes: required: false description: - - dictionary of BIOS attributes to update + - Dictionary of BIOS attributes to update. default: {} type: dict version_added: '0.2.0' timeout: description: - - Timeout in seconds for URL requests to OOB controller + - Timeout in seconds for HTTP requests to OOB controller. default: 10 type: int boot_order: required: false description: - - list of BootOptionReference strings specifying the BootOrder + - List of BootOptionReference strings specifying the BootOrder. default: [] type: list elements: str @@ -69,26 +69,26 @@ options: network_protocols: required: false description: - - setting dict of manager services to update + - Setting dict of manager services to update. type: dict version_added: '0.2.0' resource_id: required: false description: - - The ID of the System, Manager or Chassis to modify + - ID of the System, Manager or Chassis to modify. type: str version_added: '0.2.0' nic_addr: required: false description: - - EthernetInterface Address string on OOB controller + - EthernetInterface Address string on OOB controller. default: 'null' type: str version_added: '0.2.0' nic_config: required: false description: - - setting dict of EthernetInterface on OOB controller + - Setting dict of EthernetInterface on OOB controller. type: dict version_added: '0.2.0' strip_etag_quotes: diff --git a/plugins/modules/remote_management/redfish/redfish_info.py b/plugins/modules/remote_management/redfish/redfish_info.py index c0576ff4c8..886b3f7da1 100644 --- a/plugins/modules/remote_management/redfish/redfish_info.py +++ b/plugins/modules/remote_management/redfish/redfish_info.py @@ -21,37 +21,37 @@ options: category: required: false description: - - List of categories to execute on OOB controller + - List of categories to execute on OOB controller. default: ['Systems'] type: list elements: str command: required: false description: - - List of commands to execute on OOB controller + - List of commands to execute on OOB controller. type: list elements: str baseuri: required: true description: - - Base URI of OOB controller + - Base URI of OOB controller. type: str username: description: - - User for authentication with OOB controller + - Username for authenticating to OOB controller. type: str password: description: - - Password for authentication with OOB controller + - Password for authenticating to OOB controller. type: str auth_token: description: - - Security token for authentication with OOB controller + - Security token for authenticating to OOB controller. type: str version_added: 2.3.0 timeout: description: - - Timeout in seconds for URL requests to OOB controller + - Timeout in seconds for HTTP requests to OOB controller. default: 10 type: int From dcb2e09b4af3795268154df9a41b2c17d323e6f2 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 27 May 2022 10:59:58 +0200 Subject: [PATCH 0050/2104] Update CI matrix. (#4737) --- .azure-pipelines/azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 551b79cf8e..289108c04d 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -251,14 +251,14 @@ stages: targets: - name: CentOS 7 test: centos7 - - name: Fedora 34 - test: fedora34 + - name: Fedora 35 + test: fedora35 - name: Fedora 36 test: fedora36 - name: openSUSE 15 test: opensuse15 - - name: Ubuntu 18.04 - test: ubuntu1804 + - name: Ubuntu 20.04 + test: ubuntu2004 - name: Ubuntu 22.04 test: ubuntu2204 - name: Alpine 3 @@ -297,8 +297,8 @@ stages: test: centos6 - name: Fedora 34 test: fedora34 - - name: Ubuntu 20.04 - test: ubuntu2004 + - name: Ubuntu 18.04 + test: ubuntu1804 groups: - 1 - 2 From 1e646aad2d8e9d3136cbb92bf4a2dfe4bc60cb84 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 27 May 2022 11:23:20 +0200 Subject: [PATCH 0051/2104] Remove no longer needed files. --- tests/sanity/ignore-2.10.txt | 44 ------------------------------------ tests/sanity/ignore-2.9.txt | 33 --------------------------- 2 files changed, 77 deletions(-) delete mode 100644 tests/sanity/ignore-2.10.txt delete mode 100644 tests/sanity/ignore-2.9.txt diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt deleted file mode 100644 index 83bf11e304..0000000000 --- a/tests/sanity/ignore-2.10.txt +++ /dev/null @@ -1,44 +0,0 @@ -.azure-pipelines/scripts/publish-codecov.py replace-urlopen -.azure-pipelines/scripts/publish-codecov.py compile-2.6!skip # Uses Python 3.6+ syntax -.azure-pipelines/scripts/publish-codecov.py compile-2.7!skip # Uses Python 3.6+ syntax -.azure-pipelines/scripts/publish-codecov.py compile-3.5!skip # Uses Python 3.6+ syntax -.azure-pipelines/scripts/publish-codecov.py future-import-boilerplate -.azure-pipelines/scripts/publish-codecov.py metaclass-boilerplate -plugins/module_utils/cloud.py pylint:bad-option-value # a pylint test that is disabled was modified over time -plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path -plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type -plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter -plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/packaging/language/yarn.py use-argspec-type-path -plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error -plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/puppet.py use-argspec-type-path -plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/system/xfconf.py validate-modules:return-syntax-error -plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path -tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code -tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.7 # django generated code diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt deleted file mode 100644 index ffc4917389..0000000000 --- a/tests/sanity/ignore-2.9.txt +++ /dev/null @@ -1,33 +0,0 @@ -.azure-pipelines/scripts/publish-codecov.py replace-urlopen -.azure-pipelines/scripts/publish-codecov.py compile-2.6!skip # Uses Python 3.6+ syntax -.azure-pipelines/scripts/publish-codecov.py compile-2.7!skip # Uses Python 3.6+ syntax -.azure-pipelines/scripts/publish-codecov.py compile-3.5!skip # Uses Python 3.6+ syntax -.azure-pipelines/scripts/publish-codecov.py future-import-boilerplate -.azure-pipelines/scripts/publish-codecov.py metaclass-boilerplate -plugins/module_utils/cloud.py pylint:bad-option-value # a pylint test that is disabled was modified over time -plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path -plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/cloud/rackspace/rax.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type -plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter -plugins/modules/packaging/language/yarn.py use-argspec-type-path -plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/system/puppet.py use-argspec-type-path -plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/system/xfconf.py validate-modules:return-syntax-error -plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path -tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code -tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.7 # django generated code From 01b32fec14316dd1785938796d04df6ac75570eb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 28 May 2022 21:38:30 +0200 Subject: [PATCH 0052/2104] Fix quoting bug in zfs. (#4726) --- changelogs/fragments/4726-zfs.yml | 2 ++ plugins/modules/storage/zfs/zfs.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4726-zfs.yml diff --git a/changelogs/fragments/4726-zfs.yml b/changelogs/fragments/4726-zfs.yml new file mode 100644 index 0000000000..c785e2ba11 --- /dev/null +++ b/changelogs/fragments/4726-zfs.yml @@ -0,0 +1,2 @@ +bugfixes: + - "zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, https://github.com/ansible-collections/community.general/pull/4726)." diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index e206a8f7ba..ca15893f19 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -160,7 +160,7 @@ class Zfs(object): elif prop == 'volblocksize': cmd += ['-b', value] else: - cmd += ['-o', '%s="%s"' % (prop, value)] + cmd += ['-o', '%s=%s' % (prop, value)] if origin and action == 'clone': cmd.append(origin) cmd.append(self.name) From 3b48bde84f2375a85bb8e2f04aa58e7bb170ee12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondrej=20Fam=C4=9Bra?= Date: Mon, 30 May 2022 13:55:22 +0900 Subject: [PATCH 0053/2104] DOC: Documment setting of NTP server in examples. (#4655) Tested on iLO 5 (HP Gen 10). Command checked from iLO5 REST API reference at https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#configuring-network-time-protocol-ntp --- .../remote_management/redfish/ilo_redfish_config.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_config.py b/plugins/modules/remote_management/redfish/ilo_redfish_config.py index 3f9da0a4d8..837b2103b8 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_config.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_config.py @@ -82,6 +82,17 @@ EXAMPLES = ''' password: Testpass123 attribute_name: TimeZone attribute_value: Chennai + + - name: Set NTP Servers + community.general.ilo_redfish_config: + category: Manager + command: SetNTPServers + baseuri: 15.X.X.X + username: Admin + password: Testpass123 + attribute_name: StaticNTPServers + attribute_value: X.X.X.X + ''' RETURN = ''' From e55875107b1ca63451789536e3ae56be7892fab5 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 30 May 2022 02:03:25 -0400 Subject: [PATCH 0054/2104] fix invalid fail_json call (#4733) * fix invalid fail_json call Currently causes this error: ``` TypeError: AnsibleModule.fail_json() missing 1 required positional argument: 'msg' gitlab | FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python3.10" }, "changed": false, "module_stderr": "Shared connection to 10.0.3.100 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 107, in \r\n _ansiballz_main()\r\n File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 99, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 47, in invoke_module\r\n runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.redis', init_globals=dict(_module_fqn='ansible_collections.community.general.plugins.modules.redis', _modlib_path=modlib_path),\r\n File \"/usr/lib/python3.10/runpy.py\", line 209, in run_module\r\n return _run_module_code(code, init_globals, run_name, mod_spec)\r\n File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\r\n exec(code, run_globals)\r\n File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/modules/redis.py\", line 328, in \r\n File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/modules/redis.py\", line 195, in main\r\n File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/module_utils/redis.py\", line 40, in fail_imports\r\nTypeError: AnsibleModule.fail_json() missing 1 required positional argument: 'msg'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } ``` * Add changelog. Co-authored-by: Felix Fontein --- changelogs/fragments/4733-redis-fail.yml | 2 ++ plugins/module_utils/redis.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4733-redis-fail.yml diff --git a/changelogs/fragments/4733-redis-fail.yml b/changelogs/fragments/4733-redis-fail.yml new file mode 100644 index 0000000000..f8a6e14d9a --- /dev/null +++ b/changelogs/fragments/4733-redis-fail.yml @@ -0,0 +1,2 @@ +bugfixes: + - "redis* modules - fix call to ``module.fail_json`` when failing because of missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733)." diff --git a/plugins/module_utils/redis.py b/plugins/module_utils/redis.py index de5c8c7fc3..8f035614f0 100644 --- a/plugins/module_utils/redis.py +++ b/plugins/module_utils/redis.py @@ -37,7 +37,7 @@ def fail_imports(module, needs_certifi=True): errors.append(missing_required_lib('certifi')) traceback.append(CERTIFI_IMPORT_ERROR) if errors: - module.fail_json(errors=errors, traceback='\n'.join(traceback)) + module.fail_json(msg='\n'.join(errors), traceback='\n'.join(traceback)) def redis_auth_argument_spec(tls_default=True): From 7ee15f95f75ae9e9c0b592800cc2bdd299d84747 Mon Sep 17 00:00:00 2001 From: adam-cleo <90759784+adam-cleo@users.noreply.github.com> Date: Mon, 30 May 2022 12:48:06 +0200 Subject: [PATCH 0055/2104] keycloak_realm: fix default groups and roles (#4241) (#4719) * keycloak_realm: fix default groups and roles (#4241) * add changelog fragment --- changelogs/fragments/4719-fix-keycloak-realm.yaml | 2 ++ plugins/modules/identity/keycloak/keycloak_realm.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/4719-fix-keycloak-realm.yaml diff --git a/changelogs/fragments/4719-fix-keycloak-realm.yaml b/changelogs/fragments/4719-fix-keycloak-realm.yaml new file mode 100644 index 0000000000..3071756ec5 --- /dev/null +++ b/changelogs/fragments/4719-fix-keycloak-realm.yaml @@ -0,0 +1,2 @@ +bugfixes: + - "keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241)." \ No newline at end of file diff --git a/plugins/modules/identity/keycloak/keycloak_realm.py b/plugins/modules/identity/keycloak/keycloak_realm.py index 90b8d62a56..fd9f17ebf8 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm.py +++ b/plugins/modules/identity/keycloak/keycloak_realm.py @@ -163,7 +163,7 @@ options: aliases: - defaultGroups type: list - elements: dict + elements: str default_locale: description: - The realm default locale. @@ -183,7 +183,7 @@ options: aliases: - defaultRoles type: list - elements: dict + elements: str default_signature_algorithm: description: - The realm default signature algorithm. @@ -622,10 +622,10 @@ def main(): client_authentication_flow=dict(type='str', aliases=['clientAuthenticationFlow']), client_scope_mappings=dict(type='dict', aliases=['clientScopeMappings']), default_default_client_scopes=dict(type='list', elements='str', aliases=['defaultDefaultClientScopes']), - default_groups=dict(type='list', elements='dict', aliases=['defaultGroups']), + default_groups=dict(type='list', elements='str', aliases=['defaultGroups']), default_locale=dict(type='str', aliases=['defaultLocale']), default_optional_client_scopes=dict(type='list', elements='str', aliases=['defaultOptionalClientScopes']), - default_roles=dict(type='list', elements='dict', aliases=['defaultRoles']), + default_roles=dict(type='list', elements='str', aliases=['defaultRoles']), default_signature_algorithm=dict(type='str', aliases=['defaultSignatureAlgorithm']), direct_grant_flow=dict(type='str', aliases=['directGrantFlow']), display_name=dict(type='str', aliases=['displayName']), From 0be68bf04bd9b8dcf99583ebf5ad6deac4736283 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 2 Jun 2022 07:30:06 +0200 Subject: [PATCH 0056/2104] Add simplified_bsd.txt license file (#4759) * Add simplified_bsd.txt and adjust references. * Add changelog. --- changelogs/fragments/simplified-bsd-license.yml | 2 ++ plugins/doc_fragments/lxca_common.py | 2 +- plugins/module_utils/alicloud_ecs.py | 2 +- plugins/module_utils/database.py | 2 +- plugins/module_utils/gandi_livedns_api.py | 2 +- plugins/module_utils/heroku.py | 2 +- plugins/module_utils/hwc_utils.py | 2 +- plugins/module_utils/ibm_sa_utils.py | 2 +- plugins/module_utils/influxdb.py | 2 +- plugins/module_utils/ipa.py | 2 +- plugins/module_utils/known_hosts.py | 2 +- plugins/module_utils/linode.py | 2 +- plugins/module_utils/lxd.py | 2 +- plugins/module_utils/manageiq.py | 2 +- plugins/module_utils/memset.py | 2 +- plugins/module_utils/mh/base.py | 2 +- plugins/module_utils/mh/deco.py | 2 +- plugins/module_utils/mh/exceptions.py | 2 +- plugins/module_utils/mh/mixins/cmd.py | 2 +- plugins/module_utils/mh/mixins/deprecate_attrs.py | 2 +- plugins/module_utils/mh/mixins/deps.py | 2 +- plugins/module_utils/mh/mixins/state.py | 2 +- plugins/module_utils/mh/mixins/vars.py | 2 +- plugins/module_utils/mh/module_helper.py | 2 +- plugins/module_utils/module_helper.py | 2 +- plugins/module_utils/oneandone.py | 2 +- plugins/module_utils/onepassword.py | 2 +- plugins/module_utils/oneview.py | 2 +- plugins/module_utils/online.py | 2 +- plugins/module_utils/opennebula.py | 2 +- plugins/module_utils/pure.py | 2 +- plugins/module_utils/rax.py | 2 +- plugins/module_utils/redhat.py | 2 +- plugins/module_utils/remote_management/lxca/common.py | 2 +- plugins/module_utils/saslprep.py | 2 +- plugins/module_utils/source_control/bitbucket.py | 2 +- plugins/module_utils/storage/emc/emc_vnx.py | 2 +- plugins/module_utils/storage/hpe3par/hpe3par.py | 2 +- plugins/module_utils/univention_umc.py | 2 +- plugins/module_utils/utm_utils.py | 2 +- plugins/module_utils/vexata.py | 2 +- simplified_bsd.txt | 8 ++++++++ tests/unit/plugins/module_utils/test_utm_utils.py | 2 +- 43 files changed, 51 insertions(+), 41 deletions(-) create mode 100644 changelogs/fragments/simplified-bsd-license.yml create mode 100644 simplified_bsd.txt diff --git a/changelogs/fragments/simplified-bsd-license.yml b/changelogs/fragments/simplified-bsd-license.yml new file mode 100644 index 0000000000..86fe37f4ff --- /dev/null +++ b/changelogs/fragments/simplified-bsd-license.yml @@ -0,0 +1,2 @@ +bugfixes: + - Include ``simplified_bsd.txt`` license file for various module utils, the ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests. diff --git a/plugins/doc_fragments/lxca_common.py b/plugins/doc_fragments/lxca_common.py index c55eca16ac..c72aa28765 100644 --- a/plugins/doc_fragments/lxca_common.py +++ b/plugins/doc_fragments/lxca_common.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2017 Lenovo, Inc. -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/alicloud_ecs.py b/plugins/module_utils/alicloud_ecs.py index d4d3bf76c9..aed480fce8 100644 --- a/plugins/module_utils/alicloud_ecs.py +++ b/plugins/module_utils/alicloud_ecs.py @@ -7,7 +7,7 @@ # # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/database.py b/plugins/module_utils/database.py index 825d3a2be9..2f20f5e4c4 100644 --- a/plugins/module_utils/database.py +++ b/plugins/module_utils/database.py @@ -7,7 +7,7 @@ # # Copyright (c) 2014, Toshio Kuratomi # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/gandi_livedns_api.py b/plugins/module_utils/gandi_livedns_api.py index 2c785353ad..58f9796c46 100644 --- a/plugins/module_utils/gandi_livedns_api.py +++ b/plugins/module_utils/gandi_livedns_api.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright: (c) 2019 Gregory Thiemonge -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/heroku.py b/plugins/module_utils/heroku.py index 70b144c077..f0ebeae760 100644 --- a/plugins/module_utils/heroku.py +++ b/plugins/module_utils/heroku.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/hwc_utils.py b/plugins/module_utils/hwc_utils.py index 489e90dd3c..4507df020d 100644 --- a/plugins/module_utils/hwc_utils.py +++ b/plugins/module_utils/hwc_utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c), Google Inc, 2017 -# Simplified BSD License (see licenses/simplified_bsd.txt or +# Simplified BSD License (see simplified_bsd.txt or # https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) diff --git a/plugins/module_utils/ibm_sa_utils.py b/plugins/module_utils/ibm_sa_utils.py index 4f70f844cd..ae2e412c28 100644 --- a/plugins/module_utils/ibm_sa_utils.py +++ b/plugins/module_utils/ibm_sa_utils.py @@ -2,7 +2,7 @@ # Copyright (C) 2018 IBM CORPORATION # Author(s): Tzur Eliyahu # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/influxdb.py b/plugins/module_utils/influxdb.py index c171131a95..ca791b8cdb 100644 --- a/plugins/module_utils/influxdb.py +++ b/plugins/module_utils/influxdb.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/ipa.py b/plugins/module_utils/ipa.py index 3d8c2580d8..a7674592f5 100644 --- a/plugins/module_utils/ipa.py +++ b/plugins/module_utils/ipa.py @@ -7,7 +7,7 @@ # # Copyright (c) 2016 Thomas Krahn (@Nosmoht) # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/known_hosts.py b/plugins/module_utils/known_hosts.py index ea6c95b6e2..1679c6f6a2 100644 --- a/plugins/module_utils/known_hosts.py +++ b/plugins/module_utils/known_hosts.py @@ -7,7 +7,7 @@ # # Copyright (c), Michael DeHaan , 2012-2013 # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/linode.py b/plugins/module_utils/linode.py index 9d7c37e68d..a13e18e3d3 100644 --- a/plugins/module_utils/linode.py +++ b/plugins/module_utils/linode.py @@ -7,7 +7,7 @@ # # Copyright (c), Luke Murphy @decentral1se # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/lxd.py b/plugins/module_utils/lxd.py index e25caf11f3..4574a4eac1 100644 --- a/plugins/module_utils/lxd.py +++ b/plugins/module_utils/lxd.py @@ -8,7 +8,7 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/manageiq.py b/plugins/module_utils/manageiq.py index 98e5590cc6..bba8cb22b1 100644 --- a/plugins/module_utils/manageiq.py +++ b/plugins/module_utils/manageiq.py @@ -8,7 +8,7 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/memset.py b/plugins/module_utils/memset.py index 7813290a72..5a0d3c19c4 100644 --- a/plugins/module_utils/memset.py +++ b/plugins/module_utils/memset.py @@ -7,7 +7,7 @@ # # Copyright (c) 2018, Simon Weald # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/mh/base.py b/plugins/module_utils/mh/base.py index 0871a527be..cad1a9acdc 100644 --- a/plugins/module_utils/mh/base.py +++ b/plugins/module_utils/mh/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/deco.py b/plugins/module_utils/mh/deco.py index 62d460b4e6..b46d0a253d 100644 --- a/plugins/module_utils/mh/deco.py +++ b/plugins/module_utils/mh/deco.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/exceptions.py b/plugins/module_utils/mh/exceptions.py index 558dcca05f..7d1a46bb5a 100644 --- a/plugins/module_utils/mh/exceptions.py +++ b/plugins/module_utils/mh/exceptions.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/cmd.py b/plugins/module_utils/mh/mixins/cmd.py index 58d50fbdf8..700abc161a 100644 --- a/plugins/module_utils/mh/mixins/cmd.py +++ b/plugins/module_utils/mh/mixins/cmd.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/deprecate_attrs.py b/plugins/module_utils/mh/mixins/deprecate_attrs.py index fb440aba4c..73643d4a92 100644 --- a/plugins/module_utils/mh/mixins/deprecate_attrs.py +++ b/plugins/module_utils/mh/mixins/deprecate_attrs.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/deps.py b/plugins/module_utils/mh/mixins/deps.py index 1c6c9ae484..b60f50d1d4 100644 --- a/plugins/module_utils/mh/mixins/deps.py +++ b/plugins/module_utils/mh/mixins/deps.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/state.py b/plugins/module_utils/mh/mixins/state.py index b946090ac9..0b514ca257 100644 --- a/plugins/module_utils/mh/mixins/state.py +++ b/plugins/module_utils/mh/mixins/state.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/vars.py b/plugins/module_utils/mh/mixins/vars.py index a11110ed60..81e55feb8f 100644 --- a/plugins/module_utils/mh/mixins/vars.py +++ b/plugins/module_utils/mh/mixins/vars.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 71731411e0..57fa163a79 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/module_helper.py b/plugins/module_utils/module_helper.py index a6b35bdd33..2968bfaf37 100644 --- a/plugins/module_utils/module_helper.py +++ b/plugins/module_utils/module_helper.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/oneandone.py b/plugins/module_utils/oneandone.py index 5f65b670f3..0db673be87 100644 --- a/plugins/module_utils/oneandone.py +++ b/plugins/module_utils/oneandone.py @@ -5,7 +5,7 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/onepassword.py b/plugins/module_utils/onepassword.py index 3a86e22e16..dbf21e99b5 100644 --- a/plugins/module_utils/onepassword.py +++ b/plugins/module_utils/onepassword.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/oneview.py b/plugins/module_utils/oneview.py index 6d786b0b80..a7b98108a0 100644 --- a/plugins/module_utils/oneview.py +++ b/plugins/module_utils/oneview.py @@ -7,7 +7,7 @@ # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/online.py b/plugins/module_utils/online.py index b5acbcc017..c364cea6f1 100644 --- a/plugins/module_utils/online.py +++ b/plugins/module_utils/online.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/opennebula.py b/plugins/module_utils/opennebula.py index c896a9c6fa..6b67a6cf85 100644 --- a/plugins/module_utils/opennebula.py +++ b/plugins/module_utils/opennebula.py @@ -2,7 +2,7 @@ # # Copyright 2018 www.privaz.io Valletech AB # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/pure.py b/plugins/module_utils/pure.py index ebd41b1ce5..b97045dfaf 100644 --- a/plugins/module_utils/pure.py +++ b/plugins/module_utils/pure.py @@ -7,7 +7,7 @@ # to the complete work. # # Copyright (c), Simon Dodsley ,2017 -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/rax.py b/plugins/module_utils/rax.py index 84effee97c..17b031898a 100644 --- a/plugins/module_utils/rax.py +++ b/plugins/module_utils/rax.py @@ -7,7 +7,7 @@ # # Copyright (c), Michael DeHaan , 2012-2013 # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/redhat.py b/plugins/module_utils/redhat.py index 85f4a6aab2..b3e24204b0 100644 --- a/plugins/module_utils/redhat.py +++ b/plugins/module_utils/redhat.py @@ -7,7 +7,7 @@ # # Copyright (c), James Laska # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/remote_management/lxca/common.py b/plugins/module_utils/remote_management/lxca/common.py index 07092b9642..5517f769b8 100644 --- a/plugins/module_utils/remote_management/lxca/common.py +++ b/plugins/module_utils/remote_management/lxca/common.py @@ -6,7 +6,7 @@ # own license to the complete work. # # Copyright (C) 2017 Lenovo, Inc. -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # # Contains LXCA common class # Lenovo xClarity Administrator (LXCA) diff --git a/plugins/module_utils/saslprep.py b/plugins/module_utils/saslprep.py index 3e16c7169e..804200c374 100644 --- a/plugins/module_utils/saslprep.py +++ b/plugins/module_utils/saslprep.py @@ -8,7 +8,7 @@ # Copyright: (c) 2020, Andrew Klychkov (@Andersson007) # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/source_control/bitbucket.py b/plugins/module_utils/source_control/bitbucket.py index 1d584391d9..1846bd74ff 100644 --- a/plugins/module_utils/source_control/bitbucket.py +++ b/plugins/module_utils/source_control/bitbucket.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/storage/emc/emc_vnx.py b/plugins/module_utils/storage/emc/emc_vnx.py index 5922512676..0ad744d2ec 100644 --- a/plugins/module_utils/storage/emc/emc_vnx.py +++ b/plugins/module_utils/storage/emc/emc_vnx.py @@ -7,7 +7,7 @@ # # (c) 2018 Luca 'remix_tj' Lorenzetto # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/storage/hpe3par/hpe3par.py b/plugins/module_utils/storage/hpe3par/hpe3par.py index b7734444dd..cce87b026b 100644 --- a/plugins/module_utils/storage/hpe3par/hpe3par.py +++ b/plugins/module_utils/storage/hpe3par/hpe3par.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright: (c) 2018, Hewlett Packard Enterprise Development LP -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/univention_umc.py b/plugins/module_utils/univention_umc.py index a44a0052a9..c791f880ef 100644 --- a/plugins/module_utils/univention_umc.py +++ b/plugins/module_utils/univention_umc.py @@ -9,7 +9,7 @@ # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/utm_utils.py b/plugins/module_utils/utm_utils.py index 7e6ff3093e..8af14ca2b3 100644 --- a/plugins/module_utils/utm_utils.py +++ b/plugins/module_utils/utm_utils.py @@ -7,7 +7,7 @@ # # Copyright: (c) 2018, Johannes Brunswicker # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/vexata.py b/plugins/module_utils/vexata.py index 3d6fb7aaca..2a43767391 100644 --- a/plugins/module_utils/vexata.py +++ b/plugins/module_utils/vexata.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Copyright: (c) 2019, Sandeep Kasargod -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/simplified_bsd.txt b/simplified_bsd.txt new file mode 100644 index 0000000000..6810e04e32 --- /dev/null +++ b/simplified_bsd.txt @@ -0,0 +1,8 @@ +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/tests/unit/plugins/module_utils/test_utm_utils.py b/tests/unit/plugins/module_utils/test_utm_utils.py index f28d5dc85d..ea5324cb5a 100644 --- a/tests/unit/plugins/module_utils/test_utm_utils.py +++ b/tests/unit/plugins/module_utils/test_utm_utils.py @@ -6,7 +6,7 @@ # # Copyright: (c) 2018, Johannes Brunswicker # -# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type From b6e652b440adfce374faeb6d8e53cee3f60609c7 Mon Sep 17 00:00:00 2001 From: Markus Bergholz Date: Fri, 3 Jun 2022 18:41:04 +0200 Subject: [PATCH 0057/2104] fix trailing whitespace after parameter (#4765) --- plugins/lookup/keyring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/lookup/keyring.py b/plugins/lookup/keyring.py index 73f9c5f4a9..b846e29424 100644 --- a/plugins/lookup/keyring.py +++ b/plugins/lookup/keyring.py @@ -18,7 +18,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = """ -- name : output secrets to screen (BAD IDEA) +- name: output secrets to screen (BAD IDEA) ansible.builtin.debug: msg: "Password: {{item}}" with_community.general.keyring: From 2eadedef6d5d89d4e347708706c5f53ae4584977 Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Sat, 4 Jun 2022 13:42:07 +0700 Subject: [PATCH 0058/2104] nmcli: use capital case "DNS" in documentation, improve examples (#4732) * nmcli: use capital case "DNS" in documentation In documentation sometimes DNS was written in (incorrect) lower case "dns" and sometimes in (correct) capital case "DNS". Use the right capital case spelling in all parameter descriptions. * nmcli: documentation language Co-authored-by: Felix Fontein * nmcli: documentation language Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/modules/net_tools/nmcli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 3c59b7efea..b09c7e7845 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -157,8 +157,8 @@ options: version_added: 2.0.0 dns4: description: - - A list of up to 3 dns servers. - - IPv4 format e.g. to add two IPv4 DNS server addresses, use C(192.0.2.53 198.51.100.53). + - A list of up to 3 DNS servers. + - The entries must be IPv4 addresses, for example C(192.0.2.53). elements: str type: list dns4_search: @@ -255,8 +255,8 @@ options: version_added: 4.4.0 dns6: description: - - A list of up to 3 dns servers. - - IPv6 format e.g. to add two IPv6 DNS server addresses, use C(2001:4860:4860::8888 2001:4860:4860::8844). + - A list of up to 3 DNS servers. + - The entries must be IPv6 addresses, for example C(2001:4860:4860::8888). elements: str type: list dns6_search: From be69f95f63cc1758f40e3a9b47d90dcd1af7cd90 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 4 Jun 2022 19:13:37 +1200 Subject: [PATCH 0059/2104] cmd_runner: added flag check_mode_skip to context (#4736) * cmd_runner: added flag skip_if_check_mode to context * added changelog fragment * adjusted param name and added new one --- .../4736-cmd-runner-skip-if-check.yml | 2 + plugins/module_utils/cmd_runner.py | 12 ++++-- .../targets/cmd_runner/library/cmd_echo.py | 40 ++++--------------- .../cmd_runner/tasks/test_cmd_echo.yml | 2 + .../targets/cmd_runner/vars/main.yml | 38 ++++++++++++++++++ 5 files changed, 59 insertions(+), 35 deletions(-) create mode 100644 changelogs/fragments/4736-cmd-runner-skip-if-check.yml diff --git a/changelogs/fragments/4736-cmd-runner-skip-if-check.yml b/changelogs/fragments/4736-cmd-runner-skip-if-check.yml new file mode 100644 index 0000000000..3c626b2feb --- /dev/null +++ b/changelogs/fragments/4736-cmd-runner-skip-if-check.yml @@ -0,0 +1,2 @@ +minor_changes: + - cmd_runner module util - added parameters ``check_mode_skip`` and ``check_mode_return`` to ``CmdRunner.context()``, so that the command is not executed when ``check_mode=True`` (https://github.com/ansible-collections/community.general/pull/4736). diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index 8048ed25ca..d154dbb7ee 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -197,7 +197,7 @@ class CmdRunner(object): if mod_param_name not in self.arg_formats: self.arg_formats[mod_param_name] = _Format.as_default_type(spec['type'], mod_param_name) - def context(self, args_order=None, output_process=None, ignore_value_none=True, **kwargs): + def context(self, args_order=None, output_process=None, ignore_value_none=True, check_mode_skip=False, check_mode_return=None, **kwargs): if output_process is None: output_process = _process_as_is if args_order is None: @@ -209,18 +209,22 @@ class CmdRunner(object): return _CmdRunnerContext(runner=self, args_order=args_order, output_process=output_process, - ignore_value_none=ignore_value_none, **kwargs) + ignore_value_none=ignore_value_none, + check_mode_skip=check_mode_skip, + check_mode_return=check_mode_return, **kwargs) def has_arg_format(self, arg): return arg in self.arg_formats class _CmdRunnerContext(object): - def __init__(self, runner, args_order, output_process, ignore_value_none, **kwargs): + def __init__(self, runner, args_order, output_process, ignore_value_none, check_mode_skip, check_mode_return, **kwargs): self.runner = runner self.args_order = tuple(args_order) self.output_process = output_process self.ignore_value_none = ignore_value_none + self.check_mode_skip = check_mode_skip + self.check_mode_return = check_mode_return self.run_command_args = dict(kwargs) self.environ_update = runner.environ_update @@ -260,6 +264,8 @@ class _CmdRunnerContext(object): except Exception as e: raise FormatError(arg_name, value, runner.arg_formats[arg_name], e) + if self.check_mode_skip and module.check_mode: + return self.check_mode_return results = module.run_command(self.cmd, **self.run_command_args) self.results_rc, self.results_out, self.results_err = results self.results_processed = self.output_process(*results) diff --git a/tests/integration/targets/cmd_runner/library/cmd_echo.py b/tests/integration/targets/cmd_runner/library/cmd_echo.py index 842df7e131..4b9cb8b547 100644 --- a/tests/integration/targets/cmd_runner/library/cmd_echo.py +++ b/tests/integration/targets/cmd_runner/library/cmd_echo.py @@ -6,36 +6,8 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -import sys -DOCUMENTATION = ''' -module: cmd_echo -author: "Alexei Znamensky (@russoz)" -short_description: Simple module for testing -description: - - Simple module test description. -options: - command: - description: aaa - type: list - elements: str - required: true - arg_formats: - description: bbb - type: dict - required: true - arg_order: - description: ccc - type: raw - required: true - arg_values: - description: ddd - type: list - required: true - aa: - description: eee - type: raw -''' +DOCUMENTATION = "" EXAMPLES = "" @@ -51,11 +23,15 @@ def main(): arg_formats=dict(type="dict", default={}), arg_order=dict(type="raw", required=True), arg_values=dict(type="dict", default={}), + check_mode_skip=dict(type="bool", default=False), aa=dict(type="raw"), ), + supports_check_mode=True, ) p = module.params + info = None + arg_formats = {} for arg, fmt_spec in p['arg_formats'].items(): func = getattr(fmt, fmt_spec['func']) @@ -65,11 +41,11 @@ def main(): runner = CmdRunner(module, ['echo', '--'], arg_formats=arg_formats) - info = None - with runner.context(p['arg_order']) as ctx: + with runner.context(p['arg_order'], check_mode_skip=p['check_mode_skip']) as ctx: result = ctx.run(**p['arg_values']) info = ctx.run_info - rc, out, err = result + check = "check" + rc, out, err = result if result is not None else (None, None, None) module.exit_json(rc=rc, out=out, err=err, info=info) diff --git a/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml b/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml index d00a468c04..ec4375e233 100644 --- a/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml +++ b/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml @@ -4,8 +4,10 @@ arg_formats: "{{ item.arg_formats|default(omit) }}" arg_order: "{{ item.arg_order }}" arg_values: "{{ item.arg_values|default(omit) }}" + check_mode_skip: "{{ item.check_mode_skip|default(omit) }}" aa: "{{ item.aa|default(omit) }}" register: test_result + check_mode: "{{ item.check_mode|default(omit) }}" ignore_errors: "{{ item.expect_error|default(omit) }}" - name: check results [{{ item.name }}] diff --git a/tests/integration/targets/cmd_runner/vars/main.yml b/tests/integration/targets/cmd_runner/vars/main.yml index ade4646a15..9d2b5fa078 100644 --- a/tests/integration/targets/cmd_runner/vars/main.yml +++ b/tests/integration/targets/cmd_runner/vars/main.yml @@ -82,3 +82,41 @@ cmd_echo_tests: - >- "MissingArgumentValue: Cannot find value for parameter bb" in test_result.module_stderr + + - name: set aa and bb value with check_mode on + arg_formats: + aa: + func: as_opt_eq_val + args: [--answer] + bb: + func: as_bool + args: [--bb-here] + arg_order: 'aa bb' + arg_values: + bb: true + aa: 11 + check_mode: true + assertions: + - test_result.rc == 0 + - test_result.out == "-- --answer=11 --bb-here\n" + - test_result.err == "" + + - name: set aa and bb value with check_mode and check_mode_skip on + arg_formats: + aa: + func: as_opt_eq_val + args: [--answer] + bb: + func: as_bool + args: [--bb-here] + arg_order: 'aa bb' + arg_values: + bb: true + check_mode_skip: true + aa: 11 + check_mode: true + expect_error: true # because if result contains rc != 0, ansible assumes error + assertions: + - test_result.rc == None + - test_result.out == None + - test_result.err == None From 49836bb48464419f4bb59c31f34ad613290c6d4b Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 4 Jun 2022 19:13:53 +1200 Subject: [PATCH 0060/2104] gconftool2_info: new module (#4743) * gconftool2_info: new module * fixed imports * fixed docs for gconftool2_info * fixed docs for gconftool2_info * minor adjustment in docs * added tests * adjustments --- .github/BOTMETA.yml | 6 ++ meta/runtime.yml | 2 + plugins/module_utils/gconftool2.py | 26 +++++ plugins/modules/system/gconftool2_info.py | 74 +++++++++++++ .../modules/system/test_gconftool2_info.py | 102 ++++++++++++++++++ 5 files changed, 210 insertions(+) create mode 100644 plugins/module_utils/gconftool2.py create mode 100644 plugins/modules/system/gconftool2_info.py create mode 100644 tests/unit/plugins/modules/system/test_gconftool2_info.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index ecedff1e81..b4a97468db 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -254,6 +254,9 @@ files: maintainers: amigus endlesstrax $module_utils/: labels: module_utils + $module_utils/gconftool2.py: + maintainers: russoz + labels: gconftool2 $module_utils/gitlab.py: notify: jlozadad maintainers: $team_gitlab @@ -1052,6 +1055,9 @@ files: $modules/system/gconftool2.py: maintainers: Akasurde kevensen labels: gconftool2 + $modules/system/gconftool2_info.py: + maintainers: russoz + labels: gconftool2 $modules/system/homectl.py: maintainers: jameslivulpi $modules/system/interfaces_file.py: diff --git a/meta/runtime.yml b/meta/runtime.yml index c3a439b6f3..e15dafd653 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -292,6 +292,8 @@ plugin_routing: redirect: community.google.gce_tag gconftool2: redirect: community.general.system.gconftool2 + gconftool2_info: + redirect: community.general.system.gconftool2_info gcp_backend_service: tombstone: removal_version: 2.0.0 diff --git a/plugins/module_utils/gconftool2.py b/plugins/module_utils/gconftool2.py new file mode 100644 index 0000000000..df9608fb30 --- /dev/null +++ b/plugins/module_utils/gconftool2.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# (c) 2022, Alexei Znamensky +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, fmt + + +def gconftool2_runner(module, **kwargs): + return CmdRunner( + module, + command='gconftool-2', + arg_formats=dict( + key=fmt.as_list(), + value_type=fmt.as_opt_val("--type"), + value=fmt.as_list(), + direct=fmt.as_bool("--direct"), + config_source=fmt.as_opt_val("--config-source"), + get=fmt.as_bool("--get"), + set_arg=fmt.as_bool("--set"), + unset=fmt.as_bool("--unset"), + ), + **kwargs + ) diff --git a/plugins/modules/system/gconftool2_info.py b/plugins/modules/system/gconftool2_info.py new file mode 100644 index 0000000000..36aa9aa238 --- /dev/null +++ b/plugins/modules/system/gconftool2_info.py @@ -0,0 +1,74 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# (c) 2022, Alexei Znamensky +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = ''' +module: gconftool2_info +author: + - "Alexei Znamensky (@russoz)" +short_description: Retrieve GConf configurations +version_added: 5.1.0 +description: + - This module allows retrieving application preferences from the GConf database, with the help of C(gconftool-2). +options: + key: + description: + - The key name for an element in the GConf database. + type: str + required: true +notes: + - See man gconftool-2(1) for more details. +seealso: + - name: gconf repository (archived) + description: Git repository for the project. It is an archived project, so the repository is read-only. + link: https://gitlab.gnome.org/Archive/gconf +''' + +EXAMPLES = """ +- name: Get value for a certain key in the database. + community.general.gconftool2_info: + key: /desktop/gnome/background/picture_filename + register: result +""" + +RETURN = ''' + value: + description: + - The value of the property. + returned: success + type: str + sample: Monospace 10 +''' + +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper +from ansible_collections.community.general.plugins.module_utils.gconftool2 import gconftool2_runner + + +class GConftoolInfo(ModuleHelper): + output_params = ['key'] + module = dict( + argument_spec=dict( + key=dict(type='str', required=True, no_log=False), + ), + supports_check_mode=True, + ) + + def __init_module__(self): + self.runner = gconftool2_runner(self.module, check_rc=True) + + def __run__(self): + with self.runner.context(args_order=["get", "key"]) as ctx: + rc, out, err = ctx.run(get=True) + self.vars.value = None if err and not out else out.rstrip() + + +def main(): + GConftoolInfo.execute() + + +if __name__ == '__main__': + main() diff --git a/tests/unit/plugins/modules/system/test_gconftool2_info.py b/tests/unit/plugins/modules/system/test_gconftool2_info.py new file mode 100644 index 0000000000..97d349f428 --- /dev/null +++ b/tests/unit/plugins/modules/system/test_gconftool2_info.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +# Author: Alexei Znamensky (russoz@gmail.com) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +from ansible_collections.community.general.plugins.modules.system import gconftool2_info + +import pytest + +TESTED_MODULE = gconftool2_info.__name__ + + +@pytest.fixture +def patch_gconftool2_info(mocker): + """ + Function used for mocking some parts of redhat_subscribtion module + """ + mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', + return_value='/testbin/gconftool-2') + + +TEST_CASES = [ + [ + {'key': '/desktop/gnome/background/picture_filename'}, + { + 'id': 'test_simple_element_get', + 'run_command.calls': [ + ( + # Calling of following command will be asserted + ['/testbin/gconftool-2', '--get', '/desktop/gnome/background/picture_filename'], + # Was return code checked? + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': True}, + # Mock of returned code, stdout and stderr + (0, '100\n', '',), + ), + ], + 'value': '100', + } + ], + [ + {'key': '/desktop/gnome/background/picture_filename'}, + { + 'id': 'test_simple_element_get_not_found', + 'run_command.calls': [ + ( + # Calling of following command will be asserted + ['/testbin/gconftool-2', '--get', '/desktop/gnome/background/picture_filename'], + # Was return code checked? + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': True}, + # Mock of returned code, stdout and stderr + (0, '', "No value set for `/desktop/gnome/background/picture_filename'\n",), + ), + ], + 'value': None, + } + ], +] +TEST_CASES_IDS = [item[1]['id'] for item in TEST_CASES] + + +@pytest.mark.parametrize('patch_ansible_module, testcase', + TEST_CASES, + ids=TEST_CASES_IDS, + indirect=['patch_ansible_module']) +@pytest.mark.usefixtures('patch_ansible_module') +def test_gconftool2_info(mocker, capfd, patch_gconftool2_info, testcase): + """ + Run unit tests for test cases listen in TEST_CASES + """ + + # Mock function used for running commands first + call_results = [item[2] for item in testcase['run_command.calls']] + mock_run_command = mocker.patch( + 'ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.run_command', + side_effect=call_results) + + # Try to run test case + with pytest.raises(SystemExit): + gconftool2_info.main() + + out, err = capfd.readouterr() + results = json.loads(out) + print("testcase =\n%s" % testcase) + print("results =\n%s" % results) + + for conditional_test_result in ('value',): + if conditional_test_result in testcase: + assert conditional_test_result in results, "'{0}' not found in {1}".format(conditional_test_result, results) + assert results[conditional_test_result] == testcase[conditional_test_result], \ + "'{0}': '{1}' != '{2}'".format(conditional_test_result, results[conditional_test_result], testcase[conditional_test_result]) + + assert mock_run_command.call_count == len(testcase['run_command.calls']) + if mock_run_command.call_count: + call_args_list = [(item[0][0], item[1]) for item in mock_run_command.call_args_list] + expected_call_args_list = [(item[0], item[1]) for item in testcase['run_command.calls']] + print("call args list =\n%s" % call_args_list) + print("expected args list =\n%s" % expected_call_args_list) + assert call_args_list == expected_call_args_list From d019e22e7db36815595a389497003120cdf79efe Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 4 Jun 2022 19:14:17 +1200 Subject: [PATCH 0061/2104] ansible_galaxy_install: minor improvements based on MH updates (#4752) * ansible_galaxy_install: minor improvements based on MH updates * added changelog fragment --- .../fragments/4752-ansible-galaxy-install-mh-updates.yml | 2 ++ .../modules/packaging/language/ansible_galaxy_install.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml diff --git a/changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml b/changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml new file mode 100644 index 0000000000..b93d885ed4 --- /dev/null +++ b/changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible_galaxy_install - minor refactoring using latest ``ModuleHelper`` updates (https://github.com/ansible-collections/community.general/pull/4752). diff --git a/plugins/modules/packaging/language/ansible_galaxy_install.py b/plugins/modules/packaging/language/ansible_galaxy_install.py index 968a8d093d..7b7ac160da 100644 --- a/plugins/modules/packaging/language/ansible_galaxy_install.py +++ b/plugins/modules/packaging/language/ansible_galaxy_install.py @@ -226,7 +226,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper): check_rc = True def _get_ansible_galaxy_version(self): - ansible_galaxy = self.module.get_bin_path("ansible-galaxy", required=True) + ansible_galaxy = self.get_bin_path("ansible-galaxy", required=True) dummy, out, dummy = self.module.run_command([ansible_galaxy, "--version"], check_rc=True) line = out.splitlines()[0] match = self._RE_GALAXY_VERSION.match(line) @@ -302,9 +302,9 @@ class AnsibleGalaxyInstall(CmdModuleHelper): self.vars.set("new_roles", {}) self.vars.set("ansible29_change", False, change=True, output=False) if not (self.vars.ack_ansible29 or self.vars.ack_min_ansiblecore211): - self.module.warn("Ansible 2.9 or older: unable to retrieve lists of roles and collections already installed") + self.warn("Ansible 2.9 or older: unable to retrieve lists of roles and collections already installed") if self.vars.requirements_file is not None and self.vars.type == 'both': - self.module.warn("Ansible 2.9 or older: will install only roles from requirement files") + self.warn("Ansible 2.9 or older: will install only roles from requirement files") def _setup210plus(self): self.vars.set("new_collections", {}, change=True) From b556b142ecdb697cf729e902aeafdeda8dff2f92 Mon Sep 17 00:00:00 2001 From: Ilija Matoski Date: Sat, 4 Jun 2022 09:15:02 +0200 Subject: [PATCH 0062/2104] Proxmox Inventory: added new statuses for qemu (#4723) * added new statuses for qemu * added document fragment * lint fixes * replaced f strings with % * move the qmpstatus for qemu to a dedicated group * added documentation to explain the new addition * update changelog fragment to reflect the change correctly * update changelog fragment to reflect the change correctly * Apply suggestions from code review Co-authored-by: Felix Fontein * added a switch to get the qemu extended status * Apply suggestions from code review Co-authored-by: Felix Fontein * groups created when qemu_extended_statuses is true and added tests to make sure they are there * added test to make sure the groups are not present when qemu_extended_statuses is false * Apply suggestions from code review Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4724-proxmox-qemu-extend.yaml | 3 + plugins/inventory/proxmox.py | 44 ++++++++++--- tests/unit/plugins/inventory/test_proxmox.py | 61 +++++++++++++++---- 3 files changed, 86 insertions(+), 22 deletions(-) create mode 100644 changelogs/fragments/4724-proxmox-qemu-extend.yaml diff --git a/changelogs/fragments/4724-proxmox-qemu-extend.yaml b/changelogs/fragments/4724-proxmox-qemu-extend.yaml new file mode 100644 index 0000000000..4b705bf9a9 --- /dev/null +++ b/changelogs/fragments/4724-proxmox-qemu-extend.yaml @@ -0,0 +1,3 @@ +minor_changes: + - proxmox inventory plugin - added new flag ``qemu_extended_statuses`` and new groups ``prelaunch``, ``paused``. They will be populated only when ``want_facts=true``, ``qemu_extended_statuses=true`` and only for ``QEMU`` machines + (https://github.com/ansible-collections/community.general/pull/4723). diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index e0734b33e3..1664e6ba03 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -92,9 +92,21 @@ DOCUMENTATION = ''' default: proxmox_ type: str want_facts: - description: Gather LXC/QEMU configuration facts. + description: + - Gather LXC/QEMU configuration facts. + - When I(want_facts) is set to C(true) more details about QEMU VM status are possible, besides the running and stopped states. + Currently if the VM is running and it is suspended, the status will be running and the machine will be in C(running) group, + but its actual state will be paused. See I(qemu_extended_statuses) for how to retrieve the real status. default: no type: bool + qemu_extended_statuses: + description: + - Requires I(want_facts) to be set to C(true) to function. This will allow you to differentiate betweend C(paused) and C(prelaunch) + statuses of the QEMU VMs. + - This introduces multiple groups [prefixed with I(group_prefix)] C(prelaunch) and C(paused). + default: no + type: bool + version_added: 5.1.0 want_proxmox_nodes_ansible_host: version_added: 3.0.0 description: @@ -431,6 +443,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): def _get_vm_status(self, properties, node, vmid, vmtype, name): ret = self._get_json("%s/api2/json/nodes/%s/%s/%s/status/current" % (self.proxmox_url, node, vmtype, vmid)) properties[self._fact('status')] = ret['status'] + properties[self._fact('qmpstatus')] = ret['qmpstatus'] def _get_vm_snapshots(self, properties, node, vmid, vmtype, name): ret = self._get_json("%s/api2/json/nodes/%s/%s/%s/snapshot" % (self.proxmox_url, node, vmtype, vmid)) @@ -489,7 +502,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): name, vmid = item['name'], item['vmid'] # get status, config and snapshots if want_facts == True - if self.get_option('want_facts'): + want_facts = self.get_option('want_facts') + if want_facts: self._get_vm_status(properties, node, vmid, ittype, name) self._get_vm_config(properties, node, vmid, ittype, name) self._get_vm_snapshots(properties, node, vmid, ittype, name) @@ -503,10 +517,13 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): node_type_group = self._group('%s_%s' % (node, ittype)) self.inventory.add_child(self._group('all_' + ittype), name) self.inventory.add_child(node_type_group, name) - if item['status'] == 'stopped': - self.inventory.add_child(self._group('all_stopped'), name) - elif item['status'] == 'running': - self.inventory.add_child(self._group('all_running'), name) + + item_status = item['status'] + if item_status == 'running': + if want_facts and ittype == 'qemu' and self.get_option('qemu_extended_statuses'): + # get more details about the status of the qemu VM + item_status = properties.get(self._fact('qmpstatus'), item_status) + self.inventory.add_child(self._group('all_%s' % (item_status, )), name) return name @@ -528,10 +545,14 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): def _populate(self): # create common groups - self.inventory.add_group(self._group('all_lxc')) - self.inventory.add_group(self._group('all_qemu')) - self.inventory.add_group(self._group('all_running')) - self.inventory.add_group(self._group('all_stopped')) + default_groups = ['lxc', 'qemu', 'running', 'stopped'] + + if self.get_option('qemu_extended_statuses'): + default_groups.extend(['prelaunch', 'paused']) + + for group in default_groups: + self.inventory.add_group(self._group('all_%s' % (group))) + nodes_group = self._group('nodes') self.inventory.add_group(nodes_group) @@ -621,6 +642,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): if proxmox_password is None and (proxmox_token_id is None or proxmox_token_secret is None): raise AnsibleError('You must specify either a password or both token_id and token_secret.') + if self.get_option('qemu_extended_statuses') and not self.get_option('want_facts'): + raise AnsibleError('You must set want_facts to True if you want to use qemu_extended_statuses.') + self.cache_key = self.get_cache_key(path) self.use_cache = cache and self.get_option('cache') self.host_filters = self.get_option('filters') diff --git a/tests/unit/plugins/inventory/test_proxmox.py b/tests/unit/plugins/inventory/test_proxmox.py index ae29ab0a35..91411d1d55 100644 --- a/tests/unit/plugins/inventory/test_proxmox.py +++ b/tests/unit/plugins/inventory/test_proxmox.py @@ -541,17 +541,11 @@ def get_vm_status(properties, node, vmtype, vmid, name): return True -def get_option(option): - if option == 'group_prefix': - return 'proxmox_' - if option == 'facts_prefix': - return 'proxmox_' - elif option == 'want_facts': - return True - elif option == 'want_proxmox_nodes_ansible_host': - return True - else: - return False +def get_option(opts): + def fn(option): + default = opts.get('default', False) + return opts.get(option, default) + return fn def test_populate(inventory, mocker): @@ -563,12 +557,20 @@ def test_populate(inventory, mocker): inventory.facts_prefix = 'proxmox_' inventory.strict = False + opts = { + 'group_prefix': 'proxmox_', + 'facts_prefix': 'proxmox_', + 'want_facts': True, + 'want_proxmox_nodes_ansible_host': True, + 'qemu_extended_statuses': True + } + # bypass authentication and API fetch calls inventory._get_auth = mocker.MagicMock(side_effect=get_auth) inventory._get_json = mocker.MagicMock(side_effect=get_json) inventory._get_vm_status = mocker.MagicMock(side_effect=get_vm_status) inventory._get_vm_snapshots = mocker.MagicMock(side_effect=get_vm_snapshots) - inventory.get_option = mocker.MagicMock(side_effect=get_option) + inventory.get_option = mocker.MagicMock(side_effect=get_option(opts)) inventory._can_add_host = mocker.MagicMock(return_value=True) inventory._populate() @@ -610,3 +612,38 @@ def test_populate(inventory, mocker): # check that offline node is in inventory assert inventory.inventory.get_host('testnode2') + + # make sure that ['prelaunch', 'paused'] are in the group list + for group in ['paused', 'prelaunch']: + assert ('%sall_%s' % (inventory.group_prefix, group)) in inventory.inventory.groups + + +def test_populate_missing_qemu_extended_groups(inventory, mocker): + # module settings + inventory.proxmox_user = 'root@pam' + inventory.proxmox_password = 'password' + inventory.proxmox_url = 'https://localhost:8006' + inventory.group_prefix = 'proxmox_' + inventory.facts_prefix = 'proxmox_' + inventory.strict = False + + opts = { + 'group_prefix': 'proxmox_', + 'facts_prefix': 'proxmox_', + 'want_facts': True, + 'want_proxmox_nodes_ansible_host': True, + 'qemu_extended_statuses': False + } + + # bypass authentication and API fetch calls + inventory._get_auth = mocker.MagicMock(side_effect=get_auth) + inventory._get_json = mocker.MagicMock(side_effect=get_json) + inventory._get_vm_status = mocker.MagicMock(side_effect=get_vm_status) + inventory._get_vm_snapshots = mocker.MagicMock(side_effect=get_vm_snapshots) + inventory.get_option = mocker.MagicMock(side_effect=get_option(opts)) + inventory._can_add_host = mocker.MagicMock(return_value=True) + inventory._populate() + + # make sure that ['prelaunch', 'paused'] are not in the group list + for group in ['paused', 'prelaunch']: + assert ('%sall_%s' % (inventory.group_prefix, group)) not in inventory.inventory.groups From 2d38c8d892acd69ae71024fad3c99aecb68c8220 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 6 Jun 2022 04:37:59 +1200 Subject: [PATCH 0063/2104] cmd_runner: deprecate fmt as the name for the format class (#4777) * cmd_runner: deprecate fmt as the name for the format class * added changelog fragment * fixing the deprecation comment --- .../fragments/4777-cmd-runner-deprecate-fmt.yaml | 2 ++ plugins/module_utils/cmd_runner.py | 10 +++++++++- plugins/module_utils/gconftool2.py | 2 +- .../integration/targets/cmd_runner/library/cmd_echo.py | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml diff --git a/changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml b/changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml new file mode 100644 index 0000000000..6057cf38e8 --- /dev/null +++ b/changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml @@ -0,0 +1,2 @@ +deprecated_features: + - cmd_runner module utils - deprecated ``fmt`` in favour of ``cmd_runner_fmt`` as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777). diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index d154dbb7ee..7d6a690224 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -294,4 +294,12 @@ class _CmdRunnerContext(object): return False -fmt = _Format() +cmd_runner_fmt = _Format() + +# +# The fmt form is deprecated and will be removed in community.general 7.0.0 +# Please use: +# cmd_runner_fmt +# Or, to retain the same effect, use: +# from ansible_collections.community.general.plugins.module_utils.cmd_runner import cmd_runner_fmt as fmt +fmt = cmd_runner_fmt diff --git a/plugins/module_utils/gconftool2.py b/plugins/module_utils/gconftool2.py index df9608fb30..f4ee34325d 100644 --- a/plugins/module_utils/gconftool2.py +++ b/plugins/module_utils/gconftool2.py @@ -5,7 +5,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, fmt +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt def gconftool2_runner(module, **kwargs): diff --git a/tests/integration/targets/cmd_runner/library/cmd_echo.py b/tests/integration/targets/cmd_runner/library/cmd_echo.py index 4b9cb8b547..4fd32a7ac6 100644 --- a/tests/integration/targets/cmd_runner/library/cmd_echo.py +++ b/tests/integration/targets/cmd_runner/library/cmd_echo.py @@ -14,7 +14,7 @@ EXAMPLES = "" RETURN = "" from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, fmt +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt def main(): From c6d4a0db8002bf69f4be9a1993d7ad7b9662cc3e Mon Sep 17 00:00:00 2001 From: Matt Coddington Date: Sun, 5 Jun 2022 15:26:50 -0400 Subject: [PATCH 0064/2104] remove mcodd as maintainer for newrelic_deployment and flowdock modules (#4781) --- .github/BOTMETA.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index b4a97468db..8ccebfc092 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -618,7 +618,7 @@ files: $modules/monitoring/nagios.py: maintainers: tbielawa tgoetheyn $modules/monitoring/newrelic_deployment.py: - maintainers: mcodd + ignore: mcodd $modules/monitoring/pagerduty.py: maintainers: suprememoocow thaumos labels: pagerduty @@ -710,7 +710,7 @@ files: $modules/notification/discord.py: maintainers: cwollinger $modules/notification/flowdock.py: - maintainers: mcodd + ignore: mcodd $modules/notification/grove.py: maintainers: zimbatm $modules/notification/hipchat.py: From b87edda3c7b3587f3bd786059beb5bbbf2450526 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 6 Jun 2022 20:30:55 +1200 Subject: [PATCH 0065/2104] ModuleHelperException module utils - improved exception initialization (#4755) * ModuleHelperException module utils - improved exception initialization * added changelog fragment * Update plugins/module_utils/mh/exceptions.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4755-mhexception-improvement.yml | 2 ++ plugins/module_utils/mh/exceptions.py | 18 +++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 changelogs/fragments/4755-mhexception-improvement.yml diff --git a/changelogs/fragments/4755-mhexception-improvement.yml b/changelogs/fragments/4755-mhexception-improvement.yml new file mode 100644 index 0000000000..ebadb98bc5 --- /dev/null +++ b/changelogs/fragments/4755-mhexception-improvement.yml @@ -0,0 +1,2 @@ +minor_changes: + - ModuleHelper module utils - improved ``ModuleHelperException``, using ``to_native()`` for the exception message (https://github.com/ansible-collections/community.general/pull/4755). diff --git a/plugins/module_utils/mh/exceptions.py b/plugins/module_utils/mh/exceptions.py index 7d1a46bb5a..2ee548ff41 100644 --- a/plugins/module_utils/mh/exceptions.py +++ b/plugins/module_utils/mh/exceptions.py @@ -6,17 +6,13 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +from ansible.module_utils.common.text.converters import to_native + class ModuleHelperException(Exception): - @staticmethod - def _get_remove(key, kwargs): - if key in kwargs: - result = kwargs[key] - del kwargs[key] - return result - return None - - def __init__(self, *args, **kwargs): - self.msg = self._get_remove('msg', kwargs) or "Module failed with exception: {0}".format(self) - self.update_output = self._get_remove('update_output', kwargs) or {} + def __init__(self, msg, update_output=None, *args, **kwargs): + self.msg = to_native(msg or "Module failed with exception: {0}".format(self)) + if update_output is None: + update_output = {} + self.update_output = update_output super(ModuleHelperException, self).__init__(*args) From 62ff263ac1204a35a693e2f30e4bbe95cdb37c21 Mon Sep 17 00:00:00 2001 From: Ge0rgi0s <34042518+Ge0rgi0s@users.noreply.github.com> Date: Mon, 6 Jun 2022 10:32:20 +0200 Subject: [PATCH 0066/2104] Add puppet confdir option (#4740) * Add puppet confdir option * Add puppet confdir option change fragment * Improve quoting in plugins/modules/system/puppet.py Co-authored-by: Felix Fontein * Add version_added to plugins/modules/system/puppet.py Co-authored-by: Felix Fontein Co-authored-by: Georg Vogt Co-authored-by: Felix Fontein --- changelogs/fragments/4740-puppet-feature.yaml | 2 ++ plugins/modules/system/puppet.py | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 changelogs/fragments/4740-puppet-feature.yaml diff --git a/changelogs/fragments/4740-puppet-feature.yaml b/changelogs/fragments/4740-puppet-feature.yaml new file mode 100644 index 0000000000..a4341f42b8 --- /dev/null +++ b/changelogs/fragments/4740-puppet-feature.yaml @@ -0,0 +1,2 @@ +minor_changes: +- puppet - adds ``confdir`` parameter to configure a custom confir location (https://github.com/ansible-collections/community.general/pull/4740). diff --git a/plugins/modules/system/puppet.py b/plugins/modules/system/puppet.py index ed7341cb94..87fcc6e822 100644 --- a/plugins/modules/system/puppet.py +++ b/plugins/modules/system/puppet.py @@ -51,6 +51,11 @@ options: description: - Puppet environment to be used. type: str + confdir: + description: + - Path to the directory containing the puppet.conf file. + type: str + version_added: 5.1.0 logdest: description: - Where the puppet logs should go, if puppet apply is being used. @@ -179,6 +184,7 @@ def main(): puppetmaster=dict(type='str'), modulepath=dict(type='str'), manifest=dict(type='str'), + confdir=dict(type='str'), noop=dict(type='bool'), logdest=dict(type='str', default='stdout', choices=['all', 'stdout', 'syslog']), # The following is not related to Ansible's diff; see https://github.com/ansible-collections/community.general/pull/3980#issuecomment-1005666154 @@ -255,6 +261,8 @@ def main(): cmd += " --server %s" % shlex_quote(p['puppetmaster']) if p['show_diff']: cmd += " --show_diff" + if p['confdir']: + cmd += " --confdir %s" % shlex_quote(p['confdir']) if p['environment']: cmd += " --environment '%s'" % p['environment'] if p['tags']: From 373da56b5b3adaaa82645a2370371b2a5d4aa410 Mon Sep 17 00:00:00 2001 From: Marius Rieder Date: Mon, 6 Jun 2022 10:33:39 +0200 Subject: [PATCH 0067/2104] Add subcommands parameter for module alternatives. (#4654) * Add slaves parameter for module alternatives. * alternatives: Improve documentation abous slaves parameter * alternatives: Apply suggestions from code review Co-authored-by: Felix Fontein * alternatives: Add schangelog for slaves parameter * alernatives: Add integration tests * alternatives: Improv tests * alternatives: Update tests/integration/targets/alternatives/tasks/slaves.yml Co-authored-by: Felix Fontein * alternatives: Rework logic to support updating priority and subcommands * alternatives: Use more inclusive naming * alternatives: Fix linter warnings * alternatives: Dont fail if link is absent * alternatives: Update changelog fragment * alternatives: Add tests for prio change and removing * alternatives: Apply suggestions from code review Co-authored-by: Felix Fontein * alternatives: Add `state=auto`to reset mode to auto * alternatives: Fix linter warnings * alternatives: Fix documentation. * alternatives: Combine multiple messages. * alternatives: Set command env for all commands. * alternatives: Do not update subcommands if parameter is omited * alternatives: Fix a bug with python 2.7 var scoping * alternatives: Improce diff before generation * alternatives: Fix linter warnings * alternatives: Fix test names * alternatives: Simplify subcommands handling and improve diffs * aliases: Only test for subcommand changes if subcommands parameter is set. * Update plugins/modules/system/alternatives.py Co-authored-by: Felix Fontein * Apply suggestions from code review Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 +- .../4654-alternatives-add-subcommands.yml | 3 + plugins/modules/system/alternatives.py | 379 +++++++++++++----- .../targets/alternatives/tasks/main.yml | 3 + .../alternatives/tasks/subcommands.yml | 78 ++++ .../targets/alternatives/tasks/test.yml | 4 +- .../alternatives/tasks/tests_set_priority.yml | 11 + .../alternatives/tasks/tests_state.yml | 46 ++- 8 files changed, 420 insertions(+), 106 deletions(-) create mode 100644 changelogs/fragments/4654-alternatives-add-subcommands.yml create mode 100644 tests/integration/targets/alternatives/tasks/subcommands.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 8ccebfc092..4b21be9c4c 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1027,7 +1027,7 @@ files: $modules/system/alternatives.py: maintainers: mulby labels: alternatives - ignore: DavidWittman + ignore: DavidWittman jiuka $modules/system/aix_lvol.py: maintainers: adejoux $modules/system/awall.py: diff --git a/changelogs/fragments/4654-alternatives-add-subcommands.yml b/changelogs/fragments/4654-alternatives-add-subcommands.yml new file mode 100644 index 0000000000..f771e9b51c --- /dev/null +++ b/changelogs/fragments/4654-alternatives-add-subcommands.yml @@ -0,0 +1,3 @@ +minor_changes: + - alternatives - add ``subcommands`` parameter (https://github.com/ansible-collections/community.general/pull/4654). + - alternatives - add ``state=absent`` to be able to remove an alternative (https://github.com/ansible-collections/community.general/pull/4654). diff --git a/plugins/modules/system/alternatives.py b/plugins/modules/system/alternatives.py index ca075d69b4..1fbc5ccddc 100644 --- a/plugins/modules/system/alternatives.py +++ b/plugins/modules/system/alternatives.py @@ -3,6 +3,7 @@ # Copyright: (c) 2014, Gabe Mulley # Copyright: (c) 2015, David Wittman +# Copyright: (c) 2022, Marius Rieder # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -17,6 +18,7 @@ description: - Manages symbolic links using the 'update-alternatives' tool. - Useful when multiple programs are installed but provide similar functionality (e.g. different editors). author: + - Marius Rieder (@jiuka) - David Wittman (@DavidWittman) - Gabe Mulley (@mulby) options: @@ -47,10 +49,36 @@ options: not set it as the currently selected alternative for the group. - C(selected) - install the alternative (if not already installed), and set it as the currently selected alternative for the group. - choices: [ present, selected ] + - C(auto) - install the alternative (if not already installed), and + set the group to auto mode. Added in community.general 5.1.0. + - C(absent) - removes the alternative. Added in community.general 5.1.0. + choices: [ present, selected, auto, absent ] default: selected type: str version_added: 4.8.0 + subcommands: + description: + - A list of subcommands. + - Each subcommand needs a name, a link and a path parameter. + type: list + elements: dict + aliases: ['slaves'] + suboptions: + name: + description: + - The generic name of the subcommand. + type: str + required: true + path: + description: + - The path to the real executable that the subcommand should point to. + type: path + required: true + link: + description: + - The path to the symbolic link that should point to the real subcommand executable. + type: path + version_added: 5.1.0 requirements: [ update-alternatives ] ''' @@ -78,6 +106,23 @@ EXAMPLES = r''' path: /usr/bin/python3.5 link: /usr/bin/python state: present + +- name: Install Python 3.5 and reset selection to auto + community.general.alternatives: + name: python + path: /usr/bin/python3.5 + link: /usr/bin/python + state: auto + +- name: keytool is a subcommand of java + community.general.alternatives: + name: java + link: /usr/bin/java + path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java + subcommands: + - name: keytool + link: /usr/bin/keytool + path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool ''' import os @@ -90,10 +135,235 @@ from ansible.module_utils.basic import AnsibleModule class AlternativeState: PRESENT = "present" SELECTED = "selected" + ABSENT = "absent" + AUTO = "auto" @classmethod def to_list(cls): - return [cls.PRESENT, cls.SELECTED] + return [cls.PRESENT, cls.SELECTED, cls.ABSENT, cls.AUTO] + + +class AlternativesModule(object): + _UPDATE_ALTERNATIVES = None + + def __init__(self, module): + self.module = module + self.result = dict(changed=False, diff=dict(before=dict(), after=dict())) + self.module.run_command_environ_update = {'LC_ALL': 'C'} + self.messages = [] + self.run() + + @property + def mode_present(self): + return self.module.params.get('state') in [AlternativeState.PRESENT, AlternativeState.SELECTED, AlternativeState.AUTO] + + @property + def mode_selected(self): + return self.module.params.get('state') == AlternativeState.SELECTED + + @property + def mode_auto(self): + return self.module.params.get('state') == AlternativeState.AUTO + + def run(self): + self.parse() + + if self.mode_present: + # Check if we need to (re)install + subcommands_parameter = self.module.params['subcommands'] + if ( + self.path not in self.current_alternatives or + self.current_alternatives[self.path].get('priority') != self.priority or + (subcommands_parameter is not None and ( + not all(s in subcommands_parameter for s in self.current_alternatives[self.path].get('subcommands')) or + not all(s in self.current_alternatives[self.path].get('subcommands') for s in subcommands_parameter) + )) + ): + self.install() + + # Check if we need to set the preference + if self.mode_selected and self.current_path != self.path: + self.set() + + # Check if we need to reset to auto + if self.mode_auto and self.current_mode == 'manual': + self.auto() + else: + # Check if we need to uninstall + if self.path in self.current_alternatives: + self.remove() + + self.result['msg'] = ' '.join(self.messages) + self.module.exit_json(**self.result) + + def install(self): + if not os.path.exists(self.path): + self.module.fail_json(msg="Specified path %s does not exist" % self.path) + if not self.link: + self.module.fail_json(msg='Needed to install the alternative, but unable to do so as we are missing the link') + + cmd = [self.UPDATE_ALTERNATIVES, '--install', self.link, self.name, self.path, str(self.priority)] + + if self.subcommands is not None: + subcommands = [['--slave', subcmd['link'], subcmd['name'], subcmd['path']] for subcmd in self.subcommands] + cmd += [item for sublist in subcommands for item in sublist] + + self.result['changed'] = True + self.messages.append("Install alternative '%s' for '%s'." % (self.path, self.name)) + + if not self.module.check_mode: + self.module.run_command(cmd, check_rc=True) + + if self.module._diff: + self.result['diff']['after'] = dict( + state=AlternativeState.PRESENT, + path=self.path, + priority=self.priority, + link=self.link, + ) + if self.subcommands: + self.result['diff']['after'].update(dict( + subcommands=self.subcommands + )) + + def remove(self): + cmd = [self.UPDATE_ALTERNATIVES, '--remove', self.name, self.path] + self.result['changed'] = True + self.messages.append("Remove alternative '%s' from '%s'." % (self.path, self.name)) + + if not self.module.check_mode: + self.module.run_command(cmd, check_rc=True) + + if self.module._diff: + self.result['diff']['after'] = dict(state=AlternativeState.ABSENT) + + def set(self): + cmd = [self.UPDATE_ALTERNATIVES, '--set', self.name, self.path] + self.result['changed'] = True + self.messages.append("Set alternative '%s' for '%s'." % (self.path, self.name)) + + if not self.module.check_mode: + self.module.run_command(cmd, check_rc=True) + + if self.module._diff: + self.result['diff']['after']['state'] = AlternativeState.SELECTED + + def auto(self): + cmd = [self.UPDATE_ALTERNATIVES, '--auto', self.name] + self.messages.append("Set alternative to auto for '%s'." % (self.name)) + self.result['changed'] = True + + if not self.module.check_mode: + self.module.run_command(cmd, check_rc=True) + + if self.module._diff: + self.result['diff']['after']['state'] = AlternativeState.PRESENT + + @property + def name(self): + return self.module.params.get('name') + + @property + def path(self): + return self.module.params.get('path') + + @property + def link(self): + return self.module.params.get('link') or self.current_link + + @property + def priority(self): + return self.module.params.get('priority') + + @property + def subcommands(self): + if self.module.params.get('subcommands') is not None: + return self.module.params.get('subcommands') + elif self.path in self.current_alternatives and self.current_alternatives[self.path].get('subcommands'): + return self.current_alternatives[self.path].get('subcommands') + return None + + @property + def UPDATE_ALTERNATIVES(self): + if self._UPDATE_ALTERNATIVES is None: + self._UPDATE_ALTERNATIVES = self.module.get_bin_path('update-alternatives', True) + return self._UPDATE_ALTERNATIVES + + def parse(self): + self.current_mode = None + self.current_path = None + self.current_link = None + self.current_alternatives = {} + + # Run `update-alternatives --display ` to find existing alternatives + (rc, display_output, dummy) = self.module.run_command( + [self.UPDATE_ALTERNATIVES, '--display', self.name] + ) + + if rc != 0: + self.module.debug("No current alternative found. '%s' exited with %s" % (self.UPDATE_ALTERNATIVES, rc)) + return + + current_mode_regex = re.compile(r'\s-\s(?:status\sis\s)?(\w*)(?:\smode|.)$', re.MULTILINE) + current_path_regex = re.compile(r'^\s*link currently points to (.*)$', re.MULTILINE) + current_link_regex = re.compile(r'^\s*link \w+ is (.*)$', re.MULTILINE) + subcmd_path_link_regex = re.compile(r'^\s*slave (\S+) is (.*)$', re.MULTILINE) + + alternative_regex = re.compile(r'^(\/.*)\s-\s(?:family\s\S+\s)?priority\s(\d+)((?:\s+slave.*)*)', re.MULTILINE) + subcmd_regex = re.compile(r'^\s+slave (.*): (.*)$', re.MULTILINE) + + match = current_mode_regex.search(display_output) + if not match: + self.module.debug("No current mode found in output") + return + self.current_mode = match.group(1) + + match = current_path_regex.search(display_output) + if not match: + self.module.debug("No current path found in output") + else: + self.current_path = match.group(1) + + match = current_link_regex.search(display_output) + if not match: + self.module.debug("No current link found in output") + else: + self.current_link = match.group(1) + + subcmd_path_map = dict(subcmd_path_link_regex.findall(display_output)) + if not subcmd_path_map and self.subcommands: + subcmd_path_map = dict((s['name'], s['link']) for s in self.subcommands) + + for path, prio, subcmd in alternative_regex.findall(display_output): + self.current_alternatives[path] = dict( + priority=int(prio), + subcommands=[dict( + name=name, + path=spath, + link=subcmd_path_map.get(name) + ) for name, spath in subcmd_regex.findall(subcmd) if spath != '(null)'] + ) + + if self.module._diff: + if self.path in self.current_alternatives: + self.result['diff']['before'].update(dict( + state=AlternativeState.PRESENT, + path=self.path, + priority=self.current_alternatives[self.path].get('priority'), + link=self.current_link, + )) + if self.current_alternatives[self.path].get('subcommands'): + self.result['diff']['before'].update(dict( + subcommands=self.current_alternatives[self.path].get('subcommands') + )) + if self.current_mode == 'manual' and self.current_path != self.path: + self.result['diff']['before'].update(dict( + state=AlternativeState.SELECTED + )) + else: + self.result['diff']['before'].update(dict( + state=AlternativeState.ABSENT + )) def main(): @@ -109,109 +379,16 @@ def main(): choices=AlternativeState.to_list(), default=AlternativeState.SELECTED, ), + subcommands=dict(type='list', elements='dict', aliases=['slaves'], options=dict( + name=dict(type='str', required=True), + path=dict(type='path', required=True), + link=dict(type='path'), + )), ), supports_check_mode=True, ) - params = module.params - name = params['name'] - path = params['path'] - link = params['link'] - priority = params['priority'] - state = params['state'] - - UPDATE_ALTERNATIVES = module.get_bin_path('update-alternatives', True) - - current_path = None - all_alternatives = [] - - # Run `update-alternatives --display ` to find existing alternatives - (rc, display_output, dummy) = module.run_command( - ['env', 'LC_ALL=C', UPDATE_ALTERNATIVES, '--display', name] - ) - - if rc == 0: - # Alternatives already exist for this link group - # Parse the output to determine the current path of the symlink and - # available alternatives - current_path_regex = re.compile(r'^\s*link currently points to (.*)$', - re.MULTILINE) - alternative_regex = re.compile(r'^(\/.*)\s-\s(?:family\s\S+\s)?priority', re.MULTILINE) - - match = current_path_regex.search(display_output) - if match: - current_path = match.group(1) - all_alternatives = alternative_regex.findall(display_output) - - if not link: - # Read the current symlink target from `update-alternatives --query` - # in case we need to install the new alternative before setting it. - # - # This is only compatible on Debian-based systems, as the other - # alternatives don't have --query available - rc, query_output, dummy = module.run_command( - ['env', 'LC_ALL=C', UPDATE_ALTERNATIVES, '--query', name] - ) - if rc == 0: - for line in query_output.splitlines(): - if line.startswith('Link:'): - link = line.split()[1] - break - - changed = False - if current_path != path: - - # Check mode: expect a change if this alternative is not already - # installed, or if it is to be set as the current selection. - if module.check_mode: - module.exit_json( - changed=( - path not in all_alternatives or - state == AlternativeState.SELECTED - ), - current_path=current_path, - ) - - try: - # install the requested path if necessary - if path not in all_alternatives: - if not os.path.exists(path): - module.fail_json(msg="Specified path %s does not exist" % path) - if not link: - module.fail_json(msg="Needed to install the alternative, but unable to do so as we are missing the link") - - module.run_command( - [UPDATE_ALTERNATIVES, '--install', link, name, path, str(priority)], - check_rc=True - ) - changed = True - - # set the current selection to this path (if requested) - if state == AlternativeState.SELECTED: - module.run_command( - [UPDATE_ALTERNATIVES, '--set', name, path], - check_rc=True - ) - changed = True - - except subprocess.CalledProcessError as cpe: - module.fail_json(msg=str(dir(cpe))) - elif current_path == path and state == AlternativeState.PRESENT: - # Case where alternative is currently selected, but state is set - # to 'present'. In this case, we set to auto mode. - if module.check_mode: - module.exit_json(changed=True, current_path=current_path) - - changed = True - try: - module.run_command( - [UPDATE_ALTERNATIVES, '--auto', name], - check_rc=True, - ) - except subprocess.CalledProcessError as cpe: - module.fail_json(msg=str(dir(cpe))) - - module.exit_json(changed=changed) + AlternativesModule(module) if __name__ == '__main__': diff --git a/tests/integration/targets/alternatives/tasks/main.yml b/tests/integration/targets/alternatives/tasks/main.yml index 1120cfd37d..70853e8005 100644 --- a/tests/integration/targets/alternatives/tasks/main.yml +++ b/tests/integration/targets/alternatives/tasks/main.yml @@ -49,6 +49,9 @@ # Test that path is checked: alternatives must fail when path is nonexistent - import_tasks: path_is_checked.yml + # Test that subcommands commands work + - import_tasks: subcommands.yml + # Test operation of the 'state' parameter - block: - include_tasks: remove_links.yml diff --git a/tests/integration/targets/alternatives/tasks/subcommands.yml b/tests/integration/targets/alternatives/tasks/subcommands.yml new file mode 100644 index 0000000000..ba4ecbbafe --- /dev/null +++ b/tests/integration/targets/alternatives/tasks/subcommands.yml @@ -0,0 +1,78 @@ +- name: Try with subcommands + alternatives: + name: dummymain + path: '/usr/bin/dummy1' + link: '/usr/bin/dummymain' + subcommands: + - name: dummysubcmd + path: '/usr/bin/dummy2' + link: '/usr/bin/dummysubcmd' + register: alternative + +- name: Check expected command was executed + assert: + that: + - 'alternative is changed' + +- name: Execute the current dummymain command + command: dummymain + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy1" + +- name: Execute the current dummysubcmd command + command: dummysubcmd + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy2" + +- name: Subcommands are not removed if not specified + alternatives: + name: dummymain + path: '/usr/bin/dummy1' + link: '/usr/bin/dummymain' + register: alternative + +- name: Check expected command was executed + assert: + that: + - 'alternative is not changed' + +- name: Execute the current dummysubcmd command + command: dummysubcmd + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy2" + +- name: Subcommands are removed if set to an empty list + alternatives: + name: dummymain + path: '/usr/bin/dummy1' + link: '/usr/bin/dummymain' + subcommands: [] + register: alternative + +- name: Check expected command was executed + assert: + that: + - 'alternative is changed' + +- name: Execute the current dummysubcmd command + command: dummysubcmd + register: cmd + ignore_errors: True + +- name: Ensure that the subcommand is gone + assert: + that: + - cmd.rc == 2 + - '"No such file" in cmd.msg' \ No newline at end of file diff --git a/tests/integration/targets/alternatives/tasks/test.yml b/tests/integration/targets/alternatives/tasks/test.yml index 92721a995d..a5b36ce922 100644 --- a/tests/integration/targets/alternatives/tasks/test.yml +++ b/tests/integration/targets/alternatives/tasks/test.yml @@ -48,6 +48,4 @@ when: ansible_os_family == 'RedHat' and not with_alternatives and item == 1 - name: check that alternative has been updated - command: "grep -Pzq '/bin/dummy{{ item }}\\n' '{{ alternatives_dir }}/dummy'" - # priority doesn't seem updated - #command: "grep -Pzq '/bin/dummy{{ item }}\\n50' '{{ alternatives_dir }}/dummy'" + command: "grep -Pzq '/bin/dummy{{ item }}\\n50' '{{ alternatives_dir }}/dummy'" diff --git a/tests/integration/targets/alternatives/tasks/tests_set_priority.yml b/tests/integration/targets/alternatives/tasks/tests_set_priority.yml index ab79f62a3c..a629e3f368 100644 --- a/tests/integration/targets/alternatives/tasks/tests_set_priority.yml +++ b/tests/integration/targets/alternatives/tasks/tests_set_priority.yml @@ -21,3 +21,14 @@ - name: check that alternative has been updated command: "grep -Pzq '/bin/dummy{{ item }}\\n{{ 60 + item|int }}' '{{ alternatives_dir }}/dummy'" + +- name: update dummy priority + alternatives: + name: dummy + path: '/usr/bin/dummy{{ item }}' + link: /usr/bin/dummy + priority: '{{ 70 + item|int }}' + register: alternative + +- name: check that alternative priority has been updated + command: "grep -Pzq '/bin/dummy{{ item }}\\n{{ 70 + item|int }}' '{{ alternatives_dir }}/dummy'" \ No newline at end of file diff --git a/tests/integration/targets/alternatives/tasks/tests_state.yml b/tests/integration/targets/alternatives/tasks/tests_state.yml index 357da315ed..dd3be565ba 100644 --- a/tests/integration/targets/alternatives/tasks/tests_state.yml +++ b/tests/integration/targets/alternatives/tasks/tests_state.yml @@ -49,6 +49,28 @@ - cmd.stdout == "dummy4" # Set the currently selected alternative to state = 'present' (was previously +# selected), and ensure that this results in the group not being set to 'auto' +# mode, and the alternative is still selected. +- name: Set current selected dummy to state = present + alternatives: + name: dummy + path: /usr/bin/dummy4 + link: /usr/bin/dummy + state: present + +- name: Ensure that the link group is in auto mode + shell: 'head -n1 {{ alternatives_dir }}/dummy | grep "^manual$"' + +- name: Execute the current dummy command + shell: dummy + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy4" + +# Set the currently selected alternative to state = 'auto' (was previously # selected), and ensure that this results in the group being set to 'auto' # mode, and the highest priority alternative is selected. - name: Set current selected dummy to state = present @@ -56,7 +78,7 @@ name: dummy path: /usr/bin/dummy4 link: /usr/bin/dummy - state: present + state: auto - name: Ensure that the link group is in auto mode shell: 'head -n1 {{ alternatives_dir }}/dummy | grep "^auto$"' @@ -69,3 +91,25 @@ assert: that: - cmd.stdout == "dummy2" + +# Remove an alternative with state = 'absent' and make sure that +# this change results in the alternative being removed. +- name: Remove best dummy alternative with state = absent + alternatives: + name: dummy + path: /usr/bin/dummy2 + state: absent + +- name: Ensure that the link group is in auto mode + shell: 'grep "/usr/bin/dummy2" {{ alternatives_dir }}/dummy' + register: cmd + failed_when: cmd.rc == 0 + +- name: Execute the current dummy command + shell: dummy + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy1" From 8ba3d9474055450fce493f1b707ae707df144dbd Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 6 Jun 2022 20:38:46 +1200 Subject: [PATCH 0068/2104] xfconf module utils: providing a cmd_runner object (#4776) * xfconf: changed implementation to use cmd_runner * added module_utils/xfconf.py * xfconf_info: using cmd_runner * added module_utils to BOTMETA.yml * added changelog fragment * use cmd_runner_fmt instead of deprecated form --- .github/BOTMETA.yml | 3 + .../fragments/4776-xfconf-cmd-runner.yaml | 4 ++ plugins/module_utils/xfconf.py | 37 ++++++++++++ plugins/modules/system/xfconf.py | 57 +++++-------------- plugins/modules/system/xfconf_info.py | 28 ++++----- 5 files changed, 68 insertions(+), 61 deletions(-) create mode 100644 changelogs/fragments/4776-xfconf-cmd-runner.yaml create mode 100644 plugins/module_utils/xfconf.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 4b21be9c4c..685a1d0f53 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -307,6 +307,9 @@ files: $module_utils/xenserver.py: maintainers: bvitnik labels: xenserver + $module_utils/xfconf.py: + maintainers: russoz + labels: xfconf $modules/cloud/alicloud/: maintainers: xiaozhu36 $modules/cloud/atomic/atomic_container.py: diff --git a/changelogs/fragments/4776-xfconf-cmd-runner.yaml b/changelogs/fragments/4776-xfconf-cmd-runner.yaml new file mode 100644 index 0000000000..a45cf51c31 --- /dev/null +++ b/changelogs/fragments/4776-xfconf-cmd-runner.yaml @@ -0,0 +1,4 @@ +minor_changes: + - xfconf module utils - created new module util ``xfconf`` providing a ``cmd_runner`` specific for ``xfconf`` modules (https://github.com/ansible-collections/community.general/pull/4776). + - xfconf - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). + - xfconf_info - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). diff --git a/plugins/module_utils/xfconf.py b/plugins/module_utils/xfconf.py new file mode 100644 index 0000000000..4028da3bef --- /dev/null +++ b/plugins/module_utils/xfconf.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# (c) 2022, Alexei Znamensky +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +from ansible.module_utils.parsing.convert_bool import boolean +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt + + +@fmt.unpack_args +def _values_fmt(values, value_types): + result = [] + for value, value_type in zip(values, value_types): + if value_type == 'bool': + value = boolean(value) + result.extend(['--type', '{0}'.format(value_type), '--set', '{0}'.format(value)]) + return result + + +def xfconf_runner(module, **kwargs): + runner = CmdRunner( + module, + command='xfconf-query', + arg_formats=dict( + channel=fmt.as_opt_val("--channel"), + property=fmt.as_opt_val("--property"), + force_array=fmt.as_bool("--force-array"), + reset=fmt.as_bool("--reset"), + create=fmt.as_bool("--create"), + list_arg=fmt.as_bool("--list"), + values_and_types=fmt.as_func(_values_fmt), + ), + **kwargs + ) + return runner diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index d5ec16df22..c2811e3ccb 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -145,31 +145,15 @@ RETURN = ''' sample: '"96" or ["red", "blue", "green"]' ''' -from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdStateModuleHelper, ArgFormat -) - - -def fix_bool(value): - vl = value.lower() - return vl if vl in ("true", "false") else value - - -@ArgFormat.stars_deco(1) -def values_fmt(values, value_types): - result = [] - for value, value_type in zip(values, value_types): - if value_type == 'bool': - value = fix_bool(value) - result.extend(['--type', '{0}'.format(value_type), '--set', '{0}'.format(value)]) - return result +from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper +from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner class XFConfException(Exception): pass -class XFConfProperty(CmdStateModuleHelper): +class XFConfProperty(StateModuleHelper): change_params = 'value', diff_params = 'value', output_params = ('property', 'channel', 'value') @@ -195,27 +179,19 @@ class XFConfProperty(CmdStateModuleHelper): ) default_state = 'present' - command = 'xfconf-query' - command_args_formats = dict( - channel=dict(fmt=('--channel', '{0}'),), - property=dict(fmt=('--property', '{0}'),), - is_array=dict(fmt="--force-array", style=ArgFormat.BOOLEAN), - reset=dict(fmt="--reset", style=ArgFormat.BOOLEAN), - create=dict(fmt="--create", style=ArgFormat.BOOLEAN), - values_and_types=dict(fmt=values_fmt) - ) def update_xfconf_output(self, **kwargs): self.update_vars(meta={"output": True, "fact": True}, **kwargs) def __init_module__(self): - self.does_not = 'Property "{0}" does not exist on channel "{1}".'.format(self.module.params['property'], - self.module.params['channel']) + self.runner = xfconf_runner(self.module) + self.does_not = 'Property "{0}" does not exist on channel "{1}".'.format(self.vars.property, + self.vars.channel) self.vars.set('previous_value', self._get(), fact=True) self.vars.set('type', self.vars.value_type, fact=True) self.vars.meta('value').set(initial_value=self.vars.previous_value) - if self.module.params['disable_facts'] is False: + if self.vars.disable_facts is False: self.do_raise('Returning results as facts has been removed. Stop using disable_facts=false.') def process_command_output(self, rc, out, err): @@ -233,11 +209,12 @@ class XFConfProperty(CmdStateModuleHelper): return result def _get(self): - return self.run_command(params=('channel', 'property')) + with self.runner.context('channel property', output_process=self.process_command_output) as ctx: + return ctx.run() def state_absent(self): - if not self.module.check_mode: - self.run_command(params=('channel', 'property', {'reset': True})) + with self.runner.context('channel property reset', check_mode_skip=True) as ctx: + ctx.run(reset=True) self.vars.value = None def state_present(self): @@ -256,22 +233,14 @@ class XFConfProperty(CmdStateModuleHelper): # or complain if lists' lengths are different raise XFConfException('Number of elements in "value" and "value_type" must be the same') - # fix boolean values - self.vars.value = [fix_bool(v[0]) if v[1] == 'bool' else v[0] for v in zip(self.vars.value, value_type)] - # calculates if it is an array self.vars.is_array = \ bool(self.vars.force_array) or \ isinstance(self.vars.previous_value, list) or \ values_len > 1 - params = ['channel', 'property', {'create': True}] - if self.vars.is_array: - params.append('is_array') - params.append({'values_and_types': (self.vars.value, value_type)}) - - if not self.module.check_mode: - self.run_command(params=params) + with self.runner.context('channel property create force_array values_and_types', check_mode_skip=True) as ctx: + ctx.run(create=True, force_array=self.vars.is_array, values_and_types=(self.vars.value, value_type)) if not self.vars.is_array: self.vars.value = self.vars.value[0] diff --git a/plugins/modules/system/xfconf_info.py b/plugins/modules/system/xfconf_info.py index 766267dd3d..ac9b2033e9 100644 --- a/plugins/modules/system/xfconf_info.py +++ b/plugins/modules/system/xfconf_info.py @@ -74,7 +74,7 @@ RETURN = ''' properties: description: - List of available properties for a specific channel. - - Returned by passed only the I(channel) parameter to the module. + - Returned by passing only the I(channel) parameter to the module. returned: success type: list elements: str @@ -116,14 +116,15 @@ RETURN = ''' - Tmp ''' -from ansible_collections.community.general.plugins.module_utils.module_helper import CmdModuleHelper, ArgFormat +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper +from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner class XFConfException(Exception): pass -class XFConfInfo(CmdModuleHelper): +class XFConfInfo(ModuleHelper): module = dict( argument_spec=dict( channel=dict(type='str'), @@ -135,16 +136,9 @@ class XFConfInfo(CmdModuleHelper): supports_check_mode=True, ) - command = 'xfconf-query' - command_args_formats = dict( - channel=dict(fmt=['--channel', '{0}']), - property=dict(fmt=['--property', '{0}']), - _list_arg=dict(fmt="--list", style=ArgFormat.BOOLEAN), - ) - check_rc = True - def __init_module__(self): - self.vars.set("_list_arg", False, output=False) + self.runner = xfconf_runner(self.module, check_rc=True) + self.vars.set("list_arg", False, output=False) self.vars.set("is_array", False) def process_command_output(self, rc, out, err): @@ -167,7 +161,7 @@ class XFConfInfo(CmdModuleHelper): return lines def __run__(self): - self.vars._list_arg = not (bool(self.vars.channel) and bool(self.vars.property)) + self.vars.list_arg = not (bool(self.vars.channel) and bool(self.vars.property)) output = 'value' proc = self.process_command_output if self.vars.channel is None: @@ -176,15 +170,15 @@ class XFConfInfo(CmdModuleHelper): elif self.vars.property is None: output = 'properties' proc = self._process_list_properties - result = self.run_command(params=('_list_arg', 'channel', 'property'), process_output=proc) - if not self.vars._list_arg and self.vars.is_array: + with self.runner.context('list_arg channel property', output_process=proc) as ctx: + result = ctx.run(**self.vars) + if not self.vars.list_arg and self.vars.is_array: output = "value_array" self.vars.set(output, result) def main(): - xfconf = XFConfInfo() - xfconf.run() + XFConfInfo.execute() if __name__ == '__main__': From e5e485390df1fe242dd6e394b13852e6e7b92c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20Emerich=20Junior?= Date: Mon, 6 Jun 2022 16:16:27 -0300 Subject: [PATCH 0069/2104] add support to create L2TP and PPTP VPN connection (#4746) * add support to create L2TP and PPTP VPN connection * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * apply changes pointed on tests and review - add changelog fragment - change example code to use jinja2 in place of shell command * removes trailing whitespace * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * removes linux command from examples * remove unnecessary brakets Co-authored-by: Felix Fontein * remove unnecessary brakets Co-authored-by: Felix Fontein * simplify psk encoding on example Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * add unit tests - test unchenged l2tp and pptp vpn connections - test create l2tp and pptp vpn connections - fix is_connection_changed to remove default ifname attribuition * improve tests on vpn.data param - fix _compare_conn_params to handle vpn.data as lists * removes block and set_fact from example Co-authored-by: Felix Fontein * makes line shortter to better reading Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4746-add-vpn-support-nmcli.yaml | 2 + plugins/modules/net_tools/nmcli.py | 115 ++++++++++- .../plugins/modules/net_tools/test_nmcli.py | 191 ++++++++++++++++++ 3 files changed, 304 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/4746-add-vpn-support-nmcli.yaml diff --git a/changelogs/fragments/4746-add-vpn-support-nmcli.yaml b/changelogs/fragments/4746-add-vpn-support-nmcli.yaml new file mode 100644 index 0000000000..1ab7e8a20a --- /dev/null +++ b/changelogs/fragments/4746-add-vpn-support-nmcli.yaml @@ -0,0 +1,2 @@ +minor_changes: + - nmcli - adds ``vpn`` type and parameter for supporting VPN with service type L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). \ No newline at end of file diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index b09c7e7845..859f74b91d 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -45,8 +45,8 @@ options: - The interface to bind the connection to. - The connection will only be applicable to this interface name. - A special value of C('*') can be used for interface-independent connections. - - The ifname argument is mandatory for all connection types except bond, team, bridge and vlan. - - This parameter defaults to C(conn_name) when left unset. + - The ifname argument is mandatory for all connection types except bond, team, bridge, vlan and vpn. + - This parameter defaults to C(conn_name) when left unset for all connection types except vpn that removes it. type: str type: description: @@ -55,10 +55,11 @@ options: - Type C(generic) is added in Ansible 2.5. - Type C(infiniband) is added in community.general 2.0.0. - Type C(gsm) is added in community.general 3.7.0. - - Type C(wireguard) is added in community.general 4.3.0 + - Type C(wireguard) is added in community.general 4.3.0. + - Type C(vpn) is added in community.general 5.1.0. type: str choices: [ bond, bond-slave, bridge, bridge-slave, dummy, ethernet, generic, gre, infiniband, ipip, sit, team, team-slave, vlan, vxlan, wifi, gsm, - wireguard ] + wireguard, vpn ] mode: description: - This is the type of device or network connection that you wish to create for a bond or bridge. @@ -905,6 +906,58 @@ options: description: C(NMSettingSecretFlags) indicating how to handle the I(wireguard.private-key) property. type: int choices: [ 0, 1, 2 ] + vpn: + description: + - Configuration of a VPN connection (PPTP and L2TP). + - In order to use L2TP you need to be sure that C(network-manager-l2tp) - and C(network-manager-l2tp-gnome) + if host has UI - are installed on the host. + type: dict + version_added: 5.1.0 + suboptions: + permissions: + description: User that will have permission to use the connection. + type: str + required: true + service-type: + description: This defines the service type of connection. + type: str + required: true + choices: [ pptp, l2tp ] + gateway: + description: The gateway to connection. It can be an IP address (for example C(192.0.2.1)) + or a FQDN address (for example C(vpn.example.com)). + type: str + required: true + password-flags: + description: + - NMSettingSecretFlags indicating how to handle the I(password) property. + - 'Following choices are allowed: + C(0) B(NONE): The system is responsible for providing and storing this secret (default); + C(1) B(AGENT_OWNED): A user secret agent is responsible for providing and storing this secret; when it is required agents will be + asked to retrieve it; + C(2) B(NOT_SAVED): This secret should not be saved, but should be requested from the user each time it is needed; + C(4) B(NOT_REQUIRED): In situations where it cannot be automatically determined that the secret is required + (some VPNs and PPP providers do not require all secrets) this flag indicates that the specific secret is not required.' + type: int + choices: [ 0, 1, 2 , 4 ] + default: 0 + user: + description: Username provided by VPN administrator. + type: str + required: true + ipsec-enabled: + description: + - Enable or disable IPSec tunnel to L2TP host. + - This option is need when C(service-type) is C(l2tp). + type: bool + choices: [ yes, no ] + ipsec-psk: + description: + - The pre-shared key in base64 encoding. + - > + You can encode using this Ansible jinja2 expression: C("0s{{ '[YOUR PRE-SHARED KEY]' | ansible.builtin.b64encode }}"). + - This is only used when I(ipsec-enabled=true). + type: str ''' EXAMPLES = r''' @@ -1288,6 +1341,23 @@ EXAMPLES = r''' autoconnect: true state: present +- name: >- + Create a VPN L2TP connection for ansible_user to connect on vpn.example.com + authenticating with user 'brittany' and pre-shared key as 'Brittany123' + community.general.nmcli: + type: vpn + conn_name: my-vpn-connection + vpn: + permissions: "{{ ansible_user }}" + service-type: l2tp + gateway: vpn.example.com + password-flags: 2 + user: brittany + ipsec-enabled: true + ipsec-psk: "0s{{ 'Brittany123' | ansible.builtin.b64encode }}" + autoconnect: false + state: present + ''' RETURN = r"""# @@ -1404,6 +1474,7 @@ class Nmcli(object): self.wifi_sec = module.params['wifi_sec'] self.gsm = module.params['gsm'] self.wireguard = module.params['wireguard'] + self.vpn = module.params['vpn'] if self.method4: self.ipv4_method = self.method4 @@ -1592,6 +1663,29 @@ class Nmcli(object): options.update({ 'wireguard.%s' % name: value, }) + elif self.type == 'vpn': + if self.vpn: + vpn_data_values = '' + for name, value in self.vpn.items(): + if name == 'service-type': + options.update({ + 'vpn-type': value, + }) + elif name == 'permissions': + options.update({ + 'connection.permissions': value, + }) + else: + if vpn_data_values != '': + vpn_data_values += ', ' + + if isinstance(value, bool): + value = self.bool_to_string(value) + + vpn_data_values += '%s=%s' % (name, value) + options.update({ + 'vpn.data': vpn_data_values, + }) # Convert settings values based on the situation. for setting, value in options.items(): setting_type = self.settings_type(setting) @@ -1832,6 +1926,10 @@ class Nmcli(object): 'connection.interface-name': ifname, } + # VPN doesn't need an interface but if sended it must be a valid interface. + if self.type == 'vpn' and self.ifname is None: + del options['connection.interface-name'] + options.update(self.connection_options()) # Constructing the command. @@ -1997,6 +2095,9 @@ class Nmcli(object): current_value = current_value.strip('"') if key == self.mtu_setting and self.mtu is None: self.mtu = 0 + if key == 'vpn.data': + current_value = list(map(str.strip, current_value.split(','))) + value = list(map(str.strip, value.split(','))) else: # parameter does not exist current_value = None @@ -2025,6 +2126,10 @@ class Nmcli(object): 'connection.interface-name': self.ifname, } + # VPN doesn't need an interface but if sended it must be a valid interface. + if self.type == 'vpn' and self.ifname is None: + del options['connection.interface-name'] + if not self.type: current_con_type = self.show_connection().get('connection.type') if current_con_type: @@ -2064,6 +2169,7 @@ def main(): 'wifi', 'gsm', 'wireguard', + 'vpn', ]), ip4=dict(type='list', elements='str'), gw4=dict(type='str'), @@ -2163,6 +2269,7 @@ def main(): wifi_sec=dict(type='dict', no_log=True), gsm=dict(type='dict'), wireguard=dict(type='dict'), + vpn=dict(type='dict'), ), mutually_exclusive=[['never_default4', 'gw4'], ['routes4_extended', 'routes4'], diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index 546cae20e8..39cb3e05e9 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -98,6 +98,12 @@ TESTCASE_CONNECTION = [ 'state': 'absent', '_ansible_check_mode': True, }, + { + 'type': 'vpn', + 'conn_name': 'non_existent_nw_device', + 'state': 'absent', + '_ansible_check_mode': True, + }, ] TESTCASE_GENERIC = [ @@ -1177,6 +1183,69 @@ wireguard.ip4-auto-default-route: -1 (default) wireguard.ip6-auto-default-route: -1 (default) """ +TESTCASE_VPN_L2TP = [ + { + 'type': 'vpn', + 'conn_name': 'vpn_l2tp', + 'vpn': { + 'permissions': 'brittany', + 'service-type': 'l2tp', + 'gateway': 'vpn.example.com', + 'password-flags': '2', + 'user': 'brittany', + 'ipsec-enabled': 'true', + 'ipsec-psk': 'QnJpdHRhbnkxMjM=', + }, + 'autoconnect': 'false', + 'state': 'present', + '_ansible_check_mode': False, + }, +] + +TESTCASE_VPN_L2TP_SHOW_OUTPUT = """\ +connection.id: vpn_l2tp +connection.type: vpn +connection.autoconnect: no +connection.permissions: brittany +ipv4.method: auto +ipv6.method: auto +vpn-type: l2tp +vpn.service-type: org.freedesktop.NetworkManager.l2tp +vpn.data: gateway=vpn.example.com, password-flags=2, user=brittany, ipsec-enabled=true, ipsec-psk=QnJpdHRhbnkxMjM= +vpn.secrets: ipsec-psk = QnJpdHRhbnkxMjM= +vpn.persistent: no +vpn.timeout: 0 +""" + +TESTCASE_VPN_PPTP = [ + { + 'type': 'vpn', + 'conn_name': 'vpn_pptp', + 'vpn': { + 'permissions': 'brittany', + 'service-type': 'pptp', + 'gateway': 'vpn.example.com', + 'password-flags': '2', + 'user': 'brittany', + }, + 'autoconnect': 'false', + 'state': 'present', + '_ansible_check_mode': False, + }, +] + +TESTCASE_VPN_PPTP_SHOW_OUTPUT = """\ +connection.id: vpn_pptp +connection.type: vpn +connection.autoconnect: no +connection.permissions: brittany +ipv4.method: auto +ipv6.method: auto +vpn-type: pptp +vpn.service-type: org.freedesktop.NetworkManager.pptp +vpn.data: password-flags=2, gateway=vpn.example.com, user=brittany +""" + def mocker_set(mocker, connection_exists=False, @@ -1547,6 +1616,20 @@ def mocked_wireguard_connection_unchanged(mocker): execute_return=(0, TESTCASE_WIREGUARD_SHOW_OUTPUT, "")) +@pytest.fixture +def mocked_vpn_l2tp_connection_unchanged(mocker): + mocker_set(mocker, + connection_exists=True, + execute_return=(0, TESTCASE_VPN_L2TP_SHOW_OUTPUT, "")) + + +@pytest.fixture +def mocked_vpn_pptp_connection_unchanged(mocker): + mocker_set(mocker, + connection_exists=True, + execute_return=(0, TESTCASE_VPN_PPTP_SHOW_OUTPUT, "")) + + @pytest.mark.parametrize('patch_ansible_module', TESTCASE_BOND, indirect=['patch_ansible_module']) def test_bond_connection_create(mocked_generic_connection_create, capfd): """ @@ -3456,3 +3539,111 @@ def test_wireguard_mod(mocked_generic_connection_modify, capfd): results = json.loads(out) assert not results.get('failed') assert results['changed'] + + +@pytest.mark.parametrize('patch_ansible_module', TESTCASE_VPN_L2TP, indirect=['patch_ansible_module']) +def test_vpn_l2tp_connection_unchanged(mocked_vpn_l2tp_connection_unchanged, capfd): + """ + Test : L2TP VPN connection unchanged + """ + with pytest.raises(SystemExit): + nmcli.main() + + out, err = capfd.readouterr() + results = json.loads(out) + assert not results.get('failed') + assert not results['changed'] + + +@pytest.mark.parametrize('patch_ansible_module', TESTCASE_VPN_PPTP, indirect=['patch_ansible_module']) +def test_vpn_pptp_connection_unchanged(mocked_vpn_pptp_connection_unchanged, capfd): + """ + Test : PPTP VPN connection unchanged + """ + with pytest.raises(SystemExit): + nmcli.main() + + out, err = capfd.readouterr() + results = json.loads(out) + assert not results.get('failed') + assert not results['changed'] + + +@pytest.mark.parametrize('patch_ansible_module', TESTCASE_VPN_L2TP, indirect=['patch_ansible_module']) +def test_create_vpn_l2tp(mocked_generic_connection_create, capfd): + """ + Test : Create L2TP VPN connection + """ + + with pytest.raises(SystemExit): + nmcli.main() + + assert nmcli.Nmcli.execute_command.call_count == 1 + arg_list = nmcli.Nmcli.execute_command.call_args_list + add_args, add_kw = arg_list[0] + + assert add_args[0][0] == '/usr/bin/nmcli' + assert add_args[0][1] == 'con' + assert add_args[0][2] == 'add' + assert add_args[0][3] == 'type' + assert add_args[0][4] == 'vpn' + assert add_args[0][5] == 'con-name' + assert add_args[0][6] == 'vpn_l2tp' + + add_args_text = list(map(to_text, add_args[0])) + + for param in ['connection.autoconnect', 'no', + 'connection.permissions', 'brittany', + 'vpn.data', 'vpn-type', 'l2tp', + ]: + assert param in add_args_text + + vpn_data_index = add_args_text.index('vpn.data') + 1 + args_vpn_data = add_args_text[vpn_data_index] + for vpn_data in ['gateway=vpn.example.com', 'password-flags=2', 'user=brittany', 'ipsec-enabled=true', 'ipsec-psk=QnJpdHRhbnkxMjM=']: + assert vpn_data in args_vpn_data + + out, err = capfd.readouterr() + results = json.loads(out) + assert not results.get('failed') + assert results['changed'] + + +@pytest.mark.parametrize('patch_ansible_module', TESTCASE_VPN_PPTP, indirect=['patch_ansible_module']) +def test_create_vpn_pptp(mocked_generic_connection_create, capfd): + """ + Test : Create PPTP VPN connection + """ + + with pytest.raises(SystemExit): + nmcli.main() + + assert nmcli.Nmcli.execute_command.call_count == 1 + arg_list = nmcli.Nmcli.execute_command.call_args_list + add_args, add_kw = arg_list[0] + + assert add_args[0][0] == '/usr/bin/nmcli' + assert add_args[0][1] == 'con' + assert add_args[0][2] == 'add' + assert add_args[0][3] == 'type' + assert add_args[0][4] == 'vpn' + assert add_args[0][5] == 'con-name' + assert add_args[0][6] == 'vpn_pptp' + + add_args_text = list(map(to_text, add_args[0])) + + for param in ['connection.autoconnect', 'no', + 'connection.permissions', 'brittany', + 'vpn.data', 'vpn-type', 'pptp', + ]: + assert param in add_args_text + + vpn_data_index = add_args_text.index('vpn.data') + 1 + args_vpn_data = add_args_text[vpn_data_index] + for vpn_data in ['password-flags=2', 'gateway=vpn.example.com', 'user=brittany']: + assert vpn_data in args_vpn_data + + out, err = capfd.readouterr() + results = json.loads(out) + assert not results.get('failed') + assert results['changed'] From c204f7af3222c5fc22e425f8191fa3d7f12068ad Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 7 Jun 2022 12:43:47 +0200 Subject: [PATCH 0070/2104] Next expected release is 5.2.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 66b2fc746a..caee2e126f 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: community name: general -version: 5.1.0 +version: 5.2.0 readme: README.md authors: - Ansible (https://github.com/ansible) From dd24c98fe53e902165aeffd86e94b6c97364dcc9 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 8 Jun 2022 12:48:55 +0200 Subject: [PATCH 0071/2104] CI: Disable repo URL test for OpenSuSE 15.4 (#4805) * Disable repo URL test for OpenSuSE 15.4. * Forgot some places. --- .../tasks/zypper_repository.yml | 77 ++++++++++--------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml b/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml index dbd9bb0064..3a892cd72d 100644 --- a/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml +++ b/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml @@ -207,50 +207,53 @@ that: - remove_repo is changed -- name: add new repository via url to .repo file - community.general.zypper_repository: - repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_distribution_version }}/systemsmanagement:Uyuni:Stable.repo - state: present - register: added_by_repo_file +# For now, the URL does not work for 15.4 +- when: ansible_distribution_version is version('15.4', '<') + block: + - name: add new repository via url to .repo file + community.general.zypper_repository: + repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_distribution_version }}/systemsmanagement:Uyuni:Stable.repo + state: present + register: added_by_repo_file -- name: get repository details from zypper - command: zypper lr systemsmanagement_Uyuni_Stable - register: get_repository_details_from_zypper + - name: get repository details from zypper + command: zypper lr systemsmanagement_Uyuni_Stable + register: get_repository_details_from_zypper -- name: verify adding via .repo file was successful - assert: - that: - - "added_by_repo_file is changed" - - "get_repository_details_from_zypper.rc == 0" - - "'/systemsmanagement:/Uyuni:/Stable/' in get_repository_details_from_zypper.stdout" + - name: verify adding via .repo file was successful + assert: + that: + - "added_by_repo_file is changed" + - "get_repository_details_from_zypper.rc == 0" + - "'/systemsmanagement:/Uyuni:/Stable/' in get_repository_details_from_zypper.stdout" -- name: add same repository via url to .repo file again to verify idempotency - community.general.zypper_repository: - repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_distribution_version }}/systemsmanagement:Uyuni:Stable.repo - state: present - register: added_again_by_repo_file + - name: add same repository via url to .repo file again to verify idempotency + community.general.zypper_repository: + repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_distribution_version }}/systemsmanagement:Uyuni:Stable.repo + state: present + register: added_again_by_repo_file -- name: verify nothing was changed adding a repo with the same .repo file - assert: - that: - - added_again_by_repo_file is not changed + - name: verify nothing was changed adding a repo with the same .repo file + assert: + that: + - added_again_by_repo_file is not changed -- name: remove repository via url to .repo file - community.general.zypper_repository: - repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_distribution_version }}/systemsmanagement:Uyuni:Stable.repo - state: absent - register: removed_by_repo_file + - name: remove repository via url to .repo file + community.general.zypper_repository: + repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_distribution_version }}/systemsmanagement:Uyuni:Stable.repo + state: absent + register: removed_by_repo_file -- name: get list of files in /etc/zypp/repos.d/ - command: ls /etc/zypp/repos.d/ - changed_when: false - register: etc_zypp_reposd + - name: get list of files in /etc/zypp/repos.d/ + command: ls /etc/zypp/repos.d/ + changed_when: false + register: etc_zypp_reposd -- name: verify removal via .repo file was successful, including cleanup of local .repo file in /etc/zypp/repos.d/ - assert: - that: - - "removed_by_repo_file" - - "'/systemsmanagement:/Uyuni:/Stable/' not in etc_zypp_reposd.stdout" + - name: verify removal via .repo file was successful, including cleanup of local .repo file in /etc/zypp/repos.d/ + assert: + that: + - "removed_by_repo_file" + - "'/systemsmanagement:/Uyuni:/Stable/' not in etc_zypp_reposd.stdout" - name: Copy test .repo file copy: From 71745b802478668a42d9e5fe02dc98512ae6bb2f Mon Sep 17 00:00:00 2001 From: Jeffrey van Pelt Date: Sat, 11 Jun 2022 13:46:17 +0200 Subject: [PATCH 0072/2104] Added conditional to only collect qmpstatus on qemu VMs (#4816) * Added conditional to only collect qmpstatus on qemu VMs * Processed feedback, added changelog * Initial change to unit tests * Made Sanity tests happy again * Missed a function call, removed superfluous function * Derp, no need to mock get_vm_status anymore * Added detail checks whether hosts are mapped to the paused/prelaunch groups * Fix sanity check * Processed feedback * Processed feedback - noqa --- .../4816-proxmox-fix-extended-status.yaml | 2 + plugins/inventory/proxmox.py | 3 +- tests/unit/plugins/inventory/test_proxmox.py | 107 +++++++++++++++++- 3 files changed, 105 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/4816-proxmox-fix-extended-status.yaml diff --git a/changelogs/fragments/4816-proxmox-fix-extended-status.yaml b/changelogs/fragments/4816-proxmox-fix-extended-status.yaml new file mode 100644 index 0000000000..496de40ab0 --- /dev/null +++ b/changelogs/fragments/4816-proxmox-fix-extended-status.yaml @@ -0,0 +1,2 @@ +bugfixes: + - proxmox inventory plugin - fixed extended status detection for qemu (https://github.com/ansible-collections/community.general/pull/4816). diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index 1664e6ba03..1669b23325 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -443,7 +443,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): def _get_vm_status(self, properties, node, vmid, vmtype, name): ret = self._get_json("%s/api2/json/nodes/%s/%s/%s/status/current" % (self.proxmox_url, node, vmtype, vmid)) properties[self._fact('status')] = ret['status'] - properties[self._fact('qmpstatus')] = ret['qmpstatus'] + if vmtype == 'qemu': + properties[self._fact('qmpstatus')] = ret['qmpstatus'] def _get_vm_snapshots(self, properties, node, vmid, vmtype, name): ret = self._get_json("%s/api2/json/nodes/%s/%s/%s/snapshot" % (self.proxmox_url, node, vmtype, vmid)) diff --git a/tests/unit/plugins/inventory/test_proxmox.py b/tests/unit/plugins/inventory/test_proxmox.py index 91411d1d55..bf553024ab 100644 --- a/tests/unit/plugins/inventory/test_proxmox.py +++ b/tests/unit/plugins/inventory/test_proxmox.py @@ -520,6 +520,99 @@ def get_json(url): } ] } + elif url == "https://localhost:8006/api2/json/nodes/testnode/lxc/100/status/current": + # _get_vm_status (lxc) + return { + "swap": 0, + "name": "test-lxc", + "diskread": 0, + "vmid": 100, + "diskwrite": 0, + "pid": 9000, + "mem": 89980928, + "netin": 1950776396424, + "disk": 4998168576, + "cpu": 0.00163430613110039, + "type": "lxc", + "uptime": 6793736, + "maxmem": 1073741824, + "status": "running", + "cpus": "1", + "ha": { + "group": 'null', + "state": "started", + "managed": 1 + }, + "maxdisk": 3348329267200, + "netout": 1947793356037, + "maxswap": 1073741824 + } + elif url == "https://localhost:8006/api2/json/nodes/testnode/qemu/101/status/current": + # _get_vm_status (qemu) + return { + "status": "stopped", + "uptime": 0, + "maxmem": 5364514816, + "maxdisk": 34359738368, + "netout": 0, + "cpus": 2, + "ha": { + "managed": 0 + }, + "diskread": 0, + "vmid": 101, + "diskwrite": 0, + "name": "test-qemu", + "cpu": 0, + "disk": 0, + "netin": 0, + "mem": 0, + "qmpstatus": "stopped" + } + elif url == "https://localhost:8006/api2/json/nodes/testnode/qemu/102/status/current": + # _get_vm_status (qemu) + return { + "status": "stopped", + "uptime": 0, + "maxmem": 5364514816, + "maxdisk": 34359738368, + "netout": 0, + "cpus": 2, + "ha": { + "managed": 0 + }, + "diskread": 0, + "vmid": 102, + "diskwrite": 0, + "name": "test-qemu-windows", + "cpu": 0, + "disk": 0, + "netin": 0, + "mem": 0, + "qmpstatus": "prelaunch" + } + elif url == "https://localhost:8006/api2/json/nodes/testnode/qemu/103/status/current": + # _get_vm_status (qemu) + return { + "status": "stopped", + "uptime": 0, + "maxmem": 5364514816, + "maxdisk": 34359738368, + "netout": 0, + "cpus": 2, + "ha": { + "managed": 0 + }, + "diskread": 0, + "vmid": 103, + "diskwrite": 0, + "name": "test-qemu-multi-nic", + "cpu": 0, + "disk": 0, + "netin": 0, + "mem": 0, + "qmpstatus": "paused" + } def get_vm_snapshots(node, properties, vmtype, vmid, name): @@ -537,10 +630,6 @@ def get_vm_snapshots(node, properties, vmtype, vmid, name): }] -def get_vm_status(properties, node, vmtype, vmid, name): - return True - - def get_option(opts): def fn(option): default = opts.get('default', False) @@ -568,7 +657,6 @@ def test_populate(inventory, mocker): # bypass authentication and API fetch calls inventory._get_auth = mocker.MagicMock(side_effect=get_auth) inventory._get_json = mocker.MagicMock(side_effect=get_json) - inventory._get_vm_status = mocker.MagicMock(side_effect=get_vm_status) inventory._get_vm_snapshots = mocker.MagicMock(side_effect=get_vm_snapshots) inventory.get_option = mocker.MagicMock(side_effect=get_option(opts)) inventory._can_add_host = mocker.MagicMock(return_value=True) @@ -617,6 +705,14 @@ def test_populate(inventory, mocker): for group in ['paused', 'prelaunch']: assert ('%sall_%s' % (inventory.group_prefix, group)) in inventory.inventory.groups + # check if qemu-windows is in the prelaunch group + group_prelaunch = inventory.inventory.groups['proxmox_all_prelaunch'] + assert group_prelaunch.hosts == [host_qemu_windows] + + # check if qemu-multi-nic is in the paused group + group_paused = inventory.inventory.groups['proxmox_all_paused'] + assert group_paused.hosts == [host_qemu_multi_nic] + def test_populate_missing_qemu_extended_groups(inventory, mocker): # module settings @@ -638,7 +734,6 @@ def test_populate_missing_qemu_extended_groups(inventory, mocker): # bypass authentication and API fetch calls inventory._get_auth = mocker.MagicMock(side_effect=get_auth) inventory._get_json = mocker.MagicMock(side_effect=get_json) - inventory._get_vm_status = mocker.MagicMock(side_effect=get_vm_status) inventory._get_vm_snapshots = mocker.MagicMock(side_effect=get_vm_snapshots) inventory.get_option = mocker.MagicMock(side_effect=get_option(opts)) inventory._can_add_host = mocker.MagicMock(return_value=True) From c8a2c5d375d320eb5bc461d408893553ece0602b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 11 Jun 2022 22:35:11 +0200 Subject: [PATCH 0073/2104] requests drops support for older Python (#4818) * requests drops support for older Python. * Work around CentOS 6 pip bugs. --- tests/utils/constraints.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index 1c04d8152f..395e0096e4 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -23,6 +23,7 @@ pytest-forked < 1.0.2 ; python_version < '2.7' # pytest-forked 1.0.2 and later r pytest-forked >= 1.0.2 ; python_version >= '2.7' # pytest-forked before 1.0.2 does not work with pytest 4.2.0+ (which requires python 2.7+) ntlm-auth >= 1.3.0 # message encryption support using cryptography requests < 2.20.0 ; python_version < '2.7' # requests 2.20.0 drops support for python 2.6 +requests < 2.28 ; python_version >= '2.7' and python_version < '3.7' # requests 2.28.0 drops support for python 3.6 and before requests-ntlm >= 1.1.0 # message encryption support requests-credssp >= 0.1.0 # message encryption support voluptuous >= 0.11.0 # Schema recursion via Self From 42c5024b0b3afb36dd3f0529339a9bcb5d6895f3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 12 Jun 2022 07:58:23 +0200 Subject: [PATCH 0074/2104] Bump AZP container version. (#4819) --- .azure-pipelines/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 289108c04d..55bd2c388a 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -48,7 +48,7 @@ variables: resources: containers: - container: default - image: quay.io/ansible/azure-pipelines-test-container:1.9.0 + image: quay.io/ansible/azure-pipelines-test-container:3.0.0 pool: Standard From 2d1e58663c510e1cb4c90744102a657afed0bbc4 Mon Sep 17 00:00:00 2001 From: Jon Ellis Date: Sun, 12 Jun 2022 07:17:56 +0100 Subject: [PATCH 0075/2104] Ensure managed sudoers config files have 0440 permissions (#4814) * Ensure sudoers config files are created with 0440 permissions to appease visudo validation * Remove change not required by the bugfix * Add changelog fragment for 4814 sudoers file permissions * Update changelogs/fragments/4814-sudoers-file-permissions.yml Co-authored-by: Felix Fontein * Have less oct casting Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4814-sudoers-file-permissions.yml | 2 ++ plugins/modules/system/sudoers.py | 11 ++++++++++- tests/integration/targets/sudoers/tasks/main.yml | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4814-sudoers-file-permissions.yml diff --git a/changelogs/fragments/4814-sudoers-file-permissions.yml b/changelogs/fragments/4814-sudoers-file-permissions.yml new file mode 100644 index 0000000000..be24e12e6e --- /dev/null +++ b/changelogs/fragments/4814-sudoers-file-permissions.yml @@ -0,0 +1,2 @@ +bugfixes: + - sudoers - ensure sudoers config files are created with the permissions requested by sudoers (0440) (https://github.com/ansible-collections/community.general/pull/4814). diff --git a/plugins/modules/system/sudoers.py b/plugins/modules/system/sudoers.py index 86d8306c26..8b8ad50405 100644 --- a/plugins/modules/system/sudoers.py +++ b/plugins/modules/system/sudoers.py @@ -115,6 +115,8 @@ from ansible.module_utils.common.text.converters import to_native class Sudoers(object): + FILE_MODE = 0o440 + def __init__(self, module): self.check_mode = module.check_mode self.name = module.params['name'] @@ -134,6 +136,8 @@ class Sudoers(object): with open(self.file, 'w') as f: f.write(self.content()) + os.chmod(self.file, self.FILE_MODE) + def delete(self): if self.check_mode: return @@ -145,7 +149,12 @@ class Sudoers(object): def matches(self): with open(self.file, 'r') as f: - return f.read() == self.content() + content_matches = f.read() == self.content() + + current_mode = os.stat(self.file).st_mode & 0o777 + mode_matches = current_mode == self.FILE_MODE + + return content_matches and mode_matches def content(self): if self.user: diff --git a/tests/integration/targets/sudoers/tasks/main.yml b/tests/integration/targets/sudoers/tasks/main.yml index 9a632c4de4..634eded779 100644 --- a/tests/integration/targets/sudoers/tasks/main.yml +++ b/tests/integration/targets/sudoers/tasks/main.yml @@ -29,6 +29,11 @@ commands: /usr/local/bin/command register: rule_1 +- name: Stat my-sudo-rule-1 file + ansible.builtin.stat: + path: "{{ sudoers_path }}/my-sudo-rule-1" + register: rule_1_stat + - name: Grab contents of my-sudo-rule-1 ansible.builtin.slurp: src: "{{ sudoers_path }}/my-sudo-rule-1" @@ -132,6 +137,13 @@ # Run assertions +- name: Check rule 1 file stat + ansible.builtin.assert: + that: + - rule_1_stat.stat.exists + - rule_1_stat.stat.isreg + - rule_1_stat.stat.mode == '0440' + - name: Check changed status ansible.builtin.assert: that: From e51221896be58c5023efc0e04db28fdb2ab5c90c Mon Sep 17 00:00:00 2001 From: Wouter Schoot Date: Mon, 13 Jun 2022 11:55:27 +0200 Subject: [PATCH 0076/2104] proxmox_kvm: fix typos (#4798) * Typofix * Update plugins/modules/cloud/misc/proxmox_kvm.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/modules/cloud/misc/proxmox_kvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 2354cb916f..c6e47f36e4 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -83,7 +83,7 @@ options: version_added: 1.3.0 clone: description: - - Name of VM to be cloned. If C(vmid) is setted, C(clone) can take arbitrary value but required for initiating the clone. + - Name of VM to be cloned. If I(vmid) is set, I(clone) can take an arbitrary value but is required for initiating the clone. type: str cores: description: From 72faebffc6066211a47fdac2bf942e03bd6bed58 Mon Sep 17 00:00:00 2001 From: geichelberger <35195803+geichelberger@users.noreply.github.com> Date: Mon, 13 Jun 2022 11:56:10 +0200 Subject: [PATCH 0077/2104] nmcli: do not convert undefined lists to empty strings (#4813) * do not convert undefined lists to empty strings * add changelog fragment (#4813) --- .../4813-fix-nmcli-convert-list.yaml | 2 ++ plugins/modules/net_tools/nmcli.py | 5 ++- .../plugins/modules/net_tools/test_nmcli.py | 35 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4813-fix-nmcli-convert-list.yaml diff --git a/changelogs/fragments/4813-fix-nmcli-convert-list.yaml b/changelogs/fragments/4813-fix-nmcli-convert-list.yaml new file mode 100644 index 0000000000..5035a9e584 --- /dev/null +++ b/changelogs/fragments/4813-fix-nmcli-convert-list.yaml @@ -0,0 +1,2 @@ +bugfixes: + - nmcli - fix error caused by adding undefined module arguments for list options (https://github.com/ansible-collections/community.general/issues/4373, https://github.com/ansible-collections/community.general/pull/4813). diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 859f74b91d..bb4a5016ff 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -1836,7 +1836,10 @@ class Nmcli(object): @staticmethod def list_to_string(lst): - return ",".join(lst or [""]) + if lst is None: + return None + else: + return ",".join(lst) @staticmethod def settings_type(setting): diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index 39cb3e05e9..487465d863 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -455,6 +455,17 @@ ipv6.ignore-auto-dns: no ipv6.ignore-auto-routes: no """ +TESTCASE_GENERIC_ZONE_ONLY = [ + { + 'type': 'generic', + 'conn_name': 'non_existent_nw_device', + 'ifname': 'generic_non_existant', + 'state': 'present', + 'zone': 'public', + '_ansible_check_mode': False, + } +] + TESTCASE_BOND = [ { 'type': 'bond', @@ -1888,6 +1899,30 @@ def test_generic_connection_zone_unchanged(mocked_generic_connection_zone_unchan assert not results['changed'] +@pytest.mark.parametrize('patch_ansible_module', TESTCASE_GENERIC_ZONE_ONLY, indirect=['patch_ansible_module']) +def test_generic_connection_modify_zone_only(mocked_generic_connection_modify, capfd): + """ + Test : Generic connection modified with zone only + """ + with pytest.raises(SystemExit): + nmcli.main() + + assert nmcli.Nmcli.execute_command.call_count == 1 + arg_list = nmcli.Nmcli.execute_command.call_args_list + args, kwargs = arg_list[0] + + assert 'connection.zone' in args[0] + assert 'ipv4.addresses' not in args[0] + assert 'ipv4.gateway' not in args[0] + assert 'ipv6.addresses' not in args[0] + assert 'ipv6.gateway' not in args[0] + + out, err = capfd.readouterr() + results = json.loads(out) + assert not results.get('failed') + assert results['changed'] + + @pytest.mark.parametrize('patch_ansible_module', TESTCASE_CONNECTION, indirect=['patch_ansible_module']) def test_zone_none(mocked_connection_exists, capfd): """ From 57e83ac80b727c472d0c3911d9189ae667feb110 Mon Sep 17 00:00:00 2001 From: Marius Rieder Date: Mon, 13 Jun 2022 21:40:02 +0200 Subject: [PATCH 0078/2104] alternatives: Fix bug with priority default (#4810) * alternatives: Fix bug with priority default If neigther the priority nor the subcommands where specified the module decided to update the priority with the default value anyway. This resulted in bug #4803 and #4804 * Add changelog fragment. * Distinguish None from 0. * Address review comments. * Update plugins/modules/system/alternatives.py Co-authored-by: Pilou * Remove unrelated issues from changelog. Co-authored-by: Felix Fontein Co-authored-by: Pilou --- changelogs/fragments/4810-alternatives-bug.yml | 2 ++ plugins/modules/system/alternatives.py | 12 +++++++----- .../targets/alternatives/tasks/test.yml | 2 +- .../alternatives/tasks/tests_set_priority.yml | 17 ++++++++++++++++- 4 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/4810-alternatives-bug.yml diff --git a/changelogs/fragments/4810-alternatives-bug.yml b/changelogs/fragments/4810-alternatives-bug.yml new file mode 100644 index 0000000000..d4c1ea2742 --- /dev/null +++ b/changelogs/fragments/4810-alternatives-bug.yml @@ -0,0 +1,2 @@ +bugfixes: + - "alternatives - do not set the priority if the priority was not set by the user (https://github.com/ansible-collections/community.general/pull/4810)." diff --git a/plugins/modules/system/alternatives.py b/plugins/modules/system/alternatives.py index 1fbc5ccddc..56ae57fe8b 100644 --- a/plugins/modules/system/alternatives.py +++ b/plugins/modules/system/alternatives.py @@ -40,9 +40,8 @@ options: type: path priority: description: - - The priority of the alternative. + - The priority of the alternative. If no priority is given for creation C(50) is used as a fallback. type: int - default: 50 state: description: - C(present) - install the alternative (if not already installed), but do @@ -171,9 +170,10 @@ class AlternativesModule(object): if self.mode_present: # Check if we need to (re)install subcommands_parameter = self.module.params['subcommands'] + priority_parameter = self.module.params['priority'] if ( self.path not in self.current_alternatives or - self.current_alternatives[self.path].get('priority') != self.priority or + (priority_parameter is not None and self.current_alternatives[self.path].get('priority') != priority_parameter) or (subcommands_parameter is not None and ( not all(s in subcommands_parameter for s in self.current_alternatives[self.path].get('subcommands')) or not all(s in self.current_alternatives[self.path].get('subcommands') for s in subcommands_parameter) @@ -273,7 +273,9 @@ class AlternativesModule(object): @property def priority(self): - return self.module.params.get('priority') + if self.module.params.get('priority') is not None: + return self.module.params.get('priority') + return self.current_alternatives.get(self.path, {}).get('priority', 50) @property def subcommands(self): @@ -373,7 +375,7 @@ def main(): name=dict(type='str', required=True), path=dict(type='path', required=True), link=dict(type='path'), - priority=dict(type='int', default=50), + priority=dict(type='int'), state=dict( type='str', choices=AlternativeState.to_list(), diff --git a/tests/integration/targets/alternatives/tasks/test.yml b/tests/integration/targets/alternatives/tasks/test.yml index a5b36ce922..a4d2f95502 100644 --- a/tests/integration/targets/alternatives/tasks/test.yml +++ b/tests/integration/targets/alternatives/tasks/test.yml @@ -48,4 +48,4 @@ when: ansible_os_family == 'RedHat' and not with_alternatives and item == 1 - name: check that alternative has been updated - command: "grep -Pzq '/bin/dummy{{ item }}\\n50' '{{ alternatives_dir }}/dummy'" + command: "grep -Pzq '/bin/dummy{{ item }}\\n' '{{ alternatives_dir }}/dummy'" diff --git a/tests/integration/targets/alternatives/tasks/tests_set_priority.yml b/tests/integration/targets/alternatives/tasks/tests_set_priority.yml index a629e3f368..12dcc1cbf6 100644 --- a/tests/integration/targets/alternatives/tasks/tests_set_priority.yml +++ b/tests/integration/targets/alternatives/tasks/tests_set_priority.yml @@ -31,4 +31,19 @@ register: alternative - name: check that alternative priority has been updated - command: "grep -Pzq '/bin/dummy{{ item }}\\n{{ 70 + item|int }}' '{{ alternatives_dir }}/dummy'" \ No newline at end of file + command: "grep -Pzq '/bin/dummy{{ item }}\\n{{ 70 + item|int }}' '{{ alternatives_dir }}/dummy'" + +- name: no change without priority + alternatives: + name: dummy + path: '/usr/bin/dummy{{ item }}' + link: /usr/bin/dummy + register: alternative + +- name: check no change was triggered without priority + assert: + that: + - 'alternative is not changed' + +- name: check that alternative priority has not been changed + command: "grep -Pzq '/bin/dummy{{ item }}\\n{{ 70 + item|int }}' '{{ alternatives_dir }}/dummy'" From a45b90e93f46851ca10b37acb883bda270f8e6c9 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 14 Jun 2022 07:26:38 +0200 Subject: [PATCH 0079/2104] redhat_subscription: call 'remove' instead of 'unsubscribe' (#4809) The 'unsubscribe' command of 'subscription-manager' was deprecated already in subscription-manager 1.11.3, shipped with RHEL 5.11. As it was removed in subscription-manager 1.29.x, unsubscribing from pools was thus broken. The simple fix is to call the proper command, 'remove'. --- .../fragments/4809-redhat_subscription-unsubscribe.yaml | 2 ++ plugins/modules/packaging/os/redhat_subscription.py | 2 +- .../plugins/modules/packaging/os/test_redhat_subscription.py | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml diff --git a/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml b/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml new file mode 100644 index 0000000000..39a364d007 --- /dev/null +++ b/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml @@ -0,0 +1,2 @@ +bugfixes: + - redhat_subscription - fix unsubscribing on RHEL 9 (https://github.com/ansible-collections/community.general/issues/4741). diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index 7bb540b3f1..7309ba7d66 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -468,7 +468,7 @@ class Rhsm(RegistrationBase): items = ["--all"] if items: - args = [SUBMAN_CMD, 'unsubscribe'] + items + args = [SUBMAN_CMD, 'remove'] + items rc, stderr, stdout = self.module.run_command(args, check_rc=True) return serials diff --git a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py index 7f430ee72c..8eb7ead674 100644 --- a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Author: Jiri Hnidek (jhnidek@redhat.com) # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) @@ -118,7 +119,7 @@ TEST_CASES = [ (0, 'system identity: b26df632-25ed-4452-8f89-0308bfd167cb', '') ), ( - ['/testbin/subscription-manager', 'unsubscribe', '--all'], + ['/testbin/subscription-manager', 'remove', '--all'], {'check_rc': True}, (0, '', '') ), @@ -755,7 +756,7 @@ Entitlement Type: Physical ( [ '/testbin/subscription-manager', - 'unsubscribe', + 'remove', '--serial=7807912223970164816', ], {'check_rc': True}, From 84d8ca9234bee2e3926fbc64f6558d8704085fb5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 14 Jun 2022 16:02:31 +0200 Subject: [PATCH 0080/2104] Fix alternatives module (#4836) * Only pass subcommands when they are specified as module arguments. * When 'subcommands' is specified, 'link' must be given for every subcommand. * Extend subcommand tests. --- changelogs/fragments/4836-alternatives.yml | 3 + plugins/modules/system/alternatives.py | 5 +- .../targets/alternatives/tasks/main.yml | 2 + .../alternatives/tasks/subcommands.yml | 141 +++++++++++++++++- .../targets/alternatives/vars/Debian.yml | 1 + .../targets/alternatives/vars/Suse-42.3.yml | 1 + .../targets/alternatives/vars/default.yml | 1 + 7 files changed, 151 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4836-alternatives.yml diff --git a/changelogs/fragments/4836-alternatives.yml b/changelogs/fragments/4836-alternatives.yml new file mode 100644 index 0000000000..d627ddf1ad --- /dev/null +++ b/changelogs/fragments/4836-alternatives.yml @@ -0,0 +1,3 @@ +bugfixes: + - "alternatives - only pass subcommands when they are specified as module arguments (https://github.com/ansible-collections/community.general/issues/4803, https://github.com/ansible-collections/community.general/issues/4804, https://github.com/ansible-collections/community.general/pull/4836)." + - "alternatives - when ``subcommands`` is specified, ``link`` must be given for every subcommand. This was already mentioned in the documentation, but not enforced by the code (https://github.com/ansible-collections/community.general/pull/4836)." diff --git a/plugins/modules/system/alternatives.py b/plugins/modules/system/alternatives.py index 56ae57fe8b..01867d4cb0 100644 --- a/plugins/modules/system/alternatives.py +++ b/plugins/modules/system/alternatives.py @@ -77,6 +77,7 @@ options: description: - The path to the symbolic link that should point to the real subcommand executable. type: path + required: true version_added: 5.1.0 requirements: [ update-alternatives ] ''' @@ -204,7 +205,7 @@ class AlternativesModule(object): cmd = [self.UPDATE_ALTERNATIVES, '--install', self.link, self.name, self.path, str(self.priority)] - if self.subcommands is not None: + if self.module.params['subcommands'] is not None: subcommands = [['--slave', subcmd['link'], subcmd['name'], subcmd['path']] for subcmd in self.subcommands] cmd += [item for sublist in subcommands for item in sublist] @@ -384,7 +385,7 @@ def main(): subcommands=dict(type='list', elements='dict', aliases=['slaves'], options=dict( name=dict(type='str', required=True), path=dict(type='path', required=True), - link=dict(type='path'), + link=dict(type='path', required=True), )), ), supports_check_mode=True, diff --git a/tests/integration/targets/alternatives/tasks/main.yml b/tests/integration/targets/alternatives/tasks/main.yml index 70853e8005..587022755b 100644 --- a/tests/integration/targets/alternatives/tasks/main.yml +++ b/tests/integration/targets/alternatives/tasks/main.yml @@ -66,6 +66,8 @@ state: absent with_items: - '{{ alternatives_dir }}/dummy' + - '{{ alternatives_dir }}/dummymain' + - '{{ alternatives_dir }}/dummysubcmd' - file: path: '/usr/bin/dummy{{ item }}' diff --git a/tests/integration/targets/alternatives/tasks/subcommands.yml b/tests/integration/targets/alternatives/tasks/subcommands.yml index ba4ecbbafe..d4ad086099 100644 --- a/tests/integration/targets/alternatives/tasks/subcommands.yml +++ b/tests/integration/targets/alternatives/tasks/subcommands.yml @@ -32,6 +32,15 @@ that: - cmd.stdout == "dummy2" +- name: Get dummymain alternatives output + command: + cmd: '{{ alternatives_command }} --display dummymain' + register: result + +- name: Print result + debug: + var: result.stdout_lines + - name: Subcommands are not removed if not specified alternatives: name: dummymain @@ -75,4 +84,134 @@ assert: that: - cmd.rc == 2 - - '"No such file" in cmd.msg' \ No newline at end of file + - '"No such file" in cmd.msg' + +- name: Get dummymain alternatives output + command: + cmd: '{{ alternatives_command }} --display dummymain' + register: result + +- name: Print result + debug: + var: result.stdout_lines + +- name: Install other alternative with subcommands + alternatives: + name: dummymain + path: '/usr/bin/dummy3' + link: '/usr/bin/dummymain' + subcommands: + - name: dummysubcmd + path: '/usr/bin/dummy4' + link: '/usr/bin/dummysubcmd' + register: alternative + +- name: Check expected command was executed + assert: + that: + - 'alternative is changed' + +- name: Execute the current dummymain command + command: dummymain + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy3" + +- name: Execute the current dummysubcmd command + command: dummysubcmd + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy4" + +- name: Get dummymain alternatives output + command: + cmd: '{{ alternatives_command }} --display dummymain' + register: result + +- name: Print result + debug: + var: result.stdout_lines + +- name: Switch to first alternative + alternatives: + name: dummymain + path: '/usr/bin/dummy1' + register: alternative + +- name: Check expected command was executed + assert: + that: + - 'alternative is changed' + +- name: Execute the current dummymain command + command: dummymain + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy1" + +- name: Execute the current dummysubcmd command + command: dummysubcmd + register: cmd + ignore_errors: True + +- name: Ensure that the subcommand is gone + assert: + that: + - cmd.rc == 2 + - '"No such file" in cmd.msg' + +- name: Get dummymain alternatives output + command: + cmd: '{{ alternatives_command }} --display dummymain' + register: result + +- name: Print result + debug: + var: result.stdout_lines + +- name: Switch to second alternative + alternatives: + name: dummymain + path: '/usr/bin/dummy3' + register: alternative + +- name: Check expected command was executed + assert: + that: + - 'alternative is changed' + +- name: Execute the current dummymain command + command: dummymain + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy3" + +- name: Execute the current dummysubcmd command + command: dummysubcmd + register: cmd + +- name: Ensure that the expected command was executed + assert: + that: + - cmd.stdout == "dummy4" + +- name: Get dummymain alternatives output + command: + cmd: '{{ alternatives_command }} --display dummymain' + register: result + +- name: Print result + debug: + var: result.stdout_lines diff --git a/tests/integration/targets/alternatives/vars/Debian.yml b/tests/integration/targets/alternatives/vars/Debian.yml index 1e83283e4d..d2cdd0cd0e 100644 --- a/tests/integration/targets/alternatives/vars/Debian.yml +++ b/tests/integration/targets/alternatives/vars/Debian.yml @@ -1,2 +1,3 @@ --- alternatives_dir: /var/lib/dpkg/alternatives/ +alternatives_command: update-alternatives diff --git a/tests/integration/targets/alternatives/vars/Suse-42.3.yml b/tests/integration/targets/alternatives/vars/Suse-42.3.yml index 37664ddb56..14958db39a 100644 --- a/tests/integration/targets/alternatives/vars/Suse-42.3.yml +++ b/tests/integration/targets/alternatives/vars/Suse-42.3.yml @@ -1,2 +1,3 @@ --- alternatives_dir: /var/lib/rpm/alternatives/ +alternatives_command: update-alternatives diff --git a/tests/integration/targets/alternatives/vars/default.yml b/tests/integration/targets/alternatives/vars/default.yml index d00123ded3..7aeb9bb562 100644 --- a/tests/integration/targets/alternatives/vars/default.yml +++ b/tests/integration/targets/alternatives/vars/default.yml @@ -1,2 +1,3 @@ --- alternatives_dir: /var/lib/alternatives/ +alternatives_command: update-alternatives From 739ca737f1bce3d6e8dd2caa1cd6749faa4e2106 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 15 Jun 2022 18:06:26 +1200 Subject: [PATCH 0081/2104] cmd_runner: add __call__ method to invoke context (#4791) * cmd_runner: add __call__ method to invoke context * change xfconf to use the callable form * add changelog fragment * Update changelogs/fragments/4791-cmd-runner-callable.yaml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4791-cmd-runner-callable.yaml | 2 + plugins/module_utils/cmd_runner.py | 5 +- plugins/modules/system/xfconf.py | 6 +- .../plugins/module_utils/test_cmd_runner.py | 65 ++++++++++++++++++- 4 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/4791-cmd-runner-callable.yaml diff --git a/changelogs/fragments/4791-cmd-runner-callable.yaml b/changelogs/fragments/4791-cmd-runner-callable.yaml new file mode 100644 index 0000000000..142ad90f83 --- /dev/null +++ b/changelogs/fragments/4791-cmd-runner-callable.yaml @@ -0,0 +1,2 @@ +minor_changes: + - cmd_runner module utils - add ``__call__`` method to invoke context (https://github.com/ansible-collections/community.general/pull/4791). diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index 7d6a690224..6aec7b1a90 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -197,7 +197,7 @@ class CmdRunner(object): if mod_param_name not in self.arg_formats: self.arg_formats[mod_param_name] = _Format.as_default_type(spec['type'], mod_param_name) - def context(self, args_order=None, output_process=None, ignore_value_none=True, check_mode_skip=False, check_mode_return=None, **kwargs): + def __call__(self, args_order=None, output_process=None, ignore_value_none=True, check_mode_skip=False, check_mode_return=None, **kwargs): if output_process is None: output_process = _process_as_is if args_order is None: @@ -216,6 +216,9 @@ class CmdRunner(object): def has_arg_format(self, arg): return arg in self.arg_formats + # not decided whether to keep it or not, but if deprecating it will happen in a farther future. + context = __call__ + class _CmdRunnerContext(object): def __init__(self, runner, args_order, output_process, ignore_value_none, check_mode_skip, check_mode_return, **kwargs): diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index c2811e3ccb..9d6521cced 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -209,11 +209,11 @@ class XFConfProperty(StateModuleHelper): return result def _get(self): - with self.runner.context('channel property', output_process=self.process_command_output) as ctx: + with self.runner('channel property', output_process=self.process_command_output) as ctx: return ctx.run() def state_absent(self): - with self.runner.context('channel property reset', check_mode_skip=True) as ctx: + with self.runner('channel property reset', check_mode_skip=True) as ctx: ctx.run(reset=True) self.vars.value = None @@ -239,7 +239,7 @@ class XFConfProperty(StateModuleHelper): isinstance(self.vars.previous_value, list) or \ values_len > 1 - with self.runner.context('channel property create force_array values_and_types', check_mode_skip=True) as ctx: + with self.runner('channel property create force_array values_and_types', check_mode_skip=True) as ctx: ctx.run(create=True, force_array=self.vars.is_array, values_and_types=(self.vars.value, value_type)) if not self.vars.is_array: diff --git a/tests/unit/plugins/module_utils/test_cmd_runner.py b/tests/unit/plugins/module_utils/test_cmd_runner.py index b5145ec815..f28c890413 100644 --- a/tests/unit/plugins/module_utils/test_cmd_runner.py +++ b/tests/unit/plugins/module_utils/test_cmd_runner.py @@ -246,7 +246,7 @@ TC_RUNNER_IDS = sorted(TC_RUNNER.keys()) @pytest.mark.parametrize('runner_input, cmd_execution, expected', (TC_RUNNER[tc] for tc in TC_RUNNER_IDS), ids=TC_RUNNER_IDS) -def test_runner(runner_input, cmd_execution, expected): +def test_runner_context(runner_input, cmd_execution, expected): arg_spec = {} params = {} arg_formats = {} @@ -304,3 +304,66 @@ def test_runner(runner_input, cmd_execution, expected): with runner.context(**runner_input['runner_ctx_args']) as ctx: results = ctx.run(**cmd_execution['runner_ctx_run_args']) _assert_run(runner_input, cmd_execution, expected, ctx, results) + + +@pytest.mark.parametrize('runner_input, cmd_execution, expected', + (TC_RUNNER[tc] for tc in TC_RUNNER_IDS), + ids=TC_RUNNER_IDS) +def test_runner_callable(runner_input, cmd_execution, expected): + arg_spec = {} + params = {} + arg_formats = {} + for k, v in runner_input['args_bundle'].items(): + try: + arg_spec[k] = {'type': v['type']} + except KeyError: + pass + try: + params[k] = v['value'] + except KeyError: + pass + try: + arg_formats[k] = v['fmt_func'](v['fmt_arg']) + except KeyError: + pass + + orig_results = tuple(cmd_execution[x] for x in ('rc', 'out', 'err')) + + print("arg_spec={0}\nparams={1}\narg_formats={2}\n".format( + arg_spec, + params, + arg_formats, + )) + + module = MagicMock() + type(module).argument_spec = PropertyMock(return_value=arg_spec) + type(module).params = PropertyMock(return_value=params) + module.get_bin_path.return_value = '/mock/bin/testing' + module.run_command.return_value = orig_results + + runner = CmdRunner( + module=module, + command="testing", + arg_formats=arg_formats, + **runner_input['runner_init_args'] + ) + + def _assert_run_info(actual, expected): + reduced = dict((k, actual[k]) for k in expected.keys()) + assert reduced == expected, "{0}".format(reduced) + + def _assert_run(runner_input, cmd_execution, expected, ctx, results): + _assert_run_info(ctx.run_info, expected['run_info']) + assert results == expected.get('results', orig_results) + + exc = expected.get("exc") + if exc: + with pytest.raises(exc): + with runner(**runner_input['runner_ctx_args']) as ctx: + results = ctx.run(**cmd_execution['runner_ctx_run_args']) + _assert_run(runner_input, cmd_execution, expected, ctx, results) + + else: + with runner(**runner_input['runner_ctx_args']) as ctx: + results = ctx.run(**cmd_execution['runner_ctx_run_args']) + _assert_run(runner_input, cmd_execution, expected, ctx, results) From 7f4c11cd6453156619aa249f319f74262f417348 Mon Sep 17 00:00:00 2001 From: pastral <52627592+pastral@users.noreply.github.com> Date: Wed, 15 Jun 2022 08:07:02 +0200 Subject: [PATCH 0082/2104] Add scw_compute_private_network (#4727) * Add scw_compute_private_network * fix argument required and BOTMETA * little fix in commentary/doc * test with link for ansible-doc check * remove unwanted file * fix entry missing in meta/runtime.yml * scaleway_compute_private_network add some check in test and some fic in doc * a=add missing del os.environ * fix whitespace * test_scaleway_compute_private_network : fix test * test_scaleway_compute_private_network : fix pep8 * scaleway_compute_private_network add . in description * scaleway_compute_private_network: fix var name * [scaleway_compute_private_network] add name for the example's task * Update plugins/modules/cloud/scaleway/scaleway_compute_private_network.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/scaleway/scaleway_compute_private_network.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 + meta/runtime.yml | 2 + .../scaleway_compute_private_network.py | 209 ++++++++++++++++++ .../test_scaleway_compute_private_network.py | 179 +++++++++++++++ 4 files changed, 392 insertions(+) create mode 100644 plugins/modules/cloud/scaleway/scaleway_compute_private_network.py create mode 100644 tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 685a1d0f53..430617179f 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -440,6 +440,8 @@ files: maintainers: claco $modules/cloud/scaleway/: maintainers: $team_scaleway + $modules/cloud/scaleway/scaleway_compute_private_network.py: + maintainers: pastral $modules/cloud/scaleway/scaleway_database_backup.py: maintainers: guillaume_ro_fr $modules/cloud/scaleway/scaleway_image_info.py: diff --git a/meta/runtime.yml b/meta/runtime.yml index e15dafd653..14391a7e71 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1357,6 +1357,8 @@ plugin_routing: redirect: community.general.notification.say scaleway_compute: redirect: community.general.cloud.scaleway.scaleway_compute + scaleway_compute_private_network: + redirect: community.general.cloud.scaleway.scaleway_compute_private_network scaleway_database_backup: redirect: community.general.cloud.scaleway.scaleway_database_backup scaleway_image_facts: diff --git a/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py b/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py new file mode 100644 index 0000000000..2e23b324cd --- /dev/null +++ b/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py @@ -0,0 +1,209 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway VPC management module +# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_compute_private_network +short_description: Scaleway compute - private network management +version_added: 5.2.0 +author: Pascal MANGIN (@pastral) +description: + - This module add or remove a private network to a compute instance + (U(https://developer.scaleway.com)). +extends_documentation_fragment: +- community.general.scaleway + + +options: + state: + type: str + description: + - Indicate desired state of the VPC. + default: present + choices: + - present + - absent + + project: + type: str + description: + - Project identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(par1)). + required: true + choices: + - ams1 + - EMEA-NL-EVS + - par1 + - EMEA-FR-PAR1 + - par2 + - EMEA-FR-PAR2 + - waw1 + - EMEA-PL-WAW1 + + compute_id: + type: str + description: + - ID of the compute instance (see M(community.general.scaleway_compute)). + required: true + + private_network_id: + type: str + description: + - ID of the private network (see M(community.general.scaleway_private_network)). + required: true + +''' + +EXAMPLES = ''' +- name: Plug a VM to a private network + community.general.scaleway_compute_private_network: + project: '{{ scw_project }}' + state: present + region: par1 + compute_id: "12345678-f1e6-40ec-83e5-12345d67ed89" + private_network_id: "22345678-f1e6-40ec-83e5-12345d67ed89" + register: nicsvpc_creation_task + +- name: Unplug a VM from a private network + community.general.scaleway_compute_private_network: + project: '{{ scw_project }}' + state: absent + region: par1 + compute_id: "12345678-f1e6-40ec-83e5-12345d67ed89" + private_network_id: "22345678-f1e6-40ec-83e5-12345d67ed89" + +''' + +RETURN = ''' +scaleway_compute_private_network: + description: Information on the VPC. + returned: success when C(state=present) + type: dict + sample: + { + "created_at": "2022-01-15T11:11:12.676445Z", + "id": "12345678-f1e6-40ec-83e5-12345d67ed89", + "name": "network", + "organization_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90", + "project_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90", + "tags": [ + "tag1", + "tag2", + "tag3", + "tag4", + "tag5" + ], + "updated_at": "2022-01-15T11:12:04.624837Z", + "zone": "fr-par-2" + } +''' +from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway +from ansible.module_utils.basic import AnsibleModule + + +def get_nics_info(api, compute_id, private_network_id): + + response = api.get('servers/' + compute_id + '/private_nics') + if not response.ok: + msg = "Error during get servers information: %s: '%s' (%s)" % (response.info['msg'], response.json['message'], response.json) + api.module.fail_json(msg=msg) + + i = 0 + list_nics = response.json['private_nics'] + + while i < len(list_nics): + if list_nics[i]['private_network_id'] == private_network_id: + return list_nics[i] + i += 1 + + return None + + +def present_strategy(api, compute_id, private_network_id): + + changed = False + nic = get_nics_info(api, compute_id, private_network_id) + if nic is not None: + return changed, nic + + data = {"private_network_id": private_network_id} + changed = True + if api.module.check_mode: + return changed, {"status": "a private network would be add to a server"} + + response = api.post(path='servers/' + compute_id + '/private_nics', data=data) + + if not response.ok: + api.module.fail_json(msg='Error when adding a private network to a server [{0}: {1}]'.format(response.status_code, response.json)) + + return changed, response.json + + +def absent_strategy(api, compute_id, private_network_id): + + changed = False + nic = get_nics_info(api, compute_id, private_network_id) + if nic is None: + return changed, {} + + changed = True + if api.module.check_mode: + return changed, {"status": "private network would be destroyed"} + + response = api.delete('servers/' + compute_id + '/private_nics/' + nic['id']) + + if not response.ok: + api.module.fail_json(msg='Error deleting private network from server [{0}: {1}]'.format( + response.status_code, response.json)) + + return changed, response.json + + +def core(module): + + compute_id = module.params['compute_id'] + pn_id = module.params['private_network_id'] + + region = module.params["region"] + module.params['api_url'] = SCALEWAY_LOCATION[region]["api_endpoint"] + + api = Scaleway(module=module) + if module.params["state"] == "absent": + changed, summary = absent_strategy(api=api, compute_id=compute_id, private_network_id=pn_id) + else: + changed, summary = present_strategy(api=api, compute_id=compute_id, private_network_id=pn_id) + module.exit_json(changed=changed, scaleway_compute_private_network=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(dict( + state=dict(default='present', choices=['absent', 'present']), + project=dict(required=True), + region=dict(required=True, choices=list(SCALEWAY_LOCATION.keys())), + compute_id=dict(required=True), + private_network_id=dict(required=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py b/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py new file mode 100644 index 0000000000..f474084576 --- /dev/null +++ b/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py @@ -0,0 +1,179 @@ +# Copyright: (c) 2019, Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import json +import pytest + + +from ansible_collections.community.general.plugins.modules.cloud.scaleway import scaleway_compute_private_network +from ansible_collections.community.general.plugins.module_utils.scaleway import Scaleway, Response +from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch + + +def response_without_nics(): + info = {"status": 200, + "body": '{ "private_nics": []}' + } + return Response(None, info) + + +def response_with_nics(): + info = {"status": 200, + "body": ('{ "private_nics": [{' + '"id": "c123b4cd-ef5g-678h-90i1-jk2345678l90",' + '"private_network_id": "b589b4cd-ef5g-678h-90i1-jk2345678l90",' + '"server_id": "c004b4cd-ef5g-678h-90i1-jk2345678l90",' + '"mac_address": "02:00:00:00:12:23",' + '"state": "available",' + '"creation_date": "2022-03-30T06:25:28.155973+00:00",' + '"modification_date": "2022-03-30T06:25:28.155973+00:00",' + '"zone": "fr-par-1"' + '}]}' + ) + } + return Response(None, info) + + +def response_when_add_nics(): + info = {"status": 200, + "body": ('{ "private_nics": {' + '"id": "c123b4cd-ef5g-678h-90i1-jk2345678l90",' + '"private_network_id": "b589b4cd-ef5g-678h-90i1-jk2345678l90",' + '"server_id": "c004b4cd-ef5g-678h-90i1-jk2345678l90",' + '"mac_address": "02:00:00:00:12:23",' + '"state": "available",' + '"creation_date": "2022-03-30T06:25:28.155973+00:00",' + '"modification_date": "2022-03-30T06:25:28.155973+00:00",' + '"zone": "fr-par-1"' + '}}' + ) + } + return Response(None, info) + + +def response_remove_nics(): + info = {"status": 200} + return Response(None, info) + + +def test_scaleway_private_network_without_arguments(capfd): + set_module_args({}) + with pytest.raises(SystemExit) as results: + scaleway_compute_private_network.main() + out, err = capfd.readouterr() + + assert not err + assert json.loads(out)['failed'] + + +def test_scaleway_add_nic(capfd): + os.environ['SCW_API_TOKEN'] = 'notrealtoken' + pnid = 'b589b4cd-ef5g-678h-90i1-jk2345678l90' + cid = 'c004b4cd-ef5g-678h-90i1-jk2345678l90' + url = 'servers/' + cid + '/private_nics' + + set_module_args({"project": "a123b4cd-ef5g-678h-90i1-jk2345678l90", + "state": "present", + "region": "par1", + "compute_id": cid, + "private_network_id": pnid + }) + + with patch.object(Scaleway, 'get') as mock_scw_get: + mock_scw_get.return_value = response_without_nics() + with patch.object(Scaleway, 'post') as mock_scw_post: + mock_scw_post.return_value = response_when_add_nics() + with pytest.raises(SystemExit) as results: + scaleway_compute_private_network.main() + mock_scw_post.assert_any_call(path=url, data={"private_network_id": pnid}) + mock_scw_get.assert_any_call(url) + + out, err = capfd.readouterr() + del os.environ['SCW_API_TOKEN'] + assert not err + assert json.loads(out)['changed'] + + +def test_scaleway_add_existing_nic(capfd): + os.environ['SCW_API_TOKEN'] = 'notrealtoken' + pnid = 'b589b4cd-ef5g-678h-90i1-jk2345678l90' + cid = 'c004b4cd-ef5g-678h-90i1-jk2345678l90' + url = 'servers/' + cid + '/private_nics' + + set_module_args({"project": "a123b4cd-ef5g-678h-90i1-jk2345678l90", + "state": "present", + "region": "par1", + "compute_id": cid, + "private_network_id": pnid + }) + + with patch.object(Scaleway, 'get') as mock_scw_get: + mock_scw_get.return_value = response_with_nics() + with pytest.raises(SystemExit) as results: + scaleway_compute_private_network.main() + mock_scw_get.assert_any_call(url) + + out, err = capfd.readouterr() + del os.environ['SCW_API_TOKEN'] + assert not err + assert not json.loads(out)['changed'] + + +def test_scaleway_remove_existing_nic(capfd): + os.environ['SCW_API_TOKEN'] = 'notrealtoken' + pnid = 'b589b4cd-ef5g-678h-90i1-jk2345678l90' + cid = 'c004b4cd-ef5g-678h-90i1-jk2345678l90' + nicid = 'c123b4cd-ef5g-678h-90i1-jk2345678l90' + url = 'servers/' + cid + '/private_nics' + urlremove = 'servers/' + cid + '/private_nics/' + nicid + + set_module_args({"project": "a123b4cd-ef5g-678h-90i1-jk2345678l90", + "state": "absent", + "region": "par1", + "compute_id": cid, + "private_network_id": pnid + }) + + with patch.object(Scaleway, 'get') as mock_scw_get: + mock_scw_get.return_value = response_with_nics() + with patch.object(Scaleway, 'delete') as mock_scw_delete: + mock_scw_delete.return_value = response_remove_nics() + with pytest.raises(SystemExit) as results: + scaleway_compute_private_network.main() + mock_scw_delete.assert_any_call(urlremove) + mock_scw_get.assert_any_call(url) + + out, err = capfd.readouterr() + + del os.environ['SCW_API_TOKEN'] + assert not err + assert json.loads(out)['changed'] + + +def test_scaleway_remove_absent_nic(capfd): + os.environ['SCW_API_TOKEN'] = 'notrealtoken' + pnid = 'b589b4cd-ef5g-678h-90i1-jk2345678l90' + cid = 'c004b4cd-ef5g-678h-90i1-jk2345678l90' + url = 'servers/' + cid + '/private_nics' + + set_module_args({"project": "a123b4cd-ef5g-678h-90i1-jk2345678l90", + "state": "absent", + "region": "par1", + "compute_id": cid, + "private_network_id": pnid + }) + + with patch.object(Scaleway, 'get') as mock_scw_get: + mock_scw_get.return_value = response_without_nics() + with pytest.raises(SystemExit) as results: + scaleway_compute_private_network.main() + mock_scw_get.assert_any_call(url) + + out, err = capfd.readouterr() + del os.environ['SCW_API_TOKEN'] + assert not err + assert not json.loads(out)['changed'] From 006f3bfa89f5ff95ffd83e9dbd16702f7ef9d96a Mon Sep 17 00:00:00 2001 From: grembo Date: Wed, 15 Jun 2022 08:08:04 +0200 Subject: [PATCH 0083/2104] passwordstore: Make compatible with shims (#4780) * passwordstore: Make compatible with shims, add backend config This allows using the passwordstore plugin with scripts that wrap other password managers. Also adds an explicit configuration (`backend` in `ini` and `passwordstore_backend` in `vars`) to set the backend to `pass` (the default) or `gopass`, which allows using gopass as the backend without the need of a wrapper script. Please be aware that gopass support is currently limited, but will work for basic operations. Includes integrations tests. Resolves #4766 * Apply suggestions from code review --- .../4780-passwordstore-wrapper-compat.yml | 2 + plugins/lookup/passwordstore.py | 59 +++++- .../lookup_passwordstore/tasks/tests.yml | 198 ++++++++++++++++++ 3 files changed, 251 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/4780-passwordstore-wrapper-compat.yml diff --git a/changelogs/fragments/4780-passwordstore-wrapper-compat.yml b/changelogs/fragments/4780-passwordstore-wrapper-compat.yml new file mode 100644 index 0000000000..ace74bcb3e --- /dev/null +++ b/changelogs/fragments/4780-passwordstore-wrapper-compat.yml @@ -0,0 +1,2 @@ +minor_changes: + - passwordstore lookup plugin - allow using alternative password managers by detecting wrapper scripts, allow explicit configuration of pass and gopass backends (https://github.com/ansible-collections/community.general/issues/4766). diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index a221e49625..5823756e35 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -106,6 +106,22 @@ DOCUMENTATION = ''' type: str default: 15m version_added: 4.5.0 + backend: + description: + - Specify which backend to use. + - Defaults to C(pass), passwordstore.org's original pass utility. + - C(gopass) support is incomplete. + ini: + - section: passwordstore_lookup + key: backend + vars: + - name: passwordstore_backend + type: str + default: pass + choices: + - pass + - gopass + version_added: 5.2.0 ''' EXAMPLES = """ ansible.cfg: | @@ -231,6 +247,24 @@ def check_output2(*popenargs, **kwargs): class LookupModule(LookupBase): + def __init__(self, loader=None, templar=None, **kwargs): + + super(LookupModule, self).__init__(loader, templar, **kwargs) + self.realpass = None + + def is_real_pass(self): + if self.realpass is None: + try: + self.passoutput = to_text( + check_output2([self.pass_cmd, "--version"], env=self.env), + errors='surrogate_or_strict' + ) + self.realpass = 'pass: the standard unix password manager' in self.passoutput + except (subprocess.CalledProcessError) as e: + raise AnsibleError(e) + + return self.realpass + def parse_params(self, term): # I went with the "traditional" param followed with space separated KV pairs. # Waiting for final implementation of lookup parameter parsing. @@ -270,10 +304,12 @@ class LookupModule(LookupBase): self.env = os.environ.copy() self.env['LANGUAGE'] = 'C' # make sure to get errors in English as required by check_output2 - # Set PASSWORD_STORE_DIR - if os.path.isdir(self.paramvals['directory']): + if self.backend == 'gopass': + self.env['GOPASS_NO_REMINDER'] = "YES" + elif os.path.isdir(self.paramvals['directory']): + # Set PASSWORD_STORE_DIR self.env['PASSWORD_STORE_DIR'] = self.paramvals['directory'] - else: + elif self.is_real_pass(): raise AnsibleError('Passwordstore directory \'{0}\' does not exist'.format(self.paramvals['directory'])) # Set PASSWORD_STORE_UMASK if umask is set @@ -288,7 +324,9 @@ class LookupModule(LookupBase): def check_pass(self): try: self.passoutput = to_text( - check_output2(["pass", "show", self.passname], env=self.env), + check_output2([self.pass_cmd, 'show'] + + (['--password'] if self.backend == 'gopass' else []) + + [self.passname], env=self.env), errors='surrogate_or_strict' ).splitlines() self.password = self.passoutput[0] @@ -302,8 +340,10 @@ class LookupModule(LookupBase): if ':' in line: name, value = line.split(':', 1) self.passdict[name.strip()] = value.strip() - if os.path.isfile(os.path.join(self.paramvals['directory'], self.passname + ".gpg")): - # Only accept password as found, if there a .gpg file for it (might be a tree node otherwise) + if (self.backend == 'gopass' or + os.path.isfile(os.path.join(self.paramvals['directory'], self.passname + ".gpg")) + or not self.is_real_pass()): + # When using real pass, only accept password as found if there is a .gpg file for it (might be a tree node otherwise) return True except (subprocess.CalledProcessError) as e: # 'not in password store' is the expected error if a password wasn't found @@ -339,7 +379,7 @@ class LookupModule(LookupBase): if self.paramvals['backup']: msg += "lookup_pass: old password was {0} (Updated on {1})\n".format(self.password, datetime) try: - check_output2(['pass', 'insert', '-f', '-m', self.passname], input=msg, env=self.env) + check_output2([self.pass_cmd, 'insert', '-f', '-m', self.passname], input=msg, env=self.env) except (subprocess.CalledProcessError) as e: raise AnsibleError(e) return newpass @@ -351,7 +391,7 @@ class LookupModule(LookupBase): datetime = time.strftime("%d/%m/%Y %H:%M:%S") msg = newpass + '\n' + "lookup_pass: First generated by ansible on {0}\n".format(datetime) try: - check_output2(['pass', 'insert', '-f', '-m', self.passname], input=msg, env=self.env) + check_output2([self.pass_cmd, 'insert', '-f', '-m', self.passname], input=msg, env=self.env) except (subprocess.CalledProcessError) as e: raise AnsibleError(e) return newpass @@ -380,6 +420,8 @@ class LookupModule(LookupBase): yield def setup(self, variables): + self.backend = self.get_option('backend') + self.pass_cmd = self.backend # pass and gopass are commands as well self.locked = None timeout = self.get_option('locktimeout') if not re.match('^[0-9]+[smh]$', timeout): @@ -402,6 +444,7 @@ class LookupModule(LookupBase): } def run(self, terms, variables, **kwargs): + self.set_options(var_options=variables, direct=kwargs) self.setup(variables) result = [] diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index e69ba5e572..34899ef5c9 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -19,6 +19,44 @@ - "~/.gnupg" - "~/.password-store" +- name: Get path of pass executable + command: which pass + register: result + +- name: Store path of pass executable + set_fact: + passpath: "{{ result.stdout }}" + +- name: Move original pass into place if there was a leftover + command: + argv: + - mv + - "{{ passpath }}.testorig" + - "{{ passpath }}" + args: + removes: "{{ passpath }}.testorig" + +# having gopass is not required for this test, but we store +# its path in case it is installed, so we can restore it +- name: Try to find gopass in path + command: which gopass + register: result + ignore_errors: yes + +- name: Store path of gopass executable + set_fact: + gopasspath: "{{ (result.rc == 0) | + ternary(result.stdout, (passpath | dirname, 'gopass') | path_join) }}" + +- name: Move original gopass into place if there was a leftover + command: + argv: + - mv + - "{{ gopasspath }}.testorig" + - "{{ gopasspath }}" + args: + removes: "{{ gopasspath }}.testorig" + # How to generate a new GPG key: # gpg2 --batch --gen-key input # See templates/input # gpg2 --list-secret-keys --keyid-format LONG @@ -151,3 +189,163 @@ assert: that: - readyamlpass == 'testpassword\nrandom additional line' + +- name: Create a password in a folder + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass length=8 create=yes') }}" + +- name: Fetch password from folder + set_fact: + readpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass') }}" + +- name: Verify password from folder + assert: + that: + - readpass == newpass + +- name: Try to read folder as passname + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'folder') }}" + ignore_errors: true + register: eval_error + +- name: Make sure reading folder as passname failed + assert: + that: + - eval_error is failed + - '"passname folder not found" in eval_error.msg' + +- name: Change passwordstore location explicitly + set_fact: + passwordstore: "{{ lookup('env','HOME') }}/.password-store" + +- name: Make sure password store still works with explicit location set + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'test-pass') }}" + +- name: Change passwordstore location to a non-existent place + set_fact: + passwordstore: "somenonexistentplace" + +- name: Try reading from non-existent passwordstore location + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'test-pass') }}" + ignore_errors: true + register: eval_error + +- name: Make sure reading from non-existent passwordstore location failed + assert: + that: + - eval_error is failed + - >- + "Passwordstore directory 'somenonexistentplace' does not exist" in eval_error.msg + +- name: Test pass compatibility shim detection + block: + - name: Move original pass out of the way + command: + argv: + - mv + - "{{ passpath }}" + - "{{ passpath }}.testorig" + args: + creates: "{{ passpath }}.testorig" + + - name: Create dummy pass script + ansible.builtin.copy: + content: | + #!/bin/sh + echo "shim_ok" + dest: "{{ passpath }}" + mode: '0755' + + - name: Try reading from non-existent passwordstore location with different pass utility + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'test-pass') }}" + environment: + PATH: "/tmp" + + - name: Verify password received from shim + assert: + that: + - newpass == "shim_ok" + + - name: Try to read folder as passname with a different pass utility + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'folder') }}" + + - name: Verify password received from shim + assert: + that: + - newpass == "shim_ok" + + always: + - name: Move original pass back into place + command: + argv: + - mv + - "{{ passpath }}.testorig" + - "{{ passpath }}" + args: + removes: "{{ passpath }}.testorig" + +- name: Very basic gopass compatibility test + vars: + passwordstore_backend: "gopass" + block: + - name: check if gopass executable exists + stat: + path: "{{ gopasspath }}" + register: gopass_check + + - name: Move original gopass out of the way + command: + argv: + - mv + - "{{ gopasspath }}" + - "{{ gopasspath }}.testorig" + args: + creates: "{{ gopasspath }}.testorig" + when: gopass_check.stat.exists == true + + - name: Create mocked gopass script + ansible.builtin.copy: + content: | + #!/bin/sh + if [ "$GOPASS_NO_REMINDER" != "YES" ]; then + exit 1 + fi + if [ "$1" = "--version" ]; then + exit 2 + fi + if [ "$1" = "show" ] && [ "$2" != "--password" ]; then + exit 3 + fi + echo "gopass_ok" + dest: "{{ gopasspath }}" + mode: '0755' + + - name: Try to read folder as passname using gopass + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'folder') }}" + + - name: Verify password received from gopass + assert: + that: + - newpass == "gopass_ok" + + always: + - name: Remove mocked gopass + ansible.builtin.file: + path: "{{ gopasspath }}" + state: absent + + - name: Move original gopass back into place + command: + argv: + - mv + - "{{ gopasspath }}.testorig" + - "{{ gopasspath }}" + args: + removes: "{{ gopasspath }}.testorig" + when: gopass_check.stat.exists == true From dcdfc9c413237d7bf41e73b7107f4609f632ddff Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 17 Jun 2022 08:21:34 +0200 Subject: [PATCH 0084/2104] Add PSF-license.txt for plugins/module_utils/_mount.py (#4847) * Add PSF-license.txt for plugins/module_utils/_mount.py. * Move other licenses to licenses/. * Revert "Move other licenses to licenses/." This reverts commit eab4209889c4ebd9ba821e5df36bbe7f5ddf9640. --- PSF-license.txt | 48 ++++++++++++++++++++++++++++ changelogs/fragments/psf-license.yml | 2 ++ plugins/module_utils/_mount.py | 46 +------------------------- 3 files changed, 51 insertions(+), 45 deletions(-) create mode 100644 PSF-license.txt create mode 100644 changelogs/fragments/psf-license.yml diff --git a/PSF-license.txt b/PSF-license.txt new file mode 100644 index 0000000000..35acd7fb5f --- /dev/null +++ b/PSF-license.txt @@ -0,0 +1,48 @@ +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. diff --git a/changelogs/fragments/psf-license.yml b/changelogs/fragments/psf-license.yml new file mode 100644 index 0000000000..6e0cf7ad7a --- /dev/null +++ b/changelogs/fragments/psf-license.yml @@ -0,0 +1,2 @@ +bugfixes: + - "Include ``PSF-license.txt`` file for ``plugins/module_utils/_mount.py``." diff --git a/plugins/module_utils/_mount.py b/plugins/module_utils/_mount.py index 391d468178..a65173af48 100644 --- a/plugins/module_utils/_mount.py +++ b/plugins/module_utils/_mount.py @@ -3,51 +3,7 @@ # This particular file snippet, and this file snippet only, is based on # Lib/posixpath.py of cpython # It is licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -# -# 1. This LICENSE AGREEMENT is between the Python Software Foundation -# ("PSF"), and the Individual or Organization ("Licensee") accessing and -# otherwise using this software ("Python") in source or binary form and -# its associated documentation. -# -# 2. Subject to the terms and conditions of this License Agreement, PSF hereby -# grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, -# analyze, test, perform and/or display publicly, prepare derivative works, -# distribute, and otherwise use Python alone or in any derivative version, -# provided, however, that PSF's License Agreement and PSF's notice of copyright, -# i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved" -# are retained in Python alone or in any derivative version prepared by Licensee. -# -# 3. In the event Licensee prepares a derivative work that is based on -# or incorporates Python or any part thereof, and wants to make -# the derivative work available to others as provided herein, then -# Licensee hereby agrees to include in any such work a brief summary of -# the changes made to Python. -# -# 4. PSF is making Python available to Licensee on an "AS IS" -# basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -# IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND -# DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -# FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT -# INFRINGE ANY THIRD PARTY RIGHTS. -# -# 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -# FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -# A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, -# OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -# -# 6. This License Agreement will automatically terminate upon a material -# breach of its terms and conditions. -# -# 7. Nothing in this License Agreement shall be deemed to create any -# relationship of agency, partnership, or joint venture between PSF and -# Licensee. This License Agreement does not grant permission to use PSF -# trademarks or trade name in a trademark sense to endorse or promote -# products or services of Licensee, or any third party. -# -# 8. By copying, installing or otherwise using Python, Licensee -# agrees to be bound by the terms and conditions of this License -# Agreement. +# (See PSF-license.txt in this collection) from __future__ import absolute_import, division, print_function From 44e21dd407fa86a7de78258c52871b3db1b0f187 Mon Sep 17 00:00:00 2001 From: s-hamann <10639154+s-hamann@users.noreply.github.com> Date: Sun, 19 Jun 2022 13:34:24 +0000 Subject: [PATCH 0085/2104] sudoers: fix handling of state: absent (#4852) (#4853) * sudoers: fix handling of state: absent (#4852) * typo fixes --- changelogs/fragments/4852-sudoers-state-absent.yml | 2 ++ plugins/modules/system/sudoers.py | 9 ++++++--- tests/integration/targets/sudoers/tasks/main.yml | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4852-sudoers-state-absent.yml diff --git a/changelogs/fragments/4852-sudoers-state-absent.yml b/changelogs/fragments/4852-sudoers-state-absent.yml new file mode 100644 index 0000000000..013041a15f --- /dev/null +++ b/changelogs/fragments/4852-sudoers-state-absent.yml @@ -0,0 +1,2 @@ +bugfixes: + - "sudoers - fix incorrect handling of ``state: absent`` (https://github.com/ansible-collections/community.general/issues/4852)." diff --git a/plugins/modules/system/sudoers.py b/plugins/modules/system/sudoers.py index 8b8ad50405..d96716c7f9 100644 --- a/plugins/modules/system/sudoers.py +++ b/plugins/modules/system/sudoers.py @@ -168,9 +168,12 @@ class Sudoers(object): return "{owner} ALL={runas}{nopasswd} {commands}\n".format(owner=owner, runas=runas_str, nopasswd=nopasswd_str, commands=commands_str) def run(self): - if self.state == 'absent' and self.exists(): - self.delete() - return True + if self.state == 'absent': + if self.exists(): + self.delete() + return True + else: + return False if self.exists() and self.matches(): return False diff --git a/tests/integration/targets/sudoers/tasks/main.yml b/tests/integration/targets/sudoers/tasks/main.yml index 634eded779..f3be2d8092 100644 --- a/tests/integration/targets/sudoers/tasks/main.yml +++ b/tests/integration/targets/sudoers/tasks/main.yml @@ -135,6 +135,18 @@ register: revoke_rule_1_stat +- name: Revoke non-existing rule + community.general.sudoers: + name: non-existing-rule + state: absent + register: revoke_non_existing_rule + +- name: Stat non-existing rule + ansible.builtin.stat: + path: "{{ sudoers_path }}/non-existing-rule" + register: revoke_non_existing_rule_stat + + # Run assertions - name: Check rule 1 file stat @@ -151,6 +163,7 @@ - rule_1_again is not changed - rule_5 is changed - revoke_rule_1 is changed + - revoke_non_existing_rule is not changed - name: Check contents ansible.builtin.assert: @@ -166,3 +179,4 @@ ansible.builtin.assert: that: - not revoke_rule_1_stat.stat.exists + - not revoke_non_existing_rule_stat.stat.exists From 652392be27110e17d1b815f0fe23a477f8b9c823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <45594031+dcermak@users.noreply.github.com> Date: Mon, 20 Jun 2022 18:38:39 +0200 Subject: [PATCH 0086/2104] Remove myself from team_suse (#4860) I do not use `zypper` anymore and can thus not help with issues regarding the zypper module. --- .github/BOTMETA.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 430617179f..57f1732a02 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1292,5 +1292,5 @@ macros: team_rhn: FlossWare alikins barnabycourt vritant team_scaleway: remyleone abarbare team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l - team_suse: commel dcermak evrardjp lrupp toabctl AnderEnder alxgu andytom sealor + team_suse: commel evrardjp lrupp toabctl AnderEnder alxgu andytom sealor team_virt: joshainglis karmab tleguern Thulium-Drake Ajpantuso From 5e57d2af0a4e98b6f18f0f5a01cdc6377cf294ae Mon Sep 17 00:00:00 2001 From: FRUCHTiii <57792137+FRUCHTiii@users.noreply.github.com> Date: Mon, 20 Jun 2022 19:13:31 +0200 Subject: [PATCH 0087/2104] redfish_command: VirtualMediaInsert does not work with Supermicro (#4839) * bugfix virtual media support for supermicro hardware * Added Changelog for PR4839 --- ...4839-fix-VirtualMediaInsert-Supermicro.yml | 8 +++++ plugins/module_utils/redfish_utils.py | 35 ++++++++++++------- 2 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml diff --git a/changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml b/changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml new file mode 100644 index 0000000000..cd0aeeeb5b --- /dev/null +++ b/changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml @@ -0,0 +1,8 @@ +bugfixes: + - redfish_command - fix the check if a virtual media is unmounted to just check for ``instered= false`` + caused by Supermicro hardware that does not clear the ``ImageName`` + (https://github.com/ansible-collections/community.general/pull/4839). + - redfish_command - the Supermicro Redfish implementation only supports the ``image_url`` parameter in + the underlying API calls to ``VirtualMediaInsert`` and ``VirtualMediaEject``. Any values set + (or the defaults) for ``write_protected`` or ``inserted`` will be ignored + (https://github.com/ansible-collections/community.general/pull/4839). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 31750861f7..0c5bc1b0de 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -2187,9 +2187,8 @@ class RedfishUtils(object): else: if media_match_strict: continue - # if ejected, 'Inserted' should be False and 'ImageName' cleared - if (not data.get('Inserted', False) and - not data.get('ImageName')): + # if ejected, 'Inserted' should be False + if (not data.get('Inserted', False)): return uri, data return None, None @@ -2225,7 +2224,7 @@ class RedfishUtils(object): return resources, headers @staticmethod - def _insert_virt_media_payload(options, param_map, data, ai): + def _insert_virt_media_payload(options, param_map, data, ai, image_only=False): payload = { 'Image': options.get('image_url') } @@ -2239,6 +2238,12 @@ class RedfishUtils(object): options.get(option), option, allowable)} payload[param] = options.get(option) + + # Some hardware (such as iLO 4 or Supermicro) only supports the Image property + # Inserted and WriteProtected are not writable + if image_only: + del payload['Inserted'] + del payload['WriteProtected'] return payload def virtual_media_insert_via_patch(self, options, param_map, uri, data, image_only=False): @@ -2247,16 +2252,10 @@ class RedfishUtils(object): {'AllowableValues': v}) for k, v in data.items() if k.endswith('@Redfish.AllowableValues')) # construct payload - payload = self._insert_virt_media_payload(options, param_map, data, ai) - if 'Inserted' not in payload: + payload = self._insert_virt_media_payload(options, param_map, data, ai, image_only) + if 'Inserted' not in payload and not image_only: payload['Inserted'] = True - # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation - # Inserted and WriteProtected are not writable - if image_only: - del payload['Inserted'] - del payload['WriteProtected'] - # PATCH the resource response = self.patch_request(self.root_uri + uri, payload) if response['ret'] is False: @@ -2292,6 +2291,13 @@ class RedfishUtils(object): if data["FirmwareVersion"].startswith("iLO 4"): image_only = True + # Supermicro does also not support Inserted and WriteProtected + # Supermicro uses as firmware version only a number so we can't check for it because we + # can't be sure that this firmware version is nut used by another vendor + # Tested with Supermicro Firmware 01.74.02 + if 'Supermicro' in data['Oem']: + image_only = True + virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: @@ -2346,7 +2352,7 @@ class RedfishUtils(object): # get ActionInfo or AllowableValues ai = self._get_all_action_info_values(action) # construct payload - payload = self._insert_virt_media_payload(options, param_map, data, ai) + payload = self._insert_virt_media_payload(options, param_map, data, ai, image_only) # POST to action response = self.post_request(self.root_uri + action_uri, payload) if response['ret'] is False: @@ -2392,6 +2398,9 @@ class RedfishUtils(object): if data["FirmwareVersion"].startswith("iLO 4"): image_only = True + if 'Supermicro' in data['Oem']: + image_only = True + virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: From 45362d39a2955fcd22fe979bb901c816c97ff7ae Mon Sep 17 00:00:00 2001 From: ahussey-redhat <93101976+ahussey-redhat@users.noreply.github.com> Date: Tue, 21 Jun 2022 03:15:08 +1000 Subject: [PATCH 0088/2104] Add keyring and keyring_info modules (#4764) --- .github/BOTMETA.yml | 4 + meta/runtime.yml | 4 + plugins/modules/system/keyring.py | 270 ++++++++++++++++++ plugins/modules/system/keyring_info.py | 149 ++++++++++ tests/integration/targets/keyring/aliases | 1 + .../targets/keyring/tasks/main.yml | 95 ++++++ .../integration/targets/keyring/vars/main.yml | 3 + 7 files changed, 526 insertions(+) create mode 100644 plugins/modules/system/keyring.py create mode 100644 plugins/modules/system/keyring_info.py create mode 100644 tests/integration/targets/keyring/aliases create mode 100644 tests/integration/targets/keyring/tasks/main.yml create mode 100644 tests/integration/targets/keyring/vars/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 57f1732a02..ed5fd8eb15 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1070,6 +1070,10 @@ files: labels: interfaces_file $modules/system/iptables_state.py: maintainers: quidame + $modules/system/keyring.py: + maintainers: ahussey-redhat + $modules/system/keyring_info.py: + maintainers: ahussey-redhat $modules/system/shutdown.py: maintainers: nitzmahone samdoran aminvakil $modules/system/java_cert.py: diff --git a/meta/runtime.yml b/meta/runtime.yml index 14391a7e71..4c6c7823bb 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -608,6 +608,10 @@ plugin_routing: redirect: community.general.identity.keycloak.keycloak_role keycloak_user_federation: redirect: community.general.identity.keycloak.keycloak_user_federation + keyring: + redirect: community.general.system.keyring + keyring_info: + redirect: community.general.system.keyring_info kibana_plugin: redirect: community.general.database.misc.kibana_plugin kubevirt_cdi_upload: diff --git a/plugins/modules/system/keyring.py b/plugins/modules/system/keyring.py new file mode 100644 index 0000000000..7e89484a6c --- /dev/null +++ b/plugins/modules/system/keyring.py @@ -0,0 +1,270 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright: (c) 2022, Alexander Hussey +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +""" +Ansible Module - community.general.keyring +""" + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: keyring +version_added: 5.2.0 +author: + - Alexander Hussey (@ahussey-redhat) +short_description: Set or delete a passphrase using the Operating System's native keyring +description: >- + This module uses the L(keyring Python library, https://pypi.org/project/keyring/) + to set or delete passphrases for a given service and username from the OS' native keyring. +requirements: + - keyring (Python library) + - gnome-keyring (application - required for headless Gnome keyring access) + - dbus-run-session (application - required for headless Gnome keyring access) +options: + service: + description: The name of the service. + required: true + type: str + username: + description: The user belonging to the service. + required: true + type: str + user_password: + description: The password to set. + required: false + type: str + aliases: + - password + keyring_password: + description: Password to unlock keyring. + required: true + type: str + state: + description: Whether the password should exist. + required: false + default: present + type: str + choices: + - present + - absent +""" + +EXAMPLES = r""" +- name: Set a password for test/test1 + community.general.keyring: + service: test + username: test1 + user_password: "{{ user_password }}" + keyring_password: "{{ keyring_password }}" + +- name: Delete the password for test/test1 + community.general.keyring: + service: test + username: test1 + user_password: "{{ user_password }}" + keyring_password: "{{ keyring_password }}" + state: absent +""" + +try: + from shlex import quote +except ImportError: + from pipes import quote +import traceback + +from ansible.module_utils.basic import AnsibleModule, missing_required_lib + +try: + import keyring + + HAS_KEYRING = True +except ImportError: + HAS_KEYRING = False + KEYRING_IMP_ERR = traceback.format_exc() + + +def del_passphrase(module): + """ + Attempt to delete a passphrase in the keyring using the Python API and fallback to using a shell. + """ + if module.check_mode: + return None + try: + keyring.delete_password(module.params["service"], module.params["username"]) + return None + except keyring.errors.KeyringLocked as keyring_locked_err: # pylint: disable=unused-variable + delete_argument = ( + 'echo "%s" | gnome-keyring-daemon --unlock\nkeyring del %s %s\n' + % ( + quote(module.params["keyring_password"]), + quote(module.params["service"]), + quote(module.params["username"]), + ) + ) + dummy, dummy, stderr = module.run_command( + "dbus-run-session -- /bin/bash", + use_unsafe_shell=True, + data=delete_argument, + encoding=None, + ) + + if not stderr.decode("UTF-8"): + return None + return stderr.decode("UTF-8") + + +def set_passphrase(module): + """ + Attempt to set passphrase in the keyring using the Python API and fallback to using a shell. + """ + if module.check_mode: + return None + try: + keyring.set_password( + module.params["service"], + module.params["username"], + module.params["user_password"], + ) + return None + except keyring.errors.KeyringLocked as keyring_locked_err: # pylint: disable=unused-variable + set_argument = ( + 'echo "%s" | gnome-keyring-daemon --unlock\nkeyring set %s %s\n%s\n' + % ( + quote(module.params["keyring_password"]), + quote(module.params["service"]), + quote(module.params["username"]), + quote(module.params["user_password"]), + ) + ) + dummy, dummy, stderr = module.run_command( + "dbus-run-session -- /bin/bash", + use_unsafe_shell=True, + data=set_argument, + encoding=None, + ) + if not stderr.decode("UTF-8"): + return None + return stderr.decode("UTF-8") + + +def get_passphrase(module): + """ + Attempt to retrieve passphrase from keyring using the Python API and fallback to using a shell. + """ + try: + passphrase = keyring.get_password( + module.params["service"], module.params["username"] + ) + return passphrase + except keyring.errors.KeyringLocked: + pass + except keyring.errors.InitError: + pass + except AttributeError: + pass + get_argument = 'echo "%s" | gnome-keyring-daemon --unlock\nkeyring get %s %s\n' % ( + quote(module.params["keyring_password"]), + quote(module.params["service"]), + quote(module.params["username"]), + ) + dummy, stdout, dummy = module.run_command( + "dbus-run-session -- /bin/bash", + use_unsafe_shell=True, + data=get_argument, + encoding=None, + ) + try: + return stdout.decode("UTF-8").splitlines()[1] # Only return the line containing the password + except IndexError: + return None + + +def run_module(): + """ + Attempts to retrieve a passphrase from a keyring. + """ + result = dict( + changed=False, + msg="", + ) + + module_args = dict( + service=dict(type="str", required=True), + username=dict(type="str", required=True), + keyring_password=dict(type="str", required=True, no_log=True), + user_password=dict( + type="str", required=False, no_log=True, aliases=["password"] + ), + state=dict( + type="str", required=False, default="present", choices=["absent", "present"] + ), + ) + + module = AnsibleModule(argument_spec=module_args, supports_check_mode=True) + + if not HAS_KEYRING: + module.fail_json(msg=missing_required_lib("keyring"), exception=KEYRING_IMP_ERR) + + passphrase = get_passphrase(module) + if module.params["state"] == "present": + if passphrase is not None: + if passphrase == module.params["user_password"]: + result["msg"] = "Passphrase already set for %s@%s" % ( + module.params["service"], + module.params["username"], + ) + if passphrase != module.params["user_password"]: + set_result = set_passphrase(module) + if set_result is None: + result["changed"] = True + result["msg"] = "Passphrase has been updated for %s@%s" % ( + module.params["service"], + module.params["username"], + ) + if set_result is not None: + module.fail_json(msg=set_result) + if passphrase is None: + set_result = set_passphrase(module) + if set_result is None: + result["changed"] = True + result["msg"] = "Passphrase has been updated for %s@%s" % ( + module.params["service"], + module.params["username"], + ) + if set_result is not None: + module.fail_json(msg=set_result) + + if module.params["state"] == "absent": + if not passphrase: + result["result"] = "Passphrase already absent for %s@%s" % ( + module.params["service"], + module.params["username"], + ) + if passphrase: + del_result = del_passphrase(module) + if del_result is None: + result["changed"] = True + result["msg"] = "Passphrase has been removed for %s@%s" % ( + module.params["service"], + module.params["username"], + ) + if del_result is not None: + module.fail_json(msg=del_result) + + module.exit_json(**result) + + +def main(): + """ + main module loop + """ + run_module() + + +if __name__ == "__main__": + main() diff --git a/plugins/modules/system/keyring_info.py b/plugins/modules/system/keyring_info.py new file mode 100644 index 0000000000..4d3e5ee995 --- /dev/null +++ b/plugins/modules/system/keyring_info.py @@ -0,0 +1,149 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright: (c) 2022, Alexander Hussey +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +""" +Ansible Module - community.general.keyring_info +""" + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = r""" +--- +module: keyring_info +version_added: 5.2.0 +author: + - Alexander Hussey (@ahussey-redhat) +short_description: Get a passphrase using the Operating System's native keyring +description: >- + This module uses the L(keyring Python library, https://pypi.org/project/keyring/) + to retrieve passphrases for a given service and username from the OS' native keyring. +requirements: + - keyring (Python library) + - gnome-keyring (application - required for headless Linux keyring access) + - dbus-run-session (application - required for headless Linux keyring access) +options: + service: + description: The name of the service. + required: true + type: str + username: + description: The user belonging to the service. + required: true + type: str + keyring_password: + description: Password to unlock keyring. + required: true + type: str +""" + +EXAMPLES = r""" + - name: Retrieve password for service_name/user_name + community.general.keyring_info: + service: test + username: test1 + keyring_password: "{{ keyring_password }}" + register: test_password + + - name: Display password + ansible.builtin.debug: + msg: "{{ test_password.passphrase }}" +""" + +RETURN = r""" + passphrase: + description: A string containing the password. + returned: success and the password exists + type: str + sample: Password123 +""" + +try: + from shlex import quote +except ImportError: + from pipes import quote +import traceback + +from ansible.module_utils.basic import AnsibleModule, missing_required_lib + +try: + import keyring + + HAS_KEYRING = True +except ImportError: + HAS_KEYRING = False + KEYRING_IMP_ERR = traceback.format_exc() + + +def _alternate_retrieval_method(module): + get_argument = 'echo "%s" | gnome-keyring-daemon --unlock\nkeyring get %s %s\n' % ( + quote(module.params["keyring_password"]), + quote(module.params["service"]), + quote(module.params["username"]), + ) + dummy, stdout, dummy = module.run_command( + "dbus-run-session -- /bin/bash", + use_unsafe_shell=True, + data=get_argument, + encoding=None, + ) + try: + return stdout.decode("UTF-8").splitlines()[1] + except IndexError: + return None + + +def run_module(): + """ + Attempts to retrieve a passphrase from a keyring. + """ + result = dict(changed=False, msg="") + + module_args = dict( + service=dict(type="str", required=True), + username=dict(type="str", required=True), + keyring_password=dict(type="str", required=True, no_log=True), + ) + + module = AnsibleModule(argument_spec=module_args, supports_check_mode=True) + + if not HAS_KEYRING: + module.fail_json(msg=missing_required_lib("keyring"), exception=KEYRING_IMP_ERR) + try: + passphrase = keyring.get_password( + module.params["service"], module.params["username"] + ) + except keyring.errors.KeyringLocked: + pass + except keyring.errors.InitError: + pass + except AttributeError: + pass + passphrase = _alternate_retrieval_method(module) + + if passphrase is not None: + result["msg"] = "Successfully retrieved password for %s@%s" % ( + module.params["service"], + module.params["username"], + ) + result["passphrase"] = passphrase + if passphrase is None: + result["msg"] = "Password for %s@%s does not exist." % ( + module.params["service"], + module.params["username"], + ) + module.exit_json(**result) + + +def main(): + """ + main module loop + """ + run_module() + + +if __name__ == "__main__": + main() diff --git a/tests/integration/targets/keyring/aliases b/tests/integration/targets/keyring/aliases new file mode 100644 index 0000000000..ad7ccf7ada --- /dev/null +++ b/tests/integration/targets/keyring/aliases @@ -0,0 +1 @@ +unsupported diff --git a/tests/integration/targets/keyring/tasks/main.yml b/tests/integration/targets/keyring/tasks/main.yml new file mode 100644 index 0000000000..f4911b25a9 --- /dev/null +++ b/tests/integration/targets/keyring/tasks/main.yml @@ -0,0 +1,95 @@ +--- +- name: Ensure required packages for headless keyring access are installed (RPM) + ansible.builtin.package: + name: gnome-keyring + become: true + when: "'localhost' not in inventory_hostname" + +- name: Ensure keyring is installed (RPM) + ansible.builtin.dnf: + name: python3-keyring + state: present + become: true + when: ansible_facts['os_family'] == 'RedHat' + +- name: Ensure keyring is installed (pip) + ansible.builtin.pip: + name: keyring + state: present + become: true + when: ansible_facts['os_family'] != 'RedHat' + +# Set password for new account +# Expected result: success +- name: Set password for test/test1 + community.general.keyring: + service: test + username: test1 + user_password: "{{ user_password }}" + keyring_password: "{{ keyring_password }}" + register: set_password + +- name: Assert that the password has been set + ansible.builtin.assert: + that: + - set_password.msg == "Passphrase has been updated for test@test1" + +# Print out password to confirm it has been set +# Expected result: success +- name: Retrieve password for test/test1 + community.general.keyring_info: + service: test + username: test1 + keyring_password: "{{ keyring_password }}" + register: test_set_password + +- name: Assert that the password exists + ansible.builtin.assert: + that: + - test_set_password.passphrase == user_password + +# Attempt to set password again +# Expected result: success - nothing should happen +- name: Attempt to re-set password for test/test1 + community.general.keyring: + service: test + username: test1 + user_password: "{{ user_password }}" + keyring_password: "{{ keyring_password }}" + register: second_set_password + +- name: Assert that the password has not been changed + ansible.builtin.assert: + that: + - second_set_password.msg == "Passphrase already set for test@test1" + +# Delete account +# Expected result: success +- name: Delete password for test/test1 + community.general.keyring: + service: test + username: test1 + user_password: "{{ user_password }}" + keyring_password: "{{ keyring_password }}" + state: absent + register: del_password + +- name: Assert that the password has been deleted + ansible.builtin.assert: + that: + - del_password.msg == "Passphrase has been removed for test@test1" + +# Attempt to get deleted account (to confirm it has been deleted). +# Don't use `no_log` as run completes due to failed task. +# Expected result: fail +- name: Retrieve password for test/test1 + community.general.keyring_info: + service: test + username: test1 + keyring_password: "{{ keyring_password }}" + register: test_del_password + +- name: Assert that the password no longer exists + ansible.builtin.assert: + that: + - test_del_password.passphrase is not defined \ No newline at end of file diff --git a/tests/integration/targets/keyring/vars/main.yml b/tests/integration/targets/keyring/vars/main.yml new file mode 100644 index 0000000000..f1eb1f80e5 --- /dev/null +++ b/tests/integration/targets/keyring/vars/main.yml @@ -0,0 +1,3 @@ +--- +keyring_password: Password123 +user_password: Test123 From 97c72f88b7e4c2e3c9a28fff7aa112225536d953 Mon Sep 17 00:00:00 2001 From: Jon Ellis Date: Tue, 21 Jun 2022 11:41:24 +0100 Subject: [PATCH 0089/2104] Sudoers validate (#4794) * Use visudo to validate sudoers rules before use * Replace use of subprocess.Popen with module.run_command * Switch out apt for package * Check file mode when verifying file to determine whether something needs to change * Only install sudo package for debian and redhat environments (when testing) * Attempt to install sudo on FreeBSD too * Try just installing sudo for non-darwin machines * Don't validate file ownership * Attempt to install sudo on all platforms * Revert "Attempt to install sudo on all platforms" This reverts commit b9562a8916c1f3e57f097e74a3db0de8794f67df. * Remove file permissions changes from this PR * Add changelog fragment for 4794 sudoers validation * Add option to control when sudoers validation is used * Update changelog fragment Co-authored-by: Felix Fontein * Add version_added to validation property Co-authored-by: Felix Fontein * Also validate failed sudoers validation error message Co-authored-by: Felix Fontein * Make visudo not executable instead of trying to delete it * Update edge case validation * Write invalid sudoers file to alternative path to avoid breaking sudo * Don't try to remove or otherwise modify visudo on Darwin * Update plugins/modules/system/sudoers.py Co-authored-by: Felix Fontein * Remove trailing extra empty line to appease sanity checker Co-authored-by: Felix Fontein --- .../fragments/4794-sudoers-validation.yml | 2 + plugins/modules/system/sudoers.py | 32 +++++++++ .../targets/sudoers/tasks/main.yml | 69 ++++++++++++++++++- 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/4794-sudoers-validation.yml diff --git a/changelogs/fragments/4794-sudoers-validation.yml b/changelogs/fragments/4794-sudoers-validation.yml new file mode 100644 index 0000000000..32caacdc36 --- /dev/null +++ b/changelogs/fragments/4794-sudoers-validation.yml @@ -0,0 +1,2 @@ +minor_changes: + - sudoers - will attempt to validate the proposed sudoers rule using visudo if available, optionally skipped, or required (https://github.com/ansible-collections/community.general/pull/4794, https://github.com/ansible-collections/community.general/issues/4745). diff --git a/plugins/modules/system/sudoers.py b/plugins/modules/system/sudoers.py index d96716c7f9..3b46f108f8 100644 --- a/plugins/modules/system/sudoers.py +++ b/plugins/modules/system/sudoers.py @@ -65,6 +65,15 @@ options: - The name of the user for the sudoers rule. - This option cannot be used in conjunction with I(group). type: str + validation: + description: + - If C(absent), the sudoers rule will be added without validation. + - If C(detect) and visudo is available, then the sudoers rule will be validated by visudo. + - If C(required), visudo must be available to validate the sudoers rule. + type: str + default: detect + choices: [ absent, detect, required ] + version_added: 5.2.0 ''' EXAMPLES = ''' @@ -118,6 +127,8 @@ class Sudoers(object): FILE_MODE = 0o440 def __init__(self, module): + self.module = module + self.check_mode = module.check_mode self.name = module.params['name'] self.user = module.params['user'] @@ -128,6 +139,7 @@ class Sudoers(object): self.sudoers_path = module.params['sudoers_path'] self.file = os.path.join(self.sudoers_path, self.name) self.commands = module.params['commands'] + self.validation = module.params['validation'] def write(self): if self.check_mode: @@ -167,6 +179,20 @@ class Sudoers(object): runas_str = '({runas})'.format(runas=self.runas) if self.runas is not None else '' return "{owner} ALL={runas}{nopasswd} {commands}\n".format(owner=owner, runas=runas_str, nopasswd=nopasswd_str, commands=commands_str) + def validate(self): + if self.validation == 'absent': + return + + visudo_path = self.module.get_bin_path('visudo', required=self.validation == 'required') + if visudo_path is None: + return + + check_command = [visudo_path, '-c', '-f', '-'] + rc, stdout, stderr = self.module.run_command(check_command, data=self.content()) + + if rc != 0: + raise Exception('Failed to validate sudoers rule:\n{stdout}'.format(stdout=stdout)) + def run(self): if self.state == 'absent': if self.exists(): @@ -175,6 +201,8 @@ class Sudoers(object): else: return False + self.validate() + if self.exists() and self.matches(): return False @@ -209,6 +237,10 @@ def main(): 'choices': ['present', 'absent'], }, 'user': {}, + 'validation': { + 'default': 'detect', + 'choices': ['absent', 'detect', 'required'] + }, } module = AnsibleModule( diff --git a/tests/integration/targets/sudoers/tasks/main.yml b/tests/integration/targets/sudoers/tasks/main.yml index f3be2d8092..292aeec4e4 100644 --- a/tests/integration/targets/sudoers/tasks/main.yml +++ b/tests/integration/targets/sudoers/tasks/main.yml @@ -1,11 +1,16 @@ --- # Initialise environment -- name: Register sudoers.d directory +- name: Register variables set_fact: sudoers_path: /etc/sudoers.d alt_sudoers_path: /etc/sudoers_alt +- name: Install sudo package + ansible.builtin.package: + name: sudo + when: ansible_os_family != 'Darwin' + - name: Ensure sudoers directory exists ansible.builtin.file: path: "{{ sudoers_path }}" @@ -135,6 +140,52 @@ register: revoke_rule_1_stat +# Validation testing + +- name: Attempt command without full path to executable + community.general.sudoers: + name: edge-case-1 + state: present + user: alice + commands: systemctl + ignore_errors: true + register: edge_case_1 + + +- name: Attempt command without full path to executable, but disabling validation + community.general.sudoers: + name: edge-case-2 + state: present + user: alice + commands: systemctl + validation: absent + sudoers_path: "{{ alt_sudoers_path }}" + register: edge_case_2 + +- name: find visudo + command: + cmd: which visudo + register: which_visudo + when: ansible_os_family != 'Darwin' + +- name: Prevent visudo being executed + file: + path: "{{ which_visudo.stdout }}" + mode: '-x' + when: ansible_os_family != 'Darwin' + +- name: Attempt command without full path to executable, but enforcing validation with no visudo present + community.general.sudoers: + name: edge-case-3 + state: present + user: alice + commands: systemctl + validation: required + ignore_errors: true + when: ansible_os_family != 'Darwin' + register: edge_case_3 + + - name: Revoke non-existing rule community.general.sudoers: name: non-existing-rule @@ -175,8 +226,22 @@ - "rule_5_contents['content'] | b64decode == 'alice ALL=NOPASSWD: /usr/local/bin/command\n'" - "rule_6_contents['content'] | b64decode == 'alice ALL=(bob)NOPASSWD: /usr/local/bin/command\n'" -- name: Check stats +- name: Check revocation stat ansible.builtin.assert: that: - not revoke_rule_1_stat.stat.exists - not revoke_non_existing_rule_stat.stat.exists + +- name: Check edge case responses + ansible.builtin.assert: + that: + - edge_case_1 is failed + - "'Failed to validate sudoers rule' in edge_case_1.msg" + - edge_case_2 is not failed + +- name: Check missing validation edge case + ansible.builtin.assert: + that: + - edge_case_3 is failed + - "'Failed to find required executable' in edge_case_3.msg" + when: ansible_os_family != 'Darwin' From 297de3011c954d8ba274737968e8f26224ede984 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 21 Jun 2022 14:12:21 +0200 Subject: [PATCH 0090/2104] Fix CI due to pycdlib dropping Python 2 support. (#4865) --- tests/integration/targets/iso_create/meta/main.yml | 1 + tests/integration/targets/iso_create/tasks/main.yml | 1 + tests/utils/constraints.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/integration/targets/iso_create/meta/main.yml b/tests/integration/targets/iso_create/meta/main.yml index 56bc554611..a121ba3e47 100644 --- a/tests/integration/targets/iso_create/meta/main.yml +++ b/tests/integration/targets/iso_create/meta/main.yml @@ -1,3 +1,4 @@ dependencies: - setup_pkg_mgr - setup_remote_tmp_dir + - setup_remote_constraints diff --git a/tests/integration/targets/iso_create/tasks/main.yml b/tests/integration/targets/iso_create/tasks/main.yml index 0e21e01aef..f55b94543c 100644 --- a/tests/integration/targets/iso_create/tasks/main.yml +++ b/tests/integration/targets/iso_create/tasks/main.yml @@ -10,6 +10,7 @@ pip: name: pycdlib # state: latest + extra_args: "-c {{ remote_constraints }}" register: install_pycdlib - debug: var=install_pycdlib diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index 395e0096e4..876f4dd36c 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -49,6 +49,7 @@ cffi >= 1.14.2, != 1.14.3 # Yanked version which older versions of pip will stil redis == 2.10.6 ; python_version < '2.7' redis < 4.0.0 ; python_version >= '2.7' and python_version < '3.6' redis ; python_version >= '3.6' +pycdlib < 1.13.0 ; python_version < '3' # 1.13.0 does not work with Python 2, while not declaring that # freeze pylint and its requirements for consistent test results astroid == 2.2.5 From 1eee35dffbaf5952e4a24da750c008092dfc8ba3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 21 Jun 2022 21:39:00 +0200 Subject: [PATCH 0091/2104] Disable opentelemetry installation for unit tests. (#4871) --- tests/unit/requirements.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt index 59ea49ed90..932aa1d4fd 100644 --- a/tests/unit/requirements.txt +++ b/tests/unit/requirements.txt @@ -29,10 +29,11 @@ dnsimple >= 2 ; python_version >= '3.6' dataclasses ; python_version == '3.6' # requirement for the opentelemetry callback plugin -# WARNING: these libraries depend on grpcio, which takes 7 minutes (!) to build in CI on Python 3.10 -opentelemetry-api ; python_version >= '3.6' and python_version < '3.10' -opentelemetry-exporter-otlp ; python_version >= '3.6' and python_version < '3.10' -opentelemetry-sdk ; python_version >= '3.6' and python_version < '3.10' +# WARNING: these libraries rely on Protobuf for Python, which regularly stops installing. +# That's why they are disabled for now. +# opentelemetry-api ; python_version >= '3.6' and python_version < '3.10' +# opentelemetry-exporter-otlp ; python_version >= '3.6' and python_version < '3.10' +# opentelemetry-sdk ; python_version >= '3.6' and python_version < '3.10' # requirement for the elastic callback plugin elastic-apm ; python_version >= '3.6' From be79a8c69ff9c61efff3db47aeb7d7a843d34710 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 21 Jun 2022 22:25:18 +0200 Subject: [PATCH 0092/2104] Next expected minor release is 5.3.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index caee2e126f..14d05eeeda 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: community name: general -version: 5.2.0 +version: 5.3.0 readme: README.md authors: - Ansible (https://github.com/ansible) From cb58867b57c4ea8413763791a535d07c574635f6 Mon Sep 17 00:00:00 2001 From: Ricky White Date: Tue, 21 Jun 2022 16:26:23 -0400 Subject: [PATCH 0093/2104] Added additional maintainers for TSS and DSV lookup plugins (#4870) --- .github/BOTMETA.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index ed5fd8eb15..cdfa7dc342 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -214,7 +214,7 @@ files: $lookups/dnstxt.py: maintainers: jpmens $lookups/dsv.py: - maintainers: amigus endlesstrax + maintainers: amigus endlesstrax delineaKrehl tylerezimmerman $lookups/etcd3.py: maintainers: eric-belhomme $lookups/etcd.py: @@ -251,7 +251,7 @@ files: maintainers: RevBits $lookups/shelvefile.py: {} $lookups/tss.py: - maintainers: amigus endlesstrax + maintainers: amigus endlesstrax delineaKrehl tylerezimmerman $module_utils/: labels: module_utils $module_utils/gconftool2.py: From cc9393cecd753c064200c68be8d82cafe46278a9 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 12:49:39 +0200 Subject: [PATCH 0094/2104] Add empty PR docs workflow. (#4879) --- .github/workflows/docs-pr.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/docs-pr.yml diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml new file mode 100644 index 0000000000..665a12d4fd --- /dev/null +++ b/.github/workflows/docs-pr.yml @@ -0,0 +1,9 @@ +name: Collection Docs +concurrency: + group: docs-${{ github.head_ref }} + cancel-in-progress: true +on: + pull_request_target: + types: [opened, synchronize, reopened, closed] + +jobs: {} From de62516b323ad430933a07147a05d1c6750acca3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 12:52:24 +0200 Subject: [PATCH 0095/2104] Fix workflow. --- .github/workflows/docs-pr.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 665a12d4fd..4f486665f4 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -6,4 +6,12 @@ on: pull_request_target: types: [opened, synchronize, reopened, closed] -jobs: {} +jobs: + build-docs: + permissions: + contents: read + name: Build Ansible Docs + steps: + - name: Do nothing + run: + echo hi From d4076a1e0d83c34f06589a7cd7e264d12bbe7824 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 12:54:05 +0200 Subject: [PATCH 0096/2104] Forgot 'runs-on'. --- .github/workflows/docs-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 4f486665f4..5051d41815 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -11,6 +11,7 @@ jobs: permissions: contents: read name: Build Ansible Docs + runs-on: ubuntu-latest steps: - name: Do nothing run: From 3b8c58a3011c5583acda5e8999cc0727aaf5cb24 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 13:00:05 +0200 Subject: [PATCH 0097/2104] Add PR docs workflow. (#4878) --- .github/workflows/docs-pr.yml | 64 +++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 5051d41815..afe4313288 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -11,8 +11,66 @@ jobs: permissions: contents: read name: Build Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main + with: + init-fail-on-error: true + ansible-ref: stable-2.13 + provide-link-targets: | + ansible_collections.ansible.builtin.dict2items_filter + ansible_collections.infoblox.nios_modules.nios_a_record_module + ansible_collections.infoblox.nios_modules.nios_aaaa_record_module + ansible_collections.infoblox.nios_modules.nios_cname_record_module + ansible_collections.infoblox.nios_modules.nios_dns_view_module + ansible_collections.infoblox.nios_modules.nios_fixed_address_module + ansible_collections.infoblox.nios_modules.nios_host_record_module + ansible_collections.infoblox.nios_modules.nios_lookup_lookup + ansible_collections.infoblox.nios_modules.nios_member_module + ansible_collections.infoblox.nios_modules.nios_mx_record_module + ansible_collections.infoblox.nios_modules.nios_naptr_record_module + ansible_collections.infoblox.nios_modules.nios_network_module + ansible_collections.infoblox.nios_modules.nios_network_view_module + ansible_collections.infoblox.nios_modules.nios_next_ip_lookup + ansible_collections.infoblox.nios_modules.nios_next_network_lookup + ansible_collections.infoblox.nios_modules.nios_nsgroup_module + ansible_collections.infoblox.nios_modules.nios_ptr_record_module + ansible_collections.infoblox.nios_modules.nios_srv_record_module + ansible_collections.infoblox.nios_modules.nios_txt_record_module + ansible_collections.infoblox.nios_modules.nios_zone_module + ansible_collections.ansible.builtin.path_join_filter + + comment: + permissions: + pull-requests: write runs-on: ubuntu-latest + needs: build-docs + name: PR comments steps: - - name: Do nothing - run: - echo hi + - name: PR comment + uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main + with: + body-includes: '## Docs Build' + reactions: heart + action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }} + on-closed-body: | + ## Docs Build 📝 + + This PR is closed and any previously published docsite has been unpublished. + on-merged-body: | + ## Docs Build 📝 + + Thank you for contribution!✨ + + This PR has been merged and your docs changes will be incorporated when they are next published. + body: | + ## Docs Build 📝 + + Thank you for contribution!✨ + + The docsite for **this PR** is available for download as an artifact from this run: + ${{ needs.build-docs.outputs.artifact-url }} + + File changes: + + ${{ needs.build-docs.outputs.diff-files-rendered }} + + ${{ needs.build-docs.outputs.diff-rendered }} From 343d04a7a604a7353921420109b43774bcd05d75 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 13:05:59 +0200 Subject: [PATCH 0098/2104] Update list of labels. --- .github/workflows/docs-pr.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index afe4313288..7210778a87 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -17,6 +17,14 @@ jobs: ansible-ref: stable-2.13 provide-link-targets: | ansible_collections.ansible.builtin.dict2items_filter + ansible_collections.ansible.builtin.path_join_filter + ansible_collections.community.kubevirt.kubevirt_cdi_upload_module + ansible_collections.community.kubevirt.kubevirt_inventory + ansible_collections.community.kubevirt.kubevirt_preset_module + ansible_collections.community.kubevirt.kubevirt_pvc_module + ansible_collections.community.kubevirt.kubevirt_rs_module + ansible_collections.community.kubevirt.kubevirt_template_module + ansible_collections.community.kubevirt.kubevirt_vm_module ansible_collections.infoblox.nios_modules.nios_a_record_module ansible_collections.infoblox.nios_modules.nios_aaaa_record_module ansible_collections.infoblox.nios_modules.nios_cname_record_module @@ -36,7 +44,6 @@ jobs: ansible_collections.infoblox.nios_modules.nios_srv_record_module ansible_collections.infoblox.nios_modules.nios_txt_record_module ansible_collections.infoblox.nios_modules.nios_zone_module - ansible_collections.ansible.builtin.path_join_filter comment: permissions: From aa4c994dfd06c8f619c29ee19029aad3e45f66c8 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 13:36:23 +0200 Subject: [PATCH 0099/2104] Fix docs. (#4881) --- plugins/callback/log_plays.py | 2 +- plugins/callback/selective.py | 4 ++-- plugins/lookup/chef_databag.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/callback/log_plays.py b/plugins/callback/log_plays.py index 2539bd9ade..3a9531096d 100644 --- a/plugins/callback/log_plays.py +++ b/plugins/callback/log_plays.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' type: notification short_description: write playbook output to log file description: - - This callback writes playbook output to a file per host in the `/var/log/ansible/hosts` directory + - This callback writes playbook output to a file per host in the C(/var/log/ansible/hosts) directory requirements: - Whitelist in configuration - A writeable /var/log/ansible/hosts directory by the user executing Ansible on the controller diff --git a/plugins/callback/selective.py b/plugins/callback/selective.py index 403eb84b33..944d8edc7c 100644 --- a/plugins/callback/selective.py +++ b/plugins/callback/selective.py @@ -14,9 +14,9 @@ DOCUMENTATION = ''' - set as main display callback short_description: only print certain tasks description: - - This callback only prints tasks that have been tagged with `print_action` or that have failed. + - This callback only prints tasks that have been tagged with C(print_action) or that have failed. This allows operators to focus on the tasks that provide value only. - - Tasks that are not printed are placed with a '.'. + - Tasks that are not printed are placed with a C(.). - If you increase verbosity all tasks are printed. options: nocolor: diff --git a/plugins/lookup/chef_databag.py b/plugins/lookup/chef_databag.py index f5ccc766c2..f3438f6206 100644 --- a/plugins/lookup/chef_databag.py +++ b/plugins/lookup/chef_databag.py @@ -16,7 +16,7 @@ DOCUMENTATION = ''' The lookup order mirrors the one from Chef, all folders in the base path are walked back looking for the following configuration file in order : .chef/knife.rb, ~/.chef/knife.rb, /etc/chef/client.rb" requirements: - - "pychef (python library https://pychef.readthedocs.io `pip install pychef`)" + - "pychef (L(Python library, https://pychef.readthedocs.io), C(pip install pychef))" options: name: description: From 8017cec8f62972f2a7bacb58397e1db8e5212047 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 22:07:32 +0200 Subject: [PATCH 0100/2104] Render docs diff with devel instead of stable-2.13. --- .github/workflows/docs-pr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 7210778a87..8860fdbfe5 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -14,7 +14,10 @@ jobs: uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main with: init-fail-on-error: true - ansible-ref: stable-2.13 + # We need to use devel instead of stable-2.13 since stable-2.13's ansible-doc does not list + # modules. devel's ansible-doc does (thanks to the sidecar docs PR). + ansible-ref: devel + # ansible-ref: stable-2.13 provide-link-targets: | ansible_collections.ansible.builtin.dict2items_filter ansible_collections.ansible.builtin.path_join_filter From 2dcdd2faca7c8522adead52b77ed1f4e07b864cb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Jun 2022 22:43:48 +0200 Subject: [PATCH 0101/2104] Fix various module docs. (#4887) --- plugins/modules/cloud/lxd/lxd_container.py | 4 ++-- plugins/modules/cloud/misc/serverless.py | 2 +- plugins/modules/cloud/misc/terraform.py | 12 ++++++------ plugins/modules/cloud/rackspace/rax_mon_check.py | 6 +++--- .../modules/cloud/scaleway/scaleway_user_data.py | 2 +- plugins/modules/clustering/consul/consul_kv.py | 14 +++++++------- .../modules/monitoring/datadog/datadog_event.py | 2 +- plugins/modules/net_tools/haproxy.py | 2 +- .../modules/packaging/language/pip_package_info.py | 2 +- plugins/modules/packaging/os/apk.py | 4 ++-- plugins/modules/packaging/os/homebrew.py | 6 +++--- plugins/modules/packaging/os/openbsd_pkg.py | 4 ++-- plugins/modules/packaging/os/pkgng.py | 4 ++-- plugins/modules/packaging/os/pulp_repo.py | 2 +- plugins/modules/packaging/os/zypper.py | 4 ++-- plugins/modules/remote_management/hpilo/hponcfg.py | 2 +- plugins/modules/source_control/hg.py | 2 +- plugins/modules/storage/zfs/zfs_delegate_admin.py | 2 +- plugins/modules/system/nosh.py | 2 +- plugins/modules/web_infrastructure/jira.py | 2 +- 20 files changed, 40 insertions(+), 40 deletions(-) diff --git a/plugins/modules/cloud/lxd/lxd_container.py b/plugins/modules/cloud/lxd/lxd_container.py index 27f8409bc8..a9503b657d 100644 --- a/plugins/modules/cloud/lxd/lxd_container.py +++ b/plugins/modules/cloud/lxd/lxd_container.py @@ -191,10 +191,10 @@ notes: 2.1, the later requires python to be installed in the instance which can be done with the command module. - You can copy a file from the host to the instance - with the Ansible M(ansible.builtin.copy) and M(ansible.builtin.template) module and the `lxd` connection plugin. + with the Ansible M(ansible.builtin.copy) and M(ansible.builtin.template) module and the C(community.general.lxd) connection plugin. See the example below. - You can copy a file in the created instance to the localhost - with `command=lxc file pull instance_name/dir/filename filename`. + with C(command=lxc file pull instance_name/dir/filename filename). See the first example below. ''' diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index fce6b77e16..c49699ca79 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -107,7 +107,7 @@ state: returned: always command: type: str - description: Full `serverless` command run by this module, in case you want to re-run the command outside the module. + description: Full C(serverless) command run by this module, in case you want to re-run the command outside the module. returned: always sample: serverless deploy --stage production ''' diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index 4bdf559511..a52a3125e9 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -67,7 +67,7 @@ options: state_file: description: - The path to an existing Terraform state file to use when building plan. - If this is not specified, the default `terraform.tfstate` will be used. + If this is not specified, the default C(terraform.tfstate) will be used. - This option is ignored when plan is specified. type: path variables_files: @@ -103,7 +103,7 @@ options: force_init: description: - To avoid duplicating infra, if a state file can't be found this will - force a `terraform init`. Generally, this should be turned off unless + force a C(terraform init). Generally, this should be turned off unless you intend to provision an entirely new Terraform deployment. default: false type: bool @@ -149,7 +149,7 @@ options: type: int version_added: '3.8.0' notes: - - To just run a `terraform plan`, use check mode. + - To just run a C(terraform plan), use check mode. requirements: [ "terraform" ] author: "Ryan Scott Brown (@ryansb)" ''' @@ -205,7 +205,7 @@ EXAMPLES = """ RETURN = """ outputs: type: complex - description: A dictionary of all the TF outputs by their assigned name. Use `.outputs.MyOutputName.value` to access the value. + description: A dictionary of all the TF outputs by their assigned name. Use C(.outputs.MyOutputName.value) to access the value. returned: on success sample: '{"bukkit_arn": {"sensitive": false, "type": "string", "value": "arn:aws:s3:::tf-test-bukkit"}' contains: @@ -223,12 +223,12 @@ outputs: description: The value of the output as interpolated by Terraform stdout: type: str - description: Full `terraform` command stdout, in case you want to display it or examine the event log + description: Full C(terraform) command stdout, in case you want to display it or examine the event log returned: always sample: '' command: type: str - description: Full `terraform` command built by this module, in case you want to re-run the command outside the module or debug a problem. + description: Full C(terraform) command built by this module, in case you want to re-run the command outside the module or debug a problem. returned: always sample: terraform apply ... """ diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index 17a3932f6e..04501b27b0 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -75,15 +75,15 @@ options: target_hostname: type: str description: - - One of `target_hostname` and `target_alias` is required for remote.* checks, + - One of I(target_hostname) and I(target_alias) is required for remote.* checks, but prohibited for agent.* checks. The hostname this check should target. Must be a valid IPv4, IPv6, or FQDN. target_alias: type: str description: - - One of `target_alias` and `target_hostname` is required for remote.* checks, + - One of I(target_alias) and I(target_hostname) is required for remote.* checks, but prohibited for agent.* checks. Use the corresponding key in the entity's - `ip_addresses` hash to resolve an IP address to target. + I(ip_addresses) hash to resolve an IP address to target. details: type: dict description: diff --git a/plugins/modules/cloud/scaleway/scaleway_user_data.py b/plugins/modules/cloud/scaleway/scaleway_user_data.py index 2848ec2c4a..c321f3009b 100644 --- a/plugins/modules/cloud/scaleway/scaleway_user_data.py +++ b/plugins/modules/cloud/scaleway/scaleway_user_data.py @@ -35,7 +35,7 @@ options: user_data: type: dict description: - - User defined data. Typically used with `cloud-init`. + - User defined data. Typically used with C(cloud-init). - Pass your cloud-init script here as a string required: false diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/clustering/consul/consul_kv.py index f7b33b856e..5b5d36671d 100644 --- a/plugins/modules/clustering/consul/consul_kv.py +++ b/plugins/modules/clustering/consul/consul_kv.py @@ -28,14 +28,14 @@ author: options: state: description: - - The action to take with the supplied key and value. If the state is 'present' and `value` is set, the key - contents will be set to the value supplied and `changed` will be set to `true` only if the value was - different to the current contents. If the state is 'present' and `value` is not set, the existing value - associated to the key will be returned. The state 'absent' will remove the key/value pair, - again 'changed' will be set to true only if the key actually existed + - The action to take with the supplied key and value. If the state is C(present) and I(value) is set, the key + contents will be set to the value supplied and C(changed) will be set to C(true) only if the value was + different to the current contents. If the state is C(present) and I(value) is not set, the existing value + associated to the key will be returned. The state C(absent) will remove the key/value pair, + again C(changed) will be set to true only if the key actually existed prior to the removal. An attempt can be made to obtain or free the - lock associated with a key/value pair with the states 'acquire' or - 'release' respectively. a valid session must be supplied to make the + lock associated with a key/value pair with the states C(acquire) or + C(release) respectively. a valid session must be supplied to make the attempt changed will be true if the attempt is successful, false otherwise. type: str diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/monitoring/datadog/datadog_event.py index 6284b5bf23..e45b900e6e 100644 --- a/plugins/modules/monitoring/datadog/datadog_event.py +++ b/plugins/modules/monitoring/datadog/datadog_event.py @@ -20,7 +20,7 @@ description: - "Allows to post events to Datadog (www.datadoghq.com) service." - "Uses http://docs.datadoghq.com/api/#events API." author: -- "Artūras `arturaz` Šlajus (@arturaz)" +- "Artūras 'arturaz' Šlajus (@arturaz)" - "Naoya Nakazawa (@n0ts)" options: api_key: diff --git a/plugins/modules/net_tools/haproxy.py b/plugins/modules/net_tools/haproxy.py index f736036671..edeb99da69 100644 --- a/plugins/modules/net_tools/haproxy.py +++ b/plugins/modules/net_tools/haproxy.py @@ -99,7 +99,7 @@ options: weight: description: - The value passed in argument. - - If the value ends with the `%` sign, then the new weight will be + - If the value ends with the C(%) sign, then the new weight will be relative to the initially configured weight. - Relative weights are only permitted between 0 and 100% and absolute weights are permitted between 0 and 256. diff --git a/plugins/modules/packaging/language/pip_package_info.py b/plugins/modules/packaging/language/pip_package_info.py index 25825cefb1..0082499da0 100644 --- a/plugins/modules/packaging/language/pip_package_info.py +++ b/plugins/modules/packaging/language/pip_package_info.py @@ -17,7 +17,7 @@ options: clients: description: - A list of the pip executables that will be used to get the packages. - They can be supplied with the full path or just the executable name, i.e `pip3.7`. + They can be supplied with the full path or just the executable name, for example C(pip3.7). default: ['pip'] required: False type: list diff --git a/plugins/modules/packaging/os/apk.py b/plugins/modules/packaging/os/apk.py index 74b738de27..4252d069e5 100644 --- a/plugins/modules/packaging/os/apk.py +++ b/plugins/modules/packaging/os/apk.py @@ -62,8 +62,8 @@ options: type: bool default: no notes: - - '"name" and "upgrade" are mutually exclusive.' - - When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option. + - 'I(name) and I(upgrade) are mutually exclusive.' + - When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the I(name) option. ''' EXAMPLES = ''' diff --git a/plugins/modules/packaging/os/homebrew.py b/plugins/modules/packaging/os/homebrew.py index db1feda78e..08fc1cdc58 100644 --- a/plugins/modules/packaging/os/homebrew.py +++ b/plugins/modules/packaging/os/homebrew.py @@ -35,7 +35,7 @@ options: elements: str path: description: - - "A ':' separated list of paths to search for 'brew' executable. + - "A C(:) separated list of paths to search for C(brew) executable. Since a package (I(formula) in homebrew parlance) location is prefixed relative to the actual path of I(brew) command, providing an alternative I(brew) path enables managing different set of packages in an alternative location in the system." default: '/usr/local/bin:/opt/homebrew/bin' @@ -70,8 +70,8 @@ options: elements: str version_added: '0.2.0' notes: - - When used with a `loop:` each package will be processed individually, - it is much more efficient to pass the list directly to the `name` option. + - When used with a C(loop:) each package will be processed individually, + it is much more efficient to pass the list directly to the I(name) option. ''' EXAMPLES = ''' diff --git a/plugins/modules/packaging/os/openbsd_pkg.py b/plugins/modules/packaging/os/openbsd_pkg.py index 6943569f8d..e72b7c007a 100644 --- a/plugins/modules/packaging/os/openbsd_pkg.py +++ b/plugins/modules/packaging/os/openbsd_pkg.py @@ -70,8 +70,8 @@ options: type: bool default: no notes: - - When used with a `loop:` each package will be processed individually, - it is much more efficient to pass the list directly to the `name` option. + - When used with a C(loop:) each package will be processed individually, + it is much more efficient to pass the list directly to the I(name) option. ''' EXAMPLES = ''' diff --git a/plugins/modules/packaging/os/pkgng.py b/plugins/modules/packaging/os/pkgng.py index ff7e45fa96..3ec8466c17 100644 --- a/plugins/modules/packaging/os/pkgng.py +++ b/plugins/modules/packaging/os/pkgng.py @@ -102,8 +102,8 @@ options: author: "bleader (@bleader)" notes: - When using pkgsite, be careful that already in cache packages won't be downloaded again. - - When used with a `loop:` each package will be processed individually, - it is much more efficient to pass the list directly to the `name` option. + - When used with a C(loop:) each package will be processed individually, + it is much more efficient to pass the list directly to the I(name) option. ''' EXAMPLES = ''' diff --git a/plugins/modules/packaging/os/pulp_repo.py b/plugins/modules/packaging/os/pulp_repo.py index d14d84451b..c363f01db7 100644 --- a/plugins/modules/packaging/os/pulp_repo.py +++ b/plugins/modules/packaging/os/pulp_repo.py @@ -119,7 +119,7 @@ options: repoview: description: - Whether to generate repoview files for a published repository. Setting - this to "yes" automatically activates `generate_sqlite`. + this to "yes" automatically activates C(generate_sqlite). required: false type: bool default: no diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/packaging/os/zypper.py index 07d71169ec..627ae50cc7 100644 --- a/plugins/modules/packaging/os/zypper.py +++ b/plugins/modules/packaging/os/zypper.py @@ -136,8 +136,8 @@ options: - Adds C(--clean-deps) option to I(zypper) remove command. version_added: '4.6.0' notes: - - When used with a `loop:` each package will be processed individually, - it is much more efficient to pass the list directly to the `name` option. + - When used with a C(loop:) each package will be processed individually, + it is much more efficient to pass the list directly to the I(name) option. # informational: requirements for nodes requirements: - "zypper >= 1.0 # included in openSUSE >= 11.1 or SUSE Linux Enterprise Server/Desktop >= 11.0" diff --git a/plugins/modules/remote_management/hpilo/hponcfg.py b/plugins/modules/remote_management/hpilo/hponcfg.py index 98d11dd8b9..937d7239b1 100644 --- a/plugins/modules/remote_management/hpilo/hponcfg.py +++ b/plugins/modules/remote_management/hpilo/hponcfg.py @@ -29,7 +29,7 @@ options: type: str executable: description: - - Path to the hponcfg executable (`hponcfg` which uses $PATH). + - Path to the hponcfg executable (C(hponcfg) which uses $PATH). default: hponcfg type: str verbose: diff --git a/plugins/modules/source_control/hg.py b/plugins/modules/source_control/hg.py index 572b036e1f..3154d06273 100644 --- a/plugins/modules/source_control/hg.py +++ b/plugins/modules/source_control/hg.py @@ -36,7 +36,7 @@ options: force: description: - Discards uncommitted changes. Runs C(hg update -C). Prior to - 1.9, the default was `yes`. + 1.9, the default was C(yes). type: bool default: 'no' purge: diff --git a/plugins/modules/storage/zfs/zfs_delegate_admin.py b/plugins/modules/storage/zfs/zfs_delegate_admin.py index ead4041150..8ebe702fcb 100644 --- a/plugins/modules/storage/zfs/zfs_delegate_admin.py +++ b/plugins/modules/storage/zfs/zfs_delegate_admin.py @@ -17,7 +17,7 @@ description: - See the C(zfs allow) section of C(zfs(1M)) for detailed explanations of options. - This module attempts to adhere to the behavior of the command line tool as much as possible. requirements: - - "A ZFS/OpenZFS implementation that supports delegation with `zfs allow`, including: Solaris >= 10, illumos (all + - "A ZFS/OpenZFS implementation that supports delegation with C(zfs allow), including: Solaris >= 10, illumos (all versions), FreeBSD >= 8.0R, ZFS on Linux >= 0.7.0." options: name: diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index 1f9f2806c6..dbaf7ea59f 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -129,7 +129,7 @@ state: type: str sample: "reloaded" status: - description: a dictionary with the key=value pairs returned by `system-control show-json` or C(None) if the service is not loaded + description: A dictionary with the key=value pairs returned by C(system-control show-json) or C(None) if the service is not loaded returned: success type: complex contains: diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index d6c7653835..cd7f2ca8bf 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -186,7 +186,7 @@ options: validate_certs: required: false description: - - Require valid SSL certificates (set to `false` if you'd like to use self-signed certificates) + - Require valid SSL certificates (set to C(false) if you'd like to use self-signed certificates) default: true type: bool From 265c052c27f5d3d1b2fc80a771172f32140d0140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Garc=C3=ADa=20Ja=C3=A9n?= Date: Thu, 30 Jun 2022 07:08:55 +0200 Subject: [PATCH 0102/2104] Fix command variable usage in CmdRunner (#4903) * Fix command variable usage * Add changelog fragment for cmd-runner bugfix (#4903) --- changelogs/fragments/4903-cmdrunner-bugfix.yaml | 2 ++ plugins/module_utils/cmd_runner.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4903-cmdrunner-bugfix.yaml diff --git a/changelogs/fragments/4903-cmdrunner-bugfix.yaml b/changelogs/fragments/4903-cmdrunner-bugfix.yaml new file mode 100644 index 0000000000..6ed2ec9fa2 --- /dev/null +++ b/changelogs/fragments/4903-cmdrunner-bugfix.yaml @@ -0,0 +1,2 @@ +bugfixes: + - cmd_runner module utils - fix bug caused by using the ``command`` variable instead of ``self.command`` when looking for binary path (https://github.com/ansible-collections/community.general/pull/4903). diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index 6aec7b1a90..70187e68ed 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -191,7 +191,7 @@ class CmdRunner(object): environ_update = {} self.environ_update = environ_update - self.command[0] = module.get_bin_path(command[0], opt_dirs=path_prefix, required=True) + self.command[0] = module.get_bin_path(self.command[0], opt_dirs=path_prefix, required=True) for mod_param_name, spec in iteritems(module.argument_spec): if mod_param_name not in self.arg_formats: From 674b1da8bfde64aa42d8fbc230ccad21bc5c1a6c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 30 Jun 2022 07:30:12 +0200 Subject: [PATCH 0103/2104] Improve hwclock support test. (#4904) --- tests/integration/targets/timezone/tasks/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/timezone/tasks/test.yml b/tests/integration/targets/timezone/tasks/test.yml index ec0d854df0..1b944fb925 100644 --- a/tests/integration/targets/timezone/tasks/test.yml +++ b/tests/integration/targets/timezone/tasks/test.yml @@ -287,7 +287,7 @@ - name: set_fact: - hwclock_supported: '{{ hwclock_test is successful or timedatectl_test is successful }}' + hwclock_supported: '{{ hwclock_test is successful or (timedatectl_test is successful and "RTC time: n/a" not in timedatectl_test.stdout) }}' ## ## test set hwclock, idempotency and checkmode ## From 93dcd3f54da29804895a6578c0cc5a0b7d5c961a Mon Sep 17 00:00:00 2001 From: Jacob Yundt Date: Thu, 30 Jun 2022 14:35:35 -0400 Subject: [PATCH 0104/2104] Add GetFirmwareVersion command to redfish_info (#4900) * Add GetManagerInventory command to redfish_info Adding GetManagerInventory command to redfish_info, similar to GetSystemInventory to report Manager specific information like: - FirmwareVersion - Model - ManagerType Fixes #4899 * Update changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...d-GetManagerInventory-for-redfish_info.yml | 2 ++ plugins/module_utils/redfish_utils.py | 23 +++++++++++++++++++ .../remote_management/redfish/redfish_info.py | 12 +++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml diff --git a/changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml b/changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml new file mode 100644 index 0000000000..68c056c485 --- /dev/null +++ b/changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_info - add ``GetManagerInventory`` to report list of Manager inventory information (https://github.com/ansible-collections/community.general/issues/4899). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 0c5bc1b0de..927ce231e6 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -3029,3 +3029,26 @@ class RedfishUtils(object): if not result["entries"]: return {'ret': False, 'msg': "No HostInterface objects found"} return result + + def get_manager_inventory(self, manager_uri): + result = {} + inventory = {} + # Get these entries, but does not fail if not found + properties = ['FirmwareVersion', 'ManagerType', 'Manufacturer', 'Model', + 'PartNumber', 'PowerState', 'SerialNumber', 'Status', 'UUID'] + + response = self.get_request(self.root_uri + manager_uri) + if response['ret'] is False: + return response + result['ret'] = True + data = response['data'] + + for property in properties: + if property in data: + inventory[property] = data[property] + + result["entries"] = inventory + return result + + def get_multi_manager_inventory(self): + return self.aggregate_managers(self.get_manager_inventory) diff --git a/plugins/modules/remote_management/redfish/redfish_info.py b/plugins/modules/remote_management/redfish/redfish_info.py index 886b3f7da1..3ffefd2880 100644 --- a/plugins/modules/remote_management/redfish/redfish_info.py +++ b/plugins/modules/remote_management/redfish/redfish_info.py @@ -277,6 +277,14 @@ EXAMPLES = ''' baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" + + - name: Get Manager Inventory + community.general.redfish_info: + category: Manager + command: GetManagerInventory + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" ''' RETURN = ''' @@ -301,7 +309,7 @@ CATEGORY_COMMANDS_ALL = { "Sessions": ["GetSessions"], "Update": ["GetFirmwareInventory", "GetFirmwareUpdateCapabilities", "GetSoftwareInventory"], "Manager": ["GetManagerNicInventory", "GetVirtualMedia", "GetLogs", "GetNetworkProtocols", - "GetHealthReport", "GetHostInterfaces"], + "GetHealthReport", "GetHostInterfaces", "GetManagerInventory"], } CATEGORY_COMMANDS_DEFAULT = { @@ -485,6 +493,8 @@ def main(): result["health_report"] = rf_utils.get_multi_manager_health_report() elif command == "GetHostInterfaces": result["host_interfaces"] = rf_utils.get_hostinterfaces() + elif command == "GetManagerInventory": + result["manager"] = rf_utils.get_multi_manager_inventory() # Return data back module.exit_json(redfish_facts=result) From f60d12cf2d8361e487fee7ab260fca6b66f957a7 Mon Sep 17 00:00:00 2001 From: Jacob Yundt Date: Thu, 30 Jun 2022 14:36:01 -0400 Subject: [PATCH 0105/2104] Fix GetChassisPower when multiple chassis are present (#4902) * Fix GetChassisPower when multiple chassis are present When multiple chassis are present, and one or more of those chassis do _not_ report power information, the GetChassisPower command will fail. To address that, only report a failure if _all_ of the Chassis objects lack power power reporting functionality. Fixes #4901 * Update changelogs/fragments/4901-fix-redfish-chassispower.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4901-fix-redfish-chassispower.yml | 2 ++ plugins/module_utils/redfish_utils.py | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/4901-fix-redfish-chassispower.yml diff --git a/changelogs/fragments/4901-fix-redfish-chassispower.yml b/changelogs/fragments/4901-fix-redfish-chassispower.yml new file mode 100644 index 0000000000..71a8b321eb --- /dev/null +++ b/changelogs/fragments/4901-fix-redfish-chassispower.yml @@ -0,0 +1,2 @@ +bugfixes: + - redfish_info - fix to ``GetChassisPower`` to correctly report power information when multiple chassis exist, but not all chassis report power information (https://github.com/ansible-collections/community.general/issues/4901). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 927ce231e6..814eef9199 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -1888,14 +1888,13 @@ class RedfishUtils(object): for property in properties: if property in data: chassis_power_result[property] = data[property] - else: - return {'ret': False, 'msg': 'Key PowerControl not found.'} chassis_power_results.append(chassis_power_result) - else: - return {'ret': False, 'msg': 'Key Power not found.'} - result['entries'] = chassis_power_results - return result + if len(chassis_power_results) > 0: + result['entries'] = chassis_power_results + return result + else: + return {'ret': False, 'msg': 'Power information not found.'} def get_chassis_thermals(self): result = {} From 7ffa2b525cacd3eed2acfc9e94d1b6ee8d604ce1 Mon Sep 17 00:00:00 2001 From: andrii-zakurenyi <85106843+andrii-zakurenyi@users.noreply.github.com> Date: Mon, 4 Jul 2022 21:25:34 +0300 Subject: [PATCH 0106/2104] Do not ignore tld option in DSV lookup plugin (#4911) * Do not ignore tld option in DSV lookup plugin * add changelog fragment * Update changelogs/fragments/4911-dsv-honor-tld-option.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4911-dsv-honor-tld-option.yml | 3 +++ plugins/lookup/dsv.py | 1 + 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/4911-dsv-honor-tld-option.yml diff --git a/changelogs/fragments/4911-dsv-honor-tld-option.yml b/changelogs/fragments/4911-dsv-honor-tld-option.yml new file mode 100644 index 0000000000..f4b8d7070e --- /dev/null +++ b/changelogs/fragments/4911-dsv-honor-tld-option.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). \ No newline at end of file diff --git a/plugins/lookup/dsv.py b/plugins/lookup/dsv.py index 1cd9041a2e..829ba4582b 100644 --- a/plugins/lookup/dsv.py +++ b/plugins/lookup/dsv.py @@ -122,6 +122,7 @@ class LookupModule(LookupBase): "tenant": self.get_option("tenant"), "client_id": self.get_option("client_id"), "client_secret": self.get_option("client_secret"), + "tld": self.get_option("tld"), "url_template": self.get_option("url_template"), } ) From 1c06e237c8100ac30d3941d5a3869a4428ba2974 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 4 Jul 2022 21:23:02 +0200 Subject: [PATCH 0107/2104] Fix license filenames. (#4923) --- plugins/module_utils/ilo_redfish_utils.py | 2 +- plugins/module_utils/redfish_utils.py | 2 +- .../modules/remote_management/lenovoxcc/xcc_redfish_command.py | 2 +- .../modules/remote_management/redfish/idrac_redfish_command.py | 2 +- .../modules/remote_management/redfish/idrac_redfish_config.py | 2 +- plugins/modules/remote_management/redfish/idrac_redfish_info.py | 2 +- plugins/modules/remote_management/redfish/ilo_redfish_config.py | 2 +- plugins/modules/remote_management/redfish/ilo_redfish_info.py | 2 +- plugins/modules/remote_management/redfish/redfish_command.py | 2 +- plugins/modules/remote_management/redfish/redfish_config.py | 2 +- plugins/modules/remote_management/redfish/redfish_info.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/module_utils/ilo_redfish_utils.py b/plugins/module_utils/ilo_redfish_utils.py index 04b08ae52f..7b425149ba 100644 --- a/plugins/module_utils/ilo_redfish_utils.py +++ b/plugins/module_utils/ilo_redfish_utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021-2022 Hewlett Packard Enterprise, Inc. All rights reserved. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 814eef9199..10afeb3b61 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index bc54d0c148..7fc207feee 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_command.py b/plugins/modules/remote_management/redfish/idrac_redfish_command.py index 82a0f4b09a..adaadfc4f1 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_command.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_command.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_config.py b/plugins/modules/remote_management/redfish/idrac_redfish_config.py index 683538e4b7..a0fbf13a51 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_config.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_config.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019 Dell EMC Inc. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_info.py b/plugins/modules/remote_management/redfish/idrac_redfish_info.py index 7bfd81a78e..92393224bb 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_info.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_info.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019 Dell EMC Inc. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_config.py b/plugins/modules/remote_management/redfish/ilo_redfish_config.py index 837b2103b8..502ab21399 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_config.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_config.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021-2022 Hewlett Packard Enterprise, Inc. All rights reserved. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/remote_management/redfish/ilo_redfish_info.py index 5f5be4f835..f935144474 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_info.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021-2022 Hewlett Packard Enterprise, Inc. All rights reserved. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 66609f97fb..26dfee6455 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 39df23ab71..9c59e29955 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/redfish_info.py b/plugins/modules/remote_management/redfish/redfish_info.py index 3ffefd2880..0f520df2a1 100644 --- a/plugins/modules/remote_management/redfish/redfish_info.py +++ b/plugins/modules/remote_management/redfish/redfish_info.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type From 905f9ec399a6cac86c3f1cbc3a36cb97139741b1 Mon Sep 17 00:00:00 2001 From: antonc42 Date: Thu, 7 Jul 2022 14:49:10 -0500 Subject: [PATCH 0108/2104] fix lxd connection plugin inventory_hostname (#4912) * fixes lxd connection plugin issue #4886 remote_addr value was set to literal string 'inventory_hostname' instead of the value for inventory_hostname variable. solution found in PR ansible/ansible#77894 * changelog fragment - bugfix - lxd connection plugin * correct changelog fragment * Update changelogs/fragments/4886-fix-lxd-inventory-hostname.yml Co-authored-by: Felix Fontein * replace _host instance variable with calls to get 'remote_addr' option suggested by felixfontein Co-authored-by: Felix Fontein --- .../fragments/4886-fix-lxd-inventory-hostname.yml | 2 ++ plugins/connection/lxd.py | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/4886-fix-lxd-inventory-hostname.yml diff --git a/changelogs/fragments/4886-fix-lxd-inventory-hostname.yml b/changelogs/fragments/4886-fix-lxd-inventory-hostname.yml new file mode 100644 index 0000000000..c4faa085eb --- /dev/null +++ b/changelogs/fragments/4886-fix-lxd-inventory-hostname.yml @@ -0,0 +1,2 @@ +bugfixes: + - "lxd connection plugin - fix incorrect ``inventory_hostname`` in ``remote_addr``. This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/issues/4886)." diff --git a/plugins/connection/lxd.py b/plugins/connection/lxd.py index f3b06e6e39..0e93b32a63 100644 --- a/plugins/connection/lxd.py +++ b/plugins/connection/lxd.py @@ -18,6 +18,7 @@ DOCUMENTATION = ''' - Container identifier. default: inventory_hostname vars: + - name: inventory_hostname - name: ansible_host - name: ansible_lxd_host executable: @@ -61,7 +62,6 @@ class Connection(ConnectionBase): def __init__(self, play_context, new_stdin, *args, **kwargs): super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs) - self._host = self._play_context.remote_addr try: self._lxc_cmd = get_bin_path("lxc") except ValueError: @@ -75,14 +75,14 @@ class Connection(ConnectionBase): super(Connection, self)._connect() if not self._connected: - self._display.vvv(u"ESTABLISH LXD CONNECTION FOR USER: root", host=self._host) + self._display.vvv(u"ESTABLISH LXD CONNECTION FOR USER: root", host=self.get_option('remote_addr')) self._connected = True def exec_command(self, cmd, in_data=None, sudoable=True): """ execute a command on the lxd host """ super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable) - self._display.vvv(u"EXEC {0}".format(cmd), host=self._host) + self._display.vvv(u"EXEC {0}".format(cmd), host=self.get_option('remote_addr')) local_cmd = [self._lxc_cmd] if self.get_option("project"): @@ -104,10 +104,10 @@ class Connection(ConnectionBase): stderr = to_text(stderr) if stderr == "error: Container is not running.\n": - raise AnsibleConnectionFailure("container not running: %s" % self._host) + raise AnsibleConnectionFailure("container not running: %s" % self.get_option('remote_addr')) if stderr == "error: not found\n": - raise AnsibleConnectionFailure("container not found: %s" % self._host) + raise AnsibleConnectionFailure("container not found: %s" % self.get_option('remote_addr')) return process.returncode, stdout, stderr @@ -115,7 +115,7 @@ class Connection(ConnectionBase): """ put a file from local to lxd """ super(Connection, self).put_file(in_path, out_path) - self._display.vvv(u"PUT {0} TO {1}".format(in_path, out_path), host=self._host) + self._display.vvv(u"PUT {0} TO {1}".format(in_path, out_path), host=self.get_option('remote_addr')) if not os.path.isfile(to_bytes(in_path, errors='surrogate_or_strict')): raise AnsibleFileNotFound("input path is not a file: %s" % in_path) @@ -138,7 +138,7 @@ class Connection(ConnectionBase): """ fetch a file from lxd to local """ super(Connection, self).fetch_file(in_path, out_path) - self._display.vvv(u"FETCH {0} TO {1}".format(in_path, out_path), host=self._host) + self._display.vvv(u"FETCH {0} TO {1}".format(in_path, out_path), host=self.get_option('remote_addr')) local_cmd = [self._lxc_cmd] if self.get_option("project"): From 9a928d5ffb9e08f0f9ba10376058563a7fff8f22 Mon Sep 17 00:00:00 2001 From: Teddy Caddy Date: Thu, 7 Jul 2022 15:49:45 -0400 Subject: [PATCH 0109/2104] Fix syntax in `rax_clb_nodes` that breaks in Python3 (#4933) * Use syntax that works in both Python 2 and 3 when iterating through a dict that's going to be mutated during iteration * Fixes `dictionary changed size during iteration` error * Fixes #4932 --- changelogs/fragments/4933-fix-rax-clb-nodes.yaml | 2 ++ plugins/modules/cloud/rackspace/rax_clb_nodes.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4933-fix-rax-clb-nodes.yaml diff --git a/changelogs/fragments/4933-fix-rax-clb-nodes.yaml b/changelogs/fragments/4933-fix-rax-clb-nodes.yaml new file mode 100644 index 0000000000..8d8c1f2e40 --- /dev/null +++ b/changelogs/fragments/4933-fix-rax-clb-nodes.yaml @@ -0,0 +1,2 @@ +bugfixes: + - rax_clb_nodes - fix code to be compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/4933). diff --git a/plugins/modules/cloud/rackspace/rax_clb_nodes.py b/plugins/modules/cloud/rackspace/rax_clb_nodes.py index 4adcc66fb7..6ed57b53a3 100644 --- a/plugins/modules/cloud/rackspace/rax_clb_nodes.py +++ b/plugins/modules/cloud/rackspace/rax_clb_nodes.py @@ -252,7 +252,8 @@ def main(): 'weight': weight, } - for name, value in mutable.items(): + for name in list(mutable): + value = mutable[name] if value is None or value == getattr(node, name): mutable.pop(name) From a5ff53f2ae76b07ea5348cbd63cee54085dea3b5 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 7 Jul 2022 21:51:04 +0200 Subject: [PATCH 0110/2104] allow configuring opentelementry callback via config file (#4916) this is especially useful for the `enable_from_environment` option, as this allows to set a default for the whole project, instead of relying on everyone setting the environment variable --- .../fragments/4916-opentelemetry-ini-options.yaml | 2 ++ plugins/callback/opentelemetry.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 changelogs/fragments/4916-opentelemetry-ini-options.yaml diff --git a/changelogs/fragments/4916-opentelemetry-ini-options.yaml b/changelogs/fragments/4916-opentelemetry-ini-options.yaml new file mode 100644 index 0000000000..5a20d7652a --- /dev/null +++ b/changelogs/fragments/4916-opentelemetry-ini-options.yaml @@ -0,0 +1,2 @@ +minor_changes: + - opentelemetry callback plugin - allow configuring opentelementry callback via config file (https://github.com/ansible-collections/community.general/pull/4916). diff --git a/plugins/callback/opentelemetry.py b/plugins/callback/opentelemetry.py index 1ea6e79622..7fc43d9a27 100644 --- a/plugins/callback/opentelemetry.py +++ b/plugins/callback/opentelemetry.py @@ -24,6 +24,10 @@ DOCUMENTATION = ''' - Hide the arguments for a task. env: - name: ANSIBLE_OPENTELEMETRY_HIDE_TASK_ARGUMENTS + ini: + - section: callback_opentelemetry + key: hide_task_arguments + version_added: 5.3.0 enable_from_environment: type: str description: @@ -34,6 +38,10 @@ DOCUMENTATION = ''' and if set to true this plugin will be enabled. env: - name: ANSIBLE_OPENTELEMETRY_ENABLE_FROM_ENVIRONMENT + ini: + - section: callback_opentelemetry + key: enable_from_environment + version_added: 5.3.0 version_added: 3.8.0 otel_service_name: default: ansible @@ -42,6 +50,10 @@ DOCUMENTATION = ''' - The service name resource attribute. env: - name: OTEL_SERVICE_NAME + ini: + - section: callback_opentelemetry + key: otel_service_name + version_added: 5.3.0 traceparent: default: None type: str @@ -61,11 +73,14 @@ examples: | Enable the plugin in ansible.cfg: [defaults] callbacks_enabled = community.general.opentelemetry + [callback_opentelemetry] + enable_from_environment = ANSIBLE_OPENTELEMETRY_ENABLED Set the environment variable: export OTEL_EXPORTER_OTLP_ENDPOINT= export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer your_otel_token" export OTEL_SERVICE_NAME=your_service_name + export ANSIBLE_OPENTELEMETRY_ENABLED=true ''' import getpass From 35ddf31b5feaced9e7c918125bb9c8bf07189a9f Mon Sep 17 00:00:00 2001 From: Louis Seubert Date: Fri, 8 Jul 2022 23:11:14 +0200 Subject: [PATCH 0111/2104] added password prompt support for machinectl (#4849) * added password prompt support for machinectl * include review comments This includes the review comments as well as changelog fragment. This also gives more information about the polkit rule. * fix yaml doc with leftover bracket * include review comments 2 * move regex compile to global scope --- ...password-prompt-support-for-machinectl.yml | 2 + plugins/become/machinectl.py | 43 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml diff --git a/changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml b/changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml new file mode 100644 index 0000000000..db6a4ffd20 --- /dev/null +++ b/changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml @@ -0,0 +1,2 @@ +minor_changes: + - machinectl become plugin - can now be used with a password from another user than root, if a polkit rule is present (https://github.com/ansible-collections/community.general/pull/4849). diff --git a/plugins/become/machinectl.py b/plugins/become/machinectl.py index aebb0891b0..061a5bcf46 100644 --- a/plugins/become/machinectl.py +++ b/plugins/become/machinectl.py @@ -66,15 +66,46 @@ DOCUMENTATION = ''' ini: - section: machinectl_become_plugin key: password + notes: + - When not using this plugin with user C(root), it only works correctly with a polkit rule which will alter + the behaviour of machinectl. This rule must alter the prompt behaviour to ask directly for the user credentials, + if the user is allowed to perform the action (take a look at the examples section). + If such a rule is not present the plugin only work if it is used in context with the root user, + because then no further prompt will be shown by machinectl. ''' +EXAMPLES = r''' +# A polkit rule needed to use the module with a non-root user. +# See the Notes section for details. +60-machinectl-fast-user-auth.rules: | + polkit.addRule(function(action, subject) { + if(action.id == "org.freedesktop.machine1.host-shell" && subject.isInGroup("wheel")) { + return polkit.Result.AUTH_SELF_KEEP; + } + }); +''' + +from re import compile as re_compile + from ansible.plugins.become import BecomeBase +from ansible.module_utils._text import to_bytes + + +ansi_color_codes = re_compile(to_bytes(r'\x1B\[[0-9;]+m')) class BecomeModule(BecomeBase): name = 'community.general.machinectl' + prompt = 'Password: ' + fail = ('==== AUTHENTICATION FAILED ====',) + success = ('==== AUTHENTICATION COMPLETE ====',) + + @staticmethod + def remove_ansi_codes(line): + return ansi_color_codes.sub(b"", line) + def build_become_command(self, cmd, shell): super(BecomeModule, self).build_become_command(cmd, shell) @@ -86,3 +117,15 @@ class BecomeModule(BecomeBase): flags = self.get_option('become_flags') user = self.get_option('become_user') return '%s -q shell %s %s@ %s' % (become, flags, user, cmd) + + def check_success(self, b_output): + b_output = self.remove_ansi_codes(b_output) + return super().check_success(b_output) + + def check_incorrect_password(self, b_output): + b_output = self.remove_ansi_codes(b_output) + return super().check_incorrect_password(b_output) + + def check_missing_password(self, b_output): + b_output = self.remove_ansi_codes(b_output) + return super().check_missing_password(b_output) From bf94f08bc41be101eeaed156a2bf93dfb8db1daf Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Sat, 9 Jul 2022 02:41:57 +0530 Subject: [PATCH 0112/2104] Misc. typo fixes (#4940) Signed-off-by: Abhijeet Kasurde --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- plugins/filter/counter.py | 4 ++-- plugins/filter/jc.py | 2 +- plugins/inventory/cobbler.py | 2 +- plugins/inventory/lxd.py | 2 +- plugins/module_utils/hwc_utils.py | 2 +- plugins/module_utils/opennebula.py | 4 ++-- plugins/module_utils/oracle/oci_utils.py | 4 ++-- plugins/modules/cloud/lxd/lxd_profile.py | 2 +- plugins/modules/cloud/lxd/lxd_project.py | 2 +- plugins/modules/cloud/misc/proxmox_kvm.py | 4 ++-- plugins/modules/cloud/xenserver/xenserver_guest.py | 8 ++++---- plugins/modules/files/ini_file.py | 2 +- plugins/modules/files/sapcar_extract.py | 2 +- plugins/modules/identity/ipa/ipa_otpconfig.py | 4 ++-- plugins/modules/identity/ipa/ipa_vault.py | 2 +- .../modules/identity/keycloak/keycloak_realm_info.py | 2 +- plugins/modules/net_tools/nmcli.py | 2 +- .../packaging/language/ansible_galaxy_install.py | 2 +- plugins/modules/packaging/language/composer.py | 2 +- .../remote_management/redfish/ilo_redfish_info.py | 2 +- .../source_control/gitlab/gitlab_protected_branch.py | 2 +- plugins/modules/source_control/gitlab/gitlab_user.py | 2 +- plugins/modules/storage/pmem/pmem.py | 2 +- plugins/modules/system/homectl.py | 2 +- plugins/modules/system/timezone.py | 2 +- .../integration/targets/filter_from_csv/tasks/main.yml | 2 +- tests/integration/targets/iso_create/tasks/main.yml | 4 ++-- tests/integration/targets/timezone/tasks/main.yml | 2 +- tests/unit/plugins/inventory/test_stackpath_compute.py | 4 ++-- tests/unit/plugins/module_utils/xenserver/conftest.py | 2 +- tests/unit/plugins/modules/cloud/xenserver/conftest.py | 2 +- .../modules/net_tools/pritunl/test_pritunl_org.py | 4 ++-- tests/unit/plugins/modules/net_tools/test_nmcli.py | 10 +++++----- tests/unit/plugins/modules/notification/test_slack.py | 2 +- .../plugins/modules/packaging/language/test_cpanm.py | 2 +- .../plugins/modules/system/interfaces_file/README.md | 2 +- .../plugins/modules/system/test_gconftool2_info.py | 2 +- tests/unit/plugins/modules/system/test_xfconf.py | 2 +- tests/unit/plugins/modules/system/test_xfconf_info.py | 2 +- 40 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d640b9aae4..b0ee1b03bf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -105,7 +105,7 @@ body: attributes: label: Steps to Reproduce description: | - Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also pased any playbooks, configs and commands you used. + Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also passed any playbooks, configs and commands you used. **HINT:** You can paste https://gist.github.com links for larger files. value: | diff --git a/plugins/filter/counter.py b/plugins/filter/counter.py index 5d7f365f94..717238d24e 100644 --- a/plugins/filter/counter.py +++ b/plugins/filter/counter.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' -- name: Count occurences +- name: Count occurrences ansible.builtin.debug: msg: >- {{ [1, 'a', 2, 2, 'a', 'b', 'a'] | community.general.counter }} @@ -30,7 +30,7 @@ EXAMPLES = ''' RETURN = ''' _value: - description: A dictionary with the elements of the sequence as keys, and their number of occurance in the sequence as values. + description: A dictionary with the elements of the sequence as keys, and their number of occurrences in the sequence as values. type: dictionary ''' diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index 094da26632..19634340b9 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -38,7 +38,7 @@ DOCUMENTATION = ''' parser: description: - The correct parser for the input data. - - For exmaple C(ifconfig). + - For example C(ifconfig). - See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers. type: string required: true diff --git a/plugins/inventory/cobbler.py b/plugins/inventory/cobbler.py index d50acd0c55..56b52ee1e2 100644 --- a/plugins/inventory/cobbler.py +++ b/plugins/inventory/cobbler.py @@ -213,7 +213,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable): self.inventory.add_child(parent_group_name, group_name) else: self.display.vvvv('Processing profile %s without parent\n' % profile['name']) - # Create a heirarchy of profile names + # Create a hierarchy of profile names profile_elements = profile['name'].split('-') i = 0 while i < len(profile_elements) - 1: diff --git a/plugins/inventory/lxd.py b/plugins/inventory/lxd.py index 912638509d..788c8852bf 100644 --- a/plugins/inventory/lxd.py +++ b/plugins/inventory/lxd.py @@ -522,7 +522,7 @@ class InventoryModule(BaseInventoryPlugin): """Helper to save data Helper to save the data in self.data - Detect if data is allready in branch and use dict_merge() to prevent that branch is overwritten. + Detect if data is already in branch and use dict_merge() to prevent that branch is overwritten. Args: str(instance_name): name of instance diff --git a/plugins/module_utils/hwc_utils.py b/plugins/module_utils/hwc_utils.py index 4507df020d..7977554b9b 100644 --- a/plugins/module_utils/hwc_utils.py +++ b/plugins/module_utils/hwc_utils.py @@ -351,7 +351,7 @@ def wait_to_finish(target, pending, refresh, timeout, min_interval=1, delay=3): if pending and status not in pending: raise HwcModuleException( - "unexpect status(%s) occured" % status) + "unexpect status(%s) occurred" % status) if not is_last_time: wait *= 2 diff --git a/plugins/module_utils/opennebula.py b/plugins/module_utils/opennebula.py index 6b67a6cf85..b0adb8d69b 100644 --- a/plugins/module_utils/opennebula.py +++ b/plugins/module_utils/opennebula.py @@ -83,12 +83,12 @@ class OpenNebulaModule: if self.module.params.get("api_username"): username = self.module.params.get("api_username") else: - self.fail("Either api_username or the environment vairable ONE_USERNAME must be provided") + self.fail("Either api_username or the environment variable ONE_USERNAME must be provided") if self.module.params.get("api_password"): password = self.module.params.get("api_password") else: - self.fail("Either api_password or the environment vairable ONE_PASSWORD must be provided") + self.fail("Either api_password or the environment variable ONE_PASSWORD must be provided") session = "%s:%s" % (username, password) diff --git a/plugins/module_utils/oracle/oci_utils.py b/plugins/module_utils/oracle/oci_utils.py index 88e577af5c..0c7e0ec143 100644 --- a/plugins/module_utils/oracle/oci_utils.py +++ b/plugins/module_utils/oracle/oci_utils.py @@ -691,7 +691,7 @@ def check_and_create_resource( :param model: Model used to create a resource. :param exclude_attributes: The attributes which should not be used to distinguish the resource. e.g. display_name, dns_label. - :param dead_states: List of states which can't transition to any of the usable states of the resource. This deafults + :param dead_states: List of states which can't transition to any of the usable states of the resource. This defaults to ["TERMINATING", "TERMINATED", "FAULTY", "FAILED", "DELETING", "DELETED", "UNKNOWN_ENUM_VALUE"] :param default_attribute_values: A dictionary containing default values for attributes. :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True} @@ -1189,7 +1189,7 @@ def are_dicts_equal( def should_dict_attr_be_excluded(map_option_name, option_key, exclude_list): - """An entry for the Exclude list for excluding a map's key is specifed as a dict with the map option name as the + """An entry for the Exclude list for excluding a map's key is specified as a dict with the map option name as the key, and the value as a list of keys to be excluded within that map. For example, if the keys "k1" and "k2" of a map option named "m1" needs to be excluded, the exclude list must have an entry {'m1': ['k1','k2']} """ for exclude_item in exclude_list: diff --git a/plugins/modules/cloud/lxd/lxd_profile.py b/plugins/modules/cloud/lxd/lxd_profile.py index 82244f0bac..f86f333a37 100644 --- a/plugins/modules/cloud/lxd/lxd_profile.py +++ b/plugins/modules/cloud/lxd/lxd_profile.py @@ -360,7 +360,7 @@ class LXDProfileManagement(object): ) def _merge_dicts(self, source, destination): - """Merge Dictionarys + """Merge Dictionaries Get a list of filehandle numbers from logger to be handed to DaemonContext.files_preserve diff --git a/plugins/modules/cloud/lxd/lxd_project.py b/plugins/modules/cloud/lxd/lxd_project.py index d1488272c8..2a4a319753 100644 --- a/plugins/modules/cloud/lxd/lxd_project.py +++ b/plugins/modules/cloud/lxd/lxd_project.py @@ -303,7 +303,7 @@ class LXDProjectManagement(object): ) def _merge_dicts(self, source, destination): - """ Return a new dict taht merge two dict, + """ Return a new dict that merge two dict, with values in source dict overwrite destination dict Args: diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index c6e47f36e4..abc63f24c3 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -1204,12 +1204,12 @@ def main(): # Ensure source VM id exists when cloning proxmox.get_vm(vmid) - # Ensure the choosen VM name doesn't already exist when cloning + # Ensure the chosen VM name doesn't already exist when cloning existing_vmid = proxmox.get_vmid(name, ignore_missing=True) if existing_vmid: module.exit_json(changed=False, vmid=existing_vmid, msg="VM with name <%s> already exists" % name) - # Ensure the choosen VM id doesn't already exist when cloning + # Ensure the chosen VM id doesn't already exist when cloning if proxmox.get_vm(newid, ignore_missing=True): module.exit_json(changed=False, vmid=vmid, msg="vmid %s with VM name %s already exists" % (newid, name)) diff --git a/plugins/modules/cloud/xenserver/xenserver_guest.py b/plugins/modules/cloud/xenserver/xenserver_guest.py index b90b380c3f..bd8bb7d7e1 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest.py @@ -1207,7 +1207,7 @@ class XenServerVM(XenServerObject): if (self.module.params['home_server'] and (not self.vm_params['affinity'] or self.module.params['home_server'] != self.vm_params['affinity']['name_label'])): - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, self.module.params['home_server'], uuid=None, obj_type="home server", fail=True, msg_prefix="VM check home_server: ") @@ -1371,7 +1371,7 @@ class XenServerVM(XenServerObject): disk_sr = disk_params.get('sr') if disk_sr_uuid is not None or disk_sr is not None: - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, disk_sr, disk_sr_uuid, obj_type="SR", fail=True, msg_prefix="VM check disks[%s]: " % position) elif self.default_sr_ref == 'OpaqueRef:NULL': @@ -1448,7 +1448,7 @@ class XenServerVM(XenServerObject): if cdrom_type == "iso": # Check if ISO exists. - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, cdrom_iso_name, uuid=None, obj_type="ISO image", fail=True, msg_prefix="VM check cdrom.iso_name: ") @@ -1496,7 +1496,7 @@ class XenServerVM(XenServerObject): self.module.fail_json(msg="VM check networks[%s]: network name cannot be an empty string!" % position) if network_name: - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, network_name, uuid=None, obj_type="network", fail=True, msg_prefix="VM check networks[%s]: " % position) diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/files/ini_file.py index 79d373f3a7..c18fd24eff 100644 --- a/plugins/modules/files/ini_file.py +++ b/plugins/modules/files/ini_file.py @@ -279,7 +279,7 @@ def do_ini(module, filename, section=None, option=None, values=None, # handling multiple instances of option=value when state is 'present' with/without exclusive is a bit complex # # 1. edit all lines where we have a option=value pair with a matching value in values[] - # 2. edit all the remaing lines where we have a matching option + # 2. edit all the remaining lines where we have a matching option # 3. delete remaining lines where we have a matching option # 4. insert missing option line(s) at the end of the section diff --git a/plugins/modules/files/sapcar_extract.py b/plugins/modules/files/sapcar_extract.py index 8463703c1e..da29580059 100644 --- a/plugins/modules/files/sapcar_extract.py +++ b/plugins/modules/files/sapcar_extract.py @@ -207,7 +207,7 @@ def main(): changed = True else: changed = False - out = "allready unpacked" + out = "already unpacked" if remove: os.remove(path) diff --git a/plugins/modules/identity/ipa/ipa_otpconfig.py b/plugins/modules/identity/ipa/ipa_otpconfig.py index 9a10baec0b..080a2750c7 100644 --- a/plugins/modules/identity/ipa/ipa_otpconfig.py +++ b/plugins/modules/identity/ipa/ipa_otpconfig.py @@ -45,7 +45,7 @@ EXAMPLES = r''' ipa_user: admin ipa_pass: supersecret -- name: Ensure the TOTP syncronization window is set to 86400 seconds +- name: Ensure the TOTP synchronization window is set to 86400 seconds community.general.ipa_otpconfig: ipatokentotpsyncwindow: '86400' ipa_host: localhost @@ -59,7 +59,7 @@ EXAMPLES = r''' ipa_user: admin ipa_pass: supersecret -- name: Ensure the HOTP syncronization window is set to 100 hops +- name: Ensure the HOTP synchronization window is set to 100 hops community.general.ipa_otpconfig: ipatokenhotpsyncwindow: '100' ipa_host: localhost diff --git a/plugins/modules/identity/ipa/ipa_vault.py b/plugins/modules/identity/ipa/ipa_vault.py index 7a6a601fa9..108843b224 100644 --- a/plugins/modules/identity/ipa/ipa_vault.py +++ b/plugins/modules/identity/ipa/ipa_vault.py @@ -63,7 +63,7 @@ options: type: str replace: description: - - Force replace the existant vault on IPA server. + - Force replace the existent vault on IPA server. type: bool default: False choices: ["True", "False"] diff --git a/plugins/modules/identity/keycloak/keycloak_realm_info.py b/plugins/modules/identity/keycloak/keycloak_realm_info.py index a84c9dc767..b67f1333e1 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm_info.py +++ b/plugins/modules/identity/keycloak/keycloak_realm_info.py @@ -64,7 +64,7 @@ msg: realm_info: description: - - Representation of the realm public infomation. + - Representation of the realm public information. returned: always type: dict contains: diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index bb4a5016ff..caf4b3ba7f 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -1501,7 +1501,7 @@ class Nmcli(object): if self._hairpin is None: self.module.deprecate( "Parameter 'hairpin' default value will change from true to false in community.general 7.0.0. " - "Set the value explicitly to supress this warning.", + "Set the value explicitly to suppress this warning.", version='7.0.0', collection_name='community.general', ) # Should be False in 7.0.0 but then that should be in argument_specs diff --git a/plugins/modules/packaging/language/ansible_galaxy_install.py b/plugins/modules/packaging/language/ansible_galaxy_install.py index 7b7ac160da..5e2a810f0a 100644 --- a/plugins/modules/packaging/language/ansible_galaxy_install.py +++ b/plugins/modules/packaging/language/ansible_galaxy_install.py @@ -242,7 +242,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper): self.module.deprecate( "Support for Ansible 2.9 and ansible-base 2.10 is being deprecated. " "At the same time support for them is ended, also the ack_ansible29 option will be removed. " - "Upgrading is strongly recommended, or set 'ack_min_ansiblecore211' to supress this message.", + "Upgrading is strongly recommended, or set 'ack_min_ansiblecore211' to suppress this message.", version="8.0.0", collection_name="community.general", ) diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 351a104658..f0ae135c39 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -81,7 +81,7 @@ options: classmap_authoritative: description: - Autoload classes from classmap only. - - Implicitely enable optimize_autoloader. + - Implicitly enable optimize_autoloader. - Recommended especially for production, but can take a bit of time to run. default: false type: bool diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/remote_management/redfish/ilo_redfish_info.py index f935144474..99a6041df3 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_info.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_info.py @@ -74,7 +74,7 @@ ilo_redfish_info: type: dict contains: ret: - description: Check variable to see if the information was succesfully retrived. + description: Check variable to see if the information was successfully retrieved. type: bool msg: description: Information of all active iLO sessions. diff --git a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py index fe8e98a3f3..a5fd65b5bd 100644 --- a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py @@ -36,7 +36,7 @@ options: name: description: - The name of the branch that needs to be protected. - - Can make use a wildcard charachter for like C(production/*) or just have C(main) or C(develop) as value. + - Can make use a wildcard character for like C(production/*) or just have C(main) or C(develop) as value. required: true type: str merge_access_levels: diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/source_control/gitlab/gitlab_user.py index 803c54bc83..4a215d6d0b 100644 --- a/plugins/modules/source_control/gitlab/gitlab_user.py +++ b/plugins/modules/source_control/gitlab/gitlab_user.py @@ -305,7 +305,7 @@ class GitLabUser(object): # note: as we unfortunately have some uncheckable parameters # where it is not possible to determine if the update # changed something or not, we must assume here that a - # changed happend and that an user object update is needed + # changed happened and that an user object update is needed potentionally_changed = True # Assign ssh keys diff --git a/plugins/modules/storage/pmem/pmem.py b/plugins/modules/storage/pmem/pmem.py index b91bab5fad..55bf1ca46d 100644 --- a/plugins/modules/storage/pmem/pmem.py +++ b/plugins/modules/storage/pmem/pmem.py @@ -99,7 +99,7 @@ options: - The size of namespace. This option supports the suffixes C(k) or C(K) or C(KB) for KiB, C(m) or C(M) or C(MB) for MiB, C(g) or C(G) or C(GB) for GiB and C(t) or C(T) or C(TB) for TiB. - This option is required if multiple namespaces are configured. - - If this option is not set, all of the avaiable space of a region is configured. + - If this option is not set, all of the available space of a region is configured. type: str required: false namespace_append: diff --git a/plugins/modules/system/homectl.py b/plugins/modules/system/homectl.py index ff7a619509..c71b49adeb 100644 --- a/plugins/modules/system/homectl.py +++ b/plugins/modules/system/homectl.py @@ -57,7 +57,7 @@ options: realname: description: - The user's real ('human') name. - - This can also be used to add a comment to maintain compatability with C(useradd). + - This can also be used to add a comment to maintain compatibility with C(useradd). aliases: [ 'comment' ] type: str realm: diff --git a/plugins/modules/system/timezone.py b/plugins/modules/system/timezone.py index f632939041..6017f98293 100644 --- a/plugins/modules/system/timezone.py +++ b/plugins/modules/system/timezone.py @@ -790,7 +790,7 @@ class AIXTimezone(Timezone): inspects C(/etc/environment) to determine the current timezone. While AIX time zones can be set using two formats (POSIX and - Olson) the prefered method is Olson. + Olson) the preferred method is Olson. See the following article for more information: https://developer.ibm.com/articles/au-aix-posix/ diff --git a/tests/integration/targets/filter_from_csv/tasks/main.yml b/tests/integration/targets/filter_from_csv/tasks/main.yml index aafb28fbb0..5a67494a00 100644 --- a/tests/integration/targets/filter_from_csv/tasks/main.yml +++ b/tests/integration/targets/filter_from_csv/tasks/main.yml @@ -14,7 +14,7 @@ - "valid_comma_separated_spaces | community.general.from_csv(skipinitialspace=True) == expected_result" - "valid_comma_separated_spaces | community.general.from_csv != expected_result" -- name: Parse valid csv input with no headers with/without specifiying fieldnames +- name: Parse valid csv input with no headers with/without specifying fieldnames assert: that: - "valid_comma_separated_no_headers | community.general.from_csv(fieldnames=['id','name','role']) == expected_result" diff --git a/tests/integration/targets/iso_create/tasks/main.yml b/tests/integration/targets/iso_create/tasks/main.yml index f55b94543c..adf0d35450 100644 --- a/tests/integration/targets/iso_create/tasks/main.yml +++ b/tests/integration/targets/iso_create/tasks/main.yml @@ -105,7 +105,7 @@ - iso_result is changed - iso_file.stat.exists == True -- name: Create iso file with Rock Ridge extention +- name: Create iso file with Rock Ridge extension iso_create: src_files: - "{{ remote_tmp_dir }}/test1.cfg" @@ -124,7 +124,7 @@ - iso_result is changed - iso_file.stat.exists == True -- name: Create iso file with Joliet extention +- name: Create iso file with Joliet extension iso_create: src_files: - "{{ remote_tmp_dir }}/test1.cfg" diff --git a/tests/integration/targets/timezone/tasks/main.yml b/tests/integration/targets/timezone/tasks/main.yml index 305a458639..3a25d74eac 100644 --- a/tests/integration/targets/timezone/tasks/main.yml +++ b/tests/integration/targets/timezone/tasks/main.yml @@ -66,7 +66,7 @@ - name: Run tests - # Skip tests on Fedora 31 and 32 because dbus fails to start unless the container is run in priveleged mode. + # Skip tests on Fedora 31 and 32 because dbus fails to start unless the container is run in privileged mode. # Even then, it starts unreliably. This may be due to the move to cgroup v2 in Fedora 31 and 32. # https://www.redhat.com/sysadmin/fedora-31-control-group-v2 when: diff --git a/tests/unit/plugins/inventory/test_stackpath_compute.py b/tests/unit/plugins/inventory/test_stackpath_compute.py index 8a409becd6..73d9a06a33 100644 --- a/tests/unit/plugins/inventory/test_stackpath_compute.py +++ b/tests/unit/plugins/inventory/test_stackpath_compute.py @@ -107,7 +107,7 @@ def test_validate_config(inventory): } with pytest.raises(AnsibleError) as error_message: inventory._validate_config(config) - assert "config missing client_secret, a required paramter" in error_message + assert "config missing client_secret, a required parameter" in error_message config = { "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", @@ -116,7 +116,7 @@ def test_validate_config(inventory): } with pytest.raises(AnsibleError) as error_message: inventory._validate_config(config) - assert "config missing client_id, a required paramter" in error_message + assert "config missing client_id, a required parameter" in error_message def test_populate(inventory): diff --git a/tests/unit/plugins/module_utils/xenserver/conftest.py b/tests/unit/plugins/module_utils/xenserver/conftest.py index 52f654bcc6..d36166fcc0 100644 --- a/tests/unit/plugins/module_utils/xenserver/conftest.py +++ b/tests/unit/plugins/module_utils/xenserver/conftest.py @@ -39,7 +39,7 @@ def XenAPI(): """Imports and returns fake XenAPI module.""" # Import of fake XenAPI module is wrapped by fixture so that it does not - # affect other unit tests which could potentialy also use XenAPI module. + # affect other unit tests which could potentially also use XenAPI module. # First we use importlib.import_module() to import the module and assign # it to a local symbol. diff --git a/tests/unit/plugins/modules/cloud/xenserver/conftest.py b/tests/unit/plugins/modules/cloud/xenserver/conftest.py index d2bfcd0e8d..479f4479a3 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/conftest.py +++ b/tests/unit/plugins/modules/cloud/xenserver/conftest.py @@ -35,7 +35,7 @@ def XenAPI(): """Imports and returns fake XenAPI module.""" # Import of fake XenAPI module is wrapped by fixture so that it does not - # affect other unit tests which could potentialy also use XenAPI module. + # affect other unit tests which could potentially also use XenAPI module. # First we use importlib.import_module() to import the module and assign # it to a local symbol. diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py index 39071974c8..74959efe0b 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py @@ -109,7 +109,7 @@ class TestPritunlOrg(ModuleTestCase): idempotent_exc = idempotent_result.exception.args[0] # Ensure both calls resulted in the same returned value - # except for changed which sould be false the second time + # except for changed which should be false the second time for k, v in iteritems(idempotent_exc): if k == "changed": self.assertFalse(idempotent_exc[k]) @@ -158,7 +158,7 @@ class TestPritunlOrg(ModuleTestCase): idempotent_exc = idempotent_result.exception.args[0] # Ensure both calls resulted in the same returned value - # except for changed which sould be false the second time + # except for changed which should be false the second time self.assertFalse(idempotent_exc["changed"]) self.assertEqual(idempotent_exc["response"], delete_exc["response"]) diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index 487465d863..c87691b254 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -3309,7 +3309,7 @@ def test_gsm_connection_unchanged(mocked_gsm_connection_unchanged, capfd): @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP4_ADDRESSES, indirect=['patch_ansible_module']) -def test_create_ethernet_with_mulitple_ip4_addresses_static(mocked_generic_connection_create, capfd): +def test_create_ethernet_with_multiple_ip4_addresses_static(mocked_generic_connection_create, capfd): """ Test : Create ethernet connection with static IP configuration """ @@ -3349,7 +3349,7 @@ def test_create_ethernet_with_mulitple_ip4_addresses_static(mocked_generic_conne @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP6_ADDRESSES, indirect=['patch_ansible_module']) -def test_create_ethernet_with_mulitple_ip6_addresses_static(mocked_generic_connection_create, capfd): +def test_create_ethernet_with_multiple_ip6_addresses_static(mocked_generic_connection_create, capfd): """ Test : Create ethernet connection with multiple IPv6 addresses configuration """ @@ -3389,7 +3389,7 @@ def test_create_ethernet_with_mulitple_ip6_addresses_static(mocked_generic_conne @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP4_ADDRESSES, indirect=['patch_ansible_module']) -def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip4_addresses_unchanged, capfd): +def test_ethernet_connection_static_with_multiple_ip4_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip4_addresses_unchanged, capfd): """ Test : Ethernet connection with static IP configuration unchanged """ @@ -3403,7 +3403,7 @@ def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP6_ADDRESSES, indirect=['patch_ansible_module']) -def test_ethernet_connection_static_with_mulitple_ip6_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip6_addresses_unchanged, capfd): +def test_ethernet_connection_static_with_multiple_ip6_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip6_addresses_unchanged, capfd): """ Test : Ethernet connection with multiple IPv6 addresses configuration unchanged """ @@ -3485,7 +3485,7 @@ def test_create_ethernet_addr_gen_mode_and_ip6_privacy_static(mocked_generic_con @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_IP6_PRIVACY_AND_ADDR_GEN_MODE, indirect=['patch_ansible_module']) -def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked_ethernet_connection_static_ip6_privacy_and_addr_gen_mode_unchange, capfd): +def test_ethernet_connection_static_with_multiple_ip4_addresses_unchanged(mocked_ethernet_connection_static_ip6_privacy_and_addr_gen_mode_unchange, capfd): """ Test : Ethernet connection with static IP configuration unchanged """ diff --git a/tests/unit/plugins/modules/notification/test_slack.py b/tests/unit/plugins/modules/notification/test_slack.py index 85f9b100f0..96082e0926 100644 --- a/tests/unit/plugins/modules/notification/test_slack.py +++ b/tests/unit/plugins/modules/notification/test_slack.py @@ -37,7 +37,7 @@ class TestSlackModule(ModuleTestCase): with self.assertRaises(AnsibleFailJson): self.module.main() - def test_sucessful_message(self): + def test_successful_message(self): """tests sending a message. This is example 1 from the docs""" set_module_args({ 'token': 'XXXX/YYYY/ZZZZ', diff --git a/tests/unit/plugins/modules/packaging/language/test_cpanm.py b/tests/unit/plugins/modules/packaging/language/test_cpanm.py index 10a2955019..b89a07018f 100644 --- a/tests/unit/plugins/modules/packaging/language/test_cpanm.py +++ b/tests/unit/plugins/modules/packaging/language/test_cpanm.py @@ -19,7 +19,7 @@ TESTED_MODULE = cpanm.__name__ @pytest.fixture def patch_cpanm(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/cpanm') diff --git a/tests/unit/plugins/modules/system/interfaces_file/README.md b/tests/unit/plugins/modules/system/interfaces_file/README.md index a10c659db0..c78c3e3264 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/README.md +++ b/tests/unit/plugins/modules/system/interfaces_file/README.md @@ -3,7 +3,7 @@ ## Tests structure - `input` directory contains interfaces configuration files -- `test_interfaces_file.py` runs each hardcoded test agains all configurations in `input` directory and compares results with golden outputs in `golden_output` +- `test_interfaces_file.py` runs each hardcoded test against all configurations in `input` directory and compares results with golden outputs in `golden_output` ## Running unit tests with docker diff --git a/tests/unit/plugins/modules/system/test_gconftool2_info.py b/tests/unit/plugins/modules/system/test_gconftool2_info.py index 97d349f428..29ccf5f090 100644 --- a/tests/unit/plugins/modules/system/test_gconftool2_info.py +++ b/tests/unit/plugins/modules/system/test_gconftool2_info.py @@ -17,7 +17,7 @@ TESTED_MODULE = gconftool2_info.__name__ @pytest.fixture def patch_gconftool2_info(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/gconftool-2') diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/system/test_xfconf.py index e8de07ae0b..5744100c5e 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/system/test_xfconf.py @@ -19,7 +19,7 @@ TESTED_MODULE = xfconf.__name__ @pytest.fixture def patch_xfconf(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/xfconf-query') diff --git a/tests/unit/plugins/modules/system/test_xfconf_info.py b/tests/unit/plugins/modules/system/test_xfconf_info.py index 528622d0ee..5eb68003fe 100644 --- a/tests/unit/plugins/modules/system/test_xfconf_info.py +++ b/tests/unit/plugins/modules/system/test_xfconf_info.py @@ -16,7 +16,7 @@ TESTED_MODULE = xfconf_info.__name__ @pytest.fixture def patch_xfconf_info(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/xfconf-query') From aa03c71267f6f03123f1b534f726acec3d056fb9 Mon Sep 17 00:00:00 2001 From: ube Date: Tue, 12 Jul 2022 11:03:13 +0200 Subject: [PATCH 0113/2104] proxmox inventory: fix for agent enabled (#4910) * Update proxmox.py * Forgot a debug print. * pep * Check if int, old school way. * pep, once again. * Create 4910-fix-for-agent-enabled.yml * Must check the first listentry for enabled=1 * Update changelogs/fragments/4910-fix-for-agent-enabled.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4910-fix-for-agent-enabled.yml | 2 ++ plugins/inventory/proxmox.py | 20 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/4910-fix-for-agent-enabled.yml diff --git a/changelogs/fragments/4910-fix-for-agent-enabled.yml b/changelogs/fragments/4910-fix-for-agent-enabled.yml new file mode 100644 index 0000000000..5ceb5a1e8f --- /dev/null +++ b/changelogs/fragments/4910-fix-for-agent-enabled.yml @@ -0,0 +1,2 @@ +bugfixes: + - proxmox inventory plugin - fix crash when ``enabled=1`` is used in agent config string (https://github.com/ansible-collections/community.general/pull/4910). diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index 1669b23325..a68cac3c88 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -412,12 +412,20 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): properties[parsed_key] = [tag.strip() for tag in stripped_value.split(",")] # The first field in the agent string tells you whether the agent is enabled - # the rest of the comma separated string is extra config for the agent - if config == 'agent' and int(value.split(',')[0]): - agent_iface_value = self._get_agent_network_interfaces(node, vmid, vmtype) - if agent_iface_value: - agent_iface_key = self.to_safe('%s%s' % (key, "_interfaces")) - properties[agent_iface_key] = agent_iface_value + # the rest of the comma separated string is extra config for the agent. + # In some (newer versions of proxmox) instances it can be 'enabled=1'. + if config == 'agent': + agent_enabled = 0 + try: + agent_enabled = int(value.split(',')[0]) + except ValueError: + if value.split(',')[0] == "enabled=1": + agent_enabled = 1 + if agent_enabled: + agent_iface_value = self._get_agent_network_interfaces(node, vmid, vmtype) + if agent_iface_value: + agent_iface_key = self.to_safe('%s%s' % (key, "_interfaces")) + properties[agent_iface_key] = agent_iface_value if config == 'lxc': out_val = {} From c51fa532bcedafaea39a15fc030553d8e63309b6 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 12 Jul 2022 11:30:43 +0200 Subject: [PATCH 0114/2104] Next expected release is 5.4.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 14d05eeeda..ab07b28c15 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: community name: general -version: 5.3.0 +version: 5.4.0 readme: README.md authors: - Ansible (https://github.com/ansible) From ade54bceb84ab18baa350e31d2f93a9a3061e46a Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 12 Jul 2022 17:02:30 +0200 Subject: [PATCH 0115/2104] Adjust to https://github.com/ansible/ansible/commit/b1dd2af4cac9df517ce8216eaa97e66c0b15d90a. (#4949) --- tests/integration/targets/connection/test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/targets/connection/test.sh b/tests/integration/targets/connection/test.sh index 4e7aa8dda1..334a16361d 100755 --- a/tests/integration/targets/connection/test.sh +++ b/tests/integration/targets/connection/test.sh @@ -6,5 +6,8 @@ set -eux # Run connection tests with both the default and C locale. - ansible-playbook test_connection.yml -i "${INVENTORY}" "$@" -LC_ALL=C LANG=C ansible-playbook test_connection.yml -i "${INVENTORY}" "$@" +ansible-playbook test_connection.yml -i "${INVENTORY}" "$@" + +if ansible --version | grep ansible | grep -E ' 2\.(9|10|11|12|13)\.'; then + LC_ALL=C LANG=C ansible-playbook test_connection.yml -i "${INVENTORY}" "$@" +fi From be70d18e3f0d95ad3aa31faeb48faba021f7d182 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 16 Jul 2022 14:59:13 -0600 Subject: [PATCH 0116/2104] Redfish modules for Western Digital UltraStar Data102 storage enclosures (#4885) * WDC Redfish Info / Command modules for Western Digital Ultrastar Data102 storage enclosures. Initial commands include: * FWActivate * UpdateAndActivate * SimpleUpdateStatus * delete unnecessary __init__.py modules * PR Feedback Notes list not guaranteed to be sorted Use EXAMPLES tos how specifying ioms/basuri Import missing_required_lib * Apply suggestions from code review Suggestions that could be auto-committed. Co-authored-by: Felix Fontein * Remove DNSCacheBypass It is now the caller's responsibility to deal with stale IP addresses. * Remove dnspython dependency. Fix bug that this uncovered. * Apply suggestions from code review Co-authored-by: Felix Fontein * PR Feedback * Documentation, simple update status output format, unit tests. Add docs showing how to use SimpleUpdateStatus Change the format of SimpleUpateStatus format, put the results in a sub-object. Fix unit tests whose asserts weren't actually running. * PR Feedback register: result on the 2nd example * Final adjustments for merging for 5.4.0 Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 8 + meta/runtime.yml | 4 + plugins/module_utils/wdc_redfish_utils.py | 402 ++++++++++ .../redfish/wdc_redfish_command.py | 252 ++++++ .../redfish/wdc_redfish_info.py | 214 +++++ .../wdc/test_wdc_redfish_command.py | 733 ++++++++++++++++++ .../wdc/test_wdc_redfish_info.py | 214 +++++ 7 files changed, 1827 insertions(+) create mode 100644 plugins/module_utils/wdc_redfish_utils.py create mode 100644 plugins/modules/remote_management/redfish/wdc_redfish_command.py create mode 100644 plugins/modules/remote_management/redfish/wdc_redfish_info.py create mode 100644 tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py create mode 100644 tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index cdfa7dc342..0ed1a16de6 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -304,6 +304,9 @@ files: $module_utils/utm_utils.py: maintainers: $team_e_spirit labels: utm_utils + $module_utils/wdc_redfish_utils.py: + maintainers: $team_wdc + labels: wdc_redfish_utils $module_utils/xenserver.py: maintainers: bvitnik labels: xenserver @@ -968,6 +971,10 @@ files: $modules/remote_management/redfish/: maintainers: $team_redfish ignore: jose-delarosa + $modules/remote_management/redfish/wdc_redfish_command.py: + maintainers: $team_wdc + $modules/remote_management/redfish/wdc_redfish_info.py: + maintainers: $team_wdc $modules/remote_management/stacki/stacki_host.py: maintainers: bsanders bbyhuy labels: stacki_host @@ -1298,3 +1305,4 @@ macros: team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l team_suse: commel evrardjp lrupp toabctl AnderEnder alxgu andytom sealor team_virt: joshainglis karmab tleguern Thulium-Drake Ajpantuso + team_wdc: mikemoerk diff --git a/meta/runtime.yml b/meta/runtime.yml index 4c6c7823bb..28e44695eb 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1605,6 +1605,10 @@ plugin_routing: redirect: community.general.cloud.smartos.vmadm wakeonlan: redirect: community.general.remote_management.wakeonlan + wdc_redfish_command: + redirect: community.general.remote_management.redfish.wdc_redfish_command + wdc_redfish_info: + redirect: community.general.remote_management.redfish.wdc_redfish_info webfaction_app: redirect: community.general.cloud.webfaction.webfaction_app webfaction_db: diff --git a/plugins/module_utils/wdc_redfish_utils.py b/plugins/module_utils/wdc_redfish_utils.py new file mode 100644 index 0000000000..a51cda5bed --- /dev/null +++ b/plugins/module_utils/wdc_redfish_utils.py @@ -0,0 +1,402 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2022 Western Digital Corporation +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +import datetime +import re +import time +import tarfile + +from ansible.module_utils.urls import fetch_file +from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils + +from ansible.module_utils.six.moves.urllib.parse import urlparse, urlunparse + + +class WdcRedfishUtils(RedfishUtils): + """Extension to RedfishUtils to support WDC enclosures.""" + # Status codes returned by WDC FW Update Status + UPDATE_STATUS_CODE_READY_FOR_FW_UPDATE = 0 + UPDATE_STATUS_CODE_FW_UPDATE_IN_PROGRESS = 1 + UPDATE_STATUS_CODE_FW_UPDATE_COMPLETED_WAITING_FOR_ACTIVATION = 2 + UPDATE_STATUS_CODE_FW_UPDATE_FAILED = 3 + + # Status messages returned by WDC FW Update Status + UPDATE_STATUS_MESSAGE_READY_FOR_FW_UDPATE = "Ready for FW update" + UDPATE_STATUS_MESSAGE_FW_UPDATE_IN_PROGRESS = "FW update in progress" + UPDATE_STATUS_MESSAGE_FW_UPDATE_COMPLETED_WAITING_FOR_ACTIVATION = "FW update completed. Waiting for activation." + UPDATE_STATUS_MESSAGE_FW_UPDATE_FAILED = "FW update failed." + + def __init__(self, + creds, + root_uris, + timeout, + module, + resource_id, + data_modification): + super(WdcRedfishUtils, self).__init__(creds=creds, + root_uri=root_uris[0], + timeout=timeout, + module=module, + resource_id=resource_id, + data_modification=data_modification) + # Update the root URI if we cannot perform a Redfish GET to the first one + self._set_root_uri(root_uris) + + def _set_root_uri(self, root_uris): + """Set the root URI from a list of options. + + If the current root URI is good, just keep it. Else cycle through our options until we find a good one. + A URI is considered good if we can GET uri/redfish/v1. + """ + for root_uri in root_uris: + uri = root_uri + "/redfish/v1" + response = self.get_request(uri) + if response['ret']: + self.root_uri = root_uri + + def _find_updateservice_resource(self): + """Find the update service resource as well as additional WDC-specific resources.""" + response = super(WdcRedfishUtils, self)._find_updateservice_resource() + if not response['ret']: + return response + return self._find_updateservice_additional_uris() + + def _is_enclosure_multi_tenant(self): + """Determine if the enclosure is multi-tenant. + + The serial number of a multi-tenant enclosure will end in "-A" or "-B". + + :return: True/False if the enclosure is multi-tenant or not; None if unable to determine. + """ + response = self.get_request(self.root_uri + self.service_root + "Chassis/Enclosure") + if response['ret'] is False: + return None + pattern = r".*-[A,B]" + data = response['data'] + return re.match(pattern, data['SerialNumber']) is not None + + def _find_updateservice_additional_uris(self): + """Find & set WDC-specific update service URIs""" + response = self.get_request(self.root_uri + self._update_uri()) + if response['ret'] is False: + return response + data = response['data'] + if 'Actions' not in data: + return {'ret': False, 'msg': 'Service does not support SimpleUpdate'} + if '#UpdateService.SimpleUpdate' not in data['Actions']: + return {'ret': False, 'msg': 'Service does not support SimpleUpdate'} + action = data['Actions']['#UpdateService.SimpleUpdate'] + if 'target' not in action: + return {'ret': False, 'msg': 'Service does not support SimpleUpdate'} + self.simple_update_uri = action['target'] + + # Simple update status URI is not provided via GET /redfish/v1/UpdateService + # So we have to hard code it. + self.simple_update_status_uri = "{0}/Status".format(self.simple_update_uri) + + # FWActivate URI + if 'Oem' not in data['Actions']: + return {'ret': False, 'msg': 'Service does not support OEM operations'} + if 'WDC' not in data['Actions']['Oem']: + return {'ret': False, 'msg': 'Service does not support WDC operations'} + if '#UpdateService.FWActivate' not in data['Actions']['Oem']['WDC']: + return {'ret': False, 'msg': 'Service does not support FWActivate'} + action = data['Actions']['Oem']['WDC']['#UpdateService.FWActivate'] + if 'target' not in action: + return {'ret': False, 'msg': 'Service does not support FWActivate'} + self.firmware_activate_uri = action['target'] + return {'ret': True} + + def _simple_update_status_uri(self): + return self.simple_update_status_uri + + def _firmware_activate_uri(self): + return self.firmware_activate_uri + + def _update_uri(self): + return self.update_uri + + def get_simple_update_status(self): + """Issue Redfish HTTP GET to return the simple update status""" + result = {} + response = self.get_request(self.root_uri + self._simple_update_status_uri()) + if response['ret'] is False: + return response + result['ret'] = True + data = response['data'] + result['entries'] = data + return result + + def firmware_activate(self, update_opts): + """Perform FWActivate using Redfish HTTP API.""" + creds = update_opts.get('update_creds') + payload = {} + if creds: + if creds.get('username'): + payload["Username"] = creds.get('username') + if creds.get('password'): + payload["Password"] = creds.get('password') + + # Make sure the service supports FWActivate + response = self.get_request(self.root_uri + self._update_uri()) + if response['ret'] is False: + return response + data = response['data'] + if 'Actions' not in data: + return {'ret': False, 'msg': 'Service does not support FWActivate'} + + response = self.post_request(self.root_uri + self._firmware_activate_uri(), payload) + if response['ret'] is False: + return response + return {'ret': True, 'changed': True, + 'msg': "FWActivate requested"} + + def _get_bundle_version(self, + bundle_uri, + update_creds): + """Get the firmware version from a bundle file, and whether or not it is multi-tenant. + + Only supports HTTP at this time. Assumes URI exists and is a tarfile. + Looks for a file oobm-[version].pkg, such as 'oobm-4.0.13.pkg`. Extracts the version number + from that filename (in the above example, the version number is "4.0.13". + + To determine if the bundle is multi-tenant or not, it looks inside the .bin file within the tarfile, + and checks the appropriate byte in the file. + + :param str bundle_uri: HTTP URI of the firmware bundle. + :param dict or None update_creds: Dict containing username and password to access the bundle. + :return: Firmware version number contained in the bundle, and whether or not the bundle is multi-tenant. + Either value will be None if unable to deterine. + :rtype: str or None, bool or None + """ + parsed_url = urlparse(bundle_uri) + if update_creds: + original_netloc = parsed_url.netloc + parsed_url._replace(netloc="{0}:{1}{2}".format(update_creds.get("username"), + update_creds.get("password"), + original_netloc)) + + bundle_temp_filename = fetch_file(module=self.module, + url=urlunparse(parsed_url)) + if not tarfile.is_tarfile(bundle_temp_filename): + return None, None + tf = tarfile.open(bundle_temp_filename) + pattern_pkg = r"oobm-(.+)\.pkg" + pattern_bin = r"(.*\.bin)" + bundle_version = None + is_multi_tenant = None + for filename in tf.getnames(): + match_pkg = re.match(pattern_pkg, filename) + if match_pkg is not None: + bundle_version = match_pkg.group(1) + match_bin = re.match(pattern_bin, filename) + if match_bin is not None: + bin_filename = match_bin.group(1) + bin_file = tf.extractfile(bin_filename) + bin_file.seek(11) + byte_11 = bin_file.read(1) + is_multi_tenant = byte_11 == b'\x80' + + return bundle_version, is_multi_tenant + + @staticmethod + def uri_is_http(uri): + """Return True if the specified URI is http or https. + + :param str uri: A URI. + :return: True if the URI is http or https, else False + :rtype: bool + """ + parsed_bundle_uri = urlparse(uri) + return parsed_bundle_uri.scheme.lower() in ['http', 'https'] + + def update_and_activate(self, update_opts): + """Update and activate the firmware in a single action. + + Orchestrates the firmware update so that everything can be done in a single command. + Compares the update version with the already-installed version -- skips update if they are the same. + Performs retries, handles timeouts as needed. + + """ + # Make sure bundle URI is HTTP(s) + bundle_uri = update_opts["update_image_uri"] + if not self.uri_is_http(bundle_uri): + return { + 'ret': False, + 'msg': 'Bundle URI must be HTTP or HTTPS' + } + # Make sure IOM is ready for update + result = self.get_simple_update_status() + if result['ret'] is False: + return result + update_status = result['entries'] + status_code = update_status['StatusCode'] + status_description = update_status['Description'] + if status_code not in [ + self.UPDATE_STATUS_CODE_READY_FOR_FW_UPDATE, + self.UPDATE_STATUS_CODE_FW_UPDATE_FAILED + ]: + return { + 'ret': False, + 'msg': 'Target is not ready for FW update. Current status: {0} ({1})'.format( + status_code, status_description + )} + + # Check the FW version in the bundle file, and compare it to what is already on the IOMs + + # Bundle version number + update_creds = update_opts.get("update_creds") + bundle_firmware_version, is_bundle_multi_tenant = self._get_bundle_version(bundle_uri, + update_creds) + if bundle_firmware_version is None or is_bundle_multi_tenant is None: + return { + 'ret': False, + 'msg': 'Unable to extract bundle version or multi-tenant status from update image tarfile' + } + + # Verify that the bundle is correctly multi-tenant or not + is_enclosure_multi_tenant = self._is_enclosure_multi_tenant() + if is_enclosure_multi_tenant != is_bundle_multi_tenant: + return { + 'ret': False, + 'msg': 'Enclosure multi-tenant is {0} but bundle multi-tenant is {1}'.format( + is_enclosure_multi_tenant, + is_bundle_multi_tenant, + ) + } + + # Version number installed on IOMs + firmware_inventory = self.get_firmware_inventory() + if not firmware_inventory["ret"]: + return firmware_inventory + firmware_inventory_dict = {} + for entry in firmware_inventory["entries"]: + firmware_inventory_dict[entry["Id"]] = entry + iom_a_firmware_version = firmware_inventory_dict.get("IOModuleA_OOBM", {}).get("Version") + iom_b_firmware_version = firmware_inventory_dict.get("IOModuleB_OOBM", {}).get("Version") + # If version is None, we will proceed with the update, because we cannot tell + # for sure that we have a full version match. + if is_enclosure_multi_tenant: + # For multi-tenant, only one of the IOMs will be affected by the firmware update, + # so see if that IOM already has the same firmware version as the bundle. + firmware_already_installed = bundle_firmware_version == self._get_installed_firmware_version_of_multi_tenant_system( + iom_a_firmware_version, + iom_b_firmware_version) + else: + # For single-tenant, see if both IOMs already have the same firmware version as the bundle. + firmware_already_installed = bundle_firmware_version == iom_a_firmware_version == iom_b_firmware_version + # If this FW already installed, return changed: False, and do not update the firmware. + if firmware_already_installed: + return { + 'ret': True, + 'changed': False, + 'msg': 'Version {0} already installed'.format(bundle_firmware_version) + } + + # Version numbers don't match the bundle -- proceed with update (unless we are in check mode) + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + update_successful = False + retry_interval_seconds = 5 + max_number_of_retries = 5 + retry_number = 0 + while retry_number < max_number_of_retries and not update_successful: + if retry_number != 0: + time.sleep(retry_interval_seconds) + retry_number += 1 + result = self.simple_update(update_opts) + if result['ret'] is not True: + # Sometimes a timeout error is returned even though the update actually was requested. + # Check the update status to see if the update is in progress. + status_result = self.get_simple_update_status() + if status_result['ret'] is False: + continue + update_status = status_result['entries'] + status_code = update_status['StatusCode'] + if status_code != self.UPDATE_STATUS_CODE_FW_UPDATE_IN_PROGRESS: + # Update is not in progress -- retry until max number of retries + continue + else: + update_successful = True + else: + update_successful = True + if not update_successful: + # Unable to get SimpleUpdate to work. Return the failure from the SimpleUpdate + return result + + # Wait for "ready to activate" + max_wait_minutes = 30 + polling_interval_seconds = 30 + status_code = self.UPDATE_STATUS_CODE_READY_FOR_FW_UPDATE + start_time = datetime.datetime.now() + # For a short time, target will still say "ready for firmware update" before it transitions + # to "update in progress" + status_codes_for_update_incomplete = [ + self.UPDATE_STATUS_CODE_FW_UPDATE_IN_PROGRESS, + self.UPDATE_STATUS_CODE_READY_FOR_FW_UPDATE + ] + iteration = 0 + while status_code in status_codes_for_update_incomplete \ + and datetime.datetime.now() - start_time < datetime.timedelta(minutes=max_wait_minutes): + if iteration != 0: + time.sleep(polling_interval_seconds) + iteration += 1 + result = self.get_simple_update_status() + if result['ret'] is False: + continue # We may get timeouts, just keep trying until we give up + update_status = result['entries'] + status_code = update_status['StatusCode'] + status_description = update_status['Description'] + if status_code == self.UPDATE_STATUS_CODE_FW_UPDATE_IN_PROGRESS: + # Once it says update in progress, "ready for update" is no longer a valid status code + status_codes_for_update_incomplete = [self.UPDATE_STATUS_CODE_FW_UPDATE_IN_PROGRESS] + + # Update no longer in progress -- verify that it finished + if status_code != self.UPDATE_STATUS_CODE_FW_UPDATE_COMPLETED_WAITING_FOR_ACTIVATION: + return { + 'ret': False, + 'msg': 'Target is not ready for FW activation after update. Current status: {0} ({1})'.format( + status_code, status_description + )} + + self.firmware_activate(update_opts) + return {'ret': True, 'changed': True, + 'msg': "Firmware updated and activation initiated."} + + def _get_installed_firmware_version_of_multi_tenant_system(self, + iom_a_firmware_version, + iom_b_firmware_version): + """Return the version for the active IOM on a multi-tenant system. + + Only call this on a multi-tenant system. + Given the installed firmware versions for IOM A, B, this method will determine which IOM is active + for this tenanat, and return that IOM's firmware version. + """ + # To determine which IOM we are on, try to GET each IOM resource + # The one we are on will return valid data. + # The other will return an error with message "IOM Module A/B cannot be read" + which_iom_is_this = None + for iom_letter in ['A', 'B']: + iom_uri = "Chassis/IOModule{0}FRU".format(iom_letter) + response = self.get_request(self.root_uri + self.service_root + iom_uri) + if response['ret'] is False: + continue + data = response['data'] + if "Id" in data: # Assume if there is an "Id", it is valid + which_iom_is_this = iom_letter + break + if which_iom_is_this == 'A': + return iom_a_firmware_version + elif which_iom_is_this == 'B': + return iom_b_firmware_version + else: + return None diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_command.py b/plugins/modules/remote_management/redfish/wdc_redfish_command.py new file mode 100644 index 0000000000..defbfefd07 --- /dev/null +++ b/plugins/modules/remote_management/redfish/wdc_redfish_command.py @@ -0,0 +1,252 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022 Western Digital Corporation +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: wdc_redfish_command +short_description: Manages WDC UltraStar Data102 Out-Of-Band controllers using Redfish APIs +version_added: 5.4.0 +description: + - Builds Redfish URIs locally and sends them to remote OOB controllers to + perform an action. + - Manages OOB controller firmware. For example, Firmware Activate, Update and Activate. +options: + category: + required: true + description: + - Category to execute on OOB controller. + type: str + command: + required: true + description: + - List of commands to execute on OOB controller. + type: list + elements: str + baseuri: + description: + - Base URI of OOB controller. Must include this or I(ioms). + type: str + ioms: + description: + - List of IOM FQDNs for the enclosure. Must include this or I(baseuri). + type: list + elements: str + username: + description: + - User for authentication with OOB controller. + type: str + password: + description: + - Password for authentication with OOB controller. + type: str + auth_token: + description: + - Security token for authentication with OOB controller. + type: str + timeout: + description: + - Timeout in seconds for URL requests to OOB controller. + default: 10 + type: int + update_image_uri: + required: false + description: + - The URI of the image for the update. + type: str + update_creds: + required: false + description: + - The credentials for retrieving the update image. + type: dict + suboptions: + username: + required: false + description: + - The username for retrieving the update image. + type: str + password: + required: false + description: + - The password for retrieving the update image. + type: str +requirements: + - dnspython (2.1.0 for Python 3, 1.16.0 for Python 2) +notes: + - In the inventory, you can specify baseuri or ioms. See the EXAMPLES section. + - ioms is a list of FQDNs for the enclosure's IOMs. + + +author: Mike Moerk (@mikemoerk) +''' + +EXAMPLES = ''' +- name: Firmware Activate (required after SimpleUpdate to apply the new firmware) + community.general.wdc_redfish_command: + category: Update + command: FWActivate + ioms: "{{ ioms }}" + username: "{{ username }}" + password: "{{ password }}" + +- name: Firmware Activate with individual IOMs specified + community.general.wdc_redfish_command: + category: Update + command: FWActivate + ioms: + - iom1.wdc.com + - iom2.wdc.com + username: "{{ username }}" + password: "{{ password }}" + +- name: Firmware Activate with baseuri specified + community.general.wdc_redfish_command: + category: Update + command: FWActivate + baseuri: "iom1.wdc.com" + username: "{{ username }}" + password: "{{ password }}" + + +- name: Update and Activate (orchestrates firmware update and activation with a single command) + community.general.wdc_redfish_command: + category: Update + command: UpdateAndActivate + ioms: "{{ ioms }}" + username: "{{ username }}" + password: "{{ password }}" + update_image_uri: "{{ update_image_uri }}" + update_creds: + username: operator + password: supersecretpwd +''' + +RETURN = ''' +msg: + description: Message with action result or error description + returned: always + type: str + sample: "Action was successful" +''' + +from ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils import WdcRedfishUtils +from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.common.text.converters import to_native + +CATEGORY_COMMANDS_ALL = { + "Update": [ + "FWActivate", + "UpdateAndActivate" + ] +} + + +def main(): + module = AnsibleModule( + argument_spec=dict( + category=dict(required=True), + command=dict(required=True, type='list', elements='str'), + ioms=dict(type='list', elements='str'), + baseuri=dict(), + username=dict(), + password=dict(no_log=True), + auth_token=dict(no_log=True), + update_creds=dict( + type='dict', + options=dict( + username=dict(), + password=dict(no_log=True) + ) + ), + update_image_uri=dict(), + timeout=dict(type='int', default=10) + ), + required_together=[ + ('username', 'password'), + ], + required_one_of=[ + ('username', 'auth_token'), + ('baseuri', 'ioms') + ], + mutually_exclusive=[ + ('username', 'auth_token'), + ], + supports_check_mode=True + ) + + category = module.params['category'] + command_list = module.params['command'] + + # admin credentials used for authentication + creds = {'user': module.params['username'], + 'pswd': module.params['password'], + 'token': module.params['auth_token']} + + # timeout + timeout = module.params['timeout'] + + # Check that Category is valid + if category not in CATEGORY_COMMANDS_ALL: + module.fail_json(msg=to_native("Invalid Category '%s'. Valid Categories = %s" % (category, sorted(CATEGORY_COMMANDS_ALL.keys())))) + + # Check that all commands are valid + for cmd in command_list: + # Fail if even one command given is invalid + if cmd not in CATEGORY_COMMANDS_ALL[category]: + module.fail_json(msg=to_native("Invalid Command '%s'. Valid Commands = %s" % (cmd, CATEGORY_COMMANDS_ALL[category]))) + + # Build root URI(s) + if module.params.get("baseuri") is not None: + root_uris = ["https://" + module.params['baseuri']] + else: + root_uris = [ + "https://" + iom for iom in module.params['ioms'] + ] + rf_utils = WdcRedfishUtils(creds, root_uris, timeout, module, + resource_id=None, data_modification=True) + + # Organize by Categories / Commands + + if category == "Update": + # execute only if we find UpdateService resources + resource = rf_utils._find_updateservice_resource() + if resource['ret'] is False: + module.fail_json(msg=resource['msg']) + # update options + update_opts = { + 'update_creds': module.params['update_creds'] + } + for command in command_list: + if command == "FWActivate": + if module.check_mode: + result = { + 'ret': True, + 'changed': True, + 'msg': 'FWActivate not performed in check mode.' + } + else: + result = rf_utils.firmware_activate(update_opts) + elif command == "UpdateAndActivate": + update_opts["update_image_uri"] = module.params['update_image_uri'] + result = rf_utils.update_and_activate(update_opts) + + if result['ret'] is False: + module.fail_json(msg=to_native(result['msg'])) + else: + del result['ret'] + changed = result.get('changed', True) + session = result.get('session', dict()) + module.exit_json(changed=changed, + session=session, + msg='Action was successful' if not module.check_mode else result.get( + 'msg', "No action performed in check mode." + )) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_info.py b/plugins/modules/remote_management/redfish/wdc_redfish_info.py new file mode 100644 index 0000000000..b3596f6ac0 --- /dev/null +++ b/plugins/modules/remote_management/redfish/wdc_redfish_info.py @@ -0,0 +1,214 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022 Western Digital Corporation +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: wdc_redfish_info +short_description: Manages WDC UltraStar Data102 Out-Of-Band controllers using Redfish APIs +version_added: 5.4.0 +description: + - Builds Redfish URIs locally and sends them to remote OOB controllers to + get information back. +options: + category: + required: true + description: + - Category to execute on OOB controller. + type: str + command: + required: true + description: + - List of commands to execute on OOB controller. + type: list + elements: str + baseuri: + description: + - Base URI of OOB controller. Must include this or I(ioms). + type: str + ioms: + description: + - List of IOM FQDNs for the enclosure. Must include this or I(baseuri). + type: list + elements: str + username: + description: + - User for authentication with OOB controller. + type: str + password: + description: + - Password for authentication with OOB controller. + type: str + auth_token: + description: + - Security token for authentication with OOB controller. + type: str + timeout: + description: + - Timeout in seconds for URL requests to OOB controller. + default: 10 + type: int + +notes: + - In the inventory, you can specify baseuri or ioms. See the EXAMPLES section. + - ioms is a list of FQDNs for the enclosure's IOMs. + +author: Mike Moerk (@mikemoerk) +''' + +EXAMPLES = ''' +- name: Get Simple Update Status with individual IOMs specified + community.general.wdc_redfish_info: + category: Update + command: SimpleUpdateStatus + ioms: + - iom1.wdc.com + - iom2.wdc.com + username: "{{ username }}" + password: "{{ password }}" + register: result + +- name: Print fetched information + ansible.builtin.debug: + msg: "{{ result.redfish_facts.simple_update_status.entries | to_nice_json }}" + +- name: Get Simple Update Status with baseuri specified + community.general.wdc_redfish_info: + category: Update + command: SimpleUpdateStatus + baseuri: "iom1.wdc.com" + username: "{{ username }}" + password: "{{ password }}" + register: result + +- name: Print fetched information + ansible.builtin.debug: + msg: "{{ result.redfish_facts.simple_update_status.entries | to_nice_json }}" +''' + +RETURN = ''' +Description: + description: Firmware update status description. + returned: always + type: str + sample: + - Ready for FW update + - FW update in progress + - FW update completed. Waiting for activation. +ErrorCode: + description: Numeric error code for firmware update status. Non-zero indicates an error condition. + returned: always + type: int + sample: + - 0 +EstimatedRemainingMinutes: + description: Estimated number of minutes remaining in firmware update operation. + returned: always + type: int + sample: + - 0 + - 20 +StatusCode: + description: Firmware update status code. + returned: always + type: int + sample: + - 0 (Ready for FW update) + - 1 (FW update in progress) + - 2 (FW update completed. Waiting for activation.) + - 3 (FW update failed.) +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.common.text.converters import to_native +from ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils import WdcRedfishUtils + +CATEGORY_COMMANDS_ALL = { + "Update": ["SimpleUpdateStatus"] +} + + +def main(): + result = {} + module = AnsibleModule( + argument_spec=dict( + category=dict(required=True), + command=dict(required=True, type='list', elements='str'), + ioms=dict(type='list', elements='str'), + baseuri=dict(), + username=dict(), + password=dict(no_log=True), + auth_token=dict(no_log=True), + timeout=dict(type='int', default=10) + ), + required_together=[ + ('username', 'password'), + ], + required_one_of=[ + ('username', 'auth_token'), + ('baseuri', 'ioms') + ], + mutually_exclusive=[ + ('username', 'auth_token'), + ], + supports_check_mode=True + ) + + category = module.params['category'] + command_list = module.params['command'] + + # admin credentials used for authentication + creds = {'user': module.params['username'], + 'pswd': module.params['password'], + 'token': module.params['auth_token']} + + # timeout + timeout = module.params['timeout'] + + # Check that Category is valid + if category not in CATEGORY_COMMANDS_ALL: + module.fail_json(msg=to_native("Invalid Category '%s'. Valid Categories = %s" % (category, sorted(CATEGORY_COMMANDS_ALL.keys())))) + + # Check that all commands are valid + for cmd in command_list: + # Fail if even one command given is invalid + if cmd not in CATEGORY_COMMANDS_ALL[category]: + module.fail_json(msg=to_native("Invalid Command '%s'. Valid Commands = %s" % (cmd, CATEGORY_COMMANDS_ALL[category]))) + + # Build root URI(s) + if module.params.get("baseuri") is not None: + root_uris = ["https://" + module.params['baseuri']] + else: + root_uris = [ + "https://" + iom for iom in module.params['ioms'] + ] + rf_utils = WdcRedfishUtils(creds, root_uris, timeout, module, + resource_id=None, + data_modification=False + ) + + # Organize by Categories / Commands + + if category == "Update": + # execute only if we find UpdateService resources + resource = rf_utils._find_updateservice_resource() + if resource['ret'] is False: + module.fail_json(msg=resource['msg']) + for command in command_list: + if command == "SimpleUpdateStatus": + simple_update_status_result = rf_utils.get_simple_update_status() + if simple_update_status_result['ret'] is False: + module.fail_json(msg=to_native(result['msg'])) + else: + del simple_update_status_result['ret'] + result["simple_update_status"] = simple_update_status_result + module.exit_json(changed=False, redfish_facts=result) + + +if __name__ == '__main__': + main() diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py new file mode 100644 index 0000000000..38c067385d --- /dev/null +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py @@ -0,0 +1,733 @@ +# -*- coding: utf-8 -*- +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import shutil +import uuid +import tarfile +import tempfile +import os + +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible.module_utils import basic +import ansible_collections.community.general.plugins.modules.remote_management.redfish.wdc_redfish_command as module +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson +from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json + +MOCK_SUCCESSFUL_HTTP_EMPTY_RESPONSE = { + "ret": True, + "data": { + } +} + +MOCK_GET_ENCLOSURE_RESPONSE_SINGLE_TENANT = { + "ret": True, + "data": { + "SerialNumber": "12345" + } +} + +MOCK_GET_ENCLOSURE_RESPONSE_MULTI_TENANT = { + "ret": True, + "data": { + "SerialNumber": "12345-A" + } +} + +MOCK_URL_ERROR = { + "ret": False, + "msg": "This is a mock URL error", + "status": 500 +} + +MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE = { + "ret": True, + "data": { + "UpdateService": { + "@odata.id": "/UpdateService" + } + } +} + +MOCK_SUCCESSFUL_RESPONSE_WITH_SIMPLE_UPDATE_AND_FW_ACTIVATE = { + "ret": True, + "data": { + "Actions": { + "#UpdateService.SimpleUpdate": { + "target": "mocked value" + }, + "Oem": { + "WDC": { + "#UpdateService.FWActivate": { + "title": "Activate the downloaded firmware.", + "target": "/redfish/v1/UpdateService/Actions/UpdateService.FWActivate" + } + } + } + } + } +} + +MOCK_SUCCESSFUL_RESPONSE_WITH_ACTIONS = { + "ret": True, + "data": { + "Actions": {} + } +} + +MOCK_GET_IOM_A_MULTI_TENANT = { + "ret": True, + "data": { + "Id": "IOModuleAFRU" + } +} + +MOCK_GET_IOM_B_MULTI_TENANAT = { + "ret": True, + "data": { + "error": { + "message": "IOM Module B cannot be read" + } + } +} + + +MOCK_READY_FOR_FW_UPDATE = { + "ret": True, + "entries": { + "Description": "Ready for FW update", + "StatusCode": 0 + } +} + +MOCK_FW_UPDATE_IN_PROGRESS = { + "ret": True, + "entries": { + "Description": "FW update in progress", + "StatusCode": 1 + } +} + +MOCK_WAITING_FOR_ACTIVATION = { + "ret": True, + "entries": { + "Description": "FW update completed. Waiting for activation.", + "StatusCode": 2 + } +} + +MOCK_SIMPLE_UPDATE_STATUS_LIST = [ + MOCK_READY_FOR_FW_UPDATE, + MOCK_FW_UPDATE_IN_PROGRESS, + MOCK_WAITING_FOR_ACTIVATION +] + + +def get_bin_path(self, arg, required=False): + """Mock AnsibleModule.get_bin_path""" + return arg + + +def get_exception_message(ansible_exit_json): + """From an AnsibleExitJson exception, get the message string.""" + return ansible_exit_json.exception.args[0]["msg"] + + +def is_changed(ansible_exit_json): + """From an AnsibleExitJson exception, return the value of the changed flag""" + return ansible_exit_json.exception.args[0]["changed"] + + +def mock_simple_update(*args, **kwargs): + return { + "ret": True + } + + +def mocked_url_response(*args, **kwargs): + """Mock to just return a generic string.""" + return "/mockedUrl" + + +def mock_update_url(*args, **kwargs): + """Mock of the update url""" + return "/UpdateService" + + +def mock_fw_activate_url(*args, **kwargs): + """Mock of the FW Activate URL""" + return "/UpdateService.FWActivate" + + +def empty_return(*args, **kwargs): + """Mock to just return an empty successful return.""" + return {"ret": True} + + +def mock_get_simple_update_status_ready_for_fw_update(*args, **kwargs): + """Mock to return simple update status Ready for FW update""" + return MOCK_READY_FOR_FW_UPDATE + + +def mock_get_request_enclosure_single_tenant(*args, **kwargs): + """Mock for get_request for single-tenant enclosure.""" + if args[1].endswith("/redfish/v1") or args[1].endswith("/redfish/v1/"): + return MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE + elif args[1].endswith("/mockedUrl"): + return MOCK_SUCCESSFUL_HTTP_EMPTY_RESPONSE + elif args[1].endswith("Chassis/Enclosure"): + return MOCK_GET_ENCLOSURE_RESPONSE_SINGLE_TENANT + elif args[1].endswith("/UpdateService"): + return MOCK_SUCCESSFUL_RESPONSE_WITH_SIMPLE_UPDATE_AND_FW_ACTIVATE + else: + raise RuntimeError("Illegal call to get_request in test: " + args[1]) + + +def mock_get_request_enclosure_multi_tenant(*args, **kwargs): + """Mock for get_request with multi-tenant enclosure.""" + if args[1].endswith("/redfish/v1") or args[1].endswith("/redfish/v1/"): + return MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE + elif args[1].endswith("/mockedUrl"): + return MOCK_SUCCESSFUL_HTTP_EMPTY_RESPONSE + elif args[1].endswith("Chassis/Enclosure"): + return MOCK_GET_ENCLOSURE_RESPONSE_MULTI_TENANT + elif args[1].endswith("/UpdateService"): + return MOCK_SUCCESSFUL_RESPONSE_WITH_SIMPLE_UPDATE_AND_FW_ACTIVATE + elif args[1].endswith("/IOModuleAFRU"): + return MOCK_GET_IOM_A_MULTI_TENANT + elif args[1].endswith("/IOModuleBFRU"): + return MOCK_GET_IOM_B_MULTI_TENANAT + else: + raise RuntimeError("Illegal call to get_request in test: " + args[1]) + + +def mock_post_request(*args, **kwargs): + """Mock post_request with successful response.""" + if args[1].endswith("/UpdateService.FWActivate"): + return { + "ret": True, + "data": ACTION_WAS_SUCCESSFUL_MESSAGE + } + else: + raise RuntimeError("Illegal POST call to: " + args[1]) + + +def mock_get_firmware_inventory_version_1_2_3(*args, **kwargs): + return { + "ret": True, + "entries": [ + { + "Id": "IOModuleA_OOBM", + "Version": "1.2.3" + }, + { + "Id": "IOModuleB_OOBM", + "Version": "1.2.3" + } + ] + } + + +ERROR_MESSAGE_UNABLE_TO_EXTRACT_BUNDLE_VERSION = "Unable to extract bundle version or multi-tenant status from update image tarfile" +ACTION_WAS_SUCCESSFUL_MESSAGE = "Action was successful" + + +class TestWdcRedfishCommand(unittest.TestCase): + + def setUp(self): + self.mock_module_helper = patch.multiple(basic.AnsibleModule, + exit_json=exit_json, + fail_json=fail_json, + get_bin_path=get_bin_path) + self.mock_module_helper.start() + self.addCleanup(self.mock_module_helper.stop) + self.tempdir = tempfile.mkdtemp() + + def tearDown(self): + shutil.rmtree(self.tempdir) + + def test_module_fail_when_required_args_missing(self): + with self.assertRaises(AnsibleFailJson): + set_module_args({}) + module.main() + + def test_module_fail_when_unknown_category(self): + with self.assertRaises(AnsibleFailJson): + set_module_args({ + 'category': 'unknown', + 'command': 'FWActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': [], + }) + module.main() + + def test_module_fail_when_unknown_command(self): + with self.assertRaises(AnsibleFailJson): + set_module_args({ + 'category': 'Update', + 'command': 'unknown', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': [], + }) + module.main() + + def test_module_fw_activate_first_iom_unavailable(self): + """Test that if the first IOM is not available, the 2nd one is used.""" + ioms = [ + "bad.example.com", + "good.example.com" + ] + module_args = { + 'category': 'Update', + 'command': 'FWActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ioms + } + set_module_args(module_args) + + def mock_get_request(*args, **kwargs): + """Mock for get_request that will fail on the 'bad' IOM.""" + if "bad.example.com" in args[1]: + return MOCK_URL_ERROR + else: + return mock_get_request_enclosure_single_tenant(*args, **kwargs) + + with patch.multiple(module.WdcRedfishUtils, + _firmware_activate_uri=mock_fw_activate_url, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as cm: + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, + get_exception_message(cm)) + + def test_module_fw_activate_pass(self): + """Test the FW Activate command in a passing scenario.""" + # Run the same test twice -- once specifying ioms, and once specifying baseuri. + # Both should work the same way. + uri_specifiers = [ + { + "ioms": ["example1.example.com"] + }, + { + "baseuri": "example1.example.com" + } + ] + for uri_specifier in uri_specifiers: + module_args = { + 'category': 'Update', + 'command': 'FWActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + } + module_args.update(uri_specifier) + set_module_args(module_args) + + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + _firmware_activate_uri=mock_fw_activate_url, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request_enclosure_single_tenant, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, + get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_module_fw_activate_service_does_not_support_fw_activate(self): + """Test FW Activate when it is not supported.""" + expected_error_message = "Service does not support FWActivate" + set_module_args({ + 'category': 'Update', + 'command': 'FWActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"] + }) + + def mock_update_uri_response(*args, **kwargs): + return { + "ret": True, + "data": {} # No Actions + } + + with patch.multiple(module.WdcRedfishUtils, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_update_uri_response): + with self.assertRaises(AnsibleFailJson) as cm: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(cm)) + + def test_module_update_and_activate_image_uri_not_http(self): + """Test Update and Activate when URI is not http(s)""" + expected_error_message = "Bundle URI must be HTTP or HTTPS" + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "ftp://example.com/image" + }) + with patch.multiple(module.WdcRedfishUtils, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return): + with self.assertRaises(AnsibleFailJson) as cm: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(cm)) + + def test_module_update_and_activate_target_not_ready_for_fw_update(self): + """Test Update and Activate when target is not in the correct state.""" + mock_status_code = 999 + mock_status_description = "mock status description" + expected_error_message = "Target is not ready for FW update. Current status: {0} ({1})".format( + mock_status_code, + mock_status_description + ) + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image" + }) + with patch.object(module.WdcRedfishUtils, "get_simple_update_status") as mock_get_simple_update_status: + mock_get_simple_update_status.return_value = { + "ret": True, + "entries": { + "StatusCode": mock_status_code, + "Description": mock_status_description + } + } + + with patch.multiple(module.WdcRedfishUtils, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return): + with self.assertRaises(AnsibleFailJson) as cm: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(cm)) + + def test_module_update_and_activate_bundle_not_a_tarfile(self): + """Test Update and Activate when bundle is not a tarfile""" + mock_filename = os.path.abspath(__file__) + expected_error_message = ERROR_MESSAGE_UNABLE_TO_EXTRACT_BUNDLE_VERSION + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = mock_filename + with patch.multiple(module.WdcRedfishUtils, + get_simple_update_status=mock_get_simple_update_status_ready_for_fw_update, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return): + with self.assertRaises(AnsibleFailJson) as cm: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(cm)) + + def test_module_update_and_activate_bundle_contains_no_firmware_version(self): + """Test Update and Activate when bundle contains no firmware version""" + expected_error_message = ERROR_MESSAGE_UNABLE_TO_EXTRACT_BUNDLE_VERSION + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + + tar_name = "empty_tarfile{0}.tar".format(uuid.uuid4()) + empty_tarfile = tarfile.open(os.path.join(self.tempdir, tar_name), "w") + empty_tarfile.close() + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = os.path.join(self.tempdir, tar_name) + with patch.multiple(module.WdcRedfishUtils, + get_simple_update_status=mock_get_simple_update_status_ready_for_fw_update, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return): + with self.assertRaises(AnsibleFailJson) as cm: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(cm)) + + def test_module_update_and_activate_version_already_installed(self): + """Test Update and Activate when the bundle version is already installed""" + mock_firmware_version = "1.2.3" + expected_error_message = ACTION_WAS_SUCCESSFUL_MESSAGE + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + + tar_name = self.generate_temp_bundlefile(mock_firmware_version=mock_firmware_version, + is_multi_tenant=False) + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = os.path.join(self.tempdir, tar_name) + with patch.multiple(module.WdcRedfishUtils, + get_firmware_inventory=mock_get_firmware_inventory_version_1_2_3, + get_simple_update_status=mock_get_simple_update_status_ready_for_fw_update, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request_enclosure_single_tenant): + with self.assertRaises(AnsibleExitJson) as result: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(result)) + self.assertFalse(is_changed(result)) + + def test_module_update_and_activate_version_already_installed_multi_tenant(self): + """Test Update and Activate on multi-tenant when version is already installed""" + mock_firmware_version = "1.2.3" + expected_error_message = ACTION_WAS_SUCCESSFUL_MESSAGE + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + + tar_name = self.generate_temp_bundlefile(mock_firmware_version=mock_firmware_version, + is_multi_tenant=True) + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = os.path.join(self.tempdir, tar_name) + with patch.multiple(module.WdcRedfishUtils, + get_firmware_inventory=mock_get_firmware_inventory_version_1_2_3, + get_simple_update_status=mock_get_simple_update_status_ready_for_fw_update, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request_enclosure_multi_tenant): + with self.assertRaises(AnsibleExitJson) as result: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(result)) + self.assertFalse(is_changed(result)) + + def test_module_update_and_activate_pass(self): + """Test Update and Activate (happy path)""" + mock_firmware_version = "1.2.2" + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + + tar_name = self.generate_temp_bundlefile(mock_firmware_version=mock_firmware_version, + is_multi_tenant=False) + + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = os.path.join(self.tempdir, tar_name) + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + get_firmware_inventory=mock_get_firmware_inventory_version_1_2_3, + simple_update=mock_simple_update, + _simple_update_status_uri=mocked_url_response, + # _find_updateservice_resource=empty_return, + # _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request_enclosure_single_tenant, + post_request=mock_post_request): + + with patch("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils.get_simple_update_status" + ) as mock_get_simple_update_status: + mock_get_simple_update_status.side_effect = MOCK_SIMPLE_UPDATE_STATUS_LIST + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + self.assertTrue(is_changed(ansible_exit_json)) + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, get_exception_message(ansible_exit_json)) + + def test_module_update_and_activate_pass_multi_tenant(self): + """Test Update and Activate with multi-tenant (happy path)""" + mock_firmware_version = "1.2.2" + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + + tar_name = self.generate_temp_bundlefile(mock_firmware_version=mock_firmware_version, + is_multi_tenant=True) + + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = os.path.join(self.tempdir, tar_name) + with patch.multiple(module.WdcRedfishUtils, + get_firmware_inventory=mock_get_firmware_inventory_version_1_2_3, + simple_update=mock_simple_update, + _simple_update_status_uri=mocked_url_response, + # _find_updateservice_resource=empty_return, + # _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request_enclosure_multi_tenant, + post_request=mock_post_request): + with patch("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils.get_simple_update_status" + ) as mock_get_simple_update_status: + mock_get_simple_update_status.side_effect = MOCK_SIMPLE_UPDATE_STATUS_LIST + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + self.assertTrue(is_changed(ansible_exit_json)) + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, get_exception_message(ansible_exit_json)) + + def test_module_fw_update_multi_tenant_firmware_single_tenant_enclosure(self): + """Test Update and Activate using multi-tenant bundle on single-tenant enclosure""" + mock_firmware_version = "1.1.1" + expected_error_message = "Enclosure multi-tenant is False but bundle multi-tenant is True" + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + + tar_name = self.generate_temp_bundlefile(mock_firmware_version=mock_firmware_version, + is_multi_tenant=True) + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = os.path.join(self.tempdir, tar_name) + with patch.multiple(module.WdcRedfishUtils, + get_firmware_inventory=mock_get_firmware_inventory_version_1_2_3(), + get_simple_update_status=mock_get_simple_update_status_ready_for_fw_update, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request_enclosure_single_tenant): + with self.assertRaises(AnsibleFailJson) as result: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(result)) + + def test_module_fw_update_single_tentant_firmware_multi_tenant_enclosure(self): + """Test Update and Activate using singe-tenant bundle on multi-tenant enclosure""" + mock_firmware_version = "1.1.1" + expected_error_message = "Enclosure multi-tenant is True but bundle multi-tenant is False" + set_module_args({ + 'category': 'Update', + 'command': 'UpdateAndActivate', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + 'update_image_uri': "http://example.com/image", + "update_creds": { + "username": "image_user", + "password": "image_password" + } + }) + + tar_name = self.generate_temp_bundlefile(mock_firmware_version=mock_firmware_version, + is_multi_tenant=False) + with patch('ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.fetch_file') as mock_fetch_file: + mock_fetch_file.return_value = os.path.join(self.tempdir, tar_name) + with patch.multiple(module.WdcRedfishUtils, + get_firmware_inventory=mock_get_firmware_inventory_version_1_2_3(), + get_simple_update_status=mock_get_simple_update_status_ready_for_fw_update, + _firmware_activate_uri=mocked_url_response, + _update_uri=mock_update_url, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_get_request_enclosure_multi_tenant): + with self.assertRaises(AnsibleFailJson) as result: + module.main() + self.assertEqual(expected_error_message, + get_exception_message(result)) + + def generate_temp_bundlefile(self, + mock_firmware_version, + is_multi_tenant): + """Generate a temporary fake bundle file. + + :param str mock_firmware_version: The simulated firmware version for the bundle. + :param bool is_multi_tenant: Is the simulated bundle multi-tenant? + + This can be used for a mock FW update. + """ + tar_name = "tarfile{0}.tar".format(uuid.uuid4()) + + bundle_tarfile = tarfile.open(os.path.join(self.tempdir, tar_name), "w") + package_filename = "oobm-{0}.pkg".format(mock_firmware_version) + package_filename_path = os.path.join(self.tempdir, package_filename) + package_file = open(package_filename_path, "w") + package_file.close() + bundle_tarfile.add(os.path.join(self.tempdir, package_filename), arcname=package_filename) + bin_filename = "firmware.bin" + bin_filename_path = os.path.join(self.tempdir, bin_filename) + bin_file = open(bin_filename_path, "wb") + byte_to_write = b'\x80' if is_multi_tenant else b'\xFF' + bin_file.write(byte_to_write * 12) + bin_file.close() + for filename in [package_filename, bin_filename]: + bundle_tarfile.add(os.path.join(self.tempdir, filename), arcname=filename) + bundle_tarfile.close() + return tar_name diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py new file mode 100644 index 0000000000..35b788bedc --- /dev/null +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py @@ -0,0 +1,214 @@ +# -*- coding: utf-8 -*- +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible.module_utils import basic +import ansible_collections.community.general.plugins.modules.remote_management.redfish.wdc_redfish_info as module +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson +from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json + +MOCK_SUCCESSFUL_RESPONSE_WITH_ACTIONS = { + "ret": True, + "data": { + "Actions": {} + } +} + +MOCK_SUCCESSFUL_HTTP_EMPTY_RESPONSE = { + "ret": True, + "data": { + } +} + +MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE = { + "ret": True, + "data": { + "UpdateService": { + "@odata.id": "/UpdateService" + } + } +} + +MOCK_SUCCESSFUL_RESPONSE_WITH_SIMPLE_UPDATE_BUT_NO_FW_ACTIVATE = { + "ret": True, + "data": { + "Actions": { + "#UpdateService.SimpleUpdate": { + "target": "mocked value" + }, + "Oem": { + "WDC": {} # No #UpdateService.FWActivate + } + } + } +} + + +def get_bin_path(self, arg, required=False): + """Mock AnsibleModule.get_bin_path""" + return arg + + +def get_redfish_facts(ansible_exit_json): + """From an AnsibleExitJson exception, get the redfish facts dict.""" + return ansible_exit_json.exception.args[0]["redfish_facts"] + + +def get_exception_message(ansible_exit_json): + """From an AnsibleExitJson exception, get the message string.""" + return ansible_exit_json.exception.args[0]["msg"] + + +class TestWdcRedfishInfo(unittest.TestCase): + + def setUp(self): + self.mock_module_helper = patch.multiple(basic.AnsibleModule, + exit_json=exit_json, + fail_json=fail_json, + get_bin_path=get_bin_path) + self.mock_module_helper.start() + self.addCleanup(self.mock_module_helper.stop) + + def test_module_fail_when_required_args_missing(self): + with self.assertRaises(AnsibleFailJson): + set_module_args({}) + module.main() + + def test_module_fail_when_unknown_category(self): + with self.assertRaises(AnsibleFailJson): + set_module_args({ + 'category': 'unknown', + 'command': 'SimpleUpdateStatus', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': [], + }) + module.main() + + def test_module_fail_when_unknown_command(self): + with self.assertRaises(AnsibleFailJson): + set_module_args({ + 'category': 'Update', + 'command': 'unknown', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': [], + }) + module.main() + + def test_module_simple_update_status_pass(self): + set_module_args({ + 'category': 'Update', + 'command': 'SimpleUpdateStatus', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + }) + + def mock_simple_update_status(*args, **kwargs): + return { + "ret": True, + "data": { + "Description": "Ready for FW update", + "ErrorCode": 0, + "EstimatedRemainingMinutes": 0, + "StatusCode": 0 + } + } + + def mocked_string_response(*args, **kwargs): + return "mockedUrl" + + def empty_return(*args, **kwargs): + return {"ret": True} + + with patch.multiple(module.WdcRedfishUtils, + _simple_update_status_uri=mocked_string_response, + _find_updateservice_resource=empty_return, + _find_updateservice_additional_uris=empty_return, + get_request=mock_simple_update_status): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + redfish_facts = get_redfish_facts(ansible_exit_json) + self.assertEqual(mock_simple_update_status()["data"], + redfish_facts["simple_update_status"]["entries"]) + + def test_module_simple_update_status_updateservice_resource_not_found(self): + set_module_args({ + 'category': 'Update', + 'command': 'SimpleUpdateStatus', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + }) + with patch.object(module.WdcRedfishUtils, 'get_request') as mock_get_request: + mock_get_request.return_value = { + "ret": True, + "data": {} # Missing UpdateService property + } + with self.assertRaises(AnsibleFailJson) as ansible_exit_json: + module.main() + self.assertEqual("UpdateService resource not found", + get_exception_message(ansible_exit_json)) + + def test_module_simple_update_status_service_does_not_support_simple_update(self): + set_module_args({ + 'category': 'Update', + 'command': 'SimpleUpdateStatus', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + }) + + def mock_get_request_function(uri): + mock_url_string = "mockURL" + if mock_url_string in uri: + return { + "ret": True, + "data": { + "Actions": { # No #UpdateService.SimpleUpdate + } + } + } + else: + return { + "ret": True, + "data": mock_url_string + } + + with patch.object(module.WdcRedfishUtils, 'get_request') as mock_get_request: + mock_get_request.side_effect = mock_get_request_function + with self.assertRaises(AnsibleFailJson) as ansible_exit_json: + module.main() + self.assertEqual("UpdateService resource not found", + get_exception_message(ansible_exit_json)) + + def test_module_simple_update_status_service_does_not_support_fw_activate(self): + set_module_args({ + 'category': 'Update', + 'command': 'SimpleUpdateStatus', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'ioms': ["example1.example.com"], + }) + + def mock_get_request_function(uri): + if uri.endswith("/redfish/v1") or uri.endswith("/redfish/v1/"): + return MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE + elif uri.endswith("/mockedUrl"): + return MOCK_SUCCESSFUL_HTTP_EMPTY_RESPONSE + elif uri.endswith("/UpdateService"): + return MOCK_SUCCESSFUL_RESPONSE_WITH_SIMPLE_UPDATE_BUT_NO_FW_ACTIVATE + else: + raise RuntimeError("Illegal call to get_request in test: " + uri) + + with patch("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils.get_request") as mock_get_request: + mock_get_request.side_effect = mock_get_request_function + with self.assertRaises(AnsibleFailJson) as ansible_exit_json: + module.main() + self.assertEqual("Service does not support FWActivate", + get_exception_message(ansible_exit_json)) From c31e6413f29f8844a66ba2d86f8f8c266778f706 Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Thu, 21 Jul 2022 07:19:31 +0200 Subject: [PATCH 0117/2104] Fix path detection for gopass (#4955) * Fix path detection for gopass As per https://github.com/gopasspw/gopass/blob/fc8c9a228618fa4a146a87c9027fa0434b0737fa/docs/features.md#initializing-a-password-store, gopass defaults to ~/.local/share/gopass/stores/root for its password store root location. However, the user can also override this, and this will be stored in the gopass config file (https://github.com/gopasspw/gopass/blob/ed7451678c5e8138d5a8eaafa278d5065a9eb9fe/docs/config.md#configuration-options). This patch ensures that the config setting in gopass is respected, falling back to the default gopass path. pass' behaviour remains unchanged. * Formatting improvements Co-authored-by: Felix Fontein * Add changelog fragment * Formatting improvement Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .../4955-fix-path-detection-for-gopass.yaml | 2 ++ plugins/lookup/passwordstore.py | 27 +++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/4955-fix-path-detection-for-gopass.yaml diff --git a/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml b/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml new file mode 100644 index 0000000000..0ea6106664 --- /dev/null +++ b/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml @@ -0,0 +1,2 @@ +bugfixes: + - passwordstore - fix password store path detection for gopass (https://github.com/ansible-collections/community.general/pull/4955). diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 5823756e35..2f904abdb2 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -21,8 +21,14 @@ DOCUMENTATION = ''' description: query key. required: True passwordstore: - description: location of the password store. - default: '~/.password-store' + description: + - Location of the password store. + - 'The value is decided by checking the following in order:' + - If set, this value is used. + - If C(directory) is set, that value will be used. + - If I(backend=pass), then C(~/.password-store) is used. + - If I(backend=gopass), then the C(path) field in C(~/.config/gopass/config.yml) is used, + falling back to C(~/.local/share/gopass/stores/root) if not defined. directory: description: The directory of the password store. env: @@ -428,11 +434,22 @@ class LookupModule(LookupBase): raise AnsibleError("{0} is not a correct value for locktimeout".format(timeout)) unit_to_seconds = {"s": 1, "m": 60, "h": 3600} self.lock_timeout = int(timeout[:-1]) * unit_to_seconds[timeout[-1]] + + directory = variables.get('passwordstore', os.environ.get('PASSWORD_STORE_DIR', None)) + + if directory is None: + if self.backend == 'gopass': + try: + with open(os.path.expanduser('~/.config/gopass/config.yml')) as f: + directory = yaml.safe_load(f)['path'] + except (FileNotFoundError, KeyError, yaml.YAMLError): + directory = os.path.expanduser('~/.local/share/gopass/stores/root') + else: + directory = os.path.expanduser('~/.password-store') + self.paramvals = { 'subkey': 'password', - 'directory': variables.get('passwordstore', os.environ.get( - 'PASSWORD_STORE_DIR', - os.path.expanduser('~/.password-store'))), + 'directory': directory, 'create': False, 'returnall': False, 'overwrite': False, From c57204f9a944ec8ef821fcf413c3a76ef255e485 Mon Sep 17 00:00:00 2001 From: miyuk Date: Thu, 21 Jul 2022 14:19:44 +0900 Subject: [PATCH 0118/2104] proxmox module_utils: fix get_vm int parse handling (#4945) * add int parse handling * Revert "add int parse handling" This reverts commit db2aac42540a9af69fe58ac055c2e5b97923701b. * fix: vmid check if state is absent * add changelogs fragments * Update changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml | 3 +++ plugins/modules/cloud/misc/proxmox.py | 2 ++ plugins/modules/cloud/misc/proxmox_kvm.py | 2 ++ 3 files changed, 7 insertions(+) create mode 100644 changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml diff --git a/changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml b/changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml new file mode 100644 index 0000000000..1a563f6c93 --- /dev/null +++ b/changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml @@ -0,0 +1,3 @@ +bugfixes: + - proxmox - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). + - proxmox_kvm - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index da8783e16d..dccfdc7b67 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -743,6 +743,8 @@ def main(): module.fail_json(msg="restarting of VM %s failed with exception: %s" % (vmid, e)) elif state == 'absent': + if not vmid: + module.exit_json(changed=False, msg='VM with hostname = %s is already absent' % hostname) try: vm = proxmox.get_vm(vmid, ignore_missing=True) if not vm: diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index abc63f24c3..2b38e89964 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -1370,6 +1370,8 @@ def main(): elif state == 'absent': status = {} + if not vmid: + module.exit_json(changed=False, msg='VM with name = %s is already absent' % name) try: vm = proxmox.get_vm(vmid, ignore_missing=True) if not vm: From 788cfb624aa7e694b533b5d2722aab0ff4522ce6 Mon Sep 17 00:00:00 2001 From: Minei3oat Date: Thu, 21 Jul 2022 13:58:03 +0200 Subject: [PATCH 0119/2104] Pacman: Fix name of URL packages (#4959) * Strip downloading... of unseen URLs * Added changelog fragment * Added integration tests for reason and reason_for Inspired by the integration tests for url packages * Revert "Added integration tests for reason and reason_for" This reverts commit f60d92f0d7d01b09cb70a4bdae28036423652efd. Accidentally commited to the wrong branch. --- changelogs/fragments/4959-pacman-fix-url-packages-name.yaml | 2 ++ plugins/modules/packaging/os/pacman.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/4959-pacman-fix-url-packages-name.yaml diff --git a/changelogs/fragments/4959-pacman-fix-url-packages-name.yaml b/changelogs/fragments/4959-pacman-fix-url-packages-name.yaml new file mode 100644 index 0000000000..3d912c15d4 --- /dev/null +++ b/changelogs/fragments/4959-pacman-fix-url-packages-name.yaml @@ -0,0 +1,2 @@ +bugfixes: + - pacman - fixed name resolution of URL packages (https://github.com/ansible-collections/community.general/pull/4959). diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index a3e0b2f589..65f6f92747 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -613,8 +613,9 @@ class Pacman(object): stderr=stderr, rc=rc, ) - # With Pacman v6.0.1 - libalpm v13.0.1, --upgrade outputs "loading packages..." on stdout. strip that - stdout = stdout.replace("loading packages...\n", "") + # With Pacman v6.0.1 - libalpm v13.0.1, --upgrade outputs " filename_without_extension downloading..." if the URL is unseen. + # In all cases, pacman outputs "loading packages..." on stdout. strip both + stdout = stdout.splitlines()[-1] is_URL = True pkg_name = stdout.strip() pkg_list.append(Package(name=pkg_name, source=pkg, source_is_URL=is_URL)) From e1cfa13a1b24cf9f4128601f67ebd4a88f35c53a Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 23 Jul 2022 12:02:18 +0200 Subject: [PATCH 0120/2104] python-daemon 2.3.1 requires Python 3+. (#4977) --- tests/integration/targets/monit/meta/main.yml | 1 + tests/integration/targets/monit/tasks/main.yml | 1 + tests/utils/constraints.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/integration/targets/monit/meta/main.yml b/tests/integration/targets/monit/meta/main.yml index 5438ced5c3..ba4306cced 100644 --- a/tests/integration/targets/monit/meta/main.yml +++ b/tests/integration/targets/monit/meta/main.yml @@ -1,2 +1,3 @@ dependencies: - setup_pkg_mgr + - setup_remote_constraints diff --git a/tests/integration/targets/monit/tasks/main.yml b/tests/integration/targets/monit/tasks/main.yml index 8f6baeebe8..7b10cbf190 100644 --- a/tests/integration/targets/monit/tasks/main.yml +++ b/tests/integration/targets/monit/tasks/main.yml @@ -62,6 +62,7 @@ pip: name: "{{ item }}" virtualenv: "{{ process_venv }}" + extra_args: "-c {{ remote_constraints }}" loop: - setuptools==44 - python-daemon diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index 876f4dd36c..47b3907b8d 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -50,6 +50,7 @@ redis == 2.10.6 ; python_version < '2.7' redis < 4.0.0 ; python_version >= '2.7' and python_version < '3.6' redis ; python_version >= '3.6' pycdlib < 1.13.0 ; python_version < '3' # 1.13.0 does not work with Python 2, while not declaring that +python-daemon <= 2.3.0 ; python_version < '3' # freeze pylint and its requirements for consistent test results astroid == 2.2.5 From 8f5a8cf4babc423252c2ac909e21af5d7e3d26c1 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 23 Jul 2022 12:14:29 +0200 Subject: [PATCH 0121/2104] Temporarily disable the yum_versionlock tests. (#4978) --- tests/integration/targets/yum_versionlock/aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/targets/yum_versionlock/aliases b/tests/integration/targets/yum_versionlock/aliases index 92b8e448f1..8e981834b6 100644 --- a/tests/integration/targets/yum_versionlock/aliases +++ b/tests/integration/targets/yum_versionlock/aliases @@ -4,3 +4,4 @@ skip/freebsd skip/osx skip/macos skip/rhel8.4 # TODO make sure that tests work on 8.4 as well! +disabled # TODO From 3204905e5c1ac15692b04f3c742e5bfaf15942c4 Mon Sep 17 00:00:00 2001 From: Florian <100365291+florianpaulhoberg@users.noreply.github.com> Date: Sat, 23 Jul 2022 13:33:13 +0200 Subject: [PATCH 0122/2104] Update to new Github account for notifications (#4986) * Update to new Github account for notifications * Update to new Github account for notifications --- .github/BOTMETA.yml | 2 +- plugins/modules/packaging/os/yum_versionlock.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 0ed1a16de6..773e334cc7 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -926,7 +926,7 @@ files: $modules/packaging/os/xbps.py: maintainers: dinoocch the-maldridge $modules/packaging/os/yum_versionlock.py: - maintainers: florianpaulhoberg aminvakil + maintainers: gyptazy aminvakil $modules/packaging/os/zypper.py: maintainers: $team_suse labels: zypper diff --git a/plugins/modules/packaging/os/yum_versionlock.py b/plugins/modules/packaging/os/yum_versionlock.py index a0d9ed2e76..de610cce73 100644 --- a/plugins/modules/packaging/os/yum_versionlock.py +++ b/plugins/modules/packaging/os/yum_versionlock.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Florian Paul Hoberg +# Copyright: (c) 2018, Florian Paul Azim Hoberg # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) @@ -35,7 +35,7 @@ requirements: - yum - yum-versionlock author: - - Florian Paul Hoberg (@florianpaulhoberg) + - Florian Paul Azim Hoberg (@gyptazy) - Amin Vakil (@aminvakil) ''' From e2426707e2c38b5c106f000d66bc76a46ab5cd03 Mon Sep 17 00:00:00 2001 From: Sargun Vohra Date: Sun, 24 Jul 2022 03:08:12 -0700 Subject: [PATCH 0123/2104] Fix keyring_info when using keyring library (#4964) * Fix keyring_info when using keyring library This line used to always clobber the passphrase retrieved via the `keyring` library, making it useless on everything except gnome-keyring. After this change, it'll only use the alternate method if the default one didn't work. * delete whitespace * add changelog fragment * Update changelogs/fragments/4964-fix-keyring-info.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/4964-fix-keyring-info.yml | 2 ++ plugins/modules/system/keyring_info.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4964-fix-keyring-info.yml diff --git a/changelogs/fragments/4964-fix-keyring-info.yml b/changelogs/fragments/4964-fix-keyring-info.yml new file mode 100644 index 0000000000..b10e8cc7cf --- /dev/null +++ b/changelogs/fragments/4964-fix-keyring-info.yml @@ -0,0 +1,2 @@ +bugfixes: + - "keyring_info - fix the result from the keyring library never getting returned (https://github.com/ansible-collections/community.general/pull/4964)." diff --git a/plugins/modules/system/keyring_info.py b/plugins/modules/system/keyring_info.py index 4d3e5ee995..3630842859 100644 --- a/plugins/modules/system/keyring_info.py +++ b/plugins/modules/system/keyring_info.py @@ -122,7 +122,9 @@ def run_module(): pass except AttributeError: pass - passphrase = _alternate_retrieval_method(module) + + if passphrase is None: + passphrase = _alternate_retrieval_method(module) if passphrase is not None: result["msg"] = "Successfully retrieved password for %s@%s" % ( From 2662bc881fead4c8c1a0bc841bdf41116a14b917 Mon Sep 17 00:00:00 2001 From: Benjamin <1982589+tumbl3w33d@users.noreply.github.com> Date: Sun, 24 Jul 2022 12:08:47 +0200 Subject: [PATCH 0124/2104] Introduce dig lookup argument fail_on_error (#4973) with default False for backwards compatibility. Allows fail-fast behavior on lookup failures instead of returning strings and continuing. --- .../4973-introduce-dig-lookup-argument.yaml | 2 ++ plugins/lookup/dig.py | 34 +++++++++++++++---- 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/4973-introduce-dig-lookup-argument.yaml diff --git a/changelogs/fragments/4973-introduce-dig-lookup-argument.yaml b/changelogs/fragments/4973-introduce-dig-lookup-argument.yaml new file mode 100644 index 0000000000..6dcaa26000 --- /dev/null +++ b/changelogs/fragments/4973-introduce-dig-lookup-argument.yaml @@ -0,0 +1,2 @@ +minor_changes: + - dig lookup plugin - add option ``fail_on_error`` to allow stopping execution on lookup failures (https://github.com/ansible-collections/community.general/pull/4973). diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index bf11ce7669..c192028686 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -42,6 +42,15 @@ DOCUMENTATION = ''' default: false type: bool version_added: 3.6.0 + fail_on_error: + description: + - Abort execution on lookup errors. + - The default for this option will likely change to C(true) in the future. + The current default, C(false), is used for backwards compatibility, and will result in empty strings + or the string C(NXDOMAIN) in the result in case of errors. + default: false + type: bool + version_added: 5.4.0 notes: - ALL is not a record per-se, merely the listed fields are available for any record results you retrieve in the form of a dictionary. - While the 'dig' lookup plugin supports anything which dnspython supports out of the box, only a subset can be converted into a dictionary. @@ -273,6 +282,7 @@ class LookupModule(LookupBase): domain = None qtype = 'A' flat = True + fail_on_error = False rdclass = dns.rdataclass.from_text('IN') for t in terms: @@ -311,6 +321,8 @@ class LookupModule(LookupBase): raise AnsibleError("dns lookup illegal CLASS: %s" % to_native(e)) elif opt == 'retry_servfail': myres.retry_servfail = bool(arg) + elif opt == 'fail_on_error': + fail_on_error = bool(arg) continue @@ -353,16 +365,24 @@ class LookupModule(LookupBase): rd['class'] = dns.rdataclass.to_text(rdata.rdclass) ret.append(rd) - except Exception as e: - ret.append(str(e)) + except Exception as err: + if fail_on_error: + raise AnsibleError("Lookup failed: %s" % str(err)) + ret.append(str(err)) - except dns.resolver.NXDOMAIN: + except dns.resolver.NXDOMAIN as err: + if fail_on_error: + raise AnsibleError("Lookup failed: %s" % str(err)) ret.append('NXDOMAIN') - except dns.resolver.NoAnswer: + except dns.resolver.NoAnswer as err: + if fail_on_error: + raise AnsibleError("Lookup failed: %s" % str(err)) ret.append("") - except dns.resolver.Timeout: + except dns.resolver.Timeout as err: + if fail_on_error: + raise AnsibleError("Lookup failed: %s" % str(err)) ret.append('') - except dns.exception.DNSException as e: - raise AnsibleError("dns.resolver unhandled exception %s" % to_native(e)) + except dns.exception.DNSException as err: + raise AnsibleError("dns.resolver unhandled exception %s" % to_native(err)) return ret From 31ef6c914b71c37d16f60e3f24b9a39e90153668 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 24 Jul 2022 22:09:24 +1200 Subject: [PATCH 0125/2104] xfconf and xfconf_info: use do_raise (#4975) * remove redundant XfConfException class * adjusted indentation in the documentaiton blocks * add changelog fragment --- .../fragments/4975-xfconf-use-do-raise.yaml | 3 + plugins/modules/system/xfconf.py | 8 +-- plugins/modules/system/xfconf_info.py | 56 +++++++++---------- 3 files changed, 32 insertions(+), 35 deletions(-) create mode 100644 changelogs/fragments/4975-xfconf-use-do-raise.yaml diff --git a/changelogs/fragments/4975-xfconf-use-do-raise.yaml b/changelogs/fragments/4975-xfconf-use-do-raise.yaml new file mode 100644 index 0000000000..9334795321 --- /dev/null +++ b/changelogs/fragments/4975-xfconf-use-do-raise.yaml @@ -0,0 +1,3 @@ +minor_changes: + - xfconf - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). + - xfconf_info - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index 9d6521cced..3698a76b99 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -149,10 +149,6 @@ from ansible_collections.community.general.plugins.module_utils.module_helper im from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner -class XFConfException(Exception): - pass - - class XFConfProperty(StateModuleHelper): change_params = 'value', diff_params = 'value', @@ -198,7 +194,7 @@ class XFConfProperty(StateModuleHelper): if err.rstrip() == self.does_not: return None if rc or len(err): - raise XFConfException('xfconf-query failed with error (rc={0}): {1}'.format(rc, err)) + self.do_raise('xfconf-query failed with error (rc={0}): {1}'.format(rc, err)) result = out.rstrip() if "Value is an array with" in result: @@ -231,7 +227,7 @@ class XFConfProperty(StateModuleHelper): value_type = value_type * values_len elif types_len != values_len: # or complain if lists' lengths are different - raise XFConfException('Number of elements in "value" and "value_type" must be the same') + self.do_raise('Number of elements in "value" and "value_type" must be the same') # calculates if it is an array self.vars.is_array = \ diff --git a/plugins/modules/system/xfconf_info.py b/plugins/modules/system/xfconf_info.py index ac9b2033e9..2bee80d970 100644 --- a/plugins/modules/system/xfconf_info.py +++ b/plugins/modules/system/xfconf_info.py @@ -9,7 +9,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: xfconf_info author: - - "Alexei Znamensky (@russoz)" + - "Alexei Znamensky (@russoz)" short_description: Retrieve XFCE4 configurations version_added: 3.5.0 description: @@ -61,8 +61,8 @@ EXAMPLES = """ RETURN = ''' channels: description: - - List of available channels. - - Returned when the module receives no parameter at all. + - List of available channels. + - Returned when the module receives no parameter at all. returned: success type: list elements: str @@ -73,57 +73,53 @@ RETURN = ''' - xfwm4 properties: description: - - List of available properties for a specific channel. - - Returned by passing only the I(channel) parameter to the module. + - List of available properties for a specific channel. + - Returned by passing only the I(channel) parameter to the module. returned: success type: list elements: str sample: - - /Gdk/WindowScalingFactor - - /Gtk/ButtonImages - - /Gtk/CursorThemeSize - - /Gtk/DecorationLayout - - /Gtk/FontName - - /Gtk/MenuImages - - /Gtk/MonospaceFontName - - /Net/DoubleClickTime - - /Net/IconThemeName - - /Net/ThemeName - - /Xft/Antialias - - /Xft/Hinting - - /Xft/HintStyle - - /Xft/RGBA + - /Gdk/WindowScalingFactor + - /Gtk/ButtonImages + - /Gtk/CursorThemeSize + - /Gtk/DecorationLayout + - /Gtk/FontName + - /Gtk/MenuImages + - /Gtk/MonospaceFontName + - /Net/DoubleClickTime + - /Net/IconThemeName + - /Net/ThemeName + - /Xft/Antialias + - /Xft/Hinting + - /Xft/HintStyle + - /Xft/RGBA is_array: description: - - Flag indicating whether the property is an array or not. + - Flag indicating whether the property is an array or not. returned: success type: bool value: description: - - The value of the property. Empty if the property is of array type. + - The value of the property. Empty if the property is of array type. returned: success type: str sample: Monospace 10 value_array: description: - - The array value of the property. Empty if the property is not of array type. + - The array value of the property. Empty if the property is not of array type. returned: success type: list elements: str sample: - - Main - - Work - - Tmp + - Main + - Work + - Tmp ''' from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner -class XFConfException(Exception): - pass - - class XFConfInfo(ModuleHelper): module = dict( argument_spec=dict( @@ -170,8 +166,10 @@ class XFConfInfo(ModuleHelper): elif self.vars.property is None: output = 'properties' proc = self._process_list_properties + with self.runner.context('list_arg channel property', output_process=proc) as ctx: result = ctx.run(**self.vars) + if not self.vars.list_arg and self.vars.is_array: output = "value_array" self.vars.set(output, result) From a2677fd0512a093269792613b0516c76361f53a7 Mon Sep 17 00:00:00 2001 From: Raul Gabriel Verdi <95469166+raul-verdi@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:09:58 +0900 Subject: [PATCH 0126/2104] Expose unredirected_headers on maven_artifact (#4812) * Expose unredirected_headers to module In some cases, when the initial request returns a redirect and we want to follow it to get the artifact, we might not want to include certain headers in the redirection request. Specially headers like Authorization and Cookies. Or perhaps the redirect server returns a 400 because it included some unexpected headers. Fetch url already supports this feature, but it was being shadowed by maven_artifact. In here we just expose it. * Fix Linting errors * Applied Comments - Specified version added - Changed description of unredirected_headers * Check for ansible version If it's 2.11 or older, we ignore unredirected_headers, otherwise we use it, as fetch_url has them * Applied comments - Removed duplicated code in the call of fetch_url. Used kwargs instead - Added check if unredirected_params is not empty and the fetch_url function does not support it - Changed function that checks for ansible version - Removed unused import * Remove 2.11 breaking change Made default only for ansible-core version 2.12 and above, but for keep it empty for ansible-core version 2.11 and below. Also include the following changes: - change doc to use C() on the function description - changed doc to use ansible-core instead of Ansible * Changes in description for readability * Add changelog fragment * Change description changelog fragment --- .../4812-expose-unredirected-headers.yml | 2 ++ .../packaging/language/maven_artifact.py | 31 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4812-expose-unredirected-headers.yml diff --git a/changelogs/fragments/4812-expose-unredirected-headers.yml b/changelogs/fragments/4812-expose-unredirected-headers.yml new file mode 100644 index 0000000000..c0bfe536b8 --- /dev/null +++ b/changelogs/fragments/4812-expose-unredirected-headers.yml @@ -0,0 +1,2 @@ +minor_changes: + - maven_artifact - add a new ``unredirected_headers`` option that can be used with ansible-core 2.12 and above. The default value is to not use ``Authorization`` and ``Cookie`` headers on redirects for security reasons. With ansible-core 2.11, all headers are still passed on for redirects (https://github.com/ansible-collections/community.general/pull/4812). diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index eee3e2f67d..a9c4232baa 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -150,6 +150,15 @@ options: default: 'md5' choices: ['md5', 'sha1'] version_added: 3.2.0 + unredirected_headers: + type: list + elements: str + version_added: 5.2.0 + description: + - A list of headers that should not be included in the redirection. This headers are sent to the fetch_url C(fetch_url) function. + - On ansible-core version 2.12 or later, the default of this option is C([Authorization, Cookie]). + - Useful if the redirection URL does not need to have sensitive headers in the request. + - Requires ansible-core version 2.12 or later. directory_mode: type: str description: @@ -230,6 +239,7 @@ import tempfile import traceback import re +from ansible_collections.community.general.plugins.module_utils.version import LooseVersion from ansible.module_utils.ansible_release import __version__ as ansible_version from re import match @@ -509,7 +519,18 @@ class MavenDownloader: self.module.params['url_password'] = self.module.params.get('password', '') self.module.params['http_agent'] = self.user_agent - response, info = fetch_url(self.module, url_to_use, timeout=req_timeout, headers=self.headers) + kwargs = {} + if self.module.params['unredirected_headers']: + kwargs['unredirected_headers'] = self.module.params['unredirected_headers'] + + response, info = fetch_url( + self.module, + url_to_use, + timeout=req_timeout, + headers=self.headers, + **kwargs + ) + if info['status'] == 200: return response if force: @@ -614,12 +635,20 @@ def main(): keep_name=dict(required=False, default=False, type='bool'), verify_checksum=dict(required=False, default='download', choices=['never', 'download', 'change', 'always']), checksum_alg=dict(required=False, default='md5', choices=['md5', 'sha1']), + unredirected_headers=dict(type='list', elements='str', required=False), directory_mode=dict(type='str'), ), add_file_common_args=True, mutually_exclusive=([('version', 'version_by_spec')]) ) + if LooseVersion(ansible_version) < LooseVersion("2.12") and module.params['unredirected_headers']: + module.fail_json(msg="Unredirected Headers parameter provided, but your ansible-core version does not support it. Minimum version is 2.12") + + if LooseVersion(ansible_version) >= LooseVersion("2.12") and module.params['unredirected_headers'] is None: + # if the user did not supply unredirected params, we use the default, ONLY on ansible core 2.12 and above + module.params['unredirected_headers'] = ['Authorization', 'Cookie'] + if not HAS_LXML_ETREE: module.fail_json(msg=missing_required_lib('lxml'), exception=LXML_ETREE_IMP_ERR) From 037c75db4f049395d963e50fa94065a5de6c16a5 Mon Sep 17 00:00:00 2001 From: Thomas <3999809+tehtbl@users.noreply.github.com> Date: Tue, 26 Jul 2022 08:01:43 +0200 Subject: [PATCH 0127/2104] fixing minor documentation flaws (#5000) Co-authored-by: Thomas Blaesing --- plugins/become/sudosu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/become/sudosu.py b/plugins/become/sudosu.py index 410b881b96..605c83d58c 100644 --- a/plugins/become/sudosu.py +++ b/plugins/become/sudosu.py @@ -8,9 +8,9 @@ DOCUMENTATION = """ name: sudosu short_description: Run tasks using sudo su - description: - - This become plugins allows your remote/login user to execute commands as another user via the C(sudo) and C(su) utilities combined. + - This become plugin allows your remote/login user to execute commands as another user via the C(sudo) and C(su) utilities combined. author: - - Dag Wieers (@dagwieers) + - Dag Wieers (@dagwieers) version_added: 2.4.0 options: become_user: From be0e47bfdc19843b83543c617e79e04aadefa1dc Mon Sep 17 00:00:00 2001 From: CactiChameleon9 <51231053+CactiChameleon9@users.noreply.github.com> Date: Tue, 26 Jul 2022 09:14:17 +0000 Subject: [PATCH 0128/2104] Apk: add support for a custom world file (#4976) * Apk: add support for a custom world file * Apk: Add changelog fragment for custom world file --- ...k-add-support-for-a-custom-world-file.yaml | 2 ++ plugins/modules/packaging/os/apk.py | 25 ++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml diff --git a/changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml b/changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml new file mode 100644 index 0000000000..74536ddcab --- /dev/null +++ b/changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml @@ -0,0 +1,2 @@ +minor_changes: + - apk - add ``world`` parameter for supporting a custom world file (https://github.com/ansible-collections/community.general/pull/4976). diff --git a/plugins/modules/packaging/os/apk.py b/plugins/modules/packaging/os/apk.py index 4252d069e5..6fad08737d 100644 --- a/plugins/modules/packaging/os/apk.py +++ b/plugins/modules/packaging/os/apk.py @@ -61,6 +61,12 @@ options: - Upgrade all installed packages to their latest version. type: bool default: no + world: + description: + - Use a custom world file when checking for explicitly installed packages. + type: str + default: /etc/apk/world + version_added: 5.4.0 notes: - 'I(name) and I(upgrade) are mutually exclusive.' - When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the I(name) option. @@ -134,6 +140,12 @@ EXAMPLES = ''' name: foo state: latest no_cache: yes + +- name: Install package checking a custom world + community.general.apk: + name: foo + state: latest + world: /etc/apk/world.custom ''' RETURN = ''' @@ -171,11 +183,11 @@ def update_package_db(module, exit): return True -def query_toplevel(module, name): - # /etc/apk/world contains a list of top-level packages separated by ' ' or \n +def query_toplevel(module, name, world): + # world contains a list of top-level packages separated by ' ' or \n # packages may contain repository (@) or version (=<>~) separator characters or start with negation ! regex = re.compile(r'^' + re.escape(name) + r'([@=<>~].+)?$') - with open('/etc/apk/world') as f: + with open(world) as f: content = f.read().split() for p in content: if regex.search(p): @@ -237,7 +249,7 @@ def upgrade_packages(module, available): module.exit_json(changed=True, msg="upgraded packages", stdout=stdout, stderr=stderr, packages=packagelist) -def install_packages(module, names, state): +def install_packages(module, names, state, world): upgrade = False to_install = [] to_upgrade = [] @@ -250,7 +262,7 @@ def install_packages(module, names, state): if state == 'latest' and not query_latest(module, dependency): to_upgrade.append(dependency) else: - if not query_toplevel(module, name): + if not query_toplevel(module, name, world): to_install.append(name) elif state == 'latest' and not query_latest(module, name): to_upgrade.append(name) @@ -313,6 +325,7 @@ def main(): update_cache=dict(default=False, type='bool'), upgrade=dict(default=False, type='bool'), available=dict(default=False, type='bool'), + world=dict(default='/etc/apk/world', type='str'), ), required_one_of=[['name', 'update_cache', 'upgrade']], mutually_exclusive=[['name', 'upgrade']], @@ -348,7 +361,7 @@ def main(): upgrade_packages(module, p['available']) if p['state'] in ['present', 'latest']: - install_packages(module, p['name'], p['state']) + install_packages(module, p['name'], p['state'], p['world']) elif p['state'] == 'absent': remove_packages(module, p['name']) From 76b235c6b3c688b26490e1e0f3091bdf9563f64d Mon Sep 17 00:00:00 2001 From: Minei3oat Date: Tue, 26 Jul 2022 17:59:52 +0200 Subject: [PATCH 0129/2104] Pacman: Improve url integrity test (#4968) * Fix typo * Host url package * Delete cached files * Add cases for cached url package * Rename file_pkg for clarification * Change port to 8080, as 80 is already used in pipeline * Added fragment * Change port to 8000, as 8080 is already used in pipeline * Fixed changelog fragment * Change port to 53280, as 8000 is already used in pipeline * Change port to 27617 (copied from get_url), as 53280 is already used in pipeline * Also download the signature of url package Co-authored-by: Jean Raby * Fix duplication errors Co-authored-by: Jean Raby * Copied waiting from get_url; applyed output redirection from jraby * Fix signature filename * Use correct cache dir * Add missing assertions for uninstall_1c * Fix typo * Delete changelog fragment * Make python server true async with 90 sec timeout Copied from ainsible.builtin.get_url Co-authored-by: Jean Raby --- .../targets/pacman/tasks/package_urls.yml | 110 ++++++++++++++++-- 1 file changed, 100 insertions(+), 10 deletions(-) diff --git a/tests/integration/targets/pacman/tasks/package_urls.yml b/tests/integration/targets/pacman/tasks/package_urls.yml index 4bb897b404..653657f1ec 100644 --- a/tests/integration/targets/pacman/tasks/package_urls.yml +++ b/tests/integration/targets/pacman/tasks/package_urls.yml @@ -1,9 +1,13 @@ --- - vars: + http_port: 27617 reg_pkg: ed url_pkg: lemon + url_pkg_filename: url.pkg.zst + url_pkg_path: '/tmp/' + url_pkg_url: 'http://localhost:{{http_port}}/{{url_pkg_filename}}' file_pkg: hdparm - file_pkg_path: /tmp/pkg.zst + file_pkg_path: /tmp/file.pkg.zst extra_pkg: core/sdparm extra_pkg_outfmt: sdparm block: @@ -15,11 +19,33 @@ - '{{file_pkg}}' - '{{extra_pkg}}' state: absent + - name: Make sure that url package is not cached + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent - name: Get URL for {{url_pkg}} command: cmd: pacman --sync --print-format "%l" {{url_pkg}} - register: url_pkg_url + register: url_pkg_stdout + - name: Download {{url_pkg}} pkg + get_url: + url: '{{url_pkg_stdout.stdout}}' + dest: '{{url_pkg_path}}/{{url_pkg_filename}}' + - name: Download {{url_pkg}} pkg sig + get_url: + url: '{{url_pkg_stdout.stdout}}.sig' + dest: '{{url_pkg_path}}/{{url_pkg_filename}}.sig' + - name: Host {{url_pkg}} + shell: + cmd: 'python -m http.server --directory {{url_pkg_path}} {{http_port}} >/dev/null 2>&1' + async: 90 + poll: 0 + - name: Wait for http.server to come up online + wait_for: + host: 'localhost' + port: '{{http_port}}' + state: started - name: Get URL for {{file_pkg}} command: @@ -34,26 +60,50 @@ pacman: name: - '{{reg_pkg}}' - - '{{url_pkg_url.stdout}}' + - '{{url_pkg_url}}' - '{{file_pkg_path}}' check_mode: True register: install_1 + - name: Install packages from url (check mode, cached) + pacman: + name: + - '{{url_pkg_url}}' + check_mode: True + register: install_1c + - name: Delete cached {{url_pkg}} + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent + - name: Install packages from mixed sources pacman: name: - '{{reg_pkg}}' - - '{{url_pkg_url.stdout}}' + - '{{url_pkg_url}}' - '{{file_pkg_path}}' register: install_2 + - name: Delete cached {{url_pkg}} + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent - name: Install packages from mixed sources - (idempotency) pacman: name: - '{{reg_pkg}}' - - '{{url_pkg_url.stdout}}' + - '{{url_pkg_url}}' - '{{file_pkg_path}}' register: install_3 + - name: Install packages from url - (idempotency, cached) + pacman: + name: + - '{{url_pkg_url}}' + register: install_3c + - name: Delete cached {{url_pkg}} + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent - name: Install packages with their regular names (idempotency) pacman: @@ -62,54 +112,89 @@ - '{{url_pkg}}' - '{{file_pkg}}' register: install_4 + - name: Delete cached {{url_pkg}} + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent - name: Install new package with already installed packages from mixed sources pacman: name: - '{{reg_pkg}}' - - '{{url_pkg_url.stdout}}' + - '{{url_pkg_url}}' - '{{file_pkg_path}}' - '{{extra_pkg}}' register: install_5 + - name: Delete cached {{url_pkg}} + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent - name: Uninstall packages - mixed sources (check mode) pacman: state: absent name: - '{{reg_pkg}}' - - '{{url_pkg_url.stdout}}' + - '{{url_pkg_url}}' - '{{file_pkg_path}}' check_mode: True register: uninstall_1 + - name: Uninstall packages - url (check mode, cached) + pacman: + state: absent + name: + - '{{url_pkg_url}}' + check_mode: True + register: uninstall_1c + - name: Delete cached {{url_pkg}} + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent - name: Uninstall packages - mixed sources pacman: state: absent name: - '{{reg_pkg}}' - - '{{url_pkg_url.stdout}}' + - '{{url_pkg_url}}' - '{{file_pkg_path}}' register: uninstall_2 + - name: Delete cached {{url_pkg}} + file: + path: '/var/cache/pacman/pkg/{{url_pkg_filename}}' + state: absent - name: Uninstall packages - mixed sources (idempotency) pacman: state: absent name: - '{{reg_pkg}}' - - '{{url_pkg_url.stdout}}' + - '{{url_pkg_url}}' - '{{file_pkg_path}}' register: uninstall_3 + - name: Uninstall package - url (idempotency, cached) + pacman: + state: absent + name: + - '{{url_pkg_url}}' + register: uninstall_3c + - assert: that: - install_1 is changed - install_1.msg == 'Would have installed 3 packages' - install_1.packages|sort() == [reg_pkg, url_pkg, file_pkg]|sort() + - install_1c is changed + - install_1c.msg == 'Would have installed 1 packages' + - install_1c.packages|sort() == [url_pkg] - install_2 is changed - install_2.msg == 'Installed 3 package(s)' - - install_1.packages|sort() == [reg_pkg, url_pkg, file_pkg]|sort() + - install_2.packages|sort() == [reg_pkg, url_pkg, file_pkg]|sort() - install_3 is not changed - install_3.msg == 'package(s) already installed' + - install_3c is not changed + - install_3c.msg == 'package(s) already installed' - install_4 is not changed - install_4.msg == 'package(s) already installed' - install_5 is changed @@ -118,8 +203,13 @@ - uninstall_1 is changed - uninstall_1.msg == 'Would have removed 3 packages' - uninstall_1.packages | length() == 3 # pkgs have versions here + - uninstall_1c is changed + - uninstall_1c.msg == 'Would have removed 1 packages' + - uninstall_1c.packages | length() == 1 # pkgs have versions here - uninstall_2 is changed - uninstall_2.msg == 'Removed 3 package(s)' - uninstall_2.packages | length() == 3 - uninstall_3 is not changed - uninstall_3.msg == 'package(s) already absent' + - uninstall_3c is not changed + - uninstall_3c.msg == 'package(s) already absent' From 9290381bea2d0f52f200307500714033e4088a43 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 27 Jul 2022 07:42:25 +0200 Subject: [PATCH 0130/2104] xfconf: fix setting of boolean values (#5007) --- changelogs/fragments/4999-xfconf-bool.yml | 2 ++ plugins/module_utils/xfconf.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4999-xfconf-bool.yml diff --git a/changelogs/fragments/4999-xfconf-bool.yml b/changelogs/fragments/4999-xfconf-bool.yml new file mode 100644 index 0000000000..8fcf27144e --- /dev/null +++ b/changelogs/fragments/4999-xfconf-bool.yml @@ -0,0 +1,2 @@ +bugfixes: + - "xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, https://github.com/ansible-collections/community.general/pull/5007)." diff --git a/plugins/module_utils/xfconf.py b/plugins/module_utils/xfconf.py index 4028da3bef..5a4b4f05c6 100644 --- a/plugins/module_utils/xfconf.py +++ b/plugins/module_utils/xfconf.py @@ -14,7 +14,7 @@ def _values_fmt(values, value_types): result = [] for value, value_type in zip(values, value_types): if value_type == 'bool': - value = boolean(value) + value = 'true' if boolean(value) else 'false' result.extend(['--type', '{0}'.format(value_type), '--set', '{0}'.format(value)]) return result From 1c167ab8948afe429fd4591ea4434f14ab40a862 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 28 Jul 2022 19:21:23 +1200 Subject: [PATCH 0131/2104] xfconf: add unit test for bool value (#5014) --- .../plugins/modules/system/test_xfconf.py | 48 ++++++++++++++++--- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/system/test_xfconf.py index 5744100c5e..7743d07cd4 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/system/test_xfconf.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Author: Alexei Znamensky (russoz@gmail.com) # Largely adapted from test_redhat_subscription by # Jiri Hnidek (jhnidek@redhat.com) @@ -110,6 +111,41 @@ TEST_CASES = [ 'value': '90', }, ], + [ + { + 'channel': 'xfce4-session', + 'property': '/general/SaveOnExit', + 'state': 'present', + 'value_type': 'bool', + 'value': False, + }, + { + 'id': 'test_property_set_property_bool_false', + 'run_command.calls': [ + ( + # Calling of following command will be asserted + ['/testbin/xfconf-query', '--channel', 'xfce4-session', '--property', '/general/SaveOnExit'], + # Was return code checked? + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + # Mock of returned code, stdout and stderr + (0, 'true\n', '',), + ), + ( + # Calling of following command will be asserted + ['/testbin/xfconf-query', '--channel', 'xfce4-session', '--property', '/general/SaveOnExit', + '--create', '--type', 'bool', '--set', 'false'], + # Was return code checked? + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + # Mock of returned code, stdout and stderr + (0, 'false\n', '',), + ), + ], + 'changed': True, + 'previous_value': 'true', + 'value_type': 'bool', + 'value': 'False', + }, + ], [ { 'channel': 'xfwm4', @@ -252,12 +288,6 @@ def test_xfconf(mocker, capfd, patch_xfconf, testcase): assert results[test_result] == results['invocation']['module_args'][test_result], \ "'{0}': '{1}' != '{2}'".format(test_result, results[test_result], results['invocation']['module_args'][test_result]) - for conditional_test_result in ('msg', 'value', 'previous_value'): - if conditional_test_result in testcase: - assert conditional_test_result in results, "'{0}' not found in {1}".format(conditional_test_result, results) - assert results[conditional_test_result] == testcase[conditional_test_result], \ - "'{0}': '{1}' != '{2}'".format(conditional_test_result, results[conditional_test_result], testcase[conditional_test_result]) - assert mock_run_command.call_count == len(testcase['run_command.calls']) if mock_run_command.call_count: call_args_list = [(item[0][0], item[1]) for item in mock_run_command.call_args_list] @@ -265,3 +295,9 @@ def test_xfconf(mocker, capfd, patch_xfconf, testcase): print("call args list =\n%s" % call_args_list) print("expected args list =\n%s" % expected_call_args_list) assert call_args_list == expected_call_args_list + + for conditional_test_result in ('msg', 'value', 'previous_value'): + if conditional_test_result in testcase: + assert conditional_test_result in results, "'{0}' not found in {1}".format(conditional_test_result, results) + assert results[conditional_test_result] == testcase[conditional_test_result], \ + "'{0}': '{1}' != '{2}'".format(conditional_test_result, results[conditional_test_result], testcase[conditional_test_result]) From 618fab5f9cf1c9d6b4984f0b6d60b71e4b01c4d1 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:31:26 +1200 Subject: [PATCH 0132/2104] vmadm: add comment to ignore file (#5025) --- tests/sanity/ignore-2.11.txt | 2 +- tests/sanity/ignore-2.12.txt | 2 +- tests/sanity/ignore-2.13.txt | 2 +- tests/sanity/ignore-2.14.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index b3ab408832..855883d64a 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -13,7 +13,7 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc +plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 164fc7daf5..39c97f6bf8 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -8,7 +8,7 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc +plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 164fc7daf5..39c97f6bf8 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -8,7 +8,7 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc +plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 96aef6cd3a..a2ccf20db3 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -9,7 +9,7 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc +plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter From f544aac024989eebcecfc4e052ac4003b81a4bca Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:38:37 +1200 Subject: [PATCH 0133/2104] gconftool2: deprecate state get (#4778) * gconftool2: deprecate state get * added changelog fragment * Update plugins/modules/system/gconftool2.py * Update plugins/modules/system/gconftool2.py --- .../4778-gconftool2-deprecate-state-get.yaml | 2 ++ plugins/modules/system/gconftool2.py | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml diff --git a/changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml b/changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml new file mode 100644 index 0000000000..55d8869936 --- /dev/null +++ b/changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml @@ -0,0 +1,2 @@ +deprecated_features: + - gconftool2 - deprecates ``state=get`` in favor of using the module ``gconftool2_info`` (https://github.com/ansible-collections/community.general/pull/4778). diff --git a/plugins/modules/system/gconftool2.py b/plugins/modules/system/gconftool2.py index 86bb2f9259..1fcc9b7231 100644 --- a/plugins/modules/system/gconftool2.py +++ b/plugins/modules/system/gconftool2.py @@ -21,14 +21,14 @@ options: type: str description: - A GConf preference key is an element in the GConf repository - that corresponds to an application preference. See man gconftool-2(1) + that corresponds to an application preference. See man gconftool-2(1). required: yes value: type: str description: - Preference keys typically have simple values such as strings, integers, or lists of strings and integers. This is ignored if the state - is "get". See man gconftool-2(1) + is "get". See man gconftool-2(1). value_type: type: str description: @@ -38,18 +38,19 @@ options: type: str description: - The action to take upon the key/value. + - State C(get) is deprecated and will be removed in community.general 8.0.0. Please use the module M(community.general.gconftool2_info) instead. required: yes choices: [ absent, get, present ] config_source: type: str description: - Specify a configuration source to use rather than the default path. - See man gconftool-2(1) + See man gconftool-2(1). direct: description: - Access the config database directly, bypassing server. If direct is specified then the config_source must be specified as well. - See man gconftool-2(1) + See man gconftool-2(1). type: bool default: 'no' ''' @@ -119,6 +120,10 @@ class GConf2Preference(object): # If the call is "get", then we don't need as many parameters and # we can ignore some if call_type == 'get': + self.ansible.deprecate( + msg="State 'get' is deprecated. Please use the module community.general.gconftool2_info instead", + version="8.0.0", collection_name="community.general" + ) cmd.extend(["--get", self.key]) # Otherwise, we will use all relevant parameters elif call_type == 'set': From c64dd16f1cfeafb1593ec2bfd0b6d6c7cce7d4cb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 29 Jul 2022 12:09:10 +0200 Subject: [PATCH 0134/2104] Fix changelog fragment. --- changelogs/fragments/4955-fix-path-detection-for-gopass.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml b/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml index 0ea6106664..eddfa7397d 100644 --- a/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml +++ b/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml @@ -1,2 +1,2 @@ bugfixes: - - passwordstore - fix password store path detection for gopass (https://github.com/ansible-collections/community.general/pull/4955). + - passwordstore lookup plugin - fix password store path detection for gopass (https://github.com/ansible-collections/community.general/pull/4955). From 3eb29eb4b6ba06f67e5ed73e8044d4561ac50b9f Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Fri, 29 Jul 2022 14:24:15 +0200 Subject: [PATCH 0135/2104] Fix returnall for gopass (#5027) * Fix returnall for gopass Gopass was always given the --password flag, despite there being no need for this. * Add changelog fragment Co-authored-by: Sylvia van Os --- changelogs/fragments/5027-fix-returnall-for-gopass.yaml | 2 ++ plugins/lookup/passwordstore.py | 5 ++--- .../integration/targets/lookup_passwordstore/tasks/tests.yml | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5027-fix-returnall-for-gopass.yaml diff --git a/changelogs/fragments/5027-fix-returnall-for-gopass.yaml b/changelogs/fragments/5027-fix-returnall-for-gopass.yaml new file mode 100644 index 0000000000..766f87e91a --- /dev/null +++ b/changelogs/fragments/5027-fix-returnall-for-gopass.yaml @@ -0,0 +1,2 @@ +bugfixes: + - passwordstore lookup plugin - fix ``returnall`` for gopass (https://github.com/ansible-collections/community.general/pull/5027). diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 2f904abdb2..5ead6ce0e3 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -261,11 +261,11 @@ class LookupModule(LookupBase): def is_real_pass(self): if self.realpass is None: try: - self.passoutput = to_text( + passoutput = to_text( check_output2([self.pass_cmd, "--version"], env=self.env), errors='surrogate_or_strict' ) - self.realpass = 'pass: the standard unix password manager' in self.passoutput + self.realpass = 'pass: the standard unix password manager' in passoutput except (subprocess.CalledProcessError) as e: raise AnsibleError(e) @@ -331,7 +331,6 @@ class LookupModule(LookupBase): try: self.passoutput = to_text( check_output2([self.pass_cmd, 'show'] + - (['--password'] if self.backend == 'gopass' else []) + [self.passname], env=self.env), errors='surrogate_or_strict' ).splitlines() diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index 34899ef5c9..5ac9a948a9 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -318,9 +318,6 @@ if [ "$1" = "--version" ]; then exit 2 fi - if [ "$1" = "show" ] && [ "$2" != "--password" ]; then - exit 3 - fi echo "gopass_ok" dest: "{{ gopasspath }}" mode: '0755' From aba089369e48d14f2950580ec32ebdba5d3af0c5 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 31 Jul 2022 21:28:17 +1200 Subject: [PATCH 0136/2104] mh base: add verbosity() property (#5035) * mh base: add verbosity property * add changelog fragment --- changelogs/fragments/5035-mh-base-verbosity.yaml | 2 ++ plugins/module_utils/mh/base.py | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 changelogs/fragments/5035-mh-base-verbosity.yaml diff --git a/changelogs/fragments/5035-mh-base-verbosity.yaml b/changelogs/fragments/5035-mh-base-verbosity.yaml new file mode 100644 index 0000000000..e6ea5a9198 --- /dev/null +++ b/changelogs/fragments/5035-mh-base-verbosity.yaml @@ -0,0 +1,2 @@ +minor_changes: + - ModuleHelper module utils - added property ``verbosity`` to base class (https://github.com/ansible-collections/community.general/pull/5035). diff --git a/plugins/module_utils/mh/base.py b/plugins/module_utils/mh/base.py index cad1a9acdc..dec81a4c12 100644 --- a/plugins/module_utils/mh/base.py +++ b/plugins/module_utils/mh/base.py @@ -31,6 +31,10 @@ class ModuleHelperBase(object): def diff_mode(self): return self.module._diff + @property + def verbosity(self): + return self.module._verbosity + def do_raise(self, *args, **kwargs): raise _MHE(*args, **kwargs) From d214f49be729b6fecea0b74f5fb0ba9b265802cb Mon Sep 17 00:00:00 2001 From: wilfriedroset Date: Sun, 31 Jul 2022 13:17:43 +0200 Subject: [PATCH 0137/2104] consul: add support for session TTL (#4996) Signed-off-by: Wilfried Roset --- changelogs/fragments/4996-consul-session-ttl.yml | 2 ++ .../modules/clustering/consul/consul_session.py | 14 ++++++++++++++ .../targets/consul/tasks/consul_session.yml | 12 ++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 changelogs/fragments/4996-consul-session-ttl.yml diff --git a/changelogs/fragments/4996-consul-session-ttl.yml b/changelogs/fragments/4996-consul-session-ttl.yml new file mode 100644 index 0000000000..99b7c27e9e --- /dev/null +++ b/changelogs/fragments/4996-consul-session-ttl.yml @@ -0,0 +1,2 @@ +minor_changes: + - consul - adds ``ttl`` parameter for session (https://github.com/ansible-collections/community.general/pull/4996). diff --git a/plugins/modules/clustering/consul/consul_session.py b/plugins/modules/clustering/consul/consul_session.py index 7ace1f89a8..3039fac175 100644 --- a/plugins/modules/clustering/consul/consul_session.py +++ b/plugins/modules/clustering/consul/consul_session.py @@ -95,6 +95,11 @@ options: choices: [ delete, release ] type: str default: release + ttl: + description: + - Specifies the duration of a session in seconds (between 10 and 86400). + type: int + version_added: 5.4.0 ''' EXAMPLES = ''' @@ -121,6 +126,11 @@ EXAMPLES = ''' - name: Retrieve active sessions community.general.consul_session: state: list + +- name: Register session with a ttl + community.general.consul_session: + name: session-with-ttl + ttl: 600 # sec ''' try: @@ -185,6 +195,7 @@ def update_session(module): datacenter = module.params.get('datacenter') node = module.params.get('node') behavior = module.params.get('behavior') + ttl = module.params.get('ttl') consul_client = get_consul_api(module) @@ -192,6 +203,7 @@ def update_session(module): session = consul_client.session.create( name=name, behavior=behavior, + ttl=ttl, node=node, lock_delay=delay, dc=datacenter, @@ -201,6 +213,7 @@ def update_session(module): session_id=session, name=name, behavior=behavior, + ttl=ttl, delay=delay, checks=checks, node=node) @@ -241,6 +254,7 @@ def main(): checks=dict(type='list', elements='str'), delay=dict(type='int', default='15'), behavior=dict(type='str', default='release', choices=['release', 'delete']), + ttl=dict(type='int'), host=dict(type='str', default='localhost'), port=dict(type='int', default=8500), scheme=dict(type='str', default='http'), diff --git a/tests/integration/targets/consul/tasks/consul_session.yml b/tests/integration/targets/consul/tasks/consul_session.yml index 1827c9c381..5feeb07c0d 100644 --- a/tests/integration/targets/consul/tasks/consul_session.yml +++ b/tests/integration/targets/consul/tasks/consul_session.yml @@ -158,3 +158,15 @@ that: - search_deleted is skipped # each iteration is skipped - search_deleted is not changed # and then unchanged + +- name: ensure session can be created with a ttl + consul_session: + state: present + name: session-with-ttl + ttl: 180 # sec + register: result + +- assert: + that: + - result is changed + - result['ttl'] == 180 From 9f3841703f9a55732567b574598cd2905d1976c0 Mon Sep 17 00:00:00 2001 From: Minei3oat Date: Sun, 31 Jul 2022 22:10:49 +0200 Subject: [PATCH 0138/2104] Pacman: Add support for install reason (#4956) * Pacman: Add support for setting install reason * Improved description * Fix documentation * Add changelog fragment * Use source for installation * Get all reasons at once * Removed default for reason * Added version info to documentation * Fix NameError * Moved determination of reason to _build_inventory * Fix duplication and sanity errors * adjust tests for changed inventory * Documentation: remove empty default for reason * mention packages with changed reason in exit params/info * Added integration tests for reason and reason_for Inspired by the integration tests for url packages * Correct indentation * Fix indentation * Also sort changed packages in normal mode * Also sort result in unit test * Apply suggestions from code review Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4956-pacman-install-reason.yaml | 2 + plugins/modules/packaging/os/pacman.py | 96 ++++++++++++++++-- .../integration/targets/pacman/tasks/main.yml | 1 + .../targets/pacman/tasks/reason.yml | 97 +++++++++++++++++++ .../modules/packaging/os/test_pacman.py | 43 +++++++- 5 files changed, 230 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/4956-pacman-install-reason.yaml create mode 100644 tests/integration/targets/pacman/tasks/reason.yml diff --git a/changelogs/fragments/4956-pacman-install-reason.yaml b/changelogs/fragments/4956-pacman-install-reason.yaml new file mode 100644 index 0000000000..e22c56e7bc --- /dev/null +++ b/changelogs/fragments/4956-pacman-install-reason.yaml @@ -0,0 +1,2 @@ +minor_changes: + - pacman - added parameters ``reason`` and ``reason_for`` to set/change the install reason of packages (https://github.com/ansible-collections/community.general/pull/4956). diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index 65f6f92747..1d764c6f0f 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -104,6 +104,22 @@ options: default: type: str + reason: + description: + - The install reason to set for the packages. + choices: [ dependency, explicit ] + type: str + version_added: 5.4.0 + + reason_for: + description: + - Set the install reason for C(all) packages or only for C(new) packages. + - In case of C(state=latest) already installed packages which will be updated to a newer version are not counted as C(new). + default: new + choices: [ all, new ] + type: str + version_added: 5.4.0 + notes: - When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the I(name) option. @@ -223,6 +239,20 @@ EXAMPLES = """ name: baz state: absent force: yes + +- name: Install foo as dependency and leave reason untouched if already installed + community.general.pacman: + name: foo + state: present + reason: dependency + reason_for: new + +- name: Run the equivalent of "pacman -S --asexplicit", mark foo as explicit and install it if not present + community.general.pacman: + name: foo + state: present + reason: explicit + reason_for: all """ import shlex @@ -331,7 +361,14 @@ class Pacman(object): def install_packages(self, pkgs): pkgs_to_install = [] pkgs_to_install_from_url = [] + pkgs_to_set_reason = [] for p in pkgs: + if self.m.params["reason"] and ( + p.name not in self.inventory["pkg_reasons"] + or self.m.params["reason_for"] == "all" + and self.inventory["pkg_reasons"][p.name] != self.m.params["reason"] + ): + pkgs_to_set_reason.append(p.name) if p.source_is_URL: # URL packages bypass the latest / upgradable_pkgs test # They go through the dry-run to let pacman decide if they will be installed @@ -344,7 +381,7 @@ class Pacman(object): ): pkgs_to_install.append(p) - if len(pkgs_to_install) == 0 and len(pkgs_to_install_from_url) == 0: + if len(pkgs_to_install) == 0 and len(pkgs_to_install_from_url) == 0 and len(pkgs_to_set_reason) == 0: self.exit_params["packages"] = [] self.add_exit_infos("package(s) already installed") return @@ -377,8 +414,13 @@ class Pacman(object): continue name, version = p.split() if name in self.inventory["installed_pkgs"]: - before.append("%s-%s" % (name, self.inventory["installed_pkgs"][name])) - after.append("%s-%s" % (name, version)) + before.append("%s-%s-%s" % (name, self.inventory["installed_pkgs"][name], self.inventory["pkg_reasons"][name])) + if name in pkgs_to_set_reason: + after.append("%s-%s-%s" % (name, version, self.m.params["reason"])) + elif name in self.inventory["pkg_reasons"]: + after.append("%s-%s-%s" % (name, version, self.inventory["pkg_reasons"][name])) + else: + after.append("%s-%s" % (name, version)) to_be_installed.append(name) return (to_be_installed, before, after) @@ -398,7 +440,7 @@ class Pacman(object): before.extend(b) after.extend(a) - if len(installed_pkgs) == 0: + if len(installed_pkgs) == 0 and len(pkgs_to_set_reason) == 0: # This can happen with URL packages if pacman decides there's nothing to do self.exit_params["packages"] = [] self.add_exit_infos("package(s) already installed") @@ -411,9 +453,11 @@ class Pacman(object): "after": "\n".join(sorted(after)) + "\n" if after else "", } + changed_reason_pkgs = [p for p in pkgs_to_set_reason if p not in installed_pkgs] + if self.m.check_mode: - self.add_exit_infos("Would have installed %d packages" % len(installed_pkgs)) - self.exit_params["packages"] = sorted(installed_pkgs) + self.add_exit_infos("Would have installed %d packages" % (len(installed_pkgs) + len(changed_reason_pkgs))) + self.exit_params["packages"] = sorted(installed_pkgs + changed_reason_pkgs) return # actually do it @@ -430,8 +474,22 @@ class Pacman(object): if pkgs_to_install_from_url: _install_packages_for_real("--upgrade", pkgs_to_install_from_url) - self.exit_params["packages"] = installed_pkgs - self.add_exit_infos("Installed %d package(s)" % len(installed_pkgs)) + # set reason + if pkgs_to_set_reason: + cmd = [self.pacman_path, "--noconfirm", "--database"] + if self.m.params["reason"] == "dependency": + cmd.append("--asdeps") + else: + cmd.append("--asexplicit") + cmd.extend(pkgs_to_set_reason) + + rc, stdout, stderr = self.m.run_command(cmd, check_rc=False) + if rc != 0: + self.fail("Failed to install package(s)", cmd=cmd, stdout=stdout, stderr=stderr) + self.add_exit_infos(stdout=stdout, stderr=stderr) + + self.exit_params["packages"] = sorted(installed_pkgs + changed_reason_pkgs) + self.add_exit_infos("Installed %d package(s)" % (len(installed_pkgs) + len(changed_reason_pkgs))) def remove_packages(self, pkgs): # filter out pkgs that are already absent @@ -631,6 +689,7 @@ class Pacman(object): "available_pkgs": {pkgname: version}, "available_groups": {groupname: set(pkgnames)}, "upgradable_pkgs": {pkgname: (current_version,latest_version)}, + "pkg_reasons": {pkgname: reason}, } Fails the module if a package requested for install cannot be found @@ -723,12 +782,31 @@ class Pacman(object): rc=rc, ) + pkg_reasons = {} + dummy, stdout, dummy = self.m.run_command([self.pacman_path, "--query", "--explicit"], check_rc=True) + # Format of a line: "pacman 6.0.1-2" + for l in stdout.splitlines(): + l = l.strip() + if not l: + continue + pkg = l.split()[0] + pkg_reasons[pkg] = "explicit" + dummy, stdout, dummy = self.m.run_command([self.pacman_path, "--query", "--deps"], check_rc=True) + # Format of a line: "pacman 6.0.1-2" + for l in stdout.splitlines(): + l = l.strip() + if not l: + continue + pkg = l.split()[0] + pkg_reasons[pkg] = "dependency" + return dict( installed_pkgs=installed_pkgs, installed_groups=installed_groups, available_pkgs=available_pkgs, available_groups=available_groups, upgradable_pkgs=upgradable_pkgs, + pkg_reasons=pkg_reasons, ) @@ -749,6 +827,8 @@ def setup_module(): upgrade_extra_args=dict(type="str", default=""), update_cache=dict(type="bool"), update_cache_extra_args=dict(type="str", default=""), + reason=dict(type="str", choices=["explicit", "dependency"]), + reason_for=dict(type="str", default="new", choices=["new", "all"]), ), required_one_of=[["name", "update_cache", "upgrade"]], mutually_exclusive=[["name", "upgrade"]], diff --git a/tests/integration/targets/pacman/tasks/main.yml b/tests/integration/targets/pacman/tasks/main.yml index 4a34307c48..cabf9b7c40 100644 --- a/tests/integration/targets/pacman/tasks/main.yml +++ b/tests/integration/targets/pacman/tasks/main.yml @@ -12,3 +12,4 @@ - include: 'remove_nosave.yml' - include: 'update_cache.yml' - include: 'locally_installed_package.yml' + - include: 'reason.yml' diff --git a/tests/integration/targets/pacman/tasks/reason.yml b/tests/integration/targets/pacman/tasks/reason.yml new file mode 100644 index 0000000000..51b2bf36ba --- /dev/null +++ b/tests/integration/targets/pacman/tasks/reason.yml @@ -0,0 +1,97 @@ +--- +- vars: + reg_pkg: ed + url_pkg: lemon + file_pkg: hdparm + file_pkg_path: /tmp/pkg.zst + extra_pkg: core/sdparm + extra_pkg_outfmt: sdparm + block: + - name: Make sure that test packages are not installed + pacman: + name: + - '{{reg_pkg}}' + - '{{url_pkg}}' + - '{{file_pkg}}' + - '{{extra_pkg}}' + state: absent + + - name: Get URL for {{url_pkg}} + command: + cmd: pacman --sync --print-format "%l" {{url_pkg}} + register: url_pkg_url + + - name: Get URL for {{file_pkg}} + command: + cmd: pacman --sync --print-format "%l" {{file_pkg}} + register: file_pkg_url + - name: Download {{file_pkg}} pkg + get_url: + url: '{{file_pkg_url.stdout}}' + dest: '{{file_pkg_path}}' + + - name: Install packages from mixed sources as dependency (check mode) + pacman: + name: + - '{{reg_pkg}}' + - '{{url_pkg_url.stdout}}' + - '{{file_pkg_path}}' + reason: dependency + check_mode: True + register: install_1 + + - name: Install packages from mixed sources as explicit + pacman: + name: + - '{{reg_pkg}}' + - '{{url_pkg_url.stdout}}' + - '{{file_pkg_path}}' + reason: explicit + register: install_2 + + - name: Install packages from mixed sources with new packages being installed as dependency - (idempotency) + pacman: + name: + - '{{reg_pkg}}' + - '{{url_pkg_url.stdout}}' + - '{{file_pkg_path}}' + reason: dependency + register: install_3 + + - name: Install new package with already installed packages from mixed sources as dependency + pacman: + name: + - '{{reg_pkg}}' + - '{{url_pkg_url.stdout}}' + - '{{file_pkg_path}}' + - '{{extra_pkg}}' + reason: dependency + register: install_4 + + - name: Set install reason for all packages to dependency + pacman: + name: + - '{{reg_pkg}}' + - '{{url_pkg_url.stdout}}' + - '{{file_pkg_path}}' + - '{{extra_pkg}}' + reason: dependency + reason_for: all + register: install_5 + + - assert: + that: + - install_1 is changed + - install_1.msg == 'Would have installed 3 packages' + - install_1.packages|sort() == [reg_pkg, url_pkg, file_pkg]|sort() + - install_2 is changed + - install_2.msg == 'Installed 3 package(s)' + - install_2.packages|sort() == [reg_pkg, url_pkg, file_pkg]|sort() + - install_3 is not changed + - install_3.msg == 'package(s) already installed' + - install_4 is changed + - install_4.msg == 'Installed 1 package(s)' + - install_4.packages == [extra_pkg_outfmt] + - install_5 is changed + - install_5.msg == 'Installed 3 package(s)' + - install_5.packages|sort() == [reg_pkg, url_pkg, file_pkg]|sort() diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman.py b/tests/unit/plugins/modules/packaging/os/test_pacman.py index bbc8f3435c..ae2da6a48f 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman.py +++ b/tests/unit/plugins/modules/packaging/os/test_pacman.py @@ -100,6 +100,19 @@ valid_inventory = { "upgradable_pkgs": { "sqlite": VersionTuple(current="3.36.0-1", latest="3.37.0-1"), }, + "pkg_reasons": { + "file": "explicit", + "filesystem": "explicit", + "findutils": "explicit", + "gawk": "explicit", + "gettext": "explicit", + "grep": "explicit", + "gzip": "explicit", + "pacman": "explicit", + "pacman-mirrorlist": "dependency", + "sed": "explicit", + "sqlite": "explicit", + }, } empty_inventory = { @@ -108,6 +121,7 @@ empty_inventory = { "installed_groups": {}, "available_groups": {}, "upgradable_pkgs": {}, + "pkg_reasons": {}, } @@ -255,6 +269,27 @@ class TestPacman: """, "", ), + ( # pacman --query --explicit + 0, + """file 5.41-1 + filesystem 2021.11.11-1 + findutils 4.8.0-1 + gawk 5.1.1-1 + gettext 0.21-1 + grep 3.7-1 + gzip 1.11-1 + pacman 6.0.1-2 + sed 4.8-1 + sqlite 3.36.0-1 + """, + "", + ), + ( # pacman --query --deps + 0, + """pacman-mirrorlist 20211114-1 + """, + "", + ), ], None, ), @@ -272,6 +307,8 @@ class TestPacman: "", "warning: config file /etc/pacman.conf, line 34: directive 'TotalDownload' in section 'options' not recognized.", ), + (0, "", ""), + (0, "", ""), ], None, ), @@ -288,6 +325,8 @@ class TestPacman: "partial\npkg\\nlist", "some warning", ), + (0, "", ""), + (0, "", ""), ], AnsibleFailJson, ), @@ -375,6 +414,8 @@ class TestPacman: (["pacman", "--query", "--groups"], {'check_rc': True}, 0, '', ''), (["pacman", "--sync", "--groups", "--groups"], {'check_rc': True}, 0, '', ''), (["pacman", "--query", "--upgrades"], {'check_rc': False}, 0, '', ''), + (["pacman", "--query", "--explicit"], {'check_rc': True}, 0, 'foo 1.0.0-1', ''), + (["pacman", "--query", "--deps"], {'check_rc': True}, 0, '', ''), ], False, ), @@ -843,7 +884,7 @@ class TestPacman: ], "state": "present", }, - ["sudo", "somepackage", "otherpkg"], + ["otherpkg", "somepackage", "sudo"], [ Package("sudo", "sudo"), Package("grep", "grep"), From c273498a03dc70ed4b57f5de0a0eb0702a63153a Mon Sep 17 00:00:00 2001 From: PKehnel Date: Sun, 31 Jul 2022 22:12:38 +0200 Subject: [PATCH 0139/2104] Module listen ports facts extend output (#4953) * Initial Rework of netstat and ss to include additional information. State, foreign address, process. * Fixed sanity tests. Python 2 compatible code. pylint errors resolved. * Sanity tests. ss_parse fix minor error I created before. * Rename variable for clarity * Python2 rsplit takes no keyword argument. -> remove keyword argument * Generic improvments for split_pid_name. Added changelog * Sanity Test (no type hints for python2.7) * add include_non_listening param. Add param to test. Add documentation. Only return state and foreign_address when include_non_listening * Update changelogs/fragments/4953-listen-ports-facts-extend-output.yaml Co-authored-by: Felix Fontein * Add info to changelog fragment. Clarify documentation. * The case where we have multiple entries in pids for udp eg: users:(("rpcbind",pid=733,fd=5),("systemd",pid=1,fd=30)) is not in the tests. So roll back to previous approach where this is covered. Fix wrong if condition for include_non_listening. * Rewrite documentation and formatting. * Last small documentation adjustments. * Update parameters to match description. * added test cases to check if include_non_listening is set to no by default. And test if ports and foreign_address exists if set to yes * undo rename from address to local_address -> breaking change * Replace choice with bool, as it is the correct fit here * nestat distinguishes between tcp6 and tcp output should always be tcp * Minor adjustments in the docs (no -> false, is set to yes -> true) Co-authored-by: Paul-Kehnel Co-authored-by: Felix Fontein --- ...4953-listen-ports-facts-extend-output.yaml | 2 + plugins/modules/system/listen_ports_facts.py | 195 ++++++++++++------ .../targets/listen_ports_facts/tasks/main.yml | 20 +- 3 files changed, 155 insertions(+), 62 deletions(-) create mode 100644 changelogs/fragments/4953-listen-ports-facts-extend-output.yaml diff --git a/changelogs/fragments/4953-listen-ports-facts-extend-output.yaml b/changelogs/fragments/4953-listen-ports-facts-extend-output.yaml new file mode 100644 index 0000000000..c008b0f356 --- /dev/null +++ b/changelogs/fragments/4953-listen-ports-facts-extend-output.yaml @@ -0,0 +1,2 @@ +minor_changes: + - listen_ports_facts - add new ``include_non_listening`` option which adds ``-a`` option to ``netstat`` and ``ss``. This shows both listening and non-listening (for TCP this means established connections) sockets, and returns ``state`` and ``foreign_address`` (https://github.com/ansible-collections/community.general/issues/4762, https://github.com/ansible-collections/community.general/pull/4953). diff --git a/plugins/modules/system/listen_ports_facts.py b/plugins/modules/system/listen_ports_facts.py index 40adeb9e16..1ab1e8d69f 100644 --- a/plugins/modules/system/listen_ports_facts.py +++ b/plugins/modules/system/listen_ports_facts.py @@ -32,6 +32,13 @@ options: - netstat - ss version_added: 4.1.0 + include_non_listening: + description: + - Show both listening and non-listening sockets (for TCP this means established connections). + - Adds the return values C(state) and C(foreign_address) to the returned facts. + type: bool + default: false + version_added: 5.4.0 ''' EXAMPLES = r''' @@ -59,6 +66,11 @@ EXAMPLES = r''' - name: List all ports ansible.builtin.debug: msg: "{{ (ansible_facts.tcp_listen + ansible_facts.udp_listen) | map(attribute='port') | unique | sort | list }}" + +- name: Gather facts on all ports and override which command to use + community.general.listen_ports_facts: + command: 'netstat' + include_non_listening: 'yes' ''' RETURN = r''' @@ -77,6 +89,18 @@ ansible_facts: returned: always type: str sample: "0.0.0.0" + foreign_address: + description: The address of the remote end of the socket. + returned: if I(include_non_listening=true) + type: str + sample: "10.80.0.1" + version_added: 5.4.0 + state: + description: The state of the socket. + returned: if I(include_non_listening=true) + type: str + sample: "ESTABLISHED" + version_added: 5.4.0 name: description: The name of the listening process. returned: if user permissions allow @@ -117,6 +141,18 @@ ansible_facts: returned: always type: str sample: "0.0.0.0" + foreign_address: + description: The address of the remote end of the socket. + returned: if I(include_non_listening=true) + type: str + sample: "10.80.0.1" + version_added: 5.4.0 + state: + description: The state of the socket. UDP is a connectionless protocol. Shows UCONN or ESTAB. + returned: if I(include_non_listening=true) + type: str + sample: "UCONN" + version_added: 5.4.0 name: description: The name of the listening process. returned: if user permissions allow @@ -155,47 +191,84 @@ from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.basic import AnsibleModule +def split_pid_name(pid_name): + """ + Split the entry PID/Program name into the PID (int) and the name (str) + :param pid_name: PID/Program String seperated with a dash. E.g 51/sshd: returns pid = 51 and name = sshd + :return: PID (int) and the program name (str) + """ + try: + pid, name = pid_name.split("/", 1) + except ValueError: + # likely unprivileged user, so add empty name & pid + return 0, "" + else: + name = name.rstrip(":") + return int(pid), name + + def netStatParse(raw): + """ + The netstat result can be either split in 6,7 or 8 elements depending on the values of state, process and name. + For UDP the state is always empty. For UDP and TCP the process can be empty. + So these cases have to be checked. + :param raw: Netstat raw output String. First line explains the format, each following line contains a connection. + :return: List of dicts, each dict contains protocol, state, local address, foreign address, port, name, pid for one + connection. + """ results = list() for line in raw.splitlines(): - listening_search = re.search('[^ ]+:[0-9]+', line) - if listening_search: - splitted = line.split() - conns = re.search('([^ ]+):([0-9]+)', splitted[3]) - pidstr = '' - if 'tcp' in splitted[0]: - protocol = 'tcp' - pidstr = splitted[6] - elif 'udp' in splitted[0]: - protocol = 'udp' - pidstr = splitted[5] - pids = re.search(r'(([0-9]+)/(.*)|-)', pidstr) - if conns and pids: - address = conns.group(1) - port = conns.group(2) - if (pids.group(2)): - pid = pids.group(2) - else: - pid = 0 - if (pids.group(3)): - name = pids.group(3) - else: - name = '' - result = { - 'pid': int(pid), - 'address': address, - 'port': int(port), - 'protocol': protocol, - 'name': name, - } - if result not in results: - results.append(result) + if line.startswith(("tcp", "udp")): + # set variables to default state, in case they are not specified + state = "" + pid_and_name = "" + process = "" + formatted_line = line.split() + protocol, recv_q, send_q, address, foreign_address, rest = \ + formatted_line[0], formatted_line[1], formatted_line[2], formatted_line[3], formatted_line[4], formatted_line[5:] + address, port = address.rsplit(":", 1) + + if protocol.startswith("tcp"): + # nestat distinguishes between tcp6 and tcp + protocol = "tcp" + if len(rest) == 3: + state, pid_and_name, process = rest + if len(rest) == 2: + state, pid_and_name = rest + + if protocol.startswith("udp"): + # safety measure, similar to tcp6 + protocol = "udp" + if len(rest) == 2: + pid_and_name, process = rest + if len(rest) == 1: + pid_and_name = rest[0] + + pid, name = split_pid_name(pid_name=pid_and_name) + result = { + 'protocol': protocol, + 'state': state, + 'address': address, + 'foreign_address': foreign_address, + 'port': int(port), + 'name': name, + 'pid': int(pid), + } + if result not in results: + results.append(result) else: raise EnvironmentError('Could not get process information for the listening ports.') return results def ss_parse(raw): + """ + The ss_parse result can be either split in 6 or 7 elements depending on the process column, + e.g. due to unprivileged user. + :param raw: ss raw output String. First line explains the format, each following line contains a connection. + :return: List of dicts, each dict contains protocol, state, local address, foreign address, port, name, pid for one + connection. + """ results = list() regex_conns = re.compile(pattern=r'\[?(.+?)\]?:([0-9]+)$') regex_pid = re.compile(pattern=r'"(.*?)",pid=(\d+)') @@ -221,8 +294,8 @@ def ss_parse(raw): except ValueError: # unexpected stdout from ss raise EnvironmentError( - 'Expected `ss` table layout "Netid, State, Recv-Q, Send-Q, Local Address:Port, Peer Address:Port" and optionally "Process", \ - but got something else: {0}'.format(line) + 'Expected `ss` table layout "Netid, State, Recv-Q, Send-Q, Local Address:Port, Peer Address:Port" and \ + optionally "Process", but got something else: {0}'.format(line) ) conns = regex_conns.search(local_addr_port) @@ -239,46 +312,44 @@ def ss_parse(raw): port = conns.group(2) for name, pid in pids: result = { - 'pid': int(pid), - 'address': address, - 'port': int(port), 'protocol': protocol, - 'name': name + 'state': state, + 'address': address, + 'foreign_address': peer_addr_port, + 'port': int(port), + 'name': name, + 'pid': int(pid), } results.append(result) return results def main(): + command_args = ['-p', '-l', '-u', '-n', '-t'] commands_map = { 'netstat': { - 'args': [ - '-p', - '-l', - '-u', - '-n', - '-t', - ], + 'args': [], 'parse_func': netStatParse }, 'ss': { - 'args': [ - '-p', - '-l', - '-u', - '-n', - '-t', - ], + 'args': [], 'parse_func': ss_parse }, } module = AnsibleModule( argument_spec=dict( - command=dict(type='str', choices=list(sorted(commands_map))) + command=dict(type='str', choices=list(sorted(commands_map))), + include_non_listening=dict(default=False, type='bool'), ), supports_check_mode=True, ) + if module.params['include_non_listening']: + command_args = ['-p', '-u', '-n', '-t', '-a'] + + commands_map['netstat']['args'] = command_args + commands_map['ss']['args'] = command_args + if platform.system() != 'Linux': module.fail_json(msg='This module requires Linux.') @@ -333,13 +404,17 @@ def main(): parse_func = commands_map[command]['parse_func'] results = parse_func(stdout) - for p in results: - p['stime'] = getPidSTime(p['pid']) - p['user'] = getPidUser(p['pid']) - if p['protocol'].startswith('tcp'): - result['ansible_facts']['tcp_listen'].append(p) - elif p['protocol'].startswith('udp'): - result['ansible_facts']['udp_listen'].append(p) + for connection in results: + # only display state and foreign_address for include_non_listening. + if not module.params['include_non_listening']: + connection.pop('state', None) + connection.pop('foreign_address', None) + connection['stime'] = getPidSTime(connection['pid']) + connection['user'] = getPidUser(connection['pid']) + if connection['protocol'].startswith('tcp'): + result['ansible_facts']['tcp_listen'].append(connection) + elif connection['protocol'].startswith('udp'): + result['ansible_facts']['udp_listen'].append(connection) except (KeyError, EnvironmentError) as e: module.fail_json(msg=to_native(e)) diff --git a/tests/integration/targets/listen_ports_facts/tasks/main.yml b/tests/integration/targets/listen_ports_facts/tasks/main.yml index a6915504c9..715a545039 100644 --- a/tests/integration/targets/listen_ports_facts/tasks/main.yml +++ b/tests/integration/targets/listen_ports_facts/tasks/main.yml @@ -58,14 +58,23 @@ listen_ports_facts: when: ansible_os_family == "RedHat" or ansible_os_family == "Debian" -- name: Gather listening ports facts explicitly via netstat +- name: check that the include_non_listening parameters ('state' and 'foreign_address') are not active in default setting + assert: + that: + - ansible_facts.tcp_listen | selectattr('state', 'defined') | list | length == 0 + - ansible_facts.tcp_listen | selectattr('foreign_address', 'defined') | list | length == 0 + when: ansible_os_family == "RedHat" or ansible_os_family == "Debian" + +- name: Gather listening ports facts explicitly via netstat and include_non_listening listen_ports_facts: command: 'netstat' + include_non_listening: 'yes' when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int < 7) or ansible_os_family == "Debian" -- name: Gather listening ports facts explicitly via ss +- name: Gather listening ports facts explicitly via ss and include_non_listening listen_ports_facts: command: 'ss' + include_non_listening: 'yes' when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 7 - name: check for ansible_facts.udp_listen exists @@ -78,6 +87,13 @@ that: ansible_facts.tcp_listen is defined when: ansible_os_family == "RedHat" or ansible_os_family == "Debian" +- name: check that the include_non_listening parameter 'state' and 'foreign_address' exists + assert: + that: + - ansible_facts.tcp_listen | selectattr('state', 'defined') | list | length > 0 + - ansible_facts.tcp_listen | selectattr('foreign_address', 'defined') | list | length > 0 + when: ansible_os_family == "RedHat" or ansible_os_family == "Debian" + - name: check TCP 5556 is in listening ports assert: that: 5556 in ansible_facts.tcp_listen | map(attribute='port') | sort | list From 74f2e1d28b01e25fe2c894381b7fff1996cedfd9 Mon Sep 17 00:00:00 2001 From: grembo Date: Sun, 31 Jul 2022 22:13:27 +0200 Subject: [PATCH 0140/2104] passwordstore: Add some real gopass integration tests (#5030) * passwordstore: Add some real go tests This is work in progress. * passwordstore: Fix gopass init * Init gopass store in explicit path in integration test * passwordstore: Show versions of tools in integration test * passwordstore: Install gopass from different location on Debian Part of integration tests * passwordstore: Add changelog fragment for #5030 * passwordstore: Address review feedback --- .../lookup_passwordstore/tasks/package.yml | 21 ++ .../tasks/password_tests.yml | 125 ++++++++++++ .../lookup_passwordstore/tasks/tests.yml | 180 ++++-------------- .../lookup_passwordstore/vars/Alpine.yml | 1 + .../lookup_passwordstore/vars/Archlinux.yml | 1 + .../lookup_passwordstore/vars/Fedora.yml | 1 + .../lookup_passwordstore/vars/FreeBSD.yml | 1 + 7 files changed, 182 insertions(+), 148 deletions(-) create mode 100644 tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml diff --git a/tests/integration/targets/lookup_passwordstore/tasks/package.yml b/tests/integration/targets/lookup_passwordstore/tasks/package.yml index 8ec108e089..0ced77c42e 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/package.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/package.yml @@ -31,6 +31,26 @@ disable_gpg_check: yes when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper'] +# See https://github.com/gopasspw/gopass/issues/1849#issuecomment-802789285 +- name: Install gopass on Debian + when: ansible_facts.os_family == 'Debian' + become: yes + block: + - name: Fetch gopass repo keyring + ansible.builtin.get_url: + url: https://packages.gopass.pw/repos/gopass/gopass-archive-keyring.gpg + dest: /usr/share/keyrings/gopass-archive-keyring.gpg + - name: Add gopass repo + ansible.builtin.apt_repository: + repo: "deb [arch=amd64,arm64,armhf \ + signed-by=/usr/share/keyrings/gopass-archive-keyring.gpg] \ + https://packages.gopass.pw/repos/gopass stable main" + state: present + - name: Update apt-cache and install gopass package + ansible.builtin.apt: + name: gopass + update_cache: yes + - name: Install on macOS when: ansible_facts.distribution == 'MacOSX' block: @@ -48,6 +68,7 @@ name: - gnupg2 - pass + - gopass state: present update_homebrew: no become: yes diff --git a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml new file mode 100644 index 0000000000..d519304f06 --- /dev/null +++ b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml @@ -0,0 +1,125 @@ + - name: Create a password ({{ backend }}) + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes', backend=backend) }}" + + - name: Fetch password from an existing file ({{ backend }}) + set_fact: + readpass: "{{ lookup('community.general.passwordstore', 'test-pass', backend=backend) }}" + + - name: Verify password ({{ backend }}) + assert: + that: + - readpass == newpass + + - name: Create a password with equal sign ({{ backend }}) + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=yes', backend=backend) }}" + + - name: Fetch a password with equal sign ({{ backend }}) + set_fact: + readpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal', backend=backend) }}" + + - name: Verify password ({{ backend }}) + assert: + that: + - readpass == newpass + + - name: Create a password using missing=create ({{ backend }}) + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=create length=8', backend=backend) }}" + + - name: Fetch password from an existing file ({{ backend }}) + set_fact: + readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', backend=backend) }}" + + - name: Verify password ({{ backend }}) + assert: + that: + - readpass == newpass + + - name: Fetch password from existing file using missing=empty ({{ backend }}) + set_fact: + readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=empty', backend=backend) }}" + + - name: Verify password ({{ backend }}) + assert: + that: + - readpass == newpass + + - name: Fetch password from non-existing file using missing=empty ({{ backend }}) + set_fact: + readpass: "{{ query('community.general.passwordstore', 'test-missing-pass missing=empty', backend=backend) }}" + + - name: Verify password ({{ backend }}) + assert: + that: + - readpass == [ none ] + + - name: Create the YAML password ({{ backend }}) + command: "{{ backend }} insert -m -f test-yaml-pass" + args: + stdin: | + testpassword + key: | + multi + line + + - name: Fetch a password with YAML subkey ({{ backend }}) + set_fact: + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass subkey=key', backend=backend) }}" + + - name: Read a yaml subkey ({{ backend }}) + assert: + that: + - readyamlpass == 'multi\nline\n' + + - name: Create a non-YAML multiline file ({{ backend }}) + command: "{{ backend }} insert -m -f test-multiline-pass" + args: + stdin: | + testpassword + random additional line + + - name: Fetch password from multiline file ({{ backend }}) + set_fact: + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', backend=backend) }}" + + - name: Multiline pass only returns first line ({{ backend }}) + assert: + that: + - readyamlpass == 'testpassword' + + - name: Fetch all from multiline file ({{ backend }}) + set_fact: + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass returnall=yes', backend=backend) }}" + + - name: Multiline pass returnall returns everything in the file ({{ backend }}) + assert: + that: + - readyamlpass == 'testpassword\nrandom additional line\n' + + - name: Create a password in a folder ({{ backend }}) + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass length=8 create=yes', backend=backend) }}" + + - name: Fetch password from folder ({{ backend }}) + set_fact: + readpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', backend=backend) }}" + + - name: Verify password from folder ({{ backend }}) + assert: + that: + - readpass == newpass + + - name: Try to read folder as passname ({{ backend }}) + set_fact: + newpass: "{{ lookup('community.general.passwordstore', 'folder', backend=backend) }}" + ignore_errors: true + register: eval_error + + - name: Make sure reading folder as passname failed ({{ backend }}) + assert: + that: + - eval_error is failed + - '"passname folder not found" in eval_error.msg' + when: backend != "gopass" # Remove this line once gopass backend can handle this diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index 5ac9a948a9..19f7283360 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -41,12 +41,10 @@ - name: Try to find gopass in path command: which gopass register: result - ignore_errors: yes - name: Store path of gopass executable set_fact: - gopasspath: "{{ (result.rc == 0) | - ternary(result.stdout, (passpath | dirname, 'gopass') | path_join) }}" + gopasspath: "{{ result.stdout }}" - name: Move original gopass into place if there was a leftover command: @@ -57,6 +55,18 @@ args: removes: "{{ gopasspath }}.testorig" +- name: Get versions of tools + command: "{{ item }} --version" + register: versions + loop: + - "{{ gpg2_bin }}" + - pass + - gopass + +- name: Output versions of tools + debug: + msg: "{{ versions.results | map(attribute='stdout_lines') }}" + # How to generate a new GPG key: # gpg2 --batch --gen-key input # See templates/input # gpg2 --list-secret-keys --keyid-format LONG @@ -70,150 +80,22 @@ - name: Trust key shell: echo "D3E1CC8934E97270CEB066023AF1BD3619AB496A:6:" | {{ gpg2_bin }} --import-ownertrust -- name: Initialise passwordstore +- name: Initialise pass passwordstore command: pass init ansible-test -- name: Create a password - set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes') }}" +- name: Initialise gopass passwordstore + command: gopass init --path $HOME/.gopass-store ansible-test + args: + creates: "{{ lookup('env','HOME') }}/.gopass-store" -- name: Fetch password from an existing file - set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-pass') }}" - -- name: Verify password - assert: - that: - - readpass == newpass - -- name: Create a password with equal sign - set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=yes') }}" - -- name: Fetch a password with equal sign - set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal') }}" - -- name: Verify password - assert: - that: - - readpass == newpass - -- name: Create a password using missing=create - set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=create length=8') }}" - -- name: Fetch password from an existing file - set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create') }}" - -- name: Verify password - assert: - that: - - readpass == newpass - -- name: Fetch password from existing file using missing=empty - set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=empty') }}" - -- name: Verify password - assert: - that: - - readpass == newpass - -- name: Fetch password from non-existing file using missing=empty - set_fact: - readpass: "{{ query('community.general.passwordstore', 'test-missing-pass missing=empty') }}" - -- name: Verify password - assert: - that: - - readpass == [ none ] - -# As inserting multiline passwords on the commandline would require something -# like expect, simply create it by using default gpg on a file with the correct -# structure. -- name: Create the YAML password content - copy: - dest: "~/.password-store/test-yaml-pass" - content: | - testpassword - key: | - multi - line - -- name: Read .gpg-id from .password-store - set_fact: - gpgid: "{{ lookup('file', '~/.password-store/.gpg-id') }}" - -- name: Encrypt the file using the gpg key - command: "{{ gpg2_bin }} --batch --encrypt -r {{ gpgid }} ~/.password-store/test-yaml-pass" - -- name: Fetch a password with YAML subkey - set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass subkey=key') }}" - -- name: Read a yaml subkey - assert: - that: - - readyamlpass == 'multi\nline' - -- name: Create a non-YAML multiline file - copy: - dest: "~/.password-store/test-multiline-pass" - content: | - testpassword - random additional line - -- name: Read .gpg-id from .password-store - set_fact: - gpgid: "{{ lookup('file', '~/.password-store/.gpg-id') }}" - -- name: Encrypt the file using the gpg key - command: "{{ gpg2_bin }} --batch --encrypt -r {{ gpgid }} ~/.password-store/test-multiline-pass" - -- name: Fetch password from multiline file - set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass') }}" - -- name: Multiline pass only returns first line - assert: - that: - - readyamlpass == 'testpassword' - -- name: Fetch all from multiline file - set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass returnall=yes') }}" - -- name: Multiline pass returnall returns everything in the file - assert: - that: - - readyamlpass == 'testpassword\nrandom additional line' - -- name: Create a password in a folder - set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass length=8 create=yes') }}" - -- name: Fetch password from folder - set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass') }}" - -- name: Verify password from folder - assert: - that: - - readpass == newpass - -- name: Try to read folder as passname - set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'folder') }}" - ignore_errors: true - register: eval_error - -- name: Make sure reading folder as passname failed - assert: - that: - - eval_error is failed - - '"passname folder not found" in eval_error.msg' +# these tests should apply to all backends +- name: Password tests + include_tasks: password_tests.yml + loop: + - pass + - gopass + loop_control: + loop_var: backend - name: Change passwordstore location explicitly set_fact: @@ -289,11 +171,13 @@ args: removes: "{{ passpath }}.testorig" -- name: Very basic gopass compatibility test +# This are in addition to the real gopass tests above +# and verify plugin logic +- name: gopass plugin logic tests vars: passwordstore_backend: "gopass" block: - - name: check if gopass executable exists + - name: Check if gopass executable exists stat: path: "{{ gopasspath }}" register: gopass_check @@ -322,11 +206,11 @@ dest: "{{ gopasspath }}" mode: '0755' - - name: Try to read folder as passname using gopass + - name: Try to read folder as passname using gopass mock set_fact: newpass: "{{ lookup('community.general.passwordstore', 'folder') }}" - - name: Verify password received from gopass + - name: Verify password received from gopass mock assert: that: - newpass == "gopass_ok" diff --git a/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml b/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml index 3d1c4d45d5..05778f6938 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml @@ -1,2 +1,3 @@ passwordstore_packages: + - gopass - pass diff --git a/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml b/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml index 3d1c4d45d5..05778f6938 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml @@ -1,2 +1,3 @@ passwordstore_packages: + - gopass - pass diff --git a/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml b/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml index 3d1c4d45d5..05778f6938 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml @@ -1,2 +1,3 @@ passwordstore_packages: + - gopass - pass diff --git a/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml b/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml index 39e51fbc2e..82e5f61849 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml @@ -1,3 +1,4 @@ passwordstore_packages: + - gopass - gnupg - password-store From 3fe9592cf1505a78b243ed4552aba06423ee948b Mon Sep 17 00:00:00 2001 From: Richard Tuin Date: Sun, 31 Jul 2022 23:35:07 +0200 Subject: [PATCH 0141/2104] Slack: Add support for (some) groups (#5019) * Slack: Add support for (some) groups Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors. I've added these prefixes to the list to maintain as much backwards compatibility as possible. Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years. * Add changelog fragment for slack channel prefix fix * Update changelogs/fragments/5019-slack-support-more-groups.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5019-slack-support-more-groups.yml | 2 ++ plugins/modules/notification/slack.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5019-slack-support-more-groups.yml diff --git a/changelogs/fragments/5019-slack-support-more-groups.yml b/changelogs/fragments/5019-slack-support-more-groups.yml new file mode 100644 index 0000000000..184bab353a --- /dev/null +++ b/changelogs/fragments/5019-slack-support-more-groups.yml @@ -0,0 +1,2 @@ +bugfixes: + - slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). \ No newline at end of file diff --git a/plugins/modules/notification/slack.py b/plugins/modules/notification/slack.py index bdc839f9a8..f10d4003d6 100644 --- a/plugins/modules/notification/slack.py +++ b/plugins/modules/notification/slack.py @@ -293,7 +293,7 @@ def build_payload_for_slack(text, channel, thread_id, username, icon_url, icon_e # With a custom color we have to set the message as attachment, and explicitly turn markdown parsing on for it. payload = dict(attachments=[dict(text=escape_quotes(text), color=color, mrkdwn_in=["text"])]) if channel is not None: - if channel.startswith(('#', '@', 'C0')): + if channel.startswith(('#', '@', 'C0', 'GF', 'G0')): payload['channel'] = channel else: payload['channel'] = '#' + channel From 88a3daf2ec933fa7224f085d1ea97d34bab3c314 Mon Sep 17 00:00:00 2001 From: Dishant Pandya Date: Mon, 1 Aug 2022 13:05:05 +0530 Subject: [PATCH 0142/2104] Fix: Add user-agent header to allow request through WAF with bot protection (#5024) * Fix: Add user agent header to allow request through CDN/WAF with bot protection * upate doc-fragment * move http_agent variable assignment * set http_agent param for all Keycloak API Requests * Update plugins/doc_fragments/keycloak.py Co-authored-by: Felix Fontein * Update changelogs/fragments/5023-http-agent-param-keycloak.yml Co-authored-by: Felix Fontein * fix formatting * Update plugins/doc_fragments/keycloak.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../5023-http-agent-param-keycloak.yml | 2 + plugins/doc_fragments/keycloak.py | 6 + .../identity/keycloak/keycloak.py | 173 ++++++++++-------- 3 files changed, 105 insertions(+), 76 deletions(-) create mode 100644 changelogs/fragments/5023-http-agent-param-keycloak.yml diff --git a/changelogs/fragments/5023-http-agent-param-keycloak.yml b/changelogs/fragments/5023-http-agent-param-keycloak.yml new file mode 100644 index 0000000000..64e2ace369 --- /dev/null +++ b/changelogs/fragments/5023-http-agent-param-keycloak.yml @@ -0,0 +1,2 @@ +minor_changes: + - keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` (https://github.com/ansible-collections/community.general/issues/5023). \ No newline at end of file diff --git a/plugins/doc_fragments/keycloak.py b/plugins/doc_fragments/keycloak.py index fab9a6e894..3c9070cbc7 100644 --- a/plugins/doc_fragments/keycloak.py +++ b/plugins/doc_fragments/keycloak.py @@ -68,4 +68,10 @@ options: type: int default: 10 version_added: 4.5.0 + http_agent: + description: + - Configures the HTTP User-Agent header. + type: str + default: Ansible + version_added: 5.4.0 ''' diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 8051c946e2..19430e9077 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -104,6 +104,7 @@ def keycloak_argument_spec(): validate_certs=dict(type='bool', default=True), connection_timeout=dict(type='int', default=10), token=dict(type='str', no_log=True), + http_agent=dict(type='str', default='Ansible'), ) @@ -123,6 +124,7 @@ def get_token(module_params): """ token = module_params.get('token') base_url = module_params.get('auth_keycloak_url') + http_agent = module_params.get('http_agent') if not base_url.lower().startswith(('http', 'https')): raise KeycloakError("auth_url '%s' should either start with 'http' or 'https'." % base_url) @@ -149,7 +151,7 @@ def get_token(module_params): (k, v) for k, v in temp_payload.items() if v is not None) try: r = json.loads(to_native(open_url(auth_url, method='POST', - validate_certs=validate_certs, timeout=connection_timeout, + validate_certs=validate_certs, http_agent=http_agent, timeout=connection_timeout, data=urlencode(payload)).read())) except ValueError as e: raise KeycloakError( @@ -233,6 +235,7 @@ class KeycloakAPI(object): self.validate_certs = self.module.params.get('validate_certs') self.connection_timeout = self.module.params.get('connection_timeout') self.restheaders = connection_header + self.http_agent = self.module.params.get('http_agent') def get_realm_info_by_id(self, realm='master'): """ Obtain realm public info by id @@ -243,7 +246,8 @@ class KeycloakAPI(object): realm_info_url = URL_REALM_INFO.format(url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(realm_info_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(realm_info_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: @@ -268,7 +272,7 @@ class KeycloakAPI(object): realm_url = URL_REALM.format(url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(realm_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(realm_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: @@ -293,7 +297,7 @@ class KeycloakAPI(object): realm_url = URL_REALM.format(url=self.baseurl, realm=realm) try: - return open_url(realm_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(realm_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(realmrep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update realm %s: %s' % (realm, str(e)), @@ -307,7 +311,7 @@ class KeycloakAPI(object): realm_url = URL_REALMS.format(url=self.baseurl) try: - return open_url(realm_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(realm_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(realmrep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not create realm %s: %s' % (realmrep['id'], str(e)), @@ -322,7 +326,7 @@ class KeycloakAPI(object): realm_url = URL_REALM.format(url=self.baseurl, realm=realm) try: - return open_url(realm_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(realm_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not delete realm %s: %s' % (realm, str(e)), @@ -340,7 +344,8 @@ class KeycloakAPI(object): clientlist_url += '?clientId=%s' % filter try: - return json.loads(to_native(open_url(clientlist_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(clientlist_url, http_agent=self.http_agent, method='GET', headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain list of clients for realm %s: %s' @@ -371,7 +376,8 @@ class KeycloakAPI(object): client_url = URL_CLIENT.format(url=self.baseurl, realm=realm, id=id) try: - return json.loads(to_native(open_url(client_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(client_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: @@ -410,7 +416,7 @@ class KeycloakAPI(object): client_url = URL_CLIENT.format(url=self.baseurl, realm=realm, id=id) try: - return open_url(client_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(client_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(clientrep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update client %s in realm %s: %s' @@ -425,7 +431,7 @@ class KeycloakAPI(object): client_url = URL_CLIENTS.format(url=self.baseurl, realm=realm) try: - return open_url(client_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(client_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(clientrep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not create client %s in realm %s: %s' @@ -441,7 +447,7 @@ class KeycloakAPI(object): client_url = URL_CLIENT.format(url=self.baseurl, realm=realm, id=id) try: - return open_url(client_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(client_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not delete client %s in realm %s: %s' @@ -456,7 +462,8 @@ class KeycloakAPI(object): """ client_roles_url = URL_CLIENT_ROLES.format(url=self.baseurl, realm=realm, id=cid) try: - return json.loads(to_native(open_url(client_roles_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(client_roles_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg="Could not fetch rolemappings for client %s in realm %s: %s" @@ -488,7 +495,8 @@ class KeycloakAPI(object): """ rolemappings_url = URL_CLIENT_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: - rolemappings = json.loads(to_native(open_url(rolemappings_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + rolemappings = json.loads(to_native(open_url(rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) for role in rolemappings: if rid == role['id']: @@ -508,7 +516,8 @@ class KeycloakAPI(object): """ available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS_AVAILABLE.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: - return json.loads(to_native(open_url(available_rolemappings_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(available_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg="Could not fetch available rolemappings for client %s in group %s, realm %s: %s" @@ -524,7 +533,8 @@ class KeycloakAPI(object): """ available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS_COMPOSITE.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: - return json.loads(to_native(open_url(available_rolemappings_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(available_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg="Could not fetch available rolemappings for client %s in group %s, realm %s: %s" @@ -541,7 +551,7 @@ class KeycloakAPI(object): """ available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: - open_url(available_rolemappings_url, method="POST", headers=self.restheaders, data=json.dumps(role_rep), + open_url(available_rolemappings_url, method="POST", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(role_rep), validate_certs=self.validate_certs, timeout=self.connection_timeout) except Exception as e: self.module.fail_json(msg="Could not fetch available rolemappings for client %s in group %s, realm %s: %s" @@ -558,7 +568,7 @@ class KeycloakAPI(object): """ available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: - open_url(available_rolemappings_url, method="DELETE", headers=self.restheaders, + open_url(available_rolemappings_url, method="DELETE", http_agent=self.http_agent, headers=self.restheaders, validate_certs=self.validate_certs, timeout=self.connection_timeout) except Exception as e: self.module.fail_json(msg="Could not delete available rolemappings for client %s in group %s, realm %s: %s" @@ -573,7 +583,7 @@ class KeycloakAPI(object): url = URL_CLIENTTEMPLATES.format(url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(url, method='GET', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain list of client templates for realm %s: %s' @@ -592,7 +602,7 @@ class KeycloakAPI(object): url = URL_CLIENTTEMPLATE.format(url=self.baseurl, id=id, realm=realm) try: - return json.loads(to_native(open_url(url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(url, method='GET', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain client templates %s for realm %s: %s' @@ -638,7 +648,7 @@ class KeycloakAPI(object): url = URL_CLIENTTEMPLATE.format(url=self.baseurl, realm=realm, id=id) try: - return open_url(url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(clienttrep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update client template %s in realm %s: %s' @@ -653,7 +663,7 @@ class KeycloakAPI(object): url = URL_CLIENTTEMPLATES.format(url=self.baseurl, realm=realm) try: - return open_url(url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(clienttrep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not create client template %s in realm %s: %s' @@ -669,7 +679,7 @@ class KeycloakAPI(object): url = URL_CLIENTTEMPLATE.format(url=self.baseurl, realm=realm, id=id) try: - return open_url(url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not delete client template %s in realm %s: %s' @@ -686,7 +696,8 @@ class KeycloakAPI(object): """ clientscopes_url = URL_CLIENTSCOPES.format(url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(clientscopes_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(clientscopes_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg="Could not fetch list of clientscopes in realm %s: %s" @@ -703,7 +714,8 @@ class KeycloakAPI(object): """ clientscope_url = URL_CLIENTSCOPE.format(url=self.baseurl, realm=realm, id=cid) try: - return json.loads(to_native(open_url(clientscope_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(clientscope_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: @@ -748,7 +760,7 @@ class KeycloakAPI(object): """ clientscopes_url = URL_CLIENTSCOPES.format(url=self.baseurl, realm=realm) try: - return open_url(clientscopes_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(clientscopes_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(clientscoperep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg="Could not create clientscope %s in realm %s: %s" @@ -763,7 +775,7 @@ class KeycloakAPI(object): clientscope_url = URL_CLIENTSCOPE.format(url=self.baseurl, realm=realm, id=clientscoperep['id']) try: - return open_url(clientscope_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(clientscope_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(clientscoperep), validate_certs=self.validate_certs) except Exception as e: @@ -801,7 +813,7 @@ class KeycloakAPI(object): # should have a good cid by here. clientscope_url = URL_CLIENTSCOPE.format(realm=realm, id=cid, url=self.baseurl) try: - return open_url(clientscope_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(clientscope_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: @@ -819,7 +831,8 @@ class KeycloakAPI(object): """ protocolmappers_url = URL_CLIENTSCOPE_PROTOCOLMAPPERS.format(id=cid, url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(protocolmappers_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(protocolmappers_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg="Could not fetch list of protocolmappers in realm %s: %s" @@ -838,7 +851,8 @@ class KeycloakAPI(object): """ protocolmapper_url = URL_CLIENTSCOPE_PROTOCOLMAPPER.format(url=self.baseurl, realm=realm, id=cid, mapper_id=pid) try: - return json.loads(to_native(open_url(protocolmapper_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(protocolmapper_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: @@ -885,7 +899,7 @@ class KeycloakAPI(object): """ protocolmappers_url = URL_CLIENTSCOPE_PROTOCOLMAPPERS.format(url=self.baseurl, id=cid, realm=realm) try: - return open_url(protocolmappers_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(protocolmappers_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(mapper_rep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg="Could not create protocolmapper %s in realm %s: %s" @@ -901,7 +915,7 @@ class KeycloakAPI(object): protocolmapper_url = URL_CLIENTSCOPE_PROTOCOLMAPPER.format(url=self.baseurl, realm=realm, id=cid, mapper_id=mapper_rep['id']) try: - return open_url(protocolmapper_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(protocolmapper_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(mapper_rep), validate_certs=self.validate_certs) except Exception as e: @@ -918,7 +932,8 @@ class KeycloakAPI(object): """ groups_url = URL_GROUPS.format(url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(groups_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(groups_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg="Could not fetch list of groups in realm %s: %s" @@ -935,7 +950,8 @@ class KeycloakAPI(object): """ groups_url = URL_GROUP.format(url=self.baseurl, realm=realm, groupid=gid) try: - return json.loads(to_native(open_url(groups_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(groups_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: @@ -981,7 +997,7 @@ class KeycloakAPI(object): """ groups_url = URL_GROUPS.format(url=self.baseurl, realm=realm) try: - return open_url(groups_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(groups_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(grouprep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg="Could not create group %s in realm %s: %s" @@ -996,7 +1012,7 @@ class KeycloakAPI(object): group_url = URL_GROUP.format(url=self.baseurl, realm=realm, groupid=grouprep['id']) try: - return open_url(group_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(group_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(grouprep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update group %s in realm %s: %s' @@ -1033,7 +1049,7 @@ class KeycloakAPI(object): # should have a good groupid by here. group_url = URL_GROUP.format(realm=realm, groupid=groupid, url=self.baseurl) try: - return open_url(group_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(group_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg="Unable to delete group %s: %s" % (groupid, str(e))) @@ -1046,7 +1062,8 @@ class KeycloakAPI(object): """ rolelist_url = URL_REALM_ROLES.format(url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(rolelist_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(rolelist_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain list of roles for realm %s: %s' @@ -1064,7 +1081,7 @@ class KeycloakAPI(object): """ role_url = URL_REALM_ROLE.format(url=self.baseurl, realm=realm, name=quote(name)) try: - return json.loads(to_native(open_url(role_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(role_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: if e.code == 404: @@ -1084,7 +1101,7 @@ class KeycloakAPI(object): """ roles_url = URL_REALM_ROLES.format(url=self.baseurl, realm=realm) try: - return open_url(roles_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(roles_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(rolerep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not create role %s in realm %s: %s' @@ -1098,7 +1115,7 @@ class KeycloakAPI(object): """ role_url = URL_REALM_ROLE.format(url=self.baseurl, realm=realm, name=quote(rolerep['name'])) try: - return open_url(role_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(role_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(rolerep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update role %s in realm %s: %s' @@ -1112,7 +1129,7 @@ class KeycloakAPI(object): """ role_url = URL_REALM_ROLE.format(url=self.baseurl, realm=realm, name=quote(name)) try: - return open_url(role_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(role_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Unable to delete role %s in realm %s: %s' @@ -1131,7 +1148,8 @@ class KeycloakAPI(object): % (clientid, realm)) rolelist_url = URL_CLIENT_ROLES.format(url=self.baseurl, realm=realm, id=cid) try: - return json.loads(to_native(open_url(rolelist_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(rolelist_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain list of roles for client %s in realm %s: %s' @@ -1155,7 +1173,7 @@ class KeycloakAPI(object): % (clientid, realm)) role_url = URL_CLIENT_ROLE.format(url=self.baseurl, realm=realm, id=cid, name=quote(name)) try: - return json.loads(to_native(open_url(role_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(role_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: if e.code == 404: @@ -1181,7 +1199,7 @@ class KeycloakAPI(object): % (clientid, realm)) roles_url = URL_CLIENT_ROLES.format(url=self.baseurl, realm=realm, id=cid) try: - return open_url(roles_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(roles_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(rolerep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not create role %s for client %s in realm %s: %s' @@ -1201,7 +1219,7 @@ class KeycloakAPI(object): % (clientid, realm)) role_url = URL_CLIENT_ROLE.format(url=self.baseurl, realm=realm, id=cid, name=quote(rolerep['name'])) try: - return open_url(role_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(role_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(rolerep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update role %s for client %s in realm %s: %s' @@ -1220,7 +1238,7 @@ class KeycloakAPI(object): % (clientid, realm)) role_url = URL_CLIENT_ROLE.format(url=self.baseurl, realm=realm, id=cid, name=quote(name)) try: - return open_url(role_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(role_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Unable to delete role %s for client %s in realm %s: %s' @@ -1237,7 +1255,8 @@ class KeycloakAPI(object): authentication_flow = {} # Check if the authentication flow exists on the Keycloak serveraders authentications = json.load(open_url(URL_AUTHENTICATION_FLOWS.format(url=self.baseurl, realm=realm), method='GET', - headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs)) + http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs)) for authentication in authentications: if authentication["alias"] == alias: authentication_flow = authentication @@ -1256,7 +1275,7 @@ class KeycloakAPI(object): flow_url = URL_AUTHENTICATION_FLOW.format(url=self.baseurl, realm=realm, id=id) try: - return open_url(flow_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(flow_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not delete authentication flow %s in realm %s: %s' @@ -1279,7 +1298,7 @@ class KeycloakAPI(object): realm=realm, copyfrom=quote(config["copyFrom"])), method='POST', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(new_name), timeout=self.connection_timeout, validate_certs=self.validate_certs) @@ -1288,7 +1307,7 @@ class KeycloakAPI(object): URL_AUTHENTICATION_FLOWS.format(url=self.baseurl, realm=realm), method='GET', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs)) for flow in flow_list: @@ -1318,7 +1337,7 @@ class KeycloakAPI(object): url=self.baseurl, realm=realm), method='POST', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(new_flow), timeout=self.connection_timeout, validate_certs=self.validate_certs) @@ -1328,7 +1347,7 @@ class KeycloakAPI(object): url=self.baseurl, realm=realm), method='GET', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs)) for flow in flow_list: @@ -1353,7 +1372,7 @@ class KeycloakAPI(object): realm=realm, flowalias=quote(flowAlias)), method='PUT', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(updatedExec), timeout=self.connection_timeout, validate_certs=self.validate_certs) @@ -1374,7 +1393,7 @@ class KeycloakAPI(object): realm=realm, id=executionId), method='POST', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(authenticationConfig), timeout=self.connection_timeout, validate_certs=self.validate_certs) @@ -1399,7 +1418,7 @@ class KeycloakAPI(object): realm=realm, flowalias=quote(flowAlias)), method='POST', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(newSubFlow), timeout=self.connection_timeout, validate_certs=self.validate_certs) @@ -1423,7 +1442,7 @@ class KeycloakAPI(object): realm=realm, flowalias=quote(flowAlias)), method='POST', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(newExec), timeout=self.connection_timeout, validate_certs=self.validate_certs) @@ -1447,7 +1466,7 @@ class KeycloakAPI(object): realm=realm, id=executionId), method='POST', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) elif diff < 0: @@ -1458,7 +1477,7 @@ class KeycloakAPI(object): realm=realm, id=executionId), method='POST', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: @@ -1480,7 +1499,7 @@ class KeycloakAPI(object): realm=realm, flowalias=quote(config["alias"])), method='GET', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs)) for execution in executions: @@ -1493,7 +1512,7 @@ class KeycloakAPI(object): realm=realm, id=execConfigId), method='GET', - headers=self.restheaders, + http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs)) execution["authenticationConfig"] = execConfig @@ -1509,7 +1528,7 @@ class KeycloakAPI(object): """ idps_url = URL_IDENTITY_PROVIDERS.format(url=self.baseurl, realm=realm) try: - return json.loads(to_native(open_url(idps_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(idps_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain list of identity providers for realm %s: %s' @@ -1526,7 +1545,7 @@ class KeycloakAPI(object): """ idp_url = URL_IDENTITY_PROVIDER.format(url=self.baseurl, realm=realm, alias=alias) try: - return json.loads(to_native(open_url(idp_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(idp_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: if e.code == 404: @@ -1546,7 +1565,7 @@ class KeycloakAPI(object): """ idps_url = URL_IDENTITY_PROVIDERS.format(url=self.baseurl, realm=realm) try: - return open_url(idps_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(idps_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(idprep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not create identity provider %s in realm %s: %s' @@ -1560,7 +1579,7 @@ class KeycloakAPI(object): """ idp_url = URL_IDENTITY_PROVIDER.format(url=self.baseurl, realm=realm, alias=idprep['alias']) try: - return open_url(idp_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(idp_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(idprep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update identity provider %s in realm %s: %s' @@ -1573,7 +1592,7 @@ class KeycloakAPI(object): """ idp_url = URL_IDENTITY_PROVIDER.format(url=self.baseurl, realm=realm, alias=alias) try: - return open_url(idp_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(idp_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Unable to delete identity provider %s in realm %s: %s' @@ -1587,7 +1606,8 @@ class KeycloakAPI(object): """ mappers_url = URL_IDENTITY_PROVIDER_MAPPERS.format(url=self.baseurl, realm=realm, alias=alias) try: - return json.loads(to_native(open_url(mappers_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(mappers_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain list of identity provider mappers for idp %s in realm %s: %s' @@ -1605,7 +1625,8 @@ class KeycloakAPI(object): """ mapper_url = URL_IDENTITY_PROVIDER_MAPPER.format(url=self.baseurl, realm=realm, alias=alias, id=mid) try: - return json.loads(to_native(open_url(mapper_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(mapper_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: if e.code == 404: @@ -1626,7 +1647,7 @@ class KeycloakAPI(object): """ mappers_url = URL_IDENTITY_PROVIDER_MAPPERS.format(url=self.baseurl, realm=realm, alias=alias) try: - return open_url(mappers_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(mappers_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(mapper), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not create identity provider mapper %s for idp %s in realm %s: %s' @@ -1641,7 +1662,7 @@ class KeycloakAPI(object): """ mapper_url = URL_IDENTITY_PROVIDER_MAPPER.format(url=self.baseurl, realm=realm, alias=alias, id=mapper['id']) try: - return open_url(mapper_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(mapper_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(mapper), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update mapper %s for identity provider %s in realm %s: %s' @@ -1655,7 +1676,7 @@ class KeycloakAPI(object): """ mapper_url = URL_IDENTITY_PROVIDER_MAPPER.format(url=self.baseurl, realm=realm, alias=alias, id=mid) try: - return open_url(mapper_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(mapper_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Unable to delete mapper %s for identity provider %s in realm %s: %s' @@ -1672,7 +1693,7 @@ class KeycloakAPI(object): comps_url += '?%s' % filter try: - return json.loads(to_native(open_url(comps_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(comps_url, method='GET', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except ValueError as e: self.module.fail_json(msg='API returned incorrect JSON when trying to obtain list of components for realm %s: %s' @@ -1689,7 +1710,7 @@ class KeycloakAPI(object): """ comp_url = URL_COMPONENT.format(url=self.baseurl, realm=realm, id=cid) try: - return json.loads(to_native(open_url(comp_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(comp_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except HTTPError as e: if e.code == 404: @@ -1709,13 +1730,13 @@ class KeycloakAPI(object): """ comps_url = URL_COMPONENTS.format(url=self.baseurl, realm=realm) try: - resp = open_url(comps_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + resp = open_url(comps_url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(comprep), validate_certs=self.validate_certs) comp_url = resp.getheader('Location') if comp_url is None: self.module.fail_json(msg='Could not create component in realm %s: %s' % (realm, 'unexpected response')) - return json.loads(to_native(open_url(comp_url, method="GET", headers=self.restheaders, timeout=self.connection_timeout, + return json.loads(to_native(open_url(comp_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg='Could not create component in realm %s: %s' @@ -1732,7 +1753,7 @@ class KeycloakAPI(object): self.module.fail_json(msg='Cannot update component without id') comp_url = URL_COMPONENT.format(url=self.baseurl, realm=realm, id=cid) try: - return open_url(comp_url, method='PUT', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(comp_url, method='PUT', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, data=json.dumps(comprep), validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Could not update component %s in realm %s: %s' @@ -1745,7 +1766,7 @@ class KeycloakAPI(object): """ comp_url = URL_COMPONENT.format(url=self.baseurl, realm=realm, id=cid) try: - return open_url(comp_url, method='DELETE', headers=self.restheaders, timeout=self.connection_timeout, + return open_url(comp_url, method='DELETE', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs) except Exception as e: self.module.fail_json(msg='Unable to delete component %s in realm %s: %s' From e8e6b9bbd7b7f970638a453b7b0b81af13885f42 Mon Sep 17 00:00:00 2001 From: Jonathan Lung Date: Mon, 1 Aug 2022 03:36:07 -0400 Subject: [PATCH 0143/2104] lastpass lookup: use config manager, improve documentation (#5022) * LastPass lookup: use config manager, improve documentation Co-authored-by: Felix Fontein * Update changelogs/fragments/5022-lastpass-lookup-cleanup.yml Co-authored-by: Felix Fontein Co-authored-by: jonathan lung Co-authored-by: Felix Fontein --- .../5022-lastpass-lookup-cleanup.yml | 2 ++ plugins/lookup/lastpass.py | 23 +++++++++++-------- tests/unit/plugins/lookup/test_lastpass.py | 19 +++++++-------- 3 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 changelogs/fragments/5022-lastpass-lookup-cleanup.yml diff --git a/changelogs/fragments/5022-lastpass-lookup-cleanup.yml b/changelogs/fragments/5022-lastpass-lookup-cleanup.yml new file mode 100644 index 0000000000..b9f96d5b9e --- /dev/null +++ b/changelogs/fragments/5022-lastpass-lookup-cleanup.yml @@ -0,0 +1,2 @@ +minor_changes: + - lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). \ No newline at end of file diff --git a/plugins/lookup/lastpass.py b/plugins/lookup/lastpass.py index 920d33176f..d3f04e6c4f 100644 --- a/plugins/lookup/lastpass.py +++ b/plugins/lookup/lastpass.py @@ -11,21 +11,24 @@ DOCUMENTATION = ''' - Andrew Zenk (!UNKNOWN) requirements: - lpass (command line utility) - - must have already logged into lastpass - short_description: fetch data from lastpass + - must have already logged into LastPass + short_description: fetch data from LastPass description: - - use the lpass command line utility to fetch specific fields from lastpass + - Use the lpass command line utility to fetch specific fields from LastPass. options: _terms: - description: key from which you want to retrieve the field - required: True + description: Key from which you want to retrieve the field. + required: true + type: list + elements: str field: - description: field to return from lastpass + description: Field to return from LastPass. default: 'password' + type: str ''' EXAMPLES = """ -- name: get 'custom_field' from lastpass entry 'entry-name' +- name: get 'custom_field' from LastPass entry 'entry-name' ansible.builtin.debug: msg: "{{ lookup('community.general.lastpass', 'entry-name', field='custom_field') }}" """ @@ -88,12 +91,14 @@ class LPass(object): class LookupModule(LookupBase): def run(self, terms, variables=None, **kwargs): + self.set_options(var_options=variables, direct=kwargs) + field = self.get_option('field') + lp = LPass() if not lp.logged_in: - raise AnsibleError("Not logged into lastpass: please run 'lpass login' first") + raise AnsibleError("Not logged into LastPass: please run 'lpass login' first") - field = kwargs.get('field', 'password') values = [] for term in terms: values.append(lp.get_field(term, field)) diff --git a/tests/unit/plugins/lookup/test_lastpass.py b/tests/unit/plugins/lookup/test_lastpass.py index cce693d347..7002d48762 100644 --- a/tests/unit/plugins/lookup/test_lastpass.py +++ b/tests/unit/plugins/lookup/test_lastpass.py @@ -26,6 +26,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.errors import AnsibleError from ansible.module_utils import six +from ansible.plugins.loader import lookup_loader from ansible_collections.community.general.plugins.lookup.lastpass import LookupModule, LPass, LPassException @@ -126,6 +127,9 @@ class LoggedOutMockLPass(MockLPass): class TestLPass(unittest.TestCase): + def setUp(self): + self.lookup = lookup_loader.get('community.general.lastpass') + def test_lastpass_cli_path(self): lp = MockLPass(path='/dev/null') self.assertEqual('/dev/null', lp.cli_path) @@ -158,30 +162,27 @@ class TestLPass(unittest.TestCase): class TestLastpassPlugin(unittest.TestCase): + def setUp(self): + self.lookup = lookup_loader.get('community.general.lastpass') + @patch('ansible_collections.community.general.plugins.lookup.lastpass.LPass', new=MockLPass) def test_lastpass_plugin_normal(self): - lookup_plugin = LookupModule() - for entry in MOCK_ENTRIES: entry_id = entry.get('id') for k, v in six.iteritems(entry): self.assertEqual(v.strip(), - lookup_plugin.run([entry_id], field=k)[0]) + self.lookup.run([entry_id], field=k)[0]) @patch('ansible_collections.community.general.plugins.lookup.lastpass.LPass', LoggedOutMockLPass) def test_lastpass_plugin_logged_out(self): - lookup_plugin = LookupModule() - entry = MOCK_ENTRIES[0] entry_id = entry.get('id') with self.assertRaises(AnsibleError): - lookup_plugin.run([entry_id], field='password') + self.lookup.run([entry_id], field='password') @patch('ansible_collections.community.general.plugins.lookup.lastpass.LPass', DisconnectedMockLPass) def test_lastpass_plugin_disconnected(self): - lookup_plugin = LookupModule() - entry = MOCK_ENTRIES[0] entry_id = entry.get('id') with self.assertRaises(AnsibleError): - lookup_plugin.run([entry_id], field='password') + self.lookup.run([entry_id], field='password') From ab0cd83bb1201c776f67462ff4b5a5d1af677651 Mon Sep 17 00:00:00 2001 From: Jonathan Lung Date: Mon, 1 Aug 2022 04:00:05 -0400 Subject: [PATCH 0144/2104] New lookup plug-in: bitwarden (#5012) * Basic support for Bitwarden lookups Co-authored-by: Felix Fontein Co-authored-by: Sviatoslav Sydorenko * Update plugins/lookup/bitwarden.py Co-authored-by: Felix Fontein * Update plugins/lookup/bitwarden.py Co-authored-by: Felix Fontein * Update plugins/lookup/bitwarden.py Co-authored-by: Felix Fontein Co-authored-by: jonathan lung Co-authored-by: Felix Fontein Co-authored-by: Sviatoslav Sydorenko --- .github/BOTMETA.yml | 2 + plugins/lookup/bitwarden.py | 118 ++++++++++++++ tests/unit/plugins/lookup/test_bitwarden.py | 161 ++++++++++++++++++++ 3 files changed, 281 insertions(+) create mode 100644 plugins/lookup/bitwarden.py create mode 100644 tests/unit/plugins/lookup/test_bitwarden.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 773e334cc7..1061fdae80 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -197,6 +197,8 @@ files: $inventories/virtualbox.py: {} $lookups/: labels: lookups + $lookups/bitwarden.py: + maintainers: lungj $lookups/cartesian.py: {} $lookups/chef_databag.py: {} $lookups/collection_version.py: diff --git a/plugins/lookup/bitwarden.py b/plugins/lookup/bitwarden.py new file mode 100644 index 0000000000..29a5330243 --- /dev/null +++ b/plugins/lookup/bitwarden.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +# (c) 2022, Jonathan Lung +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = """ + name: bitwarden + author: + - Jonathan Lung (@lungj) + requirements: + - bw (command line utility) + - be logged into bitwarden + short_description: Retrieve secrets from Bitwarden + version_added: 5.4.0 + description: + - Retrieve secrets from Bitwarden. + options: + _terms: + description: Key(s) to fetch values for from login info. + required: true + type: list + elements: str + field: + description: Field to fetch; leave unset to fetch whole response. + type: str +""" + +EXAMPLES = """ +- name: "Get 'password' from Bitwarden record named 'a_test'" + ansible.builtin.debug: + msg: >- + {{ lookup('community.general.bitwarden', 'a_test', field='password') }} + +- name: "Get full Bitwarden record named 'a_test'" + ansible.builtin.debug: + msg: >- + {{ lookup('community.general.bitwarden', 'a_test') }} +""" + +RETURN = """ + _raw: + description: List of requested field or JSON object of list of matches. + type: list + elements: raw +""" + +from subprocess import Popen, PIPE + +from ansible.errors import AnsibleError +from ansible.module_utils.common.text.converters import to_bytes, to_text +from ansible.parsing.ajson import AnsibleJSONDecoder +from ansible.plugins.lookup import LookupBase + + +class BitwardenException(AnsibleError): + pass + + +class Bitwarden(object): + + def __init__(self, path='bw'): + self._cli_path = path + + @property + def cli_path(self): + return self._cli_path + + @property + def logged_in(self): + out, err = self._run(['status'], stdin="") + decoded = AnsibleJSONDecoder().raw_decode(out)[0] + return decoded['status'] == 'unlocked' + + def _run(self, args, stdin=None, expected_rc=0): + p = Popen([self.cli_path] + args, stdout=PIPE, stderr=PIPE, stdin=PIPE) + out, err = p.communicate(to_bytes(stdin)) + rc = p.wait() + if rc != expected_rc: + raise BitwardenException(err) + return to_text(out, errors='surrogate_or_strict'), to_text(err, errors='surrogate_or_strict') + + def _get_matches(self, search_value, search_field="name"): + """Return matching records whose search_field is equal to key. + """ + out, err = self._run(['list', 'items', '--search', search_value]) + + # This includes things that matched in different fields. + initial_matches = AnsibleJSONDecoder().raw_decode(out)[0] + + # Filter to only include results from the right field. + return [item for item in initial_matches if item[search_field] == search_value] + + def get_field(self, field, search_value, search_field="name"): + """Return a list of the specified field for records whose search_field match search_value. + + If field is None, return the whole record for each match. + """ + matches = self._get_matches(search_value) + + if field: + return [match['login'][field] for match in matches] + + return matches + + +class LookupModule(LookupBase): + + def run(self, terms, variables=None, **kwargs): + self.set_options(var_options=variables, direct=kwargs) + field = self.get_option('field') + if not _bitwarden.logged_in: + raise AnsibleError("Not logged into Bitwarden. Run 'bw login'.") + + return [_bitwarden.get_field(field, term) for term in terms] + + +_bitwarden = Bitwarden() diff --git a/tests/unit/plugins/lookup/test_bitwarden.py b/tests/unit/plugins/lookup/test_bitwarden.py new file mode 100644 index 0000000000..893cbc06f0 --- /dev/null +++ b/tests/unit/plugins/lookup/test_bitwarden.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +# (c) 2022, Jonathan Lung +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from argparse import ArgumentParser + +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.general.tests.unit.compat.mock import patch + +from ansible.errors import AnsibleError +from ansible.module_utils import six +from ansible.plugins.loader import lookup_loader +from ansible_collections.community.general.plugins.lookup.bitwarden import LookupModule, Bitwarden, BitwardenException + + +MOCK_RECORDS = [ + { + "collectionIds": [], + "deletedDate": None, + "favorite": False, + "fields": [ + { + "linkedId": None, + "name": "a_new_secret", + "type": 1, + "value": "this is a new secret" + }, + { + "linkedId": None, + "name": "not so secret", + "type": 0, + "value": "not secret" + } + ], + "folderId": "3b12a9da-7c49-40b8-ad33-aede017a7ead", + "id": "90992f63-ddb6-4e76-8bfc-aede016ca5eb", + "login": { + "password": "passwordA3", + "passwordRevisionDate": "2022-07-26T23:03:23.399Z", + "totp": None, + "username": "userA" + }, + "name": "a_test", + "notes": None, + "object": "item", + "organizationId": None, + "passwordHistory": [ + { + "lastUsedDate": "2022-07-26T23:03:23.405Z", + "password": "a_new_secret: this is secret" + }, + { + "lastUsedDate": "2022-07-26T23:03:23.399Z", + "password": "passwordA2" + }, + { + "lastUsedDate": "2022-07-26T22:59:52.885Z", + "password": "passwordA" + } + ], + "reprompt": 0, + "revisionDate": "2022-07-26T23:03:23.743Z", + "type": 1 + }, + { + "collectionIds": [], + "deletedDate": None, + "favorite": False, + "folderId": None, + "id": "5ebd4d31-104c-49fc-a09c-aedf003d28ad", + "login": { + "password": "b", + "passwordRevisionDate": None, + "totp": None, + "username": "a" + }, + "name": "dupe_name", + "notes": None, + "object": "item", + "organizationId": None, + "reprompt": 0, + "revisionDate": "2022-07-27T03:42:40.353Z", + "type": 1 + }, + { + "collectionIds": [], + "deletedDate": None, + "favorite": False, + "folderId": None, + "id": "90657653-6695-496d-9431-aedf003d3015", + "login": { + "password": "d", + "passwordRevisionDate": None, + "totp": None, + "username": "c" + }, + "name": "dupe_name", + "notes": None, + "object": "item", + "organizationId": None, + "reprompt": 0, + "revisionDate": "2022-07-27T03:42:46.673Z", + "type": 1 + } +] + + +class MockBitwarden(Bitwarden): + + logged_in = True + + def _get_matches(self, search_value, search_field="name"): + return list(filter(lambda record: record[search_field] == search_value, MOCK_RECORDS)) + + +class LoggedOutMockBitwarden(MockBitwarden): + + logged_in = False + + +class TestLookupModule(unittest.TestCase): + + def setUp(self): + self.lookup = lookup_loader.get('community.general.bitwarden') + + @patch('ansible_collections.community.general.plugins.lookup.bitwarden._bitwarden', new=MockBitwarden()) + def test_bitwarden_plugin_no_match(self): + # Entry 0, "a_test" of the test input should have no duplicates. + self.assertEqual([], self.lookup.run(['not_here'], field='password')[0]) + + @patch('ansible_collections.community.general.plugins.lookup.bitwarden._bitwarden', new=MockBitwarden()) + def test_bitwarden_plugin_fields(self): + # Entry 0, "a_test" of the test input should have no duplicates. + record = MOCK_RECORDS[0] + record_name = record['name'] + for k, v in six.iteritems(record['login']): + self.assertEqual([v], + self.lookup.run([record_name], field=k)[0]) + + @patch('ansible_collections.community.general.plugins.lookup.bitwarden._bitwarden', new=MockBitwarden()) + def test_bitwarden_plugin_duplicates(self): + # There are two records with name dupe_name; we need to be order-insensitive with + # checking what was retrieved. + self.assertEqual(set(['b', 'd']), + set(self.lookup.run(['dupe_name'], field='password')[0])) + + @patch('ansible_collections.community.general.plugins.lookup.bitwarden._bitwarden', new=MockBitwarden()) + def test_bitwarden_plugin_full_item(self): + # Try to retrieve the full record of the first entry where the name is "a_name". + self.assertEqual([MOCK_RECORDS[0]], + self.lookup.run(['a_test'])[0]) + + @patch('ansible_collections.community.general.plugins.lookup.bitwarden._bitwarden', LoggedOutMockBitwarden()) + def test_bitwarden_plugin_logged_out(self): + record = MOCK_RECORDS[0] + record_name = record['name'] + with self.assertRaises(AnsibleError): + self.lookup.run([record_name], field='password') From 5933d28dc43a7e5279ca119dd33d4d695c5cc612 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 1 Aug 2022 21:21:06 +1200 Subject: [PATCH 0145/2104] xfconf: add command output to results (#5037) * xfconf: add command output to results * add changelog fragment * add docs for return value cmd * Update plugins/modules/system/xfconf.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/5037-xfconf-add-cmd-output.yaml | 2 ++ plugins/modules/system/xfconf.py | 28 +++++++++++++++++++ .../plugins/modules/system/test_xfconf.py | 7 ++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5037-xfconf-add-cmd-output.yaml diff --git a/changelogs/fragments/5037-xfconf-add-cmd-output.yaml b/changelogs/fragments/5037-xfconf-add-cmd-output.yaml new file mode 100644 index 0000000000..f32926c711 --- /dev/null +++ b/changelogs/fragments/5037-xfconf-add-cmd-output.yaml @@ -0,0 +1,2 @@ +minor_changes: + - xfconf - add ``stdout``, ``stderr`` and ``cmd`` to the module results (https://github.com/ansible-collections/community.general/pull/5037). diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index 3698a76b99..eba7644409 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -143,6 +143,24 @@ RETURN = ''' returned: success type: any sample: '"96" or ["red", "blue", "green"]' + cmd: + description: + - A list with the resulting C(xfconf-query) command executed by the module. + returned: success + type: list + elements: str + version_added: 5.4.0 + sample: + - /usr/bin/xfconf-query + - --channel + - xfce4-panel + - --property + - /plugins/plugin-19/timezone + - --create + - --type + - string + - --set + - Pacific/Auckland ''' from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper @@ -211,6 +229,11 @@ class XFConfProperty(StateModuleHelper): def state_absent(self): with self.runner('channel property reset', check_mode_skip=True) as ctx: ctx.run(reset=True) + self.vars.stdout = ctx.results_out + self.vars.stderr = ctx.results_err + self.vars.cmd = ctx.cmd + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info self.vars.value = None def state_present(self): @@ -237,6 +260,11 @@ class XFConfProperty(StateModuleHelper): with self.runner('channel property create force_array values_and_types', check_mode_skip=True) as ctx: ctx.run(create=True, force_array=self.vars.is_array, values_and_types=(self.vars.value, value_type)) + self.vars.stdout = ctx.results_out + self.vars.stderr = ctx.results_err + self.vars.cmd = ctx.cmd + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info if not self.vars.is_array: self.vars.value = self.vars.value[0] diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/system/test_xfconf.py index 7743d07cd4..d97ce85e49 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/system/test_xfconf.py @@ -268,7 +268,7 @@ def test_xfconf(mocker, capfd, patch_xfconf, testcase): # Mock function used for running commands first call_results = [item[2] for item in testcase['run_command.calls']] mock_run_command = mocker.patch( - 'ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.run_command', + 'ansible.module_utils.basic.AnsibleModule.run_command', side_effect=call_results) # Try to run test case @@ -296,6 +296,11 @@ def test_xfconf(mocker, capfd, patch_xfconf, testcase): print("expected args list =\n%s" % expected_call_args_list) assert call_args_list == expected_call_args_list + expected_cmd, dummy, expected_res = testcase['run_command.calls'][-1] + assert results['cmd'] == expected_cmd + assert results['stdout'] == expected_res[1] + assert results['stderr'] == expected_res[2] + for conditional_test_result in ('msg', 'value', 'previous_value'): if conditional_test_result in testcase: assert conditional_test_result in results, "'{0}' not found in {1}".format(conditional_test_result, results) From b5eae69e367fb204cc8c96074243ca1650fa9a2c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 1 Aug 2022 23:08:10 +0200 Subject: [PATCH 0146/2104] Set CARGO_NET_GIT_FETCH_WITH_CLI=true for cargo on Alpine. (#5053) --- tests/integration/targets/cargo/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration/targets/cargo/tasks/main.yml b/tests/integration/targets/cargo/tasks/main.yml index e8a11ea9f3..bc43380e81 100644 --- a/tests/integration/targets/cargo/tasks/main.yml +++ b/tests/integration/targets/cargo/tasks/main.yml @@ -1,5 +1,15 @@ - import_tasks: setup.yml +- name: Set default environment + set_fact: + cargo_environment: {} +- name: Set special environment to work around cargo bugs + set_fact: + cargo_environment: + # See https://github.com/rust-lang/cargo/issues/10230#issuecomment-1201662729: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + when: has_cargo | default(false) and ansible_distribution == 'Alpine' - block: - import_tasks: test_general.yml - import_tasks: test_version.yml + environment: "{{ cargo_environment }}" when: has_cargo | default(false) From 4eb3540c8e98137d15efb07763ebbf3f47b3b2fc Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 2 Aug 2022 01:54:58 -0600 Subject: [PATCH 0147/2104] WDC Redfish firmware update support for update image creds (#5056) Allows user to specify Basic Auth credentials for firmware update image. --- plugins/module_utils/wdc_redfish_utils.py | 32 +++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/plugins/module_utils/wdc_redfish_utils.py b/plugins/module_utils/wdc_redfish_utils.py index a51cda5bed..f2d3353291 100644 --- a/plugins/module_utils/wdc_redfish_utils.py +++ b/plugins/module_utils/wdc_redfish_utils.py @@ -58,6 +58,7 @@ class WdcRedfishUtils(RedfishUtils): response = self.get_request(uri) if response['ret']: self.root_uri = root_uri + break def _find_updateservice_resource(self): """Find the update service resource as well as additional WDC-specific resources.""" @@ -157,8 +158,7 @@ class WdcRedfishUtils(RedfishUtils): 'msg': "FWActivate requested"} def _get_bundle_version(self, - bundle_uri, - update_creds): + bundle_uri): """Get the firmware version from a bundle file, and whether or not it is multi-tenant. Only supports HTTP at this time. Assumes URI exists and is a tarfile. @@ -169,20 +169,12 @@ class WdcRedfishUtils(RedfishUtils): and checks the appropriate byte in the file. :param str bundle_uri: HTTP URI of the firmware bundle. - :param dict or None update_creds: Dict containing username and password to access the bundle. :return: Firmware version number contained in the bundle, and whether or not the bundle is multi-tenant. Either value will be None if unable to deterine. :rtype: str or None, bool or None """ - parsed_url = urlparse(bundle_uri) - if update_creds: - original_netloc = parsed_url.netloc - parsed_url._replace(netloc="{0}:{1}{2}".format(update_creds.get("username"), - update_creds.get("password"), - original_netloc)) - bundle_temp_filename = fetch_file(module=self.module, - url=urlunparse(parsed_url)) + url=bundle_uri) if not tarfile.is_tarfile(bundle_temp_filename): return None, None tf = tarfile.open(bundle_temp_filename) @@ -223,8 +215,21 @@ class WdcRedfishUtils(RedfishUtils): Performs retries, handles timeouts as needed. """ + # Convert credentials to standard HTTP format + if update_opts.get("update_creds") is not None and "username" in update_opts["update_creds"] and "password" in update_opts["update_creds"]: + update_creds = update_opts["update_creds"] + parsed_url = urlparse(update_opts["update_image_uri"]) + if update_creds: + original_netloc = parsed_url.netloc + parsed_url = parsed_url._replace(netloc="{0}:{1}@{2}".format(update_creds.get("username"), + update_creds.get("password"), + original_netloc)) + update_opts["update_image_uri"] = urlunparse(parsed_url) + del update_opts["update_creds"] + # Make sure bundle URI is HTTP(s) bundle_uri = update_opts["update_image_uri"] + if not self.uri_is_http(bundle_uri): return { 'ret': False, @@ -250,9 +255,7 @@ class WdcRedfishUtils(RedfishUtils): # Check the FW version in the bundle file, and compare it to what is already on the IOMs # Bundle version number - update_creds = update_opts.get("update_creds") - bundle_firmware_version, is_bundle_multi_tenant = self._get_bundle_version(bundle_uri, - update_creds) + bundle_firmware_version, is_bundle_multi_tenant = self._get_bundle_version(bundle_uri) if bundle_firmware_version is None or is_bundle_multi_tenant is None: return { 'ret': False, @@ -313,6 +316,7 @@ class WdcRedfishUtils(RedfishUtils): if retry_number != 0: time.sleep(retry_interval_seconds) retry_number += 1 + result = self.simple_update(update_opts) if result['ret'] is not True: # Sometimes a timeout error is returned even though the update actually was requested. From f67473024d8b6708d6205978cd26353bc1b6033f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 4 Aug 2022 20:22:16 +0200 Subject: [PATCH 0148/2104] Fix docs. (#5063) --- .../modules/cloud/atomic/atomic_container.py | 2 +- plugins/modules/cloud/atomic/atomic_image.py | 2 +- plugins/modules/cloud/linode/linode.py | 2 +- plugins/modules/cloud/lxd/lxd_container.py | 2 +- plugins/modules/cloud/lxd/lxd_profile.py | 2 +- plugins/modules/cloud/misc/rhevm.py | 4 +-- .../cloud/oneandone/oneandone_server.py | 3 +- .../modules/cloud/opennebula/one_service.py | 5 ++-- plugins/modules/cloud/packet/packet_device.py | 15 +++++++--- .../modules/clustering/consul/consul_acl.py | 2 +- .../modules/net_tools/infinity/infinity.py | 15 +++++++--- plugins/modules/net_tools/ldap/ldap_attrs.py | 3 +- plugins/modules/net_tools/ldap/ldap_passwd.py | 3 +- .../remote_management/hpilo/hpilo_info.py | 2 +- .../redfish/wdc_redfish_info.py | 18 +++--------- .../github/github_webhook_info.py | 21 ++++++++------ .../gitlab/gitlab_group_variable.py | 8 +++--- .../gitlab/gitlab_project_variable.py | 8 +++--- plugins/modules/system/dpkg_divert.py | 16 +++-------- plugins/modules/system/nosh.py | 4 +-- plugins/modules/system/pamd.py | 28 ------------------- .../sophos_utm/utm_proxy_location.py | 3 +- 22 files changed, 72 insertions(+), 96 deletions(-) diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index a6be44317b..b7e222842e 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -88,7 +88,7 @@ msg: description: The command standard output returned: always type: str - sample: [u'Using default tag: latest ...'] + sample: 'Using default tag: latest ...' ''' # import module snippets diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/cloud/atomic/atomic_image.py index 350ad4c2ae..de1b511e18 100644 --- a/plugins/modules/cloud/atomic/atomic_image.py +++ b/plugins/modules/cloud/atomic/atomic_image.py @@ -64,7 +64,7 @@ msg: description: The command standard output returned: always type: str - sample: [u'Using default tag: latest ...'] + sample: 'Using default tag: latest ...' ''' import traceback diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index 8c29e52a21..761e283e32 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -152,7 +152,7 @@ options: description: - Set status of Lassie watchdog. type: bool - default: "True" + default: true requirements: - python >= 2.6 - linode-python diff --git a/plugins/modules/cloud/lxd/lxd_container.py b/plugins/modules/cloud/lxd/lxd_container.py index a9503b657d..1dcb1dee13 100644 --- a/plugins/modules/cloud/lxd/lxd_container.py +++ b/plugins/modules/cloud/lxd/lxd_container.py @@ -393,7 +393,7 @@ actions: description: List of actions performed for the instance. returned: success type: list - sample: '["create", "start"]' + sample: ["create", "start"] ''' import datetime import os diff --git a/plugins/modules/cloud/lxd/lxd_profile.py b/plugins/modules/cloud/lxd/lxd_profile.py index f86f333a37..9f3e2ab81c 100644 --- a/plugins/modules/cloud/lxd/lxd_profile.py +++ b/plugins/modules/cloud/lxd/lxd_profile.py @@ -222,7 +222,7 @@ actions: description: List of actions performed for the profile. returned: success type: list - sample: '["create"]' + sample: ["create"] ''' import os diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 77b40248b3..1fbfceb370 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -148,7 +148,7 @@ vm: description: Returns all of the VMs variables and execution. returned: always type: dict - sample: '{ + sample: { "boot_order": [ "hd", "network" @@ -206,7 +206,7 @@ vm: "vmcpu": "4", "vmhost": "host416", "vmmem": "16" - }' + } ''' EXAMPLES = r''' diff --git a/plugins/modules/cloud/oneandone/oneandone_server.py b/plugins/modules/cloud/oneandone/oneandone_server.py index aa651bd75f..375a55a813 100644 --- a/plugins/modules/cloud/oneandone/oneandone_server.py +++ b/plugins/modules/cloud/oneandone/oneandone_server.py @@ -212,7 +212,8 @@ RETURN = ''' servers: description: Information about each server that was processed type: list - sample: '[{"hostname": "my-server", "id": "server-id"}]' + sample: + - {"hostname": "my-server", "id": "server-id"} returned: always ''' diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index 68f8398f36..c6de47a50b 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -234,8 +234,9 @@ roles: description: list of dictionaries of roles, each role is described by name, cardinality, state and nodes ids type: list returned: success - sample: '[{"cardinality": 1,"name": "foo","state": "RUNNING","ids": [ 123, 456 ]}, - {"cardinality": 2,"name": "bar","state": "RUNNING", "ids": [ 452, 567, 746 ]}]' + sample: + - {"cardinality": 1,"name": "foo","state": "RUNNING", "ids": [ 123, 456 ]} + - {"cardinality": 2,"name": "bar","state": "RUNNING", "ids": [ 452, 567, 746 ]} ''' import os diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index abafa51870..a5970c12d7 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -261,10 +261,17 @@ changed: devices: description: Information about each device that was processed type: list - sample: '[{"hostname": "my-server.com", "id": "2a5122b9-c323-4d5c-b53c-9ad3f54273e7", - "public_ipv4": "147.229.15.12", "private-ipv4": "10.0.15.12", - "tags": [], "locked": false, "state": "provisioning", - "public_ipv6": ""2604:1380:2:5200::3"}]' + sample: + - { + "hostname": "my-server.com", + "id": "2a5122b9-c323-4d5c-b53c-9ad3f54273e7", + "public_ipv4": "147.229.15.12", + "private-ipv4": "10.0.15.12", + "tags": [], + "locked": false, + "state": "provisioning", + "public_ipv6": "2604:1380:2:5200::3" + } returned: success ''' # NOQA diff --git a/plugins/modules/clustering/consul/consul_acl.py b/plugins/modules/clustering/consul/consul_acl.py index 1e01e58af5..b9dff55d2e 100644 --- a/plugins/modules/clustering/consul/consul_acl.py +++ b/plugins/modules/clustering/consul/consul_acl.py @@ -149,7 +149,7 @@ rules: description: the HCL JSON representation of the rules associated to the ACL, in the format described in the Consul documentation (https://www.consul.io/docs/guides/acl.html#rule-specification). returned: I(status) == "present" - type: str + type: dict sample: { "key": { "foo": { diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/net_tools/infinity/infinity.py index bd12f85af2..950dd228d2 100644 --- a/plugins/modules/net_tools/infinity/infinity.py +++ b/plugins/modules/net_tools/infinity/infinity.py @@ -116,10 +116,17 @@ network_info: description: when reserving a LAN network from a Infinity supernet by providing network_size, the information about the reserved network is returned. returned: success type: str - sample: {"network_address": "192.168.10.32/28","network_family": "4", "network_id": 3102, - "network_size": null,"description": null,"network_location": "3085", - "ranges": { "id": 0, "name": null,"first_ip": null,"type": null,"last_ip": null}, - "network_type": "lan","network_name": "'reserve_new_ansible_network'"} + sample: { + "network_address": "192.168.10.32/28", + "network_family": "4", + "network_id": 3102, + "network_size": null, + "description": null, + "network_location": "3085", + "ranges": { "id": 0, "name": null,"first_ip": null,"type": null,"last_ip": null}, + "network_type": "lan", + "network_name": "'reserve_new_ansible_network'" + } ''' diff --git a/plugins/modules/net_tools/ldap/ldap_attrs.py b/plugins/modules/net_tools/ldap/ldap_attrs.py index c357a83087..fc3b44d36c 100644 --- a/plugins/modules/net_tools/ldap/ldap_attrs.py +++ b/plugins/modules/net_tools/ldap/ldap_attrs.py @@ -160,7 +160,8 @@ modlist: description: list of modified parameters returned: success type: list - sample: '[[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]]' + sample: + - [2, "olcRootDN", ["cn=root,dc=example,dc=com"]] ''' import traceback diff --git a/plugins/modules/net_tools/ldap/ldap_passwd.py b/plugins/modules/net_tools/ldap/ldap_passwd.py index 8d86ee93fc..4cb58b4ebf 100644 --- a/plugins/modules/net_tools/ldap/ldap_passwd.py +++ b/plugins/modules/net_tools/ldap/ldap_passwd.py @@ -58,7 +58,8 @@ modlist: description: list of modified parameters returned: success type: list - sample: '[[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]]' + sample: + - [2, "olcRootDN", ["cn=root,dc=example,dc=com"]] """ import traceback diff --git a/plugins/modules/remote_management/hpilo/hpilo_info.py b/plugins/modules/remote_management/hpilo/hpilo_info.py index b0cc0be940..fb72e32f36 100644 --- a/plugins/modules/remote_management/hpilo/hpilo_info.py +++ b/plugins/modules/remote_management/hpilo/hpilo_info.py @@ -124,7 +124,7 @@ host_power_status: - Will be one of C(ON), C(OFF) and C(UNKNOWN). returned: always type: str - sample: ON + sample: "ON" version_added: 3.5.0 ''' diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_info.py b/plugins/modules/remote_management/redfish/wdc_redfish_info.py index b3596f6ac0..fc223cb5f0 100644 --- a/plugins/modules/remote_management/redfish/wdc_redfish_info.py +++ b/plugins/modules/remote_management/redfish/wdc_redfish_info.py @@ -96,32 +96,22 @@ Description: description: Firmware update status description. returned: always type: str - sample: - - Ready for FW update - - FW update in progress - - FW update completed. Waiting for activation. + sample: Ready for FW update ErrorCode: description: Numeric error code for firmware update status. Non-zero indicates an error condition. returned: always type: int - sample: - - 0 + sample: 0 EstimatedRemainingMinutes: description: Estimated number of minutes remaining in firmware update operation. returned: always type: int - sample: - - 0 - - 20 + sample: 20 StatusCode: description: Firmware update status code. returned: always type: int - sample: - - 0 (Ready for FW update) - - 1 (FW update in progress) - - 2 (FW update completed. Waiting for activation.) - - 3 (FW update failed.) + sample: 2 ''' from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/source_control/github/github_webhook_info.py b/plugins/modules/source_control/github/github_webhook_info.py index 98a7516e75..87fcd33634 100644 --- a/plugins/modules/source_control/github/github_webhook_info.py +++ b/plugins/modules/source_control/github/github_webhook_info.py @@ -73,15 +73,18 @@ hooks: description: A list of hooks that exist for the repo returned: always type: list - sample: > - [{"has_shared_secret": true, - "url": "https://jenkins.example.com/ghprbhook/", - "events": ["issue_comment", "pull_request"], - "insecure_ssl": "1", - "content_type": "json", - "active": true, - "id": 6206, - "last_response": {"status": "active", "message": "OK", "code": 200}}] + elements: dict + sample: + - { + "has_shared_secret": true, + "url": "https://jenkins.example.com/ghprbhook/", + "events": ["issue_comment", "pull_request"], + "insecure_ssl": "1", + "content_type": "json", + "active": true, + "id": 6206, + "last_response": {"status": "active", "message": "OK", "code": 200} + } ''' import traceback diff --git a/plugins/modules/source_control/gitlab/gitlab_group_variable.py b/plugins/modules/source_control/gitlab/gitlab_group_variable.py index 9be3a3ab39..faf8b8a6f5 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_variable.py @@ -140,22 +140,22 @@ group_variable: description: A list of variables which were created. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] untouched: description: A list of variables which exist. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] removed: description: A list of variables which were deleted. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] updated: description: A list of variables whose values were changed. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] ''' import traceback diff --git a/plugins/modules/source_control/gitlab/gitlab_project_variable.py b/plugins/modules/source_control/gitlab/gitlab_project_variable.py index f9b8d7b6e1..93dbc5446a 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_variable.py @@ -155,22 +155,22 @@ project_variable: description: A list of variables which were created. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] untouched: description: A list of variables which exist. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] removed: description: A list of variables which were deleted. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] updated: description: A list of variables whose values were changed. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] ''' import traceback diff --git a/plugins/modules/system/dpkg_divert.py b/plugins/modules/system/dpkg_divert.py index 709d35b865..f44a5a26f2 100644 --- a/plugins/modules/system/dpkg_divert.py +++ b/plugins/modules/system/dpkg_divert.py @@ -114,21 +114,13 @@ commands: type: list returned: on_success elements: str - sample: |- - [ - "/usr/bin/dpkg-divert --no-rename --remove /etc/foobarrc", - "/usr/bin/dpkg-divert --package ansible --no-rename --add /etc/foobarrc" - ] + sample: "/usr/bin/dpkg-divert --no-rename --remove /etc/foobarrc" messages: description: The dpkg-divert relevant messages (stdout or stderr). type: list returned: on_success elements: str - sample: |- - [ - "Removing 'local diversion of /etc/foobarrc to /etc/foobarrc.distrib'", - "Adding 'diversion of /etc/foobarrc to /etc/foobarrc.distrib by ansible'" - ] + sample: "Removing 'local diversion of /etc/foobarrc to /etc/foobarrc.distrib'" diversion: description: The status of the diversion after task execution. type: dict @@ -146,11 +138,11 @@ diversion: state: description: The state of the diversion. type: str - sample: |- + sample: { "divert": "/etc/foobarrc.distrib", "holder": "LOCAL", - "path": "/etc/foobarrc" + "path": "/etc/foobarrc", "state": "present" } ''' diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index dbaf7ea59f..634e323111 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -147,7 +147,7 @@ status: description: [] # FIXME returned: success type: list - sample: '[]' + sample: [] DaemontoolsEncoreState: description: [] # FIXME returned: success @@ -192,7 +192,7 @@ status: description: [] # FIXME returned: success type: list - sample: '[]' + sample: [] RestartExitStatusCode: description: [] # FIXME returned: success diff --git a/plugins/modules/system/pamd.py b/plugins/modules/system/pamd.py index dda504974d..4a58da74f7 100644 --- a/plugins/modules/system/pamd.py +++ b/plugins/modules/system/pamd.py @@ -226,34 +226,6 @@ change_count: type: int sample: 1 returned: success -new_rule: - description: The changes to the rule. This was available in Ansible 2.4 and Ansible 2.5. It was removed in Ansible 2.6. - type: str - sample: None None None sha512 shadow try_first_pass use_authtok - returned: success -updated_rule_(n): - description: The rule(s) that was/were changed. This is only available in - Ansible 2.4 and was removed in Ansible 2.5. - type: str - sample: - - password sufficient pam_unix.so sha512 shadow try_first_pass - use_authtok - returned: success -action: - description: - - "That action that was taken and is one of: update_rule, - insert_before_rule, insert_after_rule, args_present, args_absent, - absent. This was available in Ansible 2.4 and removed in Ansible 2.8" - returned: always - type: str - sample: "update_rule" -dest: - description: - - "Path to pam.d service that was changed. This is only available in - Ansible 2.3 and was removed in Ansible 2.4." - returned: success - type: str - sample: "/etc/pam.d/system-auth" backupdest: description: - "The file name of the backup file, if created." diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 4c0abb0608..2944a6bd57 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -41,7 +41,8 @@ options: - A list of allowed networks type: list elements: str - default: REF_NetworkAny + default: + - REF_NetworkAny auth_profile: type: str description: From 123c7efe5e98a22e9493461347e30bf76e686268 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 5 Aug 2022 12:28:29 +0200 Subject: [PATCH 0149/2104] Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065) * Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt. * Replace 'Copyright:' with 'Copyright' sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:') Co-authored-by: Maxwell G --- simplified_bsd.txt => LICENSES/BSD-2-Clause.txt | 0 LICENSES/GPL-3.0-or-later.txt | 1 + LICENSES/MIT.txt | 9 +++++++++ PSF-license.txt => LICENSES/PSF-2.0.txt | 0 changelogs/fragments/licenses.yml | 3 +++ plugins/action/system/iptables_state.py | 5 +++-- plugins/action/system/shutdown.py | 9 +++++---- plugins/become/doas.py | 5 +++-- plugins/become/dzdo.py | 4 +++- plugins/become/ksu.py | 5 +++-- plugins/become/machinectl.py | 5 +++-- plugins/become/pbrun.py | 5 +++-- plugins/become/pfexec.py | 5 +++-- plugins/become/pmrun.py | 5 +++-- plugins/become/sesu.py | 5 +++-- plugins/become/sudosu.py | 5 +++-- plugins/cache/memcached.py | 3 ++- plugins/cache/pickle.py | 3 ++- plugins/cache/redis.py | 3 ++- plugins/cache/yaml.py | 3 ++- plugins/callback/cgroup_memory_recap.py | 3 ++- plugins/callback/context_demo.py | 3 ++- plugins/callback/counter_enabled.py | 3 ++- plugins/callback/dense.py | 3 ++- plugins/callback/diy.py | 5 +++-- plugins/callback/elastic.py | 3 ++- plugins/callback/hipchat.py | 3 ++- plugins/callback/jabber.py | 3 ++- plugins/callback/log_plays.py | 3 ++- plugins/callback/loganalytics.py | 3 ++- plugins/callback/logdna.py | 3 ++- plugins/callback/logentries.py | 3 ++- plugins/callback/logstash.py | 3 ++- plugins/callback/mail.py | 5 +++-- plugins/callback/nrdp.py | 3 ++- plugins/callback/null.py | 3 ++- plugins/callback/opentelemetry.py | 3 ++- plugins/callback/say.py | 3 ++- plugins/callback/selective.py | 3 ++- plugins/callback/slack.py | 3 ++- plugins/callback/syslog_json.py | 3 ++- plugins/callback/unixy.py | 7 ++++--- plugins/callback/yaml.py | 3 ++- plugins/connection/chroot.py | 3 ++- plugins/connection/funcd.py | 3 ++- plugins/connection/iocage.py | 3 ++- plugins/connection/jail.py | 3 ++- plugins/connection/lxc.py | 3 ++- plugins/connection/lxd.py | 3 ++- plugins/connection/qubes.py | 3 ++- plugins/connection/saltstack.py | 3 ++- plugins/connection/zone.py | 3 ++- plugins/doc_fragments/alicloud.py | 3 ++- plugins/doc_fragments/auth_basic.py | 3 ++- plugins/doc_fragments/bitbucket.py | 5 +++-- plugins/doc_fragments/dimensiondata.py | 5 +++-- plugins/doc_fragments/dimensiondata_wait.py | 5 +++-- plugins/doc_fragments/emc.py | 5 +++-- plugins/doc_fragments/gitlab.py | 3 ++- plugins/doc_fragments/hpe3par.py | 6 +++--- plugins/doc_fragments/hwc.py | 6 +++--- plugins/doc_fragments/ibm_storage.py | 5 +++-- plugins/doc_fragments/influxdb.py | 7 ++++--- plugins/doc_fragments/ipa.py | 7 ++++--- plugins/doc_fragments/keycloak.py | 5 +++-- plugins/doc_fragments/ldap.py | 9 +++++---- plugins/doc_fragments/lxca_common.py | 3 ++- plugins/doc_fragments/manageiq.py | 5 +++-- plugins/doc_fragments/nomad.py | 5 +++-- plugins/doc_fragments/oneview.py | 5 +++-- plugins/doc_fragments/online.py | 3 ++- plugins/doc_fragments/opennebula.py | 5 +++-- plugins/doc_fragments/openswitch.py | 5 +++-- plugins/doc_fragments/oracle.py | 3 ++- plugins/doc_fragments/oracle_creatable_resource.py | 3 ++- plugins/doc_fragments/oracle_display_name_option.py | 3 ++- plugins/doc_fragments/oracle_name_option.py | 3 ++- plugins/doc_fragments/oracle_tags.py | 3 ++- plugins/doc_fragments/oracle_wait_options.py | 3 ++- plugins/doc_fragments/pritunl.py | 5 +++-- plugins/doc_fragments/proxmox.py | 3 ++- plugins/doc_fragments/purestorage.py | 5 +++-- plugins/doc_fragments/rackspace.py | 5 +++-- plugins/doc_fragments/redis.py | 5 +++-- plugins/doc_fragments/rundeck.py | 5 +++-- plugins/doc_fragments/scaleway.py | 5 +++-- plugins/doc_fragments/utm.py | 5 +++-- plugins/doc_fragments/vexata.py | 5 +++-- plugins/doc_fragments/xenserver.py | 5 +++-- plugins/filter/counter.py | 3 ++- plugins/filter/dict.py | 5 +++-- plugins/filter/dict_kv.py | 3 ++- plugins/filter/from_csv.py | 7 ++++--- plugins/filter/groupby_as_dict.py | 3 ++- plugins/filter/hashids.py | 5 +++-- plugins/filter/lists_mergeby.py | 3 ++- plugins/filter/time.py | 3 ++- plugins/filter/unicode_normalize.py | 5 +++-- plugins/filter/version_sort.py | 3 ++- plugins/inventory/cobbler.py | 3 ++- plugins/inventory/gitlab_runners.py | 3 ++- plugins/inventory/icinga2.py | 3 ++- plugins/inventory/linode.py | 3 ++- plugins/inventory/lxd.py | 5 +++-- plugins/inventory/nmap.py | 3 ++- plugins/inventory/online.py | 3 ++- plugins/inventory/opennebula.py | 3 ++- plugins/inventory/proxmox.py | 3 ++- plugins/inventory/scaleway.py | 5 +++-- plugins/inventory/stackpath_compute.py | 4 ++-- plugins/inventory/virtualbox.py | 3 ++- plugins/inventory/xen_orchestra.py | 3 ++- plugins/lookup/bitwarden.py | 3 ++- plugins/lookup/cartesian.py | 3 ++- plugins/lookup/chef_databag.py | 3 ++- plugins/lookup/collection_version.py | 3 ++- plugins/lookup/consul_kv.py | 3 ++- plugins/lookup/credstash.py | 3 ++- plugins/lookup/cyberarkpassword.py | 3 ++- plugins/lookup/dependent.py | 3 ++- plugins/lookup/dig.py | 3 ++- plugins/lookup/dnstxt.py | 3 ++- plugins/lookup/dsv.py | 5 +++-- plugins/lookup/etcd3.py | 3 ++- plugins/lookup/filetree.py | 3 ++- plugins/lookup/flattened.py | 3 ++- plugins/lookup/hiera.py | 3 ++- plugins/lookup/keyring.py | 3 ++- plugins/lookup/lastpass.py | 3 ++- plugins/lookup/lmdb_kv.py | 3 ++- plugins/lookup/manifold.py | 3 ++- plugins/lookup/onepassword.py | 9 +++++---- plugins/lookup/onepassword_raw.py | 9 +++++---- plugins/lookup/passwordstore.py | 3 ++- plugins/lookup/random_pet.py | 7 ++++--- plugins/lookup/random_string.py | 7 ++++--- plugins/lookup/random_words.py | 3 ++- plugins/lookup/redis.py | 3 ++- plugins/lookup/revbitspss.py | 6 +++--- plugins/lookup/shelvefile.py | 3 ++- plugins/lookup/tss.py | 5 +++-- plugins/module_utils/_mount.py | 2 +- plugins/module_utils/alicloud_ecs.py | 3 ++- plugins/module_utils/cloud.py | 3 ++- plugins/module_utils/cmd_runner.py | 3 ++- plugins/module_utils/csv.py | 7 ++++--- plugins/module_utils/database.py | 3 ++- plugins/module_utils/dimensiondata.py | 3 ++- plugins/module_utils/gandi_livedns_api.py | 5 +++-- plugins/module_utils/gconftool2.py | 3 ++- plugins/module_utils/gitlab.py | 7 ++++--- plugins/module_utils/heroku.py | 5 +++-- plugins/module_utils/hwc_utils.py | 4 ++-- plugins/module_utils/ibm_sa_utils.py | 3 ++- plugins/module_utils/ilo_redfish_utils.py | 3 ++- plugins/module_utils/influxdb.py | 5 +++-- plugins/module_utils/ipa.py | 3 ++- plugins/module_utils/known_hosts.py | 3 ++- plugins/module_utils/ldap.py | 9 +++++---- plugins/module_utils/linode.py | 3 ++- plugins/module_utils/lxd.py | 3 ++- plugins/module_utils/manageiq.py | 3 ++- plugins/module_utils/memset.py | 3 ++- plugins/module_utils/mh/base.py | 5 +++-- plugins/module_utils/mh/deco.py | 5 +++-- plugins/module_utils/mh/exceptions.py | 5 +++-- plugins/module_utils/mh/mixins/cmd.py | 5 +++-- plugins/module_utils/mh/mixins/deprecate_attrs.py | 5 +++-- plugins/module_utils/mh/mixins/deps.py | 5 +++-- plugins/module_utils/mh/mixins/state.py | 5 +++-- plugins/module_utils/mh/mixins/vars.py | 5 +++-- plugins/module_utils/mh/module_helper.py | 5 +++-- plugins/module_utils/module_helper.py | 5 +++-- plugins/module_utils/net_tools/pritunl/api.py | 5 +++-- plugins/module_utils/oneandone.py | 3 ++- plugins/module_utils/onepassword.py | 3 ++- plugins/module_utils/oneview.py | 3 ++- plugins/module_utils/online.py | 3 ++- plugins/module_utils/opennebula.py | 3 ++- plugins/module_utils/oracle/oci_utils.py | 3 ++- plugins/module_utils/proxmox.py | 5 +++-- plugins/module_utils/pure.py | 3 ++- plugins/module_utils/rax.py | 3 ++- plugins/module_utils/redfish_utils.py | 3 ++- plugins/module_utils/redhat.py | 3 ++- plugins/module_utils/redis.py | 5 +++-- plugins/module_utils/remote_management/lxca/common.py | 3 ++- plugins/module_utils/rundeck.py | 5 +++-- plugins/module_utils/saslprep.py | 5 +++-- plugins/module_utils/source_control/bitbucket.py | 3 ++- plugins/module_utils/storage/emc/emc_vnx.py | 3 ++- plugins/module_utils/storage/hpe3par/hpe3par.py | 5 +++-- plugins/module_utils/univention_umc.py | 3 ++- plugins/module_utils/utm_utils.py | 5 +++-- plugins/module_utils/version.py | 5 +++-- plugins/module_utils/vexata.py | 5 +++-- plugins/module_utils/wdc_redfish_utils.py | 3 ++- plugins/module_utils/xenserver.py | 5 +++-- plugins/module_utils/xfconf.py | 3 ++- plugins/modules/cloud/alicloud/ali_instance.py | 3 ++- plugins/modules/cloud/alicloud/ali_instance_info.py | 3 ++- plugins/modules/cloud/atomic/atomic_container.py | 5 +++-- plugins/modules/cloud/atomic/atomic_host.py | 5 +++-- plugins/modules/cloud/atomic/atomic_image.py | 5 +++-- plugins/modules/cloud/centurylink/clc_aa_policy.py | 3 ++- plugins/modules/cloud/centurylink/clc_alert_policy.py | 3 ++- .../cloud/centurylink/clc_blueprint_package.py | 3 ++- .../modules/cloud/centurylink/clc_firewall_policy.py | 3 ++- plugins/modules/cloud/centurylink/clc_group.py | 3 ++- plugins/modules/cloud/centurylink/clc_loadbalancer.py | 3 ++- .../modules/cloud/centurylink/clc_modify_server.py | 3 ++- plugins/modules/cloud/centurylink/clc_publicip.py | 3 ++- plugins/modules/cloud/centurylink/clc_server.py | 3 ++- .../modules/cloud/centurylink/clc_server_snapshot.py | 3 ++- .../cloud/dimensiondata/dimensiondata_network.py | 3 ++- plugins/modules/cloud/heroku/heroku_collaborator.py | 5 +++-- plugins/modules/cloud/huawei/hwc_ecs_instance.py | 4 ++-- plugins/modules/cloud/huawei/hwc_evs_disk.py | 4 ++-- plugins/modules/cloud/huawei/hwc_network_vpc.py | 4 ++-- plugins/modules/cloud/huawei/hwc_smn_topic.py | 4 ++-- plugins/modules/cloud/huawei/hwc_vpc_eip.py | 4 ++-- .../modules/cloud/huawei/hwc_vpc_peering_connect.py | 2 +- plugins/modules/cloud/huawei/hwc_vpc_port.py | 4 ++-- plugins/modules/cloud/huawei/hwc_vpc_private_ip.py | 4 ++-- plugins/modules/cloud/huawei/hwc_vpc_route.py | 4 ++-- .../modules/cloud/huawei/hwc_vpc_security_group.py | 4 ++-- .../cloud/huawei/hwc_vpc_security_group_rule.py | 4 ++-- plugins/modules/cloud/huawei/hwc_vpc_subnet.py | 4 ++-- plugins/modules/cloud/linode/linode.py | 5 +++-- plugins/modules/cloud/linode/linode_v4.py | 4 ++-- plugins/modules/cloud/lxc/lxc_container.py | 5 +++-- plugins/modules/cloud/lxd/lxd_container.py | 5 +++-- plugins/modules/cloud/lxd/lxd_profile.py | 7 ++++--- plugins/modules/cloud/lxd/lxd_project.py | 3 ++- plugins/modules/cloud/memset/memset_dns_reload.py | 3 ++- plugins/modules/cloud/memset/memset_memstore_info.py | 3 ++- plugins/modules/cloud/memset/memset_server_info.py | 3 ++- plugins/modules/cloud/memset/memset_zone.py | 3 ++- plugins/modules/cloud/memset/memset_zone_domain.py | 3 ++- plugins/modules/cloud/memset/memset_zone_record.py | 3 ++- plugins/modules/cloud/misc/cloud_init_data_facts.py | 3 ++- plugins/modules/cloud/misc/proxmox.py | 5 +++-- plugins/modules/cloud/misc/proxmox_domain_info.py | 5 +++-- plugins/modules/cloud/misc/proxmox_group_info.py | 5 +++-- plugins/modules/cloud/misc/proxmox_kvm.py | 5 +++-- plugins/modules/cloud/misc/proxmox_nic.py | 5 +++-- plugins/modules/cloud/misc/proxmox_snap.py | 5 +++-- plugins/modules/cloud/misc/proxmox_storage_info.py | 5 +++-- plugins/modules/cloud/misc/proxmox_tasks_info.py | 5 +++-- plugins/modules/cloud/misc/proxmox_template.py | 5 +++-- plugins/modules/cloud/misc/proxmox_user_info.py | 5 +++-- plugins/modules/cloud/misc/rhevm.py | 5 +++-- plugins/modules/cloud/misc/serverless.py | 5 +++-- plugins/modules/cloud/misc/terraform.py | 3 ++- plugins/modules/cloud/misc/xenserver_facts.py | 5 +++-- plugins/modules/cloud/online/online_server_info.py | 3 ++- plugins/modules/cloud/online/online_user_info.py | 3 ++- plugins/modules/cloud/opennebula/one_host.py | 3 ++- plugins/modules/cloud/opennebula/one_template.py | 5 +++-- plugins/modules/cloud/oracle/oci_vcn.py | 3 ++- plugins/modules/cloud/ovh/ovh_ip_failover.py | 5 +++-- .../modules/cloud/ovh/ovh_ip_loadbalancing_backend.py | 5 +++-- plugins/modules/cloud/ovh/ovh_monthly_billing.py | 5 +++-- plugins/modules/cloud/packet/packet_device.py | 3 ++- plugins/modules/cloud/packet/packet_ip_subnet.py | 7 ++++--- plugins/modules/cloud/packet/packet_project.py | 7 ++++--- plugins/modules/cloud/packet/packet_sshkey.py | 3 ++- plugins/modules/cloud/packet/packet_volume.py | 7 ++++--- .../modules/cloud/packet/packet_volume_attachment.py | 7 ++++--- plugins/modules/cloud/profitbricks/profitbricks.py | 5 +++-- .../cloud/profitbricks/profitbricks_datacenter.py | 5 +++-- .../modules/cloud/profitbricks/profitbricks_nic.py | 5 +++-- .../modules/cloud/profitbricks/profitbricks_volume.py | 5 +++-- .../profitbricks/profitbricks_volume_attachments.py | 5 +++-- plugins/modules/cloud/pubnub/pubnub_blocks.py | 3 ++- plugins/modules/cloud/rackspace/rax.py | 5 +++-- plugins/modules/cloud/rackspace/rax_cbs.py | 5 +++-- .../modules/cloud/rackspace/rax_cbs_attachments.py | 5 +++-- plugins/modules/cloud/rackspace/rax_cdb.py | 5 +++-- plugins/modules/cloud/rackspace/rax_cdb_database.py | 5 +++-- plugins/modules/cloud/rackspace/rax_cdb_user.py | 5 +++-- plugins/modules/cloud/rackspace/rax_clb.py | 5 +++-- plugins/modules/cloud/rackspace/rax_clb_nodes.py | 5 +++-- plugins/modules/cloud/rackspace/rax_clb_ssl.py | 5 +++-- plugins/modules/cloud/rackspace/rax_dns.py | 5 +++-- plugins/modules/cloud/rackspace/rax_dns_record.py | 5 +++-- plugins/modules/cloud/rackspace/rax_facts.py | 5 +++-- plugins/modules/cloud/rackspace/rax_files.py | 3 ++- plugins/modules/cloud/rackspace/rax_files_objects.py | 3 ++- plugins/modules/cloud/rackspace/rax_identity.py | 5 +++-- plugins/modules/cloud/rackspace/rax_keypair.py | 5 +++-- plugins/modules/cloud/rackspace/rax_meta.py | 5 +++-- plugins/modules/cloud/rackspace/rax_mon_alarm.py | 5 +++-- plugins/modules/cloud/rackspace/rax_mon_check.py | 5 +++-- plugins/modules/cloud/rackspace/rax_mon_entity.py | 5 +++-- .../modules/cloud/rackspace/rax_mon_notification.py | 5 +++-- .../cloud/rackspace/rax_mon_notification_plan.py | 5 +++-- plugins/modules/cloud/rackspace/rax_network.py | 5 +++-- plugins/modules/cloud/rackspace/rax_queue.py | 5 +++-- plugins/modules/cloud/rackspace/rax_scaling_group.py | 5 +++-- plugins/modules/cloud/rackspace/rax_scaling_policy.py | 5 +++-- plugins/modules/cloud/scaleway/scaleway_compute.py | 3 ++- .../scaleway/scaleway_compute_private_network.py | 3 ++- .../cloud/scaleway/scaleway_database_backup.py | 3 ++- plugins/modules/cloud/scaleway/scaleway_image_info.py | 3 ++- plugins/modules/cloud/scaleway/scaleway_ip.py | 3 ++- plugins/modules/cloud/scaleway/scaleway_ip_info.py | 3 ++- plugins/modules/cloud/scaleway/scaleway_lb.py | 3 ++- .../cloud/scaleway/scaleway_organization_info.py | 3 ++- .../cloud/scaleway/scaleway_private_network.py | 3 ++- .../modules/cloud/scaleway/scaleway_security_group.py | 3 ++- .../cloud/scaleway/scaleway_security_group_info.py | 3 ++- .../cloud/scaleway/scaleway_security_group_rule.py | 4 ++-- .../modules/cloud/scaleway/scaleway_server_info.py | 3 ++- .../modules/cloud/scaleway/scaleway_snapshot_info.py | 3 ++- plugins/modules/cloud/scaleway/scaleway_sshkey.py | 3 ++- plugins/modules/cloud/scaleway/scaleway_user_data.py | 3 ++- plugins/modules/cloud/scaleway/scaleway_volume.py | 3 ++- .../modules/cloud/scaleway/scaleway_volume_info.py | 3 ++- plugins/modules/cloud/smartos/imgadm.py | 3 ++- plugins/modules/cloud/smartos/nictagadm.py | 5 +++-- plugins/modules/cloud/smartos/smartos_image_info.py | 3 ++- plugins/modules/cloud/smartos/vmadm.py | 3 ++- plugins/modules/cloud/softlayer/sl_vm.py | 5 +++-- .../cloud/spotinst/spotinst_aws_elastigroup.py | 3 ++- plugins/modules/cloud/univention/udm_dns_record.py | 5 +++-- plugins/modules/cloud/univention/udm_dns_zone.py | 5 +++-- plugins/modules/cloud/univention/udm_group.py | 5 +++-- plugins/modules/cloud/univention/udm_share.py | 5 +++-- plugins/modules/cloud/univention/udm_user.py | 5 +++-- plugins/modules/cloud/webfaction/webfaction_app.py | 5 +++-- plugins/modules/cloud/webfaction/webfaction_db.py | 5 +++-- plugins/modules/cloud/webfaction/webfaction_domain.py | 5 +++-- .../modules/cloud/webfaction/webfaction_mailbox.py | 5 +++-- plugins/modules/cloud/webfaction/webfaction_site.py | 5 +++-- plugins/modules/cloud/xenserver/xenserver_guest.py | 5 +++-- .../modules/cloud/xenserver/xenserver_guest_info.py | 5 +++-- .../cloud/xenserver/xenserver_guest_powerstate.py | 5 +++-- plugins/modules/clustering/consul/consul.py | 3 ++- plugins/modules/clustering/consul/consul_acl.py | 3 ++- plugins/modules/clustering/consul/consul_kv.py | 3 ++- plugins/modules/clustering/consul/consul_session.py | 5 +++-- plugins/modules/clustering/etcd3.py | 3 ++- plugins/modules/clustering/nomad/nomad_job.py | 3 ++- plugins/modules/clustering/nomad/nomad_job_info.py | 3 ++- plugins/modules/clustering/pacemaker_cluster.py | 5 +++-- plugins/modules/clustering/znode.py | 3 ++- .../database/aerospike/aerospike_migrations.py | 5 +++-- .../modules/database/influxdb/influxdb_database.py | 5 +++-- plugins/modules/database/influxdb/influxdb_query.py | 3 ++- .../database/influxdb/influxdb_retention_policy.py | 5 +++-- plugins/modules/database/influxdb/influxdb_user.py | 5 +++-- plugins/modules/database/influxdb/influxdb_write.py | 3 ++- plugins/modules/database/misc/elasticsearch_plugin.py | 3 ++- plugins/modules/database/misc/kibana_plugin.py | 3 ++- plugins/modules/database/misc/odbc.py | 5 +++-- plugins/modules/database/misc/redis.py | 5 +++-- plugins/modules/database/misc/redis_data.py | 5 +++-- plugins/modules/database/misc/redis_data_incr.py | 5 +++-- plugins/modules/database/misc/redis_data_info.py | 5 +++-- plugins/modules/database/misc/redis_info.py | 5 +++-- plugins/modules/database/misc/riak.py | 3 ++- plugins/modules/database/mssql/mssql_db.py | 3 ++- plugins/modules/database/mssql/mssql_script.py | 5 +++-- plugins/modules/database/saphana/hana_query.py | 5 +++-- .../modules/database/vertica/vertica_configuration.py | 5 +++-- plugins/modules/database/vertica/vertica_info.py | 5 +++-- plugins/modules/database/vertica/vertica_role.py | 5 +++-- plugins/modules/database/vertica/vertica_schema.py | 5 +++-- plugins/modules/database/vertica/vertica_user.py | 5 +++-- plugins/modules/files/archive.py | 7 ++++--- plugins/modules/files/filesize.py | 5 +++-- plugins/modules/files/ini_file.py | 9 +++++---- plugins/modules/files/iso_create.py | 7 ++++--- plugins/modules/files/iso_extract.py | 11 ++++++----- plugins/modules/files/read_csv.py | 5 +++-- plugins/modules/files/sapcar_extract.py | 5 +++-- plugins/modules/files/xattr.py | 5 +++-- plugins/modules/files/xml.py | 11 ++++++----- plugins/modules/identity/ipa/ipa_config.py | 5 +++-- plugins/modules/identity/ipa/ipa_dnsrecord.py | 5 +++-- plugins/modules/identity/ipa/ipa_dnszone.py | 5 +++-- plugins/modules/identity/ipa/ipa_group.py | 5 +++-- plugins/modules/identity/ipa/ipa_hbacrule.py | 5 +++-- plugins/modules/identity/ipa/ipa_host.py | 5 +++-- plugins/modules/identity/ipa/ipa_hostgroup.py | 5 +++-- plugins/modules/identity/ipa/ipa_otpconfig.py | 5 +++-- plugins/modules/identity/ipa/ipa_otptoken.py | 5 +++-- plugins/modules/identity/ipa/ipa_pwpolicy.py | 5 +++-- plugins/modules/identity/ipa/ipa_role.py | 5 +++-- plugins/modules/identity/ipa/ipa_service.py | 5 +++-- plugins/modules/identity/ipa/ipa_subca.py | 3 ++- plugins/modules/identity/ipa/ipa_sudocmd.py | 5 +++-- plugins/modules/identity/ipa/ipa_sudocmdgroup.py | 5 +++-- plugins/modules/identity/ipa/ipa_sudorule.py | 5 +++-- plugins/modules/identity/ipa/ipa_user.py | 5 +++-- plugins/modules/identity/ipa/ipa_vault.py | 5 +++-- .../identity/keycloak/keycloak_authentication.py | 5 +++-- plugins/modules/identity/keycloak/keycloak_client.py | 3 ++- .../identity/keycloak/keycloak_client_rolemapping.py | 3 ++- .../modules/identity/keycloak/keycloak_clientscope.py | 3 ++- .../identity/keycloak/keycloak_clienttemplate.py | 3 ++- plugins/modules/identity/keycloak/keycloak_group.py | 3 ++- .../identity/keycloak/keycloak_identity_provider.py | 3 ++- plugins/modules/identity/keycloak/keycloak_realm.py | 3 ++- .../modules/identity/keycloak/keycloak_realm_info.py | 3 ++- plugins/modules/identity/keycloak/keycloak_role.py | 3 ++- .../identity/keycloak/keycloak_user_federation.py | 3 ++- plugins/modules/identity/onepassword_info.py | 3 ++- plugins/modules/identity/opendj/opendj_backendprop.py | 7 ++++--- plugins/modules/monitoring/airbrake_deployment.py | 3 ++- plugins/modules/monitoring/alerta_customer.py | 5 +++-- plugins/modules/monitoring/bigpanda.py | 5 +++-- plugins/modules/monitoring/circonus_annotation.py | 3 ++- .../modules/monitoring/datadog/datadog_downtime.py | 5 +++-- plugins/modules/monitoring/datadog/datadog_event.py | 3 ++- plugins/modules/monitoring/datadog/datadog_monitor.py | 5 +++-- plugins/modules/monitoring/honeybadger_deployment.py | 3 ++- plugins/modules/monitoring/icinga2_feature.py | 3 ++- plugins/modules/monitoring/icinga2_host.py | 3 ++- plugins/modules/monitoring/librato_annotation.py | 3 ++- plugins/modules/monitoring/logentries.py | 3 ++- plugins/modules/monitoring/logstash_plugin.py | 3 ++- plugins/modules/monitoring/monit.py | 3 ++- plugins/modules/monitoring/nagios.py | 3 ++- plugins/modules/monitoring/newrelic_deployment.py | 3 ++- plugins/modules/monitoring/pagerduty.py | 5 +++-- plugins/modules/monitoring/pagerduty_alert.py | 5 +++-- plugins/modules/monitoring/pagerduty_change.py | 5 +++-- plugins/modules/monitoring/pagerduty_user.py | 5 +++-- plugins/modules/monitoring/pingdom.py | 5 +++-- plugins/modules/monitoring/rollbar_deployment.py | 3 ++- plugins/modules/monitoring/sensu/sensu_check.py | 3 ++- plugins/modules/monitoring/sensu/sensu_client.py | 3 ++- plugins/modules/monitoring/sensu/sensu_handler.py | 3 ++- plugins/modules/monitoring/sensu/sensu_silence.py | 3 ++- .../modules/monitoring/sensu/sensu_subscription.py | 3 ++- plugins/modules/monitoring/spectrum_device.py | 3 ++- plugins/modules/monitoring/spectrum_model_attrs.py | 3 ++- plugins/modules/monitoring/stackdriver.py | 5 +++-- plugins/modules/monitoring/statsd.py | 5 +++-- plugins/modules/monitoring/statusio_maintenance.py | 3 ++- plugins/modules/monitoring/uptimerobot.py | 5 +++-- plugins/modules/net_tools/cloudflare_dns.py | 5 +++-- plugins/modules/net_tools/dnsimple.py | 5 +++-- plugins/modules/net_tools/dnsimple_info.py | 5 +++-- plugins/modules/net_tools/dnsmadeeasy.py | 5 +++-- plugins/modules/net_tools/gandi_livedns.py | 5 +++-- plugins/modules/net_tools/haproxy.py | 5 +++-- plugins/modules/net_tools/infinity/infinity.py | 5 +++-- plugins/modules/net_tools/ipify_facts.py | 5 +++-- plugins/modules/net_tools/ipinfoio_facts.py | 5 +++-- plugins/modules/net_tools/ipwcli_dns.py | 5 +++-- plugins/modules/net_tools/ldap/ldap_attrs.py | 11 ++++++----- plugins/modules/net_tools/ldap/ldap_entry.py | 7 ++++--- plugins/modules/net_tools/ldap/ldap_passwd.py | 5 +++-- plugins/modules/net_tools/ldap/ldap_search.py | 7 ++++--- plugins/modules/net_tools/lldp.py | 5 +++-- plugins/modules/net_tools/netcup_dns.py | 3 ++- plugins/modules/net_tools/nmcli.py | 7 ++++--- plugins/modules/net_tools/nsupdate.py | 3 ++- plugins/modules/net_tools/omapi_host.py | 3 ++- plugins/modules/net_tools/pritunl/pritunl_org.py | 5 +++-- plugins/modules/net_tools/pritunl/pritunl_org_info.py | 5 +++-- plugins/modules/net_tools/pritunl/pritunl_user.py | 5 +++-- .../modules/net_tools/pritunl/pritunl_user_info.py | 5 +++-- plugins/modules/net_tools/snmp_facts.py | 3 ++- plugins/modules/notification/campfire.py | 5 +++-- plugins/modules/notification/catapult.py | 3 ++- plugins/modules/notification/cisco_webex.py | 5 +++-- plugins/modules/notification/discord.py | 5 +++-- plugins/modules/notification/flowdock.py | 3 ++- plugins/modules/notification/grove.py | 5 +++-- plugins/modules/notification/hipchat.py | 5 +++-- plugins/modules/notification/irc.py | 3 ++- plugins/modules/notification/jabber.py | 3 ++- plugins/modules/notification/logentries_msg.py | 5 +++-- plugins/modules/notification/mail.py | 5 +++-- plugins/modules/notification/matrix.py | 3 ++- plugins/modules/notification/mattermost.py | 3 ++- plugins/modules/notification/mqtt.py | 3 ++- plugins/modules/notification/nexmo.py | 3 ++- .../modules/notification/office_365_connector_card.py | 3 ++- plugins/modules/notification/pushbullet.py | 5 +++-- plugins/modules/notification/pushover.py | 3 ++- plugins/modules/notification/rocketchat.py | 3 ++- plugins/modules/notification/say.py | 3 ++- plugins/modules/notification/sendgrid.py | 5 +++-- plugins/modules/notification/slack.py | 3 ++- plugins/modules/notification/syslogger.py | 5 +++-- plugins/modules/notification/telegram.py | 3 ++- plugins/modules/notification/twilio.py | 3 ++- plugins/modules/notification/typetalk.py | 5 +++-- .../packaging/language/ansible_galaxy_install.py | 3 ++- plugins/modules/packaging/language/bower.py | 3 ++- plugins/modules/packaging/language/bundler.py | 3 ++- plugins/modules/packaging/language/cargo.py | 3 ++- plugins/modules/packaging/language/composer.py | 3 ++- plugins/modules/packaging/language/cpanm.py | 3 ++- plugins/modules/packaging/language/easy_install.py | 3 ++- plugins/modules/packaging/language/gem.py | 3 ++- plugins/modules/packaging/language/maven_artifact.py | 3 ++- plugins/modules/packaging/language/npm.py | 3 ++- plugins/modules/packaging/language/pear.py | 3 ++- .../modules/packaging/language/pip_package_info.py | 3 ++- plugins/modules/packaging/language/pipx.py | 3 ++- plugins/modules/packaging/language/yarn.py | 3 ++- plugins/modules/packaging/os/apk.py | 3 ++- plugins/modules/packaging/os/apt_repo.py | 5 +++-- plugins/modules/packaging/os/apt_rpm.py | 5 +++-- plugins/modules/packaging/os/copr.py | 5 +++-- plugins/modules/packaging/os/dnf_versionlock.py | 5 +++-- plugins/modules/packaging/os/flatpak.py | 9 +++++---- plugins/modules/packaging/os/flatpak_remote.py | 9 +++++---- plugins/modules/packaging/os/homebrew.py | 3 ++- plugins/modules/packaging/os/homebrew_cask.py | 7 ++++--- plugins/modules/packaging/os/homebrew_tap.py | 7 ++++--- plugins/modules/packaging/os/installp.py | 5 +++-- plugins/modules/packaging/os/layman.py | 3 ++- plugins/modules/packaging/os/macports.py | 3 ++- plugins/modules/packaging/os/mas.py | 7 ++++--- plugins/modules/packaging/os/openbsd_pkg.py | 3 ++- plugins/modules/packaging/os/opkg.py | 3 ++- plugins/modules/packaging/os/pacman.py | 11 ++++++----- plugins/modules/packaging/os/pacman_key.py | 5 +++-- plugins/modules/packaging/os/pkg5.py | 5 +++-- plugins/modules/packaging/os/pkg5_publisher.py | 3 ++- plugins/modules/packaging/os/pkgin.py | 3 ++- plugins/modules/packaging/os/pkgng.py | 3 ++- plugins/modules/packaging/os/pkgutil.py | 5 +++-- plugins/modules/packaging/os/portage.py | 3 ++- plugins/modules/packaging/os/portinstall.py | 3 ++- plugins/modules/packaging/os/pulp_repo.py | 3 ++- plugins/modules/packaging/os/redhat_subscription.py | 3 ++- plugins/modules/packaging/os/rhn_channel.py | 5 +++-- plugins/modules/packaging/os/rhn_register.py | 5 +++-- plugins/modules/packaging/os/rhsm_release.py | 3 ++- plugins/modules/packaging/os/rhsm_repository.py | 5 +++-- plugins/modules/packaging/os/rpm_ostree_pkg.py | 9 +++++---- plugins/modules/packaging/os/slackpkg.py | 3 ++- plugins/modules/packaging/os/snap.py | 11 ++++++----- plugins/modules/packaging/os/snap_alias.py | 5 +++-- plugins/modules/packaging/os/sorcery.py | 3 ++- plugins/modules/packaging/os/svr4pkg.py | 3 ++- plugins/modules/packaging/os/swdepot.py | 3 ++- plugins/modules/packaging/os/swupd.py | 3 ++- plugins/modules/packaging/os/urpmi.py | 5 +++-- plugins/modules/packaging/os/xbps.py | 3 ++- plugins/modules/packaging/os/yum_versionlock.py | 5 +++-- plugins/modules/packaging/os/zypper.py | 3 ++- plugins/modules/packaging/os/zypper_repository.py | 3 ++- .../modules/remote_management/cobbler/cobbler_sync.py | 5 +++-- .../remote_management/cobbler/cobbler_system.py | 5 +++-- plugins/modules/remote_management/hpilo/hpilo_boot.py | 3 ++- plugins/modules/remote_management/hpilo/hpilo_info.py | 3 ++- plugins/modules/remote_management/hpilo/hponcfg.py | 3 ++- plugins/modules/remote_management/imc/imc_rest.py | 3 ++- plugins/modules/remote_management/ipmi/ipmi_boot.py | 5 +++-- plugins/modules/remote_management/ipmi/ipmi_power.py | 5 +++-- .../lenovoxcc/xcc_redfish_command.py | 3 ++- plugins/modules/remote_management/lxca/lxca_cmms.py | 4 ++-- plugins/modules/remote_management/lxca/lxca_nodes.py | 4 ++-- .../manageiq/manageiq_alert_profiles.py | 3 ++- .../remote_management/manageiq/manageiq_alerts.py | 3 ++- .../remote_management/manageiq/manageiq_policies.py | 3 ++- .../remote_management/manageiq/manageiq_provider.py | 3 ++- .../remote_management/manageiq/manageiq_tags.py | 3 ++- .../oneview/oneview_datacenter_info.py | 3 ++- .../oneview/oneview_enclosure_info.py | 5 +++-- .../oneview/oneview_ethernet_network.py | 3 ++- .../oneview/oneview_ethernet_network_info.py | 3 ++- .../remote_management/oneview/oneview_fc_network.py | 3 ++- .../oneview/oneview_fc_network_info.py | 3 ++- .../remote_management/oneview/oneview_fcoe_network.py | 3 ++- .../oneview/oneview_fcoe_network_info.py | 3 ++- .../oneview/oneview_logical_interconnect_group.py | 5 +++-- .../oneview_logical_interconnect_group_info.py | 5 +++-- .../remote_management/oneview/oneview_network_set.py | 3 ++- .../oneview/oneview_network_set_info.py | 3 ++- .../remote_management/oneview/oneview_san_manager.py | 3 ++- .../oneview/oneview_san_manager_info.py | 3 ++- .../redfish/idrac_redfish_command.py | 3 ++- .../remote_management/redfish/idrac_redfish_config.py | 3 ++- .../remote_management/redfish/idrac_redfish_info.py | 3 ++- .../remote_management/redfish/ilo_redfish_config.py | 3 ++- .../remote_management/redfish/ilo_redfish_info.py | 3 ++- .../remote_management/redfish/redfish_command.py | 3 ++- .../remote_management/redfish/redfish_config.py | 3 ++- .../modules/remote_management/redfish/redfish_info.py | 3 ++- .../remote_management/redfish/wdc_redfish_command.py | 3 ++- .../remote_management/redfish/wdc_redfish_info.py | 3 ++- .../modules/remote_management/stacki/stacki_host.py | 5 +++-- plugins/modules/remote_management/wakeonlan.py | 3 ++- .../source_control/bitbucket/bitbucket_access_key.py | 5 +++-- .../bitbucket/bitbucket_pipeline_key_pair.py | 5 +++-- .../bitbucket/bitbucket_pipeline_known_host.py | 5 +++-- .../bitbucket/bitbucket_pipeline_variable.py | 5 +++-- plugins/modules/source_control/bzr.py | 5 +++-- plugins/modules/source_control/git_config.py | 3 ++- .../source_control/github/github_deploy_key.py | 3 ++- plugins/modules/source_control/github/github_issue.py | 5 +++-- plugins/modules/source_control/github/github_key.py | 5 +++-- .../modules/source_control/github/github_release.py | 5 +++-- plugins/modules/source_control/github/github_repo.py | 5 +++-- .../modules/source_control/github/github_webhook.py | 5 +++-- .../source_control/github/github_webhook_info.py | 5 +++-- .../modules/source_control/gitlab/gitlab_branch.py | 5 +++-- .../source_control/gitlab/gitlab_deploy_key.py | 9 +++++---- plugins/modules/source_control/gitlab/gitlab_group.py | 7 ++++--- .../source_control/gitlab/gitlab_group_members.py | 5 +++-- .../source_control/gitlab/gitlab_group_variable.py | 7 ++++--- plugins/modules/source_control/gitlab/gitlab_hook.py | 9 +++++---- .../modules/source_control/gitlab/gitlab_project.py | 7 ++++--- .../source_control/gitlab/gitlab_project_members.py | 7 ++++--- .../source_control/gitlab/gitlab_project_variable.py | 5 +++-- .../source_control/gitlab/gitlab_protected_branch.py | 5 +++-- .../modules/source_control/gitlab/gitlab_runner.py | 9 +++++---- plugins/modules/source_control/gitlab/gitlab_user.py | 9 +++++---- plugins/modules/source_control/hg.py | 7 ++++--- plugins/modules/storage/emc/emc_vnx_sg_member.py | 3 ++- plugins/modules/storage/hpe3par/ss_3par_cpg.py | 6 +++--- plugins/modules/storage/ibm/ibm_sa_domain.py | 6 +++--- plugins/modules/storage/ibm/ibm_sa_host.py | 3 ++- plugins/modules/storage/ibm/ibm_sa_host_ports.py | 3 ++- plugins/modules/storage/ibm/ibm_sa_pool.py | 3 ++- plugins/modules/storage/ibm/ibm_sa_vol.py | 3 ++- plugins/modules/storage/ibm/ibm_sa_vol_map.py | 4 ++-- plugins/modules/storage/pmem/pmem.py | 3 ++- plugins/modules/storage/vexata/vexata_eg.py | 5 +++-- plugins/modules/storage/vexata/vexata_volume.py | 5 +++-- plugins/modules/storage/zfs/zfs.py | 7 ++++--- plugins/modules/storage/zfs/zfs_delegate_admin.py | 5 +++-- plugins/modules/storage/zfs/zfs_facts.py | 3 ++- plugins/modules/storage/zfs/zpool_facts.py | 3 ++- plugins/modules/system/aix_devices.py | 5 +++-- plugins/modules/system/aix_filesystem.py | 5 +++-- plugins/modules/system/aix_inittab.py | 5 +++-- plugins/modules/system/aix_lvg.py | 5 +++-- plugins/modules/system/aix_lvol.py | 5 +++-- plugins/modules/system/alternatives.py | 9 +++++---- plugins/modules/system/awall.py | 5 +++-- plugins/modules/system/beadm.py | 5 +++-- plugins/modules/system/capabilities.py | 5 +++-- plugins/modules/system/cronvar.py | 5 +++-- plugins/modules/system/crypttab.py | 5 +++-- plugins/modules/system/dconf.py | 5 +++-- plugins/modules/system/dpkg_divert.py | 5 +++-- plugins/modules/system/facter.py | 5 +++-- plugins/modules/system/filesystem.py | 7 ++++--- plugins/modules/system/gconftool2.py | 7 ++++--- plugins/modules/system/gconftool2_info.py | 3 ++- plugins/modules/system/homectl.py | 3 ++- plugins/modules/system/interfaces_file.py | 5 +++-- plugins/modules/system/iptables_state.py | 5 +++-- plugins/modules/system/java_cert.py | 5 +++-- plugins/modules/system/java_keystore.py | 7 ++++--- plugins/modules/system/kernel_blacklist.py | 7 ++++--- plugins/modules/system/keyring.py | 5 +++-- plugins/modules/system/keyring_info.py | 5 +++-- plugins/modules/system/launchd.py | 5 +++-- plugins/modules/system/lbu.py | 5 +++-- plugins/modules/system/listen_ports_facts.py | 5 +++-- plugins/modules/system/locale_gen.py | 3 ++- plugins/modules/system/lvg.py | 5 +++-- plugins/modules/system/lvol.py | 5 +++-- plugins/modules/system/make.py | 5 +++-- plugins/modules/system/mksysb.py | 4 ++-- plugins/modules/system/modprobe.py | 5 +++-- plugins/modules/system/nosh.py | 3 ++- plugins/modules/system/ohai.py | 3 ++- plugins/modules/system/open_iscsi.py | 5 +++-- plugins/modules/system/openwrt_init.py | 3 ++- plugins/modules/system/osx_defaults.py | 9 +++++---- plugins/modules/system/pam_limits.py | 5 +++-- plugins/modules/system/pamd.py | 5 +++-- plugins/modules/system/parted.py | 5 +++-- plugins/modules/system/pids.py | 5 +++-- plugins/modules/system/puppet.py | 5 +++-- plugins/modules/system/python_requirements_info.py | 3 ++- plugins/modules/system/runit.py | 5 +++-- plugins/modules/system/sap_task_list_execute.py | 5 +++-- plugins/modules/system/sefcontext.py | 5 +++-- plugins/modules/system/selinux_permissive.py | 5 +++-- plugins/modules/system/seport.py | 5 +++-- plugins/modules/system/shutdown.py | 5 +++-- plugins/modules/system/solaris_zone.py | 5 +++-- plugins/modules/system/ssh_config.py | 9 +++++---- plugins/modules/system/sudoers.py | 5 +++-- plugins/modules/system/svc.py | 5 +++-- plugins/modules/system/syspatch.py | 5 +++-- plugins/modules/system/sysrc.py | 3 ++- plugins/modules/system/sysupgrade.py | 5 +++-- plugins/modules/system/timezone.py | 5 +++-- plugins/modules/system/ufw.py | 11 ++++++----- plugins/modules/system/vdo.py | 5 +++-- plugins/modules/system/xfconf.py | 3 ++- plugins/modules/system/xfconf_info.py | 3 ++- plugins/modules/system/xfs_quota.py | 7 ++++--- .../modules/web_infrastructure/apache2_mod_proxy.py | 3 ++- plugins/modules/web_infrastructure/apache2_module.py | 3 ++- plugins/modules/web_infrastructure/deploy_helper.py | 3 ++- plugins/modules/web_infrastructure/django_manage.py | 3 ++- plugins/modules/web_infrastructure/ejabberd_user.py | 3 ++- plugins/modules/web_infrastructure/gunicorn.py | 3 ++- plugins/modules/web_infrastructure/htpasswd.py | 3 ++- plugins/modules/web_infrastructure/jboss.py | 3 ++- plugins/modules/web_infrastructure/jenkins_build.py | 5 +++-- plugins/modules/web_infrastructure/jenkins_job.py | 5 +++-- .../modules/web_infrastructure/jenkins_job_info.py | 5 +++-- plugins/modules/web_infrastructure/jenkins_plugin.py | 3 ++- plugins/modules/web_infrastructure/jenkins_script.py | 3 ++- plugins/modules/web_infrastructure/jira.py | 3 ++- .../modules/web_infrastructure/nginx_status_info.py | 3 ++- .../modules/web_infrastructure/rundeck_acl_policy.py | 3 ++- .../web_infrastructure/rundeck_job_executions_info.py | 5 +++-- plugins/modules/web_infrastructure/rundeck_job_run.py | 5 +++-- plugins/modules/web_infrastructure/rundeck_project.py | 3 ++- .../web_infrastructure/sophos_utm/utm_aaa_group.py | 5 +++-- .../sophos_utm/utm_aaa_group_info.py | 5 +++-- .../sophos_utm/utm_ca_host_key_cert.py | 5 +++-- .../sophos_utm/utm_ca_host_key_cert_info.py | 5 +++-- .../web_infrastructure/sophos_utm/utm_dns_host.py | 5 +++-- .../sophos_utm/utm_network_interface_address.py | 5 +++-- .../sophos_utm/utm_network_interface_address_info.py | 5 +++-- .../sophos_utm/utm_proxy_auth_profile.py | 5 +++-- .../sophos_utm/utm_proxy_exception.py | 5 +++-- .../sophos_utm/utm_proxy_frontend.py | 5 +++-- .../sophos_utm/utm_proxy_frontend_info.py | 5 +++-- .../sophos_utm/utm_proxy_location.py | 5 +++-- .../sophos_utm/utm_proxy_location_info.py | 5 +++-- plugins/modules/web_infrastructure/supervisorctl.py | 3 ++- plugins/modules/web_infrastructure/taiga_issue.py | 3 ++- plugins/test/a_module.py | 3 ++- tests/integration/targets/alternatives/tasks/main.yml | 3 ++- .../targets/cmd_runner/library/cmd_echo.py | 3 ++- tests/integration/targets/cmd_runner/tasks/main.yml | 3 ++- tests/integration/targets/cmd_runner/vars/main.yml | 3 ++- tests/integration/targets/cpanm/tasks/main.yml | 3 ++- .../integration/targets/django_manage/tasks/main.yaml | 5 +++-- .../targets/filter_random_mac/tasks/main.yml | 7 ++++--- .../targets/gandi_livedns/defaults/main.yml | 5 +++-- .../targets/gandi_livedns/tasks/create_record.yml | 5 +++-- .../integration/targets/gandi_livedns/tasks/main.yml | 5 +++-- .../targets/gandi_livedns/tasks/record.yml | 5 +++-- .../targets/gandi_livedns/tasks/remove_record.yml | 5 +++-- .../targets/gandi_livedns/tasks/update_record.yml | 5 +++-- tests/integration/targets/github_issue/tasks/main.yml | 5 +++-- .../targets/gitlab_group_members/tasks/main.yml | 5 +++-- .../targets/gitlab_project_members/tasks/main.yml | 5 +++-- tests/integration/targets/hg/tasks/main.yml | 5 +++-- tests/integration/targets/hg/tasks/run-tests.yml | 5 +++-- tests/integration/targets/homebrew/tasks/main.yml | 5 +++-- .../integration/targets/homebrew_cask/tasks/main.yml | 5 +++-- tests/integration/targets/iso_create/tasks/main.yml | 5 +++-- .../targets/iso_create/tasks/prepare_dest_dir.yml | 5 +++-- tests/integration/targets/jboss/tasks/jboss.yml | 4 ++-- .../targets/listen_ports_facts/tasks/main.yml | 5 +++-- .../testcoll/plugins/modules/collection_module.py | 3 ++- .../testcoll_mf/plugins/modules/collection_module.py | 3 ++- .../plugins/modules/collection_module.py | 3 ++- .../testcoll_nv/plugins/modules/collection_module.py | 3 ++- .../lookup_collection_version/library/local_module.py | 3 ++- tests/integration/targets/lookup_etcd3/runme.sh | 3 ++- tests/integration/targets/lookup_etcd3/tasks/main.yml | 3 ++- .../integration/targets/lookup_etcd3/tasks/tests.yml | 3 ++- tests/integration/targets/lookup_lmdb_kv/runme.sh | 3 ++- tests/integration/targets/lookup_random_pet/runme.sh | 3 ++- .../integration/targets/lookup_random_string/runme.sh | 3 ++- .../integration/targets/lookup_random_words/runme.sh | 3 ++- tests/integration/targets/lxd_project/tasks/main.yml | 3 ++- tests/integration/targets/mail/files/smtpserver.py | 5 +++-- tests/integration/targets/mas/tasks/main.yml | 5 +++-- .../targets/module_helper/library/mdepfail.py | 3 ++- .../targets/module_helper/library/msimple.py | 3 ++- .../targets/module_helper/library/msimpleda.py | 3 ++- .../targets/module_helper/library/mstate.py | 3 ++- .../integration/targets/module_helper/tasks/main.yml | 3 ++- .../targets/module_helper/tasks/mdepfail.yml | 3 ++- .../targets/module_helper/tasks/msimple.yml | 3 ++- .../targets/module_helper/tasks/msimpleda.yml | 3 ++- .../targets/module_helper/tasks/mstate.yml | 3 ++- tests/integration/targets/monit/files/httpd_echo.py | 3 ++- tests/integration/targets/osx_defaults/tasks/main.yml | 5 +++-- .../integration/targets/pagerduty_user/tasks/main.yml | 5 +++-- tests/integration/targets/pam_limits/tasks/main.yml | 5 +++-- tests/integration/targets/pamd/tasks/main.yml | 3 ++- tests/integration/targets/pids/files/sleeper.c | 3 ++- tests/integration/targets/pids/tasks/main.yml | 5 +++-- tests/integration/targets/pkgutil/tasks/main.yml | 5 +++-- tests/integration/targets/proxmox/tasks/main.yml | 5 +++-- tests/integration/targets/redis_info/tasks/main.yml | 5 +++-- .../integration/targets/setup_etcd3/defaults/main.yml | 5 +++-- .../targets/setup_redis_replication/tasks/main.yml | 5 +++-- tests/integration/targets/ssh_config/tasks/main.yml | 5 +++-- .../testcoll/plugins/modules/collection_module.py | 3 ++- .../targets/test_a_module/library/local_module.py | 3 ++- tests/sanity/extra/aliases.py | 3 ++- tests/sanity/extra/botmeta.py | 3 ++- tests/sanity/extra/extra-docs.py | 3 ++- tests/sanity/extra/no-unwanted-files.py | 3 ++- tests/unit/mock/loader.py | 3 ++- tests/unit/mock/procenv.py | 3 ++- tests/unit/mock/vault_helper.py | 3 ++- tests/unit/mock/yaml_helper.py | 3 ++- tests/unit/plugins/become/conftest.py | 3 ++- tests/unit/plugins/become/helper.py | 3 ++- tests/unit/plugins/become/test_doas.py | 3 ++- tests/unit/plugins/become/test_dzdo.py | 3 ++- tests/unit/plugins/become/test_ksu.py | 3 ++- tests/unit/plugins/become/test_pbrun.py | 3 ++- tests/unit/plugins/become/test_pfexec.py | 3 ++- tests/unit/plugins/become/test_sudosu.py | 3 ++- tests/unit/plugins/callback/test_elastic.py | 3 ++- tests/unit/plugins/callback/test_loganalytics.py | 3 ++- tests/unit/plugins/callback/test_opentelemetry.py | 3 ++- tests/unit/plugins/inventory/test_icinga2.py | 3 ++- tests/unit/plugins/inventory/test_lxd.py | 5 +++-- tests/unit/plugins/inventory/test_opennebula.py | 3 ++- tests/unit/plugins/inventory/test_proxmox.py | 3 ++- .../unit/plugins/inventory/test_stackpath_compute.py | 4 ++-- tests/unit/plugins/inventory/test_xen_orchestra.py | 3 ++- tests/unit/plugins/lookup/test_bitwarden.py | 3 ++- tests/unit/plugins/lookup/test_dependent.py | 3 ++- tests/unit/plugins/lookup/test_dsv.py | 3 ++- tests/unit/plugins/lookup/test_etcd3.py | 3 ++- tests/unit/plugins/lookup/test_manifold.py | 3 ++- tests/unit/plugins/lookup/test_onepassword.py | 3 ++- tests/unit/plugins/lookup/test_revbitspss.py | 6 +++--- tests/unit/plugins/lookup/test_tss.py | 3 ++- tests/unit/plugins/module_utils/cloud/test_backoff.py | 3 ++- tests/unit/plugins/module_utils/conftest.py | 3 ++- .../plugins/module_utils/hwc/test_dict_comparison.py | 3 ++- tests/unit/plugins/module_utils/hwc/test_hwc_utils.py | 3 ++- .../module_utils/net_tools/pritunl/test_api.py | 5 +++-- tests/unit/plugins/module_utils/test_cmd_runner.py | 3 ++- tests/unit/plugins/module_utils/test_csv.py | 3 ++- tests/unit/plugins/module_utils/test_database.py | 3 ++- tests/unit/plugins/module_utils/test_known_hosts.py | 3 ++- tests/unit/plugins/module_utils/test_module_helper.py | 3 ++- tests/unit/plugins/module_utils/test_saslprep.py | 4 ++-- tests/unit/plugins/module_utils/test_utm_utils.py | 5 +++-- .../module_utils/xenserver/FakeAnsibleModule.py | 5 +++-- .../unit/plugins/module_utils/xenserver/FakeXenAPI.py | 5 +++-- tests/unit/plugins/module_utils/xenserver/common.py | 5 +++-- tests/unit/plugins/module_utils/xenserver/conftest.py | 5 +++-- .../xenserver/test_gather_vm_params_and_facts.py | 5 +++-- .../module_utils/xenserver/test_get_object_ref.py | 5 +++-- .../unit/plugins/module_utils/xenserver/test_misc.py | 5 +++-- .../module_utils/xenserver/test_netaddr_functions.py | 5 +++-- .../module_utils/xenserver/test_set_vm_power_state.py | 5 +++-- .../module_utils/xenserver/test_wait_for_functions.py | 5 +++-- .../unit/plugins/module_utils/xenserver/test_xapi.py | 5 +++-- .../module_utils/xenserver/test_xenserverobject.py | 5 +++-- tests/unit/plugins/modules/cloud/linode/conftest.py | 3 ++- .../plugins/modules/cloud/misc/test_proxmox_kvm.py | 5 +++-- .../plugins/modules/cloud/misc/test_proxmox_snap.py | 5 +++-- .../modules/cloud/misc/test_proxmox_tasks_info.py | 5 +++-- .../unit/plugins/modules/cloud/misc/test_terraform.py | 5 +++-- .../scaleway/test_scaleway_compute_private_network.py | 5 +++-- .../cloud/scaleway/test_scaleway_private_network.py | 5 +++-- .../modules/cloud/xenserver/FakeAnsibleModule.py | 5 +++-- .../plugins/modules/cloud/xenserver/FakeXenAPI.py | 5 +++-- tests/unit/plugins/modules/cloud/xenserver/common.py | 5 +++-- .../unit/plugins/modules/cloud/xenserver/conftest.py | 5 +++-- .../cloud/xenserver/test_xenserver_guest_info.py | 5 +++-- .../xenserver/test_xenserver_guest_powerstate.py | 5 +++-- tests/unit/plugins/modules/conftest.py | 3 ++- .../plugins/modules/database/misc/test_redis_data.py | 5 +++-- .../modules/database/misc/test_redis_data_incr.py | 5 +++-- .../modules/database/misc/test_redis_data_info.py | 5 +++-- .../plugins/modules/database/misc/test_redis_info.py | 5 +++-- .../modules/database/saphana/test_hana_query.py | 5 +++-- tests/unit/plugins/modules/files/test_archive.py | 3 ++- .../unit/plugins/modules/files/test_sapcar_extract.py | 5 +++-- .../modules/identity/ipa/test_ipa_otpconfig.py | 5 +++-- .../plugins/modules/identity/ipa/test_ipa_otptoken.py | 5 +++-- .../plugins/modules/identity/ipa/test_ipa_pwpolicy.py | 5 +++-- .../identity/keycloak/test_keycloak_authentication.py | 5 +++-- .../modules/identity/keycloak/test_keycloak_client.py | 5 +++-- .../keycloak/test_keycloak_client_rolemapping.py | 5 +++-- .../identity/keycloak/test_keycloak_clientscope.py | 5 +++-- .../keycloak/test_keycloak_identity_provider.py | 5 +++-- .../modules/identity/keycloak/test_keycloak_realm.py | 5 +++-- .../identity/keycloak/test_keycloak_realm_info.py | 5 +++-- .../modules/identity/keycloak/test_keycloak_role.py | 5 +++-- .../keycloak/test_keycloak_user_federation.py | 5 +++-- .../modules/monitoring/test_alerta_customer.py | 3 ++- .../modules/monitoring/test_circonus_annotation.py | 3 ++- .../monitoring/test_datadog_downtime.py.disabled | 3 ++- .../modules/monitoring/test_icinga2_feature.py | 3 ++- tests/unit/plugins/modules/monitoring/test_monit.py | 3 ++- .../unit/plugins/modules/monitoring/test_pagerduty.py | 3 ++- .../modules/monitoring/test_pagerduty_alert.py | 3 ++- .../modules/monitoring/test_pagerduty_change.py | 4 +++- tests/unit/plugins/modules/monitoring/test_statsd.py | 3 ++- .../modules/net_tools/pritunl/test_pritunl_org.py | 3 ++- .../net_tools/pritunl/test_pritunl_org_info.py | 5 +++-- .../modules/net_tools/pritunl/test_pritunl_user.py | 3 ++- .../net_tools/pritunl/test_pritunl_user_info.py | 5 +++-- tests/unit/plugins/modules/net_tools/test_dnsimple.py | 3 ++- .../plugins/modules/net_tools/test_dnsimple_info.py | 3 ++- tests/unit/plugins/modules/net_tools/test_nmcli.py | 5 +++-- .../unit/plugins/modules/notification/test_discord.py | 3 ++- tests/unit/plugins/modules/notification/test_slack.py | 3 ++- .../plugins/modules/packaging/language/test_cpanm.py | 3 ++- .../plugins/modules/packaging/language/test_gem.py | 3 ++- .../modules/packaging/language/test_maven_artifact.py | 3 ++- .../plugins/modules/packaging/language/test_npm.py | 5 +++-- tests/unit/plugins/modules/packaging/os/conftest.py | 3 ++- tests/unit/plugins/modules/packaging/os/test_apk.py | 3 ++- .../plugins/modules/packaging/os/test_homebrew.py | 3 ++- .../modules/packaging/os/test_homebrew_cask.py | 3 ++- .../plugins/modules/packaging/os/test_macports.py | 3 ++- .../unit/plugins/modules/packaging/os/test_pacman.py | 3 ++- .../plugins/modules/packaging/os/test_pacman_key.py | 5 +++-- tests/unit/plugins/modules/packaging/os/test_pkgin.py | 3 ++- .../modules/packaging/os/test_redhat_subscription.py | 3 ++- .../plugins/modules/packaging/os/test_rhn_channel.py | 3 ++- .../plugins/modules/packaging/os/test_rhn_register.py | 3 ++- .../plugins/modules/packaging/os/test_rhsm_release.py | 3 ++- .../modules/packaging/os/test_rpm_ostree_pkg.py | 5 +++-- .../lenovoxcc/test_xcc_redfish_command.py | 3 ++- .../modules/remote_management/lxca/test_lxca_cmms.py | 3 ++- .../modules/remote_management/lxca/test_lxca_nodes.py | 3 ++- .../modules/remote_management/oneview/conftest.py | 3 ++- .../remote_management/oneview/hpe_test_utils.py | 3 ++- .../oneview/oneview_module_loader.py | 3 ++- .../oneview/test_oneview_datacenter_info.py | 3 ++- .../oneview/test_oneview_enclosure_info.py | 3 ++- .../oneview/test_oneview_ethernet_network.py | 3 ++- .../oneview/test_oneview_ethernet_network_info.py | 3 ++- .../oneview/test_oneview_fc_network.py | 3 ++- .../oneview/test_oneview_fc_network_info.py | 3 ++- .../oneview/test_oneview_fcoe_network.py | 3 ++- .../oneview/test_oneview_fcoe_network_info.py | 3 ++- .../test_oneview_logical_interconnect_group.py | 3 ++- .../test_oneview_logical_interconnect_group_info.py | 3 ++- .../oneview/test_oneview_network_set.py | 3 ++- .../oneview/test_oneview_network_set_info.py | 3 ++- .../oneview/test_oneview_san_manager.py | 3 ++- .../oneview/test_oneview_san_manager_info.py | 3 ++- .../remote_management/wdc/test_wdc_redfish_command.py | 3 ++- .../remote_management/wdc/test_wdc_redfish_info.py | 3 ++- .../bitbucket/test_bitbucket_access_key.py | 3 ++- .../bitbucket/test_bitbucket_pipeline_key_pair.py | 3 ++- .../bitbucket/test_bitbucket_pipeline_known_host.py | 3 ++- .../bitbucket/test_bitbucket_pipeline_variable.py | 3 ++- .../plugins/modules/source_control/gitlab/gitlab.py | 5 +++-- .../source_control/gitlab/test_gitlab_deploy_key.py | 5 +++-- .../source_control/gitlab/test_gitlab_group.py | 5 +++-- .../modules/source_control/gitlab/test_gitlab_hook.py | 5 +++-- .../source_control/gitlab/test_gitlab_project.py | 5 +++-- .../gitlab/test_gitlab_protected_branch.py | 5 +++-- .../source_control/gitlab/test_gitlab_runner.py | 5 +++-- .../modules/source_control/gitlab/test_gitlab_user.py | 5 +++-- .../modules/storage/hpe3par/test_ss_3par_cpg.py | 5 +++-- tests/unit/plugins/modules/storage/pmem/test_pmem.py | 3 ++- .../system/interfaces_file/test_interfaces_file.py | 3 ++- .../plugins/modules/system/test_gconftool2_info.py | 3 ++- .../unit/plugins/modules/system/test_java_keystore.py | 3 ++- tests/unit/plugins/modules/system/test_modprobe.py | 3 ++- tests/unit/plugins/modules/system/test_pamd.py | 3 ++- tests/unit/plugins/modules/system/test_parted.py | 3 ++- .../modules/system/test_sap_task_list_execute.py | 3 ++- .../unit/plugins/modules/system/test_solaris_zone.py | 3 ++- tests/unit/plugins/modules/system/test_sysupgrade.py | 3 ++- tests/unit/plugins/modules/system/test_ufw.py | 3 ++- tests/unit/plugins/modules/system/test_xfconf.py | 3 ++- tests/unit/plugins/modules/system/test_xfconf_info.py | 3 ++- tests/unit/plugins/modules/utils.py | 3 ++- .../modules/web_infrastructure/test_apache2_module.py | 3 ++- .../modules/web_infrastructure/test_jenkins_build.py | 3 ++- .../modules/web_infrastructure/test_jenkins_plugin.py | 3 ++- 973 files changed, 2495 insertions(+), 1542 deletions(-) rename simplified_bsd.txt => LICENSES/BSD-2-Clause.txt (100%) create mode 120000 LICENSES/GPL-3.0-or-later.txt create mode 100644 LICENSES/MIT.txt rename PSF-license.txt => LICENSES/PSF-2.0.txt (100%) create mode 100644 changelogs/fragments/licenses.yml diff --git a/simplified_bsd.txt b/LICENSES/BSD-2-Clause.txt similarity index 100% rename from simplified_bsd.txt rename to LICENSES/BSD-2-Clause.txt diff --git a/LICENSES/GPL-3.0-or-later.txt b/LICENSES/GPL-3.0-or-later.txt new file mode 120000 index 0000000000..012065c853 --- /dev/null +++ b/LICENSES/GPL-3.0-or-later.txt @@ -0,0 +1 @@ +../COPYING \ No newline at end of file diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000000..2071b23b0e --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PSF-license.txt b/LICENSES/PSF-2.0.txt similarity index 100% rename from PSF-license.txt rename to LICENSES/PSF-2.0.txt diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml new file mode 100644 index 0000000000..18737a9ee4 --- /dev/null +++ b/changelogs/fragments/licenses.yml @@ -0,0 +1,3 @@ +minor_changes: + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065)." + - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/plugins/action/system/iptables_state.py b/plugins/action/system/iptables_state.py index b8ae1a5dea..f59a7298b6 100644 --- a/plugins/action/system/iptables_state.py +++ b/plugins/action/system/iptables_state.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, quidame -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, quidame +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/action/system/shutdown.py b/plugins/action/system/shutdown.py index 19813b0847..c2860f1d6f 100644 --- a/plugins/action/system/shutdown.py +++ b/plugins/action/system/shutdown.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Amin Vakil -# Copyright: (c) 2016-2018, Matt Davis -# Copyright: (c) 2018, Sam Doran -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Amin Vakil +# Copyright (c) 2016-2018, Matt Davis +# Copyright (c) 2018, Sam Doran +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/doas.py b/plugins/become/doas.py index 7cf4a79c7b..d282e96851 100644 --- a/plugins/become/doas.py +++ b/plugins/become/doas.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/dzdo.py b/plugins/become/dzdo.py index 1aef8edb69..b3c34f377c 100644 --- a/plugins/become/dzdo.py +++ b/plugins/become/dzdo.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/ksu.py b/plugins/become/ksu.py index 1ee47b0fa3..29731d95d5 100644 --- a/plugins/become/ksu.py +++ b/plugins/become/ksu.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/machinectl.py b/plugins/become/machinectl.py index 061a5bcf46..4b533baba0 100644 --- a/plugins/become/machinectl.py +++ b/plugins/become/machinectl.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/pbrun.py b/plugins/become/pbrun.py index fe28e61c2b..3645e95fec 100644 --- a/plugins/become/pbrun.py +++ b/plugins/become/pbrun.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/pfexec.py b/plugins/become/pfexec.py index 2b37044c93..f14c22e68f 100644 --- a/plugins/become/pfexec.py +++ b/plugins/become/pfexec.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/pmrun.py b/plugins/become/pmrun.py index 8cb24fa937..bb384aeedf 100644 --- a/plugins/become/pmrun.py +++ b/plugins/become/pmrun.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/sesu.py b/plugins/become/sesu.py index 7113b19442..751163d19e 100644 --- a/plugins/become/sesu.py +++ b/plugins/become/sesu.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/become/sudosu.py b/plugins/become/sudosu.py index 605c83d58c..60bb2aa517 100644 --- a/plugins/become/sudosu.py +++ b/plugins/become/sudosu.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/cache/memcached.py b/plugins/cache/memcached.py index f2ea098d4d..68d228639c 100644 --- a/plugins/cache/memcached.py +++ b/plugins/cache/memcached.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2014, Brian Coca, Josh Drake, et al # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/cache/pickle.py b/plugins/cache/pickle.py index 1e549d4d66..6624067cf3 100644 --- a/plugins/cache/pickle.py +++ b/plugins/cache/pickle.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Brian Coca # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/cache/redis.py b/plugins/cache/redis.py index 6c2edb5f61..ea7bf9e1dd 100644 --- a/plugins/cache/redis.py +++ b/plugins/cache/redis.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2014, Brian Coca, Josh Drake, et al # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/cache/yaml.py b/plugins/cache/yaml.py index e5062b16d1..3a9217afcf 100644 --- a/plugins/cache/yaml.py +++ b/plugins/cache/yaml.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Brian Coca # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/cgroup_memory_recap.py b/plugins/callback/cgroup_memory_recap.py index 0334bee664..643e2af9b7 100644 --- a/plugins/callback/cgroup_memory_recap.py +++ b/plugins/callback/cgroup_memory_recap.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2018 Matt Martz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/context_demo.py b/plugins/callback/context_demo.py index c85cc60cda..df55efd54f 100644 --- a/plugins/callback/context_demo.py +++ b/plugins/callback/context_demo.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (C) 2012, Michael DeHaan, # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/counter_enabled.py b/plugins/callback/counter_enabled.py index 38d71df69e..688da75195 100644 --- a/plugins/callback/counter_enabled.py +++ b/plugins/callback/counter_enabled.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2018, Ivan Aragones Muniesa -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later ''' Counter enabled Ansible callback plugin (See DOCUMENTATION for more information) ''' diff --git a/plugins/callback/dense.py b/plugins/callback/dense.py index af8464631c..7c77fae1a5 100644 --- a/plugins/callback/dense.py +++ b/plugins/callback/dense.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Dag Wieers # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/diy.py b/plugins/callback/diy.py index b288ee4b97..ed194b5cb8 100644 --- a/plugins/callback/diy.py +++ b/plugins/callback/diy.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Trevor Highfill -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Trevor Highfill +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/elastic.py b/plugins/callback/elastic.py index 095c0993ca..ddbb87fa4d 100644 --- a/plugins/callback/elastic.py +++ b/plugins/callback/elastic.py @@ -1,5 +1,6 @@ # (C) 2021, Victor Martinez -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/hipchat.py b/plugins/callback/hipchat.py index c64b892d9b..2450a87976 100644 --- a/plugins/callback/hipchat.py +++ b/plugins/callback/hipchat.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (C) 2014, Matt Martz # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/jabber.py b/plugins/callback/jabber.py index b535fa9540..3fd0b6fb97 100644 --- a/plugins/callback/jabber.py +++ b/plugins/callback/jabber.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (C) 2016 maxn nikolaev.makc@gmail.com # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/log_plays.py b/plugins/callback/log_plays.py index 3a9531096d..b7344fad39 100644 --- a/plugins/callback/log_plays.py +++ b/plugins/callback/log_plays.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (C) 2012, Michael DeHaan, # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/loganalytics.py b/plugins/callback/loganalytics.py index 04fc646dc4..8974f15a94 100644 --- a/plugins/callback/loganalytics.py +++ b/plugins/callback/loganalytics.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/logdna.py b/plugins/callback/logdna.py index 138b612de8..5050ee1e4f 100644 --- a/plugins/callback/logdna.py +++ b/plugins/callback/logdna.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2018, Samir Musali -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/logentries.py b/plugins/callback/logentries.py index ad71a6d448..5aa45cb1ee 100644 --- a/plugins/callback/logentries.py +++ b/plugins/callback/logentries.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Logentries.com, Jimmy Tang # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/logstash.py b/plugins/callback/logstash.py index 133010cbdb..ebd5b0413e 100644 --- a/plugins/callback/logstash.py +++ b/plugins/callback/logstash.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (C) 2020, Yevhen Khmelenko # (C) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/mail.py b/plugins/callback/mail.py index 3805bae508..d20600e710 100644 --- a/plugins/callback/mail.py +++ b/plugins/callback/mail.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2012, Dag Wieers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2012, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/nrdp.py b/plugins/callback/nrdp.py index 08096cab72..14b70d4ed5 100644 --- a/plugins/callback/nrdp.py +++ b/plugins/callback/nrdp.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2018 Remi Verchere -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/null.py b/plugins/callback/null.py index 13ea65b438..bddecbc4d9 100644 --- a/plugins/callback/null.py +++ b/plugins/callback/null.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/opentelemetry.py b/plugins/callback/opentelemetry.py index 7fc43d9a27..edcfb4bf4f 100644 --- a/plugins/callback/opentelemetry.py +++ b/plugins/callback/opentelemetry.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (C) 2021, Victor Martinez -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/say.py b/plugins/callback/say.py index 8d67e4336a..7c1038e74c 100644 --- a/plugins/callback/say.py +++ b/plugins/callback/say.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan, # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/selective.py b/plugins/callback/selective.py index 944d8edc7c..8a9b4b51b9 100644 --- a/plugins/callback/selective.py +++ b/plugins/callback/selective.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) Fastly, inc 2016 # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/slack.py b/plugins/callback/slack.py index 5cb402b109..ba1d6b9f9b 100644 --- a/plugins/callback/slack.py +++ b/plugins/callback/slack.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (C) 2014-2015, Matt Martz # (C) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/syslog_json.py b/plugins/callback/syslog_json.py index e6fc1ee261..6da70a0b88 100644 --- a/plugins/callback/syslog_json.py +++ b/plugins/callback/syslog_json.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/unixy.py b/plugins/callback/unixy.py index fd00fae71b..fa26be8238 100644 --- a/plugins/callback/unixy.py +++ b/plugins/callback/unixy.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Allyson Bowles <@akatch> -# Copyright: (c) 2012-2014, Michael DeHaan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Allyson Bowles <@akatch> +# Copyright (c) 2012-2014, Michael DeHaan +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/yaml.py b/plugins/callback/yaml.py index 59fb350934..2f573efd97 100644 --- a/plugins/callback/yaml.py +++ b/plugins/callback/yaml.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/connection/chroot.py b/plugins/connection/chroot.py index 295bd4046b..cbbf9612e9 100644 --- a/plugins/connection/chroot.py +++ b/plugins/connection/chroot.py @@ -4,7 +4,8 @@ # (c) 2013, Maykel Moya # (c) 2015, Toshio Kuratomi # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/connection/funcd.py b/plugins/connection/funcd.py index 94d1a3bd9c..c8639965d0 100644 --- a/plugins/connection/funcd.py +++ b/plugins/connection/funcd.py @@ -3,7 +3,8 @@ # Based on chroot.py (c) 2013, Maykel Moya # Copyright (c) 2013, Michael Scherer # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/connection/iocage.py b/plugins/connection/iocage.py index 2fd74313bc..2e2a6f0937 100644 --- a/plugins/connection/iocage.py +++ b/plugins/connection/iocage.py @@ -4,7 +4,8 @@ # (c) 2015, Toshio Kuratomi # (c) 2016, Stephan Lohse # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/connection/jail.py b/plugins/connection/jail.py index 3c820be175..d813780136 100644 --- a/plugins/connection/jail.py +++ b/plugins/connection/jail.py @@ -4,7 +4,8 @@ # Copyright (c) 2013, Michael Scherer # Copyright (c) 2015, Toshio Kuratomi # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/connection/lxc.py b/plugins/connection/lxc.py index 2aaf1619dc..adf3eec1c1 100644 --- a/plugins/connection/lxc.py +++ b/plugins/connection/lxc.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Joerg Thalheim # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/connection/lxd.py b/plugins/connection/lxd.py index 0e93b32a63..49644ef540 100644 --- a/plugins/connection/lxd.py +++ b/plugins/connection/lxd.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2016 Matt Clay # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/connection/qubes.py b/plugins/connection/qubes.py index 1de9e10011..25594e952b 100644 --- a/plugins/connection/qubes.py +++ b/plugins/connection/qubes.py @@ -2,7 +2,8 @@ # Based on the buildah connection plugin # Copyright (c) 2017 Ansible Project # 2018 Kushal Das -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # # Written by: Kushal Das (https://github.com/kushaldas) diff --git a/plugins/connection/saltstack.py b/plugins/connection/saltstack.py index 95870ad2d0..13587457e7 100644 --- a/plugins/connection/saltstack.py +++ b/plugins/connection/saltstack.py @@ -4,7 +4,8 @@ # Based on func.py # (c) 2014, Michael Scherer # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/connection/zone.py b/plugins/connection/zone.py index d7e127ca38..34827c7e37 100644 --- a/plugins/connection/zone.py +++ b/plugins/connection/zone.py @@ -5,7 +5,8 @@ # (c) 2015, Dagobert Michelsen # (c) 2015, Toshio Kuratomi # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/alicloud.py b/plugins/doc_fragments/alicloud.py index f9c9640b61..f464e178c7 100644 --- a/plugins/doc_fragments/alicloud.py +++ b/plugins/doc_fragments/alicloud.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/auth_basic.py b/plugins/doc_fragments/auth_basic.py index 6f590611d9..ae47a7ed27 100644 --- a/plugins/doc_fragments/auth_basic.py +++ b/plugins/doc_fragments/auth_basic.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/bitbucket.py b/plugins/doc_fragments/bitbucket.py index 28489356b1..9ab6fe318d 100644 --- a/plugins/doc_fragments/bitbucket.py +++ b/plugins/doc_fragments/bitbucket.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Evgeniy Krysanov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Evgeniy Krysanov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/dimensiondata.py b/plugins/doc_fragments/dimensiondata.py index 02435e25cc..f754f9cc76 100644 --- a/plugins/doc_fragments/dimensiondata.py +++ b/plugins/doc_fragments/dimensiondata.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2016, Dimension Data -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Dimension Data +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/dimensiondata_wait.py b/plugins/doc_fragments/dimensiondata_wait.py index ac3deab154..509f5c56fb 100644 --- a/plugins/doc_fragments/dimensiondata_wait.py +++ b/plugins/doc_fragments/dimensiondata_wait.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2016, Dimension Data -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Dimension Data +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/emc.py b/plugins/doc_fragments/emc.py index cce76823fe..e9e57a2c10 100644 --- a/plugins/doc_fragments/emc.py +++ b/plugins/doc_fragments/emc.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Luca Lorenzetto (@remix_tj) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Luca Lorenzetto (@remix_tj) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/gitlab.py b/plugins/doc_fragments/gitlab.py index 21e4584fe1..76c1fac923 100644 --- a/plugins/doc_fragments/gitlab.py +++ b/plugins/doc_fragments/gitlab.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/hpe3par.py b/plugins/doc_fragments/hpe3par.py index ad445205d8..96e53846e1 100644 --- a/plugins/doc_fragments/hpe3par.py +++ b/plugins/doc_fragments/hpe3par.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/hwc.py b/plugins/doc_fragments/hwc.py index ecba2adde8..d3cebb6dbc 100644 --- a/plugins/doc_fragments/hwc.py +++ b/plugins/doc_fragments/hwc.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Huawei Inc. -# GNU General Public License v3.0+ -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Huawei Inc. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/ibm_storage.py b/plugins/doc_fragments/ibm_storage.py index 0d8eb5fe22..ec3b0a0e05 100644 --- a/plugins/doc_fragments/ibm_storage.py +++ b/plugins/doc_fragments/ibm_storage.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, IBM CORPORATION +# Copyright (c) 2018, IBM CORPORATION # Author(s): Tzur Eliyahu -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/doc_fragments/influxdb.py b/plugins/doc_fragments/influxdb.py index a31c84cbb1..133041a628 100644 --- a/plugins/doc_fragments/influxdb.py +++ b/plugins/doc_fragments/influxdb.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# Copyright: (c) 2017, Abhijeet Kasurde (akasurde@redhat.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# Copyright (c) 2017, Abhijeet Kasurde (akasurde@redhat.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/ipa.py b/plugins/doc_fragments/ipa.py index 47bcee60ba..d799bac184 100644 --- a/plugins/doc_fragments/ipa.py +++ b/plugins/doc_fragments/ipa.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017-18, Ansible Project -# Copyright: (c) 2017-18, Abhijeet Kasurde (akasurde@redhat.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017-18, Ansible Project +# Copyright (c) 2017-18, Abhijeet Kasurde (akasurde@redhat.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/keycloak.py b/plugins/doc_fragments/keycloak.py index 3c9070cbc7..3ef0aeb9e3 100644 --- a/plugins/doc_fragments/keycloak.py +++ b/plugins/doc_fragments/keycloak.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Eike Frost -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Eike Frost +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index e79fe3a681..d5c8107d35 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Peter Sagerson -# Copyright: (c) 2016, Jiri Tyr -# Copyright: (c) 2017-2018 Keller Fuchs (@KellerFuchs) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Peter Sagerson +# Copyright (c) 2016, Jiri Tyr +# Copyright (c) 2017-2018 Keller Fuchs (@KellerFuchs) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/lxca_common.py b/plugins/doc_fragments/lxca_common.py index c72aa28765..b5e7d72948 100644 --- a/plugins/doc_fragments/lxca_common.py +++ b/plugins/doc_fragments/lxca_common.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (C) 2017 Lenovo, Inc. -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/manageiq.py b/plugins/doc_fragments/manageiq.py index b610b512b7..be0dd70694 100644 --- a/plugins/doc_fragments/manageiq.py +++ b/plugins/doc_fragments/manageiq.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Daniel Korn -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Daniel Korn +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/nomad.py b/plugins/doc_fragments/nomad.py index 3845c54120..b19404e830 100644 --- a/plugins/doc_fragments/nomad.py +++ b/plugins/doc_fragments/nomad.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020 FERREIRA Christophe -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020 FERREIRA Christophe +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/oneview.py b/plugins/doc_fragments/oneview.py index 0d385e99aa..0ab50e637b 100644 --- a/plugins/doc_fragments/oneview.py +++ b/plugins/doc_fragments/oneview.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2016-2017, Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016-2017, Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/online.py b/plugins/doc_fragments/online.py index 4ad35bab20..7c8408ae99 100644 --- a/plugins/doc_fragments/online.py +++ b/plugins/doc_fragments/online.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/opennebula.py b/plugins/doc_fragments/opennebula.py index 08b614a6fc..91bfd09529 100644 --- a/plugins/doc_fragments/opennebula.py +++ b/plugins/doc_fragments/opennebula.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, www.privaz.io Valletech AB -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, www.privaz.io Valletech AB +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/openswitch.py b/plugins/doc_fragments/openswitch.py index 7ab7c15540..317ec904e5 100644 --- a/plugins/doc_fragments/openswitch.py +++ b/plugins/doc_fragments/openswitch.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Peter Sprygada -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/oracle.py b/plugins/doc_fragments/oracle.py index 94999c04ec..9ca4706baa 100644 --- a/plugins/doc_fragments/oracle.py +++ b/plugins/doc_fragments/oracle.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/oracle_creatable_resource.py b/plugins/doc_fragments/oracle_creatable_resource.py index 211ca6f9c1..7c1551ec06 100644 --- a/plugins/doc_fragments/oracle_creatable_resource.py +++ b/plugins/doc_fragments/oracle_creatable_resource.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/oracle_display_name_option.py b/plugins/doc_fragments/oracle_display_name_option.py index ff70d45dd9..eae5f44593 100644 --- a/plugins/doc_fragments/oracle_display_name_option.py +++ b/plugins/doc_fragments/oracle_display_name_option.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/oracle_name_option.py b/plugins/doc_fragments/oracle_name_option.py index 8c4f9c1e39..362071f946 100644 --- a/plugins/doc_fragments/oracle_name_option.py +++ b/plugins/doc_fragments/oracle_name_option.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/oracle_tags.py b/plugins/doc_fragments/oracle_tags.py index f95b22c8ed..3789dbe912 100644 --- a/plugins/doc_fragments/oracle_tags.py +++ b/plugins/doc_fragments/oracle_tags.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/oracle_wait_options.py b/plugins/doc_fragments/oracle_wait_options.py index 0312755ffa..6ca2a8c033 100644 --- a/plugins/doc_fragments/oracle_wait_options.py +++ b/plugins/doc_fragments/oracle_wait_options.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/pritunl.py b/plugins/doc_fragments/pritunl.py index e2eaff2889..51ab979b54 100644 --- a/plugins/doc_fragments/pritunl.py +++ b/plugins/doc_fragments/pritunl.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/doc_fragments/proxmox.py b/plugins/doc_fragments/proxmox.py index 165a78527a..5584568b07 100644 --- a/plugins/doc_fragments/proxmox.py +++ b/plugins/doc_fragments/proxmox.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/purestorage.py b/plugins/doc_fragments/purestorage.py index f35f026711..8db8c3b3da 100644 --- a/plugins/doc_fragments/purestorage.py +++ b/plugins/doc_fragments/purestorage.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Simon Dodsley -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Simon Dodsley +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/rackspace.py b/plugins/doc_fragments/rackspace.py index 0f57dd8899..9e22316022 100644 --- a/plugins/doc_fragments/rackspace.py +++ b/plugins/doc_fragments/rackspace.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Matt Martz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Matt Martz +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/redis.py b/plugins/doc_fragments/redis.py index e7af25ec8f..2d40330519 100644 --- a/plugins/doc_fragments/redis.py +++ b/plugins/doc_fragments/redis.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/rundeck.py b/plugins/doc_fragments/rundeck.py index 056a54f37f..62c8648e96 100644 --- a/plugins/doc_fragments/rundeck.py +++ b/plugins/doc_fragments/rundeck.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Phillipe Smith -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Phillipe Smith +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/scaleway.py b/plugins/doc_fragments/scaleway.py index c1e1b13d9d..187288fbf8 100644 --- a/plugins/doc_fragments/scaleway.py +++ b/plugins/doc_fragments/scaleway.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Yanis Guenane +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/utm.py b/plugins/doc_fragments/utm.py index 413fb49675..6700ac5320 100644 --- a/plugins/doc_fragments/utm.py +++ b/plugins/doc_fragments/utm.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/vexata.py b/plugins/doc_fragments/vexata.py index d541d5ad85..31e2f24f74 100644 --- a/plugins/doc_fragments/vexata.py +++ b/plugins/doc_fragments/vexata.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Sandeep Kasargod -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Sandeep Kasargod +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/doc_fragments/xenserver.py b/plugins/doc_fragments/xenserver.py index 747bf02f1b..66522fcf4c 100644 --- a/plugins/doc_fragments/xenserver.py +++ b/plugins/doc_fragments/xenserver.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/counter.py b/plugins/filter/counter.py index 717238d24e..1b79294b59 100644 --- a/plugins/filter/counter.py +++ b/plugins/filter/counter.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Remy Keil -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/dict.py b/plugins/filter/dict.py index 866e8f8dc2..720c9def96 100644 --- a/plugins/filter/dict.py +++ b/plugins/filter/dict.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Felix Fontein +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/filter/dict_kv.py b/plugins/filter/dict_kv.py index 1a0957819e..59595f9573 100644 --- a/plugins/filter/dict_kv.py +++ b/plugins/filter/dict_kv.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2020 Stanislav German-Evtushenko (@giner) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/from_csv.py b/plugins/filter/from_csv.py index 269cba046f..6472b67b1a 100644 --- a/plugins/filter/from_csv.py +++ b/plugins/filter/from_csv.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andrew Pantuso (@ajpantuso) -# Copyright: (c) 2018, Dag Wieers (@dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) +# Copyright (c) 2018, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/filter/groupby_as_dict.py b/plugins/filter/groupby_as_dict.py index 386a8b44cf..4a8f4c6dc1 100644 --- a/plugins/filter/groupby_as_dict.py +++ b/plugins/filter/groupby_as_dict.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/hashids.py b/plugins/filter/hashids.py index c4735afeae..45fba83c03 100644 --- a/plugins/filter/hashids.py +++ b/plugins/filter/hashids.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andrew Pantuso (@ajpantuso) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/filter/lists_mergeby.py b/plugins/filter/lists_mergeby.py index 4848cc8785..a89039ed89 100644 --- a/plugins/filter/lists_mergeby.py +++ b/plugins/filter/lists_mergeby.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020-2022, Vladimir Botka -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/time.py b/plugins/filter/time.py index f069780fe7..25970cd260 100644 --- a/plugins/filter/time.py +++ b/plugins/filter/time.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, René Moser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/unicode_normalize.py b/plugins/filter/unicode_normalize.py index 30aed2005a..dfbf20c573 100644 --- a/plugins/filter/unicode_normalize.py +++ b/plugins/filter/unicode_normalize.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andrew Pantuso (@ajpantuso) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/filter/version_sort.py b/plugins/filter/version_sort.py index 9d21691085..09eedbf563 100644 --- a/plugins/filter/version_sort.py +++ b/plugins/filter/version_sort.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2021 Eric Lavarde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/cobbler.py b/plugins/inventory/cobbler.py index 56b52ee1e2..b3288b27d4 100644 --- a/plugins/inventory/cobbler.py +++ b/plugins/inventory/cobbler.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (C) 2020 Orion Poplawski # Copyright (c) 2020 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/gitlab_runners.py b/plugins/inventory/gitlab_runners.py index ac0fa21ad9..8279d8e781 100644 --- a/plugins/inventory/gitlab_runners.py +++ b/plugins/inventory/gitlab_runners.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Stefan Heitmueller # Copyright (c) 2018 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/inventory/icinga2.py b/plugins/inventory/icinga2.py index 5ae565beb9..70e0f57332 100644 --- a/plugins/inventory/icinga2.py +++ b/plugins/inventory/icinga2.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Cliff Hults # Copyright (c) 2021 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/linode.py b/plugins/inventory/linode.py index 33ecc5135c..8790da7079 100644 --- a/plugins/inventory/linode.py +++ b/plugins/inventory/linode.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/lxd.py b/plugins/inventory/lxd.py index 788c8852bf..291d12b037 100644 --- a/plugins/inventory/lxd.py +++ b/plugins/inventory/lxd.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Frank Dornheim -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Frank Dornheim +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/nmap.py b/plugins/inventory/nmap.py index 6d1779bb48..3c3b3f8e41 100644 --- a/plugins/inventory/nmap.py +++ b/plugins/inventory/nmap.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/online.py b/plugins/inventory/online.py index 00454f558c..f0424ea5e8 100644 --- a/plugins/inventory/online.py +++ b/plugins/inventory/online.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/opennebula.py b/plugins/inventory/opennebula.py index 7822240627..f46ad73c57 100644 --- a/plugins/inventory/opennebula.py +++ b/plugins/inventory/opennebula.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, FELDSAM s.r.o. - FeldHost™ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index a68cac3c88..e13a08a55c 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (C) 2016 Guido Günther , Daniel Lobato Garcia # Copyright (c) 2018 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/scaleway.py b/plugins/inventory/scaleway.py index d48cc97a1d..4404038270 100644 --- a/plugins/inventory/scaleway.py +++ b/plugins/inventory/scaleway.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/inventory/stackpath_compute.py b/plugins/inventory/stackpath_compute.py index d777875578..39f880e820 100644 --- a/plugins/inventory/stackpath_compute.py +++ b/plugins/inventory/stackpath_compute.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020 Shay Rybak # Copyright (c) 2020 Ansible Project -# GNU General Public License v3.0+ -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/virtualbox.py b/plugins/inventory/virtualbox.py index 89a77c88bb..a8d186bb30 100644 --- a/plugins/inventory/virtualbox.py +++ b/plugins/inventory/virtualbox.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/inventory/xen_orchestra.py b/plugins/inventory/xen_orchestra.py index cc2346a1aa..0b064b14db 100644 --- a/plugins/inventory/xen_orchestra.py +++ b/plugins/inventory/xen_orchestra.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/bitwarden.py b/plugins/lookup/bitwarden.py index 29a5330243..e06d81f8fb 100644 --- a/plugins/lookup/bitwarden.py +++ b/plugins/lookup/bitwarden.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2022, Jonathan Lung -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/cartesian.py b/plugins/lookup/cartesian.py index 98043eba34..9445e3d916 100644 --- a/plugins/lookup/cartesian.py +++ b/plugins/lookup/cartesian.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Bradley Young # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/chef_databag.py b/plugins/lookup/chef_databag.py index f3438f6206..ecae14cfbb 100644 --- a/plugins/lookup/chef_databag.py +++ b/plugins/lookup/chef_databag.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Josh Bradley # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/collection_version.py b/plugins/lookup/collection_version.py index bb67b3b153..15b33f78b0 100644 --- a/plugins/lookup/collection_version.py +++ b/plugins/lookup/collection_version.py @@ -1,5 +1,6 @@ # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/consul_kv.py b/plugins/lookup/consul_kv.py index 3ad03bfe40..1a2a321b23 100644 --- a/plugins/lookup/consul_kv.py +++ b/plugins/lookup/consul_kv.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Steve Gargan # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/credstash.py b/plugins/lookup/credstash.py index 143c66c112..774d9eabbc 100644 --- a/plugins/lookup/credstash.py +++ b/plugins/lookup/credstash.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Ensighten # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/cyberarkpassword.py b/plugins/lookup/cyberarkpassword.py index 663ec38808..db503baef4 100644 --- a/plugins/lookup/cyberarkpassword.py +++ b/plugins/lookup/cyberarkpassword.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Edward Nunez # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/dependent.py b/plugins/lookup/dependent.py index 1fb75ece66..d9ab6ea330 100644 --- a/plugins/lookup/dependent.py +++ b/plugins/lookup/dependent.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015-2021, Felix Fontein # (c) 2018 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index c192028686..08c297e7be 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Jan-Piet Mens # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/dnstxt.py b/plugins/lookup/dnstxt.py index e724f8c8f7..97599cc183 100644 --- a/plugins/lookup/dnstxt.py +++ b/plugins/lookup/dnstxt.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2012, Jan-Piet Mens # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/dsv.py b/plugins/lookup/dsv.py index 829ba4582b..91a9d99212 100644 --- a/plugins/lookup/dsv.py +++ b/plugins/lookup/dsv.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Adam Migus -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Adam Migus +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/lookup/etcd3.py b/plugins/lookup/etcd3.py index a34fae7bf3..f15dd9c94d 100644 --- a/plugins/lookup/etcd3.py +++ b/plugins/lookup/etcd3.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # # (c) 2020, SCC France, Eric Belhomme -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/lookup/filetree.py b/plugins/lookup/filetree.py index 1c83486b05..d8f9fde78d 100644 --- a/plugins/lookup/filetree.py +++ b/plugins/lookup/filetree.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2016 Dag Wieers # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/flattened.py b/plugins/lookup/flattened.py index edc546ff83..38c3165434 100644 --- a/plugins/lookup/flattened.py +++ b/plugins/lookup/flattened.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Serge van Ginderachter # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/hiera.py b/plugins/lookup/hiera.py index 5b440469eb..8aafe3bd82 100644 --- a/plugins/lookup/hiera.py +++ b/plugins/lookup/hiera.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Juan Manuel Parrilla # (c) 2012-17 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/keyring.py b/plugins/lookup/keyring.py index b846e29424..2d90ba7602 100644 --- a/plugins/lookup/keyring.py +++ b/plugins/lookup/keyring.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Samuel Boucher # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/lastpass.py b/plugins/lookup/lastpass.py index d3f04e6c4f..530be72ce0 100644 --- a/plugins/lookup/lastpass.py +++ b/plugins/lookup/lastpass.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Andrew Zenk # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/lmdb_kv.py b/plugins/lookup/lmdb_kv.py index 9dd46e338a..0f5cce793e 100644 --- a/plugins/lookup/lmdb_kv.py +++ b/plugins/lookup/lmdb_kv.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2017-2018, Jan-Piet Mens # (c) 2018 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/manifold.py b/plugins/lookup/manifold.py index 01bb13cf0b..c4c242ba38 100644 --- a/plugins/lookup/manifold.py +++ b/plugins/lookup/manifold.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2018, Arigato Machine Inc. # (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index e0be0cd27e..b6b9374eba 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Scott Buchanan -# Copyright: (c) 2016, Andrew Zenk (lastpass.py used as starting point) -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Scott Buchanan +# Copyright (c) 2016, Andrew Zenk (lastpass.py used as starting point) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/onepassword_raw.py b/plugins/lookup/onepassword_raw.py index d1958f78cd..d9abaf645e 100644 --- a/plugins/lookup/onepassword_raw.py +++ b/plugins/lookup/onepassword_raw.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Scott Buchanan -# Copyright: (c) 2016, Andrew Zenk (lastpass.py used as starting point) -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Scott Buchanan +# Copyright (c) 2016, Andrew Zenk (lastpass.py used as starting point) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 5ead6ce0e3..f5579e3c99 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Patrick Deelman # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/random_pet.py b/plugins/lookup/random_pet.py index 6caf178e4b..71a62cbca0 100644 --- a/plugins/lookup/random_pet.py +++ b/plugins/lookup/random_pet.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Abhijeet Kasurde -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Abhijeet Kasurde +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/random_string.py b/plugins/lookup/random_string.py index d67a75ed99..199aa13964 100644 --- a/plugins/lookup/random_string.py +++ b/plugins/lookup/random_string.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Abhijeet Kasurde -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Abhijeet Kasurde +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/lookup/random_words.py b/plugins/lookup/random_words.py index a2381aa38f..d80c5855b4 100644 --- a/plugins/lookup/random_words.py +++ b/plugins/lookup/random_words.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """The community.general.random_words Ansible lookup plugin.""" diff --git a/plugins/lookup/redis.py b/plugins/lookup/redis.py index 8de7e04cce..57708a058c 100644 --- a/plugins/lookup/redis.py +++ b/plugins/lookup/redis.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2012, Jan-Piet Mens # (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/revbitspss.py b/plugins/lookup/revbitspss.py index b5be15f7a6..552970804e 100644 --- a/plugins/lookup/revbitspss.py +++ b/plugins/lookup/revbitspss.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, RevBits -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, RevBits +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/lookup/shelvefile.py b/plugins/lookup/shelvefile.py index 56cfdf1143..5534742838 100644 --- a/plugins/lookup/shelvefile.py +++ b/plugins/lookup/shelvefile.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Alejandro Guirao # (c) 2012-17 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/lookup/tss.py b/plugins/lookup/tss.py index 880e6e3833..756f168e5b 100644 --- a/plugins/lookup/tss.py +++ b/plugins/lookup/tss.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Adam Migus -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Adam Migus +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/_mount.py b/plugins/module_utils/_mount.py index a65173af48..5a3dece95e 100644 --- a/plugins/module_utils/_mount.py +++ b/plugins/module_utils/_mount.py @@ -3,7 +3,7 @@ # This particular file snippet, and this file snippet only, is based on # Lib/posixpath.py of cpython # It is licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -# (See PSF-license.txt in this collection) +# (See LICENSES/PSF-2.0.txt in this collection) from __future__ import absolute_import, division, print_function diff --git a/plugins/module_utils/alicloud_ecs.py b/plugins/module_utils/alicloud_ecs.py index aed480fce8..8532d25c1c 100644 --- a/plugins/module_utils/alicloud_ecs.py +++ b/plugins/module_utils/alicloud_ecs.py @@ -7,7 +7,8 @@ # # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/cloud.py b/plugins/module_utils/cloud.py index 7619023a3c..2e91252b7f 100644 --- a/plugins/module_utils/cloud.py +++ b/plugins/module_utils/cloud.py @@ -2,7 +2,8 @@ # # (c) 2016 Allen Sanabria, # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index 70187e68ed..41449f09a6 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/csv.py b/plugins/module_utils/csv.py index 86c4694524..50d2cb3868 100644 --- a/plugins/module_utils/csv.py +++ b/plugins/module_utils/csv.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andrew Pantuso (@ajpantuso) -# Copyright: (c) 2018, Dag Wieers (@dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) +# Copyright (c) 2018, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/database.py b/plugins/module_utils/database.py index 2f20f5e4c4..db1dc9c23d 100644 --- a/plugins/module_utils/database.py +++ b/plugins/module_utils/database.py @@ -7,7 +7,8 @@ # # Copyright (c) 2014, Toshio Kuratomi # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/dimensiondata.py b/plugins/module_utils/dimensiondata.py index bcb02e8476..308615bfe4 100644 --- a/plugins/module_utils/dimensiondata.py +++ b/plugins/module_utils/dimensiondata.py @@ -2,7 +2,8 @@ # # Copyright (c) 2016 Dimension Data # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # Authors: # - Aimon Bustardo diff --git a/plugins/module_utils/gandi_livedns_api.py b/plugins/module_utils/gandi_livedns_api.py index 58f9796c46..53245d44d0 100644 --- a/plugins/module_utils/gandi_livedns_api.py +++ b/plugins/module_utils/gandi_livedns_api.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019 Gregory Thiemonge -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2019 Gregory Thiemonge +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/gconftool2.py b/plugins/module_utils/gconftool2.py index f4ee34325d..5a2f727b89 100644 --- a/plugins/module_utils/gconftool2.py +++ b/plugins/module_utils/gconftool2.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/gitlab.py b/plugins/module_utils/gitlab.py index 21af10b5cd..d3c74f5c3b 100644 --- a/plugins/module_utils/gitlab.py +++ b/plugins/module_utils/gitlab.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# Copyright: (c) 2018, Marcus Watkins -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# Copyright (c) 2018, Marcus Watkins +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/heroku.py b/plugins/module_utils/heroku.py index f0ebeae760..f5ed3e2b89 100644 --- a/plugins/module_utils/heroku.py +++ b/plugins/module_utils/heroku.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2018, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/hwc_utils.py b/plugins/module_utils/hwc_utils.py index 7977554b9b..a21cc8e48f 100644 --- a/plugins/module_utils/hwc_utils.py +++ b/plugins/module_utils/hwc_utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c), Google Inc, 2017 -# Simplified BSD License (see simplified_bsd.txt or -# https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/ibm_sa_utils.py b/plugins/module_utils/ibm_sa_utils.py index ae2e412c28..abbb57f520 100644 --- a/plugins/module_utils/ibm_sa_utils.py +++ b/plugins/module_utils/ibm_sa_utils.py @@ -2,7 +2,8 @@ # Copyright (C) 2018 IBM CORPORATION # Author(s): Tzur Eliyahu # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/ilo_redfish_utils.py b/plugins/module_utils/ilo_redfish_utils.py index 7b425149ba..fb14ae87f0 100644 --- a/plugins/module_utils/ilo_redfish_utils.py +++ b/plugins/module_utils/ilo_redfish_utils.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021-2022 Hewlett Packard Enterprise, Inc. All rights reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/influxdb.py b/plugins/module_utils/influxdb.py index ca791b8cdb..9a30e76428 100644 --- a/plugins/module_utils/influxdb.py +++ b/plugins/module_utils/influxdb.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2017, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/ipa.py b/plugins/module_utils/ipa.py index a7674592f5..eda9b4132b 100644 --- a/plugins/module_utils/ipa.py +++ b/plugins/module_utils/ipa.py @@ -7,7 +7,8 @@ # # Copyright (c) 2016 Thomas Krahn (@Nosmoht) # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/known_hosts.py b/plugins/module_utils/known_hosts.py index 1679c6f6a2..25dd3e174e 100644 --- a/plugins/module_utils/known_hosts.py +++ b/plugins/module_utils/known_hosts.py @@ -7,7 +7,8 @@ # # Copyright (c), Michael DeHaan , 2012-2013 # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/ldap.py b/plugins/module_utils/ldap.py index 30dbaf7640..daf89f16d1 100644 --- a/plugins/module_utils/ldap.py +++ b/plugins/module_utils/ldap.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Peter Sagerson -# Copyright: (c) 2016, Jiri Tyr -# Copyright: (c) 2017-2018 Keller Fuchs (@KellerFuchs) +# Copyright (c) 2016, Peter Sagerson +# Copyright (c) 2016, Jiri Tyr +# Copyright (c) 2017-2018 Keller Fuchs (@KellerFuchs) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/linode.py b/plugins/module_utils/linode.py index a13e18e3d3..cedd3e0d5c 100644 --- a/plugins/module_utils/linode.py +++ b/plugins/module_utils/linode.py @@ -7,7 +7,8 @@ # # Copyright (c), Luke Murphy @decentral1se # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/lxd.py b/plugins/module_utils/lxd.py index 4574a4eac1..819825c19c 100644 --- a/plugins/module_utils/lxd.py +++ b/plugins/module_utils/lxd.py @@ -8,7 +8,8 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/manageiq.py b/plugins/module_utils/manageiq.py index bba8cb22b1..fd2652e3b4 100644 --- a/plugins/module_utils/manageiq.py +++ b/plugins/module_utils/manageiq.py @@ -8,7 +8,8 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/memset.py b/plugins/module_utils/memset.py index 5a0d3c19c4..a66d375802 100644 --- a/plugins/module_utils/memset.py +++ b/plugins/module_utils/memset.py @@ -7,7 +7,8 @@ # # Copyright (c) 2018, Simon Weald # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/mh/base.py b/plugins/module_utils/mh/base.py index dec81a4c12..b10762eaba 100644 --- a/plugins/module_utils/mh/base.py +++ b/plugins/module_utils/mh/base.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/deco.py b/plugins/module_utils/mh/deco.py index b46d0a253d..3073e4e9e7 100644 --- a/plugins/module_utils/mh/deco.py +++ b/plugins/module_utils/mh/deco.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/exceptions.py b/plugins/module_utils/mh/exceptions.py index 2ee548ff41..68af5ba672 100644 --- a/plugins/module_utils/mh/exceptions.py +++ b/plugins/module_utils/mh/exceptions.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/cmd.py b/plugins/module_utils/mh/mixins/cmd.py index 700abc161a..da2629f9fe 100644 --- a/plugins/module_utils/mh/mixins/cmd.py +++ b/plugins/module_utils/mh/mixins/cmd.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/deprecate_attrs.py b/plugins/module_utils/mh/mixins/deprecate_attrs.py index 73643d4a92..c3bfb06c66 100644 --- a/plugins/module_utils/mh/mixins/deprecate_attrs.py +++ b/plugins/module_utils/mh/mixins/deprecate_attrs.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/deps.py b/plugins/module_utils/mh/mixins/deps.py index b60f50d1d4..bab8c090bb 100644 --- a/plugins/module_utils/mh/mixins/deps.py +++ b/plugins/module_utils/mh/mixins/deps.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/state.py b/plugins/module_utils/mh/mixins/state.py index 0b514ca257..4e29379890 100644 --- a/plugins/module_utils/mh/mixins/state.py +++ b/plugins/module_utils/mh/mixins/state.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/mixins/vars.py b/plugins/module_utils/mh/mixins/vars.py index 81e55feb8f..6dfb29bab8 100644 --- a/plugins/module_utils/mh/mixins/vars.py +++ b/plugins/module_utils/mh/mixins/vars.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 57fa163a79..4251285751 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/module_helper.py b/plugins/module_utils/module_helper.py index 2968bfaf37..4cda4175c7 100644 --- a/plugins/module_utils/module_helper.py +++ b/plugins/module_utils/module_helper.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky -# Copyright: (c) 2020, Ansible Project -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2020, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/net_tools/pritunl/api.py b/plugins/module_utils/net_tools/pritunl/api.py index 91f97ecc96..cd2abc568e 100644 --- a/plugins/module_utils/net_tools/pritunl/api.py +++ b/plugins/module_utils/net_tools/pritunl/api.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """ Pritunl API that offers CRUD operations on Pritunl Organizations and Users diff --git a/plugins/module_utils/oneandone.py b/plugins/module_utils/oneandone.py index 0db673be87..512bb08467 100644 --- a/plugins/module_utils/oneandone.py +++ b/plugins/module_utils/oneandone.py @@ -5,7 +5,8 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/onepassword.py b/plugins/module_utils/onepassword.py index dbf21e99b5..98f9aa4fb6 100644 --- a/plugins/module_utils/onepassword.py +++ b/plugins/module_utils/onepassword.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/oneview.py b/plugins/module_utils/oneview.py index a7b98108a0..dfd00c514e 100644 --- a/plugins/module_utils/oneview.py +++ b/plugins/module_utils/oneview.py @@ -7,7 +7,8 @@ # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/online.py b/plugins/module_utils/online.py index c364cea6f1..596f4553b3 100644 --- a/plugins/module_utils/online.py +++ b/plugins/module_utils/online.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/opennebula.py b/plugins/module_utils/opennebula.py index b0adb8d69b..b27ec229bf 100644 --- a/plugins/module_utils/opennebula.py +++ b/plugins/module_utils/opennebula.py @@ -2,7 +2,8 @@ # # Copyright 2018 www.privaz.io Valletech AB # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/oracle/oci_utils.py b/plugins/module_utils/oracle/oci_utils.py index 0c7e0ec143..76fb45324b 100644 --- a/plugins/module_utils/oracle/oci_utils.py +++ b/plugins/module_utils/oracle/oci_utils.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, 2018, 2019 Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/proxmox.py b/plugins/module_utils/proxmox.py index 56f0b35e7f..65e8eb4723 100644 --- a/plugins/module_utils/proxmox.py +++ b/plugins/module_utils/proxmox.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2020, Tristan Le Guern -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Tristan Le Guern +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/pure.py b/plugins/module_utils/pure.py index b97045dfaf..c9914c38b5 100644 --- a/plugins/module_utils/pure.py +++ b/plugins/module_utils/pure.py @@ -7,7 +7,8 @@ # to the complete work. # # Copyright (c), Simon Dodsley ,2017 -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/rax.py b/plugins/module_utils/rax.py index 17b031898a..29e9d794f1 100644 --- a/plugins/module_utils/rax.py +++ b/plugins/module_utils/rax.py @@ -7,7 +7,8 @@ # # Copyright (c), Michael DeHaan , 2012-2013 # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 10afeb3b61..15763aebee 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/redhat.py b/plugins/module_utils/redhat.py index b3e24204b0..f82cffaa0d 100644 --- a/plugins/module_utils/redhat.py +++ b/plugins/module_utils/redhat.py @@ -7,7 +7,8 @@ # # Copyright (c), James Laska # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/redis.py b/plugins/module_utils/redis.py index 8f035614f0..808acd7c6c 100644 --- a/plugins/module_utils/redis.py +++ b/plugins/module_utils/redis.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/module_utils/remote_management/lxca/common.py b/plugins/module_utils/remote_management/lxca/common.py index 5517f769b8..0fe8c32077 100644 --- a/plugins/module_utils/remote_management/lxca/common.py +++ b/plugins/module_utils/remote_management/lxca/common.py @@ -6,7 +6,8 @@ # own license to the complete work. # # Copyright (C) 2017 Lenovo, Inc. -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause # # Contains LXCA common class # Lenovo xClarity Administrator (LXCA) diff --git a/plugins/module_utils/rundeck.py b/plugins/module_utils/rundeck.py index afbbb48108..dd83eeccaf 100644 --- a/plugins/module_utils/rundeck.py +++ b/plugins/module_utils/rundeck.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Phillipe Smith -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Phillipe Smith +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/saslprep.py b/plugins/module_utils/saslprep.py index 804200c374..29bb49b702 100644 --- a/plugins/module_utils/saslprep.py +++ b/plugins/module_utils/saslprep.py @@ -6,9 +6,10 @@ # still belong to the author of the module, and may assign their own license # to the complete work. -# Copyright: (c) 2020, Andrew Klychkov (@Andersson007) +# Copyright (c) 2020, Andrew Klychkov (@Andersson007) # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/source_control/bitbucket.py b/plugins/module_utils/source_control/bitbucket.py index 1846bd74ff..1a143c5433 100644 --- a/plugins/module_utils/source_control/bitbucket.py +++ b/plugins/module_utils/source_control/bitbucket.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/storage/emc/emc_vnx.py b/plugins/module_utils/storage/emc/emc_vnx.py index 0ad744d2ec..a4b312e519 100644 --- a/plugins/module_utils/storage/emc/emc_vnx.py +++ b/plugins/module_utils/storage/emc/emc_vnx.py @@ -7,7 +7,8 @@ # # (c) 2018 Luca 'remix_tj' Lorenzetto # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/storage/hpe3par/hpe3par.py b/plugins/module_utils/storage/hpe3par/hpe3par.py index cce87b026b..3d164ce746 100644 --- a/plugins/module_utils/storage/hpe3par/hpe3par.py +++ b/plugins/module_utils/storage/hpe3par/hpe3par.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Hewlett Packard Enterprise Development LP -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2018, Hewlett Packard Enterprise Development LP +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/univention_umc.py b/plugins/module_utils/univention_umc.py index c791f880ef..b08f39e306 100644 --- a/plugins/module_utils/univention_umc.py +++ b/plugins/module_utils/univention_umc.py @@ -9,7 +9,8 @@ # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/utm_utils.py b/plugins/module_utils/utm_utils.py index 8af14ca2b3..712450cd2a 100644 --- a/plugins/module_utils/utm_utils.py +++ b/plugins/module_utils/utm_utils.py @@ -5,9 +5,10 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Copyright: (c) 2018, Johannes Brunswicker +# Copyright (c) 2018, Johannes Brunswicker # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/version.py b/plugins/module_utils/version.py index dc59c43712..b671e59628 100644 --- a/plugins/module_utils/version.py +++ b/plugins/module_utils/version.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Felix Fontein +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """Provide version object to compare version numbers.""" diff --git a/plugins/module_utils/vexata.py b/plugins/module_utils/vexata.py index 2a43767391..2ea56a3b05 100644 --- a/plugins/module_utils/vexata.py +++ b/plugins/module_utils/vexata.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Sandeep Kasargod -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Copyright (c) 2019, Sandeep Kasargod +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/wdc_redfish_utils.py b/plugins/module_utils/wdc_redfish_utils.py index f2d3353291..44289e86d7 100644 --- a/plugins/module_utils/wdc_redfish_utils.py +++ b/plugins/module_utils/wdc_redfish_utils.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022 Western Digital Corporation -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/xenserver.py b/plugins/module_utils/xenserver.py index 015b10215e..3176b56289 100644 --- a/plugins/module_utils/xenserver.py +++ b/plugins/module_utils/xenserver.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2018, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/xfconf.py b/plugins/module_utils/xfconf.py index 5a4b4f05c6..ae331e4404 100644 --- a/plugins/module_utils/xfconf.py +++ b/plugins/module_utils/xfconf.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/alicloud/ali_instance.py b/plugins/modules/cloud/alicloud/ali_instance.py index 09754ccdba..4a5ec24fd0 100644 --- a/plugins/modules/cloud/alicloud/ali_instance.py +++ b/plugins/modules/cloud/alicloud/ali_instance.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Ansible # diff --git a/plugins/modules/cloud/alicloud/ali_instance_info.py b/plugins/modules/cloud/alicloud/ali_instance_info.py index 2331db69a6..e40605fe06 100644 --- a/plugins/modules/cloud/alicloud/ali_instance_info.py +++ b/plugins/modules/cloud/alicloud/ali_instance_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Ansible # diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index b7e222842e..467dd08767 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/atomic/atomic_host.py b/plugins/modules/cloud/atomic/atomic_host.py index 85b00f917a..5aa389e174 100644 --- a/plugins/modules/cloud/atomic/atomic_host.py +++ b/plugins/modules/cloud/atomic/atomic_host.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/cloud/atomic/atomic_image.py index de1b511e18..f6ea19f90f 100644 --- a/plugins/modules/cloud/atomic/atomic_image.py +++ b/plugins/modules/cloud/atomic/atomic_image.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_aa_policy.py b/plugins/modules/cloud/centurylink/clc_aa_policy.py index 416a4a6c1f..41a1a96663 100644 --- a/plugins/modules/cloud/centurylink/clc_aa_policy.py +++ b/plugins/modules/cloud/centurylink/clc_aa_policy.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_alert_policy.py b/plugins/modules/cloud/centurylink/clc_alert_policy.py index 424e73cce2..95945703d1 100644 --- a/plugins/modules/cloud/centurylink/clc_alert_policy.py +++ b/plugins/modules/cloud/centurylink/clc_alert_policy.py @@ -3,7 +3,8 @@ # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_blueprint_package.py b/plugins/modules/cloud/centurylink/clc_blueprint_package.py index 9e0bfa809c..85f3c890fe 100644 --- a/plugins/modules/cloud/centurylink/clc_blueprint_package.py +++ b/plugins/modules/cloud/centurylink/clc_blueprint_package.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_firewall_policy.py b/plugins/modules/cloud/centurylink/clc_firewall_policy.py index f1f4a2f22a..c2bc415a30 100644 --- a/plugins/modules/cloud/centurylink/clc_firewall_policy.py +++ b/plugins/modules/cloud/centurylink/clc_firewall_policy.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_group.py b/plugins/modules/cloud/centurylink/clc_group.py index 5e131719f5..24e29c3e19 100644 --- a/plugins/modules/cloud/centurylink/clc_group.py +++ b/plugins/modules/cloud/centurylink/clc_group.py @@ -3,7 +3,8 @@ # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_loadbalancer.py b/plugins/modules/cloud/centurylink/clc_loadbalancer.py index 94a815e6ef..bad07d7815 100644 --- a/plugins/modules/cloud/centurylink/clc_loadbalancer.py +++ b/plugins/modules/cloud/centurylink/clc_loadbalancer.py @@ -3,7 +3,8 @@ # # Copyright (c) 2015 CenturyLink # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_modify_server.py b/plugins/modules/cloud/centurylink/clc_modify_server.py index 27cdf614ec..0567076d38 100644 --- a/plugins/modules/cloud/centurylink/clc_modify_server.py +++ b/plugins/modules/cloud/centurylink/clc_modify_server.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_publicip.py b/plugins/modules/cloud/centurylink/clc_publicip.py index 3b4fcc4eed..7184ca10c3 100644 --- a/plugins/modules/cloud/centurylink/clc_publicip.py +++ b/plugins/modules/cloud/centurylink/clc_publicip.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_server.py b/plugins/modules/cloud/centurylink/clc_server.py index b58e39edd7..f7329894c0 100644 --- a/plugins/modules/cloud/centurylink/clc_server.py +++ b/plugins/modules/cloud/centurylink/clc_server.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/centurylink/clc_server_snapshot.py b/plugins/modules/cloud/centurylink/clc_server_snapshot.py index 4de4c9936e..471fca2c1e 100644 --- a/plugins/modules/cloud/centurylink/clc_server_snapshot.py +++ b/plugins/modules/cloud/centurylink/clc_server_snapshot.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2015 CenturyLink -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_network.py b/plugins/modules/cloud/dimensiondata/dimensiondata_network.py index 64cc8b118a..d88b4a9339 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_network.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_network.py @@ -7,7 +7,8 @@ # - Bert Diwa # - Adam Friedman # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/heroku/heroku_collaborator.py b/plugins/modules/cloud/heroku/heroku_collaborator.py index bbc34fdb30..67619cc833 100644 --- a/plugins/modules/cloud/heroku/heroku_collaborator.py +++ b/plugins/modules/cloud/heroku/heroku_collaborator.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_ecs_instance.py b/plugins/modules/cloud/huawei/hwc_ecs_instance.py index 3d4ba84b64..8026c0f2f6 100644 --- a/plugins/modules/cloud/huawei/hwc_ecs_instance.py +++ b/plugins/modules/cloud/huawei/hwc_ecs_instance.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_evs_disk.py b/plugins/modules/cloud/huawei/hwc_evs_disk.py index 4aec1b94db..e319821c9f 100644 --- a/plugins/modules/cloud/huawei/hwc_evs_disk.py +++ b/plugins/modules/cloud/huawei/hwc_evs_disk.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_network_vpc.py b/plugins/modules/cloud/huawei/hwc_network_vpc.py index f53369adcd..2f08f20313 100644 --- a/plugins/modules/cloud/huawei/hwc_network_vpc.py +++ b/plugins/modules/cloud/huawei/hwc_network_vpc.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2018 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_smn_topic.py b/plugins/modules/cloud/huawei/hwc_smn_topic.py index f7fb4faea4..3752e1f18f 100644 --- a/plugins/modules/cloud/huawei/hwc_smn_topic.py +++ b/plugins/modules/cloud/huawei/hwc_smn_topic.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_vpc_eip.py b/plugins/modules/cloud/huawei/hwc_vpc_eip.py index b53395f87a..c9479981fd 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_eip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_eip.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py index a4d5921b77..89955d2091 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or SPDX-License-Identifier: GPL-3.0-or-later # https://www.gnu.org/licenses/gpl-3.0.txt) diff --git a/plugins/modules/cloud/huawei/hwc_vpc_port.py b/plugins/modules/cloud/huawei/hwc_vpc_port.py index cf0718f59b..de2fd38f66 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_port.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_port.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py b/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py index 901755f362..bcec7cf0b7 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_vpc_route.py b/plugins/modules/cloud/huawei/hwc_vpc_route.py index 31829dc601..e08a9ebf38 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_route.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_route.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_vpc_security_group.py b/plugins/modules/cloud/huawei/hwc_vpc_security_group.py index 5a1dfe706b..2338623890 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_security_group.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_security_group.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_vpc_security_group_rule.py b/plugins/modules/cloud/huawei/hwc_vpc_security_group_rule.py index f92c82764e..ca6e2e9de8 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_security_group_rule.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_security_group_rule.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py index ccf180502c..260635b975 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index 761e283e32..40ec1e84d9 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/linode/linode_v4.py b/plugins/modules/cloud/linode/linode_v4.py index fcf3725bfc..6ef8786af8 100644 --- a/plugins/modules/cloud/linode/linode_v4.py +++ b/plugins/modules/cloud/linode/linode_v4.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/lxc/lxc_container.py b/plugins/modules/cloud/lxc/lxc_container.py index c8c577aba6..656fe9f524 100644 --- a/plugins/modules/cloud/lxc/lxc_container.py +++ b/plugins/modules/cloud/lxc/lxc_container.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Kevin Carter -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Kevin Carter +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/lxd/lxd_container.py b/plugins/modules/cloud/lxd/lxd_container.py index 1dcb1dee13..c96271bda4 100644 --- a/plugins/modules/cloud/lxd/lxd_container.py +++ b/plugins/modules/cloud/lxd/lxd_container.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Hiroaki Nakamura -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Hiroaki Nakamura +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/lxd/lxd_profile.py b/plugins/modules/cloud/lxd/lxd_profile.py index 9f3e2ab81c..3d1b28b8fc 100644 --- a/plugins/modules/cloud/lxd/lxd_profile.py +++ b/plugins/modules/cloud/lxd/lxd_profile.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Hiroaki Nakamura -# Copyright: (c) 2020, Frank Dornheim -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Hiroaki Nakamura +# Copyright (c) 2020, Frank Dornheim +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/lxd/lxd_project.py b/plugins/modules/cloud/lxd/lxd_project.py index 2a4a319753..5a93a22859 100644 --- a/plugins/modules/cloud/lxd/lxd_project.py +++ b/plugins/modules/cloud/lxd/lxd_project.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/memset/memset_dns_reload.py b/plugins/modules/cloud/memset/memset_dns_reload.py index 6eefe133fd..abf5a918fc 100644 --- a/plugins/modules/cloud/memset/memset_dns_reload.py +++ b/plugins/modules/cloud/memset/memset_dns_reload.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2018, Simon Weald -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/memset/memset_memstore_info.py b/plugins/modules/cloud/memset/memset_memstore_info.py index e880b46009..ab16720b79 100644 --- a/plugins/modules/cloud/memset/memset_memstore_info.py +++ b/plugins/modules/cloud/memset/memset_memstore_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2018, Simon Weald -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/memset/memset_server_info.py b/plugins/modules/cloud/memset/memset_server_info.py index 853e2c884d..cd0ba5923f 100644 --- a/plugins/modules/cloud/memset/memset_server_info.py +++ b/plugins/modules/cloud/memset/memset_server_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2018, Simon Weald -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/memset/memset_zone.py b/plugins/modules/cloud/memset/memset_zone.py index 9ef798bd74..5fb03ab34b 100644 --- a/plugins/modules/cloud/memset/memset_zone.py +++ b/plugins/modules/cloud/memset/memset_zone.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2018, Simon Weald -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/memset/memset_zone_domain.py b/plugins/modules/cloud/memset/memset_zone_domain.py index 4aa0eada92..40552b9c2a 100644 --- a/plugins/modules/cloud/memset/memset_zone_domain.py +++ b/plugins/modules/cloud/memset/memset_zone_domain.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2018, Simon Weald -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/cloud/memset/memset_zone_record.py index 981d2ac47c..03cb21f99d 100644 --- a/plugins/modules/cloud/memset/memset_zone_record.py +++ b/plugins/modules/cloud/memset/memset_zone_record.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2018, Simon Weald -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/misc/cloud_init_data_facts.py b/plugins/modules/cloud/misc/cloud_init_data_facts.py index 1b44c50cbe..26ae722175 100644 --- a/plugins/modules/cloud/misc/cloud_init_data_facts.py +++ b/plugins/modules/cloud/misc/cloud_init_data_facts.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, René Moser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index dccfdc7b67..dd7a0133e7 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_domain_info.py b/plugins/modules/cloud/misc/proxmox_domain_info.py index 675b04a41e..4249a8010d 100644 --- a/plugins/modules/cloud/misc/proxmox_domain_info.py +++ b/plugins/modules/cloud/misc/proxmox_domain_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Tristan Le Guern (@tleguern) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Tristan Le Guern (@tleguern) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_group_info.py b/plugins/modules/cloud/misc/proxmox_group_info.py index 58b56e856c..48a411f3ad 100644 --- a/plugins/modules/cloud/misc/proxmox_group_info.py +++ b/plugins/modules/cloud/misc/proxmox_group_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Tristan Le Guern -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Tristan Le Guern +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 2b38e89964..774a926f59 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2016, Abdoul Bah (@helldorado) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Abdoul Bah (@helldorado) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_nic.py b/plugins/modules/cloud/misc/proxmox_nic.py index e83d0dfef1..eec32bee3c 100644 --- a/plugins/modules/cloud/misc/proxmox_nic.py +++ b/plugins/modules/cloud/misc/proxmox_nic.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Lammert Hellinga (@Kogelvis) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Lammert Hellinga (@Kogelvis) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/cloud/misc/proxmox_snap.py index bf845e5103..d75f448bd0 100644 --- a/plugins/modules/cloud/misc/proxmox_snap.py +++ b/plugins/modules/cloud/misc/proxmox_snap.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2020, Jeffrey van Pelt (@Thulium-Drake) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Jeffrey van Pelt (@Thulium-Drake) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_storage_info.py b/plugins/modules/cloud/misc/proxmox_storage_info.py index 265b6fbaf1..bbc25529a9 100644 --- a/plugins/modules/cloud/misc/proxmox_storage_info.py +++ b/plugins/modules/cloud/misc/proxmox_storage_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Tristan Le Guern (@tleguern) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Tristan Le Guern (@tleguern) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_tasks_info.py b/plugins/modules/cloud/misc/proxmox_tasks_info.py index ff3bf6869a..252d3411d0 100644 --- a/plugins/modules/cloud/misc/proxmox_tasks_info.py +++ b/plugins/modules/cloud/misc/proxmox_tasks_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andreas Botzner (@paginabianca) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner (@paginabianca) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_template.py b/plugins/modules/cloud/misc/proxmox_template.py index 32ff8e7edb..f916ea917d 100644 --- a/plugins/modules/cloud/misc/proxmox_template.py +++ b/plugins/modules/cloud/misc/proxmox_template.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/proxmox_user_info.py b/plugins/modules/cloud/misc/proxmox_user_info.py index d0ee365b7f..134fdc1e09 100644 --- a/plugins/modules/cloud/misc/proxmox_user_info.py +++ b/plugins/modules/cloud/misc/proxmox_user_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Tristan Le Guern -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Tristan Le Guern +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 1fbfceb370..5b99931344 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Timothy Vandenbrande -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Timothy Vandenbrande +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index c49699ca79..133539ee32 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Ryan Scott Brown -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Ryan Scott Brown +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index a52a3125e9..d500f656f5 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Ryan Scott Brown -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/cloud/misc/xenserver_facts.py index f65e3c9a86..201b59ec4f 100644 --- a/plugins/modules/cloud/misc/xenserver_facts.py +++ b/plugins/modules/cloud/misc/xenserver_facts.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/online/online_server_info.py b/plugins/modules/cloud/online/online_server_info.py index cf218efd29..a9783d239b 100644 --- a/plugins/modules/cloud/online/online_server_info.py +++ b/plugins/modules/cloud/online/online_server_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/cloud/online/online_user_info.py b/plugins/modules/cloud/online/online_user_info.py index cd1b6dfa45..96264fba88 100644 --- a/plugins/modules/cloud/online/online_user_info.py +++ b/plugins/modules/cloud/online/online_user_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/opennebula/one_host.py b/plugins/modules/cloud/opennebula/one_host.py index f205a40a2c..20bdaa4088 100644 --- a/plugins/modules/cloud/opennebula/one_host.py +++ b/plugins/modules/cloud/opennebula/one_host.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright 2018 www.privaz.io Valletech AB -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/cloud/opennebula/one_template.py b/plugins/modules/cloud/opennebula/one_template.py index b1d2c69ccf..8cfac6baf0 100644 --- a/plugins/modules/cloud/opennebula/one_template.py +++ b/plugins/modules/cloud/opennebula/one_template.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Georg Gadinger -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Georg Gadinger +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/cloud/oracle/oci_vcn.py b/plugins/modules/cloud/oracle/oci_vcn.py index a82914bdea..87568e1893 100644 --- a/plugins/modules/cloud/oracle/oci_vcn.py +++ b/plugins/modules/cloud/oracle/oci_vcn.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, 2018, Oracle and/or its affiliates. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/ovh/ovh_ip_failover.py b/plugins/modules/cloud/ovh/ovh_ip_failover.py index 26179eb8f7..4a5c8e5346 100644 --- a/plugins/modules/cloud/ovh/ovh_ip_failover.py +++ b/plugins/modules/cloud/ovh/ovh_ip_failover.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py b/plugins/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py index 28d6f3a129..fe1e722507 100644 --- a/plugins/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py +++ b/plugins/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/ovh/ovh_monthly_billing.py b/plugins/modules/cloud/ovh/ovh_monthly_billing.py index 75c70a79ec..2d8091c802 100644 --- a/plugins/modules/cloud/ovh/ovh_monthly_billing.py +++ b/plugins/modules/cloud/ovh/ovh_monthly_billing.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Francois Lallart (@fraff) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Francois Lallart (@fraff) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index a5970c12d7..7859ae6799 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -4,7 +4,8 @@ # (c) 2016, Matt Baldwin # (c) 2016, Thibaud Morel l'Horset # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/packet/packet_ip_subnet.py b/plugins/modules/cloud/packet/packet_ip_subnet.py index 718de36f22..97f537b34e 100644 --- a/plugins/modules/cloud/packet/packet_ip_subnet.py +++ b/plugins/modules/cloud/packet/packet_ip_subnet.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Nurfet Becirevic -# Copyright: (c) 2017, Tomas Karasek -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Nurfet Becirevic +# Copyright (c) 2017, Tomas Karasek +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/packet/packet_project.py b/plugins/modules/cloud/packet/packet_project.py index c6502c6ea6..581e56dd4f 100644 --- a/plugins/modules/cloud/packet/packet_project.py +++ b/plugins/modules/cloud/packet/packet_project.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Nurfet Becirevic -# Copyright: (c) 2019, Tomas Karasek -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Nurfet Becirevic +# Copyright (c) 2019, Tomas Karasek +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/packet/packet_sshkey.py b/plugins/modules/cloud/packet/packet_sshkey.py index 77f3a70201..a336723f56 100644 --- a/plugins/modules/cloud/packet/packet_sshkey.py +++ b/plugins/modules/cloud/packet/packet_sshkey.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2016 Tomas Karasek -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/packet/packet_volume.py b/plugins/modules/cloud/packet/packet_volume.py index 4f10bdf45b..b2c6d116c1 100644 --- a/plugins/modules/cloud/packet/packet_volume.py +++ b/plugins/modules/cloud/packet/packet_volume.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Nurfet Becirevic -# Copyright: (c) 2017, Tomas Karasek -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Nurfet Becirevic +# Copyright (c) 2017, Tomas Karasek +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/packet/packet_volume_attachment.py b/plugins/modules/cloud/packet/packet_volume_attachment.py index 9044fbcffa..4f55d60cfa 100644 --- a/plugins/modules/cloud/packet/packet_volume_attachment.py +++ b/plugins/modules/cloud/packet/packet_volume_attachment.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Nurfet Becirevic -# Copyright: (c) 2017, Tomas Karasek -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Nurfet Becirevic +# Copyright (c) 2017, Tomas Karasek +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index eccedb71f4..c5feda831b 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py index 7897ffdeb9..643677c9d1 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/profitbricks/profitbricks_nic.py b/plugins/modules/cloud/profitbricks/profitbricks_nic.py index 5d98e05e4b..5a0b0b7c34 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_nic.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_nic.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index be1c18b55a..2522afd030 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py b/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py index 1fb3f3c0e2..ab965677ea 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/pubnub/pubnub_blocks.py b/plugins/modules/cloud/pubnub/pubnub_blocks.py index d3b76337a3..8e9a56bdf5 100644 --- a/plugins/modules/cloud/pubnub/pubnub_blocks.py +++ b/plugins/modules/cloud/pubnub/pubnub_blocks.py @@ -7,7 +7,8 @@ # http://www.pubnub.com/ # http://www.pubnub.com/terms # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index 8c452d9d72..57329c9821 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index abfda419ed..e6b31623d5 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_cbs_attachments.py b/plugins/modules/cloud/rackspace/rax_cbs_attachments.py index fd21081475..6b18624885 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs_attachments.py +++ b/plugins/modules/cloud/rackspace/rax_cbs_attachments.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_cdb.py b/plugins/modules/cloud/rackspace/rax_cdb.py index a9c3243281..5cf926b664 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb.py +++ b/plugins/modules/cloud/rackspace/rax_cdb.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_cdb_database.py b/plugins/modules/cloud/rackspace/rax_cdb_database.py index 86cd1aac40..3e263e6593 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb_database.py +++ b/plugins/modules/cloud/rackspace/rax_cdb_database.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_cdb_user.py b/plugins/modules/cloud/rackspace/rax_cdb_user.py index 674f17c070..1150def230 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb_user.py +++ b/plugins/modules/cloud/rackspace/rax_cdb_user.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/cloud/rackspace/rax_clb.py index 9160133e21..ced9539973 100644 --- a/plugins/modules/cloud/rackspace/rax_clb.py +++ b/plugins/modules/cloud/rackspace/rax_clb.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_clb_nodes.py b/plugins/modules/cloud/rackspace/rax_clb_nodes.py index 6ed57b53a3..07bb081f82 100644 --- a/plugins/modules/cloud/rackspace/rax_clb_nodes.py +++ b/plugins/modules/cloud/rackspace/rax_clb_nodes.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_clb_ssl.py b/plugins/modules/cloud/rackspace/rax_clb_ssl.py index adf375124d..db192368b4 100644 --- a/plugins/modules/cloud/rackspace/rax_clb_ssl.py +++ b/plugins/modules/cloud/rackspace/rax_clb_ssl.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_dns.py b/plugins/modules/cloud/rackspace/rax_dns.py index 915e13a9a6..d10b178867 100644 --- a/plugins/modules/cloud/rackspace/rax_dns.py +++ b/plugins/modules/cloud/rackspace/rax_dns.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_dns_record.py b/plugins/modules/cloud/rackspace/rax_dns_record.py index 1a6986dea7..ba4d4b1699 100644 --- a/plugins/modules/cloud/rackspace/rax_dns_record.py +++ b/plugins/modules/cloud/rackspace/rax_dns_record.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_facts.py b/plugins/modules/cloud/rackspace/rax_facts.py index 0288a5e35b..7d10d0d6d7 100644 --- a/plugins/modules/cloud/rackspace/rax_facts.py +++ b/plugins/modules/cloud/rackspace/rax_facts.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/cloud/rackspace/rax_files.py index 1e1f82c85d..b827117de8 100644 --- a/plugins/modules/cloud/rackspace/rax_files.py +++ b/plugins/modules/cloud/rackspace/rax_files.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Paul Durivage -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index 8f8793e375..3fd24fc81c 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Paul Durivage -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_identity.py b/plugins/modules/cloud/rackspace/rax_identity.py index 2021052faa..8e30c2971b 100644 --- a/plugins/modules/cloud/rackspace/rax_identity.py +++ b/plugins/modules/cloud/rackspace/rax_identity.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_keypair.py b/plugins/modules/cloud/rackspace/rax_keypair.py index 90b0183e50..5a881ad052 100644 --- a/plugins/modules/cloud/rackspace/rax_keypair.py +++ b/plugins/modules/cloud/rackspace/rax_keypair.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_meta.py b/plugins/modules/cloud/rackspace/rax_meta.py index 3504181f19..17dc780cf8 100644 --- a/plugins/modules/cloud/rackspace/rax_meta.py +++ b/plugins/modules/cloud/rackspace/rax_meta.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_mon_alarm.py b/plugins/modules/cloud/rackspace/rax_mon_alarm.py index 7e99db3fa8..9083c91394 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_alarm.py +++ b/plugins/modules/cloud/rackspace/rax_mon_alarm.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index 04501b27b0..68d41a339f 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_mon_entity.py b/plugins/modules/cloud/rackspace/rax_mon_entity.py index 2f8cdeefd8..0cfeb7ab2c 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_entity.py +++ b/plugins/modules/cloud/rackspace/rax_mon_entity.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_mon_notification.py b/plugins/modules/cloud/rackspace/rax_mon_notification.py index fb645c3036..cb519e43cf 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_notification.py +++ b/plugins/modules/cloud/rackspace/rax_mon_notification.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py b/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py index 25e506829f..1721aac09e 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py +++ b/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_network.py b/plugins/modules/cloud/rackspace/rax_network.py index 146c08c8e1..db6458d743 100644 --- a/plugins/modules/cloud/rackspace/rax_network.py +++ b/plugins/modules/cloud/rackspace/rax_network.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_queue.py b/plugins/modules/cloud/rackspace/rax_queue.py index 46c942c70d..b28099f786 100644 --- a/plugins/modules/cloud/rackspace/rax_queue.py +++ b/plugins/modules/cloud/rackspace/rax_queue.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/cloud/rackspace/rax_scaling_group.py index 4080e4c6a4..ad461f53e2 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_group.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_group.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/rackspace/rax_scaling_policy.py b/plugins/modules/cloud/rackspace/rax_scaling_policy.py index be46bd62a6..3596575187 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_policy.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_policy.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/scaleway/scaleway_compute.py b/plugins/modules/cloud/scaleway/scaleway_compute.py index a195d7fb93..7c6a01a606 100644 --- a/plugins/modules/cloud/scaleway/scaleway_compute.py +++ b/plugins/modules/cloud/scaleway/scaleway_compute.py @@ -6,7 +6,8 @@ # Copyright (C) 2018 Online SAS. # https://www.scaleway.com # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py b/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py index 2e23b324cd..aac9fac824 100644 --- a/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py +++ b/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py @@ -3,7 +3,8 @@ # # Scaleway VPC management module # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_database_backup.py b/plugins/modules/cloud/scaleway/scaleway_database_backup.py index 35f35f820a..f91ce143a0 100644 --- a/plugins/modules/cloud/scaleway/scaleway_database_backup.py +++ b/plugins/modules/cloud/scaleway/scaleway_database_backup.py @@ -5,7 +5,8 @@ # # Copyright (C) 2020 Guillaume Rodriguez (g.rodriguez@opendecide.com). # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_image_info.py b/plugins/modules/cloud/scaleway/scaleway_image_info.py index 98aa453f3c..d61bff6370 100644 --- a/plugins/modules/cloud/scaleway/scaleway_image_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_image_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/scaleway/scaleway_ip.py b/plugins/modules/cloud/scaleway/scaleway_ip.py index 7901aaade4..1738be4712 100644 --- a/plugins/modules/cloud/scaleway/scaleway_ip.py +++ b/plugins/modules/cloud/scaleway/scaleway_ip.py @@ -3,7 +3,8 @@ # # Scaleway IP management module # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_ip_info.py b/plugins/modules/cloud/scaleway/scaleway_ip_info.py index 189ee1cf05..c148113a85 100644 --- a/plugins/modules/cloud/scaleway/scaleway_ip_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_ip_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/scaleway/scaleway_lb.py b/plugins/modules/cloud/scaleway/scaleway_lb.py index 2112ae4411..e33f339f55 100644 --- a/plugins/modules/cloud/scaleway/scaleway_lb.py +++ b/plugins/modules/cloud/scaleway/scaleway_lb.py @@ -6,7 +6,8 @@ # Copyright (C) 2018 Online SAS. # https://www.scaleway.com # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_organization_info.py b/plugins/modules/cloud/scaleway/scaleway_organization_info.py index a09d1bb5d8..447ed6d182 100644 --- a/plugins/modules/cloud/scaleway/scaleway_organization_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_organization_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/scaleway/scaleway_private_network.py b/plugins/modules/cloud/scaleway/scaleway_private_network.py index 996a3cce27..eed5254aa2 100644 --- a/plugins/modules/cloud/scaleway/scaleway_private_network.py +++ b/plugins/modules/cloud/scaleway/scaleway_private_network.py @@ -3,7 +3,8 @@ # # Scaleway VPC management module # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group.py b/plugins/modules/cloud/scaleway/scaleway_security_group.py index f9faee6104..635309947a 100644 --- a/plugins/modules/cloud/scaleway/scaleway_security_group.py +++ b/plugins/modules/cloud/scaleway/scaleway_security_group.py @@ -5,7 +5,8 @@ # # Copyright (C) 2018 Antoine Barbare (antoinebarbare@gmail.com). # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group_info.py b/plugins/modules/cloud/scaleway/scaleway_security_group_info.py index a15044e6a4..bf8ce58a7f 100644 --- a/plugins/modules/cloud/scaleway/scaleway_security_group_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_security_group_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py b/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py index 9f95921202..047449cd09 100644 --- a/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py +++ b/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py @@ -5,8 +5,8 @@ # # Copyright (C) 2018 Antoine Barbare (antoinebarbare@gmail.com). # -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_server_info.py b/plugins/modules/cloud/scaleway/scaleway_server_info.py index 2b9d91b47c..35b531539d 100644 --- a/plugins/modules/cloud/scaleway/scaleway_server_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_server_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py b/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py index 8e1d2a615d..9f890ef4a1 100644 --- a/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/scaleway/scaleway_sshkey.py b/plugins/modules/cloud/scaleway/scaleway_sshkey.py index 4c55909245..13dc211d36 100644 --- a/plugins/modules/cloud/scaleway/scaleway_sshkey.py +++ b/plugins/modules/cloud/scaleway/scaleway_sshkey.py @@ -6,7 +6,8 @@ # Copyright (C) 2018 Online SAS. # https://www.scaleway.com # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_user_data.py b/plugins/modules/cloud/scaleway/scaleway_user_data.py index c321f3009b..37d9e94142 100644 --- a/plugins/modules/cloud/scaleway/scaleway_user_data.py +++ b/plugins/modules/cloud/scaleway/scaleway_user_data.py @@ -6,7 +6,8 @@ # Copyright (C) 2018 Online SAS. # https://www.scaleway.com # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_volume.py b/plugins/modules/cloud/scaleway/scaleway_volume.py index e68309fc31..315b5e7334 100644 --- a/plugins/modules/cloud/scaleway/scaleway_volume.py +++ b/plugins/modules/cloud/scaleway/scaleway_volume.py @@ -5,7 +5,8 @@ # # Copyright (C) 2018 Henryk Konsek Consulting (hekonsek@gmail.com). # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/cloud/scaleway/scaleway_volume_info.py b/plugins/modules/cloud/scaleway/scaleway_volume_info.py index e8dfa41419..a2715ffe90 100644 --- a/plugins/modules/cloud/scaleway/scaleway_volume_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_volume_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/smartos/imgadm.py b/plugins/modules/cloud/smartos/imgadm.py index 18a67d014a..968027762b 100644 --- a/plugins/modules/cloud/smartos/imgadm.py +++ b/plugins/modules/cloud/smartos/imgadm.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, 2017 Jasper Lievisse Adriaanse -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/smartos/nictagadm.py b/plugins/modules/cloud/smartos/nictagadm.py index 05aba6f188..d52e0c921d 100644 --- a/plugins/modules/cloud/smartos/nictagadm.py +++ b/plugins/modules/cloud/smartos/nictagadm.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Bruce Smith -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Bruce Smith +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/smartos/smartos_image_info.py b/plugins/modules/cloud/smartos/smartos_image_info.py index 0aa9c3ac1c..78cce37857 100644 --- a/plugins/modules/cloud/smartos/smartos_image_info.py +++ b/plugins/modules/cloud/smartos/smartos_image_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Adam Števko -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/cloud/smartos/vmadm.py index c6b75e6b18..df130d939f 100644 --- a/plugins/modules/cloud/smartos/vmadm.py +++ b/plugins/modules/cloud/smartos/vmadm.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Jasper Lievisse Adriaanse -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/cloud/softlayer/sl_vm.py index 825d82e173..c1f5fde611 100644 --- a/plugins/modules/cloud/softlayer/sl_vm.py +++ b/plugins/modules/cloud/softlayer/sl_vm.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py index da8f010229..0d555abfeb 100644 --- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py +++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) DOCUMENTATION = ''' diff --git a/plugins/modules/cloud/univention/udm_dns_record.py b/plugins/modules/cloud/univention/udm_dns_record.py index 4e7aa70b32..42cc8a5cef 100644 --- a/plugins/modules/cloud/univention/udm_dns_record.py +++ b/plugins/modules/cloud/univention/udm_dns_record.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Adfinis SyGroup AG +# Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/cloud/univention/udm_dns_zone.py index f1cea87e4f..831ef3474a 100644 --- a/plugins/modules/cloud/univention/udm_dns_zone.py +++ b/plugins/modules/cloud/univention/udm_dns_zone.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Adfinis SyGroup AG +# Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/univention/udm_group.py b/plugins/modules/cloud/univention/udm_group.py index aab6e2b7bc..034cdca1c3 100644 --- a/plugins/modules/cloud/univention/udm_group.py +++ b/plugins/modules/cloud/univention/udm_group.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Adfinis SyGroup AG +# Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/univention/udm_share.py b/plugins/modules/cloud/univention/udm_share.py index 5818467d1a..9438f338cb 100644 --- a/plugins/modules/cloud/univention/udm_share.py +++ b/plugins/modules/cloud/univention/udm_share.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Adfinis SyGroup AG +# Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index b0d6138fda..090e874189 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Adfinis SyGroup AG +# Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/webfaction/webfaction_app.py b/plugins/modules/cloud/webfaction/webfaction_app.py index cd779b035a..8fca90a8de 100644 --- a/plugins/modules/cloud/webfaction/webfaction_app.py +++ b/plugins/modules/cloud/webfaction/webfaction_app.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Quentin Stafford-Fraser, with contributions gratefully acknowledged from: +# Copyright (c) 2015, Quentin Stafford-Fraser, with contributions gratefully acknowledged from: # * Andy Baker # * Federico Tarantini # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Create a Webfaction application using Ansible and the Webfaction API # diff --git a/plugins/modules/cloud/webfaction/webfaction_db.py b/plugins/modules/cloud/webfaction/webfaction_db.py index 8708c7743b..868f1f66a2 100644 --- a/plugins/modules/cloud/webfaction/webfaction_db.py +++ b/plugins/modules/cloud/webfaction/webfaction_db.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Quentin Stafford-Fraser, with contributions gratefully acknowledged from: +# Copyright (c) 2015, Quentin Stafford-Fraser, with contributions gratefully acknowledged from: # * Andy Baker # * Federico Tarantini # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Create a webfaction database using Ansible and the Webfaction API diff --git a/plugins/modules/cloud/webfaction/webfaction_domain.py b/plugins/modules/cloud/webfaction/webfaction_domain.py index f9c3b7db7a..c10baf83a2 100644 --- a/plugins/modules/cloud/webfaction/webfaction_domain.py +++ b/plugins/modules/cloud/webfaction/webfaction_domain.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Quentin Stafford-Fraser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Quentin Stafford-Fraser +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Create Webfaction domains and subdomains using Ansible and the Webfaction API diff --git a/plugins/modules/cloud/webfaction/webfaction_mailbox.py b/plugins/modules/cloud/webfaction/webfaction_mailbox.py index 37755763a2..0df4e8ced0 100644 --- a/plugins/modules/cloud/webfaction/webfaction_mailbox.py +++ b/plugins/modules/cloud/webfaction/webfaction_mailbox.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Quentin Stafford-Fraser and Andy Baker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Quentin Stafford-Fraser and Andy Baker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Create webfaction mailbox using Ansible and the Webfaction API diff --git a/plugins/modules/cloud/webfaction/webfaction_site.py b/plugins/modules/cloud/webfaction/webfaction_site.py index 87faade3e2..dd9afc7636 100644 --- a/plugins/modules/cloud/webfaction/webfaction_site.py +++ b/plugins/modules/cloud/webfaction/webfaction_site.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Quentin Stafford-Fraser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Quentin Stafford-Fraser +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Create Webfaction website using Ansible and the Webfaction API diff --git a/plugins/modules/cloud/xenserver/xenserver_guest.py b/plugins/modules/cloud/xenserver/xenserver_guest.py index bd8bb7d7e1..ed0a989a4c 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2018, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/xenserver/xenserver_guest_info.py b/plugins/modules/cloud/xenserver/xenserver_guest_info.py index a2e777253e..750cc3a84f 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest_info.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2018, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py index 4a195ff50a..c543b2324d 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2018, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/consul/consul.py b/plugins/modules/clustering/consul/consul.py index 9707d5431a..9475b56979 100644 --- a/plugins/modules/clustering/consul/consul.py +++ b/plugins/modules/clustering/consul/consul.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2015, Steve Gargan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/consul/consul_acl.py b/plugins/modules/clustering/consul/consul_acl.py index b9dff55d2e..2d00c483eb 100644 --- a/plugins/modules/clustering/consul/consul_acl.py +++ b/plugins/modules/clustering/consul/consul_acl.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2015, Steve Gargan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/clustering/consul/consul_kv.py index 5b5d36671d..1ade2ddaae 100644 --- a/plugins/modules/clustering/consul/consul_kv.py +++ b/plugins/modules/clustering/consul/consul_kv.py @@ -3,7 +3,8 @@ # # (c) 2015, Steve Gargan # (c) 2018 Genome Research Ltd. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/consul/consul_session.py b/plugins/modules/clustering/consul/consul_session.py index 3039fac175..7c664a0e55 100644 --- a/plugins/modules/clustering/consul/consul_session.py +++ b/plugins/modules/clustering/consul/consul_session.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Steve Gargan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Steve Gargan +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/etcd3.py b/plugins/modules/clustering/etcd3.py index 6a09513364..6d73e481a5 100644 --- a/plugins/modules/clustering/etcd3.py +++ b/plugins/modules/clustering/etcd3.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2018, Jean-Philippe Evrard -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/nomad/nomad_job.py b/plugins/modules/clustering/nomad/nomad_job.py index 92081dfabd..e1076ba743 100644 --- a/plugins/modules/clustering/nomad/nomad_job.py +++ b/plugins/modules/clustering/nomad/nomad_job.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2020, FERREIRA Christophe -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/nomad/nomad_job_info.py b/plugins/modules/clustering/nomad/nomad_job_info.py index 3d15712fda..8cfa9d760f 100644 --- a/plugins/modules/clustering/nomad/nomad_job_info.py +++ b/plugins/modules/clustering/nomad/nomad_job_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2020, FERREIRA Christophe -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/pacemaker_cluster.py b/plugins/modules/clustering/pacemaker_cluster.py index 4ec6010f53..6e9d30c66c 100644 --- a/plugins/modules/clustering/pacemaker_cluster.py +++ b/plugins/modules/clustering/pacemaker_cluster.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Mathieu Bultel -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Mathieu Bultel +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/clustering/znode.py b/plugins/modules/clustering/znode.py index d55a502b15..2c42d55643 100644 --- a/plugins/modules/clustering/znode.py +++ b/plugins/modules/clustering/znode.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 WP Engine, Inc. All rights reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/aerospike/aerospike_migrations.py b/plugins/modules/database/aerospike/aerospike_migrations.py index 27b979ad1f..32d51a6b1f 100644 --- a/plugins/modules/database/aerospike/aerospike_migrations.py +++ b/plugins/modules/database/aerospike/aerospike_migrations.py @@ -2,8 +2,9 @@ # -*- coding: utf-8 -*- """short_description: Check or wait for migrations between nodes""" -# Copyright: (c) 2018, Albert Autin -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Albert Autin +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/database/influxdb/influxdb_database.py b/plugins/modules/database/influxdb/influxdb_database.py index 6601b30124..1c245ad6da 100644 --- a/plugins/modules/database/influxdb/influxdb_database.py +++ b/plugins/modules/database/influxdb/influxdb_database.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Kamil Szczygiel -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Kamil Szczygiel +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/influxdb/influxdb_query.py b/plugins/modules/database/influxdb/influxdb_query.py index bff6fa989b..14a65a60dc 100644 --- a/plugins/modules/database/influxdb/influxdb_query.py +++ b/plugins/modules/database/influxdb/influxdb_query.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, René Moser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/influxdb/influxdb_retention_policy.py b/plugins/modules/database/influxdb/influxdb_retention_policy.py index 6cb45229cd..80f0513678 100644 --- a/plugins/modules/database/influxdb/influxdb_retention_policy.py +++ b/plugins/modules/database/influxdb/influxdb_retention_policy.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Kamil Szczygiel -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Kamil Szczygiel +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/database/influxdb/influxdb_user.py b/plugins/modules/database/influxdb/influxdb_user.py index 76524d8613..30b92d9bfe 100644 --- a/plugins/modules/database/influxdb/influxdb_user.py +++ b/plugins/modules/database/influxdb/influxdb_user.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Vitaliy Zhhuta +# Copyright (c) 2017, Vitaliy Zhhuta # insipred by Kamil Szczygiel influxdb_database module -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/database/influxdb/influxdb_write.py b/plugins/modules/database/influxdb/influxdb_write.py index e34fe9c2cf..68e722ae1c 100644 --- a/plugins/modules/database/influxdb/influxdb_write.py +++ b/plugins/modules/database/influxdb/influxdb_write.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, René Moser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/elasticsearch_plugin.py b/plugins/modules/database/misc/elasticsearch_plugin.py index bc7df931b6..bee6f5a5fc 100644 --- a/plugins/modules/database/misc/elasticsearch_plugin.py +++ b/plugins/modules/database/misc/elasticsearch_plugin.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Mathew Davies # (c) 2017, Sam Doran -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/kibana_plugin.py b/plugins/modules/database/misc/kibana_plugin.py index db5091e400..5522340156 100644 --- a/plugins/modules/database/misc/kibana_plugin.py +++ b/plugins/modules/database/misc/kibana_plugin.py @@ -4,7 +4,8 @@ # Copyright (c) 2016, Thierno IB. BARRY @barryib # Sponsored by Polyconseil http://polyconseil.fr. # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/odbc.py b/plugins/modules/database/misc/odbc.py index 5d1cdf884b..e220543d6f 100644 --- a/plugins/modules/database/misc/odbc.py +++ b/plugins/modules/database/misc/odbc.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, John Westcott -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, John Westcott +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/redis.py b/plugins/modules/database/misc/redis.py index 13a1f5060b..36e7df3883 100644 --- a/plugins/modules/database/misc/redis.py +++ b/plugins/modules/database/misc/redis.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/redis_data.py b/plugins/modules/database/misc/redis_data.py index 587b37d04f..633afbff54 100644 --- a/plugins/modules/database/misc/redis_data.py +++ b/plugins/modules/database/misc/redis_data.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/redis_data_incr.py b/plugins/modules/database/misc/redis_data_incr.py index e9e03941e4..4d1c119349 100644 --- a/plugins/modules/database/misc/redis_data_incr.py +++ b/plugins/modules/database/misc/redis_data_incr.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/redis_data_info.py b/plugins/modules/database/misc/redis_data_info.py index 7ecfd4a234..c4186ff358 100644 --- a/plugins/modules/database/misc/redis_data_info.py +++ b/plugins/modules/database/misc/redis_data_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/redis_info.py b/plugins/modules/database/misc/redis_info.py index 9762b03c98..25b1d80035 100644 --- a/plugins/modules/database/misc/redis_info.py +++ b/plugins/modules/database/misc/redis_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Pavlo Bashynskyi (@levonet) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Pavlo Bashynskyi (@levonet) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/misc/riak.py b/plugins/modules/database/misc/riak.py index 4ee7b5b674..7811dc381d 100644 --- a/plugins/modules/database/misc/riak.py +++ b/plugins/modules/database/misc/riak.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, James Martin , Drew Kerrigan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/database/mssql/mssql_db.py index e6c5f183fa..f9686196de 100644 --- a/plugins/modules/database/mssql/mssql_db.py +++ b/plugins/modules/database/mssql/mssql_db.py @@ -3,7 +3,8 @@ # (c) 2014, Vedit Firat Arig # Outline and parts are reused from Mark Theunissen's mysql_db module -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/mssql/mssql_script.py b/plugins/modules/database/mssql/mssql_script.py index bb80607ccf..1a5f45736f 100644 --- a/plugins/modules/database/mssql/mssql_script.py +++ b/plugins/modules/database/mssql/mssql_script.py @@ -1,7 +1,8 @@ #!/usr/bin/python -# Copyright: (c) 2021, Kris Budde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Rainer Leber +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/database/vertica/vertica_configuration.py b/plugins/modules/database/vertica/vertica_configuration.py index b210e3f6f0..f3ac067d0f 100644 --- a/plugins/modules/database/vertica/vertica_configuration.py +++ b/plugins/modules/database/vertica/vertica_configuration.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/vertica/vertica_info.py b/plugins/modules/database/vertica/vertica_info.py index 3822a0717d..825006ad71 100644 --- a/plugins/modules/database/vertica/vertica_info.py +++ b/plugins/modules/database/vertica/vertica_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/vertica/vertica_role.py b/plugins/modules/database/vertica/vertica_role.py index 4ec75d7dc6..e9f2ef34df 100644 --- a/plugins/modules/database/vertica/vertica_role.py +++ b/plugins/modules/database/vertica/vertica_role.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/vertica/vertica_schema.py b/plugins/modules/database/vertica/vertica_schema.py index 12af3e64f7..b1bdf944b9 100644 --- a/plugins/modules/database/vertica/vertica_schema.py +++ b/plugins/modules/database/vertica/vertica_schema.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/database/vertica/vertica_user.py b/plugins/modules/database/vertica/vertica_user.py index 0616c302bd..ff2f02d0cc 100644 --- a/plugins/modules/database/vertica/vertica_user.py +++ b/plugins/modules/database/vertica/vertica_user.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/archive.py b/plugins/modules/files/archive.py index 7b13eb6c4d..c1086d9e9d 100644 --- a/plugins/modules/files/archive.py +++ b/plugins/modules/files/archive.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Ben Doherty +# Copyright (c) 2016, Ben Doherty # Sponsored by Oomph, Inc. http://www.oomphinc.com -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/filesize.py b/plugins/modules/files/filesize.py index 83edbe58ae..a8c47d70fd 100644 --- a/plugins/modules/files/filesize.py +++ b/plugins/modules/files/filesize.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, quidame -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, quidame +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/files/ini_file.py index c18fd24eff..a0c786cb8a 100644 --- a/plugins/modules/files/ini_file.py +++ b/plugins/modules/files/ini_file.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2012, Jan-Piet Mens -# Copyright: (c) 2015, Ales Nosek -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2012, Jan-Piet Mens +# Copyright (c) 2015, Ales Nosek +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/iso_create.py b/plugins/modules/files/iso_create.py index 3fa456339e..275b62a66b 100644 --- a/plugins/modules/files/iso_create.py +++ b/plugins/modules/files/iso_create.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Ansible Project -# Copyright: (c) 2020, VMware, Inc. All Rights Reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Ansible Project +# Copyright (c) 2020, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/iso_extract.py b/plugins/modules/files/iso_extract.py index 81fe6b662f..904997a752 100644 --- a/plugins/modules/files/iso_extract.py +++ b/plugins/modules/files/iso_extract.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Jeroen Hoekx -# Copyright: (c) 2016, Matt Robinson -# Copyright: (c) 2017, Dag Wieers -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, Jeroen Hoekx +# Copyright (c) 2016, Matt Robinson +# Copyright (c) 2017, Dag Wieers +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/read_csv.py b/plugins/modules/files/read_csv.py index 484a365e4c..c6b8b9fe90 100644 --- a/plugins/modules/files/read_csv.py +++ b/plugins/modules/files/read_csv.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Dag Wieers (@dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/sapcar_extract.py b/plugins/modules/files/sapcar_extract.py index da29580059..57ede47616 100644 --- a/plugins/modules/files/sapcar_extract.py +++ b/plugins/modules/files/sapcar_extract.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Rainer Leber -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Rainer Leber +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/files/xattr.py b/plugins/modules/files/xattr.py index c0867892d3..9cc74a1382 100644 --- a/plugins/modules/files/xattr.py +++ b/plugins/modules/files/xattr.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index ae95e9c646..d5a1fbfb78 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Red Hat, Inc. -# Copyright: (c) 2014, Tim Bielawa -# Copyright: (c) 2014, Magnus Hedemark -# Copyright: (c) 2017, Dag Wieers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Red Hat, Inc. +# Copyright (c) 2014, Tim Bielawa +# Copyright (c) 2014, Magnus Hedemark +# Copyright (c) 2017, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_config.py b/plugins/modules/identity/ipa/ipa_config.py index 2b41dfb098..5847db077a 100644 --- a/plugins/modules/identity/ipa/ipa_config.py +++ b/plugins/modules/identity/ipa/ipa_config.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Fran Fitzpatrick -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Fran Fitzpatrick +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_dnsrecord.py b/plugins/modules/identity/ipa/ipa_dnsrecord.py index 36f4cfdded..d070e1c69f 100644 --- a/plugins/modules/identity/ipa/ipa_dnsrecord.py +++ b/plugins/modules/identity/ipa/ipa_dnsrecord.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Abhijeet Kasurde (akasurde@redhat.com) +# Copyright (c) 2017, Abhijeet Kasurde (akasurde@redhat.com) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_dnszone.py b/plugins/modules/identity/ipa/ipa_dnszone.py index 33ae59e9d0..167c49dc80 100644 --- a/plugins/modules/identity/ipa/ipa_dnszone.py +++ b/plugins/modules/identity/ipa/ipa_dnszone.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Fran Fitzpatrick (francis.x.fitzpatrick@gmail.com) +# Copyright (c) 2017, Fran Fitzpatrick (francis.x.fitzpatrick@gmail.com) # Borrowed heavily from other work by Abhijeet Kasurde (akasurde@redhat.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_group.py b/plugins/modules/identity/ipa/ipa_group.py index d6af57ba1f..9919a601f4 100644 --- a/plugins/modules/identity/ipa/ipa_group.py +++ b/plugins/modules/identity/ipa/ipa_group.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_hbacrule.py b/plugins/modules/identity/ipa/ipa_hbacrule.py index 5f0704d58b..37f0de8bc1 100644 --- a/plugins/modules/identity/ipa/ipa_hbacrule.py +++ b/plugins/modules/identity/ipa/ipa_hbacrule.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_host.py b/plugins/modules/identity/ipa/ipa_host.py index 25c65f0b34..5fb3f1679c 100644 --- a/plugins/modules/identity/ipa/ipa_host.py +++ b/plugins/modules/identity/ipa/ipa_host.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_hostgroup.py b/plugins/modules/identity/ipa/ipa_hostgroup.py index 9d5c6f99c7..37a09f7fa2 100644 --- a/plugins/modules/identity/ipa/ipa_hostgroup.py +++ b/plugins/modules/identity/ipa/ipa_hostgroup.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_otpconfig.py b/plugins/modules/identity/ipa/ipa_otpconfig.py index 080a2750c7..e9bef94a85 100644 --- a/plugins/modules/identity/ipa/ipa_otpconfig.py +++ b/plugins/modules/identity/ipa/ipa_otpconfig.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project +# Copyright (c) 2021, Ansible Project # Heavily influenced from Fran Fitzpatrick ipa_config module -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_otptoken.py b/plugins/modules/identity/ipa/ipa_otptoken.py index 4027a1c459..96fa612525 100644 --- a/plugins/modules/identity/ipa/ipa_otptoken.py +++ b/plugins/modules/identity/ipa/ipa_otptoken.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_pwpolicy.py b/plugins/modules/identity/ipa/ipa_pwpolicy.py index 0f9b141b4c..db75b121c7 100644 --- a/plugins/modules/identity/ipa/ipa_pwpolicy.py +++ b/plugins/modules/identity/ipa/ipa_pwpolicy.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_role.py b/plugins/modules/identity/ipa/ipa_role.py index c602614ef9..0168343839 100644 --- a/plugins/modules/identity/ipa/ipa_role.py +++ b/plugins/modules/identity/ipa/ipa_role.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_service.py b/plugins/modules/identity/ipa/ipa_service.py index 63c6d8216d..f0a7daf151 100644 --- a/plugins/modules/identity/ipa/ipa_service.py +++ b/plugins/modules/identity/ipa/ipa_service.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_subca.py b/plugins/modules/identity/ipa/ipa_subca.py index 387d63c513..ef9f74ed87 100644 --- a/plugins/modules/identity/ipa/ipa_subca.py +++ b/plugins/modules/identity/ipa/ipa_subca.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, Abhijeet Kasurde (akasurde@redhat.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_sudocmd.py b/plugins/modules/identity/ipa/ipa_sudocmd.py index d75aff44ce..18991ccfd4 100644 --- a/plugins/modules/identity/ipa/ipa_sudocmd.py +++ b/plugins/modules/identity/ipa/ipa_sudocmd.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_sudocmdgroup.py b/plugins/modules/identity/ipa/ipa_sudocmdgroup.py index 65fdd4f75f..d9c39a4a3c 100644 --- a/plugins/modules/identity/ipa/ipa_sudocmdgroup.py +++ b/plugins/modules/identity/ipa/ipa_sudocmdgroup.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_sudorule.py b/plugins/modules/identity/ipa/ipa_sudorule.py index 2054599f9d..bc5419adba 100644 --- a/plugins/modules/identity/ipa/ipa_sudorule.py +++ b/plugins/modules/identity/ipa/ipa_sudorule.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_user.py b/plugins/modules/identity/ipa/ipa_user.py index 8a7b3abea2..4fd96425cf 100644 --- a/plugins/modules/identity/ipa/ipa_user.py +++ b/plugins/modules/identity/ipa/ipa_user.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/ipa/ipa_vault.py b/plugins/modules/identity/ipa/ipa_vault.py index 108843b224..bfefc7a94c 100644 --- a/plugins/modules/identity/ipa/ipa_vault.py +++ b/plugins/modules/identity/ipa/ipa_vault.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Juan Manuel Parrilla -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Juan Manuel Parrilla +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_authentication.py b/plugins/modules/identity/keycloak/keycloak_authentication.py index c7bf5bc01f..e2e680814f 100644 --- a/plugins/modules/identity/keycloak/keycloak_authentication.py +++ b/plugins/modules/identity/keycloak/keycloak_authentication.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, INSPQ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, INSPQ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_client.py b/plugins/modules/identity/keycloak/keycloak_client.py index 88268b3068..547f6fd5fa 100644 --- a/plugins/modules/identity/keycloak/keycloak_client.py +++ b/plugins/modules/identity/keycloak/keycloak_client.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Eike Frost -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py index 2d89753143..0f199bad5c 100644 --- a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py +++ b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_clientscope.py b/plugins/modules/identity/keycloak/keycloak_clientscope.py index 2deab5547d..fbb6e8db1f 100644 --- a/plugins/modules/identity/keycloak/keycloak_clientscope.py +++ b/plugins/modules/identity/keycloak/keycloak_clientscope.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_clienttemplate.py b/plugins/modules/identity/keycloak/keycloak_clienttemplate.py index cec7c93d8d..b35827372e 100644 --- a/plugins/modules/identity/keycloak/keycloak_clienttemplate.py +++ b/plugins/modules/identity/keycloak/keycloak_clienttemplate.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Eike Frost -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_group.py b/plugins/modules/identity/keycloak/keycloak_group.py index 3455f57818..1ae3859ef2 100644 --- a/plugins/modules/identity/keycloak/keycloak_group.py +++ b/plugins/modules/identity/keycloak/keycloak_group.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Adam Goossens -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_identity_provider.py b/plugins/modules/identity/keycloak/keycloak_identity_provider.py index a4adddd951..8635d60635 100644 --- a/plugins/modules/identity/keycloak/keycloak_identity_provider.py +++ b/plugins/modules/identity/keycloak/keycloak_identity_provider.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_realm.py b/plugins/modules/identity/keycloak/keycloak_realm.py index fd9f17ebf8..f457d20cd3 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm.py +++ b/plugins/modules/identity/keycloak/keycloak_realm.py @@ -3,7 +3,8 @@ # Copyright (c) 2017, Eike Frost # Copyright (c) 2021, Christophe Gilles -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_realm_info.py b/plugins/modules/identity/keycloak/keycloak_realm_info.py index b67f1333e1..45a8e4e986 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm_info.py +++ b/plugins/modules/identity/keycloak/keycloak_realm_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_role.py b/plugins/modules/identity/keycloak/keycloak_role.py index 2dd2438e42..ea6828b38e 100644 --- a/plugins/modules/identity/keycloak/keycloak_role.py +++ b/plugins/modules/identity/keycloak/keycloak_role.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Adam Goossens -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/keycloak/keycloak_user_federation.py b/plugins/modules/identity/keycloak/keycloak_user_federation.py index 4d623a4874..ee48fbe326 100644 --- a/plugins/modules/identity/keycloak/keycloak_user_federation.py +++ b/plugins/modules/identity/keycloak/keycloak_user_federation.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index 6621092303..ab991410f0 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -4,7 +4,8 @@ # (c) 2018, Ryan Conway (@rylon) # (c) 2018, Scott Buchanan (onepassword.py used as starting point) # (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/identity/opendj/opendj_backendprop.py b/plugins/modules/identity/opendj/opendj_backendprop.py index be118a505d..dfdf6a903a 100644 --- a/plugins/modules/identity/opendj/opendj_backendprop.py +++ b/plugins/modules/identity/opendj/opendj_backendprop.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Werner Dijkerman (ikben@werner-dijkerman.nl) -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Werner Dijkerman (ikben@werner-dijkerman.nl) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/airbrake_deployment.py b/plugins/modules/monitoring/airbrake_deployment.py index a7d7710a0a..fd2bd018c2 100644 --- a/plugins/modules/monitoring/airbrake_deployment.py +++ b/plugins/modules/monitoring/airbrake_deployment.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright 2013 Bruce Pennypacker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/alerta_customer.py b/plugins/modules/monitoring/alerta_customer.py index 27b0abe1a9..b9bfd4b265 100644 --- a/plugins/modules/monitoring/alerta_customer.py +++ b/plugins/modules/monitoring/alerta_customer.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2022, Christian Wollinger <@cwollinger> -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2022, Christian Wollinger <@cwollinger> +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/monitoring/bigpanda.py index c5fe61cbf6..2150750ed3 100644 --- a/plugins/modules/monitoring/bigpanda.py +++ b/plugins/modules/monitoring/bigpanda.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/circonus_annotation.py b/plugins/modules/monitoring/circonus_annotation.py index 40c7297dd7..ddd1db90eb 100644 --- a/plugins/modules/monitoring/circonus_annotation.py +++ b/plugins/modules/monitoring/circonus_annotation.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2014-2015, Epic Games, Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/datadog/datadog_downtime.py b/plugins/modules/monitoring/datadog/datadog_downtime.py index ef308bdabe..2226d0c678 100644 --- a/plugins/modules/monitoring/datadog/datadog_downtime.py +++ b/plugins/modules/monitoring/datadog/datadog_downtime.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Datadog, Inc -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Datadog, Inc +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/monitoring/datadog/datadog_event.py index e45b900e6e..b7a4c75e43 100644 --- a/plugins/modules/monitoring/datadog/datadog_event.py +++ b/plugins/modules/monitoring/datadog/datadog_event.py @@ -6,7 +6,8 @@ # # This module is proudly sponsored by iGeolise (www.igeolise.com) and # Tiny Lab Productions (www.tinylabproductions.com). -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index ffc2bcd657..0d0aacc0c7 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Sebastian Kornehl -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Sebastian Kornehl +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/honeybadger_deployment.py b/plugins/modules/monitoring/honeybadger_deployment.py index 2e2198e1a3..b0dd0ea8bc 100644 --- a/plugins/modules/monitoring/honeybadger_deployment.py +++ b/plugins/modules/monitoring/honeybadger_deployment.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright 2014 Benjamin Curtis -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/icinga2_feature.py b/plugins/modules/monitoring/icinga2_feature.py index b59c0e11e4..395003e65f 100644 --- a/plugins/modules/monitoring/icinga2_feature.py +++ b/plugins/modules/monitoring/icinga2_feature.py @@ -6,7 +6,8 @@ # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/icinga2_host.py b/plugins/modules/monitoring/icinga2_host.py index b4c4cdbcfb..498f1a9938 100644 --- a/plugins/modules/monitoring/icinga2_host.py +++ b/plugins/modules/monitoring/icinga2_host.py @@ -3,7 +3,8 @@ # This module is proudly sponsored by CGI (www.cgi.com) and # KPN (www.kpn.com). -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/librato_annotation.py b/plugins/modules/monitoring/librato_annotation.py index 6fcabcf34e..79c263da1e 100644 --- a/plugins/modules/monitoring/librato_annotation.py +++ b/plugins/modules/monitoring/librato_annotation.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (C) Seth Edwards, 2014 -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/logentries.py b/plugins/modules/monitoring/logentries.py index 075752862d..eb56ccfb96 100644 --- a/plugins/modules/monitoring/logentries.py +++ b/plugins/modules/monitoring/logentries.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Ivan Vanderbyl -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/logstash_plugin.py b/plugins/modules/monitoring/logstash_plugin.py index 13b1233c1f..01cc97d567 100644 --- a/plugins/modules/monitoring/logstash_plugin.py +++ b/plugins/modules/monitoring/logstash_plugin.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Loic Blot -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/monit.py b/plugins/modules/monitoring/monit.py index dfbe9cee35..7a5867f4d5 100644 --- a/plugins/modules/monitoring/monit.py +++ b/plugins/modules/monitoring/monit.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Darryl Stoflet -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/nagios.py b/plugins/modules/monitoring/nagios.py index 248fd1051d..b36c6691d2 100644 --- a/plugins/modules/monitoring/nagios.py +++ b/plugins/modules/monitoring/nagios.py @@ -7,7 +7,8 @@ # func-nagios - Schedule downtime and enables/disable notifications # Copyright 2011, Red Hat, Inc. # Tim Bielawa -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/newrelic_deployment.py b/plugins/modules/monitoring/newrelic_deployment.py index af953e0a75..d9b1fd770c 100644 --- a/plugins/modules/monitoring/newrelic_deployment.py +++ b/plugins/modules/monitoring/newrelic_deployment.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright 2013 Matt Coddington -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/pagerduty.py b/plugins/modules/monitoring/pagerduty.py index dba931ab96..c19ae2ac55 100644 --- a/plugins/modules/monitoring/pagerduty.py +++ b/plugins/modules/monitoring/pagerduty.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/pagerduty_alert.py b/plugins/modules/monitoring/pagerduty_alert.py index 58a1f260fb..e6bd7a3c0c 100644 --- a/plugins/modules/monitoring/pagerduty_alert.py +++ b/plugins/modules/monitoring/pagerduty_alert.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/pagerduty_change.py b/plugins/modules/monitoring/pagerduty_change.py index 358a69612e..cc8f562eac 100644 --- a/plugins/modules/monitoring/pagerduty_change.py +++ b/plugins/modules/monitoring/pagerduty_change.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Adam Vaughan (@adamvaughan) avaughan@pagerduty.com -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Adam Vaughan (@adamvaughan) avaughan@pagerduty.com +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/pagerduty_user.py b/plugins/modules/monitoring/pagerduty_user.py index 4b20a32108..360fbe17ad 100644 --- a/plugins/modules/monitoring/pagerduty_user.py +++ b/plugins/modules/monitoring/pagerduty_user.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Zainab Alsaffar -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Zainab Alsaffar +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/pingdom.py b/plugins/modules/monitoring/pingdom.py index 23ed254543..e9ee40eb96 100644 --- a/plugins/modules/monitoring/pingdom.py +++ b/plugins/modules/monitoring/pingdom.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/rollbar_deployment.py b/plugins/modules/monitoring/rollbar_deployment.py index cea3bfdf51..10762061f2 100644 --- a/plugins/modules/monitoring/rollbar_deployment.py +++ b/plugins/modules/monitoring/rollbar_deployment.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright 2014, Max Riveiro, -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index ec43b60abe..c03b11b605 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/sensu/sensu_client.py b/plugins/modules/monitoring/sensu/sensu_client.py index 886c398e09..2f15268e85 100644 --- a/plugins/modules/monitoring/sensu/sensu_client.py +++ b/plugins/modules/monitoring/sensu/sensu_client.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Red Hat Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/sensu/sensu_handler.py b/plugins/modules/monitoring/sensu/sensu_handler.py index 6511479899..6a5fcf6cce 100644 --- a/plugins/modules/monitoring/sensu/sensu_handler.py +++ b/plugins/modules/monitoring/sensu/sensu_handler.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Red Hat Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/sensu/sensu_silence.py b/plugins/modules/monitoring/sensu/sensu_silence.py index 80a5216711..f508bd5d39 100644 --- a/plugins/modules/monitoring/sensu/sensu_silence.py +++ b/plugins/modules/monitoring/sensu/sensu_silence.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Steven Bambling -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/sensu/sensu_subscription.py b/plugins/modules/monitoring/sensu/sensu_subscription.py index 947c6e0de5..b7d97e93ea 100644 --- a/plugins/modules/monitoring/sensu/sensu_subscription.py +++ b/plugins/modules/monitoring/sensu/sensu_subscription.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/spectrum_device.py b/plugins/modules/monitoring/spectrum_device.py index 77e3b15390..36e46cb917 100644 --- a/plugins/modules/monitoring/spectrum_device.py +++ b/plugins/modules/monitoring/spectrum_device.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Renato Orgito -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/spectrum_model_attrs.py b/plugins/modules/monitoring/spectrum_model_attrs.py index 231352acd6..dc518b5e16 100644 --- a/plugins/modules/monitoring/spectrum_model_attrs.py +++ b/plugins/modules/monitoring/spectrum_model_attrs.py @@ -3,7 +3,8 @@ # # (c) 2021, Tyler Gates # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/monitoring/stackdriver.py b/plugins/modules/monitoring/stackdriver.py index fa6bacb951..6fe2a7caa9 100644 --- a/plugins/modules/monitoring/stackdriver.py +++ b/plugins/modules/monitoring/stackdriver.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/statsd.py b/plugins/modules/monitoring/statsd.py index b07851641b..26c8e7c283 100644 --- a/plugins/modules/monitoring/statsd.py +++ b/plugins/modules/monitoring/statsd.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/statusio_maintenance.py b/plugins/modules/monitoring/statusio_maintenance.py index 10f733d4a8..b98b45006d 100644 --- a/plugins/modules/monitoring/statusio_maintenance.py +++ b/plugins/modules/monitoring/statusio_maintenance.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Benjamin Copeland (@bhcopeland) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/monitoring/uptimerobot.py b/plugins/modules/monitoring/uptimerobot.py index 833a7f191e..527e59ac1f 100644 --- a/plugins/modules/monitoring/uptimerobot.py +++ b/plugins/modules/monitoring/uptimerobot.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/cloudflare_dns.py b/plugins/modules/net_tools/cloudflare_dns.py index 4e82e0af36..34e1d84500 100644 --- a/plugins/modules/net_tools/cloudflare_dns.py +++ b/plugins/modules/net_tools/cloudflare_dns.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016 Michael Gruener -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016 Michael Gruener +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/dnsimple.py b/plugins/modules/net_tools/dnsimple.py index a4d531c76d..79a8a7400a 100644 --- a/plugins/modules/net_tools/dnsimple.py +++ b/plugins/modules/net_tools/dnsimple.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project +# Copyright Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/dnsimple_info.py b/plugins/modules/net_tools/dnsimple_info.py index 4ac22be0cb..163d1f6f6a 100644 --- a/plugins/modules/net_tools/dnsimple_info.py +++ b/plugins/modules/net_tools/dnsimple_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Edward Hilgendorf, -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Edward Hilgendorf, +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/net_tools/dnsmadeeasy.py index 1d708cdce0..121f16584f 100644 --- a/plugins/modules/net_tools/dnsmadeeasy.py +++ b/plugins/modules/net_tools/dnsmadeeasy.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/gandi_livedns.py b/plugins/modules/net_tools/gandi_livedns.py index 6124288511..9566661f41 100644 --- a/plugins/modules/net_tools/gandi_livedns.py +++ b/plugins/modules/net_tools/gandi_livedns.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019 Gregory Thiemonge -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019 Gregory Thiemonge +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/haproxy.py b/plugins/modules/net_tools/haproxy.py index edeb99da69..71035c4ba8 100644 --- a/plugins/modules/net_tools/haproxy.py +++ b/plugins/modules/net_tools/haproxy.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Ravi Bhure -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Ravi Bhure +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/net_tools/infinity/infinity.py index 950dd228d2..53fa7efd48 100644 --- a/plugins/modules/net_tools/infinity/infinity.py +++ b/plugins/modules/net_tools/infinity/infinity.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/net_tools/ipify_facts.py b/plugins/modules/net_tools/ipify_facts.py index 2ae0348cb1..2abc13af2a 100644 --- a/plugins/modules/net_tools/ipify_facts.py +++ b/plugins/modules/net_tools/ipify_facts.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2015, René Moser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, René Moser +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/ipinfoio_facts.py b/plugins/modules/net_tools/ipinfoio_facts.py index ee1d49f3ac..a10b54ecce 100644 --- a/plugins/modules/net_tools/ipinfoio_facts.py +++ b/plugins/modules/net_tools/ipinfoio_facts.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Aleksei Kostiuk -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Aleksei Kostiuk +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/ipwcli_dns.py b/plugins/modules/net_tools/ipwcli_dns.py index 8a6122edff..53451f9b63 100644 --- a/plugins/modules/net_tools/ipwcli_dns.py +++ b/plugins/modules/net_tools/ipwcli_dns.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Christian Wollinger -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Christian Wollinger +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/net_tools/ldap/ldap_attrs.py b/plugins/modules/net_tools/ldap/ldap_attrs.py index fc3b44d36c..39f6a59d34 100644 --- a/plugins/modules/net_tools/ldap/ldap_attrs.py +++ b/plugins/modules/net_tools/ldap/ldap_attrs.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Maciej Delmanowski -# Copyright: (c) 2017, Alexander Korinek -# Copyright: (c) 2016, Peter Sagerson -# Copyright: (c) 2016, Jiri Tyr -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Maciej Delmanowski +# Copyright (c) 2017, Alexander Korinek +# Copyright (c) 2016, Peter Sagerson +# Copyright (c) 2016, Jiri Tyr +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/ldap/ldap_entry.py b/plugins/modules/net_tools/ldap/ldap_entry.py index 24e121e521..affdafeb6c 100644 --- a/plugins/modules/net_tools/ldap/ldap_entry.py +++ b/plugins/modules/net_tools/ldap/ldap_entry.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Peter Sagerson -# Copyright: (c) 2016, Jiri Tyr +# Copyright (c) 2016, Peter Sagerson +# Copyright (c) 2016, Jiri Tyr # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/ldap/ldap_passwd.py b/plugins/modules/net_tools/ldap/ldap_passwd.py index 4cb58b4ebf..5ffd5e12ca 100644 --- a/plugins/modules/net_tools/ldap/ldap_passwd.py +++ b/plugins/modules/net_tools/ldap/ldap_passwd.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017-2018, Keller Fuchs -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017-2018, Keller Fuchs +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/ldap/ldap_search.py b/plugins/modules/net_tools/ldap/ldap_search.py index d3378646ac..02ba4d3529 100644 --- a/plugins/modules/net_tools/ldap/ldap_search.py +++ b/plugins/modules/net_tools/ldap/ldap_search.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Peter Sagerson -# Copyright: (c) 2020, Sebastian Pfahl -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Peter Sagerson +# Copyright (c) 2020, Sebastian Pfahl +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/lldp.py b/plugins/modules/net_tools/lldp.py index 1b8fa9eb06..9a74f37f37 100644 --- a/plugins/modules/net_tools/lldp.py +++ b/plugins/modules/net_tools/lldp.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/netcup_dns.py b/plugins/modules/net_tools/netcup_dns.py index 5ec5cbb246..14264081ad 100644 --- a/plugins/modules/net_tools/netcup_dns.py +++ b/plugins/modules/net_tools/netcup_dns.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2018 Nicolai Buchwitz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index caf4b3ba7f..e195249360 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Chris Long -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Chris Long +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/nsupdate.py b/plugins/modules/net_tools/nsupdate.py index fc0d5e1c46..d71775e61c 100644 --- a/plugins/modules/net_tools/nsupdate.py +++ b/plugins/modules/net_tools/nsupdate.py @@ -7,7 +7,8 @@ # # This module was ported from https://github.com/mskarbek/ansible-nsupdate # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/omapi_host.py b/plugins/modules/net_tools/omapi_host.py index 4d65fcb95d..5d03e16618 100644 --- a/plugins/modules/net_tools/omapi_host.py +++ b/plugins/modules/net_tools/omapi_host.py @@ -4,7 +4,8 @@ # copyright: (c) 2016, Loic Blot # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/net_tools/pritunl/pritunl_org.py b/plugins/modules/net_tools/pritunl/pritunl_org.py index 35796ae361..0900ccf3be 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_org.py +++ b/plugins/modules/net_tools/pritunl/pritunl_org.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/net_tools/pritunl/pritunl_org_info.py b/plugins/modules/net_tools/pritunl/pritunl_org_info.py index a7e65c80d1..65e8c93c56 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_org_info.py +++ b/plugins/modules/net_tools/pritunl/pritunl_org_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/net_tools/pritunl/pritunl_user.py b/plugins/modules/net_tools/pritunl/pritunl_user.py index 0beb9720b6..1ddd8a97af 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_user.py +++ b/plugins/modules/net_tools/pritunl/pritunl_user.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/net_tools/pritunl/pritunl_user_info.py b/plugins/modules/net_tools/pritunl/pritunl_user_info.py index e8cf5e2955..3a5343f6b6 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_user_info.py +++ b/plugins/modules/net_tools/pritunl/pritunl_user_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/net_tools/snmp_facts.py b/plugins/modules/net_tools/snmp_facts.py index 37183b95f4..71dd9259bb 100644 --- a/plugins/modules/net_tools/snmp_facts.py +++ b/plugins/modules/net_tools/snmp_facts.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # This file is part of Networklore's snmp library for Ansible -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/campfire.py b/plugins/modules/notification/campfire.py index c684823889..dfc9af1ce1 100644 --- a/plugins/modules/notification/campfire.py +++ b/plugins/modules/notification/campfire.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/catapult.py b/plugins/modules/notification/catapult.py index 1383362068..10fb11b4b3 100644 --- a/plugins/modules/notification/catapult.py +++ b/plugins/modules/notification/catapult.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Jonathan Mainguy -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # basis of code taken from the ansible twillio and nexmo modules diff --git a/plugins/modules/notification/cisco_webex.py b/plugins/modules/notification/cisco_webex.py index 8c1361fb14..7bcae7fcfa 100644 --- a/plugins/modules/notification/cisco_webex.py +++ b/plugins/modules/notification/cisco_webex.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/discord.py b/plugins/modules/notification/discord.py index 27dc6fc85c..d31448529c 100644 --- a/plugins/modules/notification/discord.py +++ b/plugins/modules/notification/discord.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Christian Wollinger -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Christian Wollinger +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/flowdock.py b/plugins/modules/notification/flowdock.py index a1842c5d16..880236b36b 100644 --- a/plugins/modules/notification/flowdock.py +++ b/plugins/modules/notification/flowdock.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright 2013 Matt Coddington -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/grove.py b/plugins/modules/notification/grove.py index 12c910902e..5cc65c0a65 100644 --- a/plugins/modules/notification/grove.py +++ b/plugins/modules/notification/grove.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/hipchat.py b/plugins/modules/notification/hipchat.py index 76c1227af4..7e1a2418ad 100644 --- a/plugins/modules/notification/hipchat.py +++ b/plugins/modules/notification/hipchat.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/irc.py b/plugins/modules/notification/irc.py index 9b1b91f586..16dbdb62bf 100644 --- a/plugins/modules/notification/irc.py +++ b/plugins/modules/notification/irc.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Jan-Piet Mens -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/jabber.py b/plugins/modules/notification/jabber.py index 9b6811b3fa..8b4df4ad43 100644 --- a/plugins/modules/notification/jabber.py +++ b/plugins/modules/notification/jabber.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/logentries_msg.py b/plugins/modules/notification/logentries_msg.py index 59e0f32565..b1b77e1d62 100644 --- a/plugins/modules/notification/logentries_msg.py +++ b/plugins/modules/notification/logentries_msg.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/mail.py b/plugins/modules/notification/mail.py index 82ca6d52b2..59206f4bb6 100644 --- a/plugins/modules/notification/mail.py +++ b/plugins/modules/notification/mail.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2012, Dag Wieers (@dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2012, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/matrix.py b/plugins/modules/notification/matrix.py index d94ed2b8de..07c3755338 100644 --- a/plugins/modules/notification/matrix.py +++ b/plugins/modules/notification/matrix.py @@ -2,7 +2,8 @@ # coding: utf-8 # (c) 2018, Jan Christian Grünhage -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/notification/mattermost.py b/plugins/modules/notification/mattermost.py index efee4c33eb..486c7f3e1f 100644 --- a/plugins/modules/notification/mattermost.py +++ b/plugins/modules/notification/mattermost.py @@ -8,7 +8,8 @@ # # (c) 2015, Stefan Berggren # # (c) 2014, Ramon de la Fuente ) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/mqtt.py b/plugins/modules/notification/mqtt.py index 6099196102..698c20c4e6 100644 --- a/plugins/modules/notification/mqtt.py +++ b/plugins/modules/notification/mqtt.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, 2014, Jan-Piet Mens -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/nexmo.py b/plugins/modules/notification/nexmo.py index d239bb4456..fa3f613072 100644 --- a/plugins/modules/notification/nexmo.py +++ b/plugins/modules/notification/nexmo.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2014, Matt Martz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/office_365_connector_card.py b/plugins/modules/notification/office_365_connector_card.py index 04d5e385d4..fc9a24aa57 100644 --- a/plugins/modules/notification/office_365_connector_card.py +++ b/plugins/modules/notification/office_365_connector_card.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017 Marc Sensenich # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/notification/pushbullet.py b/plugins/modules/notification/pushbullet.py index 435fcf2fcb..a3e4104554 100644 --- a/plugins/modules/notification/pushbullet.py +++ b/plugins/modules/notification/pushbullet.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/pushover.py b/plugins/modules/notification/pushover.py index 7f73592a36..c4c12a4670 100644 --- a/plugins/modules/notification/pushover.py +++ b/plugins/modules/notification/pushover.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2012, Jim Richardson # Copyright (c) 2019, Bernd Arnold -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/rocketchat.py b/plugins/modules/notification/rocketchat.py index 500560e417..ffb4f6e7af 100644 --- a/plugins/modules/notification/rocketchat.py +++ b/plugins/modules/notification/rocketchat.py @@ -5,7 +5,8 @@ # (c) 2015, Stefan Berggren # (c) 2014, Ramon de la Fuente # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/say.py b/plugins/modules/notification/say.py index 1c66adf66e..ae470bedcf 100644 --- a/plugins/modules/notification/say.py +++ b/plugins/modules/notification/say.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Michael DeHaan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/sendgrid.py b/plugins/modules/notification/sendgrid.py index 2c349064b8..3424cf4194 100644 --- a/plugins/modules/notification/sendgrid.py +++ b/plugins/modules/notification/sendgrid.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Matt Makai -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Matt Makai +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/slack.py b/plugins/modules/notification/slack.py index f10d4003d6..c54ac6f4d4 100644 --- a/plugins/modules/notification/slack.py +++ b/plugins/modules/notification/slack.py @@ -8,7 +8,8 @@ # (c) 2015, Stefan Berggren # (c) 2014, Ramon de la Fuente # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/syslogger.py b/plugins/modules/notification/syslogger.py index 7627f35985..07cdb87227 100644 --- a/plugins/modules/notification/syslogger.py +++ b/plugins/modules/notification/syslogger.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Tim Rightnour -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Tim Rightnour +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/telegram.py b/plugins/modules/notification/telegram.py index 4960874ddb..20fcd207bc 100644 --- a/plugins/modules/notification/telegram.py +++ b/plugins/modules/notification/telegram.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Artem Feofanov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/twilio.py b/plugins/modules/notification/twilio.py index 88851a6ad3..1c8c468b43 100644 --- a/plugins/modules/notification/twilio.py +++ b/plugins/modules/notification/twilio.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Matt Makai -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/typetalk.py b/plugins/modules/notification/typetalk.py index 6f8e4e8b9a..5fe2baa916 100644 --- a/plugins/modules/notification/typetalk.py +++ b/plugins/modules/notification/typetalk.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/ansible_galaxy_install.py b/plugins/modules/packaging/language/ansible_galaxy_install.py index 5e2a810f0a..bd7a5f3401 100644 --- a/plugins/modules/packaging/language/ansible_galaxy_install.py +++ b/plugins/modules/packaging/language/ansible_galaxy_install.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/bower.py b/plugins/modules/packaging/language/bower.py index 911d99b7d9..d0d6ef9fe8 100644 --- a/plugins/modules/packaging/language/bower.py +++ b/plugins/modules/packaging/language/bower.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2014, Michael Warkentin -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/bundler.py b/plugins/modules/packaging/language/bundler.py index 43f8cfa2ee..8bdfa954e3 100644 --- a/plugins/modules/packaging/language/bundler.py +++ b/plugins/modules/packaging/language/bundler.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Tim Hoiberg -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/cargo.py b/plugins/modules/packaging/language/cargo.py index d449f1020e..787edbd256 100644 --- a/plugins/modules/packaging/language/cargo.py +++ b/plugins/modules/packaging/language/cargo.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021 Radek Sprta -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index f0ae135c39..38e4b63c0f 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2014, Dimitrios Tydeas Mengidis -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/cpanm.py b/plugins/modules/packaging/language/cpanm.py index 8c8f2ea1c3..dd2ebefb12 100644 --- a/plugins/modules/packaging/language/cpanm.py +++ b/plugins/modules/packaging/language/cpanm.py @@ -3,7 +3,8 @@ # (c) 2012, Franck Cuny # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/easy_install.py b/plugins/modules/packaging/language/easy_install.py index 5e1d7930b5..6e122178a7 100644 --- a/plugins/modules/packaging/language/easy_install.py +++ b/plugins/modules/packaging/language/easy_install.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2012, Matt Wright -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/gem.py b/plugins/modules/packaging/language/gem.py index ad48e0c7da..77b16a1f86 100644 --- a/plugins/modules/packaging/language/gem.py +++ b/plugins/modules/packaging/language/gem.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Johan Wiren -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index a9c4232baa..f7b690e79b 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -6,7 +6,8 @@ # Built using https://github.com/hamnis/useful-scripts/blob/master/python/download-maven-artifact # as a reference and starting point. # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/npm.py b/plugins/modules/packaging/language/npm.py index 1c97035e67..c34aaa076c 100644 --- a/plugins/modules/packaging/language/npm.py +++ b/plugins/modules/packaging/language/npm.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Chris Hoffman -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/pear.py b/plugins/modules/packaging/language/pear.py index e8e36b3c56..bf96484d61 100644 --- a/plugins/modules/packaging/language/pear.py +++ b/plugins/modules/packaging/language/pear.py @@ -5,7 +5,8 @@ # (c) 2013, Aaron Bull Schaefer # (c) 2015, Jonathan Lestrelin # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/pip_package_info.py b/plugins/modules/packaging/language/pip_package_info.py index 0082499da0..152f21ce4d 100644 --- a/plugins/modules/packaging/language/pip_package_info.py +++ b/plugins/modules/packaging/language/pip_package_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # started out with AWX's scan_packages module diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/packaging/language/pipx.py index 0d1103000a..e4b29f2193 100644 --- a/plugins/modules/packaging/language/pipx.py +++ b/plugins/modules/packaging/language/pipx.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/language/yarn.py b/plugins/modules/packaging/language/yarn.py index 6ea9db5d26..43af767e48 100644 --- a/plugins/modules/packaging/language/yarn.py +++ b/plugins/modules/packaging/language/yarn.py @@ -3,7 +3,8 @@ # (c) 2017 David Gunter # Copyright (c) 2017 Chris Hoffman -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/packaging/os/apk.py b/plugins/modules/packaging/os/apk.py index 6fad08737d..15b70eb2a2 100644 --- a/plugins/modules/packaging/os/apk.py +++ b/plugins/modules/packaging/os/apk.py @@ -5,7 +5,8 @@ # Based on pacman (Afterburn , Aaron Bull Schaefer ) # and apt (Matthew Williams ) modules. # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/apt_repo.py b/plugins/modules/packaging/os/apt_repo.py index d196e03be1..db69d86226 100644 --- a/plugins/modules/packaging/os/apt_repo.py +++ b/plugins/modules/packaging/os/apt_repo.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Mikhail Gordeev +# Copyright (c) 2018, Mikhail Gordeev -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/apt_rpm.py b/plugins/modules/packaging/os/apt_rpm.py index 95d0f64109..fbca31405e 100644 --- a/plugins/modules/packaging/os/apt_rpm.py +++ b/plugins/modules/packaging/os/apt_rpm.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Evgenii Terechkov +# Copyright (c) 2013, Evgenii Terechkov # Written by Evgenii Terechkov # Based on urpmi module written by Philippe Makowski -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/copr.py b/plugins/modules/packaging/os/copr.py index cb31e8c9fb..58c4a0b6a2 100644 --- a/plugins/modules/packaging/os/copr.py +++ b/plugins/modules/packaging/os/copr.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Silvie Chlupova -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Silvie Chlupova +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/dnf_versionlock.py b/plugins/modules/packaging/os/dnf_versionlock.py index fca33fd83c..a0a440b620 100644 --- a/plugins/modules/packaging/os/dnf_versionlock.py +++ b/plugins/modules/packaging/os/dnf_versionlock.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Roberto Moreda -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Roberto Moreda +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/packaging/os/flatpak.py b/plugins/modules/packaging/os/flatpak.py index da913b5ac0..d194bec0e0 100644 --- a/plugins/modules/packaging/os/flatpak.py +++ b/plugins/modules/packaging/os/flatpak.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017 John Kwiatkoski (@JayKayy) -# Copyright: (c) 2018 Alexander Bethke (@oolongbrothers) -# Copyright: (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017 John Kwiatkoski (@JayKayy) +# Copyright (c) 2018 Alexander Bethke (@oolongbrothers) +# Copyright (c) 2017 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/packaging/os/flatpak_remote.py b/plugins/modules/packaging/os/flatpak_remote.py index e0e4170f47..a80ea21768 100644 --- a/plugins/modules/packaging/os/flatpak_remote.py +++ b/plugins/modules/packaging/os/flatpak_remote.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017 John Kwiatkoski (@JayKayy) -# Copyright: (c) 2018 Alexander Bethke (@oolongbrothers) -# Copyright: (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017 John Kwiatkoski (@JayKayy) +# Copyright (c) 2018 Alexander Bethke (@oolongbrothers) +# Copyright (c) 2017 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/packaging/os/homebrew.py b/plugins/modules/packaging/os/homebrew.py index 08fc1cdc58..1034418f58 100644 --- a/plugins/modules/packaging/os/homebrew.py +++ b/plugins/modules/packaging/os/homebrew.py @@ -7,7 +7,8 @@ # # Based on macports (Jimmy Tang ) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/homebrew_cask.py b/plugins/modules/packaging/os/homebrew_cask.py index a43eabb7cb..15bb41500d 100644 --- a/plugins/modules/packaging/os/homebrew_cask.py +++ b/plugins/modules/packaging/os/homebrew_cask.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Daniel Jaouen -# Copyright: (c) 2016, Indrajit Raychaudhuri +# Copyright (c) 2013, Daniel Jaouen +# Copyright (c) 2016, Indrajit Raychaudhuri # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/homebrew_tap.py b/plugins/modules/packaging/os/homebrew_tap.py index 6b30fdb68f..bbba2d9f6d 100644 --- a/plugins/modules/packaging/os/homebrew_tap.py +++ b/plugins/modules/packaging/os/homebrew_tap.py @@ -1,12 +1,13 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Daniel Jaouen -# Copyright: (c) 2016, Indrajit Raychaudhuri +# Copyright (c) 2013, Daniel Jaouen +# Copyright (c) 2016, Indrajit Raychaudhuri # # Based on homebrew (Andrew Dunham ) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/installp.py b/plugins/modules/packaging/os/installp.py index af7a950afa..750cc4dea7 100644 --- a/plugins/modules/packaging/os/installp.py +++ b/plugins/modules/packaging/os/installp.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Kairo Araujo -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Kairo Araujo +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/layman.py b/plugins/modules/packaging/os/layman.py index 3c990205d9..18d928c338 100644 --- a/plugins/modules/packaging/os/layman.py +++ b/plugins/modules/packaging/os/layman.py @@ -3,7 +3,8 @@ # (c) 2014, Jakub Jirutka # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/macports.py b/plugins/modules/packaging/os/macports.py index 1d3f47a240..9eac411d48 100644 --- a/plugins/modules/packaging/os/macports.py +++ b/plugins/modules/packaging/os/macports.py @@ -5,7 +5,8 @@ # Based on okpg (Patrick Pelletier ), pacman # (Afterburn) and pkgin (Shaun Zinck) modules # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/mas.py b/plugins/modules/packaging/os/mas.py index 0afd858add..236d564858 100644 --- a/plugins/modules/packaging/os/mas.py +++ b/plugins/modules/packaging/os/mas.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Lukas Bestle -# Copyright: (c) 2017, Michael Heap -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Lukas Bestle +# Copyright (c) 2017, Michael Heap +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/openbsd_pkg.py b/plugins/modules/packaging/os/openbsd_pkg.py index e72b7c007a..67484d9401 100644 --- a/plugins/modules/packaging/os/openbsd_pkg.py +++ b/plugins/modules/packaging/os/openbsd_pkg.py @@ -3,7 +3,8 @@ # (c) 2013, Patrik Lundin # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/packaging/os/opkg.py index f7bc9ae842..b6c28c6321 100644 --- a/plugins/modules/packaging/os/opkg.py +++ b/plugins/modules/packaging/os/opkg.py @@ -4,7 +4,8 @@ # (c) 2013, Patrick Pelletier # Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index 1d764c6f0f..4b8a4a0442 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2012, Afterburn -# Copyright: (c) 2013, Aaron Bull Schaefer -# Copyright: (c) 2015, Indrajit Raychaudhuri -# Copyright: (c) 2022, Jean Raby -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2012, Afterburn +# Copyright (c) 2013, Aaron Bull Schaefer +# Copyright (c) 2015, Indrajit Raychaudhuri +# Copyright (c) 2022, Jean Raby +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/packaging/os/pacman_key.py b/plugins/modules/packaging/os/pacman_key.py index a40575b697..7fa173ac3b 100644 --- a/plugins/modules/packaging/os/pacman_key.py +++ b/plugins/modules/packaging/os/pacman_key.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, George Rawlinson -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, George Rawlinson +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/packaging/os/pkg5.py b/plugins/modules/packaging/os/pkg5.py index 266c073f37..f6f27a1d36 100644 --- a/plugins/modules/packaging/os/pkg5.py +++ b/plugins/modules/packaging/os/pkg5.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Peter Oliver -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Peter Oliver +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/pkg5_publisher.py b/plugins/modules/packaging/os/pkg5_publisher.py index 95d577655f..3ccf3d8ca1 100644 --- a/plugins/modules/packaging/os/pkg5_publisher.py +++ b/plugins/modules/packaging/os/pkg5_publisher.py @@ -3,7 +3,8 @@ # Copyright 2014 Peter Oliver # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/pkgin.py b/plugins/modules/packaging/os/pkgin.py index dc7204e60d..a350d1fe93 100644 --- a/plugins/modules/packaging/os/pkgin.py +++ b/plugins/modules/packaging/os/pkgin.py @@ -9,7 +9,8 @@ # Based on pacman module written by Afterburn # that was based on apt module written by Matthew Williams # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/pkgng.py b/plugins/modules/packaging/os/pkgng.py index 3ec8466c17..08af1482fc 100644 --- a/plugins/modules/packaging/os/pkgng.py +++ b/plugins/modules/packaging/os/pkgng.py @@ -7,7 +7,8 @@ # that was based on pacman module written by Afterburn # that was based on apt module written by Matthew Williams # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/pkgutil.py b/plugins/modules/packaging/os/pkgutil.py index 0f1daca4ef..d24bb59001 100644 --- a/plugins/modules/packaging/os/pkgutil.py +++ b/plugins/modules/packaging/os/pkgutil.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Alexander Winkler +# Copyright (c) 2013, Alexander Winkler # based on svr4pkg by # Boyd Adamson (2012) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/portage.py b/plugins/modules/packaging/os/portage.py index 2a8679dbbd..4493ed866f 100644 --- a/plugins/modules/packaging/os/portage.py +++ b/plugins/modules/packaging/os/portage.py @@ -7,7 +7,8 @@ # Modified by William L. Thomson Jr. # Based on apt module written by Matthew Williams # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/portinstall.py b/plugins/modules/packaging/os/portinstall.py index d1c33cc5c8..31d4799adf 100644 --- a/plugins/modules/packaging/os/portinstall.py +++ b/plugins/modules/packaging/os/portinstall.py @@ -5,7 +5,8 @@ # Written by berenddeboer # Based on pkgng module written by bleader # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/pulp_repo.py b/plugins/modules/packaging/os/pulp_repo.py index c363f01db7..67f64ebd4d 100644 --- a/plugins/modules/packaging/os/pulp_repo.py +++ b/plugins/modules/packaging/os/pulp_repo.py @@ -3,7 +3,8 @@ # (c) 2016, Joe Adams <@sysadmind> # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index 7309ba7d66..d9c544e5f9 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -3,7 +3,8 @@ # James Laska (jlaska@redhat.com) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/rhn_channel.py b/plugins/modules/packaging/os/rhn_channel.py index e3a1ae3098..02fc30dad0 100644 --- a/plugins/modules/packaging/os/rhn_channel.py +++ b/plugins/modules/packaging/os/rhn_channel.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) Vincent Van de Kussen -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) Vincent Van de Kussen +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/rhn_register.py b/plugins/modules/packaging/os/rhn_register.py index 08e9a99e9a..cd6e891296 100644 --- a/plugins/modules/packaging/os/rhn_register.py +++ b/plugins/modules/packaging/os/rhn_register.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) James Laska -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) James Laska +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/rhsm_release.py b/plugins/modules/packaging/os/rhsm_release.py index 4b76cee274..a577c25cdb 100644 --- a/plugins/modules/packaging/os/rhsm_release.py +++ b/plugins/modules/packaging/os/rhsm_release.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2018, Sean Myers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/packaging/os/rhsm_repository.py b/plugins/modules/packaging/os/rhsm_repository.py index b103ea621a..e154b02ea7 100644 --- a/plugins/modules/packaging/os/rhsm_repository.py +++ b/plugins/modules/packaging/os/rhsm_repository.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Giovanni Sciortino (@giovannisciortino) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Giovanni Sciortino (@giovannisciortino) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/rpm_ostree_pkg.py b/plugins/modules/packaging/os/rpm_ostree_pkg.py index 38e2486ddc..61d8c9b057 100644 --- a/plugins/modules/packaging/os/rpm_ostree_pkg.py +++ b/plugins/modules/packaging/os/rpm_ostree_pkg.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Dusty Mabe -# Copyright: (c) 2018, Ansible Project -# Copyright: (c) 2021, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Dusty Mabe +# Copyright (c) 2018, Ansible Project +# Copyright (c) 2021, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/packaging/os/slackpkg.py b/plugins/modules/packaging/os/slackpkg.py index e98f9a338d..291e25cb6f 100644 --- a/plugins/modules/packaging/os/slackpkg.py +++ b/plugins/modules/packaging/os/slackpkg.py @@ -8,7 +8,8 @@ # that was based on pacman module written by Afterburn # that was based on apt module written by Matthew Williams # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/snap.py b/plugins/modules/packaging/os/snap.py index 9ac56d09bd..ef18dbbc4c 100644 --- a/plugins/modules/packaging/os/snap.py +++ b/plugins/modules/packaging/os/snap.py @@ -1,12 +1,13 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Alexei Znamensky (russoz) -# Copyright: (c) 2021, Marcus Rickert -# Copyright: (c) 2018, Stanislas Lange (angristan) -# Copyright: (c) 2018, Victor Carceler +# Copyright (c) 2021, Alexei Znamensky (russoz) +# Copyright (c) 2021, Marcus Rickert +# Copyright (c) 2018, Stanislas Lange (angristan) +# Copyright (c) 2018, Victor Carceler -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/snap_alias.py b/plugins/modules/packaging/os/snap_alias.py index 036be12004..818dbbce31 100644 --- a/plugins/modules/packaging/os/snap_alias.py +++ b/plugins/modules/packaging/os/snap_alias.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Alexei Znamensky (russoz) +# Copyright (c) 2021, Alexei Znamensky (russoz) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index 347413fc9d..10ce1884d3 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -3,7 +3,8 @@ # (c) 2015-2016, Vlad Glagolev # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/svr4pkg.py b/plugins/modules/packaging/os/svr4pkg.py index aa7a5c2e52..7d4a4438dd 100644 --- a/plugins/modules/packaging/os/svr4pkg.py +++ b/plugins/modules/packaging/os/svr4pkg.py @@ -3,7 +3,8 @@ # (c) 2012, Boyd Adamson # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/swdepot.py b/plugins/modules/packaging/os/swdepot.py index 7e9db8353b..56236b6f08 100644 --- a/plugins/modules/packaging/os/swdepot.py +++ b/plugins/modules/packaging/os/swdepot.py @@ -5,7 +5,8 @@ # Written by Raul Melo # Based on yum module written by Seth Vidal # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/swupd.py b/plugins/modules/packaging/os/swupd.py index 6ededcad02..446d0c31ef 100644 --- a/plugins/modules/packaging/os/swupd.py +++ b/plugins/modules/packaging/os/swupd.py @@ -3,7 +3,8 @@ # (c) 2017, Alberto Murillo # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/urpmi.py b/plugins/modules/packaging/os/urpmi.py index 572a6146b0..096e7e9e60 100644 --- a/plugins/modules/packaging/os/urpmi.py +++ b/plugins/modules/packaging/os/urpmi.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Philippe Makowski +# Copyright (c) 2013, Philippe Makowski # Written by Philippe Makowski # Based on apt module written by Matthew Williams -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/xbps.py b/plugins/modules/packaging/os/xbps.py index 212ec79cbf..a9bf879ed6 100644 --- a/plugins/modules/packaging/os/xbps.py +++ b/plugins/modules/packaging/os/xbps.py @@ -3,7 +3,8 @@ # Copyright 2016 Dino Occhialini # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/yum_versionlock.py b/plugins/modules/packaging/os/yum_versionlock.py index de610cce73..4835f6116c 100644 --- a/plugins/modules/packaging/os/yum_versionlock.py +++ b/plugins/modules/packaging/os/yum_versionlock.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Florian Paul Azim Hoberg +# Copyright (c) 2018, Florian Paul Azim Hoberg # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/packaging/os/zypper.py index 627ae50cc7..5963910135 100644 --- a/plugins/modules/packaging/os/zypper.py +++ b/plugins/modules/packaging/os/zypper.py @@ -11,7 +11,8 @@ # (c) 2012, Red Hat, Inc # Written by Seth Vidal # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/packaging/os/zypper_repository.py b/plugins/modules/packaging/os/zypper_repository.py index 8483df4c61..81d36d364e 100644 --- a/plugins/modules/packaging/os/zypper_repository.py +++ b/plugins/modules/packaging/os/zypper_repository.py @@ -4,7 +4,8 @@ # (c) 2013, Matthias Vogelgesang # (c) 2014, Justin Lecher # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/cobbler/cobbler_sync.py b/plugins/modules/remote_management/cobbler/cobbler_sync.py index 157208216b..fd1f4010ad 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_sync.py +++ b/plugins/modules/remote_management/cobbler/cobbler_sync.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Dag Wieers (dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Dag Wieers (dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/cobbler/cobbler_system.py b/plugins/modules/remote_management/cobbler/cobbler_system.py index e97be01239..b824f5f4a4 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_system.py +++ b/plugins/modules/remote_management/cobbler/cobbler_system.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Dag Wieers (dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Dag Wieers (dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/hpilo/hpilo_boot.py b/plugins/modules/remote_management/hpilo/hpilo_boot.py index 728f8ffbb1..483b82554c 100644 --- a/plugins/modules/remote_management/hpilo/hpilo_boot.py +++ b/plugins/modules/remote_management/hpilo/hpilo_boot.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/hpilo/hpilo_info.py b/plugins/modules/remote_management/hpilo/hpilo_info.py index fb72e32f36..219885cf41 100644 --- a/plugins/modules/remote_management/hpilo/hpilo_info.py +++ b/plugins/modules/remote_management/hpilo/hpilo_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/hpilo/hponcfg.py b/plugins/modules/remote_management/hpilo/hponcfg.py index 937d7239b1..18a45478f7 100644 --- a/plugins/modules/remote_management/hpilo/hponcfg.py +++ b/plugins/modules/remote_management/hpilo/hponcfg.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2012, Dag Wieers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/imc/imc_rest.py b/plugins/modules/remote_management/imc/imc_rest.py index b685e96b82..8dc4a72891 100644 --- a/plugins/modules/remote_management/imc/imc_rest.py +++ b/plugins/modules/remote_management/imc/imc_rest.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Dag Wieers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/ipmi/ipmi_boot.py b/plugins/modules/remote_management/ipmi/ipmi_boot.py index f8cff0e7e0..48f9116181 100644 --- a/plugins/modules/remote_management/ipmi/ipmi_boot.py +++ b/plugins/modules/remote_management/ipmi/ipmi_boot.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/ipmi/ipmi_power.py b/plugins/modules/remote_management/ipmi/ipmi_power.py index 9abf167f60..fa23b289b5 100644 --- a/plugins/modules/remote_management/ipmi/ipmi_power.py +++ b/plugins/modules/remote_management/ipmi/ipmi_power.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index 7fc207feee..9efb7b309c 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/lxca/lxca_cmms.py b/plugins/modules/remote_management/lxca/lxca_cmms.py index b3bb6c2a8c..671975f626 100644 --- a/plugins/modules/remote_management/lxca/lxca_cmms.py +++ b/plugins/modules/remote_management/lxca/lxca_cmms.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/lxca/lxca_nodes.py b/plugins/modules/remote_management/lxca/lxca_nodes.py index 62b8e334d8..9188d50dd6 100644 --- a/plugins/modules/remote_management/lxca/lxca_nodes.py +++ b/plugins/modules/remote_management/lxca/lxca_nodes.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py b/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py index d76c334259..af0c31b1d5 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py +++ b/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Red Hat Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/manageiq/manageiq_alerts.py b/plugins/modules/remote_management/manageiq/manageiq_alerts.py index de85e96fcb..a500653282 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_alerts.py +++ b/plugins/modules/remote_management/manageiq/manageiq_alerts.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Red Hat Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/manageiq/manageiq_policies.py b/plugins/modules/remote_management/manageiq/manageiq_policies.py index 567833d7cc..a5fbaff64e 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_policies.py +++ b/plugins/modules/remote_management/manageiq/manageiq_policies.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Daniel Korn # (c) 2017, Yaacov Zamir -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/manageiq/manageiq_provider.py b/plugins/modules/remote_management/manageiq/manageiq_provider.py index f17cbec910..918408b510 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_provider.py +++ b/plugins/modules/remote_management/manageiq/manageiq_provider.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Daniel Korn # (c) 2017, Yaacov Zamir -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/manageiq/manageiq_tags.py b/plugins/modules/remote_management/manageiq/manageiq_tags.py index 83ab60ac93..c5e7d6a4ea 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tags.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tags.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Daniel Korn # (c) 2017, Yaacov Zamir -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_datacenter_info.py b/plugins/modules/remote_management/oneview/oneview_datacenter_info.py index bf3e9a8772..0d78c2483a 100644 --- a/plugins/modules/remote_management/oneview/oneview_datacenter_info.py +++ b/plugins/modules/remote_management/oneview/oneview_datacenter_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_enclosure_info.py b/plugins/modules/remote_management/oneview/oneview_enclosure_info.py index 18e245d617..1c19d36860 100644 --- a/plugins/modules/remote_management/oneview/oneview_enclosure_info.py +++ b/plugins/modules/remote_management/oneview/oneview_enclosure_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016-2017, Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016-2017, Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_ethernet_network.py b/plugins/modules/remote_management/oneview/oneview_ethernet_network.py index 99b5d0fed9..3c8711fe05 100644 --- a/plugins/modules/remote_management/oneview/oneview_ethernet_network.py +++ b/plugins/modules/remote_management/oneview/oneview_ethernet_network.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py b/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py index f1b55165b1..94b87ff24b 100644 --- a/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py +++ b/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_fc_network.py b/plugins/modules/remote_management/oneview/oneview_fc_network.py index 59984ee8b6..e4b1a17339 100644 --- a/plugins/modules/remote_management/oneview/oneview_fc_network.py +++ b/plugins/modules/remote_management/oneview/oneview_fc_network.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_fc_network_info.py b/plugins/modules/remote_management/oneview/oneview_fc_network_info.py index 40fed8d017..2b6377fb35 100644 --- a/plugins/modules/remote_management/oneview/oneview_fc_network_info.py +++ b/plugins/modules/remote_management/oneview/oneview_fc_network_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_fcoe_network.py b/plugins/modules/remote_management/oneview/oneview_fcoe_network.py index ef24f8fc8e..61102dff15 100644 --- a/plugins/modules/remote_management/oneview/oneview_fcoe_network.py +++ b/plugins/modules/remote_management/oneview/oneview_fcoe_network.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py b/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py index e581bff862..db5c5a59b0 100644 --- a/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py +++ b/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group.py b/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group.py index e833f9e092..ed51722672 100644 --- a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group.py +++ b/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016-2017, Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016-2017, Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py b/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py index 436dd5d62b..f0962a996a 100644 --- a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py +++ b/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016-2017, Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016-2017, Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_network_set.py b/plugins/modules/remote_management/oneview/oneview_network_set.py index 3a2632b765..6dac04c5ca 100644 --- a/plugins/modules/remote_management/oneview/oneview_network_set.py +++ b/plugins/modules/remote_management/oneview/oneview_network_set.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_network_set_info.py b/plugins/modules/remote_management/oneview/oneview_network_set_info.py index 2d610f2b57..caff260220 100644 --- a/plugins/modules/remote_management/oneview/oneview_network_set_info.py +++ b/plugins/modules/remote_management/oneview/oneview_network_set_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_san_manager.py b/plugins/modules/remote_management/oneview/oneview_san_manager.py index 20870a31d5..a22398074a 100644 --- a/plugins/modules/remote_management/oneview/oneview_san_manager.py +++ b/plugins/modules/remote_management/oneview/oneview_san_manager.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/oneview/oneview_san_manager_info.py b/plugins/modules/remote_management/oneview/oneview_san_manager_info.py index 284371cafc..95497ed8aa 100644 --- a/plugins/modules/remote_management/oneview/oneview_san_manager_info.py +++ b/plugins/modules/remote_management/oneview/oneview_san_manager_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_command.py b/plugins/modules/remote_management/redfish/idrac_redfish_command.py index adaadfc4f1..9e523b6d11 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_command.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_command.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_config.py b/plugins/modules/remote_management/redfish/idrac_redfish_config.py index a0fbf13a51..f995258c7d 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_config.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_config.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019 Dell EMC Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_info.py b/plugins/modules/remote_management/redfish/idrac_redfish_info.py index 92393224bb..91e57de14d 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_info.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019 Dell EMC Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_config.py b/plugins/modules/remote_management/redfish/ilo_redfish_config.py index 502ab21399..d13d10dfdc 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_config.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_config.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021-2022 Hewlett Packard Enterprise, Inc. All rights reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/remote_management/redfish/ilo_redfish_info.py index 99a6041df3..d5ff123564 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_info.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021-2022 Hewlett Packard Enterprise, Inc. All rights reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 26dfee6455..448f763ab1 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 9c59e29955..448f2d573f 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/redfish_info.py b/plugins/modules/remote_management/redfish/redfish_info.py index 0f520df2a1..76fbb3fe35 100644 --- a/plugins/modules/remote_management/redfish/redfish_info.py +++ b/plugins/modules/remote_management/redfish/redfish_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_command.py b/plugins/modules/remote_management/redfish/wdc_redfish_command.py index defbfefd07..809e3984bd 100644 --- a/plugins/modules/remote_management/redfish/wdc_redfish_command.py +++ b/plugins/modules/remote_management/redfish/wdc_redfish_command.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022 Western Digital Corporation -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_info.py b/plugins/modules/remote_management/redfish/wdc_redfish_info.py index fc223cb5f0..7ba9263b55 100644 --- a/plugins/modules/remote_management/redfish/wdc_redfish_info.py +++ b/plugins/modules/remote_management/redfish/wdc_redfish_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022 Western Digital Corporation -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/remote_management/stacki/stacki_host.py index fda0c5d318..9a13066865 100644 --- a/plugins/modules/remote_management/stacki/stacki_host.py +++ b/plugins/modules/remote_management/stacki/stacki_host.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Hugh Ma -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Hugh Ma +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/wakeonlan.py b/plugins/modules/remote_management/wakeonlan.py index 725e070cd8..7087d47ba6 100644 --- a/plugins/modules/remote_management/wakeonlan.py +++ b/plugins/modules/remote_management/wakeonlan.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Dag Wieers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/bitbucket/bitbucket_access_key.py b/plugins/modules/source_control/bitbucket/bitbucket_access_key.py index 6451d72909..f084b98027 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_access_key.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_access_key.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Evgeniy Krysanov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Evgeniy Krysanov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py index 5d42419dfa..97e1ee3bbb 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Evgeniy Krysanov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Evgeniy Krysanov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py index 9f4f2b9498..b8ceb8f90f 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Evgeniy Krysanov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Evgeniy Krysanov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py index e5701184c3..196aff25d3 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Evgeniy Krysanov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Evgeniy Krysanov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/bzr.py b/plugins/modules/source_control/bzr.py index a4ce4bc075..832e1c4afc 100644 --- a/plugins/modules/source_control/bzr.py +++ b/plugins/modules/source_control/bzr.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, André Paramés +# Copyright (c) 2013, André Paramés # Based on the Git module by Michael DeHaan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/git_config.py b/plugins/modules/source_control/git_config.py index 8651458610..e58958b74e 100644 --- a/plugins/modules/source_control/git_config.py +++ b/plugins/modules/source_control/git_config.py @@ -4,7 +4,8 @@ # (c) 2015, Marius Gedminas # (c) 2016, Matthew Gamble # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/github/github_deploy_key.py b/plugins/modules/source_control/github/github_deploy_key.py index a90de48d42..2f4040487e 100644 --- a/plugins/modules/source_control/github/github_deploy_key.py +++ b/plugins/modules/source_control/github/github_deploy_key.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/github/github_issue.py b/plugins/modules/source_control/github/github_issue.py index 4add29f341..4f8f2363cc 100644 --- a/plugins/modules/source_control/github/github_issue.py +++ b/plugins/modules/source_control/github/github_issue.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017-18, Abhijeet Kasurde +# Copyright (c) 2017-18, Abhijeet Kasurde # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/github/github_key.py b/plugins/modules/source_control/github/github_key.py index 2afbe29aa1..da8372d890 100644 --- a/plugins/modules/source_control/github/github_key.py +++ b/plugins/modules/source_control/github/github_key.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/github/github_release.py b/plugins/modules/source_control/github/github_release.py index 654dce5f98..d0cd5c4ff9 100644 --- a/plugins/modules/source_control/github/github_release.py +++ b/plugins/modules/source_control/github/github_release.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: Ansible Team -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright Ansible Team +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/github/github_repo.py b/plugins/modules/source_control/github/github_repo.py index 1446e4abe9..609d377ddd 100644 --- a/plugins/modules/source_control/github/github_repo.py +++ b/plugins/modules/source_control/github/github_repo.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Álvaro Torres Cogollo -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Álvaro Torres Cogollo +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/github/github_webhook.py b/plugins/modules/source_control/github/github_webhook.py index fcb6f8d06f..007d2fadc2 100644 --- a/plugins/modules/source_control/github/github_webhook.py +++ b/plugins/modules/source_control/github/github_webhook.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/source_control/github/github_webhook_info.py b/plugins/modules/source_control/github/github_webhook_info.py index 87fcd33634..bc3d3c90fa 100644 --- a/plugins/modules/source_control/github/github_webhook_info.py +++ b/plugins/modules/source_control/github/github_webhook_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_branch.py b/plugins/modules/source_control/gitlab/gitlab_branch.py index 8707e6453a..8f0535abc8 100644 --- a/plugins/modules/source_control/gitlab/gitlab_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_branch.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Werner Dijkerman (ikben@werner-dijkerman.nl) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Werner Dijkerman (ikben@werner-dijkerman.nl) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py index 5746186ca5..01ed49ffa4 100644 --- a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py +++ b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# Copyright: (c) 2018, Marcus Watkins +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# Copyright (c) 2018, Marcus Watkins # Based on code: -# Copyright: (c) 2013, Phillip Gentry -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, Phillip Gentry +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_group.py b/plugins/modules/source_control/gitlab/gitlab_group.py index 1c4a0c9b27..5585ea2bc9 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group.py +++ b/plugins/modules/source_control/gitlab/gitlab_group.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# Copyright: (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# Copyright (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_group_members.py b/plugins/modules/source_control/gitlab/gitlab_group_members.py index 31f835dd08..c2ccdc4d55 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_members.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Zainab Alsaffar -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Zainab Alsaffar +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_group_variable.py b/plugins/modules/source_control/gitlab/gitlab_group_variable.py index faf8b8a6f5..f0f6b61065 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_variable.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Florent Madiot (scodeman@scode.io) +# Copyright (c) 2020, Florent Madiot (scodeman@scode.io) # Based on code: -# Copyright: (c) 2019, Markus Bergholz (markuman@gmail.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Markus Bergholz (markuman@gmail.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index 8a850b1c9e..fad63ddc5c 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# Copyright: (c) 2018, Marcus Watkins +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# Copyright (c) 2018, Marcus Watkins # Based on code: -# Copyright: (c) 2013, Phillip Gentry -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, Phillip Gentry +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_project.py b/plugins/modules/source_control/gitlab/gitlab_project.py index c151837e69..84594cbeb3 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project.py +++ b/plugins/modules/source_control/gitlab/gitlab_project.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# Copyright: (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# Copyright (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_project_members.py b/plugins/modules/source_control/gitlab/gitlab_project_members.py index 699c6a5867..cfbada8681 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_members.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Sergey Mikhaltsov -# Copyright: (c) 2020, Zainab Alsaffar -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Sergey Mikhaltsov +# Copyright (c) 2020, Zainab Alsaffar +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_project_variable.py b/plugins/modules/source_control/gitlab/gitlab_project_variable.py index 93dbc5446a..bfba9a5e37 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_variable.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Markus Bergholz (markuman@gmail.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Markus Bergholz (markuman@gmail.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py index a5fd65b5bd..191add9f57 100644 --- a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Werner Dijkerman (ikben@werner-dijkerman.nl) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Werner Dijkerman (ikben@werner-dijkerman.nl) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_runner.py b/plugins/modules/source_control/gitlab/gitlab_runner.py index c31030ab01..9aceb0c77d 100644 --- a/plugins/modules/source_control/gitlab/gitlab_runner.py +++ b/plugins/modules/source_control/gitlab/gitlab_runner.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Raphaël Droz (raphael.droz@gmail.com) -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# Copyright: (c) 2018, Samy Coenen -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Raphaël Droz (raphael.droz@gmail.com) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# Copyright (c) 2018, Samy Coenen +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/source_control/gitlab/gitlab_user.py index 4a215d6d0b..6a322ebd0e 100644 --- a/plugins/modules/source_control/gitlab/gitlab_user.py +++ b/plugins/modules/source_control/gitlab/gitlab_user.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Lennert Mertens (lennert@nubera.be) -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# Copyright: (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Lennert Mertens (lennert@nubera.be) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# Copyright (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/source_control/hg.py b/plugins/modules/source_control/hg.py index 3154d06273..398320515e 100644 --- a/plugins/modules/source_control/hg.py +++ b/plugins/modules/source_control/hg.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Yeukhon Wong -# Copyright: (c) 2014, Nate Coraor -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, Yeukhon Wong +# Copyright (c) 2014, Nate Coraor +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/emc/emc_vnx_sg_member.py b/plugins/modules/storage/emc/emc_vnx_sg_member.py index 20977687fc..39c0ab3a99 100644 --- a/plugins/modules/storage/emc/emc_vnx_sg_member.py +++ b/plugins/modules/storage/emc/emc_vnx_sg_member.py @@ -3,7 +3,8 @@ # # Copyright (c) 2018, Luca 'remix_tj' Lorenzetto # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/storage/hpe3par/ss_3par_cpg.py b/plugins/modules/storage/hpe3par/ss_3par_cpg.py index be4a6a02a2..e8a88fc4f4 100644 --- a/plugins/modules/storage/hpe3par/ss_3par_cpg.py +++ b/plugins/modules/storage/hpe3par/ss_3par_cpg.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/storage/ibm/ibm_sa_domain.py b/plugins/modules/storage/ibm/ibm_sa_domain.py index 9c5e6c50c8..26e4b7e47c 100644 --- a/plugins/modules/storage/ibm/ibm_sa_domain.py +++ b/plugins/modules/storage/ibm/ibm_sa_domain.py @@ -1,11 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, IBM CORPORATION +# Copyright (c) 2018, IBM CORPORATION # Author(s): Tzur Eliyahu # -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/ibm/ibm_sa_host.py b/plugins/modules/storage/ibm/ibm_sa_host.py index 27a7287f8a..2902a02028 100644 --- a/plugins/modules/storage/ibm/ibm_sa_host.py +++ b/plugins/modules/storage/ibm/ibm_sa_host.py @@ -4,7 +4,8 @@ # Copyright (C) 2018 IBM CORPORATION # Author(s): Tzur Eliyahu # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/ibm/ibm_sa_host_ports.py b/plugins/modules/storage/ibm/ibm_sa_host_ports.py index 32daa9f3c7..147c434344 100644 --- a/plugins/modules/storage/ibm/ibm_sa_host_ports.py +++ b/plugins/modules/storage/ibm/ibm_sa_host_ports.py @@ -4,7 +4,8 @@ # Copyright (C) 2018 IBM CORPORATION # Author(s): Tzur Eliyahu # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/ibm/ibm_sa_pool.py b/plugins/modules/storage/ibm/ibm_sa_pool.py index 67c963ace1..6393a70686 100644 --- a/plugins/modules/storage/ibm/ibm_sa_pool.py +++ b/plugins/modules/storage/ibm/ibm_sa_pool.py @@ -4,7 +4,8 @@ # Copyright (C) 2018 IBM CORPORATION # Author(s): Tzur Eliyahu # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/ibm/ibm_sa_vol.py b/plugins/modules/storage/ibm/ibm_sa_vol.py index 7820d26828..6e28fcfd05 100644 --- a/plugins/modules/storage/ibm/ibm_sa_vol.py +++ b/plugins/modules/storage/ibm/ibm_sa_vol.py @@ -4,7 +4,8 @@ # Copyright (C) 2018 IBM CORPORATION # Author(s): Tzur Eliyahu # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/ibm/ibm_sa_vol_map.py b/plugins/modules/storage/ibm/ibm_sa_vol_map.py index b449ba8de4..72de7d8c07 100644 --- a/plugins/modules/storage/ibm/ibm_sa_vol_map.py +++ b/plugins/modules/storage/ibm/ibm_sa_vol_map.py @@ -4,8 +4,8 @@ # Copyright (C) 2018 IBM CORPORATION # Author(s): Tzur Eliyahu # -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/pmem/pmem.py b/plugins/modules/storage/pmem/pmem.py index 55bf1ca46d..0090687f89 100644 --- a/plugins/modules/storage/pmem/pmem.py +++ b/plugins/modules/storage/pmem/pmem.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2022, Masayoshi Mizuma -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/storage/vexata/vexata_eg.py b/plugins/modules/storage/vexata/vexata_eg.py index 54bb8c29a7..f1d3960406 100644 --- a/plugins/modules/storage/vexata/vexata_eg.py +++ b/plugins/modules/storage/vexata/vexata_eg.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Sandeep Kasargod (sandeep@vexata.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Sandeep Kasargod (sandeep@vexata.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/vexata/vexata_volume.py b/plugins/modules/storage/vexata/vexata_volume.py index 1cf4cd7b5c..e443e5f6c4 100644 --- a/plugins/modules/storage/vexata/vexata_volume.py +++ b/plugins/modules/storage/vexata/vexata_volume.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Sandeep Kasargod (sandeep@vexata.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Sandeep Kasargod (sandeep@vexata.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index ca15893f19..a09a386f41 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Johan Wiren -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, Johan Wiren +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/zfs/zfs_delegate_admin.py b/plugins/modules/storage/zfs/zfs_delegate_admin.py index 8ebe702fcb..df95d0db3d 100644 --- a/plugins/modules/storage/zfs/zfs_delegate_admin.py +++ b/plugins/modules/storage/zfs/zfs_delegate_admin.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Nate Coraor -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Nate Coraor +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index cb106de111..353d90812c 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Adam Števko -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/storage/zfs/zpool_facts.py b/plugins/modules/storage/zfs/zpool_facts.py index b7a66255c6..07e6f213db 100644 --- a/plugins/modules/storage/zfs/zpool_facts.py +++ b/plugins/modules/storage/zfs/zpool_facts.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Adam Števko -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/aix_devices.py b/plugins/modules/system/aix_devices.py index 89468059f3..b338f94379 100644 --- a/plugins/modules/system/aix_devices.py +++ b/plugins/modules/system/aix_devices.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, 2018 Kairo Araujo -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, 2018 Kairo Araujo +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/aix_filesystem.py b/plugins/modules/system/aix_filesystem.py index a47c29f04b..d5842cb3e2 100644 --- a/plugins/modules/system/aix_filesystem.py +++ b/plugins/modules/system/aix_filesystem.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Kairo Araujo -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Kairo Araujo +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/system/aix_inittab.py b/plugins/modules/system/aix_inittab.py index c2daface36..d0d712483e 100644 --- a/plugins/modules/system/aix_inittab.py +++ b/plugins/modules/system/aix_inittab.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Joris Weijters -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Joris Weijters +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/aix_lvg.py b/plugins/modules/system/aix_lvg.py index 37bf71a4bc..4fbf45060b 100644 --- a/plugins/modules/system/aix_lvg.py +++ b/plugins/modules/system/aix_lvg.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Kairo Araujo -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Kairo Araujo +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/aix_lvol.py b/plugins/modules/system/aix_lvol.py index 02b4f06c5b..99bd3ead9b 100644 --- a/plugins/modules/system/aix_lvol.py +++ b/plugins/modules/system/aix_lvol.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Alain Dejoux -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Alain Dejoux +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/alternatives.py b/plugins/modules/system/alternatives.py index 01867d4cb0..45184187b1 100644 --- a/plugins/modules/system/alternatives.py +++ b/plugins/modules/system/alternatives.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Gabe Mulley -# Copyright: (c) 2015, David Wittman -# Copyright: (c) 2022, Marius Rieder -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Gabe Mulley +# Copyright (c) 2015, David Wittman +# Copyright (c) 2022, Marius Rieder +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/awall.py b/plugins/modules/system/awall.py index 260c7ae4d0..279bc1bf67 100644 --- a/plugins/modules/system/awall.py +++ b/plugins/modules/system/awall.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ted Trask -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ted Trask +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/beadm.py b/plugins/modules/system/beadm.py index d89ca79af1..36f47c086a 100644 --- a/plugins/modules/system/beadm.py +++ b/plugins/modules/system/beadm.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Adam Števko -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Adam Števko +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/capabilities.py b/plugins/modules/system/capabilities.py index ac6dde6761..2e329649af 100644 --- a/plugins/modules/system/capabilities.py +++ b/plugins/modules/system/capabilities.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Nate Coraor -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Nate Coraor +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/cronvar.py b/plugins/modules/system/cronvar.py index 9871668ac0..2883f9558c 100644 --- a/plugins/modules/system/cronvar.py +++ b/plugins/modules/system/cronvar.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Cronvar Plugin: The goal of this plugin is to provide an idempotent # method for set cron variable values. It should play well with the diff --git a/plugins/modules/system/crypttab.py b/plugins/modules/system/crypttab.py index 8eeec56d3d..6cbfe933d3 100644 --- a/plugins/modules/system/crypttab.py +++ b/plugins/modules/system/crypttab.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Steve -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Steve +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/dconf.py b/plugins/modules/system/dconf.py index 636ca536ee..a389179e51 100644 --- a/plugins/modules/system/dconf.py +++ b/plugins/modules/system/dconf.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Branko Majic -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Branko Majic +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/dpkg_divert.py b/plugins/modules/system/dpkg_divert.py index f44a5a26f2..c346fdfac6 100644 --- a/plugins/modules/system/dpkg_divert.py +++ b/plugins/modules/system/dpkg_divert.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017-2020, Yann Amar -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017-2020, Yann Amar +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/facter.py b/plugins/modules/system/facter.py index abd2ebc3a7..be45e3ce14 100644 --- a/plugins/modules/system/facter.py +++ b/plugins/modules/system/facter.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2012, Michael DeHaan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2012, Michael DeHaan +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/filesystem.py b/plugins/modules/system/filesystem.py index 6b38c58183..ee382cf51f 100644 --- a/plugins/modules/system/filesystem.py +++ b/plugins/modules/system/filesystem.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, quidame -# Copyright: (c) 2013, Alexander Bulimov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, quidame +# Copyright (c) 2013, Alexander Bulimov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/gconftool2.py b/plugins/modules/system/gconftool2.py index 1fcc9b7231..c53480aa09 100644 --- a/plugins/modules/system/gconftool2.py +++ b/plugins/modules/system/gconftool2.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Kenneth D. Evensen -# Copyright: (c) 2017, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Kenneth D. Evensen +# Copyright (c) 2017, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/gconftool2_info.py b/plugins/modules/system/gconftool2_info.py index 36aa9aa238..888e06b3c7 100644 --- a/plugins/modules/system/gconftool2_info.py +++ b/plugins/modules/system/gconftool2_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/homectl.py b/plugins/modules/system/homectl.py index c71b49adeb..759443df2c 100644 --- a/plugins/modules/system/homectl.py +++ b/plugins/modules/system/homectl.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2022, James Livulpi -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/interfaces_file.py b/plugins/modules/system/interfaces_file.py index 91cf74b426..e9efe37c37 100644 --- a/plugins/modules/system/interfaces_file.py +++ b/plugins/modules/system/interfaces_file.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2016, Roman Belyakovsky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Roman Belyakovsky +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/iptables_state.py b/plugins/modules/system/iptables_state.py index 1f35edc04b..38eb1c2eeb 100644 --- a/plugins/modules/system/iptables_state.py +++ b/plugins/modules/system/iptables_state.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, quidame -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, quidame +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index afeab9d9e7..b9e80afa73 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, RSD Services S.A -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, RSD Services S.A +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/java_keystore.py b/plugins/modules/system/java_keystore.py index 772d3a69b1..33fb048611 100644 --- a/plugins/modules/system/java_keystore.py +++ b/plugins/modules/system/java_keystore.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, quidame -# Copyright: (c) 2016, Guillaume Grossetie -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, quidame +# Copyright (c) 2016, Guillaume Grossetie +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/kernel_blacklist.py b/plugins/modules/system/kernel_blacklist.py index ad0241b31a..c4352ac08a 100644 --- a/plugins/modules/system/kernel_blacklist.py +++ b/plugins/modules/system/kernel_blacklist.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Alexei Znamensky (@russoz) -# Copyright: (c) 2013, Matthias Vogelgesang -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Alexei Znamensky (@russoz) +# Copyright (c) 2013, Matthias Vogelgesang +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/keyring.py b/plugins/modules/system/keyring.py index 7e89484a6c..6c3a1a487a 100644 --- a/plugins/modules/system/keyring.py +++ b/plugins/modules/system/keyring.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2022, Alexander Hussey -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2022, Alexander Hussey +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """ Ansible Module - community.general.keyring """ diff --git a/plugins/modules/system/keyring_info.py b/plugins/modules/system/keyring_info.py index 3630842859..3862c755de 100644 --- a/plugins/modules/system/keyring_info.py +++ b/plugins/modules/system/keyring_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2022, Alexander Hussey -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2022, Alexander Hussey +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """ Ansible Module - community.general.keyring_info """ diff --git a/plugins/modules/system/launchd.py b/plugins/modules/system/launchd.py index 8c09a44f6e..61d3554007 100644 --- a/plugins/modules/system/launchd.py +++ b/plugins/modules/system/launchd.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Martin Migasiewicz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Martin Migasiewicz +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/lbu.py b/plugins/modules/system/lbu.py index fcc3a0d940..86f01f62af 100644 --- a/plugins/modules/system/lbu.py +++ b/plugins/modules/system/lbu.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Kaarle Ritvanen -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Kaarle Ritvanen +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/listen_ports_facts.py b/plugins/modules/system/listen_ports_facts.py index 1ab1e8d69f..7c20992507 100644 --- a/plugins/modules/system/listen_ports_facts.py +++ b/plugins/modules/system/listen_ports_facts.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2017, Nathan Davison -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Nathan Davison +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/locale_gen.py b/plugins/modules/system/locale_gen.py index c142da1ceb..3f2922c409 100644 --- a/plugins/modules/system/locale_gen.py +++ b/plugins/modules/system/locale_gen.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/lvg.py b/plugins/modules/system/lvg.py index 47d3d6c230..4fc5a14084 100644 --- a/plugins/modules/system/lvg.py +++ b/plugins/modules/system/lvg.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Alexander Bulimov +# Copyright (c) 2013, Alexander Bulimov # Based on lvol module by Jeroen Hoekx -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/lvol.py b/plugins/modules/system/lvol.py index b1b9dcb739..882e21846a 100644 --- a/plugins/modules/system/lvol.py +++ b/plugins/modules/system/lvol.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Jeroen Hoekx , Alexander Bulimov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, Jeroen Hoekx , Alexander Bulimov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/make.py b/plugins/modules/system/make.py index 6a66973369..e87569389e 100644 --- a/plugins/modules/system/make.py +++ b/plugins/modules/system/make.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Linus Unnebäck -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Linus Unnebäck +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/mksysb.py b/plugins/modules/system/mksysb.py index 8dd1b45cd0..2c880a40ff 100644 --- a/plugins/modules/system/mksysb.py +++ b/plugins/modules/system/mksysb.py @@ -3,8 +3,8 @@ # (c) 2021, Alexei Znamensky (@russoz) # (c) 2017, Kairo Araujo -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/system/modprobe.py b/plugins/modules/system/modprobe.py index 07f7cd8cc3..df460e7161 100644 --- a/plugins/modules/system/modprobe.py +++ b/plugins/modules/system/modprobe.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, David Stygstra -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, David Stygstra +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index 634e323111..acd4589215 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Thomas Caravia -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/ohai.py b/plugins/modules/system/ohai.py index 64092fd15c..5188a03a43 100644 --- a/plugins/modules/system/ohai.py +++ b/plugins/modules/system/ohai.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/system/open_iscsi.py b/plugins/modules/system/open_iscsi.py index 1768a8b6df..e729e8017d 100644 --- a/plugins/modules/system/open_iscsi.py +++ b/plugins/modules/system/open_iscsi.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2013, Serge van Ginderachter -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2013, Serge van Ginderachter +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/openwrt_init.py b/plugins/modules/system/openwrt_init.py index fa9488ecb2..2c3f9c7eed 100644 --- a/plugins/modules/system/openwrt_init.py +++ b/plugins/modules/system/openwrt_init.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Andrew Gaffney -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/system/osx_defaults.py b/plugins/modules/system/osx_defaults.py index 45179dc7d2..32906682ea 100644 --- a/plugins/modules/system/osx_defaults.py +++ b/plugins/modules/system/osx_defaults.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, GeekChimp - Franck Nijhof (DO NOT CONTACT!) -# Copyright: (c) 2019, Ansible project -# Copyright: (c) 2019, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, GeekChimp - Franck Nijhof (DO NOT CONTACT!) +# Copyright (c) 2019, Ansible project +# Copyright (c) 2019, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/pam_limits.py b/plugins/modules/system/pam_limits.py index 17b1ea1304..fb019e05c9 100644 --- a/plugins/modules/system/pam_limits.py +++ b/plugins/modules/system/pam_limits.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Sebastien Rohaut -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Sebastien Rohaut +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/pamd.py b/plugins/modules/system/pamd.py index 4a58da74f7..8e1882a41b 100644 --- a/plugins/modules/system/pamd.py +++ b/plugins/modules/system/pamd.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2017, Kenneth D. Evensen -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017, Kenneth D. Evensen +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/parted.py b/plugins/modules/system/parted.py index 3796cfc40b..57391b439d 100644 --- a/plugins/modules/system/parted.py +++ b/plugins/modules/system/parted.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Fabrizio Colonna -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Fabrizio Colonna +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/pids.py b/plugins/modules/system/pids.py index 1fd8014070..072a2bb7a4 100644 --- a/plugins/modules/system/pids.py +++ b/plugins/modules/system/pids.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Saranya Sridharan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Saranya Sridharan +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/puppet.py b/plugins/modules/system/puppet.py index 87fcc6e822..25d4f0fc75 100644 --- a/plugins/modules/system/puppet.py +++ b/plugins/modules/system/puppet.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Hewlett-Packard Development Company, L.P. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Hewlett-Packard Development Company, L.P. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/python_requirements_info.py b/plugins/modules/system/python_requirements_info.py index dc0e0a44cc..d96787c7d0 100644 --- a/plugins/modules/system/python_requirements_info.py +++ b/plugins/modules/system/python_requirements_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2018 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/runit.py b/plugins/modules/system/runit.py index 811248317c..ecd682648b 100644 --- a/plugins/modules/system/runit.py +++ b/plugins/modules/system/runit.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Brian Coca -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Brian Coca +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/sap_task_list_execute.py b/plugins/modules/system/sap_task_list_execute.py index 87d6a1060d..baa0f059d1 100644 --- a/plugins/modules/system/sap_task_list_execute.py +++ b/plugins/modules/system/sap_task_list_execute.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Rainer Leber -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Rainer Leber +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/sefcontext.py b/plugins/modules/system/sefcontext.py index 73c79662bc..d9b93b636c 100644 --- a/plugins/modules/system/sefcontext.py +++ b/plugins/modules/system/sefcontext.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Dag Wieers (@dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/system/selinux_permissive.py index fd90475712..30952e0aa7 100644 --- a/plugins/modules/system/selinux_permissive.py +++ b/plugins/modules/system/selinux_permissive.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Michael Scherer +# Copyright (c) 2015, Michael Scherer # inspired by code of github.com/dandiker/ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/seport.py b/plugins/modules/system/seport.py index 4a734c2353..5420ce0fd7 100644 --- a/plugins/modules/system/seport.py +++ b/plugins/modules/system/seport.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Dan Keder -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Dan Keder +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/shutdown.py b/plugins/modules/system/shutdown.py index ccb02a2da0..cc4108c8a7 100644 --- a/plugins/modules/system/shutdown.py +++ b/plugins/modules/system/shutdown.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/system/solaris_zone.py index 8ecdeb8dcf..502107e279 100644 --- a/plugins/modules/system/solaris_zone.py +++ b/plugins/modules/system/solaris_zone.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Paul Markham -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Paul Markham +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/ssh_config.py b/plugins/modules/system/ssh_config.py index 18262a2aae..00a0525d6c 100644 --- a/plugins/modules/system/ssh_config.py +++ b/plugins/modules/system/ssh_config.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2015, Björn Andersson -# Copyright: (c) 2021, Ansible Project -# Copyright: (c) 2021, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Björn Andersson +# Copyright (c) 2021, Ansible Project +# Copyright (c) 2021, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/sudoers.py b/plugins/modules/system/sudoers.py index 3b46f108f8..2c0aa879bc 100644 --- a/plugins/modules/system/sudoers.py +++ b/plugins/modules/system/sudoers.py @@ -2,8 +2,9 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Jon Ellis (@JonEllis) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Jon Ellis (@JonEllis) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/svc.py b/plugins/modules/system/svc.py index 53f46f0440..2800c9d2bf 100644 --- a/plugins/modules/system/svc.py +++ b/plugins/modules/system/svc.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) 2015, Brian Coca -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2015, Brian Coca +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/syspatch.py b/plugins/modules/system/syspatch.py index 42cb17b8a3..a184f3c66b 100644 --- a/plugins/modules/system/syspatch.py +++ b/plugins/modules/system/syspatch.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2019-2020, Andrew Klaus -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019-2020, Andrew Klaus +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/sysrc.py b/plugins/modules/system/sysrc.py index cee82cf827..431bcbd604 100644 --- a/plugins/modules/system/sysrc.py +++ b/plugins/modules/system/sysrc.py @@ -3,7 +3,8 @@ # (c) 2019 David Lundgren # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/sysupgrade.py b/plugins/modules/system/sysupgrade.py index 333d7765d2..bed9bad784 100644 --- a/plugins/modules/system/sysupgrade.py +++ b/plugins/modules/system/sysupgrade.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Andrew Klaus -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Andrew Klaus +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/timezone.py b/plugins/modules/system/timezone.py index 6017f98293..9e89462089 100644 --- a/plugins/modules/system/timezone.py +++ b/plugins/modules/system/timezone.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2016, Shinichi TAMURA (@tmshn) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2016, Shinichi TAMURA (@tmshn) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/ufw.py b/plugins/modules/system/ufw.py index b6e0b3de78..c3b0fcd0fa 100644 --- a/plugins/modules/system/ufw.py +++ b/plugins/modules/system/ufw.py @@ -1,11 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2014, Ahti Kitsik -# Copyright: (c) 2014, Jarno Keskikangas -# Copyright: (c) 2013, Aleksey Ovcharenko -# Copyright: (c) 2013, James Martin -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Ahti Kitsik +# Copyright (c) 2014, Jarno Keskikangas +# Copyright (c) 2013, Aleksey Ovcharenko +# Copyright (c) 2013, James Martin +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/vdo.py b/plugins/modules/system/vdo.py index d2888836d1..8a51af385c 100644 --- a/plugins/modules/system/vdo.py +++ b/plugins/modules/system/vdo.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Red Hat, Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Red Hat, Inc. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index eba7644409..e3584ed89e 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Joseph Benden # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/xfconf_info.py b/plugins/modules/system/xfconf_info.py index 2bee80d970..d69da374fe 100644 --- a/plugins/modules/system/xfconf_info.py +++ b/plugins/modules/system/xfconf_info.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/system/xfs_quota.py b/plugins/modules/system/xfs_quota.py index 7437ddfd70..5f71334c01 100644 --- a/plugins/modules/system/xfs_quota.py +++ b/plugins/modules/system/xfs_quota.py @@ -1,10 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Emmanouil Kampitakis -# Copyright: (c) 2018, William Leemans +# Copyright (c) 2018, Emmanouil Kampitakis +# Copyright (c) 2018, William Leemans -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/apache2_mod_proxy.py b/plugins/modules/web_infrastructure/apache2_mod_proxy.py index 2ab679aaf6..955794dec4 100644 --- a/plugins/modules/web_infrastructure/apache2_mod_proxy.py +++ b/plugins/modules/web_infrastructure/apache2_mod_proxy.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Olivier Boukili -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/apache2_module.py b/plugins/modules/web_infrastructure/apache2_module.py index 44327fe13c..aabbe4d0ca 100644 --- a/plugins/modules/web_infrastructure/apache2_module.py +++ b/plugins/modules/web_infrastructure/apache2_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013-2014, Christian Berendt -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/deploy_helper.py b/plugins/modules/web_infrastructure/deploy_helper.py index f73c9c1f18..79a7ac7ebf 100644 --- a/plugins/modules/web_infrastructure/deploy_helper.py +++ b/plugins/modules/web_infrastructure/deploy_helper.py @@ -4,7 +4,8 @@ # (c) 2014, Jasper N. Brouwer # (c) 2014, Ramon de la Fuente # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/django_manage.py b/plugins/modules/web_infrastructure/django_manage.py index 4ced7452bb..85e66eb2b9 100644 --- a/plugins/modules/web_infrastructure/django_manage.py +++ b/plugins/modules/web_infrastructure/django_manage.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Scott Anderson -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/ejabberd_user.py b/plugins/modules/web_infrastructure/ejabberd_user.py index e6cdd72b5e..f7189fa08e 100644 --- a/plugins/modules/web_infrastructure/ejabberd_user.py +++ b/plugins/modules/web_infrastructure/ejabberd_user.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2013, Peter Sprygada -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/gunicorn.py b/plugins/modules/web_infrastructure/gunicorn.py index 4c9e5da45b..74e681feeb 100644 --- a/plugins/modules/web_infrastructure/gunicorn.py +++ b/plugins/modules/web_infrastructure/gunicorn.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2017, Alejandro Gomez -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/htpasswd.py b/plugins/modules/web_infrastructure/htpasswd.py index 2eebdfd5b8..6d9a490d13 100644 --- a/plugins/modules/web_infrastructure/htpasswd.py +++ b/plugins/modules/web_infrastructure/htpasswd.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Nimbis Services, Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/jboss.py b/plugins/modules/web_infrastructure/jboss.py index 5512e10ee4..f411b1acea 100644 --- a/plugins/modules/web_infrastructure/jboss.py +++ b/plugins/modules/web_infrastructure/jboss.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/jenkins_build.py b/plugins/modules/web_infrastructure/jenkins_build.py index 0141185342..09304ccfbc 100644 --- a/plugins/modules/web_infrastructure/jenkins_build.py +++ b/plugins/modules/web_infrastructure/jenkins_build.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/jenkins_job.py b/plugins/modules/web_infrastructure/jenkins_job.py index 88a8766133..a2c15f55d5 100644 --- a/plugins/modules/web_infrastructure/jenkins_job.py +++ b/plugins/modules/web_infrastructure/jenkins_job.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/jenkins_job_info.py b/plugins/modules/web_infrastructure/jenkins_job_info.py index 503fbbf159..f9909a9308 100644 --- a/plugins/modules/web_infrastructure/jenkins_job_info.py +++ b/plugins/modules/web_infrastructure/jenkins_job_info.py @@ -1,9 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# Copyright: (c) Ansible Project +# Copyright (c) Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py index 6adb348156..d7c8d34ce1 100644 --- a/plugins/modules/web_infrastructure/jenkins_plugin.py +++ b/plugins/modules/web_infrastructure/jenkins_plugin.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, Jiri Tyr -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/jenkins_script.py b/plugins/modules/web_infrastructure/jenkins_script.py index 3ad51a9703..91f7057c2c 100644 --- a/plugins/modules/web_infrastructure/jenkins_script.py +++ b/plugins/modules/web_infrastructure/jenkins_script.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2016, James Hogarth -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index cd7f2ca8bf..85ab678e27 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -7,7 +7,8 @@ # (c) 2020, Per Abildgaard Toft Search and update function # (c) 2021, Brandon McNama Issue attachment functionality # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/nginx_status_info.py b/plugins/modules/web_infrastructure/nginx_status_info.py index ada6881714..3b61b22da4 100644 --- a/plugins/modules/web_infrastructure/nginx_status_info.py +++ b/plugins/modules/web_infrastructure/nginx_status_info.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # # (c) 2016, René Moser -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/rundeck_acl_policy.py b/plugins/modules/web_infrastructure/rundeck_acl_policy.py index 6356f5a166..897a2972c0 100644 --- a/plugins/modules/web_infrastructure/rundeck_acl_policy.py +++ b/plugins/modules/web_infrastructure/rundeck_acl_policy.py @@ -4,7 +4,8 @@ # (c) 2017, Loic Blot # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py index 41418c66a1..bafb8f78e5 100644 --- a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py +++ b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Phillipe Smith -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Phillipe Smith +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/rundeck_job_run.py b/plugins/modules/web_infrastructure/rundeck_job_run.py index 1a591ad15f..936d490349 100644 --- a/plugins/modules/web_infrastructure/rundeck_job_run.py +++ b/plugins/modules/web_infrastructure/rundeck_job_run.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Phillipe Smith -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Phillipe Smith +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/rundeck_project.py b/plugins/modules/web_infrastructure/rundeck_project.py index ef78299596..c902846673 100644 --- a/plugins/modules/web_infrastructure/rundeck_project.py +++ b/plugins/modules/web_infrastructure/rundeck_project.py @@ -6,7 +6,8 @@ # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py index e2fa6f5384..7d55449f63 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py index ca291ba88b..26d06cebfe 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py index f05a1e6809..2dd066ec66 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Stephan Schwarz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Stephan Schwarz +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py index 82eb42f620..f67960eeef 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Stephan Schwarz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Stephan Schwarz +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py index 4554384d2d..19eef74b52 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py index a5c2d1fd36..cb10ad49f4 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Juergen Wiebe -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Juergen Wiebe +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py index fb449939fa..d7910e73e4 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Juergen Wiebe -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Juergen Wiebe +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py index e519d3cf33..8ebdd7f32a 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Stephan Schwarz -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Stephan Schwarz +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py index 780bd68c92..29d35579b9 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Sebastian Schenzel -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Sebastian Schenzel +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py index 9d2bc7c6db..004b23d3e7 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py index b68bde633a..27a71a013e 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 2944a6bd57..11b3929e2b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py index eda9f6ee14..b46603f8f1 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py @@ -1,8 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Johannes Brunswicker -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Johannes Brunswicker +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/web_infrastructure/supervisorctl.py b/plugins/modules/web_infrastructure/supervisorctl.py index bc4ef19af1..a7dd3e5f8a 100644 --- a/plugins/modules/web_infrastructure/supervisorctl.py +++ b/plugins/modules/web_infrastructure/supervisorctl.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2012, Matt Wright -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/web_infrastructure/taiga_issue.py b/plugins/modules/web_infrastructure/taiga_issue.py index 729757590d..a70d551536 100644 --- a/plugins/modules/web_infrastructure/taiga_issue.py +++ b/plugins/modules/web_infrastructure/taiga_issue.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Alejandro Guirao -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/test/a_module.py b/plugins/test/a_module.py index ee5fdcacbc..baabce6e00 100644 --- a/plugins/test/a_module.py +++ b/plugins/test/a_module.py @@ -1,5 +1,6 @@ # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/alternatives/tasks/main.yml b/tests/integration/targets/alternatives/tasks/main.yml index 587022755b..eac512aa45 100644 --- a/tests/integration/targets/alternatives/tasks/main.yml +++ b/tests/integration/targets/alternatives/tasks/main.yml @@ -4,7 +4,8 @@ #################################################################### # Copyright (c) 2017 Pierre-Louis Bonicoli -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: 'setup: create a dummy alternative' block: diff --git a/tests/integration/targets/cmd_runner/library/cmd_echo.py b/tests/integration/targets/cmd_runner/library/cmd_echo.py index 4fd32a7ac6..7becddb6b2 100644 --- a/tests/integration/targets/cmd_runner/library/cmd_echo.py +++ b/tests/integration/targets/cmd_runner/library/cmd_echo.py @@ -1,7 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/cmd_runner/tasks/main.yml b/tests/integration/targets/cmd_runner/tasks/main.yml index 72cf506c6a..7cd9ed7d7c 100644 --- a/tests/integration/targets/cmd_runner/tasks/main.yml +++ b/tests/integration/targets/cmd_runner/tasks/main.yml @@ -1,5 +1,6 @@ # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: parameterized test cmd_echo ansible.builtin.include_tasks: diff --git a/tests/integration/targets/cmd_runner/vars/main.yml b/tests/integration/targets/cmd_runner/vars/main.yml index 9d2b5fa078..019ef5bf84 100644 --- a/tests/integration/targets/cmd_runner/vars/main.yml +++ b/tests/integration/targets/cmd_runner/vars/main.yml @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later cmd_echo_tests: - name: set aa and bb value diff --git a/tests/integration/targets/cpanm/tasks/main.yml b/tests/integration/targets/cpanm/tasks/main.yml index 66f4396685..04d19373f5 100644 --- a/tests/integration/targets/cpanm/tasks/main.yml +++ b/tests/integration/targets/cpanm/tasks/main.yml @@ -1,6 +1,7 @@ # (c) 2020, Berkhan Berkdemir # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: bail out for non-supported platforms meta: end_play diff --git a/tests/integration/targets/django_manage/tasks/main.yaml b/tests/integration/targets/django_manage/tasks/main.yaml index 59104d788a..362daee1bb 100644 --- a/tests/integration/targets/django_manage/tasks/main.yaml +++ b/tests/integration/targets/django_manage/tasks/main.yaml @@ -1,7 +1,8 @@ # Test code for django_manage module # -# Copyright: (c) 2020, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Alexei Znamensky +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Create temporary test directory tempfile: state: directory diff --git a/tests/integration/targets/filter_random_mac/tasks/main.yml b/tests/integration/targets/filter_random_mac/tasks/main.yml index e09017c6fb..f9f85e986b 100644 --- a/tests/integration/targets/filter_random_mac/tasks/main.yml +++ b/tests/integration/targets/filter_random_mac/tasks/main.yml @@ -4,9 +4,10 @@ #################################################################### # test code for filters -# Copyright: (c) 2014, Michael DeHaan -# Copyright: (c) 2019, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2014, Michael DeHaan +# Copyright (c) 2019, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Test random_mac filter bad argument type debug: diff --git a/tests/integration/targets/gandi_livedns/defaults/main.yml b/tests/integration/targets/gandi_livedns/defaults/main.yml index d27842ae0b..2ca3f8a1ba 100644 --- a/tests/integration/targets/gandi_livedns/defaults/main.yml +++ b/tests/integration/targets/gandi_livedns/defaults/main.yml @@ -1,5 +1,6 @@ -# Copyright: (c) 2020 Gregory Thiemonge -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020 Gregory Thiemonge +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- gandi_livedns_domain_name: "ansible-tests.org" gandi_livedns_record_items: diff --git a/tests/integration/targets/gandi_livedns/tasks/create_record.yml b/tests/integration/targets/gandi_livedns/tasks/create_record.yml index bfaff81393..eecc957be3 100644 --- a/tests/integration/targets/gandi_livedns/tasks/create_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/create_record.yml @@ -1,5 +1,6 @@ -# Copyright: (c) 2020 Gregory Thiemonge -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020 Gregory Thiemonge +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - name: test absent dns record community.general.gandi_livedns: diff --git a/tests/integration/targets/gandi_livedns/tasks/main.yml b/tests/integration/targets/gandi_livedns/tasks/main.yml index 5b11e8b9f3..5e6138d41f 100644 --- a/tests/integration/targets/gandi_livedns/tasks/main.yml +++ b/tests/integration/targets/gandi_livedns/tasks/main.yml @@ -1,5 +1,6 @@ -# Copyright: (c) 2020 Gregory Thiemonge -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020 Gregory Thiemonge +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - include_tasks: record.yml with_items: "{{ gandi_livedns_record_items }}" diff --git a/tests/integration/targets/gandi_livedns/tasks/record.yml b/tests/integration/targets/gandi_livedns/tasks/record.yml index 1e5977e3f9..dd790fce24 100644 --- a/tests/integration/targets/gandi_livedns/tasks/record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/record.yml @@ -1,5 +1,6 @@ -# Copyright: (c) 2020 Gregory Thiemonge -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020 Gregory Thiemonge +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - include_tasks: create_record.yml - include_tasks: update_record.yml diff --git a/tests/integration/targets/gandi_livedns/tasks/remove_record.yml b/tests/integration/targets/gandi_livedns/tasks/remove_record.yml index 78a0d2f42b..e68f9b2cfb 100644 --- a/tests/integration/targets/gandi_livedns/tasks/remove_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/remove_record.yml @@ -1,5 +1,6 @@ -# Copyright: (c) 2020 Gregory Thiemonge -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020 Gregory Thiemonge +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - name: test remove a dns record in check mode community.general.gandi_livedns: diff --git a/tests/integration/targets/gandi_livedns/tasks/update_record.yml b/tests/integration/targets/gandi_livedns/tasks/update_record.yml index fdb1dc1e23..7d243bd4ac 100644 --- a/tests/integration/targets/gandi_livedns/tasks/update_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/update_record.yml @@ -1,5 +1,6 @@ -# Copyright: (c) 2020 Gregory Thiemonge -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020 Gregory Thiemonge +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - name: test update or add another dns record in check mode community.general.gandi_livedns: diff --git a/tests/integration/targets/github_issue/tasks/main.yml b/tests/integration/targets/github_issue/tasks/main.yml index 7731a7a955..bb315bf9fb 100644 --- a/tests/integration/targets/github_issue/tasks/main.yml +++ b/tests/integration/targets/github_issue/tasks/main.yml @@ -5,8 +5,9 @@ # Test code for the github_issue module. # -# Copyright: (c) 2017-2018, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017-2018, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Check if GitHub issue is closed or not github_issue: diff --git a/tests/integration/targets/gitlab_group_members/tasks/main.yml b/tests/integration/targets/gitlab_group_members/tasks/main.yml index 109a0f2bdb..aa75096daa 100644 --- a/tests/integration/targets/gitlab_group_members/tasks/main.yml +++ b/tests/integration/targets/gitlab_group_members/tasks/main.yml @@ -5,8 +5,9 @@ # Test code for gitlab_group_members module # -# Copyright: (c) 2020, Zainab Alsaffar -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Zainab Alsaffar +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Install required library pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_project_members/tasks/main.yml b/tests/integration/targets/gitlab_project_members/tasks/main.yml index ade06d7ca2..215abad44f 100644 --- a/tests/integration/targets/gitlab_project_members/tasks/main.yml +++ b/tests/integration/targets/gitlab_project_members/tasks/main.yml @@ -5,8 +5,9 @@ # Test code for gitlab_project_members module # -# Copyright: (c) 2021, Sergey Mikhaltsov -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Sergey Mikhaltsov +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Install required library pip: diff --git a/tests/integration/targets/hg/tasks/main.yml b/tests/integration/targets/hg/tasks/main.yml index 4d7efca5e2..a2cb8df903 100644 --- a/tests/integration/targets/hg/tasks/main.yml +++ b/tests/integration/targets/hg/tasks/main.yml @@ -4,9 +4,10 @@ #################################################################### # test code for the hg module -# Copyright: (c) 2014, James Tanner +# Copyright (c) 2014, James Tanner # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: determine if mercurial is already installed command: which hg diff --git a/tests/integration/targets/hg/tasks/run-tests.yml b/tests/integration/targets/hg/tasks/run-tests.yml index 0818f4f466..e38aeae104 100644 --- a/tests/integration/targets/hg/tasks/run-tests.yml +++ b/tests/integration/targets/hg/tasks/run-tests.yml @@ -1,7 +1,8 @@ # test code for the hg module -# Copyright: (c) 2018, Ansible Project +# Copyright (c) 2018, Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: set where to extract the repo diff --git a/tests/integration/targets/homebrew/tasks/main.yml b/tests/integration/targets/homebrew/tasks/main.yml index b961d0e088..9146b5c33e 100644 --- a/tests/integration/targets/homebrew/tasks/main.yml +++ b/tests/integration/targets/homebrew/tasks/main.yml @@ -4,8 +4,9 @@ #################################################################### # Test code for the homebrew module. -# Copyright: (c) 2020, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - name: Find brew binary command: which brew diff --git a/tests/integration/targets/homebrew_cask/tasks/main.yml b/tests/integration/targets/homebrew_cask/tasks/main.yml index a582427c56..5e84f02404 100644 --- a/tests/integration/targets/homebrew_cask/tasks/main.yml +++ b/tests/integration/targets/homebrew_cask/tasks/main.yml @@ -4,8 +4,9 @@ #################################################################### # Test code for the homebrew_cask module. -# Copyright: (c) 2022, Joseph Torcasso -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2022, Joseph Torcasso +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - name: Find brew binary command: which brew diff --git a/tests/integration/targets/iso_create/tasks/main.yml b/tests/integration/targets/iso_create/tasks/main.yml index adf0d35450..4d321c2d23 100644 --- a/tests/integration/targets/iso_create/tasks/main.yml +++ b/tests/integration/targets/iso_create/tasks/main.yml @@ -4,8 +4,9 @@ #################################################################### # Test code for iso_create module -# Copyright: (c) 2020, Diane Wang (Tomorrow9) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Diane Wang (Tomorrow9) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: install pycdlib pip: name: pycdlib diff --git a/tests/integration/targets/iso_create/tasks/prepare_dest_dir.yml b/tests/integration/targets/iso_create/tasks/prepare_dest_dir.yml index 8320c3942e..d1f405b5f9 100644 --- a/tests/integration/targets/iso_create/tasks/prepare_dest_dir.yml +++ b/tests/integration/targets/iso_create/tasks/prepare_dest_dir.yml @@ -1,6 +1,7 @@ # Test code for iso_create module -# Copyright: (c) 2020, Diane Wang (Tomorrow9) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Diane Wang (Tomorrow9) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Make sure our testing sub-directory does not exist file: path: '{{ output_test_dir }}' diff --git a/tests/integration/targets/jboss/tasks/jboss.yml b/tests/integration/targets/jboss/tasks/jboss.yml index 9f9720a72f..fe9d6f394a 100644 --- a/tests/integration/targets/jboss/tasks/jboss.yml +++ b/tests/integration/targets/jboss/tasks/jboss.yml @@ -1,5 +1,5 @@ -# Copyright: (c) 2019, Andrew Klychkov (@Andersson007) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Andrew Klychkov (@Andersson007) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # Integration tests for jboss module. # helloworld.war (got from https://github.com/aeimer/java-example-helloworld-war/) license: diff --git a/tests/integration/targets/listen_ports_facts/tasks/main.yml b/tests/integration/targets/listen_ports_facts/tasks/main.yml index 715a545039..70649f5056 100644 --- a/tests/integration/targets/listen_ports_facts/tasks/main.yml +++ b/tests/integration/targets/listen_ports_facts/tasks/main.yml @@ -4,9 +4,10 @@ #################################################################### # Test playbook for the listen_ports_facts module -# Copyright: (c) 2019, Nathan Davison +# Copyright (c) 2019, Nathan Davison -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: install netstat and netcat on deb ansible.builtin.package: diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py index 8db51c39a7..2db6063cc2 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py index 8db51c39a7..2db6063cc2 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py index 8db51c39a7..2db6063cc2 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py index 8db51c39a7..2db6063cc2 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/lookup_collection_version/library/local_module.py b/tests/integration/targets/lookup_collection_version/library/local_module.py index 424c127ced..022c7877af 100644 --- a/tests/integration/targets/lookup_collection_version/library/local_module.py +++ b/tests/integration/targets/lookup_collection_version/library/local_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/lookup_etcd3/runme.sh b/tests/integration/targets/lookup_etcd3/runme.sh index 962201ffb3..7559a1e5a2 100755 --- a/tests/integration/targets/lookup_etcd3/runme.sh +++ b/tests/integration/targets/lookup_etcd3/runme.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux ANSIBLE_ROLES_PATH=../ \ diff --git a/tests/integration/targets/lookup_etcd3/tasks/main.yml b/tests/integration/targets/lookup_etcd3/tasks/main.yml index 3a0c149a45..aef43e7cdf 100644 --- a/tests/integration/targets/lookup_etcd3/tasks/main.yml +++ b/tests/integration/targets/lookup_etcd3/tasks/main.yml @@ -6,7 +6,8 @@ # lookup_etcd3 integration tests # 2020, SCC France, Eric Belhomme -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: put key/values with an etcd prefix etcd3: diff --git a/tests/integration/targets/lookup_etcd3/tasks/tests.yml b/tests/integration/targets/lookup_etcd3/tasks/tests.yml index a1090b4809..851dde5321 100644 --- a/tests/integration/targets/lookup_etcd3/tasks/tests.yml +++ b/tests/integration/targets/lookup_etcd3/tasks/tests.yml @@ -1,7 +1,8 @@ --- # lookup_etcd3 integration tests # 2020, SCC France, Eric Belhomme -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - block: - name: 'Fetch secrets using "etcd3" lookup' diff --git a/tests/integration/targets/lookup_lmdb_kv/runme.sh b/tests/integration/targets/lookup_lmdb_kv/runme.sh index afdff7bb9d..f6b2e50478 100755 --- a/tests/integration/targets/lookup_lmdb_kv/runme.sh +++ b/tests/integration/targets/lookup_lmdb_kv/runme.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux ANSIBLE_ROLES_PATH=../ \ diff --git a/tests/integration/targets/lookup_random_pet/runme.sh b/tests/integration/targets/lookup_random_pet/runme.sh index afdff7bb9d..f6b2e50478 100755 --- a/tests/integration/targets/lookup_random_pet/runme.sh +++ b/tests/integration/targets/lookup_random_pet/runme.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux ANSIBLE_ROLES_PATH=../ \ diff --git a/tests/integration/targets/lookup_random_string/runme.sh b/tests/integration/targets/lookup_random_string/runme.sh index 8ed6373823..ac959fee33 100755 --- a/tests/integration/targets/lookup_random_string/runme.sh +++ b/tests/integration/targets/lookup_random_string/runme.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux ANSIBLE_ROLES_PATH=../ \ diff --git a/tests/integration/targets/lookup_random_words/runme.sh b/tests/integration/targets/lookup_random_words/runme.sh index afdff7bb9d..f6b2e50478 100755 --- a/tests/integration/targets/lookup_random_words/runme.sh +++ b/tests/integration/targets/lookup_random_words/runme.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux ANSIBLE_ROLES_PATH=../ \ diff --git a/tests/integration/targets/lxd_project/tasks/main.yml b/tests/integration/targets/lxd_project/tasks/main.yml index 0dc5178930..7c8e165acf 100644 --- a/tests/integration/targets/lxd_project/tasks/main.yml +++ b/tests/integration/targets/lxd_project/tasks/main.yml @@ -3,7 +3,8 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Clean up test project lxd_project: diff --git a/tests/integration/targets/mail/files/smtpserver.py b/tests/integration/targets/mail/files/smtpserver.py index 01b257e189..f193316e8b 100644 --- a/tests/integration/targets/mail/files/smtpserver.py +++ b/tests/integration/targets/mail/files/smtpserver.py @@ -1,8 +1,9 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright: (c) 2018, Dag Wieers (@dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/mas/tasks/main.yml b/tests/integration/targets/mas/tasks/main.yml index 811bb2110a..85982a5968 100644 --- a/tests/integration/targets/mas/tasks/main.yml +++ b/tests/integration/targets/mas/tasks/main.yml @@ -4,8 +4,9 @@ #################################################################### # Test code for the mas module. -# Copyright: (c) 2020, Lukas Bestle -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Lukas Bestle +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- # Test preparation - name: Uninstall Rested to ensure consistent starting point diff --git a/tests/integration/targets/module_helper/library/mdepfail.py b/tests/integration/targets/module_helper/library/mdepfail.py index 614c50dbf8..c08c12e147 100644 --- a/tests/integration/targets/module_helper/library/mdepfail.py +++ b/tests/integration/targets/module_helper/library/mdepfail.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/module_helper/library/msimple.py b/tests/integration/targets/module_helper/library/msimple.py index bde7f4fcc5..a8b560edc9 100644 --- a/tests/integration/targets/module_helper/library/msimple.py +++ b/tests/integration/targets/module_helper/library/msimple.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/module_helper/library/msimpleda.py b/tests/integration/targets/module_helper/library/msimpleda.py index fa7f5cf464..99e4754bcf 100644 --- a/tests/integration/targets/module_helper/library/msimpleda.py +++ b/tests/integration/targets/module_helper/library/msimpleda.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function import collections diff --git a/tests/integration/targets/module_helper/library/mstate.py b/tests/integration/targets/module_helper/library/mstate.py index 4ae0c63a59..b0f30f1b77 100644 --- a/tests/integration/targets/module_helper/library/mstate.py +++ b/tests/integration/targets/module_helper/library/mstate.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/module_helper/tasks/main.yml b/tests/integration/targets/module_helper/tasks/main.yml index f7e36537a6..eaf9e35dc3 100644 --- a/tests/integration/targets/module_helper/tasks/main.yml +++ b/tests/integration/targets/module_helper/tasks/main.yml @@ -1,5 +1,6 @@ # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - include_tasks: msimple.yml - include_tasks: mdepfail.yml diff --git a/tests/integration/targets/module_helper/tasks/mdepfail.yml b/tests/integration/targets/module_helper/tasks/mdepfail.yml index 01523513a3..73f981a956 100644 --- a/tests/integration/targets/module_helper/tasks/mdepfail.yml +++ b/tests/integration/targets/module_helper/tasks/mdepfail.yml @@ -1,5 +1,6 @@ # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: test failing dependency mdepfail: diff --git a/tests/integration/targets/module_helper/tasks/msimple.yml b/tests/integration/targets/module_helper/tasks/msimple.yml index d539fa3f9f..edae1a09ff 100644 --- a/tests/integration/targets/module_helper/tasks/msimple.yml +++ b/tests/integration/targets/module_helper/tasks/msimple.yml @@ -1,5 +1,6 @@ # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: test msimple (set a=80) msimple: diff --git a/tests/integration/targets/module_helper/tasks/msimpleda.yml b/tests/integration/targets/module_helper/tasks/msimpleda.yml index 04f670b1cf..2d1064c2f2 100644 --- a/tests/integration/targets/module_helper/tasks/msimpleda.yml +++ b/tests/integration/targets/module_helper/tasks/msimpleda.yml @@ -1,5 +1,6 @@ # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - set_fact: attr2_d: diff --git a/tests/integration/targets/module_helper/tasks/mstate.yml b/tests/integration/targets/module_helper/tasks/mstate.yml index 581a8ba8a4..7d2141adfa 100644 --- a/tests/integration/targets/module_helper/tasks/mstate.yml +++ b/tests/integration/targets/module_helper/tasks/mstate.yml @@ -1,5 +1,6 @@ # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: test mstate 1 mstate: diff --git a/tests/integration/targets/monit/files/httpd_echo.py b/tests/integration/targets/monit/files/httpd_echo.py index 561470372d..2b8f039a29 100644 --- a/tests/integration/targets/monit/files/httpd_echo.py +++ b/tests/integration/targets/monit/files/httpd_echo.py @@ -1,5 +1,6 @@ # (c) 2020, Simon Kelly -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/osx_defaults/tasks/main.yml b/tests/integration/targets/osx_defaults/tasks/main.yml index af4667ce28..917cdb51f2 100644 --- a/tests/integration/targets/osx_defaults/tasks/main.yml +++ b/tests/integration/targets/osx_defaults/tasks/main.yml @@ -4,8 +4,9 @@ #################################################################### # Test code for the osx_defaults module. -# Copyright: (c) 2019, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later --- - name: Check if name is required for present osx_defaults: diff --git a/tests/integration/targets/pagerduty_user/tasks/main.yml b/tests/integration/targets/pagerduty_user/tasks/main.yml index a6477ff1de..27638cd2bc 100644 --- a/tests/integration/targets/pagerduty_user/tasks/main.yml +++ b/tests/integration/targets/pagerduty_user/tasks/main.yml @@ -1,7 +1,8 @@ # Test code for pagerduty_user module # -# Copyright: (c) 2020, Zainab Alsaffar -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Zainab Alsaffar +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Install required library pip: name: pdpyras diff --git a/tests/integration/targets/pam_limits/tasks/main.yml b/tests/integration/targets/pam_limits/tasks/main.yml index 840f8d244a..1c73394fb3 100644 --- a/tests/integration/targets/pam_limits/tasks/main.yml +++ b/tests/integration/targets/pam_limits/tasks/main.yml @@ -1,6 +1,7 @@ # Test code for the pam_limits module -# Copyright: (c) 2021, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Set value for temp limit configuration set_fact: diff --git a/tests/integration/targets/pamd/tasks/main.yml b/tests/integration/targets/pamd/tasks/main.yml index 3835ff9db0..5a40c45a64 100644 --- a/tests/integration/targets/pamd/tasks/main.yml +++ b/tests/integration/targets/pamd/tasks/main.yml @@ -1,5 +1,6 @@ # (c) 2021, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Set value for temp limit configuration set_fact: diff --git a/tests/integration/targets/pids/files/sleeper.c b/tests/integration/targets/pids/files/sleeper.c index dcf9feaa6e..f2d969e40b 100644 --- a/tests/integration/targets/pids/files/sleeper.c +++ b/tests/integration/targets/pids/files/sleeper.c @@ -1,6 +1,7 @@ /* * (c) 2022, Alexei Znamensky - * GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + * GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + * SPDX-License-Identifier: GPL-3.0-or-later */ #include diff --git a/tests/integration/targets/pids/tasks/main.yml b/tests/integration/targets/pids/tasks/main.yml index 52be9f1f99..ce7e221a0a 100644 --- a/tests/integration/targets/pids/tasks/main.yml +++ b/tests/integration/targets/pids/tasks/main.yml @@ -4,8 +4,9 @@ #################################################################### # Test code for the pids module -# Copyright: (c) 2019, Saranya Sridharan -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Saranya Sridharan +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Attempt installation of latest 'psutil' version pip: diff --git a/tests/integration/targets/pkgutil/tasks/main.yml b/tests/integration/targets/pkgutil/tasks/main.yml index f2bf44e88c..e6f32ccc7a 100644 --- a/tests/integration/targets/pkgutil/tasks/main.yml +++ b/tests/integration/targets/pkgutil/tasks/main.yml @@ -1,7 +1,8 @@ # Test code for the pkgutil module -# Copyright: (c) 2019, Dag Wieers (@dagwieers) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # CLEAN ENVIRONMENT diff --git a/tests/integration/targets/proxmox/tasks/main.yml b/tests/integration/targets/proxmox/tasks/main.yml index 5954d3f11f..fc7e084e90 100644 --- a/tests/integration/targets/proxmox/tasks/main.yml +++ b/tests/integration/targets/proxmox/tasks/main.yml @@ -3,8 +3,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### -# Copyright: (c) 2020, Tristan Le Guern -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Tristan Le Guern +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: List domains proxmox_domain_info: diff --git a/tests/integration/targets/redis_info/tasks/main.yml b/tests/integration/targets/redis_info/tasks/main.yml index dc76101157..e696066b26 100644 --- a/tests/integration/targets/redis_info/tasks/main.yml +++ b/tests/integration/targets/redis_info/tasks/main.yml @@ -3,8 +3,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### -# Copyright: (c) 2020, Pavlo Bashynskyi (@levonet) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Pavlo Bashynskyi (@levonet) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: redis_info - connect to master with default host/port community.general.redis_info: diff --git a/tests/integration/targets/setup_etcd3/defaults/main.yml b/tests/integration/targets/setup_etcd3/defaults/main.yml index 95e4b837a7..f185ef0c25 100644 --- a/tests/integration/targets/setup_etcd3/defaults/main.yml +++ b/tests/integration/targets/setup_etcd3/defaults/main.yml @@ -3,8 +3,9 @@ # (c) 2017, Jean-Philippe Evrard # 2020, SCC France, Eric Belhomme # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# # Copyright: (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +# # Copyright (c) 2018, Ansible Project # etcd3_ver: "v3.2.14" etcd3_download_server: "https://storage.googleapis.com/etcd" diff --git a/tests/integration/targets/setup_redis_replication/tasks/main.yml b/tests/integration/targets/setup_redis_replication/tasks/main.yml index 6028a0fa1d..076a473594 100644 --- a/tests/integration/targets/setup_redis_replication/tasks/main.yml +++ b/tests/integration/targets/setup_redis_replication/tasks/main.yml @@ -3,8 +3,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### -# Copyright: (c) 2020, Pavlo Bashynskyi (@levonet) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Pavlo Bashynskyi (@levonet) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - import_tasks: setup_redis_cluster.yml when: diff --git a/tests/integration/targets/ssh_config/tasks/main.yml b/tests/integration/targets/ssh_config/tasks/main.yml index 0d4c10a111..ce57493b84 100644 --- a/tests/integration/targets/ssh_config/tasks/main.yml +++ b/tests/integration/targets/ssh_config/tasks/main.yml @@ -1,6 +1,7 @@ # Test code for ssh_config module -# Copyright: (c) 2021, Abhijeet Kasurde (@Akasurde) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Abhijeet Kasurde (@Akasurde) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Install required libs pip: diff --git a/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py b/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py index 8db51c39a7..2db6063cc2 100644 --- a/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py +++ b/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/test_a_module/library/local_module.py b/tests/integration/targets/test_a_module/library/local_module.py index 424c127ced..022c7877af 100644 --- a/tests/integration/targets/test_a_module/library/local_module.py +++ b/tests/integration/targets/test_a_module/library/local_module.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- # (c) 2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/sanity/extra/aliases.py b/tests/sanity/extra/aliases.py index cd6ec02159..b5b6fe0538 100755 --- a/tests/sanity/extra/aliases.py +++ b/tests/sanity/extra/aliases.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # Copyright (c) Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """Check extra collection docs with antsibull-docs.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/sanity/extra/botmeta.py b/tests/sanity/extra/botmeta.py index b4095cd54a..c6d677ae5e 100755 --- a/tests/sanity/extra/botmeta.py +++ b/tests/sanity/extra/botmeta.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # Copyright (c) Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """Check BOTMETA file.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/sanity/extra/extra-docs.py b/tests/sanity/extra/extra-docs.py index f2746e51ba..6731049231 100755 --- a/tests/sanity/extra/extra-docs.py +++ b/tests/sanity/extra/extra-docs.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # Copyright (c) Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """Check extra collection docs with antsibull-docs.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/sanity/extra/no-unwanted-files.py b/tests/sanity/extra/no-unwanted-files.py index 4522f77e2b..b39df83a18 100755 --- a/tests/sanity/extra/no-unwanted-files.py +++ b/tests/sanity/extra/no-unwanted-files.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # Copyright (c) Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later """Prevent unwanted files from being added to the source tree.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/mock/loader.py b/tests/unit/mock/loader.py index 5389bdcb2f..d1cb7cee3c 100644 --- a/tests/unit/mock/loader.py +++ b/tests/unit/mock/loader.py @@ -1,6 +1,7 @@ # (c) 2012-2014, Michael DeHaan # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/mock/procenv.py b/tests/unit/mock/procenv.py index 5673863e16..2b9617d9f7 100644 --- a/tests/unit/mock/procenv.py +++ b/tests/unit/mock/procenv.py @@ -1,7 +1,8 @@ # (c) 2016, Matt Davis # (c) 2016, Toshio Kuratomi # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/mock/vault_helper.py b/tests/unit/mock/vault_helper.py index 6bd2db9c32..dbe91a5945 100644 --- a/tests/unit/mock/vault_helper.py +++ b/tests/unit/mock/vault_helper.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/mock/yaml_helper.py b/tests/unit/mock/yaml_helper.py index a646c0241c..dc50c6ef64 100644 --- a/tests/unit/mock/yaml_helper.py +++ b/tests/unit/mock/yaml_helper.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/become/conftest.py b/tests/unit/plugins/become/conftest.py index a04a5e2da9..c6e9cc7429 100644 --- a/tests/unit/plugins/become/conftest.py +++ b/tests/unit/plugins/become/conftest.py @@ -1,7 +1,8 @@ # (c) 2012-2014, Michael DeHaan # (c) 2017 Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/become/helper.py b/tests/unit/plugins/become/helper.py index 69e3ea6cd0..46a1c2175d 100644 --- a/tests/unit/plugins/become/helper.py +++ b/tests/unit/plugins/become/helper.py @@ -2,7 +2,8 @@ # (c) 2012-2014, Michael DeHaan # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/become/test_doas.py b/tests/unit/plugins/become/test_doas.py index 0474b3b615..b8659d14e8 100644 --- a/tests/unit/plugins/become/test_doas.py +++ b/tests/unit/plugins/become/test_doas.py @@ -1,7 +1,8 @@ # (c) 2012-2014, Michael DeHaan # (c) 2020 Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/become/test_dzdo.py b/tests/unit/plugins/become/test_dzdo.py index eb5932cd10..94044873b3 100644 --- a/tests/unit/plugins/become/test_dzdo.py +++ b/tests/unit/plugins/become/test_dzdo.py @@ -1,7 +1,8 @@ # (c) 2012-2014, Michael DeHaan # (c) 2020 Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/become/test_ksu.py b/tests/unit/plugins/become/test_ksu.py index 87c337064a..369e54f0b9 100644 --- a/tests/unit/plugins/become/test_ksu.py +++ b/tests/unit/plugins/become/test_ksu.py @@ -1,7 +1,8 @@ # (c) 2012-2014, Michael DeHaan # (c) 2020 Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/become/test_pbrun.py b/tests/unit/plugins/become/test_pbrun.py index b8e369d274..bc174c997d 100644 --- a/tests/unit/plugins/become/test_pbrun.py +++ b/tests/unit/plugins/become/test_pbrun.py @@ -1,7 +1,8 @@ # (c) 2012-2014, Michael DeHaan # (c) 2020 Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/become/test_pfexec.py b/tests/unit/plugins/become/test_pfexec.py index 3adc2ed51d..3799319d08 100644 --- a/tests/unit/plugins/become/test_pfexec.py +++ b/tests/unit/plugins/become/test_pfexec.py @@ -1,7 +1,8 @@ # (c) 2012-2014, Michael DeHaan # (c) 2020 Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/become/test_sudosu.py b/tests/unit/plugins/become/test_sudosu.py index 6adf200d8e..9d40ba18e7 100644 --- a/tests/unit/plugins/become/test_sudosu.py +++ b/tests/unit/plugins/become/test_sudosu.py @@ -1,7 +1,8 @@ # (c) 2012-2014, Michael DeHaan # (c) 2021 Ansible Project # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/callback/test_elastic.py b/tests/unit/plugins/callback/test_elastic.py index 8a50da038f..bb825dbeda 100644 --- a/tests/unit/plugins/callback/test_elastic.py +++ b/tests/unit/plugins/callback/test_elastic.py @@ -1,5 +1,6 @@ # (C) 2021, Victor Martinez -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/callback/test_loganalytics.py b/tests/unit/plugins/callback/test_loganalytics.py index 085e1163cb..9c9893694c 100644 --- a/tests/unit/plugins/callback/test_loganalytics.py +++ b/tests/unit/plugins/callback/test_loganalytics.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/callback/test_opentelemetry.py b/tests/unit/plugins/callback/test_opentelemetry.py index 41700fbcb7..4ab6811cdb 100644 --- a/tests/unit/plugins/callback/test_opentelemetry.py +++ b/tests/unit/plugins/callback/test_opentelemetry.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (C) 2021, Victor Martinez -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/inventory/test_icinga2.py b/tests/unit/plugins/inventory/test_icinga2.py index bcb6aa9614..e3928b0dbe 100644 --- a/tests/unit/plugins/inventory/test_icinga2.py +++ b/tests/unit/plugins/inventory/test_icinga2.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Cliff Hults -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # The API responses used in these tests were recorded from PVE version 6.2. diff --git a/tests/unit/plugins/inventory/test_lxd.py b/tests/unit/plugins/inventory/test_lxd.py index 42142c8d64..99c9e166c1 100644 --- a/tests/unit/plugins/inventory/test_lxd.py +++ b/tests/unit/plugins/inventory/test_lxd.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Frank Dornheim -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Frank Dornheim +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/inventory/test_opennebula.py b/tests/unit/plugins/inventory/test_opennebula.py index 88a5f29d2d..bbc2fe699a 100644 --- a/tests/unit/plugins/inventory/test_opennebula.py +++ b/tests/unit/plugins/inventory/test_opennebula.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, FELDSAM s.r.o. - FeldHost™ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # The API responses used in these tests were recorded from OpenNebula version 5.10. diff --git a/tests/unit/plugins/inventory/test_proxmox.py b/tests/unit/plugins/inventory/test_proxmox.py index bf553024ab..13832c9387 100644 --- a/tests/unit/plugins/inventory/test_proxmox.py +++ b/tests/unit/plugins/inventory/test_proxmox.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Jeffrey van Pelt -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # The API responses used in these tests were recorded from PVE version 6.2. diff --git a/tests/unit/plugins/inventory/test_stackpath_compute.py b/tests/unit/plugins/inventory/test_stackpath_compute.py index 73d9a06a33..781db50b73 100644 --- a/tests/unit/plugins/inventory/test_stackpath_compute.py +++ b/tests/unit/plugins/inventory/test_stackpath_compute.py @@ -1,7 +1,7 @@ # Copyright (c) 2020 Shay Rybak # Copyright (c) 2020 Ansible Project -# GNGeneral Public License v3.0+ -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/inventory/test_xen_orchestra.py b/tests/unit/plugins/inventory/test_xen_orchestra.py index 4916446c13..7d51f6f183 100644 --- a/tests/unit/plugins/inventory/test_xen_orchestra.py +++ b/tests/unit/plugins/inventory/test_xen_orchestra.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Jeffrey van Pelt -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # The API responses used in these tests were recorded from PVE version 6.2. diff --git a/tests/unit/plugins/lookup/test_bitwarden.py b/tests/unit/plugins/lookup/test_bitwarden.py index 893cbc06f0..b496ec2a5e 100644 --- a/tests/unit/plugins/lookup/test_bitwarden.py +++ b/tests/unit/plugins/lookup/test_bitwarden.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2022, Jonathan Lung -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/lookup/test_dependent.py b/tests/unit/plugins/lookup/test_dependent.py index f2a31ff4b6..2de6b93314 100644 --- a/tests/unit/plugins/lookup/test_dependent.py +++ b/tests/unit/plugins/lookup/test_dependent.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020-2021, Felix Fontein -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/lookup/test_dsv.py b/tests/unit/plugins/lookup/test_dsv.py index 376bd7250a..f8eac520a5 100644 --- a/tests/unit/plugins/lookup/test_dsv.py +++ b/tests/unit/plugins/lookup/test_dsv.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Adam Migus -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/lookup/test_etcd3.py b/tests/unit/plugins/lookup/test_etcd3.py index b0663dff66..797f293eaa 100644 --- a/tests/unit/plugins/lookup/test_etcd3.py +++ b/tests/unit/plugins/lookup/test_etcd3.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # # (c) 2020, SCC France, Eric Belhomme -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/lookup/test_manifold.py b/tests/unit/plugins/lookup/test_manifold.py index 0eb49c8cea..f3f70384a3 100644 --- a/tests/unit/plugins/lookup/test_manifold.py +++ b/tests/unit/plugins/lookup/test_manifold.py @@ -1,6 +1,7 @@ # (c) 2018, Arigato Machine Inc. # (c) 2018, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/lookup/test_onepassword.py b/tests/unit/plugins/lookup/test_onepassword.py index 0312a0e048..2386bf80f4 100644 --- a/tests/unit/plugins/lookup/test_onepassword.py +++ b/tests/unit/plugins/lookup/test_onepassword.py @@ -1,6 +1,7 @@ # (c) 2018, Scott Buchanan # (c) 2016, Andrew Zenk (test_lastpass.py used as starting point) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/lookup/test_revbitspss.py b/tests/unit/plugins/lookup/test_revbitspss.py index 352e61d0fa..5109992068 100644 --- a/tests/unit/plugins/lookup/test_revbitspss.py +++ b/tests/unit/plugins/lookup/test_revbitspss.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, RevBits -# GNU General Public License v3.0+ (see COPYING or -# https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, RevBits +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/lookup/test_tss.py b/tests/unit/plugins/lookup/test_tss.py index 97073d34be..e25c9ae22d 100644 --- a/tests/unit/plugins/lookup/test_tss.py +++ b/tests/unit/plugins/lookup/test_tss.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2020, Adam Migus -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/module_utils/cloud/test_backoff.py b/tests/unit/plugins/module_utils/cloud/test_backoff.py index 5d0438b794..06df9c14a7 100644 --- a/tests/unit/plugins/module_utils/cloud/test_backoff.py +++ b/tests/unit/plugins/module_utils/cloud/test_backoff.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/conftest.py b/tests/unit/plugins/module_utils/conftest.py index 61ed0acd27..2217dd39f9 100644 --- a/tests/unit/plugins/module_utils/conftest.py +++ b/tests/unit/plugins/module_utils/conftest.py @@ -1,5 +1,6 @@ # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py b/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py index bcdfc4e2ca..ddf0201785 100644 --- a/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py +++ b/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py @@ -3,7 +3,8 @@ # # (c) 2016, Tom Melendez # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py b/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py index 1891875959..a3fdadac9d 100644 --- a/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py +++ b/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/net_tools/pritunl/test_api.py b/tests/unit/plugins/module_utils/net_tools/pritunl/test_api.py index 4039f7c57a..6ddc827a14 100644 --- a/tests/unit/plugins/module_utils/net_tools/pritunl/test_api.py +++ b/tests/unit/plugins/module_utils/net_tools/pritunl/test_api.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/module_utils/test_cmd_runner.py b/tests/unit/plugins/module_utils/test_cmd_runner.py index f28c890413..edbafe00db 100644 --- a/tests/unit/plugins/module_utils/test_cmd_runner.py +++ b/tests/unit/plugins/module_utils/test_cmd_runner.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2022, Alexei Znamensky -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/test_csv.py b/tests/unit/plugins/module_utils/test_csv.py index b31915d66d..94b0219a62 100644 --- a/tests/unit/plugins/module_utils/test_csv.py +++ b/tests/unit/plugins/module_utils/test_csv.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/test_database.py b/tests/unit/plugins/module_utils/test_database.py index f5784a598a..7067eb3b4e 100644 --- a/tests/unit/plugins/module_utils/test_database.py +++ b/tests/unit/plugins/module_utils/test_database.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/test_known_hosts.py b/tests/unit/plugins/module_utils/test_known_hosts.py index e7c57eb3dd..25e76b66f5 100644 --- a/tests/unit/plugins/module_utils/test_known_hosts.py +++ b/tests/unit/plugins/module_utils/test_known_hosts.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2015, Michael Scherer # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/test_module_helper.py b/tests/unit/plugins/module_utils/test_module_helper.py index 00667fcea3..18251cf2e9 100644 --- a/tests/unit/plugins/module_utils/test_module_helper.py +++ b/tests/unit/plugins/module_utils/test_module_helper.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # (c) 2020, Alexei Znamensky # Copyright (c) 2020 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/test_saslprep.py b/tests/unit/plugins/module_utils/test_saslprep.py index 4829f55b83..e3e0405f6b 100644 --- a/tests/unit/plugins/module_utils/test_saslprep.py +++ b/tests/unit/plugins/module_utils/test_saslprep.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Andrey Tuzhilin -# Copyright: (c) 2020, Andrew Klychkov (@Andersson007) +# Copyright (c) 2019, Andrey Tuzhilin +# Copyright (c) 2020, Andrew Klychkov (@Andersson007) from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/test_utm_utils.py b/tests/unit/plugins/module_utils/test_utm_utils.py index ea5324cb5a..1cab58d639 100644 --- a/tests/unit/plugins/module_utils/test_utm_utils.py +++ b/tests/unit/plugins/module_utils/test_utm_utils.py @@ -4,9 +4,10 @@ # still belong to the author of the module, and may assign their own license # to the complete work. # -# Copyright: (c) 2018, Johannes Brunswicker +# Copyright (c) 2018, Johannes Brunswicker # -# Simplified BSD License (see simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/FakeAnsibleModule.py b/tests/unit/plugins/module_utils/xenserver/FakeAnsibleModule.py index c443dfdb6e..bdcc21793f 100644 --- a/tests/unit/plugins/module_utils/xenserver/FakeAnsibleModule.py +++ b/tests/unit/plugins/module_utils/xenserver/FakeAnsibleModule.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/FakeXenAPI.py b/tests/unit/plugins/module_utils/xenserver/FakeXenAPI.py index 2493317561..bc9d69c77c 100644 --- a/tests/unit/plugins/module_utils/xenserver/FakeXenAPI.py +++ b/tests/unit/plugins/module_utils/xenserver/FakeXenAPI.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/common.py b/tests/unit/plugins/module_utils/xenserver/common.py index 52a01c990e..0aee3197ef 100644 --- a/tests/unit/plugins/module_utils/xenserver/common.py +++ b/tests/unit/plugins/module_utils/xenserver/common.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/conftest.py b/tests/unit/plugins/module_utils/xenserver/conftest.py index d36166fcc0..3fcea55617 100644 --- a/tests/unit/plugins/module_utils/xenserver/conftest.py +++ b/tests/unit/plugins/module_utils/xenserver/conftest.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_gather_vm_params_and_facts.py b/tests/unit/plugins/module_utils/xenserver/test_gather_vm_params_and_facts.py index b1020bee70..37e54b2b5f 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_gather_vm_params_and_facts.py +++ b/tests/unit/plugins/module_utils/xenserver/test_gather_vm_params_and_facts.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_get_object_ref.py b/tests/unit/plugins/module_utils/xenserver/test_get_object_ref.py index 0fe7a7c1bf..242e1debdd 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_get_object_ref.py +++ b/tests/unit/plugins/module_utils/xenserver/test_get_object_ref.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_misc.py b/tests/unit/plugins/module_utils/xenserver/test_misc.py index 3fad0ee50d..b22e4aa351 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_misc.py +++ b/tests/unit/plugins/module_utils/xenserver/test_misc.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_netaddr_functions.py b/tests/unit/plugins/module_utils/xenserver/test_netaddr_functions.py index d4b80f47dc..d072ce2076 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_netaddr_functions.py +++ b/tests/unit/plugins/module_utils/xenserver/test_netaddr_functions.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_set_vm_power_state.py b/tests/unit/plugins/module_utils/xenserver/test_set_vm_power_state.py index a3048f4331..279dc9912f 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_set_vm_power_state.py +++ b/tests/unit/plugins/module_utils/xenserver/test_set_vm_power_state.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_wait_for_functions.py b/tests/unit/plugins/module_utils/xenserver/test_wait_for_functions.py index c06ad6de6b..3f31f030e0 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_wait_for_functions.py +++ b/tests/unit/plugins/module_utils/xenserver/test_wait_for_functions.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_xapi.py b/tests/unit/plugins/module_utils/xenserver/test_xapi.py index 3b553d1237..86965b4e55 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_xapi.py +++ b/tests/unit/plugins/module_utils/xenserver/test_xapi.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/xenserver/test_xenserverobject.py b/tests/unit/plugins/module_utils/xenserver/test_xenserverobject.py index 60570e03cb..2d758fd4eb 100644 --- a/tests/unit/plugins/module_utils/xenserver/test_xenserverobject.py +++ b/tests/unit/plugins/module_utils/xenserver/test_xenserverobject.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/linode/conftest.py b/tests/unit/plugins/modules/cloud/linode/conftest.py index 6ce13a7273..8193d134d2 100644 --- a/tests/unit/plugins/modules/cloud/linode/conftest.py +++ b/tests/unit/plugins/modules/cloud/linode/conftest.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/misc/test_proxmox_kvm.py b/tests/unit/plugins/modules/cloud/misc/test_proxmox_kvm.py index 4aaf326db3..489ee8df62 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_proxmox_kvm.py +++ b/tests/unit/plugins/modules/cloud/misc/test_proxmox_kvm.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py b/tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py index 1ee14d81ef..3ef121cddd 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py +++ b/tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/misc/test_proxmox_tasks_info.py b/tests/unit/plugins/modules/cloud/misc/test_proxmox_tasks_info.py index c712460593..9d1bd74e69 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_proxmox_tasks_info.py +++ b/tests/unit/plugins/modules/cloud/misc/test_proxmox_tasks_info.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Andreas Botzner (@paginabianca) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner (@paginabianca) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # Proxmox Tasks module unit tests. # The API responses used in these tests were recorded from PVE version 6.4-8 diff --git a/tests/unit/plugins/modules/cloud/misc/test_terraform.py b/tests/unit/plugins/modules/cloud/misc/test_terraform.py index 898f99f2b8..7b0318dbb3 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_terraform.py +++ b/tests/unit/plugins/modules/cloud/misc/test_terraform.py @@ -1,5 +1,6 @@ -# Copyright: (c) 2019, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py b/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py index f474084576..68bc1653d8 100644 --- a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py +++ b/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py @@ -1,5 +1,6 @@ -# Copyright: (c) 2019, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_private_network.py b/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_private_network.py index be7d6fd798..9d9a725f12 100644 --- a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_private_network.py +++ b/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_private_network.py @@ -1,6 +1,7 @@ -# Copyright: (c) 2019, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/xenserver/FakeAnsibleModule.py b/tests/unit/plugins/modules/cloud/xenserver/FakeAnsibleModule.py index c443dfdb6e..bdcc21793f 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/FakeAnsibleModule.py +++ b/tests/unit/plugins/modules/cloud/xenserver/FakeAnsibleModule.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/xenserver/FakeXenAPI.py b/tests/unit/plugins/modules/cloud/xenserver/FakeXenAPI.py index 2493317561..bc9d69c77c 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/FakeXenAPI.py +++ b/tests/unit/plugins/modules/cloud/xenserver/FakeXenAPI.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/xenserver/common.py b/tests/unit/plugins/modules/cloud/xenserver/common.py index 9d6ff0aef7..d3ebb484d0 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/common.py +++ b/tests/unit/plugins/modules/cloud/xenserver/common.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/xenserver/conftest.py b/tests/unit/plugins/modules/cloud/xenserver/conftest.py index 479f4479a3..cb3ce9b076 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/conftest.py +++ b/tests/unit/plugins/modules/cloud/xenserver/conftest.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py index 16f209c287..149b2cdc8c 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py +++ b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py index ae8735c35a..1cc543e48b 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py +++ b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2019, Bojan Vitnik -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Bojan Vitnik +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/conftest.py b/tests/unit/plugins/modules/conftest.py index 9d8c52e6c5..0ed3dd447c 100644 --- a/tests/unit/plugins/modules/conftest.py +++ b/tests/unit/plugins/modules/conftest.py @@ -1,5 +1,6 @@ # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/database/misc/test_redis_data.py b/tests/unit/plugins/modules/database/misc/test_redis_data.py index b7bbf5b6ea..16d768e0d8 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_data.py +++ b/tests/unit/plugins/modules/database/misc/test_redis_data.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/database/misc/test_redis_data_incr.py b/tests/unit/plugins/modules/database/misc/test_redis_data_incr.py index be7ebfbdfb..496a00313e 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_data_incr.py +++ b/tests/unit/plugins/modules/database/misc/test_redis_data_incr.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/database/misc/test_redis_data_info.py b/tests/unit/plugins/modules/database/misc/test_redis_data_info.py index 808c583e37..fc16cabe86 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_data_info.py +++ b/tests/unit/plugins/modules/database/misc/test_redis_data_info.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Andreas Botzner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/database/misc/test_redis_info.py b/tests/unit/plugins/modules/database/misc/test_redis_info.py index 4ff1efc5c5..df23964a46 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_info.py +++ b/tests/unit/plugins/modules/database/misc/test_redis_info.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Pavlo Bashynskyi (@levonet) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Pavlo Bashynskyi (@levonet) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/database/saphana/test_hana_query.py b/tests/unit/plugins/modules/database/saphana/test_hana_query.py index f7525b34f8..f70b3003b8 100644 --- a/tests/unit/plugins/modules/database/saphana/test_hana_query.py +++ b/tests/unit/plugins/modules/database/saphana/test_hana_query.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Rainer Leber (@rainerleber) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Rainer Leber (@rainerleber) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/files/test_archive.py b/tests/unit/plugins/modules/files/test_archive.py index 9fae51e7b7..b181978bfe 100644 --- a/tests/unit/plugins/modules/files/test_archive.py +++ b/tests/unit/plugins/modules/files/test_archive.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/files/test_sapcar_extract.py b/tests/unit/plugins/modules/files/test_sapcar_extract.py index 05946e8217..58a3b227ee 100644 --- a/tests/unit/plugins/modules/files/test_sapcar_extract.py +++ b/tests/unit/plugins/modules/files/test_sapcar_extract.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Rainer Leber (@rainerleber) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Rainer Leber (@rainerleber) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/ipa/test_ipa_otpconfig.py b/tests/unit/plugins/modules/identity/ipa/test_ipa_otpconfig.py index cae905942a..a13ae32c0f 100644 --- a/tests/unit/plugins/modules/identity/ipa/test_ipa_otpconfig.py +++ b/tests/unit/plugins/modules/identity/ipa/test_ipa_otpconfig.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/ipa/test_ipa_otptoken.py b/tests/unit/plugins/modules/identity/ipa/test_ipa_otptoken.py index ecea5920a0..4781b242e9 100644 --- a/tests/unit/plugins/modules/identity/ipa/test_ipa_otptoken.py +++ b/tests/unit/plugins/modules/identity/ipa/test_ipa_otptoken.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/ipa/test_ipa_pwpolicy.py b/tests/unit/plugins/modules/identity/ipa/test_ipa_pwpolicy.py index 22353b89f2..35201a2cbe 100644 --- a/tests/unit/plugins/modules/identity/ipa/test_ipa_pwpolicy.py +++ b/tests/unit/plugins/modules/identity/ipa/test_ipa_pwpolicy.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2020, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2020, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_authentication.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_authentication.py index 91e34eea7b..226a3bad7c 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_authentication.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_authentication.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client.py index e017a5985c..1f9fa8bc67 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py index 8e753bc6d0..d3a3516660 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_clientscope.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_clientscope.py index 0954562d95..011d451b4d 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_clientscope.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_clientscope.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_identity_provider.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_identity_provider.py index 3faea34c51..7bcc4b41a2 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_identity_provider.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_identity_provider.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm.py index 06548ad3e6..4158f320ba 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm_info.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm_info.py index b6833d7949..7ac381b974 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm_info.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm_info.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_role.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_role.py index cffae17807..4e27bfcae9 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_role.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_role.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_user_federation.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_user_federation.py index a37ea1bb11..88b61ac559 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_user_federation.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_user_federation.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_alerta_customer.py b/tests/unit/plugins/modules/monitoring/test_alerta_customer.py index 8ad46db363..1212847816 100644 --- a/tests/unit/plugins/modules/monitoring/test_alerta_customer.py +++ b/tests/unit/plugins/modules/monitoring/test_alerta_customer.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py b/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py index b380e857b1..a69aea0af3 100644 --- a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py +++ b/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled b/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled index c7ab6612d7..5201cc8e45 100644 --- a/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled +++ b/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/modules/monitoring/test_icinga2_feature.py b/tests/unit/plugins/modules/monitoring/test_icinga2_feature.py index 52398a8495..379071963f 100644 --- a/tests/unit/plugins/modules/monitoring/test_icinga2_feature.py +++ b/tests/unit/plugins/modules/monitoring/test_icinga2_feature.py @@ -3,7 +3,8 @@ # Copyright (c) 2018, Ansible Project # Copyright (c) 2018, Abhijeet Kasurde # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_monit.py b/tests/unit/plugins/modules/monitoring/test_monit.py index 849d567057..313530d6d3 100644 --- a/tests/unit/plugins/modules/monitoring/test_monit.py +++ b/tests/unit/plugins/modules/monitoring/test_monit.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty.py b/tests/unit/plugins/modules/monitoring/test_pagerduty.py index 3c9c28a4d4..fdf09ce33f 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty.py +++ b/tests/unit/plugins/modules/monitoring/test_pagerduty.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py b/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py index e0951dcf7e..110e6f186a 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py +++ b/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py b/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py index 57b62a51ed..7699f4a74c 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py +++ b/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py @@ -1,4 +1,6 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)from __future__ import (absolute_import, division, print_function) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/monitoring/test_statsd.py b/tests/unit/plugins/modules/monitoring/test_statsd.py index 205080e754..8a065f1e6e 100644 --- a/tests/unit/plugins/modules/monitoring/test_statsd.py +++ b/tests/unit/plugins/modules/monitoring/test_statsd.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py index 74959efe0b..65fc99dd72 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2021 Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org_info.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org_info.py index 54922f4b75..f82b963220 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org_info.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org_info.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py index 114fe8a81a..a283652acf 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # (c) 2021 Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user_info.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user_info.py index b253dc27ec..266869884a 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user_info.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user_info.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2021, Florian Dambrine -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Florian Dambrine +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/net_tools/test_dnsimple.py b/tests/unit/plugins/modules/net_tools/test_dnsimple.py index b9dce3c215..60d890ceda 100644 --- a/tests/unit/plugins/modules/net_tools/test_dnsimple.py +++ b/tests/unit/plugins/modules/net_tools/test_dnsimple.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py b/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py index 158f38f352..b949c1d5d4 100644 --- a/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py +++ b/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index c87691b254..b59ee57aea 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -1,5 +1,6 @@ -# Copyright: (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2017 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/notification/test_discord.py b/tests/unit/plugins/modules/notification/test_discord.py index 257b0d4dab..d11b49a176 100644 --- a/tests/unit/plugins/modules/notification/test_discord.py +++ b/tests/unit/plugins/modules/notification/test_discord.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/notification/test_slack.py b/tests/unit/plugins/modules/notification/test_slack.py index 96082e0926..5c6c24ded4 100644 --- a/tests/unit/plugins/modules/notification/test_slack.py +++ b/tests/unit/plugins/modules/notification/test_slack.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/language/test_cpanm.py b/tests/unit/plugins/modules/packaging/language/test_cpanm.py index b89a07018f..af79101599 100644 --- a/tests/unit/plugins/modules/packaging/language/test_cpanm.py +++ b/tests/unit/plugins/modules/packaging/language/test_cpanm.py @@ -2,7 +2,8 @@ # Largely adapted from test_redhat_subscription by # Jiri Hnidek (jhnidek@redhat.com) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/language/test_gem.py b/tests/unit/plugins/modules/packaging/language/test_gem.py index 41f504f6c0..5e8abe7816 100644 --- a/tests/unit/plugins/modules/packaging/language/test_gem.py +++ b/tests/unit/plugins/modules/packaging/language/test_gem.py @@ -1,5 +1,6 @@ # Copyright (c) 2018 Antoine Catton -# MIT License (see licenses/MIT-license.txt or https://opensource.org/licenses/MIT) +# MIT License (see LICENSES/MIT.txt or https://opensource.org/licenses/MIT) +# SPDX-License-Identifier: MIT from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/language/test_maven_artifact.py b/tests/unit/plugins/modules/packaging/language/test_maven_artifact.py index 1cd7e243f6..262aee6e72 100644 --- a/tests/unit/plugins/modules/packaging/language/test_maven_artifact.py +++ b/tests/unit/plugins/modules/packaging/language/test_maven_artifact.py @@ -1,5 +1,6 @@ # Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/language/test_npm.py b/tests/unit/plugins/modules/packaging/language/test_npm.py index 6e30a5d41d..e9a8d486fa 100644 --- a/tests/unit/plugins/modules/packaging/language/test_npm.py +++ b/tests/unit/plugins/modules/packaging/language/test_npm.py @@ -1,6 +1,7 @@ # -# Copyright: (c) 2021, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/conftest.py b/tests/unit/plugins/modules/packaging/os/conftest.py index 408a023762..9213ad7e62 100644 --- a/tests/unit/plugins/modules/packaging/os/conftest.py +++ b/tests/unit/plugins/modules/packaging/os/conftest.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_apk.py b/tests/unit/plugins/modules/packaging/os/test_apk.py index 9577e892ee..3525f66e80 100644 --- a/tests/unit/plugins/modules/packaging/os/test_apk.py +++ b/tests/unit/plugins/modules/packaging/os/test_apk.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_homebrew.py b/tests/unit/plugins/modules/packaging/os/test_homebrew.py index c2297fd47d..dee1bd5b3b 100644 --- a/tests/unit/plugins/modules/packaging/os/test_homebrew.py +++ b/tests/unit/plugins/modules/packaging/os/test_homebrew.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py b/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py index 57cf225a94..1e5a8533ba 100644 --- a/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py +++ b/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/modules/packaging/os/test_macports.py b/tests/unit/plugins/modules/packaging/os/test_macports.py index ef7c522f0f..6d32644fe8 100644 --- a/tests/unit/plugins/modules/packaging/os/test_macports.py +++ b/tests/unit/plugins/modules/packaging/os/test_macports.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman.py b/tests/unit/plugins/modules/packaging/os/test_pacman.py index ae2da6a48f..83283c1d1f 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman.py +++ b/tests/unit/plugins/modules/packaging/os/test_pacman.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman_key.py b/tests/unit/plugins/modules/packaging/os/test_pacman_key.py index 757fee4e87..fc41e8f86e 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman_key.py +++ b/tests/unit/plugins/modules/packaging/os/test_pacman_key.py @@ -1,5 +1,6 @@ -# Copyright: (c) 2019, George Rawlinson -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, George Rawlinson +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_pkgin.py b/tests/unit/plugins/modules/packaging/os/test_pkgin.py index a53cfd493b..c17418f0de 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pkgin.py +++ b/tests/unit/plugins/modules/packaging/os/test_pkgin.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py index 8eb7ead674..11a0ca7cfe 100644 --- a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Author: Jiri Hnidek (jhnidek@redhat.com) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py b/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py index 548deaabcc..bda110c74c 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017 Pierre-Louis Bonicoli -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py index 9dde4bae7d..40e906db17 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py b/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py index 98db6e2840..f83197f66c 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py @@ -1,5 +1,6 @@ # (c) 2018, Sean Myers -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/os/test_rpm_ostree_pkg.py b/tests/unit/plugins/modules/packaging/os/test_rpm_ostree_pkg.py index 537a50d980..3f3dd5e017 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rpm_ostree_pkg.py +++ b/tests/unit/plugins/modules/packaging/os/test_rpm_ostree_pkg.py @@ -1,6 +1,7 @@ # -# Copyright: (c) 2021, Abhijeet Kasurde -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2021, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py index 7ee7ee2c18..39ed699e9f 100644 --- a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py index ab1333de9d..6577550179 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py +++ b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py index 7b009ef27b..e5beab9614 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py +++ b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/conftest.py b/tests/unit/plugins/modules/remote_management/oneview/conftest.py index 740c71740a..f86543d7cb 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/conftest.py +++ b/tests/unit/plugins/modules/remote_management/oneview/conftest.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py b/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py index ec0e85070a..a41066c6b0 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py +++ b/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py b/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py index 3b41cee1b5..e4c9c98166 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py +++ b/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py index d694d4a306..6226513595 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py index 493b83ed5e..2f59916d71 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py index d2d11cb42b..f1398740ee 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py index bc25a030b1..4a2813e2f8 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py index 04bb42ba42..6def80fc43 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py index 6096aff756..236ce136ad 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py index af00803fc6..224e5471e9 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py index 7dd7309d9f..a83a7e1513 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py index be7d9662ad..f8b3101c62 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py index dc16031f31..b1f0d24725 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py index b410606465..f801cd102a 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py index dd0a5cf4f9..13cd0400a4 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py index 82c265700b..d675c3b353 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py index df011b701f..be1f243161 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py @@ -1,5 +1,6 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py index 38c067385d..53e59ebd74 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py index 35b788bedc..63d3537c2c 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py index f92ec8e16d..6b2a6a13f0 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py index 50dda90258..ef2773e79c 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py index 199ec0b96a..b1d78895e5 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py index df085fb237..a8c832ee36 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/gitlab.py b/tests/unit/plugins/modules/source_control/gitlab/gitlab.py index 5c39c9afaf..13fc35f899 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/gitlab.py +++ b/tests/unit/plugins/modules/source_control/gitlab/gitlab.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_deploy_key.py b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_deploy_key.py index 194790cbb7..c0e91dbaf9 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_deploy_key.py +++ b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_deploy_key.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_group.py b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_group.py index 1b07f80510..2dc341d7a7 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_group.py +++ b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_group.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_hook.py b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_hook.py index 8d38317126..e3bf124b1a 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_hook.py +++ b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_hook.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_project.py b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_project.py index 898bd38b11..c462f5d2cd 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_project.py +++ b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_project.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_protected_branch.py b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_protected_branch.py index 65a29c61ce..16222a8f33 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_protected_branch.py +++ b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_protected_branch.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_runner.py b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_runner.py index d86e27493d..efccaa6b47 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_runner.py +++ b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_runner.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_user.py b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_user.py index 8e439befda..0d7e184bf0 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_user.py +++ b/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_user.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/storage/hpe3par/test_ss_3par_cpg.py b/tests/unit/plugins/modules/storage/hpe3par/test_ss_3par_cpg.py index 8e32e150c7..791ba6aa7b 100644 --- a/tests/unit/plugins/modules/storage/hpe3par/test_ss_3par_cpg.py +++ b/tests/unit/plugins/modules/storage/hpe3par/test_ss_3par_cpg.py @@ -1,5 +1,6 @@ -# Copyright: (c) 2018, Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Copyright (c) 2018, Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/storage/pmem/test_pmem.py b/tests/unit/plugins/modules/storage/pmem/test_pmem.py index b3d072080b..d01b8fb309 100644 --- a/tests/unit/plugins/modules/storage/pmem/test_pmem.py +++ b/tests/unit/plugins/modules/storage/pmem/test_pmem.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022, Masayoshi Mizuma -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py index fd2ee9d7c9..4f76da9ce8 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py @@ -2,7 +2,8 @@ # # This file is part of Ansible # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_gconftool2_info.py b/tests/unit/plugins/modules/system/test_gconftool2_info.py index 29ccf5f090..e94b62dc25 100644 --- a/tests/unit/plugins/modules/system/test_gconftool2_info.py +++ b/tests/unit/plugins/modules/system/test_gconftool2_info.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Author: Alexei Znamensky (russoz@gmail.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_java_keystore.py b/tests/unit/plugins/modules/system/test_java_keystore.py index 7d078ac0f9..7ebc8e20e4 100644 --- a/tests/unit/plugins/modules/system/test_java_keystore.py +++ b/tests/unit/plugins/modules/system/test_java_keystore.py @@ -3,7 +3,8 @@ # Copyright (c) 2018, Ansible Project # Copyright (c) 2018, Abhijeet Kasurde # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_modprobe.py b/tests/unit/plugins/modules/system/test_modprobe.py index 6f2c6b3d19..37ff737b82 100644 --- a/tests/unit/plugins/modules/system/test_modprobe.py +++ b/tests/unit/plugins/modules/system/test_modprobe.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_pamd.py b/tests/unit/plugins/modules/system/test_pamd.py index 19c9d7352a..810a038afa 100644 --- a/tests/unit/plugins/modules/system/test_pamd.py +++ b/tests/unit/plugins/modules/system/test_pamd.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_parted.py b/tests/unit/plugins/modules/system/test_parted.py index 18faf6a6ab..bec024f110 100644 --- a/tests/unit/plugins/modules/system/test_parted.py +++ b/tests/unit/plugins/modules/system/test_parted.py @@ -1,5 +1,6 @@ # (c) 2017 Red Hat Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_sap_task_list_execute.py b/tests/unit/plugins/modules/system/test_sap_task_list_execute.py index 9d2299cacb..63c341c6da 100644 --- a/tests/unit/plugins/modules/system/test_sap_task_list_execute.py +++ b/tests/unit/plugins/modules/system/test_sap_task_list_execute.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_solaris_zone.py b/tests/unit/plugins/modules/system/test_solaris_zone.py index 4cf5c5ff7a..f8be6fc47a 100644 --- a/tests/unit/plugins/modules/system/test_solaris_zone.py +++ b/tests/unit/plugins/modules/system/test_solaris_zone.py @@ -1,5 +1,6 @@ # Copyright (c) 2020 Justin Bronn -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_sysupgrade.py b/tests/unit/plugins/modules/system/test_sysupgrade.py index 1ea8bf208c..e2b75b2ea6 100644 --- a/tests/unit/plugins/modules/system/test_sysupgrade.py +++ b/tests/unit/plugins/modules/system/test_sysupgrade.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_ufw.py b/tests/unit/plugins/modules/system/test_ufw.py index a522ba98a8..f7b1ec0da5 100644 --- a/tests/unit/plugins/modules/system/test_ufw.py +++ b/tests/unit/plugins/modules/system/test_ufw.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/system/test_xfconf.py index d97ce85e49..653cb13664 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/system/test_xfconf.py @@ -3,7 +3,8 @@ # Largely adapted from test_redhat_subscription by # Jiri Hnidek (jhnidek@redhat.com) # -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/system/test_xfconf_info.py b/tests/unit/plugins/modules/system/test_xfconf_info.py index 5eb68003fe..4d6d626f65 100644 --- a/tests/unit/plugins/modules/system/test_xfconf_info.py +++ b/tests/unit/plugins/modules/system/test_xfconf_info.py @@ -1,5 +1,6 @@ # Author: Alexei Znamensky (russoz@gmail.com) -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/utils.py b/tests/unit/plugins/modules/utils.py index 6a00fd25fc..9691976357 100644 --- a/tests/unit/plugins/modules/utils.py +++ b/tests/unit/plugins/modules/utils.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py b/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py index db3f04ddf8..67401c5b16 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py +++ b/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py index 687ef0f766..f8716b3c8a 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py +++ b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py index b928ad824c..bdacd2bc57 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py +++ b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py @@ -1,4 +1,5 @@ -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type From 8f376384802b69a3df6e9ff79cdab8e179f7f159 Mon Sep 17 00:00:00 2001 From: Maxwell G <9920591+gotmax23@users.noreply.github.com> Date: Fri, 5 Aug 2022 12:35:24 +0200 Subject: [PATCH 0150/2104] aix_filesystem: Fix examples (#5067) `community.general.filesystem` is not a valid argument to aix_filesystem. --- plugins/modules/system/aix_filesystem.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/modules/system/aix_filesystem.py b/plugins/modules/system/aix_filesystem.py index d5842cb3e2..de682ca333 100644 --- a/plugins/modules/system/aix_filesystem.py +++ b/plugins/modules/system/aix_filesystem.py @@ -106,55 +106,55 @@ EXAMPLES = r''' - name: Create filesystem in a previously defined logical volume. community.general.aix_filesystem: device: testlv - community.general.filesystem: /testfs + filesystem: /testfs state: present - name: Creating NFS filesystem from nfshost. community.general.aix_filesystem: device: /home/ftp nfs_server: nfshost - community.general.filesystem: /home/ftp + filesystem: /home/ftp state: present - name: Creating a new file system without a previously logical volume. community.general.aix_filesystem: - community.general.filesystem: /newfs + filesystem: /newfs size: 1G state: present vg: datavg - name: Unmounting /testfs. community.general.aix_filesystem: - community.general.filesystem: /testfs + filesystem: /testfs state: unmounted - name: Resizing /mksysb to +512M. community.general.aix_filesystem: - community.general.filesystem: /mksysb + filesystem: /mksysb size: +512M state: present - name: Resizing /mksysb to 11G. community.general.aix_filesystem: - community.general.filesystem: /mksysb + filesystem: /mksysb size: 11G state: present - name: Resizing /mksysb to -2G. community.general.aix_filesystem: - community.general.filesystem: /mksysb + filesystem: /mksysb size: -2G state: present - name: Remove NFS filesystem /home/ftp. community.general.aix_filesystem: - community.general.filesystem: /home/ftp + filesystem: /home/ftp rm_mount_point: yes state: absent - name: Remove /newfs. community.general.aix_filesystem: - community.general.filesystem: /newfs + filesystem: /newfs rm_mount_point: yes state: absent ''' From 1ab2a5f1bcf32596a27901a25322880c3ea6260b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 5 Aug 2022 14:03:38 +0200 Subject: [PATCH 0151/2104] Add default license header to files which have no copyright or license header yet (#5074) * Add default license header to files which have no copyright or license header yet. * yml extension should have been xml... --- .azure-pipelines/azure-pipelines.yml | 5 +++++ .azure-pipelines/scripts/aggregate-coverage.sh | 4 ++++ .azure-pipelines/scripts/combine-coverage.py | 4 ++++ .azure-pipelines/scripts/process-results.sh | 4 ++++ .azure-pipelines/scripts/publish-codecov.py | 4 ++++ .azure-pipelines/scripts/report-coverage.sh | 4 ++++ .azure-pipelines/scripts/run-tests.sh | 4 ++++ .azure-pipelines/scripts/time-command.py | 4 ++++ .azure-pipelines/templates/coverage.yml | 5 +++++ .azure-pipelines/templates/matrix.yml | 5 +++++ .azure-pipelines/templates/test.yml | 5 +++++ .github/BOTMETA.yml | 5 +++++ .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++++ .github/ISSUE_TEMPLATE/config.yml | 4 ++++ .github/ISSUE_TEMPLATE/documentation_report.yml | 4 ++++ .github/ISSUE_TEMPLATE/feature_request.yml | 4 ++++ .github/dependabot.yml | 4 ++++ .github/patchback.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 5 +++++ .github/workflows/docs-pr.yml | 5 +++++ .pre-commit-config.yaml | 4 ++++ changelogs/config.yaml | 5 +++++ docs/docsite/extra-docs.yml | 4 ++++ docs/docsite/helper/lists_mergeby/default-common.yml | 5 +++++ .../helper/lists_mergeby/default-recursive-true.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-001.yml | 4 ++++ .../helper/lists_mergeby/example-001_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-002.yml | 4 ++++ .../helper/lists_mergeby/example-002_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-003.yml | 4 ++++ .../helper/lists_mergeby/example-003_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-004.yml | 4 ++++ .../helper/lists_mergeby/example-004_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-005.yml | 4 ++++ .../helper/lists_mergeby/example-005_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-006.yml | 4 ++++ .../helper/lists_mergeby/example-006_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-007.yml | 4 ++++ .../helper/lists_mergeby/example-007_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/example-008.yml | 4 ++++ .../helper/lists_mergeby/example-008_vars/list3.yml | 5 +++++ docs/docsite/helper/lists_mergeby/examples.yml | 4 ++++ docs/docsite/helper/lists_mergeby/playbook.yml | 3 +++ docs/docsite/links.yml | 4 ++++ galaxy.yml | 5 +++++ meta/runtime.yml | 4 ++++ plugins/filter/hashids_decode.yml | 5 +++++ plugins/filter/hashids_encode.yml | 5 +++++ plugins/filter/to_days.yml | 5 +++++ plugins/filter/to_hours.yml | 5 +++++ plugins/filter/to_milliseconds.yml | 5 +++++ plugins/filter/to_minutes.yml | 5 +++++ plugins/filter/to_months.yml | 5 +++++ plugins/filter/to_seconds.yml | 5 +++++ plugins/filter/to_time_unit.yml | 5 +++++ plugins/filter/to_weeks.yml | 5 +++++ plugins/filter/to_years.yml | 5 +++++ tests/config.yml | 4 ++++ tests/integration/targets/__init__.py | 0 tests/integration/targets/aix_devices/aliases | 4 ++++ tests/integration/targets/aix_filesystem/aliases | 4 ++++ tests/integration/targets/alerta_customer/aliases | 4 ++++ .../integration/targets/alerta_customer/defaults/main.yml | 5 +++++ tests/integration/targets/alternatives/aliases | 4 ++++ .../targets/alternatives/tasks/path_is_checked.yml | 5 +++++ .../targets/alternatives/tasks/remove_links.yml | 5 +++++ tests/integration/targets/alternatives/tasks/setup.yml | 5 +++++ .../integration/targets/alternatives/tasks/setup_test.yml | 5 +++++ .../targets/alternatives/tasks/subcommands.yml | 5 +++++ tests/integration/targets/alternatives/tasks/test.yml | 5 +++++ tests/integration/targets/alternatives/tasks/tests.yml | 5 +++++ .../targets/alternatives/tasks/tests_set_priority.yml | 5 +++++ .../targets/alternatives/tasks/tests_state.yml | 5 +++++ tests/integration/targets/alternatives/vars/Debian.yml | 4 ++++ tests/integration/targets/alternatives/vars/Suse-42.3.yml | 4 ++++ tests/integration/targets/alternatives/vars/default.yml | 4 ++++ tests/integration/targets/ansible_galaxy_install/aliases | 4 ++++ .../targets/ansible_galaxy_install/files/test.yml | 4 ++++ .../targets/ansible_galaxy_install/meta/main.yml | 5 +++++ .../targets/ansible_galaxy_install/tasks/main.yml | 4 ++++ tests/integration/targets/apache2_module/aliases | 4 ++++ tests/integration/targets/archive/aliases | 4 ++++ tests/integration/targets/archive/meta/main.yml | 5 +++++ tests/integration/targets/archive/tests/broken-link.yml | 4 ++++ tests/integration/targets/archive/tests/exclusions.yml | 4 ++++ tests/integration/targets/archive/tests/idempotency.yml | 4 ++++ tests/integration/targets/archive/tests/remove.yml | 4 ++++ tests/integration/targets/callback/inventory.yml | 4 ++++ tests/integration/targets/callback_diy/aliases | 4 ++++ tests/integration/targets/callback_log_plays/aliases | 4 ++++ tests/integration/targets/callback_log_plays/ping_log.yml | 5 +++++ tests/integration/targets/callback_log_plays/runme.sh | 3 +++ tests/integration/targets/callback_yaml/aliases | 4 ++++ tests/integration/targets/cargo/aliases | 4 ++++ tests/integration/targets/cargo/meta/main.yml | 4 ++++ tests/integration/targets/cargo/tasks/main.yml | 5 +++++ tests/integration/targets/cargo/tasks/setup.yml | 4 ++++ tests/integration/targets/cargo/tasks/test_general.yml | 4 ++++ tests/integration/targets/cargo/tasks/test_version.yml | 4 ++++ tests/integration/targets/cloud_init_data_facts/aliases | 4 ++++ .../targets/cloud_init_data_facts/meta/main.yml | 5 +++++ tests/integration/targets/cmd_runner/aliases | 4 ++++ .../targets/cmd_runner/tasks/test_cmd_echo.yml | 4 ++++ tests/integration/targets/connection/aliases | 4 ++++ tests/integration/targets/connection/test.sh | 3 +++ tests/integration/targets/connection/test_connection.yml | 5 +++++ tests/integration/targets/connection_chroot/aliases | 4 ++++ tests/integration/targets/connection_jail/aliases | 4 ++++ tests/integration/targets/connection_lxc/aliases | 4 ++++ tests/integration/targets/connection_lxd/aliases | 4 ++++ tests/integration/targets/connection_posix/aliases | 4 ++++ tests/integration/targets/connection_posix/test.sh | 3 +++ tests/integration/targets/consul/aliases | 4 ++++ tests/integration/targets/consul/meta/main.yml | 4 ++++ tests/integration/targets/consul/tasks/consul_session.yml | 5 +++++ tests/integration/targets/copr/aliases | 4 ++++ tests/integration/targets/copr/tasks/main.yml | 4 ++++ tests/integration/targets/cpanm/aliases | 4 ++++ tests/integration/targets/cpanm/meta/main.yml | 5 +++++ tests/integration/targets/cronvar/aliases | 4 ++++ tests/integration/targets/cronvar/defaults/main.yml | 5 +++++ tests/integration/targets/cronvar/meta/main.yml | 5 +++++ tests/integration/targets/deploy_helper/aliases | 4 ++++ tests/integration/targets/deploy_helper/meta/main.yml | 5 +++++ tests/integration/targets/discord/aliases | 4 ++++ tests/integration/targets/discord/defaults/main.yml | 5 +++++ tests/integration/targets/django_manage/aliases | 4 ++++ .../single_app_project/core/settings.py | 4 ++++ .../1045-single-app-project/single_app_project/manage.py | 3 +++ .../files/base_test/simple_project/p1/manage.py | 3 +++ .../files/base_test/simple_project/p1/p1/__init__.py | 0 .../files/base_test/simple_project/p1/p1/settings.py | 4 ++++ .../files/base_test/simple_project/p1/p1/urls.py | 4 ++++ tests/integration/targets/django_manage/meta/main.yml | 4 ++++ tests/integration/targets/dnf_versionlock/aliases | 4 ++++ .../integration/targets/dnf_versionlock/tasks/install.yml | 4 ++++ .../targets/dnf_versionlock/tasks/lock_bash.yml | 4 ++++ .../targets/dnf_versionlock/tasks/lock_updates.yml | 4 ++++ tests/integration/targets/dnf_versionlock/tasks/main.yml | 4 ++++ tests/integration/targets/dpkg_divert/aliases | 4 ++++ tests/integration/targets/dpkg_divert/tasks/prepare.yml | 4 ++++ .../targets/dpkg_divert/tasks/tests/01-basic.yml | 4 ++++ .../targets/dpkg_divert/tasks/tests/02-rename.yml | 4 ++++ tests/integration/targets/etcd3/aliases | 4 ++++ tests/integration/targets/etcd3/meta/main.yml | 5 +++++ tests/integration/targets/filesize/aliases | 4 ++++ tests/integration/targets/filesize/defaults/main.yml | 4 ++++ tests/integration/targets/filesize/tasks/basics.yml | 4 ++++ tests/integration/targets/filesize/tasks/errors.yml | 4 ++++ tests/integration/targets/filesize/tasks/floats.yml | 4 ++++ tests/integration/targets/filesize/tasks/sparse.yml | 4 ++++ tests/integration/targets/filesize/tasks/symlinks.yml | 4 ++++ tests/integration/targets/filesystem/aliases | 4 ++++ tests/integration/targets/filesystem/defaults/main.yml | 4 ++++ tests/integration/targets/filesystem/meta/main.yml | 4 ++++ .../targets/filesystem/tasks/create_device.yml | 4 ++++ tests/integration/targets/filesystem/tasks/create_fs.yml | 4 ++++ .../targets/filesystem/tasks/freebsd_setup.yml | 4 ++++ .../targets/filesystem/tasks/overwrite_another_fs.yml | 4 ++++ tests/integration/targets/filesystem/tasks/remove_fs.yml | 4 ++++ tests/integration/targets/filesystem/tasks/setup.yml | 4 ++++ .../integration/targets/filesystem/vars/Ubuntu-14.04.yml | 4 ++++ tests/integration/targets/filesystem/vars/default.yml | 4 ++++ tests/integration/targets/filter_counter/aliases | 4 ++++ tests/integration/targets/filter_dict/aliases | 4 ++++ tests/integration/targets/filter_dict/tasks/main.yml | 4 ++++ tests/integration/targets/filter_dict_kv/aliases | 4 ++++ tests/integration/targets/filter_from_csv/aliases | 4 ++++ tests/integration/targets/filter_from_csv/vars/main.yml | 5 +++++ tests/integration/targets/filter_groupby_as_dict/aliases | 4 ++++ .../targets/filter_groupby_as_dict/tasks/main.yml | 4 ++++ .../targets/filter_groupby_as_dict/vars/main.yml | 4 ++++ tests/integration/targets/filter_hashids/aliases | 4 ++++ tests/integration/targets/filter_hashids/runme.sh | 3 +++ tests/integration/targets/filter_hashids/runme.yml | 5 +++++ tests/integration/targets/filter_hashids/vars/main.yml | 5 +++++ tests/integration/targets/filter_jc/aliases | 4 ++++ tests/integration/targets/filter_jc/runme.sh | 3 +++ tests/integration/targets/filter_jc/runme.yml | 5 +++++ tests/integration/targets/filter_json_query/aliases | 4 ++++ tests/integration/targets/filter_json_query/runme.sh | 3 +++ tests/integration/targets/filter_json_query/runme.yml | 5 +++++ tests/integration/targets/filter_json_query/vars/main.yml | 5 +++++ tests/integration/targets/filter_lists_mergeby/aliases | 4 ++++ .../filter_lists_mergeby/tasks/lists_mergeby_2-10.yml | 3 +++ .../filter_lists_mergeby/tasks/lists_mergeby_default.yml | 3 +++ .../targets/filter_lists_mergeby/tasks/main.yml | 4 ++++ .../targets/filter_lists_mergeby/vars/main.yml | 4 ++++ tests/integration/targets/filter_path_join_shim/aliases | 4 ++++ .../targets/filter_path_join_shim/tasks/main.yml | 4 ++++ tests/integration/targets/filter_random_mac/aliases | 4 ++++ tests/integration/targets/filter_random_mac/meta/main.yml | 5 +++++ tests/integration/targets/filter_time/aliases | 4 ++++ .../integration/targets/filter_unicode_normalize/aliases | 4 ++++ .../targets/filter_unicode_normalize/vars/main.yml | 5 +++++ tests/integration/targets/filter_version_sort/aliases | 4 ++++ tests/integration/targets/flatpak/aliases | 4 ++++ tests/integration/targets/flatpak/files/serve.py | 4 ++++ tests/integration/targets/flatpak/meta/main.yml | 5 +++++ tests/integration/targets/flatpak/tasks/check_mode.yml | 5 +++++ tests/integration/targets/flatpak/tasks/setup.yml | 5 +++++ tests/integration/targets/flatpak/tasks/test.yml | 5 +++++ tests/integration/targets/flatpak_remote/aliases | 4 ++++ tests/integration/targets/flatpak_remote/meta/main.yml | 5 +++++ .../targets/flatpak_remote/tasks/check_mode.yml | 5 +++++ tests/integration/targets/flatpak_remote/tasks/setup.yml | 5 +++++ tests/integration/targets/flatpak_remote/tasks/test.yml | 5 +++++ tests/integration/targets/gandi_livedns/aliases | 4 ++++ tests/integration/targets/gandi_livedns/defaults/main.yml | 4 +++- .../targets/gandi_livedns/tasks/create_record.yml | 3 ++- tests/integration/targets/gandi_livedns/tasks/main.yml | 3 ++- tests/integration/targets/gandi_livedns/tasks/record.yml | 3 ++- .../targets/gandi_livedns/tasks/remove_record.yml | 3 ++- .../targets/gandi_livedns/tasks/update_record.yml | 3 ++- tests/integration/targets/gem/aliases | 4 ++++ tests/integration/targets/gem/meta/main.yml | 5 +++++ tests/integration/targets/gem/vars/FreeBSD.yml | 5 +++++ tests/integration/targets/gem/vars/RedHat.yml | 5 +++++ tests/integration/targets/gem/vars/default.yml | 5 +++++ tests/integration/targets/git_config/aliases | 4 ++++ tests/integration/targets/git_config/meta/main.yml | 5 +++++ .../targets/git_config/tasks/exclusion_state_list-all.yml | 4 ++++ .../targets/git_config/tasks/get_set_no_state.yml | 4 ++++ .../targets/git_config/tasks/get_set_state_present.yml | 4 ++++ .../git_config/tasks/get_set_state_present_file.yml | 4 ++++ .../tasks/precedence_between_unset_and_value.yml | 4 ++++ .../targets/git_config/tasks/set_value_with_tilde.yml | 4 ++++ tests/integration/targets/git_config/tasks/setup.yml | 4 ++++ .../targets/git_config/tasks/setup_no_value.yml | 4 ++++ .../integration/targets/git_config/tasks/setup_value.yml | 4 ++++ .../targets/git_config/tasks/unset_check_mode.yml | 4 ++++ .../targets/git_config/tasks/unset_no_value.yml | 4 ++++ .../integration/targets/git_config/tasks/unset_value.yml | 4 ++++ tests/integration/targets/git_config/vars/main.yml | 4 ++++ tests/integration/targets/github_issue/aliases | 4 ++++ tests/integration/targets/github_issue/vars/main.yml | 3 +++ tests/integration/targets/gitlab_branch/aliases | 4 ++++ tests/integration/targets/gitlab_branch/defaults/main.yml | 5 +++++ tests/integration/targets/gitlab_deploy_key/aliases | 4 ++++ .../targets/gitlab_deploy_key/defaults/main.yml | 5 +++++ tests/integration/targets/gitlab_group/aliases | 4 ++++ tests/integration/targets/gitlab_group/defaults/main.yml | 5 +++++ tests/integration/targets/gitlab_group_members/aliases | 4 ++++ .../targets/gitlab_group_members/vars/main.yml | 5 +++++ tests/integration/targets/gitlab_group_variable/aliases | 4 ++++ tests/integration/targets/gitlab_hook/aliases | 4 ++++ tests/integration/targets/gitlab_hook/defaults/main.yml | 5 +++++ tests/integration/targets/gitlab_project/aliases | 4 ++++ .../integration/targets/gitlab_project/defaults/main.yml | 5 +++++ tests/integration/targets/gitlab_project_members/aliases | 4 ++++ .../targets/gitlab_project_members/defaults/main.yml | 5 +++++ tests/integration/targets/gitlab_project_variable/aliases | 4 ++++ tests/integration/targets/gitlab_runner/aliases | 4 ++++ tests/integration/targets/gitlab_runner/defaults/main.yml | 5 +++++ tests/integration/targets/gitlab_user/aliases | 4 ++++ tests/integration/targets/gitlab_user/defaults/main.yml | 5 +++++ tests/integration/targets/hg/aliases | 4 ++++ tests/integration/targets/hg/meta/main.yml | 5 +++++ tests/integration/targets/hg/tasks/install.yml | 5 +++++ tests/integration/targets/hg/tasks/uninstall.yml | 5 +++++ tests/integration/targets/homebrew/aliases | 4 ++++ tests/integration/targets/homebrew/tasks/main.yml | 3 ++- tests/integration/targets/homebrew_cask/aliases | 4 ++++ tests/integration/targets/homebrew_cask/defaults/main.yml | 5 +++++ tests/integration/targets/homebrew_cask/tasks/main.yml | 3 ++- tests/integration/targets/homectl/aliases | 4 ++++ tests/integration/targets/homectl/tasks/main.yml | 5 +++++ tests/integration/targets/hwc_ecs_instance/aliases | 4 ++++ tests/integration/targets/hwc_evs_disk/aliases | 4 ++++ tests/integration/targets/hwc_network_vpc/aliases | 4 ++++ tests/integration/targets/hwc_smn_topic/aliases | 4 ++++ tests/integration/targets/hwc_vpc_eip/aliases | 4 ++++ tests/integration/targets/hwc_vpc_peering_connect/aliases | 4 ++++ tests/integration/targets/hwc_vpc_port/aliases | 4 ++++ tests/integration/targets/hwc_vpc_private_ip/aliases | 4 ++++ tests/integration/targets/hwc_vpc_route/aliases | 4 ++++ tests/integration/targets/hwc_vpc_security_group/aliases | 4 ++++ .../targets/hwc_vpc_security_group_rule/aliases | 4 ++++ tests/integration/targets/hwc_vpc_subnet/aliases | 4 ++++ tests/integration/targets/ilo_redfish_config/aliases | 4 ++++ .../integration/targets/ilo_redfish_config/tasks/main.yml | 5 +++++ tests/integration/targets/ilo_redfish_info/aliases | 4 ++++ tests/integration/targets/ilo_redfish_info/tasks/main.yml | 5 +++++ tests/integration/targets/influxdb_user/aliases | 4 ++++ tests/integration/targets/influxdb_user/meta/main.yml | 5 +++++ tests/integration/targets/influxdb_user/tasks/tests.yml | 3 +++ tests/integration/targets/ini_file/aliases | 4 ++++ tests/integration/targets/ini_file/meta/main.yml | 5 +++++ .../integration/targets/ini_file/tasks/tests/00-basic.yml | 4 ++++ .../integration/targets/ini_file/tasks/tests/01-value.yml | 3 +++ .../targets/ini_file/tasks/tests/02-values.yml | 3 +++ .../targets/ini_file/tasks/tests/03-encoding.yml | 3 +++ tests/integration/targets/interfaces_file/aliases | 4 ++++ tests/integration/targets/interfaces_file/meta/main.yml | 5 +++++ tests/integration/targets/interfaces_file/tasks/main.yml | 4 ++++ tests/integration/targets/ipify_facts/aliases | 4 ++++ tests/integration/targets/ipify_facts/vars/main.yml | 4 ++++ tests/integration/targets/iptables_state/aliases | 4 ++++ tests/integration/targets/iptables_state/meta/main.yml | 5 +++++ .../targets/iptables_state/tasks/tests/00-basic.yml | 4 ++++ .../targets/iptables_state/tasks/tests/01-tables.yml | 4 ++++ .../targets/iptables_state/tasks/tests/10-rollback.yml | 4 ++++ tests/integration/targets/ipwcli_dns/aliases | 4 ++++ tests/integration/targets/iso_create/aliases | 4 ++++ tests/integration/targets/iso_create/meta/main.yml | 5 +++++ tests/integration/targets/iso_extract/aliases | 4 ++++ tests/integration/targets/iso_extract/meta/main.yml | 5 +++++ tests/integration/targets/iso_extract/vars/Alpine.yml | 5 +++++ tests/integration/targets/iso_extract/vars/Archlinux.yml | 5 +++++ tests/integration/targets/iso_extract/vars/Debian.yml | 5 +++++ tests/integration/targets/iso_extract/vars/FreeBSD.yml | 5 +++++ tests/integration/targets/iso_extract/vars/RedHat.yml | 5 +++++ tests/integration/targets/iso_extract/vars/Suse.yml | 5 +++++ tests/integration/targets/iso_extract/vars/Ubuntu.yml | 5 +++++ tests/integration/targets/iso_extract/vars/default.yml | 4 ++++ tests/integration/targets/java_cert/aliases | 4 ++++ tests/integration/targets/java_cert/defaults/main.yml | 4 ++++ .../integration/targets/java_cert/files/setupSSLServer.py | 4 ++++ tests/integration/targets/java_cert/meta/main.yml | 5 +++++ .../integration/targets/java_cert/tasks/state_change.yml | 4 ++++ tests/integration/targets/java_keystore/aliases | 4 ++++ tests/integration/targets/java_keystore/defaults/main.yml | 4 ++++ tests/integration/targets/java_keystore/meta/main.yml | 5 +++++ tests/integration/targets/java_keystore/tasks/prepare.yml | 4 ++++ tests/integration/targets/java_keystore/tasks/tests.yml | 4 ++++ tests/integration/targets/jboss/aliases | 4 ++++ tests/integration/targets/jboss/meta/main.yml | 4 ++++ tests/integration/targets/jira/aliases | 4 ++++ tests/integration/targets/jira/tasks/main.yml | 4 ++++ tests/integration/targets/jira/vars/main.yml | 4 ++++ tests/integration/targets/kernel_blacklist/aliases | 4 ++++ tests/integration/targets/kernel_blacklist/meta/main.yml | 5 +++++ tests/integration/targets/kernel_blacklist/tasks/main.yml | 4 ++++ .../targets/keycloak_client/docker-compose.yml | 5 +++++ tests/integration/targets/keycloak_client/tasks/main.yml | 4 ++++ tests/integration/targets/keycloak_client/vars/main.yml | 4 ++++ .../targets/keycloak_identity_provider/aliases | 4 ++++ .../targets/keycloak_identity_provider/tasks/main.yml | 4 ++++ .../targets/keycloak_identity_provider/vars/main.yml | 4 ++++ tests/integration/targets/keycloak_role/aliases | 4 ++++ tests/integration/targets/keycloak_role/tasks/main.yml | 4 ++++ tests/integration/targets/keycloak_role/vars/main.yml | 4 ++++ .../integration/targets/keycloak_user_federation/aliases | 4 ++++ .../targets/keycloak_user_federation/tasks/main.yml | 4 ++++ .../targets/keycloak_user_federation/vars/main.yml | 4 ++++ tests/integration/targets/keyring/aliases | 4 ++++ tests/integration/targets/keyring/tasks/main.yml | 4 ++++ tests/integration/targets/keyring/vars/main.yml | 4 ++++ tests/integration/targets/launchd/aliases | 4 ++++ .../targets/launchd/files/ansible_test_service.py | 3 +++ tests/integration/targets/launchd/tasks/setup.yml | 3 +++ tests/integration/targets/launchd/tasks/teardown.yml | 3 +++ tests/integration/targets/launchd/tasks/test.yml | 3 +++ .../targets/launchd/tasks/tests/test_reload.yml | 3 +++ .../targets/launchd/tasks/tests/test_restart.yml | 3 +++ .../targets/launchd/tasks/tests/test_runatload.yml | 4 ++++ .../targets/launchd/tasks/tests/test_start_stop.yml | 3 +++ .../targets/launchd/tasks/tests/test_unknown.yml | 3 +++ .../targets/launchd/tasks/tests/test_unload.yml | 3 +++ tests/integration/targets/launchd/vars/main.yml | 3 +++ tests/integration/targets/ldap_search/aliases | 4 ++++ tests/integration/targets/ldap_search/meta/main.yml | 4 ++++ tests/integration/targets/ldap_search/tasks/run-test.yml | 4 ++++ .../integration/targets/ldap_search/tasks/tests/basic.yml | 5 +++++ tests/integration/targets/listen_ports_facts/aliases | 4 ++++ .../integration/targets/listen_ports_facts/meta/main.yml | 4 ++++ tests/integration/targets/locale_gen/aliases | 4 ++++ tests/integration/targets/locale_gen/tasks/locale_gen.yml | 5 +++++ tests/integration/targets/lookup_cartesian/aliases | 4 ++++ .../integration/targets/lookup_collection_version/aliases | 4 ++++ .../ansible_collections/testns/testcoll/galaxy.yml | 5 +++++ .../ansible_collections/testns/testcoll_nv/galaxy.yml | 5 +++++ .../targets/lookup_collection_version/runme.sh | 3 +++ .../targets/lookup_collection_version/runme.yml | 5 +++++ tests/integration/targets/lookup_dependent/aliases | 4 ++++ tests/integration/targets/lookup_dependent/tasks/main.yml | 4 ++++ tests/integration/targets/lookup_etcd3/aliases | 4 ++++ tests/integration/targets/lookup_etcd3/defaults/main.yml | 3 +++ tests/integration/targets/lookup_etcd3/dependencies.yml | 4 ++++ tests/integration/targets/lookup_etcd3/meta/main.yml | 5 +++++ .../targets/lookup_etcd3/test_lookup_etcd3.yml | 4 ++++ tests/integration/targets/lookup_flattened/aliases | 4 ++++ tests/integration/targets/lookup_lmdb_kv/aliases | 4 ++++ tests/integration/targets/lookup_lmdb_kv/dependencies.yml | 4 ++++ tests/integration/targets/lookup_lmdb_kv/test.yml | 5 +++++ tests/integration/targets/lookup_lmdb_kv/test_db.py | 4 ++++ tests/integration/targets/lookup_passwordstore/aliases | 4 ++++ .../targets/lookup_passwordstore/meta/main.yml | 5 +++++ .../targets/lookup_passwordstore/tasks/package.yml | 5 +++++ .../targets/lookup_passwordstore/tasks/password_tests.yml | 5 +++++ .../targets/lookup_passwordstore/tasks/tests.yml | 5 +++++ .../targets/lookup_passwordstore/vars/Alpine.yml | 5 +++++ .../targets/lookup_passwordstore/vars/Archlinux.yml | 5 +++++ .../targets/lookup_passwordstore/vars/Debian.yml | 5 +++++ .../targets/lookup_passwordstore/vars/Fedora.yml | 5 +++++ .../targets/lookup_passwordstore/vars/FreeBSD.yml | 5 +++++ .../targets/lookup_passwordstore/vars/default.yml | 4 ++++ .../targets/lookup_passwordstore/vars/main.yml | 5 +++++ tests/integration/targets/lookup_random_pet/aliases | 4 ++++ .../targets/lookup_random_pet/dependencies.yml | 4 ++++ tests/integration/targets/lookup_random_pet/test.yml | 5 +++++ tests/integration/targets/lookup_random_string/aliases | 4 ++++ tests/integration/targets/lookup_random_string/test.yml | 5 +++++ tests/integration/targets/lookup_random_words/aliases | 4 ++++ .../targets/lookup_random_words/dependencies.yml | 4 ++++ tests/integration/targets/lookup_random_words/test.yml | 4 ++++ tests/integration/targets/lvg/aliases | 4 ++++ tests/integration/targets/lvg/meta/main.yml | 5 +++++ tests/integration/targets/lvg/tasks/setup.yml | 5 +++++ tests/integration/targets/lvg/tasks/teardown.yml | 5 +++++ tests/integration/targets/lvg/tasks/test_grow_reduce.yml | 5 +++++ tests/integration/targets/lvg/tasks/test_indempotency.yml | 5 +++++ tests/integration/targets/lvg/tasks/test_pvresize.yml | 5 +++++ tests/integration/targets/lxd_project/aliases | 4 ++++ tests/integration/targets/mail/aliases | 4 ++++ tests/integration/targets/mail/meta/main.yml | 5 +++++ tests/integration/targets/mas/aliases | 4 ++++ tests/integration/targets/mas/tasks/main.yml | 3 ++- tests/integration/targets/memset_dns_reload/aliases | 4 ++++ tests/integration/targets/memset_dns_reload/meta/main.yml | 5 ++++- tests/integration/targets/memset_memstore_info/aliases | 4 ++++ .../targets/memset_memstore_info/meta/main.yml | 5 ++++- tests/integration/targets/memset_server_info/aliases | 4 ++++ .../integration/targets/memset_server_info/meta/main.yml | 5 ++++- tests/integration/targets/memset_zone/aliases | 4 ++++ tests/integration/targets/memset_zone/meta/main.yml | 3 +++ tests/integration/targets/memset_zone/vars/main.yml | 4 ++++ tests/integration/targets/memset_zone_domain/aliases | 4 ++++ .../integration/targets/memset_zone_domain/meta/main.yml | 5 ++++- .../integration/targets/memset_zone_domain/vars/main.yml | 4 ++++ tests/integration/targets/memset_zone_record/aliases | 4 ++++ .../integration/targets/memset_zone_record/meta/main.yml | 3 +++ .../integration/targets/memset_zone_record/vars/main.yml | 4 ++++ tests/integration/targets/module_helper/aliases | 4 ++++ tests/integration/targets/monit/aliases | 4 ++++ tests/integration/targets/monit/defaults/main.yml | 5 +++++ tests/integration/targets/monit/meta/main.yml | 5 +++++ tests/integration/targets/monit/tasks/check_state.yml | 5 +++++ tests/integration/targets/monit/tasks/test.yml | 5 +++++ tests/integration/targets/monit/tasks/test_errors.yml | 5 +++++ .../targets/monit/tasks/test_reload_present.yml | 5 +++++ tests/integration/targets/monit/tasks/test_state.yml | 5 +++++ tests/integration/targets/monit/vars/Alpine.yml | 5 +++++ tests/integration/targets/monit/vars/Archlinux.yml | 5 +++++ tests/integration/targets/monit/vars/CentOS-6.yml | 5 +++++ tests/integration/targets/monit/vars/RedHat.yml | 5 +++++ tests/integration/targets/monit/vars/Suse.yml | 5 +++++ tests/integration/targets/monit/vars/defaults.yml | 5 +++++ tests/integration/targets/mqtt/aliases | 4 ++++ tests/integration/targets/mqtt/meta/main.yml | 5 +++++ tests/integration/targets/mqtt/tasks/ubuntu.yml | 5 +++++ tests/integration/targets/mssql_script/aliases | 4 ++++ tests/integration/targets/mssql_script/defaults/main.yml | 5 +++++ tests/integration/targets/nomad/aliases | 4 ++++ tests/integration/targets/nomad/meta/main.yml | 4 ++++ tests/integration/targets/nomad/tasks/main.yml | 5 +++++ tests/integration/targets/nomad/tasks/nomad_job.yml | 3 +++ tests/integration/targets/npm/aliases | 4 ++++ tests/integration/targets/npm/meta/main.yml | 5 +++++ tests/integration/targets/npm/tasks/no_bin_links.yml | 4 ++++ tests/integration/targets/npm/tasks/run.yml | 5 +++++ tests/integration/targets/npm/tasks/setup.yml | 5 +++++ tests/integration/targets/npm/tasks/test.yml | 5 +++++ tests/integration/targets/odbc/aliases | 4 ++++ tests/integration/targets/odbc/defaults/main.yml | 4 ++++ tests/integration/targets/odbc/meta/main.yml | 4 ++++ tests/integration/targets/odbc/tasks/install_pyodbc.yml | 5 +++++ tests/integration/targets/odbc/tasks/negative_tests.yml | 5 +++++ tests/integration/targets/odbc/tasks/no_pyodbc.yml | 5 +++++ tests/integration/targets/one_host/aliases | 4 ++++ tests/integration/targets/one_host/meta/main.yml | 5 +++++ tests/integration/targets/one_template/aliases | 4 ++++ tests/integration/targets/one_template/meta/main.yml | 5 +++++ tests/integration/targets/osx_defaults/aliases | 4 ++++ tests/integration/targets/osx_defaults/tasks/main.yml | 3 ++- tests/integration/targets/pacman/aliases | 4 ++++ tests/integration/targets/pacman/meta/main.yml | 5 +++++ tests/integration/targets/pacman/tasks/basic.yml | 4 ++++ .../targets/pacman/tasks/locally_installed_package.yml | 4 ++++ tests/integration/targets/pacman/tasks/package_urls.yml | 4 ++++ tests/integration/targets/pacman/tasks/reason.yml | 4 ++++ tests/integration/targets/pacman/tasks/remove_nosave.yml | 4 ++++ tests/integration/targets/pacman/tasks/update_cache.yml | 4 ++++ tests/integration/targets/pagerduty_user/aliases | 4 ++++ tests/integration/targets/pagerduty_user/vars/main.yml | 5 +++++ tests/integration/targets/pam_limits/aliases | 4 ++++ tests/integration/targets/pamd/aliases | 4 ++++ tests/integration/targets/pids/aliases | 4 ++++ tests/integration/targets/pids/files/obtainpid.sh | 4 ++++ tests/integration/targets/pids/meta/main.yml | 5 +++++ tests/integration/targets/pipx/aliases | 4 ++++ tests/integration/targets/pipx/tasks/main.yml | 4 ++++ tests/integration/targets/pkgng/aliases | 4 ++++ .../targets/pkgng/tasks/create-outofdate-pkg.yml | 4 ++++ tests/integration/targets/pkgng/tasks/freebsd.yml | 4 ++++ .../targets/pkgng/tasks/install_single_package.yml | 4 ++++ tests/integration/targets/pkgng/tasks/main.yml | 4 ++++ tests/integration/targets/pkgng/tasks/setup-testjail.yml | 4 ++++ tests/integration/targets/pkgng/vars/main.yml | 4 ++++ tests/integration/targets/pkgutil/aliases | 4 ++++ tests/integration/targets/proxmox/aliases | 4 ++++ .../integration/targets/python_requirements_info/aliases | 4 ++++ tests/integration/targets/read_csv/aliases | 4 ++++ tests/integration/targets/redis_info/aliases | 4 ++++ tests/integration/targets/redis_info/defaults/main.yml | 4 ++++ tests/integration/targets/redis_info/meta/main.yml | 5 +++++ tests/integration/targets/rundeck/aliases | 4 ++++ tests/integration/targets/rundeck/defaults/main.yml | 5 +++++ tests/integration/targets/rundeck/files/test_job.yaml | 5 +++++ tests/integration/targets/rundeck/meta/main.yml | 5 +++++ tests/integration/targets/scaleway_compute/aliases | 4 ++++ .../targets/scaleway_compute/defaults/main.yml | 6 +++++- tests/integration/targets/scaleway_compute/tasks/ip.yml | 5 +++++ .../targets/scaleway_compute/tasks/pagination.yml | 5 +++++ .../targets/scaleway_compute/tasks/security_group.yml | 5 +++++ .../integration/targets/scaleway_compute/tasks/state.yml | 5 +++++ .../integration/targets/scaleway_database_backup/aliases | 4 ++++ .../targets/scaleway_database_backup/defaults/main.yml | 4 ++++ tests/integration/targets/scaleway_image_info/aliases | 4 ++++ tests/integration/targets/scaleway_ip/aliases | 4 ++++ tests/integration/targets/scaleway_ip/defaults/main.yml | 4 ++++ tests/integration/targets/scaleway_ip_info/aliases | 4 ++++ tests/integration/targets/scaleway_lb/aliases | 4 ++++ tests/integration/targets/scaleway_lb/defaults/main.yml | 4 ++++ .../targets/scaleway_organization_info/aliases | 4 ++++ tests/integration/targets/scaleway_security_group/aliases | 4 ++++ .../targets/scaleway_security_group/defaults/main.yml | 4 ++++ .../targets/scaleway_security_group_info/aliases | 4 ++++ .../targets/scaleway_security_group_rule/aliases | 4 ++++ .../scaleway_security_group_rule/defaults/main.yml | 4 ++++ tests/integration/targets/scaleway_server_info/aliases | 4 ++++ tests/integration/targets/scaleway_snapshot_info/aliases | 4 ++++ tests/integration/targets/scaleway_sshkey/aliases | 4 ++++ tests/integration/targets/scaleway_user_data/aliases | 4 ++++ .../targets/scaleway_user_data/defaults/main.yml | 3 +++ tests/integration/targets/scaleway_volume/aliases | 4 ++++ .../integration/targets/scaleway_volume/defaults/main.yml | 4 ++++ tests/integration/targets/scaleway_volume_info/aliases | 4 ++++ tests/integration/targets/sefcontext/aliases | 4 ++++ tests/integration/targets/sefcontext/meta/main.yml | 5 +++++ tests/integration/targets/sensu_client/aliases | 4 ++++ tests/integration/targets/sensu_handler/aliases | 4 ++++ tests/integration/targets/sensu_handler/tasks/pipe.yml | 5 +++++ tests/integration/targets/sensu_handler/tasks/set.yml | 5 +++++ tests/integration/targets/sensu_handler/tasks/tcp.yml | 5 +++++ .../integration/targets/sensu_handler/tasks/transport.yml | 5 +++++ tests/integration/targets/sensu_handler/tasks/udp.yml | 5 +++++ tests/integration/targets/setup_cron/defaults/main.yml | 5 +++++ tests/integration/targets/setup_cron/meta/main.yml | 5 +++++ tests/integration/targets/setup_cron/vars/alpine.yml | 5 +++++ tests/integration/targets/setup_cron/vars/archlinux.yml | 5 +++++ tests/integration/targets/setup_cron/vars/debian.yml | 5 +++++ tests/integration/targets/setup_cron/vars/default.yml | 4 ++++ tests/integration/targets/setup_cron/vars/fedora.yml | 5 +++++ tests/integration/targets/setup_cron/vars/freebsd.yml | 5 +++++ tests/integration/targets/setup_cron/vars/redhat.yml | 5 +++++ tests/integration/targets/setup_cron/vars/suse.yml | 5 +++++ tests/integration/targets/setup_etcd3/meta/main.yml | 5 +++++ tests/integration/targets/setup_etcd3/vars/RedHat-7.yml | 5 +++++ tests/integration/targets/setup_etcd3/vars/Suse-py3.yml | 5 +++++ tests/integration/targets/setup_etcd3/vars/Suse.yml | 5 +++++ tests/integration/targets/setup_etcd3/vars/default.yml | 4 ++++ .../targets/setup_flatpak_remote/create-repo.sh | 4 ++++ .../targets/setup_flatpak_remote/handlers/main.yaml | 5 +++++ .../targets/setup_flatpak_remote/meta/main.yaml | 5 +++++ tests/integration/targets/setup_gnutar/handlers/main.yml | 4 ++++ tests/integration/targets/setup_gnutar/tasks/main.yml | 4 ++++ tests/integration/targets/setup_influxdb/tasks/setup.yml | 3 +++ .../integration/targets/setup_java_keytool/meta/main.yml | 5 +++++ .../targets/setup_java_keytool/vars/Alpine.yml | 4 ++++ .../targets/setup_java_keytool/vars/Archlinux.yml | 4 ++++ .../targets/setup_java_keytool/vars/Debian.yml | 4 ++++ .../targets/setup_java_keytool/vars/RedHat.yml | 4 ++++ .../integration/targets/setup_java_keytool/vars/Suse.yml | 4 ++++ tests/integration/targets/setup_mosquitto/meta/main.yml | 4 ++++ .../integration/targets/setup_mosquitto/tasks/ubuntu.yml | 5 +++++ tests/integration/targets/setup_openldap/meta/main.yml | 4 ++++ tests/integration/targets/setup_openldap/vars/Debian.yml | 5 +++++ tests/integration/targets/setup_openldap/vars/Ubuntu.yml | 5 +++++ tests/integration/targets/setup_opennebula/meta/main.yml | 5 +++++ tests/integration/targets/setup_opennebula/tasks/main.yml | 4 ++++ tests/integration/targets/setup_opennebula/vars/main.yml | 3 +++ tests/integration/targets/setup_openssl/meta/main.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/Alpine.yml | 5 +++++ .../integration/targets/setup_openssl/vars/Archlinux.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/CentOS-8.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/Darwin.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/Debian.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/FreeBSD.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/RedHat-9.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/RedHat.yml | 5 +++++ tests/integration/targets/setup_openssl/vars/Suse.yml | 5 +++++ .../integration/targets/setup_pkg_mgr/tasks/archlinux.yml | 4 ++++ .../targets/setup_postgresql_db/defaults/main.yml | 5 +++++ .../integration/targets/setup_postgresql_db/meta/main.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Alpine-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Archlinux-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Debian-11-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Debian-8.yml | 5 +++++ .../targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/FreeBSD-11.yml | 5 +++++ .../targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/FreeBSD-12.0.yml | 5 +++++ .../targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/FreeBSD-12.1.yml | 5 +++++ .../targets/setup_postgresql_db/vars/RedHat-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/RedHat.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Ubuntu-12.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Ubuntu-14.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Ubuntu-16.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Ubuntu-18-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Ubuntu-20-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/default-py3.yml | 5 +++++ .../targets/setup_postgresql_db/vars/default.yml | 5 +++++ .../targets/setup_redis_replication/defaults/main.yml | 5 +++++ .../targets/setup_redis_replication/handlers/main.yml | 5 +++++ .../targets/setup_redis_replication/meta/main.yml | 5 +++++ .../setup_redis_replication/tasks/setup_redis_cluster.yml | 5 +++++ .../integration/targets/setup_remote_constraints/aliases | 4 ++++ .../targets/setup_remote_constraints/meta/main.yml | 5 +++++ .../targets/setup_remote_tmp_dir/handlers/main.yml | 5 +++++ .../setup_remote_tmp_dir/tasks/default-cleanup.yml | 5 +++++ .../targets/setup_remote_tmp_dir/tasks/default.yml | 5 +++++ tests/integration/targets/setup_rundeck/defaults/main.yml | 5 +++++ tests/integration/targets/setup_rundeck/meta/main.yml | 4 ++++ tests/integration/targets/setup_rundeck/vars/Alpine.yml | 5 +++++ .../integration/targets/setup_rundeck/vars/Archlinux.yml | 5 +++++ tests/integration/targets/setup_rundeck/vars/Debian.yml | 5 +++++ tests/integration/targets/setup_rundeck/vars/RedHat.yml | 5 +++++ tests/integration/targets/setup_snap/aliases | 4 ++++ tests/integration/targets/setup_snap/defaults/main.yml | 5 +++++ tests/integration/targets/setup_snap/handlers/main.yml | 4 ++++ tests/integration/targets/setup_snap/meta/main.yml | 5 +++++ tests/integration/targets/setup_snap/tasks/default.yml | 4 ++++ tests/integration/targets/setup_snap/tasks/nothing.yml | 4 ++++ .../targets/setup_tls/files/ca_certificate.pem | 4 ++++ tests/integration/targets/setup_tls/files/ca_key.pem | 4 ++++ .../targets/setup_tls/files/client_certificate.pem | 4 ++++ tests/integration/targets/setup_tls/files/client_key.pem | 4 ++++ .../targets/setup_tls/files/server_certificate.pem | 4 ++++ tests/integration/targets/setup_tls/files/server_key.pem | 4 ++++ .../targets/setup_wildfly_server/defaults/main.yml | 5 +++++ .../targets/setup_wildfly_server/handlers/main.yml | 5 +++++ .../targets/setup_wildfly_server/meta/main.yml | 5 +++++ tests/integration/targets/shutdown/aliases | 4 ++++ tests/integration/targets/snap/aliases | 4 ++++ tests/integration/targets/snap/meta/main.yml | 5 +++++ tests/integration/targets/snap_alias/aliases | 4 ++++ tests/integration/targets/snap_alias/meta/main.yml | 5 +++++ tests/integration/targets/snap_alias/tasks/test.yml | 4 ++++ tests/integration/targets/spectrum_model_attrs/aliases | 4 ++++ .../targets/spectrum_model_attrs/tasks/main.yml | 5 +++++ tests/integration/targets/ssh_config/aliases | 4 ++++ tests/integration/targets/ssh_config/meta/main.yml | 5 +++++ tests/integration/targets/ssh_config/tasks/options.yml | 5 +++++ tests/integration/targets/sudoers/aliases | 4 ++++ tests/integration/targets/sudoers/tasks/main.yml | 4 ++++ tests/integration/targets/supervisorctl/aliases | 4 ++++ .../targets/supervisorctl/files/sendProcessStdin.py | 4 ++++ tests/integration/targets/supervisorctl/meta/main.yml | 5 +++++ .../targets/supervisorctl/tasks/install_Linux.yml | 5 +++++ .../targets/supervisorctl/tasks/install_pip.yml | 5 +++++ .../targets/supervisorctl/tasks/start_supervisord.yml | 5 +++++ .../targets/supervisorctl/tasks/stop_supervisord.yml | 5 +++++ tests/integration/targets/supervisorctl/tasks/test.yml | 5 +++++ .../targets/supervisorctl/tasks/test_start.yml | 5 +++++ .../integration/targets/supervisorctl/tasks/test_stop.yml | 5 +++++ .../targets/supervisorctl/tasks/uninstall_Linux.yml | 5 +++++ .../targets/supervisorctl/tasks/uninstall_pip.yml | 5 +++++ tests/integration/targets/supervisorctl/vars/Debian.yml | 5 +++++ tests/integration/targets/supervisorctl/vars/defaults.yml | 5 +++++ tests/integration/targets/sysrc/aliases | 4 ++++ tests/integration/targets/sysrc/tasks/main.yml | 4 ++++ tests/integration/targets/sysrc/tasks/setup-testjail.yml | 4 ++++ tests/integration/targets/terraform/aliases | 4 ++++ tests/integration/targets/terraform/meta/main.yml | 5 +++++ tests/integration/targets/terraform/tasks/main.yml | 3 +++ .../targets/terraform/tasks/test_provider_upgrade.yml | 3 +++ tests/integration/targets/terraform/vars/main.yml | 3 +++ tests/integration/targets/test_a_module/aliases | 4 ++++ .../ansible_collections/testns/testcoll/galaxy.yml | 5 +++++ tests/integration/targets/test_a_module/runme.sh | 3 +++ tests/integration/targets/test_a_module/runme.yml | 5 +++++ tests/integration/targets/timezone/aliases | 4 ++++ tests/integration/targets/timezone/meta/main.yml | 4 ++++ tests/integration/targets/timezone/tasks/test.yml | 5 +++++ tests/integration/targets/ufw/aliases | 4 ++++ tests/integration/targets/ufw/meta/main.yml | 5 +++++ tests/integration/targets/ufw/tasks/run-test.yml | 4 ++++ tests/integration/targets/ufw/tasks/tests/basic.yml | 4 ++++ .../integration/targets/ufw/tasks/tests/global-state.yml | 4 ++++ .../targets/ufw/tasks/tests/insert_relative_to.yml | 4 ++++ tests/integration/targets/ufw/tasks/tests/interface.yml | 5 +++++ tests/integration/targets/wakeonlan/aliases | 4 ++++ tests/integration/targets/xattr/aliases | 4 ++++ tests/integration/targets/xattr/defaults/main.yml | 5 +++++ tests/integration/targets/xattr/meta/main.yml | 5 +++++ tests/integration/targets/xattr/tasks/setup.yml | 5 +++++ tests/integration/targets/xattr/tasks/test.yml | 5 +++++ tests/integration/targets/xfs_quota/aliases | 4 ++++ tests/integration/targets/xfs_quota/defaults/main.yml | 4 ++++ tests/integration/targets/xfs_quota/meta/main.yml | 5 +++++ tests/integration/targets/xfs_quota/tasks/gquota.yml | 5 +++++ tests/integration/targets/xfs_quota/tasks/pquota.yml | 5 +++++ tests/integration/targets/xfs_quota/tasks/uquota.yml | 5 +++++ tests/integration/targets/xml/aliases | 4 ++++ tests/integration/targets/xml/meta/main.yml | 5 +++++ ...ent-implicitly.yml => test-add-element-implicitly.xml} | 0 .../xml/tasks/test-add-children-elements-unicode.yml | 4 ++++ .../targets/xml/tasks/test-add-children-elements.yml | 4 ++++ .../xml/tasks/test-add-children-from-groupvars.yml | 4 ++++ .../targets/xml/tasks/test-add-children-insertafter.yml | 4 ++++ .../targets/xml/tasks/test-add-children-insertbefore.yml | 4 ++++ .../tasks/test-add-children-with-attributes-unicode.yml | 4 ++++ .../xml/tasks/test-add-children-with-attributes.yml | 4 ++++ .../targets/xml/tasks/test-add-element-implicitly.yml | 8 ++++++-- .../xml/tasks/test-add-namespaced-children-elements.yml | 4 ++++ .../targets/xml/tasks/test-children-elements-xml.yml | 4 ++++ .../integration/targets/xml/tasks/test-count-unicode.yml | 4 ++++ tests/integration/targets/xml/tasks/test-count.yml | 4 ++++ .../xml/tasks/test-get-element-content-unicode.yml | 4 ++++ .../targets/xml/tasks/test-get-element-content.yml | 4 ++++ .../xml/tasks/test-mutually-exclusive-attributes.yml | 4 ++++ .../targets/xml/tasks/test-pretty-print-only.yml | 4 ++++ tests/integration/targets/xml/tasks/test-pretty-print.yml | 4 ++++ .../targets/xml/tasks/test-remove-attribute-nochange.yml | 4 ++++ .../targets/xml/tasks/test-remove-attribute.yml | 4 ++++ .../targets/xml/tasks/test-remove-element-nochange.yml | 4 ++++ .../integration/targets/xml/tasks/test-remove-element.yml | 4 ++++ .../tasks/test-remove-namespaced-attribute-nochange.yml | 4 ++++ .../xml/tasks/test-remove-namespaced-attribute.yml | 4 ++++ .../xml/tasks/test-remove-namespaced-element-nochange.yml | 4 ++++ .../targets/xml/tasks/test-remove-namespaced-element.yml | 4 ++++ .../xml/tasks/test-set-attribute-value-unicode.yml | 4 ++++ .../targets/xml/tasks/test-set-attribute-value.yml | 4 ++++ .../xml/tasks/test-set-children-elements-level.yml | 4 ++++ .../xml/tasks/test-set-children-elements-unicode.yml | 4 ++++ .../targets/xml/tasks/test-set-children-elements.yml | 4 ++++ .../targets/xml/tasks/test-set-element-value-empty.yml | 4 ++++ .../targets/xml/tasks/test-set-element-value-unicode.yml | 4 ++++ .../targets/xml/tasks/test-set-element-value.yml | 4 ++++ .../xml/tasks/test-set-namespaced-attribute-value.yml | 4 ++++ .../xml/tasks/test-set-namespaced-children-elements.yml | 4 ++++ .../xml/tasks/test-set-namespaced-element-value.yml | 4 ++++ tests/integration/targets/xml/tasks/test-xmlstring.yml | 4 ++++ tests/integration/targets/xml/vars/main.yml | 7 ++++++- tests/integration/targets/yarn/aliases | 4 ++++ tests/integration/targets/yarn/meta/main.yml | 5 +++++ tests/integration/targets/yarn/tasks/run.yml | 5 +++++ tests/integration/targets/yum_versionlock/aliases | 4 ++++ tests/integration/targets/zypper/aliases | 4 ++++ tests/integration/targets/zypper/meta/main.yml | 5 +++++ tests/integration/targets/zypper/tasks/zypper.yml | 5 +++++ tests/integration/targets/zypper_repository/aliases | 4 ++++ tests/integration/targets/zypper_repository/meta/main.yml | 5 +++++ .../integration/targets/zypper_repository/tasks/test.yml | 5 +++++ .../targets/zypper_repository/tasks/zypper_repository.yml | 5 +++++ tests/requirements.yml | 5 +++++ tests/unit/__init__.py | 0 tests/unit/mock/__init__.py | 0 tests/unit/mock/path.py | 4 ++++ tests/unit/plugins/__init__.py | 0 tests/unit/plugins/become/__init__.py | 0 tests/unit/plugins/cache/__init__.py | 0 tests/unit/plugins/callback/__init__.py | 0 tests/unit/plugins/connection/__init__.py | 0 tests/unit/plugins/inventory/__init__.py | 0 tests/unit/plugins/lookup/__init__.py | 0 tests/unit/plugins/module_utils/__init__.py | 0 tests/unit/plugins/module_utils/cloud/__init__.py | 0 tests/unit/plugins/module_utils/hwc/__init__.py | 0 tests/unit/plugins/module_utils/identity/__init__.py | 0 .../plugins/module_utils/identity/keycloak/__init__.py | 0 .../identity/keycloak/test_keycloak_connect.py | 4 ++++ tests/unit/plugins/module_utils/net_tools/__init__.py | 0 .../plugins/module_utils/net_tools/pritunl/__init__.py | 0 .../plugins/module_utils/remote_management/__init__.py | 0 tests/unit/plugins/module_utils/xenserver/__init__.py | 0 tests/unit/plugins/modules/__init__.py | 0 tests/unit/plugins/modules/cloud/__init__.py | 0 tests/unit/plugins/modules/cloud/linode/__init__.py | 0 tests/unit/plugins/modules/cloud/linode/test_linode.py | 4 ++++ tests/unit/plugins/modules/cloud/linode/test_linode_v4.py | 4 ++++ tests/unit/plugins/modules/cloud/misc/__init__.py | 0 tests/unit/plugins/modules/cloud/xenserver/__init__.py | 0 tests/unit/plugins/modules/database/__init__.py | 0 tests/unit/plugins/modules/database/misc/__init__.py | 0 tests/unit/plugins/modules/database/saphana/__init__.py | 0 tests/unit/plugins/modules/files/__init__.py | 0 tests/unit/plugins/modules/identity/__init__.py | 0 tests/unit/plugins/modules/identity/ipa/__init__.py | 0 tests/unit/plugins/modules/identity/keycloak/__init__.py | 0 tests/unit/plugins/modules/messaging/__init__.py | 0 tests/unit/plugins/modules/monitoring/__init__.py | 0 tests/unit/plugins/modules/net_tools/__init__.py | 0 tests/unit/plugins/modules/notification/__init__.py | 0 tests/unit/plugins/modules/notification/test_campfire.py | 3 +++ tests/unit/plugins/modules/packaging/__init__.py | 0 tests/unit/plugins/modules/packaging/language/__init__.py | 0 tests/unit/plugins/modules/packaging/os/__init__.py | 0 tests/unit/plugins/modules/remote_management/__init__.py | 0 .../plugins/modules/remote_management/lxca/__init__.py | 0 .../plugins/modules/remote_management/oneview/__init__.py | 0 tests/unit/plugins/modules/source_control/__init__.py | 0 .../plugins/modules/source_control/bitbucket/__init__.py | 0 .../plugins/modules/source_control/github/__init__.py | 0 .../modules/source_control/github/test_github_repo.py | 4 ++++ .../plugins/modules/source_control/gitlab/__init__.py | 0 tests/unit/plugins/modules/storage/__init__.py | 0 tests/unit/plugins/modules/storage/hpe3par/__init__.py | 0 tests/unit/plugins/modules/system/__init__.py | 0 .../plugins/modules/system/interfaces_file/__init__.py | 0 .../modules/system/interfaces_file/fixtures/__init__.py | 0 tests/unit/plugins/modules/web_infrastructure/__init__.py | 0 tests/utils/shippable/cloud.sh | 3 +++ tests/utils/shippable/linux-community.sh | 3 +++ tests/utils/shippable/linux.sh | 3 +++ tests/utils/shippable/remote.sh | 3 +++ tests/utils/shippable/sanity.sh | 3 +++ tests/utils/shippable/shippable.sh | 3 +++ tests/utils/shippable/units.sh | 3 +++ 823 files changed, 3307 insertions(+), 18 deletions(-) delete mode 100644 tests/integration/targets/__init__.py delete mode 100644 tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/__init__.py rename tests/integration/targets/xml/results/{test-add-element-implicitly.yml => test-add-element-implicitly.xml} (100%) delete mode 100644 tests/unit/__init__.py delete mode 100644 tests/unit/mock/__init__.py delete mode 100644 tests/unit/plugins/__init__.py delete mode 100644 tests/unit/plugins/become/__init__.py delete mode 100644 tests/unit/plugins/cache/__init__.py delete mode 100644 tests/unit/plugins/callback/__init__.py delete mode 100644 tests/unit/plugins/connection/__init__.py delete mode 100644 tests/unit/plugins/inventory/__init__.py delete mode 100644 tests/unit/plugins/lookup/__init__.py delete mode 100644 tests/unit/plugins/module_utils/__init__.py delete mode 100644 tests/unit/plugins/module_utils/cloud/__init__.py delete mode 100644 tests/unit/plugins/module_utils/hwc/__init__.py delete mode 100644 tests/unit/plugins/module_utils/identity/__init__.py delete mode 100644 tests/unit/plugins/module_utils/identity/keycloak/__init__.py delete mode 100644 tests/unit/plugins/module_utils/net_tools/__init__.py delete mode 100644 tests/unit/plugins/module_utils/net_tools/pritunl/__init__.py delete mode 100644 tests/unit/plugins/module_utils/remote_management/__init__.py delete mode 100644 tests/unit/plugins/module_utils/xenserver/__init__.py delete mode 100644 tests/unit/plugins/modules/__init__.py delete mode 100644 tests/unit/plugins/modules/cloud/__init__.py delete mode 100644 tests/unit/plugins/modules/cloud/linode/__init__.py delete mode 100644 tests/unit/plugins/modules/cloud/misc/__init__.py delete mode 100644 tests/unit/plugins/modules/cloud/xenserver/__init__.py delete mode 100644 tests/unit/plugins/modules/database/__init__.py delete mode 100644 tests/unit/plugins/modules/database/misc/__init__.py delete mode 100644 tests/unit/plugins/modules/database/saphana/__init__.py delete mode 100644 tests/unit/plugins/modules/files/__init__.py delete mode 100644 tests/unit/plugins/modules/identity/__init__.py delete mode 100644 tests/unit/plugins/modules/identity/ipa/__init__.py delete mode 100644 tests/unit/plugins/modules/identity/keycloak/__init__.py delete mode 100644 tests/unit/plugins/modules/messaging/__init__.py delete mode 100644 tests/unit/plugins/modules/monitoring/__init__.py delete mode 100644 tests/unit/plugins/modules/net_tools/__init__.py delete mode 100644 tests/unit/plugins/modules/notification/__init__.py delete mode 100644 tests/unit/plugins/modules/packaging/__init__.py delete mode 100644 tests/unit/plugins/modules/packaging/language/__init__.py delete mode 100644 tests/unit/plugins/modules/packaging/os/__init__.py delete mode 100644 tests/unit/plugins/modules/remote_management/__init__.py delete mode 100644 tests/unit/plugins/modules/remote_management/lxca/__init__.py delete mode 100644 tests/unit/plugins/modules/remote_management/oneview/__init__.py delete mode 100644 tests/unit/plugins/modules/source_control/__init__.py delete mode 100644 tests/unit/plugins/modules/source_control/bitbucket/__init__.py delete mode 100644 tests/unit/plugins/modules/source_control/github/__init__.py delete mode 100644 tests/unit/plugins/modules/source_control/gitlab/__init__.py delete mode 100644 tests/unit/plugins/modules/storage/__init__.py delete mode 100644 tests/unit/plugins/modules/storage/hpe3par/__init__.py delete mode 100644 tests/unit/plugins/modules/system/__init__.py delete mode 100644 tests/unit/plugins/modules/system/interfaces_file/__init__.py delete mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/__init__.py delete mode 100644 tests/unit/plugins/modules/web_infrastructure/__init__.py diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 55bd2c388a..110c207913 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + trigger: batch: true branches: diff --git a/.azure-pipelines/scripts/aggregate-coverage.sh b/.azure-pipelines/scripts/aggregate-coverage.sh index 1ccfcf2073..ca2b19de97 100755 --- a/.azure-pipelines/scripts/aggregate-coverage.sh +++ b/.azure-pipelines/scripts/aggregate-coverage.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Aggregate code coverage results for later processing. set -o pipefail -eu diff --git a/.azure-pipelines/scripts/combine-coverage.py b/.azure-pipelines/scripts/combine-coverage.py index 506ade6460..3b2fd993db 100755 --- a/.azure-pipelines/scripts/combine-coverage.py +++ b/.azure-pipelines/scripts/combine-coverage.py @@ -1,4 +1,8 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + """ Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job. Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}" diff --git a/.azure-pipelines/scripts/process-results.sh b/.azure-pipelines/scripts/process-results.sh index f3f1d1bae8..1f4b8e4f10 100755 --- a/.azure-pipelines/scripts/process-results.sh +++ b/.azure-pipelines/scripts/process-results.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Check the test results and set variables for use in later steps. set -o pipefail -eu diff --git a/.azure-pipelines/scripts/publish-codecov.py b/.azure-pipelines/scripts/publish-codecov.py index ab947f9810..58e32f6d37 100755 --- a/.azure-pipelines/scripts/publish-codecov.py +++ b/.azure-pipelines/scripts/publish-codecov.py @@ -1,4 +1,8 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + """ Upload code coverage reports to codecov.io. Multiple coverage files from multiple languages are accepted and aggregated after upload. diff --git a/.azure-pipelines/scripts/report-coverage.sh b/.azure-pipelines/scripts/report-coverage.sh index c039f7dcbd..c08154b6f8 100755 --- a/.azure-pipelines/scripts/report-coverage.sh +++ b/.azure-pipelines/scripts/report-coverage.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Generate code coverage reports for uploading to Azure Pipelines and codecov.io. set -o pipefail -eu diff --git a/.azure-pipelines/scripts/run-tests.sh b/.azure-pipelines/scripts/run-tests.sh index a947fdf013..2cfdcf61ef 100755 --- a/.azure-pipelines/scripts/run-tests.sh +++ b/.azure-pipelines/scripts/run-tests.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Configure the test environment and run the tests. set -o pipefail -eu diff --git a/.azure-pipelines/scripts/time-command.py b/.azure-pipelines/scripts/time-command.py index 5e8eb8d4c8..85a7c3c171 100755 --- a/.azure-pipelines/scripts/time-command.py +++ b/.azure-pipelines/scripts/time-command.py @@ -1,4 +1,8 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + """Prepends a relative timestamp to each input line from stdin and writes it to stdout.""" from __future__ import (absolute_import, division, print_function) diff --git a/.azure-pipelines/templates/coverage.yml b/.azure-pipelines/templates/coverage.yml index 1b36ea45a4..3c8841aa26 100644 --- a/.azure-pipelines/templates/coverage.yml +++ b/.azure-pipelines/templates/coverage.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # This template adds a job for processing code coverage data. # It will upload results to Azure Pipelines and codecov.io. # Use it from a job stage that completes after all other jobs have completed. diff --git a/.azure-pipelines/templates/matrix.yml b/.azure-pipelines/templates/matrix.yml index 4e9555dd3b..4876375855 100644 --- a/.azure-pipelines/templates/matrix.yml +++ b/.azure-pipelines/templates/matrix.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # This template uses the provided targets and optional groups to generate a matrix which is then passed to the test template. # If this matrix template does not provide the required functionality, consider using the test template directly instead. diff --git a/.azure-pipelines/templates/test.yml b/.azure-pipelines/templates/test.yml index 5250ed8023..700cf629d7 100644 --- a/.azure-pipelines/templates/test.yml +++ b/.azure-pipelines/templates/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # This template uses the provided list of jobs to create test one or more test jobs. # It can be used directly if needed, or through the matrix template. diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 1061fdae80..6f6bae2fc6 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + notifications: true automerge: true files: diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b0ee1b03bf..bd5030f2c2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + name: Bug report description: Create a report to help us improve diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f90bd1ad86..0cc2db058c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser blank_issues_enabled: false # default: true contact_links: diff --git a/.github/ISSUE_TEMPLATE/documentation_report.yml b/.github/ISSUE_TEMPLATE/documentation_report.yml index cd88343d06..3a2777f207 100644 --- a/.github/ISSUE_TEMPLATE/documentation_report.yml +++ b/.github/ISSUE_TEMPLATE/documentation_report.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + name: Documentation Report description: Ask us about docs # NOTE: issue body is enabled to allow screenshots diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index e676ff25ef..9630b67e12 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + name: Feature request description: Suggest an idea for this project diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 23c4cb3b50..2f4ff900d8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + version: 2 updates: - package-ecosystem: "github-actions" diff --git a/.github/patchback.yml b/.github/patchback.yml index 33ad6e84a6..5ee7812edb 100644 --- a/.github/patchback.yml +++ b/.github/patchback.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + backport_branch_prefix: patchback/backports/ backport_label_prefix: backport- target_branch_prefix: stable- diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index dfaf617752..f7ab9450cc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + name: "Code scanning - action" on: diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 8860fdbfe5..03c5c9a1fd 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + name: Collection Docs concurrency: group: docs-${{ github.head_ref }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0342e8054a..7e3d19094b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.0.1 diff --git a/changelogs/config.yaml b/changelogs/config.yaml index fd0b422a5b..52e101e11f 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + changelog_filename_template: ../CHANGELOG.rst changelog_filename_version_depth: 0 changes_file: changelog.yaml diff --git a/docs/docsite/extra-docs.yml b/docs/docsite/extra-docs.yml index 83f533ec08..2171031ac1 100644 --- a/docs/docsite/extra-docs.yml +++ b/docs/docsite/extra-docs.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + sections: - title: Guides toctree: diff --git a/docs/docsite/helper/lists_mergeby/default-common.yml b/docs/docsite/helper/lists_mergeby/default-common.yml index 69227fbe44..fd874e5c91 100644 --- a/docs/docsite/helper/lists_mergeby/default-common.yml +++ b/docs/docsite/helper/lists_mergeby/default-common.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list1: - name: foo extra: true diff --git a/docs/docsite/helper/lists_mergeby/default-recursive-true.yml b/docs/docsite/helper/lists_mergeby/default-recursive-true.yml index 7d8a7cf640..133c8f2aec 100644 --- a/docs/docsite/helper/lists_mergeby/default-recursive-true.yml +++ b/docs/docsite/helper/lists_mergeby/default-recursive-true.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list1: - name: myname01 param01: diff --git a/docs/docsite/helper/lists_mergeby/example-001.yml b/docs/docsite/helper/lists_mergeby/example-001.yml index d1cbb4b3b4..0cf6a9b8a7 100644 --- a/docs/docsite/helper/lists_mergeby/example-001.yml +++ b/docs/docsite/helper/lists_mergeby/example-001.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 1. Merge two lists by common attribute 'name' include_vars: dir: example-001_vars diff --git a/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml index 4ecfb0a6c6..0604feccbd 100644 --- a/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ list1| community.general.lists_mergeby(list2, 'name') }}" diff --git a/docs/docsite/helper/lists_mergeby/example-002.yml b/docs/docsite/helper/lists_mergeby/example-002.yml index d21441a8df..5e6e0315df 100644 --- a/docs/docsite/helper/lists_mergeby/example-002.yml +++ b/docs/docsite/helper/lists_mergeby/example-002.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 2. Merge two lists by common attribute 'name' include_vars: dir: example-002_vars diff --git a/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml index 9eb6775f44..8ad7524072 100644 --- a/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ [list1, list2]| community.general.lists_mergeby('name') }}" diff --git a/docs/docsite/helper/lists_mergeby/example-003.yml b/docs/docsite/helper/lists_mergeby/example-003.yml index 7692278609..2f93ab8a27 100644 --- a/docs/docsite/helper/lists_mergeby/example-003.yml +++ b/docs/docsite/helper/lists_mergeby/example-003.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 3. Merge recursive by 'name', replace lists (default) include_vars: dir: example-003_vars diff --git a/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml index 6d6bf8a478..d5374eece5 100644 --- a/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ [list1, list2]| community.general.lists_mergeby('name', recursive=true) }}" diff --git a/docs/docsite/helper/lists_mergeby/example-004.yml b/docs/docsite/helper/lists_mergeby/example-004.yml index 8a473a7328..3ef067faf3 100644 --- a/docs/docsite/helper/lists_mergeby/example-004.yml +++ b/docs/docsite/helper/lists_mergeby/example-004.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 4. Merge recursive by 'name', keep lists include_vars: dir: example-004_vars diff --git a/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml index a525ae4f69..a054ea1e73 100644 --- a/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ [list1, list2]| community.general.lists_mergeby('name', recursive=true, diff --git a/docs/docsite/helper/lists_mergeby/example-005.yml b/docs/docsite/helper/lists_mergeby/example-005.yml index 8bdf92c359..57e7a779d9 100644 --- a/docs/docsite/helper/lists_mergeby/example-005.yml +++ b/docs/docsite/helper/lists_mergeby/example-005.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 5. Merge recursive by 'name', append lists include_vars: dir: example-005_vars diff --git a/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml index 650686104b..3480bf6581 100644 --- a/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ [list1, list2]| community.general.lists_mergeby('name', recursive=true, diff --git a/docs/docsite/helper/lists_mergeby/example-006.yml b/docs/docsite/helper/lists_mergeby/example-006.yml index 9dcb9b684d..41fc88e496 100644 --- a/docs/docsite/helper/lists_mergeby/example-006.yml +++ b/docs/docsite/helper/lists_mergeby/example-006.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 6. Merge recursive by 'name', prepend lists include_vars: dir: example-006_vars diff --git a/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml index d880dfa9f0..97513b5593 100644 --- a/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ [list1, list2]| community.general.lists_mergeby('name', recursive=true, diff --git a/docs/docsite/helper/lists_mergeby/example-007.yml b/docs/docsite/helper/lists_mergeby/example-007.yml index e1a6f2c7e3..3de7158447 100644 --- a/docs/docsite/helper/lists_mergeby/example-007.yml +++ b/docs/docsite/helper/lists_mergeby/example-007.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 7. Merge recursive by 'name', append lists 'remove present' include_vars: dir: example-007_vars diff --git a/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml index af71d6dfd5..cb51653b49 100644 --- a/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ [list1, list2]| community.general.lists_mergeby('name', recursive=true, diff --git a/docs/docsite/helper/lists_mergeby/example-008.yml b/docs/docsite/helper/lists_mergeby/example-008.yml index 18a598864a..e33828bf9a 100644 --- a/docs/docsite/helper/lists_mergeby/example-008.yml +++ b/docs/docsite/helper/lists_mergeby/example-008.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 8. Merge recursive by 'name', prepend lists 'remove present' include_vars: dir: example-008_vars diff --git a/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml b/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml index 8a20578507..af7001fc4a 100644 --- a/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml +++ b/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list3: "{{ [list1, list2]| community.general.lists_mergeby('name', recursive=true, diff --git a/docs/docsite/helper/lists_mergeby/examples.yml b/docs/docsite/helper/lists_mergeby/examples.yml index 1e798cb8dc..83b985084e 100644 --- a/docs/docsite/helper/lists_mergeby/examples.yml +++ b/docs/docsite/helper/lists_mergeby/examples.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + examples: - label: 'In the example below the lists are merged by the attribute ``name``:' file: example-001_vars/list3.yml diff --git a/docs/docsite/helper/lists_mergeby/playbook.yml b/docs/docsite/helper/lists_mergeby/playbook.yml index ae82932275..793d233485 100644 --- a/docs/docsite/helper/lists_mergeby/playbook.yml +++ b/docs/docsite/helper/lists_mergeby/playbook.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # 1) Run all examples and create example-XXX.out diff --git a/docs/docsite/links.yml b/docs/docsite/links.yml index b5a1720974..bd954c4096 100644 --- a/docs/docsite/links.yml +++ b/docs/docsite/links.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + edit_on_github: repository: ansible-collections/community.general branch: main diff --git a/galaxy.yml b/galaxy.yml index ab07b28c15..f48f8dd8ca 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + namespace: community name: general version: 5.4.0 diff --git a/meta/runtime.yml b/meta/runtime.yml index 28e44695eb..cbb131346d 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + requires_ansible: '>=2.11.0' plugin_routing: connection: diff --git a/plugins/filter/hashids_decode.yml b/plugins/filter/hashids_decode.yml index 50e07abc8c..3d2144f725 100644 --- a/plugins/filter/hashids_decode.yml +++ b/plugins/filter/hashids_decode.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: hashids_decode short_description: Decodes a sequence of numbers from a YouTube-like hash diff --git a/plugins/filter/hashids_encode.yml b/plugins/filter/hashids_encode.yml index 69816aac30..af19522d0a 100644 --- a/plugins/filter/hashids_encode.yml +++ b/plugins/filter/hashids_encode.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: hashids_encode short_description: Encodes YouTube-like hashes from a sequence of integers diff --git a/plugins/filter/to_days.yml b/plugins/filter/to_days.yml index e06c9463dc..19bc8faf23 100644 --- a/plugins/filter/to_days.yml +++ b/plugins/filter/to_days.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_days short_description: Converte a duration string to days diff --git a/plugins/filter/to_hours.yml b/plugins/filter/to_hours.yml index 976c3a6adf..83826a5908 100644 --- a/plugins/filter/to_hours.yml +++ b/plugins/filter/to_hours.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_hours short_description: Converte a duration string to hours diff --git a/plugins/filter/to_milliseconds.yml b/plugins/filter/to_milliseconds.yml index a4c59ce958..b6bb7e4be0 100644 --- a/plugins/filter/to_milliseconds.yml +++ b/plugins/filter/to_milliseconds.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_milliseconds short_description: Converte a duration string to milliseconds diff --git a/plugins/filter/to_minutes.yml b/plugins/filter/to_minutes.yml index 7dfeada29f..3b85dadc43 100644 --- a/plugins/filter/to_minutes.yml +++ b/plugins/filter/to_minutes.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_minutes short_description: Converte a duration string to minutes diff --git a/plugins/filter/to_months.yml b/plugins/filter/to_months.yml index 84a94d2526..f13cee918e 100644 --- a/plugins/filter/to_months.yml +++ b/plugins/filter/to_months.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_months short_description: Converte a duration string to months diff --git a/plugins/filter/to_seconds.yml b/plugins/filter/to_seconds.yml index 0b09e98456..d6e6c4e467 100644 --- a/plugins/filter/to_seconds.yml +++ b/plugins/filter/to_seconds.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_seconds short_description: Converte a duration string to seconds diff --git a/plugins/filter/to_time_unit.yml b/plugins/filter/to_time_unit.yml index 436a4d6a80..c0149f0acd 100644 --- a/plugins/filter/to_time_unit.yml +++ b/plugins/filter/to_time_unit.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_time_unit short_description: Converte a duration string to the given time unit diff --git a/plugins/filter/to_weeks.yml b/plugins/filter/to_weeks.yml index 4626e35662..499c386276 100644 --- a/plugins/filter/to_weeks.yml +++ b/plugins/filter/to_weeks.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_weeks short_description: Converte a duration string to weeks diff --git a/plugins/filter/to_years.yml b/plugins/filter/to_years.yml index 4fb54b8753..1a244a276f 100644 --- a/plugins/filter/to_years.yml +++ b/plugins/filter/to_years.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + DOCUMENTATION: name: to_years short_description: Converte a duration string to years diff --git a/tests/config.yml b/tests/config.yml index ba0238e305..38590f2e4e 100644 --- a/tests/config.yml +++ b/tests/config.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # See template for more information: # https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/config/config.yml modules: diff --git a/tests/integration/targets/__init__.py b/tests/integration/targets/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/integration/targets/aix_devices/aliases b/tests/integration/targets/aix_devices/aliases index e6cab07d71..8d841c56be 100644 --- a/tests/integration/targets/aix_devices/aliases +++ b/tests/integration/targets/aix_devices/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # No AIX LPAR available unsupported diff --git a/tests/integration/targets/aix_filesystem/aliases b/tests/integration/targets/aix_filesystem/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/aix_filesystem/aliases +++ b/tests/integration/targets/aix_filesystem/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/alerta_customer/aliases b/tests/integration/targets/alerta_customer/aliases index 268da2c702..1a0d20b0b2 100644 --- a/tests/integration/targets/alerta_customer/aliases +++ b/tests/integration/targets/alerta_customer/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 disabled diff --git a/tests/integration/targets/alerta_customer/defaults/main.yml b/tests/integration/targets/alerta_customer/defaults/main.yml index f07352a92d..3d4877b41f 100644 --- a/tests/integration/targets/alerta_customer/defaults/main.yml +++ b/tests/integration/targets/alerta_customer/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + alerta_url: http://localhost:8080/ alerta_user: admin@example.com alerta_password: password diff --git a/tests/integration/targets/alternatives/aliases b/tests/integration/targets/alternatives/aliases index 64c02f24ff..d281365a46 100644 --- a/tests/integration/targets/alternatives/aliases +++ b/tests/integration/targets/alternatives/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 destructive needs/root diff --git a/tests/integration/targets/alternatives/tasks/path_is_checked.yml b/tests/integration/targets/alternatives/tasks/path_is_checked.yml index ef0a3b4763..47ce1a54ef 100644 --- a/tests/integration/targets/alternatives/tasks/path_is_checked.yml +++ b/tests/integration/targets/alternatives/tasks/path_is_checked.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Try with nonexistent path alternatives: name: dummy diff --git a/tests/integration/targets/alternatives/tasks/remove_links.yml b/tests/integration/targets/alternatives/tasks/remove_links.yml index a04baee027..de25b02cbc 100644 --- a/tests/integration/targets/alternatives/tasks/remove_links.yml +++ b/tests/integration/targets/alternatives/tasks/remove_links.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: remove links file: path: '{{ item }}' diff --git a/tests/integration/targets/alternatives/tasks/setup.yml b/tests/integration/targets/alternatives/tasks/setup.yml index 7e4a405340..ab2c398521 100644 --- a/tests/integration/targets/alternatives/tasks/setup.yml +++ b/tests/integration/targets/alternatives/tasks/setup.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - include_vars: '{{ item }}' with_first_found: - files: diff --git a/tests/integration/targets/alternatives/tasks/setup_test.yml b/tests/integration/targets/alternatives/tasks/setup_test.yml index 4475514745..77279c67f1 100644 --- a/tests/integration/targets/alternatives/tasks/setup_test.yml +++ b/tests/integration/targets/alternatives/tasks/setup_test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - template: src: dummy_alternative dest: '{{ alternatives_dir }}/dummy' diff --git a/tests/integration/targets/alternatives/tasks/subcommands.yml b/tests/integration/targets/alternatives/tasks/subcommands.yml index d4ad086099..e83fd6db3c 100644 --- a/tests/integration/targets/alternatives/tasks/subcommands.yml +++ b/tests/integration/targets/alternatives/tasks/subcommands.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Try with subcommands alternatives: name: dummymain diff --git a/tests/integration/targets/alternatives/tasks/test.yml b/tests/integration/targets/alternatives/tasks/test.yml index a4d2f95502..ca59a4b554 100644 --- a/tests/integration/targets/alternatives/tasks/test.yml +++ b/tests/integration/targets/alternatives/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - debug: msg: ' with_alternatives: {{ with_alternatives }}, mode: {{ mode }}' diff --git a/tests/integration/targets/alternatives/tasks/tests.yml b/tests/integration/targets/alternatives/tasks/tests.yml index e0400dfd81..75e30cabea 100644 --- a/tests/integration/targets/alternatives/tasks/tests.yml +++ b/tests/integration/targets/alternatives/tasks/tests.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - include_tasks: remove_links.yml - include_tasks: setup_test.yml diff --git a/tests/integration/targets/alternatives/tasks/tests_set_priority.yml b/tests/integration/targets/alternatives/tasks/tests_set_priority.yml index 12dcc1cbf6..46cf48e59b 100644 --- a/tests/integration/targets/alternatives/tasks/tests_set_priority.yml +++ b/tests/integration/targets/alternatives/tasks/tests_set_priority.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: update dummy alternative alternatives: name: dummy diff --git a/tests/integration/targets/alternatives/tasks/tests_state.yml b/tests/integration/targets/alternatives/tasks/tests_state.yml index dd3be565ba..92c8078c2b 100644 --- a/tests/integration/targets/alternatives/tasks/tests_state.yml +++ b/tests/integration/targets/alternatives/tasks/tests_state.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Add a few dummy alternatives with state = present and make sure that the # group is in 'auto' mode and the highest priority alternative is selected. - name: Add some dummy alternatives with state = present diff --git a/tests/integration/targets/alternatives/vars/Debian.yml b/tests/integration/targets/alternatives/vars/Debian.yml index d2cdd0cd0e..e7f87c59d2 100644 --- a/tests/integration/targets/alternatives/vars/Debian.yml +++ b/tests/integration/targets/alternatives/vars/Debian.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + alternatives_dir: /var/lib/dpkg/alternatives/ alternatives_command: update-alternatives diff --git a/tests/integration/targets/alternatives/vars/Suse-42.3.yml b/tests/integration/targets/alternatives/vars/Suse-42.3.yml index 14958db39a..0d5a9cfec0 100644 --- a/tests/integration/targets/alternatives/vars/Suse-42.3.yml +++ b/tests/integration/targets/alternatives/vars/Suse-42.3.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + alternatives_dir: /var/lib/rpm/alternatives/ alternatives_command: update-alternatives diff --git a/tests/integration/targets/alternatives/vars/default.yml b/tests/integration/targets/alternatives/vars/default.yml index 7aeb9bb562..68e1feafad 100644 --- a/tests/integration/targets/alternatives/vars/default.yml +++ b/tests/integration/targets/alternatives/vars/default.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + alternatives_dir: /var/lib/alternatives/ alternatives_command: update-alternatives diff --git a/tests/integration/targets/ansible_galaxy_install/aliases b/tests/integration/targets/ansible_galaxy_install/aliases index e9dc8635ac..de4a0e413a 100644 --- a/tests/integration/targets/ansible_galaxy_install/aliases +++ b/tests/integration/targets/ansible_galaxy_install/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group3 skip/python2.6 diff --git a/tests/integration/targets/ansible_galaxy_install/files/test.yml b/tests/integration/targets/ansible_galaxy_install/files/test.yml index 9d2848e087..877b5fca40 100644 --- a/tests/integration/targets/ansible_galaxy_install/files/test.yml +++ b/tests/integration/targets/ansible_galaxy_install/files/test.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + roles: # Install a role from Ansible Galaxy. - name: geerlingguy.java diff --git a/tests/integration/targets/ansible_galaxy_install/meta/main.yml b/tests/integration/targets/ansible_galaxy_install/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/ansible_galaxy_install/meta/main.yml +++ b/tests/integration/targets/ansible_galaxy_install/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/ansible_galaxy_install/tasks/main.yml b/tests/integration/targets/ansible_galaxy_install/tasks/main.yml index db0ad4d2a5..44ad697930 100644 --- a/tests/integration/targets/ansible_galaxy_install/tasks/main.yml +++ b/tests/integration/targets/ansible_galaxy_install/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ################################################### - name: Install collection netbox.netbox community.general.ansible_galaxy_install: diff --git a/tests/integration/targets/apache2_module/aliases b/tests/integration/targets/apache2_module/aliases index 0725da563f..64596c2b12 100644 --- a/tests/integration/targets/apache2_module/aliases +++ b/tests/integration/targets/apache2_module/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/archive/aliases b/tests/integration/targets/archive/aliases index 08f26ea447..421f918a39 100644 --- a/tests/integration/targets/archive/aliases +++ b/tests/integration/targets/archive/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/root shippable/posix/group2 destructive diff --git a/tests/integration/targets/archive/meta/main.yml b/tests/integration/targets/archive/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/archive/meta/main.yml +++ b/tests/integration/targets/archive/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/archive/tests/broken-link.yml b/tests/integration/targets/archive/tests/broken-link.yml index 677ebe0bf7..8f8b534d58 100644 --- a/tests/integration/targets/archive/tests/broken-link.yml +++ b/tests/integration/targets/archive/tests/broken-link.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - name: Create link - broken link ({{ format }}) file: diff --git a/tests/integration/targets/archive/tests/exclusions.yml b/tests/integration/targets/archive/tests/exclusions.yml index b2a8c7b890..3c5f1fc5cf 100644 --- a/tests/integration/targets/archive/tests/exclusions.yml +++ b/tests/integration/targets/archive/tests/exclusions.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Archive - exclusion patterns ({{ format }}) archive: path: "{{ remote_tmp_dir }}/*.txt" diff --git a/tests/integration/targets/archive/tests/idempotency.yml b/tests/integration/targets/archive/tests/idempotency.yml index 5a44922adb..32f20a6569 100644 --- a/tests/integration/targets/archive/tests/idempotency.yml +++ b/tests/integration/targets/archive/tests/idempotency.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Archive - file content idempotency ({{ format }}) archive: path: "{{ remote_tmp_dir }}/*.txt" diff --git a/tests/integration/targets/archive/tests/remove.yml b/tests/integration/targets/archive/tests/remove.yml index 08f16e98da..b58046af6a 100644 --- a/tests/integration/targets/archive/tests/remove.yml +++ b/tests/integration/targets/archive/tests/remove.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Archive - remove source files ({{ format }}) archive: path: "{{ remote_tmp_dir }}/*.txt" diff --git a/tests/integration/targets/callback/inventory.yml b/tests/integration/targets/callback/inventory.yml index ada2e76127..8e1a47e9a6 100644 --- a/tests/integration/targets/callback/inventory.yml +++ b/tests/integration/targets/callback/inventory.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + all: hosts: testhost: diff --git a/tests/integration/targets/callback_diy/aliases b/tests/integration/targets/callback_diy/aliases index 252d6ceba4..c0ba6c5230 100644 --- a/tests/integration/targets/callback_diy/aliases +++ b/tests/integration/targets/callback_diy/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 needs/target/callback diff --git a/tests/integration/targets/callback_log_plays/aliases b/tests/integration/targets/callback_log_plays/aliases index b59832142f..7a0fc5c1ea 100644 --- a/tests/integration/targets/callback_log_plays/aliases +++ b/tests/integration/targets/callback_log_plays/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 diff --git a/tests/integration/targets/callback_log_plays/ping_log.yml b/tests/integration/targets/callback_log_plays/ping_log.yml index 8015726ebb..24f35f8996 100644 --- a/tests/integration/targets/callback_log_plays/ping_log.yml +++ b/tests/integration/targets/callback_log_plays/ping_log.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost gather_facts: false tasks: diff --git a/tests/integration/targets/callback_log_plays/runme.sh b/tests/integration/targets/callback_log_plays/runme.sh index af4a974629..88eea16266 100755 --- a/tests/integration/targets/callback_log_plays/runme.sh +++ b/tests/integration/targets/callback_log_plays/runme.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/callback_yaml/aliases b/tests/integration/targets/callback_yaml/aliases index c6864963b5..56b63416e2 100644 --- a/tests/integration/targets/callback_yaml/aliases +++ b/tests/integration/targets/callback_yaml/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 needs/target/callback diff --git a/tests/integration/targets/cargo/aliases b/tests/integration/targets/cargo/aliases index 9a80b36fe0..190289e117 100644 --- a/tests/integration/targets/cargo/aliases +++ b/tests/integration/targets/cargo/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group2 skip/aix diff --git a/tests/integration/targets/cargo/meta/main.yml b/tests/integration/targets/cargo/meta/main.yml index b63c3d017c..2fcd152f95 100644 --- a/tests/integration/targets/cargo/meta/main.yml +++ b/tests/integration/targets/cargo/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/cargo/tasks/main.yml b/tests/integration/targets/cargo/tasks/main.yml index bc43380e81..bb22e27c07 100644 --- a/tests/integration/targets/cargo/tasks/main.yml +++ b/tests/integration/targets/cargo/tasks/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup.yml - name: Set default environment set_fact: diff --git a/tests/integration/targets/cargo/tasks/setup.yml b/tests/integration/targets/cargo/tasks/setup.yml index 5315349c12..232658ab46 100644 --- a/tests/integration/targets/cargo/tasks/setup.yml +++ b/tests/integration/targets/cargo/tasks/setup.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - name: Install cargo package: diff --git a/tests/integration/targets/cargo/tasks/test_general.yml b/tests/integration/targets/cargo/tasks/test_general.yml index dfc699a88c..e07264b517 100644 --- a/tests/integration/targets/cargo/tasks/test_general.yml +++ b/tests/integration/targets/cargo/tasks/test_general.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Ensure application helloworld is uninstalled community.general.cargo: state: absent diff --git a/tests/integration/targets/cargo/tasks/test_version.yml b/tests/integration/targets/cargo/tasks/test_version.yml index 1db9d786dc..c1ab8e198d 100644 --- a/tests/integration/targets/cargo/tasks/test_version.yml +++ b/tests/integration/targets/cargo/tasks/test_version.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install application helloworld-yliu 0.1.0 community.general.cargo: name: helloworld-yliu diff --git a/tests/integration/targets/cloud_init_data_facts/aliases b/tests/integration/targets/cloud_init_data_facts/aliases index 1a7dd323f6..ce552edd9c 100644 --- a/tests/integration/targets/cloud_init_data_facts/aliases +++ b/tests/integration/targets/cloud_init_data_facts/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/cloud_init_data_facts/meta/main.yml b/tests/integration/targets/cloud_init_data_facts/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/cloud_init_data_facts/meta/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/cmd_runner/aliases b/tests/integration/targets/cmd_runner/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/cmd_runner/aliases +++ b/tests/integration/targets/cmd_runner/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml b/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml index ec4375e233..1c2caf2b5a 100644 --- a/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml +++ b/tests/integration/targets/cmd_runner/tasks/test_cmd_echo.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: test cmd_echo [{{ item.name }}] cmd_echo: arg_formats: "{{ item.arg_formats|default(omit) }}" diff --git a/tests/integration/targets/connection/aliases b/tests/integration/targets/connection/aliases index 136c05e0d0..a02a2d61a1 100644 --- a/tests/integration/targets/connection/aliases +++ b/tests/integration/targets/connection/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + hidden diff --git a/tests/integration/targets/connection/test.sh b/tests/integration/targets/connection/test.sh index 334a16361d..793a85dd38 100755 --- a/tests/integration/targets/connection/test.sh +++ b/tests/integration/targets/connection/test.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/connection/test_connection.yml b/tests/integration/targets/connection/test_connection.yml index a662e576ab..157a7821ba 100644 --- a/tests/integration/targets/connection/test_connection.yml +++ b/tests/integration/targets/connection/test_connection.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: "{{ target_hosts }}" gather_facts: no serial: 1 diff --git a/tests/integration/targets/connection_chroot/aliases b/tests/integration/targets/connection_chroot/aliases index c460dc3740..847f93469a 100644 --- a/tests/integration/targets/connection_chroot/aliases +++ b/tests/integration/targets/connection_chroot/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/root shippable/posix/group3 skip/macos # Skipped due to limitation of macOS 10.15 SIP, please read https://github.com/ansible-collections/community.general/issues/1017#issuecomment-755088895 diff --git a/tests/integration/targets/connection_jail/aliases b/tests/integration/targets/connection_jail/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/connection_jail/aliases +++ b/tests/integration/targets/connection_jail/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/connection_lxc/aliases b/tests/integration/targets/connection_lxc/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/connection_lxc/aliases +++ b/tests/integration/targets/connection_lxc/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/connection_lxd/aliases b/tests/integration/targets/connection_lxd/aliases index 33b258daef..5a0c470323 100644 --- a/tests/integration/targets/connection_lxd/aliases +++ b/tests/integration/targets/connection_lxd/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + non_local unsupported diff --git a/tests/integration/targets/connection_posix/aliases b/tests/integration/targets/connection_posix/aliases index f5e09799b1..44561e2ff3 100644 --- a/tests/integration/targets/connection_posix/aliases +++ b/tests/integration/targets/connection_posix/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/target/connection hidden diff --git a/tests/integration/targets/connection_posix/test.sh b/tests/integration/targets/connection_posix/test.sh index d3976ff30b..9f31da64db 100755 --- a/tests/integration/targets/connection_posix/test.sh +++ b/tests/integration/targets/connection_posix/test.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/consul/aliases b/tests/integration/targets/consul/aliases index cc24e932c9..3b6b148f7e 100644 --- a/tests/integration/targets/consul/aliases +++ b/tests/integration/targets/consul/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 destructive skip/aix diff --git a/tests/integration/targets/consul/meta/main.yml b/tests/integration/targets/consul/meta/main.yml index e54aea9798..0909be2064 100644 --- a/tests/integration/targets/consul/meta/main.yml +++ b/tests/integration/targets/consul/meta/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_openssl diff --git a/tests/integration/targets/consul/tasks/consul_session.yml b/tests/integration/targets/consul/tasks/consul_session.yml index 5feeb07c0d..059e0a584a 100644 --- a/tests/integration/targets/consul/tasks/consul_session.yml +++ b/tests/integration/targets/consul/tasks/consul_session.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: list sessions consul_session: state: list diff --git a/tests/integration/targets/copr/aliases b/tests/integration/targets/copr/aliases index 0ad5e1c80c..836e186b55 100644 --- a/tests/integration/targets/copr/aliases +++ b/tests/integration/targets/copr/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 needs/root skip/macos diff --git a/tests/integration/targets/copr/tasks/main.yml b/tests/integration/targets/copr/tasks/main.yml index 1c8afd992f..ac78255d48 100644 --- a/tests/integration/targets/copr/tasks/main.yml +++ b/tests/integration/targets/copr/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - when: ansible_distribution == 'Fedora' block: - name: enable copr project diff --git a/tests/integration/targets/cpanm/aliases b/tests/integration/targets/cpanm/aliases index d014dd3438..73181a8621 100644 --- a/tests/integration/targets/cpanm/aliases +++ b/tests/integration/targets/cpanm/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 destructive skip/macos diff --git a/tests/integration/targets/cpanm/meta/main.yml b/tests/integration/targets/cpanm/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/cpanm/meta/main.yml +++ b/tests/integration/targets/cpanm/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/cronvar/aliases b/tests/integration/targets/cronvar/aliases index 1c80472f94..77e5c4afa2 100644 --- a/tests/integration/targets/cronvar/aliases +++ b/tests/integration/targets/cronvar/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/cronvar/defaults/main.yml b/tests/integration/targets/cronvar/defaults/main.yml index a22230ab66..11ef47d9d9 100644 --- a/tests/integration/targets/cronvar/defaults/main.yml +++ b/tests/integration/targets/cronvar/defaults/main.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_config_path: /etc/cron.d diff --git a/tests/integration/targets/cronvar/meta/main.yml b/tests/integration/targets/cronvar/meta/main.yml index 2d2436a168..92d116f2a9 100644 --- a/tests/integration/targets/cronvar/meta/main.yml +++ b/tests/integration/targets/cronvar/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_cron diff --git a/tests/integration/targets/deploy_helper/aliases b/tests/integration/targets/deploy_helper/aliases index a6dafcf8cd..abc0d5476d 100644 --- a/tests/integration/targets/deploy_helper/aliases +++ b/tests/integration/targets/deploy_helper/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 diff --git a/tests/integration/targets/deploy_helper/meta/main.yml b/tests/integration/targets/deploy_helper/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/deploy_helper/meta/main.yml +++ b/tests/integration/targets/deploy_helper/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/discord/aliases b/tests/integration/targets/discord/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/discord/aliases +++ b/tests/integration/targets/discord/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/discord/defaults/main.yml b/tests/integration/targets/discord/defaults/main.yml index bf2b818178..ef01141ca0 100644 --- a/tests/integration/targets/discord/defaults/main.yml +++ b/tests/integration/targets/discord/defaults/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + discord_id: 000 discord_token: xxx diff --git a/tests/integration/targets/django_manage/aliases b/tests/integration/targets/django_manage/aliases index 174bc11337..0e2bbfeb8e 100644 --- a/tests/integration/targets/django_manage/aliases +++ b/tests/integration/targets/django_manage/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2 skip/freebsd diff --git a/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/core/settings.py b/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/core/settings.py index 62107209ba..881221c066 100644 --- a/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/core/settings.py +++ b/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/core/settings.py @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # single_app_project/core/settings.py SECRET_KEY = 'testtesttesttesttest' diff --git a/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/manage.py b/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/manage.py index 1f5463a26b..4b4eddcb67 100755 --- a/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/manage.py +++ b/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/manage.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py index ea2cb4cd22..be3140f44d 100755 --- a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py +++ b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/__init__.py b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py index f2472c1fe8..1b98a0dbff 100644 --- a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py +++ b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/urls.py b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/urls.py index 6710c0b7aa..36cb592756 100644 --- a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/urls.py +++ b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/urls.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/django_manage/meta/main.yml b/tests/integration/targets/django_manage/meta/main.yml index b63c3d017c..2fcd152f95 100644 --- a/tests/integration/targets/django_manage/meta/main.yml +++ b/tests/integration/targets/django_manage/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/dnf_versionlock/aliases b/tests/integration/targets/dnf_versionlock/aliases index abe0a21e22..3cde3b1715 100644 --- a/tests/integration/targets/dnf_versionlock/aliases +++ b/tests/integration/targets/dnf_versionlock/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/dnf_versionlock/tasks/install.yml b/tests/integration/targets/dnf_versionlock/tasks/install.yml index 8cdcc76e06..9773d87dc0 100644 --- a/tests/integration/targets/dnf_versionlock/tasks/install.yml +++ b/tests/integration/targets/dnf_versionlock/tasks/install.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install dnf versionlock plugin dnf: name: dnf-plugin-versionlock diff --git a/tests/integration/targets/dnf_versionlock/tasks/lock_bash.yml b/tests/integration/targets/dnf_versionlock/tasks/lock_bash.yml index 14db0388cb..56357e01c6 100644 --- a/tests/integration/targets/dnf_versionlock/tasks/lock_bash.yml +++ b/tests/integration/targets/dnf_versionlock/tasks/lock_bash.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Clear locklist community.general.dnf_versionlock: state: clean diff --git a/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml b/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml index 36130f1666..edbfcabd40 100644 --- a/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml +++ b/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Check packages with updates dnf: list: updates diff --git a/tests/integration/targets/dnf_versionlock/tasks/main.yml b/tests/integration/targets/dnf_versionlock/tasks/main.yml index efee237b69..51e823ffd7 100644 --- a/tests/integration/targets/dnf_versionlock/tasks/main.yml +++ b/tests/integration/targets/dnf_versionlock/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - include_tasks: install.yml - include_tasks: lock_bash.yml diff --git a/tests/integration/targets/dpkg_divert/aliases b/tests/integration/targets/dpkg_divert/aliases index 6ab0a081c8..39a9de2b1b 100644 --- a/tests/integration/targets/dpkg_divert/aliases +++ b/tests/integration/targets/dpkg_divert/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/osx diff --git a/tests/integration/targets/dpkg_divert/tasks/prepare.yml b/tests/integration/targets/dpkg_divert/tasks/prepare.yml index f30d14a175..7697d0fd2d 100644 --- a/tests/integration/targets/dpkg_divert/tasks/prepare.yml +++ b/tests/integration/targets/dpkg_divert/tasks/prepare.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "set variables for the entire playbook" set_fact: foobarrc: "{{ foobarrc }}" diff --git a/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml b/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml index c23db91d56..0668a8aa02 100644 --- a/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml +++ b/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ################################################################################ # TEST 01: state=present diff --git a/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml b/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml index 69a46a8a20..077004029d 100644 --- a/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml +++ b/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ################################################################################ # TEST 05: rename=yes, state=present diff --git a/tests/integration/targets/etcd3/aliases b/tests/integration/targets/etcd3/aliases index 949f4250c7..b8da295be8 100644 --- a/tests/integration/targets/etcd3/aliases +++ b/tests/integration/targets/etcd3/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 destructive skip/aix diff --git a/tests/integration/targets/etcd3/meta/main.yml b/tests/integration/targets/etcd3/meta/main.yml index 48987c5426..f922f5506d 100644 --- a/tests/integration/targets/etcd3/meta/main.yml +++ b/tests/integration/targets/etcd3/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_etcd3 diff --git a/tests/integration/targets/filesize/aliases b/tests/integration/targets/filesize/aliases index a6dafcf8cd..abc0d5476d 100644 --- a/tests/integration/targets/filesize/aliases +++ b/tests/integration/targets/filesize/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 diff --git a/tests/integration/targets/filesize/defaults/main.yml b/tests/integration/targets/filesize/defaults/main.yml index b575e029f0..d51108276a 100644 --- a/tests/integration/targets/filesize/defaults/main.yml +++ b/tests/integration/targets/filesize/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + filesize_testdir: "/tmp/testdir" filesize_testfile: "{{ filesize_testdir }}/testfile" filesize_testlink: "{{ filesize_testdir }}/testlink" diff --git a/tests/integration/targets/filesize/tasks/basics.yml b/tests/integration/targets/filesize/tasks/basics.yml index 1d5281b7e1..ac99778a30 100644 --- a/tests/integration/targets/filesize/tasks/basics.yml +++ b/tests/integration/targets/filesize/tasks/basics.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Test module with basic parameters. # Create a file, grow it, reduce it to its initial size and check the match # between initial and final checksums. Also check size formats consistency diff --git a/tests/integration/targets/filesize/tasks/errors.yml b/tests/integration/targets/filesize/tasks/errors.yml index ffb17d6187..ba65934e5a 100644 --- a/tests/integration/targets/filesize/tasks/errors.yml +++ b/tests/integration/targets/filesize/tasks/errors.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Check error handling of the module. # 1. Missing or unknown parameters # 2. Wrong values (missing source device, invalid size...) diff --git a/tests/integration/targets/filesize/tasks/floats.yml b/tests/integration/targets/filesize/tasks/floats.yml index cf24b1b845..d7b5a4c9a7 100644 --- a/tests/integration/targets/filesize/tasks/floats.yml +++ b/tests/integration/targets/filesize/tasks/floats.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Test module with floating point numbers (ensure they're not rounded too # wrongly), since in python floats are tricky: # 256.256 * 1000 == 256255.9999999997 diff --git a/tests/integration/targets/filesize/tasks/sparse.yml b/tests/integration/targets/filesize/tasks/sparse.yml index 6f864c2d15..9a8a9cfe90 100644 --- a/tests/integration/targets/filesize/tasks/sparse.yml +++ b/tests/integration/targets/filesize/tasks/sparse.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Test module with sparse files - name: Create a huge sparse file of 4TB (check mode) diff --git a/tests/integration/targets/filesize/tasks/symlinks.yml b/tests/integration/targets/filesize/tasks/symlinks.yml index 61666497ff..ee75777101 100644 --- a/tests/integration/targets/filesize/tasks/symlinks.yml +++ b/tests/integration/targets/filesize/tasks/symlinks.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Check that the module works with symlinks, as expected, i.e. as dd does: # follow symlinks. diff --git a/tests/integration/targets/filesystem/aliases b/tests/integration/targets/filesystem/aliases index 1ef4c3619a..86d2291bb5 100644 --- a/tests/integration/targets/filesystem/aliases +++ b/tests/integration/targets/filesystem/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/filesystem/defaults/main.yml b/tests/integration/targets/filesystem/defaults/main.yml index 8b2928012b..edbf3c22f5 100644 --- a/tests/integration/targets/filesystem/defaults/main.yml +++ b/tests/integration/targets/filesystem/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + tested_filesystems: # key: fstype # fssize: size (Mo) diff --git a/tests/integration/targets/filesystem/meta/main.yml b/tests/integration/targets/filesystem/meta/main.yml index 7853656a5b..ca1915e05c 100644 --- a/tests/integration/targets/filesystem/meta/main.yml +++ b/tests/integration/targets/filesystem/meta/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/filesystem/tasks/create_device.yml b/tests/integration/targets/filesystem/tasks/create_device.yml index ae314221a5..5229e19f25 100644 --- a/tests/integration/targets/filesystem/tasks/create_device.yml +++ b/tests/integration/targets/filesystem/tasks/create_device.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 'Create a "disk" file' community.general.filesize: path: '{{ image_file }}' diff --git a/tests/integration/targets/filesystem/tasks/create_fs.yml b/tests/integration/targets/filesystem/tasks/create_fs.yml index 23f6e526c2..82f92f4cc3 100644 --- a/tests/integration/targets/filesystem/tasks/create_fs.yml +++ b/tests/integration/targets/filesystem/tasks/create_fs.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Create filesystem ({{ fstype }})" community.general.filesystem: dev: '{{ dev }}' diff --git a/tests/integration/targets/filesystem/tasks/freebsd_setup.yml b/tests/integration/targets/filesystem/tasks/freebsd_setup.yml index e08beca4a8..03fef66e66 100644 --- a/tests/integration/targets/filesystem/tasks/freebsd_setup.yml +++ b/tests/integration/targets/filesystem/tasks/freebsd_setup.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Uninstall e2fsprogs" ansible.builtin.package: name: e2fsprogs diff --git a/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml b/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml index 83a623fa75..25bc9a0699 100644 --- a/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml +++ b/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 'Recreate "disk" file' community.general.filesize: path: '{{ image_file }}' diff --git a/tests/integration/targets/filesystem/tasks/remove_fs.yml b/tests/integration/targets/filesystem/tasks/remove_fs.yml index 3127dce559..aaa78ae563 100644 --- a/tests/integration/targets/filesystem/tasks/remove_fs.yml +++ b/tests/integration/targets/filesystem/tasks/remove_fs.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # We assume 'create_fs' tests have passed. - name: "Create filesystem" diff --git a/tests/integration/targets/filesystem/tasks/setup.yml b/tests/integration/targets/filesystem/tasks/setup.yml index b39b5418b6..97dafaeeec 100644 --- a/tests/integration/targets/filesystem/tasks/setup.yml +++ b/tests/integration/targets/filesystem/tasks/setup.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # By installing e2fsprogs on FreeBSD, we get a usable blkid command, but this # package conflicts with util-linux, that provides blkid too, but also wipefs # (required for filesystem state=absent). diff --git a/tests/integration/targets/filesystem/vars/Ubuntu-14.04.yml b/tests/integration/targets/filesystem/vars/Ubuntu-14.04.yml index e2ead0bf9d..d0cc5f2295 100644 --- a/tests/integration/targets/filesystem/vars/Ubuntu-14.04.yml +++ b/tests/integration/targets/filesystem/vars/Ubuntu-14.04.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ocfs2_fssize: 108 f2fs_fssize: 116 diff --git a/tests/integration/targets/filesystem/vars/default.yml b/tests/integration/targets/filesystem/vars/default.yml index 85b052d4c2..80151e40e5 100644 --- a/tests/integration/targets/filesystem/vars/default.yml +++ b/tests/integration/targets/filesystem/vars/default.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ocfs2_fssize: 20 diff --git a/tests/integration/targets/filter_counter/aliases b/tests/integration/targets/filter_counter/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_counter/aliases +++ b/tests/integration/targets/filter_counter/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_dict/aliases b/tests/integration/targets/filter_dict/aliases index 3e81d77f98..2ae66ec51c 100644 --- a/tests/integration/targets/filter_dict/aliases +++ b/tests/integration/targets/filter_dict/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_dict/tasks/main.yml b/tests/integration/targets/filter_dict/tasks/main.yml index ab88d3ff3f..7b4cefde91 100644 --- a/tests/integration/targets/filter_dict/tasks/main.yml +++ b/tests/integration/targets/filter_dict/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Test dict filter" assert: that: diff --git a/tests/integration/targets/filter_dict_kv/aliases b/tests/integration/targets/filter_dict_kv/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_dict_kv/aliases +++ b/tests/integration/targets/filter_dict_kv/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_from_csv/aliases b/tests/integration/targets/filter_from_csv/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_from_csv/aliases +++ b/tests/integration/targets/filter_from_csv/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_from_csv/vars/main.yml b/tests/integration/targets/filter_from_csv/vars/main.yml index 5801bc20dc..7212c5aee4 100644 --- a/tests/integration/targets/filter_from_csv/vars/main.yml +++ b/tests/integration/targets/filter_from_csv/vars/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + valid_comma_separated: | id,name,role 1,foo,bar diff --git a/tests/integration/targets/filter_groupby_as_dict/aliases b/tests/integration/targets/filter_groupby_as_dict/aliases index 3e81d77f98..2ae66ec51c 100644 --- a/tests/integration/targets/filter_groupby_as_dict/aliases +++ b/tests/integration/targets/filter_groupby_as_dict/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_groupby_as_dict/tasks/main.yml b/tests/integration/targets/filter_groupby_as_dict/tasks/main.yml index 219e047d4d..f4047f4ac6 100644 --- a/tests/integration/targets/filter_groupby_as_dict/tasks/main.yml +++ b/tests/integration/targets/filter_groupby_as_dict/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test functionality assert: that: diff --git a/tests/integration/targets/filter_groupby_as_dict/vars/main.yml b/tests/integration/targets/filter_groupby_as_dict/vars/main.yml index 15d38a351a..74e24dd3c7 100644 --- a/tests/integration/targets/filter_groupby_as_dict/vars/main.yml +++ b/tests/integration/targets/filter_groupby_as_dict/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list1: - name: a x: y diff --git a/tests/integration/targets/filter_hashids/aliases b/tests/integration/targets/filter_hashids/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_hashids/aliases +++ b/tests/integration/targets/filter_hashids/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_hashids/runme.sh b/tests/integration/targets/filter_hashids/runme.sh index 38b40e8ff3..c7a215a062 100755 --- a/tests/integration/targets/filter_hashids/runme.sh +++ b/tests/integration/targets/filter_hashids/runme.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/filter_hashids/runme.yml b/tests/integration/targets/filter_hashids/runme.yml index b2a39e27a6..3ac0e388f3 100644 --- a/tests/integration/targets/filter_hashids/runme.yml +++ b/tests/integration/targets/filter_hashids/runme.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost roles: - { role: filter_hashids } diff --git a/tests/integration/targets/filter_hashids/vars/main.yml b/tests/integration/targets/filter_hashids/vars/main.yml index 3f2b0c5f98..db65ef5622 100644 --- a/tests/integration/targets/filter_hashids/vars/main.yml +++ b/tests/integration/targets/filter_hashids/vars/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + single_int: 1 int_list: [1, 2, 3] single_float: [2.718] diff --git a/tests/integration/targets/filter_jc/aliases b/tests/integration/targets/filter_jc/aliases index f49c8c7f6a..49b40f054d 100644 --- a/tests/integration/targets/filter_jc/aliases +++ b/tests/integration/targets/filter_jc/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller skip/python2.7 # jc only supports python3.x diff --git a/tests/integration/targets/filter_jc/runme.sh b/tests/integration/targets/filter_jc/runme.sh index 17c5beca9d..c427b8b353 100755 --- a/tests/integration/targets/filter_jc/runme.sh +++ b/tests/integration/targets/filter_jc/runme.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/filter_jc/runme.yml b/tests/integration/targets/filter_jc/runme.yml index c624d120bb..6d6a89c002 100644 --- a/tests/integration/targets/filter_jc/runme.yml +++ b/tests/integration/targets/filter_jc/runme.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost roles: - { role: filter_jc } diff --git a/tests/integration/targets/filter_json_query/aliases b/tests/integration/targets/filter_json_query/aliases index 1603f4351b..08d571c495 100644 --- a/tests/integration/targets/filter_json_query/aliases +++ b/tests/integration/targets/filter_json_query/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller skip/aix diff --git a/tests/integration/targets/filter_json_query/runme.sh b/tests/integration/targets/filter_json_query/runme.sh index a0db5e5400..b1fa994b36 100755 --- a/tests/integration/targets/filter_json_query/runme.sh +++ b/tests/integration/targets/filter_json_query/runme.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/filter_json_query/runme.yml b/tests/integration/targets/filter_json_query/runme.yml index 68f6372c2f..28281cffb4 100644 --- a/tests/integration/targets/filter_json_query/runme.yml +++ b/tests/integration/targets/filter_json_query/runme.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost roles: - { role: filter_json_query } diff --git a/tests/integration/targets/filter_json_query/vars/main.yml b/tests/integration/targets/filter_json_query/vars/main.yml index 36964115b4..1edd723be6 100644 --- a/tests/integration/targets/filter_json_query/vars/main.yml +++ b/tests/integration/targets/filter_json_query/vars/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + users: - name: steve hosts: diff --git a/tests/integration/targets/filter_lists_mergeby/aliases b/tests/integration/targets/filter_lists_mergeby/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_lists_mergeby/aliases +++ b/tests/integration/targets/filter_lists_mergeby/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_2-10.yml b/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_2-10.yml index 3a53f4033b..62896e1b01 100644 --- a/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_2-10.yml +++ b/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_2-10.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: 101.Merge 2 lists by attribute name. list_merge='keep' block: diff --git a/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_default.yml b/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_default.yml index 5c634a9235..93917c97cc 100644 --- a/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_default.yml +++ b/tests/integration/targets/filter_lists_mergeby/tasks/lists_mergeby_default.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Debug ansible_version debug: diff --git a/tests/integration/targets/filter_lists_mergeby/tasks/main.yml b/tests/integration/targets/filter_lists_mergeby/tasks/main.yml index 87f0e350c4..d0bda368cd 100644 --- a/tests/integration/targets/filter_lists_mergeby/tasks/main.yml +++ b/tests/integration/targets/filter_lists_mergeby/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test list_merge default options import_tasks: lists_mergeby_default.yml diff --git a/tests/integration/targets/filter_lists_mergeby/vars/main.yml b/tests/integration/targets/filter_lists_mergeby/vars/main.yml index 83d831f278..f3b4928786 100644 --- a/tests/integration/targets/filter_lists_mergeby/vars/main.yml +++ b/tests/integration/targets/filter_lists_mergeby/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + list1: - name: myname01 param01: myparam01 diff --git a/tests/integration/targets/filter_path_join_shim/aliases b/tests/integration/targets/filter_path_join_shim/aliases index b167317cfe..b7419a24dd 100644 --- a/tests/integration/targets/filter_path_join_shim/aliases +++ b/tests/integration/targets/filter_path_join_shim/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_path_join_shim/tasks/main.yml b/tests/integration/targets/filter_path_join_shim/tasks/main.yml index 5f9eff3d4b..1462656fb5 100644 --- a/tests/integration/targets/filter_path_join_shim/tasks/main.yml +++ b/tests/integration/targets/filter_path_join_shim/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Test path_join filter" assert: that: diff --git a/tests/integration/targets/filter_random_mac/aliases b/tests/integration/targets/filter_random_mac/aliases index 1603f4351b..08d571c495 100644 --- a/tests/integration/targets/filter_random_mac/aliases +++ b/tests/integration/targets/filter_random_mac/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller skip/aix diff --git a/tests/integration/targets/filter_random_mac/meta/main.yml b/tests/integration/targets/filter_random_mac/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/filter_random_mac/meta/main.yml +++ b/tests/integration/targets/filter_random_mac/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/filter_time/aliases b/tests/integration/targets/filter_time/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_time/aliases +++ b/tests/integration/targets/filter_time/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_unicode_normalize/aliases b/tests/integration/targets/filter_unicode_normalize/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_unicode_normalize/aliases +++ b/tests/integration/targets/filter_unicode_normalize/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_unicode_normalize/vars/main.yml b/tests/integration/targets/filter_unicode_normalize/vars/main.yml index 88d19b20db..ed4e2968bb 100644 --- a/tests/integration/targets/filter_unicode_normalize/vars/main.yml +++ b/tests/integration/targets/filter_unicode_normalize/vars/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + u_umlaut: "{{ '\u00fc' }}" u_umlaut_combining: "{{ 'u' + '\u0308' }}" roman_numeral_one: "{{ '\u2160' }}" diff --git a/tests/integration/targets/filter_version_sort/aliases b/tests/integration/targets/filter_version_sort/aliases index f04737b845..d3b8ee2b84 100644 --- a/tests/integration/targets/filter_version_sort/aliases +++ b/tests/integration/targets/filter_version_sort/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/flatpak/aliases b/tests/integration/targets/flatpak/aliases index 39291d435b..3ac0267953 100644 --- a/tests/integration/targets/flatpak/aliases +++ b/tests/integration/targets/flatpak/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 destructive skip/aix diff --git a/tests/integration/targets/flatpak/files/serve.py b/tests/integration/targets/flatpak/files/serve.py index d9ca2d17a5..93df1036e2 100644 --- a/tests/integration/targets/flatpak/files/serve.py +++ b/tests/integration/targets/flatpak/files/serve.py @@ -1,4 +1,8 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/integration/targets/flatpak/meta/main.yml b/tests/integration/targets/flatpak/meta/main.yml index 258cd4345c..0ac87654df 100644 --- a/tests/integration/targets/flatpak/meta/main.yml +++ b/tests/integration/targets/flatpak/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_flatpak_remote diff --git a/tests/integration/targets/flatpak/tasks/check_mode.yml b/tests/integration/targets/flatpak/tasks/check_mode.yml index 2270e0a9be..9f52dc1229 100644 --- a/tests/integration/targets/flatpak/tasks/check_mode.yml +++ b/tests/integration/targets/flatpak/tasks/check_mode.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # - Tests with absent flatpak -------------------------------------------------- # state=present on absent flatpak diff --git a/tests/integration/targets/flatpak/tasks/setup.yml b/tests/integration/targets/flatpak/tasks/setup.yml index decf20d166..4dfdd68cb9 100644 --- a/tests/integration/targets/flatpak/tasks/setup.yml +++ b/tests/integration/targets/flatpak/tasks/setup.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install flatpak on Fedora dnf: name: flatpak diff --git a/tests/integration/targets/flatpak/tasks/test.yml b/tests/integration/targets/flatpak/tasks/test.yml index e1bfdbee09..29c4efbe95 100644 --- a/tests/integration/targets/flatpak/tasks/test.yml +++ b/tests/integration/targets/flatpak/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # state=present - name: Test addition - {{ method }} diff --git a/tests/integration/targets/flatpak_remote/aliases b/tests/integration/targets/flatpak_remote/aliases index 39291d435b..3ac0267953 100644 --- a/tests/integration/targets/flatpak_remote/aliases +++ b/tests/integration/targets/flatpak_remote/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 destructive skip/aix diff --git a/tests/integration/targets/flatpak_remote/meta/main.yml b/tests/integration/targets/flatpak_remote/meta/main.yml index 258cd4345c..0ac87654df 100644 --- a/tests/integration/targets/flatpak_remote/meta/main.yml +++ b/tests/integration/targets/flatpak_remote/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_flatpak_remote diff --git a/tests/integration/targets/flatpak_remote/tasks/check_mode.yml b/tests/integration/targets/flatpak_remote/tasks/check_mode.yml index 1f4def86d9..9331531503 100644 --- a/tests/integration/targets/flatpak_remote/tasks/check_mode.yml +++ b/tests/integration/targets/flatpak_remote/tasks/check_mode.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # - Tests with absent flatpak remote ------------------------------------------- # state=present diff --git a/tests/integration/targets/flatpak_remote/tasks/setup.yml b/tests/integration/targets/flatpak_remote/tasks/setup.yml index 65e060f57d..83f344cc40 100644 --- a/tests/integration/targets/flatpak_remote/tasks/setup.yml +++ b/tests/integration/targets/flatpak_remote/tasks/setup.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install flatpak on Fedora dnf: name: flatpak diff --git a/tests/integration/targets/flatpak_remote/tasks/test.yml b/tests/integration/targets/flatpak_remote/tasks/test.yml index 66c43649b4..134eead173 100644 --- a/tests/integration/targets/flatpak_remote/tasks/test.yml +++ b/tests/integration/targets/flatpak_remote/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # state=present - name: Test addition - {{ method }} diff --git a/tests/integration/targets/gandi_livedns/aliases b/tests/integration/targets/gandi_livedns/aliases index 3ff69ca3a0..f69a127f4d 100644 --- a/tests/integration/targets/gandi_livedns/aliases +++ b/tests/integration/targets/gandi_livedns/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/gandi unsupported diff --git a/tests/integration/targets/gandi_livedns/defaults/main.yml b/tests/integration/targets/gandi_livedns/defaults/main.yml index 2ca3f8a1ba..ec1808d8b5 100644 --- a/tests/integration/targets/gandi_livedns/defaults/main.yml +++ b/tests/integration/targets/gandi_livedns/defaults/main.yml @@ -1,9 +1,11 @@ +--- # Copyright (c) 2020 Gregory Thiemonge # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + gandi_livedns_domain_name: "ansible-tests.org" gandi_livedns_record_items: + # Single A record - record: test-www type: A diff --git a/tests/integration/targets/gandi_livedns/tasks/create_record.yml b/tests/integration/targets/gandi_livedns/tasks/create_record.yml index eecc957be3..9d764a4198 100644 --- a/tests/integration/targets/gandi_livedns/tasks/create_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/create_record.yml @@ -1,7 +1,8 @@ +--- # Copyright (c) 2020 Gregory Thiemonge # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - name: test absent dns record community.general.gandi_livedns: api_key: "{{ gandi_api_key }}" diff --git a/tests/integration/targets/gandi_livedns/tasks/main.yml b/tests/integration/targets/gandi_livedns/tasks/main.yml index 5e6138d41f..19ba4d8fbf 100644 --- a/tests/integration/targets/gandi_livedns/tasks/main.yml +++ b/tests/integration/targets/gandi_livedns/tasks/main.yml @@ -1,6 +1,7 @@ +--- # Copyright (c) 2020 Gregory Thiemonge # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - include_tasks: record.yml with_items: "{{ gandi_livedns_record_items }}" diff --git a/tests/integration/targets/gandi_livedns/tasks/record.yml b/tests/integration/targets/gandi_livedns/tasks/record.yml index dd790fce24..d36e2e8574 100644 --- a/tests/integration/targets/gandi_livedns/tasks/record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/record.yml @@ -1,7 +1,8 @@ +--- # Copyright (c) 2020 Gregory Thiemonge # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - include_tasks: create_record.yml - include_tasks: update_record.yml - include_tasks: remove_record.yml diff --git a/tests/integration/targets/gandi_livedns/tasks/remove_record.yml b/tests/integration/targets/gandi_livedns/tasks/remove_record.yml index e68f9b2cfb..6f497d2375 100644 --- a/tests/integration/targets/gandi_livedns/tasks/remove_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/remove_record.yml @@ -1,7 +1,8 @@ +--- # Copyright (c) 2020 Gregory Thiemonge # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - name: test remove a dns record in check mode community.general.gandi_livedns: api_key: "{{ gandi_api_key }}" diff --git a/tests/integration/targets/gandi_livedns/tasks/update_record.yml b/tests/integration/targets/gandi_livedns/tasks/update_record.yml index 7d243bd4ac..7489059de1 100644 --- a/tests/integration/targets/gandi_livedns/tasks/update_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/update_record.yml @@ -1,7 +1,8 @@ +--- # Copyright (c) 2020 Gregory Thiemonge # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - name: test update or add another dns record in check mode community.general.gandi_livedns: api_key: "{{ gandi_api_key }}" diff --git a/tests/integration/targets/gem/aliases b/tests/integration/targets/gem/aliases index 1ef4c3619a..86d2291bb5 100644 --- a/tests/integration/targets/gem/aliases +++ b/tests/integration/targets/gem/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/gem/meta/main.yml b/tests/integration/targets/gem/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/gem/meta/main.yml +++ b/tests/integration/targets/gem/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/gem/vars/FreeBSD.yml b/tests/integration/targets/gem/vars/FreeBSD.yml index 84e0b483d5..b9d9cc2c23 100644 --- a/tests/integration/targets/gem/vars/FreeBSD.yml +++ b/tests/integration/targets/gem/vars/FreeBSD.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + test_packages: - "devel/ruby-gems" - "ruby" diff --git a/tests/integration/targets/gem/vars/RedHat.yml b/tests/integration/targets/gem/vars/RedHat.yml index c044d109b6..2bb724bfe3 100644 --- a/tests/integration/targets/gem/vars/RedHat.yml +++ b/tests/integration/targets/gem/vars/RedHat.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + test_packages: - "rubygems" diff --git a/tests/integration/targets/gem/vars/default.yml b/tests/integration/targets/gem/vars/default.yml index 7d6e61ac46..b7496e12cd 100644 --- a/tests/integration/targets/gem/vars/default.yml +++ b/tests/integration/targets/gem/vars/default.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + test_packages: [] diff --git a/tests/integration/targets/git_config/aliases b/tests/integration/targets/git_config/aliases index 114ac22bb1..806c0598a4 100644 --- a/tests/integration/targets/git_config/aliases +++ b/tests/integration/targets/git_config/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 skip/aix destructive diff --git a/tests/integration/targets/git_config/meta/main.yml b/tests/integration/targets/git_config/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/git_config/meta/main.yml +++ b/tests/integration/targets/git_config/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml b/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml index 09a6beee3e..d908f6e737 100644 --- a/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml +++ b/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_no_value.yml - name: testing exclusion between state and list_all parameters diff --git a/tests/integration/targets/git_config/tasks/get_set_no_state.yml b/tests/integration/targets/git_config/tasks/get_set_no_state.yml index 7e9714a75e..4e41bf4e9d 100644 --- a/tests/integration/targets/git_config/tasks/get_set_no_state.yml +++ b/tests/integration/targets/git_config/tasks/get_set_no_state.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_no_value.yml - name: setting value without state diff --git a/tests/integration/targets/git_config/tasks/get_set_state_present.yml b/tests/integration/targets/git_config/tasks/get_set_state_present.yml index 52d986d633..cfc3bbe78d 100644 --- a/tests/integration/targets/git_config/tasks/get_set_state_present.yml +++ b/tests/integration/targets/git_config/tasks/get_set_state_present.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_no_value.yml - name: setting value with state=present diff --git a/tests/integration/targets/git_config/tasks/get_set_state_present_file.yml b/tests/integration/targets/git_config/tasks/get_set_state_present_file.yml index 5d46ed35c5..a61ffcc68c 100644 --- a/tests/integration/targets/git_config/tasks/get_set_state_present_file.yml +++ b/tests/integration/targets/git_config/tasks/get_set_state_present_file.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_no_value.yml - name: setting value with state=present diff --git a/tests/integration/targets/git_config/tasks/precedence_between_unset_and_value.yml b/tests/integration/targets/git_config/tasks/precedence_between_unset_and_value.yml index 9eb4ca4034..a76fbab9cd 100644 --- a/tests/integration/targets/git_config/tasks/precedence_between_unset_and_value.yml +++ b/tests/integration/targets/git_config/tasks/precedence_between_unset_and_value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_value.yml - name: unsetting value diff --git a/tests/integration/targets/git_config/tasks/set_value_with_tilde.yml b/tests/integration/targets/git_config/tasks/set_value_with_tilde.yml index f55eb73066..f78e709bde 100644 --- a/tests/integration/targets/git_config/tasks/set_value_with_tilde.yml +++ b/tests/integration/targets/git_config/tasks/set_value_with_tilde.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + #- import_tasks: setup_no_value.yml - name: setting value diff --git a/tests/integration/targets/git_config/tasks/setup.yml b/tests/integration/targets/git_config/tasks/setup.yml index 85e168fe65..1707bc26c8 100644 --- a/tests/integration/targets/git_config/tasks/setup.yml +++ b/tests/integration/targets/git_config/tasks/setup.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: verify that git is installed so this test can continue command: which git register: git_installed diff --git a/tests/integration/targets/git_config/tasks/setup_no_value.yml b/tests/integration/targets/git_config/tasks/setup_no_value.yml index 7bccfc0368..8e12c350cf 100644 --- a/tests/integration/targets/git_config/tasks/setup_no_value.yml +++ b/tests/integration/targets/git_config/tasks/setup_no_value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # ------ # set up : deleting gitconfig file - name: set up without value diff --git a/tests/integration/targets/git_config/tasks/setup_value.yml b/tests/integration/targets/git_config/tasks/setup_value.yml index 748e838b3d..126b1ae4b5 100644 --- a/tests/integration/targets/git_config/tasks/setup_value.yml +++ b/tests/integration/targets/git_config/tasks/setup_value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # ------ # set up : set gitconfig with value - name: set up with value diff --git a/tests/integration/targets/git_config/tasks/unset_check_mode.yml b/tests/integration/targets/git_config/tasks/unset_check_mode.yml index 43b9905373..52ab4a27f3 100644 --- a/tests/integration/targets/git_config/tasks/unset_check_mode.yml +++ b/tests/integration/targets/git_config/tasks/unset_check_mode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_value.yml - name: unsetting value with check mode diff --git a/tests/integration/targets/git_config/tasks/unset_no_value.yml b/tests/integration/targets/git_config/tasks/unset_no_value.yml index 5fb6b6bcb6..394276cad7 100644 --- a/tests/integration/targets/git_config/tasks/unset_no_value.yml +++ b/tests/integration/targets/git_config/tasks/unset_no_value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_no_value.yml - name: unsetting value diff --git a/tests/integration/targets/git_config/tasks/unset_value.yml b/tests/integration/targets/git_config/tasks/unset_value.yml index 6dda37736e..dfa535a2d3 100644 --- a/tests/integration/targets/git_config/tasks/unset_value.yml +++ b/tests/integration/targets/git_config/tasks/unset_value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: setup_value.yml - name: unsetting value diff --git a/tests/integration/targets/git_config/vars/main.yml b/tests/integration/targets/git_config/vars/main.yml index 545110a5bf..3c948cbdf8 100644 --- a/tests/integration/targets/git_config/vars/main.yml +++ b/tests/integration/targets/git_config/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + git_version_supporting_includes: 1.7.10 option_name: http.proxy option_value: 'foo' diff --git a/tests/integration/targets/github_issue/aliases b/tests/integration/targets/github_issue/aliases index a4c92ef853..abaeb52e6d 100644 --- a/tests/integration/targets/github_issue/aliases +++ b/tests/integration/targets/github_issue/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 diff --git a/tests/integration/targets/github_issue/vars/main.yml b/tests/integration/targets/github_issue/vars/main.yml index 52546d3f7c..8b2a2de6e3 100644 --- a/tests/integration/targets/github_issue/vars/main.yml +++ b/tests/integration/targets/github_issue/vars/main.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later issue: 23642 non_existent_issue: 1111111 diff --git a/tests/integration/targets/gitlab_branch/aliases b/tests/integration/targets/gitlab_branch/aliases index 268da2c702..1a0d20b0b2 100644 --- a/tests/integration/targets/gitlab_branch/aliases +++ b/tests/integration/targets/gitlab_branch/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 disabled diff --git a/tests/integration/targets/gitlab_branch/defaults/main.yml b/tests/integration/targets/gitlab_branch/defaults/main.yml index ffe0d8dc47..3e71f0e261 100644 --- a/tests/integration/targets/gitlab_branch/defaults/main.yml +++ b/tests/integration/targets/gitlab_branch/defaults/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_branch: ansible_test_branch gitlab_project_name: ansible_test_project \ No newline at end of file diff --git a/tests/integration/targets/gitlab_deploy_key/aliases b/tests/integration/targets/gitlab_deploy_key/aliases index ef7ed2e3b5..0d1cc45a85 100644 --- a/tests/integration/targets/gitlab_deploy_key/aliases +++ b/tests/integration/targets/gitlab_deploy_key/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_deploy_key/defaults/main.yml b/tests/integration/targets/gitlab_deploy_key/defaults/main.yml index 04d5b6ca83..8225571b66 100644 --- a/tests/integration/targets/gitlab_deploy_key/defaults/main.yml +++ b/tests/integration/targets/gitlab_deploy_key/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_project_name: ansible_test_project gitlab_deploy_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJnTYY7CYk1F/wBklpdRxudxN6KeXgfhutkiCigSfPhe ansible_test" gitlab_deploy_key_new: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDL1TDkIY2uu6NYRD0G5qGeHTd/AoqQpCw1XENXDnTLDN5DNZVCO1+7xfA5DR5V2tcR691Q005BKxoCo+uUBd1aAM7JWyuXl050rZCXBj4oaUF7urjDANQ7FzYuvqp9h8NGkvzfBYz5YBfu4vh43ajnF0daSyZy4RlxeG9G44vnHElXTQ0igaOCSta/23FdERIYzKxuX4Ul42AwtSmCRwbkN4fC86o0UwW2q0zkgFOUoojtS/Avh0aX8UQyeagaPJFXCc/ldG1mMK020GQAEa8aQcUpysnEzZdq6no5Zyn/WQSobpnJ9CraHhdb1QQytg/+c+CgjSN0cERhTvLn0WsQ043jo5g1kSHNu+OiYXmVwTxe95nXCsoYmCNF/DmezjYVxe9BGlKRAEuHsNi87Il84nBnzKVHGlkq8eJNTR8ASjNkjI7pGS0zxCDB55c3LHh4Aa1xU+nwINRurn/TEDpDZc43/XOnt+aqbxkeWbMtOD/r2gfMj8lNZJ/IyamWy7HcFgGpTZJln4WxVLF+Cz56qa8Hf9WzJL+8Lq7eE3sJKOagn/zPgqeybXbTIPSr3fshq3yE8FYHpFKS4aLvQC/XSLCywrhr25DKBn9UHIZmgC9hxMnVJCKux+ltwGJOKIaoj+5n3+DvM+E3fK3fkADo5+Frzay6/rLTwKWUrzfjQQ== ansible_test_new" diff --git a/tests/integration/targets/gitlab_group/aliases b/tests/integration/targets/gitlab_group/aliases index ef7ed2e3b5..0d1cc45a85 100644 --- a/tests/integration/targets/gitlab_group/aliases +++ b/tests/integration/targets/gitlab_group/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_group/defaults/main.yml b/tests/integration/targets/gitlab_group/defaults/main.yml index 630926d922..01863abe33 100644 --- a/tests/integration/targets/gitlab_group/defaults/main.yml +++ b/tests/integration/targets/gitlab_group/defaults/main.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_group: ansible_test_project diff --git a/tests/integration/targets/gitlab_group_members/aliases b/tests/integration/targets/gitlab_group_members/aliases index 89aea537d1..d2086eecf8 100644 --- a/tests/integration/targets/gitlab_group_members/aliases +++ b/tests/integration/targets/gitlab_group_members/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported \ No newline at end of file diff --git a/tests/integration/targets/gitlab_group_members/vars/main.yml b/tests/integration/targets/gitlab_group_members/vars/main.yml index 6a6b17319d..9082604186 100644 --- a/tests/integration/targets/gitlab_group_members/vars/main.yml +++ b/tests/integration/targets/gitlab_group_members/vars/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_server_url: https://gitlabserver.example.com gitlab_api_access_token: 126hngbscx890cv09b gitlab_group_name: groupname1 diff --git a/tests/integration/targets/gitlab_group_variable/aliases b/tests/integration/targets/gitlab_group_variable/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/gitlab_group_variable/aliases +++ b/tests/integration/targets/gitlab_group_variable/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/gitlab_hook/aliases b/tests/integration/targets/gitlab_hook/aliases index ef7ed2e3b5..0d1cc45a85 100644 --- a/tests/integration/targets/gitlab_hook/aliases +++ b/tests/integration/targets/gitlab_hook/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_hook/defaults/main.yml b/tests/integration/targets/gitlab_hook/defaults/main.yml index eda34a26e6..69cec7d33b 100644 --- a/tests/integration/targets/gitlab_hook/defaults/main.yml +++ b/tests/integration/targets/gitlab_hook/defaults/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_project_name: ansible_test_project gitlab_hook_url: http://gitlab.example.com/hook diff --git a/tests/integration/targets/gitlab_project/aliases b/tests/integration/targets/gitlab_project/aliases index ef7ed2e3b5..0d1cc45a85 100644 --- a/tests/integration/targets/gitlab_project/aliases +++ b/tests/integration/targets/gitlab_project/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_project/defaults/main.yml b/tests/integration/targets/gitlab_project/defaults/main.yml index 4e47591941..457129c227 100644 --- a/tests/integration/targets/gitlab_project/defaults/main.yml +++ b/tests/integration/targets/gitlab_project/defaults/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_project_name: ansible_test_project gitlab_deploy_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJnTYY7CYk1F/wBklpdRxudxN6KeXgfhutkiCigSfPhe ansible_test" diff --git a/tests/integration/targets/gitlab_project_members/aliases b/tests/integration/targets/gitlab_project_members/aliases index 89aea537d1..d2086eecf8 100644 --- a/tests/integration/targets/gitlab_project_members/aliases +++ b/tests/integration/targets/gitlab_project_members/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported \ No newline at end of file diff --git a/tests/integration/targets/gitlab_project_members/defaults/main.yml b/tests/integration/targets/gitlab_project_members/defaults/main.yml index 1b3ac19a47..72d5a68f15 100644 --- a/tests/integration/targets/gitlab_project_members/defaults/main.yml +++ b/tests/integration/targets/gitlab_project_members/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_server_url: https://gitlab.com gitlab_api_access_token: "token" gitlab_project: some_project diff --git a/tests/integration/targets/gitlab_project_variable/aliases b/tests/integration/targets/gitlab_project_variable/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/gitlab_project_variable/aliases +++ b/tests/integration/targets/gitlab_project_variable/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/gitlab_runner/aliases b/tests/integration/targets/gitlab_runner/aliases index ef7ed2e3b5..0d1cc45a85 100644 --- a/tests/integration/targets/gitlab_runner/aliases +++ b/tests/integration/targets/gitlab_runner/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_runner/defaults/main.yml b/tests/integration/targets/gitlab_runner/defaults/main.yml index bed980a238..ec7c0cfe1e 100644 --- a/tests/integration/targets/gitlab_runner/defaults/main.yml +++ b/tests/integration/targets/gitlab_runner/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_project_name: ansible_test_project gitlab_hook_url: http://gitlab.example.com/hook gitlab_runner_name: ansible_test_runner diff --git a/tests/integration/targets/gitlab_user/aliases b/tests/integration/targets/gitlab_user/aliases index ef7ed2e3b5..0d1cc45a85 100644 --- a/tests/integration/targets/gitlab_user/aliases +++ b/tests/integration/targets/gitlab_user/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_user/defaults/main.yml b/tests/integration/targets/gitlab_user/defaults/main.yml index bbe016b0a8..c7a4a5dd34 100644 --- a/tests/integration/targets/gitlab_user/defaults/main.yml +++ b/tests/integration/targets/gitlab_user/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + gitlab_user: ansible_test_user gitlab_user_pass: Secr3tPassw00rd gitlab_user_email: root@localhost diff --git a/tests/integration/targets/hg/aliases b/tests/integration/targets/hg/aliases index 2f2db5bc12..8bda40608c 100644 --- a/tests/integration/targets/hg/aliases +++ b/tests/integration/targets/hg/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python3 skip/aix diff --git a/tests/integration/targets/hg/meta/main.yml b/tests/integration/targets/hg/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/hg/meta/main.yml +++ b/tests/integration/targets/hg/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/hg/tasks/install.yml b/tests/integration/targets/hg/tasks/install.yml index 40aba5e2fc..1b89168808 100644 --- a/tests/integration/targets/hg/tasks/install.yml +++ b/tests/integration/targets/hg/tasks/install.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: get the default python version command: "{{ ansible_python_interpreter }} -V" register: default_python_version diff --git a/tests/integration/targets/hg/tasks/uninstall.yml b/tests/integration/targets/hg/tasks/uninstall.yml index 305a2ffd33..80a28f0623 100644 --- a/tests/integration/targets/hg/tasks/uninstall.yml +++ b/tests/integration/targets/hg/tasks/uninstall.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: restore the updated python command: mv "{{ which_python.stdout }}.updated" "{{ which_python.stdout }}" diff --git a/tests/integration/targets/homebrew/aliases b/tests/integration/targets/homebrew/aliases index 7361196090..8f34f67cb8 100644 --- a/tests/integration/targets/homebrew/aliases +++ b/tests/integration/targets/homebrew/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/homebrew/tasks/main.yml b/tests/integration/targets/homebrew/tasks/main.yml index 9146b5c33e..07cc81d034 100644 --- a/tests/integration/targets/homebrew/tasks/main.yml +++ b/tests/integration/targets/homebrew/tasks/main.yml @@ -1,3 +1,4 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # @@ -7,7 +8,7 @@ # Copyright (c) 2020, Abhijeet Kasurde # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - name: Find brew binary command: which brew register: brew_which diff --git a/tests/integration/targets/homebrew_cask/aliases b/tests/integration/targets/homebrew_cask/aliases index 7361196090..8f34f67cb8 100644 --- a/tests/integration/targets/homebrew_cask/aliases +++ b/tests/integration/targets/homebrew_cask/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/homebrew_cask/defaults/main.yml b/tests/integration/targets/homebrew_cask/defaults/main.yml index e9c23a3bc9..144be0a470 100644 --- a/tests/integration/targets/homebrew_cask/defaults/main.yml +++ b/tests/integration/targets/homebrew_cask/defaults/main.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cask: brooklyn \ No newline at end of file diff --git a/tests/integration/targets/homebrew_cask/tasks/main.yml b/tests/integration/targets/homebrew_cask/tasks/main.yml index 5e84f02404..9d7ac47b5a 100644 --- a/tests/integration/targets/homebrew_cask/tasks/main.yml +++ b/tests/integration/targets/homebrew_cask/tasks/main.yml @@ -1,3 +1,4 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # @@ -7,7 +8,7 @@ # Copyright (c) 2022, Joseph Torcasso # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - name: Find brew binary command: which brew register: brew_which diff --git a/tests/integration/targets/homectl/aliases b/tests/integration/targets/homectl/aliases index de4b90786f..8cee099853 100644 --- a/tests/integration/targets/homectl/aliases +++ b/tests/integration/targets/homectl/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/homectl/tasks/main.yml b/tests/integration/targets/homectl/tasks/main.yml index 18943a782d..c57052c5d8 100644 --- a/tests/integration/targets/homectl/tasks/main.yml +++ b/tests/integration/targets/homectl/tasks/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Get systemd version and if it doesn't exist don't run these tests. - name: check systemd version command: "systemctl --version" diff --git a/tests/integration/targets/hwc_ecs_instance/aliases b/tests/integration/targets/hwc_ecs_instance/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_ecs_instance/aliases +++ b/tests/integration/targets/hwc_ecs_instance/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_evs_disk/aliases b/tests/integration/targets/hwc_evs_disk/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_evs_disk/aliases +++ b/tests/integration/targets/hwc_evs_disk/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_network_vpc/aliases b/tests/integration/targets/hwc_network_vpc/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_network_vpc/aliases +++ b/tests/integration/targets/hwc_network_vpc/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_smn_topic/aliases b/tests/integration/targets/hwc_smn_topic/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_smn_topic/aliases +++ b/tests/integration/targets/hwc_smn_topic/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_eip/aliases b/tests/integration/targets/hwc_vpc_eip/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_eip/aliases +++ b/tests/integration/targets/hwc_vpc_eip/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_peering_connect/aliases b/tests/integration/targets/hwc_vpc_peering_connect/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_peering_connect/aliases +++ b/tests/integration/targets/hwc_vpc_peering_connect/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_port/aliases b/tests/integration/targets/hwc_vpc_port/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_port/aliases +++ b/tests/integration/targets/hwc_vpc_port/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_private_ip/aliases b/tests/integration/targets/hwc_vpc_private_ip/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_private_ip/aliases +++ b/tests/integration/targets/hwc_vpc_private_ip/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_route/aliases b/tests/integration/targets/hwc_vpc_route/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_route/aliases +++ b/tests/integration/targets/hwc_vpc_route/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_security_group/aliases b/tests/integration/targets/hwc_vpc_security_group/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_security_group/aliases +++ b/tests/integration/targets/hwc_vpc_security_group/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_security_group_rule/aliases b/tests/integration/targets/hwc_vpc_security_group_rule/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_security_group_rule/aliases +++ b/tests/integration/targets/hwc_vpc_security_group_rule/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/hwc_vpc_subnet/aliases b/tests/integration/targets/hwc_vpc_subnet/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/hwc_vpc_subnet/aliases +++ b/tests/integration/targets/hwc_vpc_subnet/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/ilo_redfish_config/aliases b/tests/integration/targets/ilo_redfish_config/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/ilo_redfish_config/aliases +++ b/tests/integration/targets/ilo_redfish_config/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/ilo_redfish_config/tasks/main.yml b/tests/integration/targets/ilo_redfish_config/tasks/main.yml index 97d066c6bf..30bfb4edd5 100644 --- a/tests/integration/targets/ilo_redfish_config/tasks/main.yml +++ b/tests/integration/targets/ilo_redfish_config/tasks/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Set NTP Servers ilo_redfish_config: category: Manager diff --git a/tests/integration/targets/ilo_redfish_info/aliases b/tests/integration/targets/ilo_redfish_info/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/ilo_redfish_info/aliases +++ b/tests/integration/targets/ilo_redfish_info/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/ilo_redfish_info/tasks/main.yml b/tests/integration/targets/ilo_redfish_info/tasks/main.yml index 664a677cec..0f80207acd 100644 --- a/tests/integration/targets/ilo_redfish_info/tasks/main.yml +++ b/tests/integration/targets/ilo_redfish_info/tasks/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get sessions ilo_redfish_info: category: Sessions diff --git a/tests/integration/targets/influxdb_user/aliases b/tests/integration/targets/influxdb_user/aliases index 6fe31dda15..14d23a4da1 100644 --- a/tests/integration/targets/influxdb_user/aliases +++ b/tests/integration/targets/influxdb_user/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 disabled diff --git a/tests/integration/targets/influxdb_user/meta/main.yml b/tests/integration/targets/influxdb_user/meta/main.yml index 941117026f..34b3a3a6cd 100644 --- a/tests/integration/targets/influxdb_user/meta/main.yml +++ b/tests/integration/targets/influxdb_user/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_influxdb diff --git a/tests/integration/targets/influxdb_user/tasks/tests.yml b/tests/integration/targets/influxdb_user/tasks/tests.yml index ad3396642b..be36ee691c 100644 --- a/tests/integration/targets/influxdb_user/tasks/tests.yml +++ b/tests/integration/targets/influxdb_user/tasks/tests.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Install influxdb python module pip: name=influxdb diff --git a/tests/integration/targets/ini_file/aliases b/tests/integration/targets/ini_file/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/ini_file/aliases +++ b/tests/integration/targets/ini_file/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/ini_file/meta/main.yml b/tests/integration/targets/ini_file/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/ini_file/meta/main.yml +++ b/tests/integration/targets/ini_file/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/ini_file/tasks/tests/00-basic.yml b/tests/integration/targets/ini_file/tasks/tests/00-basic.yml index 8f8d345f7e..c619e937a5 100644 --- a/tests/integration/targets/ini_file/tasks/tests/00-basic.yml +++ b/tests/integration/targets/ini_file/tasks/tests/00-basic.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ## basiscs - name: test-basic 1 - specify both "value" and "values" and fail diff --git a/tests/integration/targets/ini_file/tasks/tests/01-value.yml b/tests/integration/targets/ini_file/tasks/tests/01-value.yml index 93499cc63d..9670cd20f9 100644 --- a/tests/integration/targets/ini_file/tasks/tests/01-value.yml +++ b/tests/integration/targets/ini_file/tasks/tests/01-value.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later ## testing value diff --git a/tests/integration/targets/ini_file/tasks/tests/02-values.yml b/tests/integration/targets/ini_file/tasks/tests/02-values.yml index 645490d111..23071ebccc 100644 --- a/tests/integration/targets/ini_file/tasks/tests/02-values.yml +++ b/tests/integration/targets/ini_file/tasks/tests/02-values.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later ## testing values diff --git a/tests/integration/targets/ini_file/tasks/tests/03-encoding.yml b/tests/integration/targets/ini_file/tasks/tests/03-encoding.yml index 6280ae1ffb..555dd576c4 100644 --- a/tests/integration/targets/ini_file/tasks/tests/03-encoding.yml +++ b/tests/integration/targets/ini_file/tasks/tests/03-encoding.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Regression test for https://github.com/ansible-collections/community.general/pull/2578#issuecomment-868092282 - name: Create UTF-8 test file diff --git a/tests/integration/targets/interfaces_file/aliases b/tests/integration/targets/interfaces_file/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/interfaces_file/aliases +++ b/tests/integration/targets/interfaces_file/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/interfaces_file/meta/main.yml b/tests/integration/targets/interfaces_file/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/interfaces_file/meta/main.yml +++ b/tests/integration/targets/interfaces_file/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/interfaces_file/tasks/main.yml b/tests/integration/targets/interfaces_file/tasks/main.yml index 5dbd983379..918a323319 100644 --- a/tests/integration/targets/interfaces_file/tasks/main.yml +++ b/tests/integration/targets/interfaces_file/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: set_fact: interfaces_testfile: '{{ remote_tmp_dir }}/interfaces' diff --git a/tests/integration/targets/ipify_facts/aliases b/tests/integration/targets/ipify_facts/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/ipify_facts/aliases +++ b/tests/integration/targets/ipify_facts/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/ipify_facts/vars/main.yml b/tests/integration/targets/ipify_facts/vars/main.yml index 1ccaab4669..3a47dfea82 100644 --- a/tests/integration/targets/ipify_facts/vars/main.yml +++ b/tests/integration/targets/ipify_facts/vars/main.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + validate_certs: true diff --git a/tests/integration/targets/iptables_state/aliases b/tests/integration/targets/iptables_state/aliases index 3cac4af522..9f4768782b 100644 --- a/tests/integration/targets/iptables_state/aliases +++ b/tests/integration/targets/iptables_state/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/docker # kernel modules not loadable diff --git a/tests/integration/targets/iptables_state/meta/main.yml b/tests/integration/targets/iptables_state/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/iptables_state/meta/main.yml +++ b/tests/integration/targets/iptables_state/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml b/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml index fcd259ec55..722f362da9 100644 --- a/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml +++ b/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "ensure our next backup is not there (file)" file: path: "{{ iptables_saved }}" diff --git a/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml b/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml index e09a26a9d9..2f00e175b4 100644 --- a/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml +++ b/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "ensure our next rule is not there (iptables)" iptables: table: nat diff --git a/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml b/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml index 1a9db2900b..af49482114 100644 --- a/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml +++ b/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "create a blocking ruleset with a DROP policy" copy: dest: "{{ iptables_tests }}" diff --git a/tests/integration/targets/ipwcli_dns/aliases b/tests/integration/targets/ipwcli_dns/aliases index bd8385aced..b469f71b07 100644 --- a/tests/integration/targets/ipwcli_dns/aliases +++ b/tests/integration/targets/ipwcli_dns/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # There is no Ericsson IPWorks unsupported diff --git a/tests/integration/targets/iso_create/aliases b/tests/integration/targets/iso_create/aliases index 9d694de923..f6ee7272f0 100644 --- a/tests/integration/targets/iso_create/aliases +++ b/tests/integration/targets/iso_create/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 destructive skip/aix diff --git a/tests/integration/targets/iso_create/meta/main.yml b/tests/integration/targets/iso_create/meta/main.yml index a121ba3e47..e7127a2d65 100644 --- a/tests/integration/targets/iso_create/meta/main.yml +++ b/tests/integration/targets/iso_create/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/iso_extract/aliases b/tests/integration/targets/iso_extract/aliases index 1a89e39873..b0d05577af 100644 --- a/tests/integration/targets/iso_extract/aliases +++ b/tests/integration/targets/iso_extract/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 needs/target/setup_epel destructive diff --git a/tests/integration/targets/iso_extract/meta/main.yml b/tests/integration/targets/iso_extract/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/iso_extract/meta/main.yml +++ b/tests/integration/targets/iso_extract/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/iso_extract/vars/Alpine.yml b/tests/integration/targets/iso_extract/vars/Alpine.yml index f9e7ca1a9a..bcb92f79bd 100644 --- a/tests/integration/targets/iso_extract/vars/Alpine.yml +++ b/tests/integration/targets/iso_extract/vars/Alpine.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iso_extract_7zip_package: p7zip diff --git a/tests/integration/targets/iso_extract/vars/Archlinux.yml b/tests/integration/targets/iso_extract/vars/Archlinux.yml index f9e7ca1a9a..bcb92f79bd 100644 --- a/tests/integration/targets/iso_extract/vars/Archlinux.yml +++ b/tests/integration/targets/iso_extract/vars/Archlinux.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iso_extract_7zip_package: p7zip diff --git a/tests/integration/targets/iso_extract/vars/Debian.yml b/tests/integration/targets/iso_extract/vars/Debian.yml index 219c495764..09436ceb05 100644 --- a/tests/integration/targets/iso_extract/vars/Debian.yml +++ b/tests/integration/targets/iso_extract/vars/Debian.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iso_extract_7zip_package: p7zip-full diff --git a/tests/integration/targets/iso_extract/vars/FreeBSD.yml b/tests/integration/targets/iso_extract/vars/FreeBSD.yml index f9e7ca1a9a..bcb92f79bd 100644 --- a/tests/integration/targets/iso_extract/vars/FreeBSD.yml +++ b/tests/integration/targets/iso_extract/vars/FreeBSD.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iso_extract_7zip_package: p7zip diff --git a/tests/integration/targets/iso_extract/vars/RedHat.yml b/tests/integration/targets/iso_extract/vars/RedHat.yml index aa925a79e9..2bcdf4bfff 100644 --- a/tests/integration/targets/iso_extract/vars/RedHat.yml +++ b/tests/integration/targets/iso_extract/vars/RedHat.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iso_extract_7zip_package: p7zip-plugins diff --git a/tests/integration/targets/iso_extract/vars/Suse.yml b/tests/integration/targets/iso_extract/vars/Suse.yml index e525c8ff10..1b695ce721 100644 --- a/tests/integration/targets/iso_extract/vars/Suse.yml +++ b/tests/integration/targets/iso_extract/vars/Suse.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # The 7z executable moved from p7zip to p7zip-full; # see https://build.opensuse.org/package/view_file/openSUSE:Leap:15.2/p7zip/p7zip.changes?expand=1 iso_extract_7zip_package: p7zip-full diff --git a/tests/integration/targets/iso_extract/vars/Ubuntu.yml b/tests/integration/targets/iso_extract/vars/Ubuntu.yml index 219c495764..09436ceb05 100644 --- a/tests/integration/targets/iso_extract/vars/Ubuntu.yml +++ b/tests/integration/targets/iso_extract/vars/Ubuntu.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iso_extract_7zip_package: p7zip-full diff --git a/tests/integration/targets/iso_extract/vars/default.yml b/tests/integration/targets/iso_extract/vars/default.yml index e69de29bb2..b4bfd8560b 100644 --- a/tests/integration/targets/iso_extract/vars/default.yml +++ b/tests/integration/targets/iso_extract/vars/default.yml @@ -0,0 +1,4 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/java_cert/aliases b/tests/integration/targets/java_cert/aliases index 49222305a9..b9305b0928 100644 --- a/tests/integration/targets/java_cert/aliases +++ b/tests/integration/targets/java_cert/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/java_cert/defaults/main.yml b/tests/integration/targets/java_cert/defaults/main.yml index b391eeff2d..ebac2789b3 100644 --- a/tests/integration/targets/java_cert/defaults/main.yml +++ b/tests/integration/targets/java_cert/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + test_pkcs12_path: testpkcs.p12 test_keystore_path: keystore.jks test_keystore2_path: "{{ remote_tmp_dir }}/keystore2.jks" diff --git a/tests/integration/targets/java_cert/files/setupSSLServer.py b/tests/integration/targets/java_cert/files/setupSSLServer.py index 9227eefd81..4b0a421859 100644 --- a/tests/integration/targets/java_cert/files/setupSSLServer.py +++ b/tests/integration/targets/java_cert/files/setupSSLServer.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type import ssl diff --git a/tests/integration/targets/java_cert/meta/main.yml b/tests/integration/targets/java_cert/meta/main.yml index 1d78393199..0371df88e5 100644 --- a/tests/integration/targets/java_cert/meta/main.yml +++ b/tests/integration/targets/java_cert/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_java_keytool - setup_openssl diff --git a/tests/integration/targets/java_cert/tasks/state_change.yml b/tests/integration/targets/java_cert/tasks/state_change.yml index c0b92c8d2a..114c51ef58 100644 --- a/tests/integration/targets/java_cert/tasks/state_change.yml +++ b/tests/integration/targets/java_cert/tasks/state_change.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # # Prepare X509 and PKCS#12 materials # diff --git a/tests/integration/targets/java_keystore/aliases b/tests/integration/targets/java_keystore/aliases index 49222305a9..b9305b0928 100644 --- a/tests/integration/targets/java_keystore/aliases +++ b/tests/integration/targets/java_keystore/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/java_keystore/defaults/main.yml b/tests/integration/targets/java_keystore/defaults/main.yml index 1fce6b4601..b51461462f 100644 --- a/tests/integration/targets/java_keystore/defaults/main.yml +++ b/tests/integration/targets/java_keystore/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + java_keystore_certs: - name: cert commonName: example.com diff --git a/tests/integration/targets/java_keystore/meta/main.yml b/tests/integration/targets/java_keystore/meta/main.yml index 1d78393199..0371df88e5 100644 --- a/tests/integration/targets/java_keystore/meta/main.yml +++ b/tests/integration/targets/java_keystore/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_java_keytool - setup_openssl diff --git a/tests/integration/targets/java_keystore/tasks/prepare.yml b/tests/integration/targets/java_keystore/tasks/prepare.yml index 04b7cbd9d8..7c4c5c98d5 100644 --- a/tests/integration/targets/java_keystore/tasks/prepare.yml +++ b/tests/integration/targets/java_keystore/tasks/prepare.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create test directory ansible.builtin.file: path: "{{ remote_tmp_dir }}" diff --git a/tests/integration/targets/java_keystore/tasks/tests.yml b/tests/integration/targets/java_keystore/tasks/tests.yml index 07b30ad97d..a3d6ebf7d9 100644 --- a/tests/integration/targets/java_keystore/tasks/tests.yml +++ b/tests/integration/targets/java_keystore/tasks/tests.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create test directory ansible.builtin.file: path: "{{ remote_tmp_dir }}" diff --git a/tests/integration/targets/jboss/aliases b/tests/integration/targets/jboss/aliases index 506d60c877..23525810c4 100644 --- a/tests/integration/targets/jboss/aliases +++ b/tests/integration/targets/jboss/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/jboss/meta/main.yml b/tests/integration/targets/jboss/meta/main.yml index 000178657d..c2bf37df74 100644 --- a/tests/integration/targets/jboss/meta/main.yml +++ b/tests/integration/targets/jboss/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_wildfly_server diff --git a/tests/integration/targets/jira/aliases b/tests/integration/targets/jira/aliases index c368f6e800..a58c201a4c 100644 --- a/tests/integration/targets/jira/aliases +++ b/tests/integration/targets/jira/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported shippable/posix/group3 diff --git a/tests/integration/targets/jira/tasks/main.yml b/tests/integration/targets/jira/tasks/main.yml index c1d24a275a..ffc03530dc 100644 --- a/tests/integration/targets/jira/tasks/main.yml +++ b/tests/integration/targets/jira/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: create test ticket community.general.jira: uri: "{{ uri }}" diff --git a/tests/integration/targets/jira/vars/main.yml b/tests/integration/targets/jira/vars/main.yml index f170cefcc9..781fde8caf 100644 --- a/tests/integration/targets/jira/vars/main.yml +++ b/tests/integration/targets/jira/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + uri: https://xxxx.atlassian.net/ user: xxx@xxxx.xxx pasw: supersecret diff --git a/tests/integration/targets/kernel_blacklist/aliases b/tests/integration/targets/kernel_blacklist/aliases index a6dafcf8cd..abc0d5476d 100644 --- a/tests/integration/targets/kernel_blacklist/aliases +++ b/tests/integration/targets/kernel_blacklist/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 diff --git a/tests/integration/targets/kernel_blacklist/meta/main.yml b/tests/integration/targets/kernel_blacklist/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/kernel_blacklist/meta/main.yml +++ b/tests/integration/targets/kernel_blacklist/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/kernel_blacklist/tasks/main.yml b/tests/integration/targets/kernel_blacklist/tasks/main.yml index de3d5d8edd..1a8b736991 100644 --- a/tests/integration/targets/kernel_blacklist/tasks/main.yml +++ b/tests/integration/targets/kernel_blacklist/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: set destination filename set_fact: bl_file: '{{ remote_tmp_dir }}/blacklist-ansible.conf' diff --git a/tests/integration/targets/keycloak_client/docker-compose.yml b/tests/integration/targets/keycloak_client/docker-compose.yml index d14a331e48..5e14e9aac1 100644 --- a/tests/integration/targets/keycloak_client/docker-compose.yml +++ b/tests/integration/targets/keycloak_client/docker-compose.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + version: '3.4' services: diff --git a/tests/integration/targets/keycloak_client/tasks/main.yml b/tests/integration/targets/keycloak_client/tasks/main.yml index 322fc3e2f4..933f00bd15 100644 --- a/tests/integration/targets/keycloak_client/tasks/main.yml +++ b/tests/integration/targets/keycloak_client/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Delete realm community.general.keycloak_realm: "{{ auth_args | combine(call_args) }}" vars: diff --git a/tests/integration/targets/keycloak_client/vars/main.yml b/tests/integration/targets/keycloak_client/vars/main.yml index 0b1555e4bb..53ba35fcad 100644 --- a/tests/integration/targets/keycloak_client/vars/main.yml +++ b/tests/integration/targets/keycloak_client/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + url: http://localhost:8080/auth admin_realm: master admin_user: admin diff --git a/tests/integration/targets/keycloak_identity_provider/aliases b/tests/integration/targets/keycloak_identity_provider/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/keycloak_identity_provider/aliases +++ b/tests/integration/targets/keycloak_identity_provider/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/keycloak_identity_provider/tasks/main.yml b/tests/integration/targets/keycloak_identity_provider/tasks/main.yml index 5bc0bc3fa0..79ba330494 100644 --- a/tests/integration/targets/keycloak_identity_provider/tasks/main.yml +++ b/tests/integration/targets/keycloak_identity_provider/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create realm community.general.keycloak_realm: auth_keycloak_url: "{{ url }}" diff --git a/tests/integration/targets/keycloak_identity_provider/vars/main.yml b/tests/integration/targets/keycloak_identity_provider/vars/main.yml index bd37149b31..6d2078ca0e 100644 --- a/tests/integration/targets/keycloak_identity_provider/vars/main.yml +++ b/tests/integration/targets/keycloak_identity_provider/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + url: http://localhost:8080/auth admin_realm: master admin_user: admin diff --git a/tests/integration/targets/keycloak_role/aliases b/tests/integration/targets/keycloak_role/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/keycloak_role/aliases +++ b/tests/integration/targets/keycloak_role/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/keycloak_role/tasks/main.yml b/tests/integration/targets/keycloak_role/tasks/main.yml index 683cfc8677..61b62629a4 100644 --- a/tests/integration/targets/keycloak_role/tasks/main.yml +++ b/tests/integration/targets/keycloak_role/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create realm community.general.keycloak_realm: auth_keycloak_url: "{{ url }}" diff --git a/tests/integration/targets/keycloak_role/vars/main.yml b/tests/integration/targets/keycloak_role/vars/main.yml index 0a725dc4a6..b003311e0f 100644 --- a/tests/integration/targets/keycloak_role/vars/main.yml +++ b/tests/integration/targets/keycloak_role/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + url: http://localhost:8080/auth admin_realm: master admin_user: admin diff --git a/tests/integration/targets/keycloak_user_federation/aliases b/tests/integration/targets/keycloak_user_federation/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/keycloak_user_federation/aliases +++ b/tests/integration/targets/keycloak_user_federation/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/keycloak_user_federation/tasks/main.yml b/tests/integration/targets/keycloak_user_federation/tasks/main.yml index bc81fcdec3..79e21dae03 100644 --- a/tests/integration/targets/keycloak_user_federation/tasks/main.yml +++ b/tests/integration/targets/keycloak_user_federation/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create realm community.general.keycloak_realm: auth_keycloak_url: "{{ url }}" diff --git a/tests/integration/targets/keycloak_user_federation/vars/main.yml b/tests/integration/targets/keycloak_user_federation/vars/main.yml index 2a31f9efcd..acf73e2cad 100644 --- a/tests/integration/targets/keycloak_user_federation/vars/main.yml +++ b/tests/integration/targets/keycloak_user_federation/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + url: http://localhost:8080/auth admin_realm: master admin_user: admin diff --git a/tests/integration/targets/keyring/aliases b/tests/integration/targets/keyring/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/keyring/aliases +++ b/tests/integration/targets/keyring/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/keyring/tasks/main.yml b/tests/integration/targets/keyring/tasks/main.yml index f4911b25a9..3e684887f7 100644 --- a/tests/integration/targets/keyring/tasks/main.yml +++ b/tests/integration/targets/keyring/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Ensure required packages for headless keyring access are installed (RPM) ansible.builtin.package: name: gnome-keyring diff --git a/tests/integration/targets/keyring/vars/main.yml b/tests/integration/targets/keyring/vars/main.yml index f1eb1f80e5..b4997b6d36 100644 --- a/tests/integration/targets/keyring/vars/main.yml +++ b/tests/integration/targets/keyring/vars/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + keyring_password: Password123 user_password: Test123 diff --git a/tests/integration/targets/launchd/aliases b/tests/integration/targets/launchd/aliases index a377870962..4507815d09 100644 --- a/tests/integration/targets/launchd/aliases +++ b/tests/integration/targets/launchd/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/freebsd skip/rhel diff --git a/tests/integration/targets/launchd/files/ansible_test_service.py b/tests/integration/targets/launchd/files/ansible_test_service.py index 87a23fc47d..31de6c586b 100644 --- a/tests/integration/targets/launchd/files/ansible_test_service.py +++ b/tests/integration/targets/launchd/files/ansible_test_service.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/launchd/tasks/setup.yml b/tests/integration/targets/launchd/tasks/setup.yml index 1ec57bf659..1df9667bf9 100644 --- a/tests/integration/targets/launchd/tasks/setup.yml +++ b/tests/integration/targets/launchd/tasks/setup.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: "[{{ item }}] Deploy test service configuration" template: diff --git a/tests/integration/targets/launchd/tasks/teardown.yml b/tests/integration/targets/launchd/tasks/teardown.yml index 50b0a36a7b..e781757050 100644 --- a/tests/integration/targets/launchd/tasks/teardown.yml +++ b/tests/integration/targets/launchd/tasks/teardown.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: "[{{ item }}] Unload service" launchd: diff --git a/tests/integration/targets/launchd/tasks/test.yml b/tests/integration/targets/launchd/tasks/test.yml index 211b051d7d..25a7bba009 100644 --- a/tests/integration/targets/launchd/tasks/test.yml +++ b/tests/integration/targets/launchd/tasks/test.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: "Running {{ item }}" block: diff --git a/tests/integration/targets/launchd/tasks/tests/test_reload.yml b/tests/integration/targets/launchd/tasks/tests/test_reload.yml index fe2682abda..df2c1be9fa 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_reload.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_reload.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ----------------------------------------------------------- diff --git a/tests/integration/targets/launchd/tasks/tests/test_restart.yml b/tests/integration/targets/launchd/tasks/tests/test_restart.yml index 976775678d..08ef62d919 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_restart.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_restart.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ----------------------------------------------------------- diff --git a/tests/integration/targets/launchd/tasks/tests/test_runatload.yml b/tests/integration/targets/launchd/tasks/tests/test_runatload.yml index 08f21efce7..03059fc884 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_runatload.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_runatload.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # ----------------------------------------------------------- - name: "[{{ item }}] Given a started service with RunAtLoad set to true..." diff --git a/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml b/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml index b3cc380e85..2a78f89c12 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ----------------------------------------------------------- diff --git a/tests/integration/targets/launchd/tasks/tests/test_unknown.yml b/tests/integration/targets/launchd/tasks/tests/test_unknown.yml index e005d87ee1..d18ea54535 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_unknown.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_unknown.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ----------------------------------------------------------- diff --git a/tests/integration/targets/launchd/tasks/tests/test_unload.yml b/tests/integration/targets/launchd/tasks/tests/test_unload.yml index b51a87fb3a..aee9d8b5ee 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_unload.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_unload.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ----------------------------------------------------------- diff --git a/tests/integration/targets/launchd/vars/main.yml b/tests/integration/targets/launchd/vars/main.yml index 2d58be16ed..ce880ed9de 100644 --- a/tests/integration/targets/launchd/vars/main.yml +++ b/tests/integration/targets/launchd/vars/main.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later launchd_service_name: launchd.test.service launchd_plist_location: /Library/LaunchDaemons/{{ launchd_service_name }}.plist diff --git a/tests/integration/targets/ldap_search/aliases b/tests/integration/targets/ldap_search/aliases index 589aeadc72..76ff20c90e 100644 --- a/tests/integration/targets/ldap_search/aliases +++ b/tests/integration/targets/ldap_search/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/ldap_search/meta/main.yml b/tests/integration/targets/ldap_search/meta/main.yml index 093fafe4a2..d282aa0dc8 100644 --- a/tests/integration/targets/ldap_search/meta/main.yml +++ b/tests/integration/targets/ldap_search/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_openldap diff --git a/tests/integration/targets/ldap_search/tasks/run-test.yml b/tests/integration/targets/ldap_search/tasks/run-test.yml index e69de29bb2..b4bfd8560b 100644 --- a/tests/integration/targets/ldap_search/tasks/run-test.yml +++ b/tests/integration/targets/ldap_search/tasks/run-test.yml @@ -0,0 +1,4 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/ldap_search/tasks/tests/basic.yml b/tests/integration/targets/ldap_search/tasks/tests/basic.yml index 824be4aa78..ab6c745277 100644 --- a/tests/integration/targets/ldap_search/tasks/tests/basic.yml +++ b/tests/integration/targets/ldap_search/tasks/tests/basic.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - debug: msg: Running tests/basic.yml diff --git a/tests/integration/targets/listen_ports_facts/aliases b/tests/integration/targets/listen_ports_facts/aliases index c72768af29..5e86d2a3f4 100644 --- a/tests/integration/targets/listen_ports_facts/aliases +++ b/tests/integration/targets/listen_ports_facts/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 destructive skip/aix diff --git a/tests/integration/targets/listen_ports_facts/meta/main.yml b/tests/integration/targets/listen_ports_facts/meta/main.yml index b63c3d017c..2fcd152f95 100644 --- a/tests/integration/targets/listen_ports_facts/meta/main.yml +++ b/tests/integration/targets/listen_ports_facts/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/locale_gen/aliases b/tests/integration/targets/locale_gen/aliases index be6db963e7..5cbd0a392b 100644 --- a/tests/integration/targets/locale_gen/aliases +++ b/tests/integration/targets/locale_gen/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive needs/root shippable/posix/group3 diff --git a/tests/integration/targets/locale_gen/tasks/locale_gen.yml b/tests/integration/targets/locale_gen/tasks/locale_gen.yml index ae316977f5..ea042796f7 100644 --- a/tests/integration/targets/locale_gen/tasks/locale_gen.yml +++ b/tests/integration/targets/locale_gen/tasks/locale_gen.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Is the locale we're going to test against installed? shell: locale -a | grep pt_BR register: initial_state diff --git a/tests/integration/targets/lookup_cartesian/aliases b/tests/integration/targets/lookup_cartesian/aliases index 07b8702010..1ad3384c7e 100644 --- a/tests/integration/targets/lookup_cartesian/aliases +++ b/tests/integration/targets/lookup_cartesian/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_collection_version/aliases b/tests/integration/targets/lookup_collection_version/aliases index b59832142f..7a0fc5c1ea 100644 --- a/tests/integration/targets/lookup_collection_version/aliases +++ b/tests/integration/targets/lookup_collection_version/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/galaxy.yml b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/galaxy.yml index f66a8af4c9..2243e0dba8 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/galaxy.yml +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/galaxy.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + namespace: testns name: testcoll version: 0.0.1 diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/galaxy.yml b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/galaxy.yml index 599a47e649..96aae3d644 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/galaxy.yml +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/galaxy.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + namespace: testns name: testcoll_nv authors: diff --git a/tests/integration/targets/lookup_collection_version/runme.sh b/tests/integration/targets/lookup_collection_version/runme.sh index a0a78be131..118abbc296 100755 --- a/tests/integration/targets/lookup_collection_version/runme.sh +++ b/tests/integration/targets/lookup_collection_version/runme.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/lookup_collection_version/runme.yml b/tests/integration/targets/lookup_collection_version/runme.yml index aed52bee2d..54c58614fa 100644 --- a/tests/integration/targets/lookup_collection_version/runme.yml +++ b/tests/integration/targets/lookup_collection_version/runme.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - name: Test collection_version diff --git a/tests/integration/targets/lookup_dependent/aliases b/tests/integration/targets/lookup_dependent/aliases index 45489be80c..fcbe73470c 100644 --- a/tests/integration/targets/lookup_dependent/aliases +++ b/tests/integration/targets/lookup_dependent/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_dependent/tasks/main.yml b/tests/integration/targets/lookup_dependent/tasks/main.yml index 0f1b8d34fb..c70ce5b6a4 100644 --- a/tests/integration/targets/lookup_dependent/tasks/main.yml +++ b/tests/integration/targets/lookup_dependent/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test 1 set_fact: loop_result: >- diff --git a/tests/integration/targets/lookup_etcd3/aliases b/tests/integration/targets/lookup_etcd3/aliases index 25a1594d76..9ec6614633 100644 --- a/tests/integration/targets/lookup_etcd3/aliases +++ b/tests/integration/targets/lookup_etcd3/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 destructive needs/file/tests/utils/constraints.txt diff --git a/tests/integration/targets/lookup_etcd3/defaults/main.yml b/tests/integration/targets/lookup_etcd3/defaults/main.yml index 331ec312e7..de726382ba 100644 --- a/tests/integration/targets/lookup_etcd3/defaults/main.yml +++ b/tests/integration/targets/lookup_etcd3/defaults/main.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later etcd3_prefix: '/keyprefix/' etcd3_singlekey: '/singlekeypath' diff --git a/tests/integration/targets/lookup_etcd3/dependencies.yml b/tests/integration/targets/lookup_etcd3/dependencies.yml index e42f33badb..ea012594d8 100644 --- a/tests/integration/targets/lookup_etcd3/dependencies.yml +++ b/tests/integration/targets/lookup_etcd3/dependencies.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - name: Setup etcd3 diff --git a/tests/integration/targets/lookup_etcd3/meta/main.yml b/tests/integration/targets/lookup_etcd3/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/lookup_etcd3/meta/main.yml +++ b/tests/integration/targets/lookup_etcd3/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/lookup_etcd3/test_lookup_etcd3.yml b/tests/integration/targets/lookup_etcd3/test_lookup_etcd3.yml index 583f2a6a08..c18138888a 100644 --- a/tests/integration/targets/lookup_etcd3/test_lookup_etcd3.yml +++ b/tests/integration/targets/lookup_etcd3/test_lookup_etcd3.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - name: Test lookup etcd3 diff --git a/tests/integration/targets/lookup_flattened/aliases b/tests/integration/targets/lookup_flattened/aliases index bc987654d9..708d3bcd12 100644 --- a/tests/integration/targets/lookup_flattened/aliases +++ b/tests/integration/targets/lookup_flattened/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_lmdb_kv/aliases b/tests/integration/targets/lookup_lmdb_kv/aliases index 08496766ce..7c50594f42 100644 --- a/tests/integration/targets/lookup_lmdb_kv/aliases +++ b/tests/integration/targets/lookup_lmdb_kv/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 destructive skip/aix diff --git a/tests/integration/targets/lookup_lmdb_kv/dependencies.yml b/tests/integration/targets/lookup_lmdb_kv/dependencies.yml index 17622d961e..9fc63b19fa 100644 --- a/tests/integration/targets/lookup_lmdb_kv/dependencies.yml +++ b/tests/integration/targets/lookup_lmdb_kv/dependencies.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - name: Install LMDB Python package diff --git a/tests/integration/targets/lookup_lmdb_kv/test.yml b/tests/integration/targets/lookup_lmdb_kv/test.yml index 1fa0b6150f..3c39d4e251 100644 --- a/tests/integration/targets/lookup_lmdb_kv/test.yml +++ b/tests/integration/targets/lookup_lmdb_kv/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - debug: diff --git a/tests/integration/targets/lookup_lmdb_kv/test_db.py b/tests/integration/targets/lookup_lmdb_kv/test_db.py index f251b7f4a5..b906c4c397 100644 --- a/tests/integration/targets/lookup_lmdb_kv/test_db.py +++ b/tests/integration/targets/lookup_lmdb_kv/test_db.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type import lmdb diff --git a/tests/integration/targets/lookup_passwordstore/aliases b/tests/integration/targets/lookup_passwordstore/aliases index 7cc72b73d4..c9fb7e80db 100644 --- a/tests/integration/targets/lookup_passwordstore/aliases +++ b/tests/integration/targets/lookup_passwordstore/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 destructive skip/aix diff --git a/tests/integration/targets/lookup_passwordstore/meta/main.yml b/tests/integration/targets/lookup_passwordstore/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/lookup_passwordstore/meta/main.yml +++ b/tests/integration/targets/lookup_passwordstore/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/lookup_passwordstore/tasks/package.yml b/tests/integration/targets/lookup_passwordstore/tasks/package.yml index 0ced77c42e..89d750ee6d 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/package.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/package.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Include distribution specific variables include_vars: "{{ lookup('first_found', params) }}" vars: diff --git a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml index d519304f06..c701e199ae 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a password ({{ backend }}) set_fact: newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes', backend=backend) }}" diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index 19f7283360..a18b58d651 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Check name of gpg2 binary command: which gpg2 register: gpg2_check diff --git a/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml b/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml index 05778f6938..f18329ed13 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/Alpine.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + passwordstore_packages: - gopass - pass diff --git a/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml b/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml index 05778f6938..f18329ed13 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/Archlinux.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + passwordstore_packages: - gopass - pass diff --git a/tests/integration/targets/lookup_passwordstore/vars/Debian.yml b/tests/integration/targets/lookup_passwordstore/vars/Debian.yml index 3d1c4d45d5..825a6a8bb8 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/Debian.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/Debian.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + passwordstore_packages: - pass diff --git a/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml b/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml index 05778f6938..f18329ed13 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/Fedora.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + passwordstore_packages: - gopass - pass diff --git a/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml b/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml index 82e5f61849..9e9da27721 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/FreeBSD.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + passwordstore_packages: - gopass - gnupg diff --git a/tests/integration/targets/lookup_passwordstore/vars/default.yml b/tests/integration/targets/lookup_passwordstore/vars/default.yml index e69de29bb2..b4bfd8560b 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/default.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/default.yml @@ -0,0 +1,4 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/lookup_passwordstore/vars/main.yml b/tests/integration/targets/lookup_passwordstore/vars/main.yml index be954d7d2a..2b4fa1b221 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/main.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + passwordstore_privkey: | -----BEGIN PGP PRIVATE KEY BLOCK----- Version: GnuPG v2.0.22 (GNU/Linux) diff --git a/tests/integration/targets/lookup_random_pet/aliases b/tests/integration/targets/lookup_random_pet/aliases index bc987654d9..708d3bcd12 100644 --- a/tests/integration/targets/lookup_random_pet/aliases +++ b/tests/integration/targets/lookup_random_pet/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_random_pet/dependencies.yml b/tests/integration/targets/lookup_random_pet/dependencies.yml index b6b679d966..a411197fb9 100644 --- a/tests/integration/targets/lookup_random_pet/dependencies.yml +++ b/tests/integration/targets/lookup_random_pet/dependencies.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - name: Install Petname Python package diff --git a/tests/integration/targets/lookup_random_pet/test.yml b/tests/integration/targets/lookup_random_pet/test.yml index 1ab619d2f4..31ce38c4d0 100644 --- a/tests/integration/targets/lookup_random_pet/test.yml +++ b/tests/integration/targets/lookup_random_pet/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost gather_facts: no tasks: diff --git a/tests/integration/targets/lookup_random_string/aliases b/tests/integration/targets/lookup_random_string/aliases index bc987654d9..708d3bcd12 100644 --- a/tests/integration/targets/lookup_random_string/aliases +++ b/tests/integration/targets/lookup_random_string/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_random_string/test.yml b/tests/integration/targets/lookup_random_string/test.yml index edbf9fd035..2ce57ad2cb 100644 --- a/tests/integration/targets/lookup_random_string/test.yml +++ b/tests/integration/targets/lookup_random_string/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost gather_facts: no tasks: diff --git a/tests/integration/targets/lookup_random_words/aliases b/tests/integration/targets/lookup_random_words/aliases index bc987654d9..708d3bcd12 100644 --- a/tests/integration/targets/lookup_random_words/aliases +++ b/tests/integration/targets/lookup_random_words/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_random_words/dependencies.yml b/tests/integration/targets/lookup_random_words/dependencies.yml index eef89942d7..1cb0b0d3a8 100644 --- a/tests/integration/targets/lookup_random_words/dependencies.yml +++ b/tests/integration/targets/lookup_random_words/dependencies.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - name: Install xkcdpass Python package diff --git a/tests/integration/targets/lookup_random_words/test.yml b/tests/integration/targets/lookup_random_words/test.yml index 352cc684ae..90c6727304 100644 --- a/tests/integration/targets/lookup_random_words/test.yml +++ b/tests/integration/targets/lookup_random_words/test.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost gather_facts: false tasks: diff --git a/tests/integration/targets/lvg/aliases b/tests/integration/targets/lvg/aliases index 79f3300ff1..01205a3972 100644 --- a/tests/integration/targets/lvg/aliases +++ b/tests/integration/targets/lvg/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive needs/privileged shippable/posix/group1 diff --git a/tests/integration/targets/lvg/meta/main.yml b/tests/integration/targets/lvg/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/lvg/meta/main.yml +++ b/tests/integration/targets/lvg/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/lvg/tasks/setup.yml b/tests/integration/targets/lvg/tasks/setup.yml index e63c2d641e..92785e6d3d 100644 --- a/tests/integration/targets/lvg/tasks/setup.yml +++ b/tests/integration/targets/lvg/tasks/setup.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Create files to use as a disk devices" command: "dd if=/dev/zero of={{ remote_tmp_dir }}/img{{ item }} bs=1M count=10" with_sequence: 'count=2' diff --git a/tests/integration/targets/lvg/tasks/teardown.yml b/tests/integration/targets/lvg/tasks/teardown.yml index ed662f1e1f..027c1257fe 100644 --- a/tests/integration/targets/lvg/tasks/teardown.yml +++ b/tests/integration/targets/lvg/tasks/teardown.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Remove test volume group lvg: vg: testvg diff --git a/tests/integration/targets/lvg/tasks/test_grow_reduce.yml b/tests/integration/targets/lvg/tasks/test_grow_reduce.yml index 1e98804538..5974a88aaf 100644 --- a/tests/integration/targets/lvg/tasks/test_grow_reduce.yml +++ b/tests/integration/targets/lvg/tasks/test_grow_reduce.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Create volume group on first disk" lvg: vg: testvg diff --git a/tests/integration/targets/lvg/tasks/test_indempotency.yml b/tests/integration/targets/lvg/tasks/test_indempotency.yml index 5007e56a5b..abaa262881 100644 --- a/tests/integration/targets/lvg/tasks/test_indempotency.yml +++ b/tests/integration/targets/lvg/tasks/test_indempotency.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create volume group on disk device lvg: vg: testvg diff --git a/tests/integration/targets/lvg/tasks/test_pvresize.yml b/tests/integration/targets/lvg/tasks/test_pvresize.yml index 9112f8bffa..c8a2c8edb5 100644 --- a/tests/integration/targets/lvg/tasks/test_pvresize.yml +++ b/tests/integration/targets/lvg/tasks/test_pvresize.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Create volume group on first disk" lvg: vg: testvg diff --git a/tests/integration/targets/lxd_project/aliases b/tests/integration/targets/lxd_project/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/lxd_project/aliases +++ b/tests/integration/targets/lxd_project/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/mail/aliases b/tests/integration/targets/mail/aliases index a6dafcf8cd..abc0d5476d 100644 --- a/tests/integration/targets/mail/aliases +++ b/tests/integration/targets/mail/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 diff --git a/tests/integration/targets/mail/meta/main.yml b/tests/integration/targets/mail/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/mail/meta/main.yml +++ b/tests/integration/targets/mail/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/mas/aliases b/tests/integration/targets/mas/aliases index 57c4f1c080..91d38c3b47 100644 --- a/tests/integration/targets/mas/aliases +++ b/tests/integration/targets/mas/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/root unsupported \ No newline at end of file diff --git a/tests/integration/targets/mas/tasks/main.yml b/tests/integration/targets/mas/tasks/main.yml index 85982a5968..ce50c39eb1 100644 --- a/tests/integration/targets/mas/tasks/main.yml +++ b/tests/integration/targets/mas/tasks/main.yml @@ -1,3 +1,4 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # @@ -7,7 +8,7 @@ # Copyright (c) 2020, Lukas Bestle # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + # Test preparation - name: Uninstall Rested to ensure consistent starting point mas: diff --git a/tests/integration/targets/memset_dns_reload/aliases b/tests/integration/targets/memset_dns_reload/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/memset_dns_reload/aliases +++ b/tests/integration/targets/memset_dns_reload/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/memset_dns_reload/meta/main.yml b/tests/integration/targets/memset_dns_reload/meta/main.yml index 73b314ff7c..b4bfd8560b 100644 --- a/tests/integration/targets/memset_dns_reload/meta/main.yml +++ b/tests/integration/targets/memset_dns_reload/meta/main.yml @@ -1 +1,4 @@ ---- \ No newline at end of file +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/memset_memstore_info/aliases b/tests/integration/targets/memset_memstore_info/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/memset_memstore_info/aliases +++ b/tests/integration/targets/memset_memstore_info/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/memset_memstore_info/meta/main.yml b/tests/integration/targets/memset_memstore_info/meta/main.yml index 73b314ff7c..b4bfd8560b 100644 --- a/tests/integration/targets/memset_memstore_info/meta/main.yml +++ b/tests/integration/targets/memset_memstore_info/meta/main.yml @@ -1 +1,4 @@ ---- \ No newline at end of file +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/memset_server_info/aliases b/tests/integration/targets/memset_server_info/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/memset_server_info/aliases +++ b/tests/integration/targets/memset_server_info/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/memset_server_info/meta/main.yml b/tests/integration/targets/memset_server_info/meta/main.yml index 73b314ff7c..b4bfd8560b 100644 --- a/tests/integration/targets/memset_server_info/meta/main.yml +++ b/tests/integration/targets/memset_server_info/meta/main.yml @@ -1 +1,4 @@ ---- \ No newline at end of file +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/memset_zone/aliases b/tests/integration/targets/memset_zone/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/memset_zone/aliases +++ b/tests/integration/targets/memset_zone/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/memset_zone/meta/main.yml b/tests/integration/targets/memset_zone/meta/main.yml index ed97d539c0..f55df21f81 100644 --- a/tests/integration/targets/memset_zone/meta/main.yml +++ b/tests/integration/targets/memset_zone/meta/main.yml @@ -1 +1,4 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/memset_zone/vars/main.yml b/tests/integration/targets/memset_zone/vars/main.yml index 1f8f2eba1e..8828011b0a 100644 --- a/tests/integration/targets/memset_zone/vars/main.yml +++ b/tests/integration/targets/memset_zone/vars/main.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + random_string: "baiqui8ci6miedoo9eivohJ0aixei7oo" diff --git a/tests/integration/targets/memset_zone_domain/aliases b/tests/integration/targets/memset_zone_domain/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/memset_zone_domain/aliases +++ b/tests/integration/targets/memset_zone_domain/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/memset_zone_domain/meta/main.yml b/tests/integration/targets/memset_zone_domain/meta/main.yml index 73b314ff7c..b4bfd8560b 100644 --- a/tests/integration/targets/memset_zone_domain/meta/main.yml +++ b/tests/integration/targets/memset_zone_domain/meta/main.yml @@ -1 +1,4 @@ ---- \ No newline at end of file +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/memset_zone_domain/vars/main.yml b/tests/integration/targets/memset_zone_domain/vars/main.yml index 022e6a3cfc..e891ff49f7 100644 --- a/tests/integration/targets/memset_zone_domain/vars/main.yml +++ b/tests/integration/targets/memset_zone_domain/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + test_domain: ansible.example.com target_zone: ansible-dns-zone duplicate_zone: ansible-dns-zone-dupe diff --git a/tests/integration/targets/memset_zone_record/aliases b/tests/integration/targets/memset_zone_record/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/memset_zone_record/aliases +++ b/tests/integration/targets/memset_zone_record/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/memset_zone_record/meta/main.yml b/tests/integration/targets/memset_zone_record/meta/main.yml index ed97d539c0..f55df21f81 100644 --- a/tests/integration/targets/memset_zone_record/meta/main.yml +++ b/tests/integration/targets/memset_zone_record/meta/main.yml @@ -1 +1,4 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/memset_zone_record/vars/main.yml b/tests/integration/targets/memset_zone_record/vars/main.yml index ae0598bd6f..857f1c7229 100644 --- a/tests/integration/targets/memset_zone_record/vars/main.yml +++ b/tests/integration/targets/memset_zone_record/vars/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + test_zone: ansible-dns-record-tests duplicate_zone: ansible-dns-zone-dupe diff --git a/tests/integration/targets/module_helper/aliases b/tests/integration/targets/module_helper/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/module_helper/aliases +++ b/tests/integration/targets/module_helper/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/monit/aliases b/tests/integration/targets/monit/aliases index 547c800b8b..e60be5e504 100644 --- a/tests/integration/targets/monit/aliases +++ b/tests/integration/targets/monit/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive needs/target/setup_epel shippable/posix/group2 diff --git a/tests/integration/targets/monit/defaults/main.yml b/tests/integration/targets/monit/defaults/main.yml index 71b22f442e..ec064643ce 100644 --- a/tests/integration/targets/monit/defaults/main.yml +++ b/tests/integration/targets/monit/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + process_root: /opt/httpd_echo process_file: "{{ process_root }}/httpd_echo.py" process_venv: "{{ process_root }}/venv" diff --git a/tests/integration/targets/monit/meta/main.yml b/tests/integration/targets/monit/meta/main.yml index ba4306cced..2d6cafb56f 100644 --- a/tests/integration/targets/monit/meta/main.yml +++ b/tests/integration/targets/monit/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_constraints diff --git a/tests/integration/targets/monit/tasks/check_state.yml b/tests/integration/targets/monit/tasks/check_state.yml index 9b5ff04293..bc8eb7c81a 100644 --- a/tests/integration/targets/monit/tasks/check_state.yml +++ b/tests/integration/targets/monit/tasks/check_state.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "{{ reason }} ('up')" command: "curl -sf http://localhost:8082/hello" when: service_state == 'up' diff --git a/tests/integration/targets/monit/tasks/test.yml b/tests/integration/targets/monit/tasks/test.yml index c36997fcec..42fd033c73 100644 --- a/tests/integration/targets/monit/tasks/test.yml +++ b/tests/integration/targets/monit/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # order is important - import_tasks: test_reload_present.yml diff --git a/tests/integration/targets/monit/tasks/test_errors.yml b/tests/integration/targets/monit/tasks/test_errors.yml index 4520fd8b85..3626723877 100644 --- a/tests/integration/targets/monit/tasks/test_errors.yml +++ b/tests/integration/targets/monit/tasks/test_errors.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Check an error occurs when wrong process name is used monit: name: missing diff --git a/tests/integration/targets/monit/tasks/test_reload_present.yml b/tests/integration/targets/monit/tasks/test_reload_present.yml index 31f37e7476..0bd6cd073b 100644 --- a/tests/integration/targets/monit/tasks/test_reload_present.yml +++ b/tests/integration/targets/monit/tasks/test_reload_present.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: reload monit when process is missing monit: name: httpd_echo diff --git a/tests/integration/targets/monit/tasks/test_state.yml b/tests/integration/targets/monit/tasks/test_state.yml index f78fbc55e7..33a70c196a 100644 --- a/tests/integration/targets/monit/tasks/test_state.yml +++ b/tests/integration/targets/monit/tasks/test_state.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: check_state.yml vars: reason: verify initial service state diff --git a/tests/integration/targets/monit/vars/Alpine.yml b/tests/integration/targets/monit/vars/Alpine.yml index cb76bac9e4..773c9d985a 100644 --- a/tests/integration/targets/monit/vars/Alpine.yml +++ b/tests/integration/targets/monit/vars/Alpine.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + monitrc: "/etc/monitrc" diff --git a/tests/integration/targets/monit/vars/Archlinux.yml b/tests/integration/targets/monit/vars/Archlinux.yml index cb76bac9e4..773c9d985a 100644 --- a/tests/integration/targets/monit/vars/Archlinux.yml +++ b/tests/integration/targets/monit/vars/Archlinux.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + monitrc: "/etc/monitrc" diff --git a/tests/integration/targets/monit/vars/CentOS-6.yml b/tests/integration/targets/monit/vars/CentOS-6.yml index 7b769cb460..9ff9c26410 100644 --- a/tests/integration/targets/monit/vars/CentOS-6.yml +++ b/tests/integration/targets/monit/vars/CentOS-6.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + monitrc: "/etc/monit.conf" diff --git a/tests/integration/targets/monit/vars/RedHat.yml b/tests/integration/targets/monit/vars/RedHat.yml index cb76bac9e4..773c9d985a 100644 --- a/tests/integration/targets/monit/vars/RedHat.yml +++ b/tests/integration/targets/monit/vars/RedHat.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + monitrc: "/etc/monitrc" diff --git a/tests/integration/targets/monit/vars/Suse.yml b/tests/integration/targets/monit/vars/Suse.yml index cb76bac9e4..773c9d985a 100644 --- a/tests/integration/targets/monit/vars/Suse.yml +++ b/tests/integration/targets/monit/vars/Suse.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + monitrc: "/etc/monitrc" diff --git a/tests/integration/targets/monit/vars/defaults.yml b/tests/integration/targets/monit/vars/defaults.yml index 5254ded926..74c76c7c9c 100644 --- a/tests/integration/targets/monit/vars/defaults.yml +++ b/tests/integration/targets/monit/vars/defaults.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + monitrc: "/etc/monit/monitrc" diff --git a/tests/integration/targets/mqtt/aliases b/tests/integration/targets/mqtt/aliases index 9a30a5a281..471b8e86f5 100644 --- a/tests/integration/targets/mqtt/aliases +++ b/tests/integration/targets/mqtt/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/osx diff --git a/tests/integration/targets/mqtt/meta/main.yml b/tests/integration/targets/mqtt/meta/main.yml index 86f3d04363..a9c2068edc 100644 --- a/tests/integration/targets/mqtt/meta/main.yml +++ b/tests/integration/targets/mqtt/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_mosquitto diff --git a/tests/integration/targets/mqtt/tasks/ubuntu.yml b/tests/integration/targets/mqtt/tasks/ubuntu.yml index 71ff3e90bc..0c0a12d041 100644 --- a/tests/integration/targets/mqtt/tasks/ubuntu.yml +++ b/tests/integration/targets/mqtt/tasks/ubuntu.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install pip packages pip: name: paho-mqtt>=1.4.0 diff --git a/tests/integration/targets/mssql_script/aliases b/tests/integration/targets/mssql_script/aliases index a6c2c7e086..f7e30d271e 100644 --- a/tests/integration/targets/mssql_script/aliases +++ b/tests/integration/targets/mssql_script/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + skip/osx skip/macos skip/freebsd diff --git a/tests/integration/targets/mssql_script/defaults/main.yml b/tests/integration/targets/mssql_script/defaults/main.yml index 017e2cf725..0e66154749 100644 --- a/tests/integration/targets/mssql_script/defaults/main.yml +++ b/tests/integration/targets/mssql_script/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + mssql_host: localhost mssql_port: 14330 mssql_login_user: sa diff --git a/tests/integration/targets/nomad/aliases b/tests/integration/targets/nomad/aliases index 3141aee60b..f9f52d7b84 100644 --- a/tests/integration/targets/nomad/aliases +++ b/tests/integration/targets/nomad/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 nomad_job_info destructive diff --git a/tests/integration/targets/nomad/meta/main.yml b/tests/integration/targets/nomad/meta/main.yml index f9bb8406a4..bda682bf7d 100644 --- a/tests/integration/targets/nomad/meta/main.yml +++ b/tests/integration/targets/nomad/meta/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_openssl diff --git a/tests/integration/targets/nomad/tasks/main.yml b/tests/integration/targets/nomad/tasks/main.yml index abf78aad98..f04b905ce5 100644 --- a/tests/integration/targets/nomad/tasks/main.yml +++ b/tests/integration/targets/nomad/tasks/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Skip unsupported platforms meta: end_play # TODO: figure out why Alpine does not work! diff --git a/tests/integration/targets/nomad/tasks/nomad_job.yml b/tests/integration/targets/nomad/tasks/nomad_job.yml index f2137f4eff..2a4f223aa4 100644 --- a/tests/integration/targets/nomad/tasks/nomad_job.yml +++ b/tests/integration/targets/nomad/tasks/nomad_job.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: run check deploy nomad job nomad_job: diff --git a/tests/integration/targets/npm/aliases b/tests/integration/targets/npm/aliases index e09dd4459f..b1c4f2872e 100644 --- a/tests/integration/targets/npm/aliases +++ b/tests/integration/targets/npm/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 destructive skip/aix diff --git a/tests/integration/targets/npm/meta/main.yml b/tests/integration/targets/npm/meta/main.yml index 230548b160..6147ad33e5 100644 --- a/tests/integration/targets/npm/meta/main.yml +++ b/tests/integration/targets/npm/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_gnutar diff --git a/tests/integration/targets/npm/tasks/no_bin_links.yml b/tests/integration/targets/npm/tasks/no_bin_links.yml index 5c89f70517..3588f76429 100644 --- a/tests/integration/targets/npm/tasks/no_bin_links.yml +++ b/tests/integration/targets/npm/tasks/no_bin_links.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 'Remove any node modules' file: path: '{{ remote_dir }}/node_modules' diff --git a/tests/integration/targets/npm/tasks/run.yml b/tests/integration/targets/npm/tasks/run.yml index c82e7e4e37..9ce3802709 100644 --- a/tests/integration/targets/npm/tasks/run.yml +++ b/tests/integration/targets/npm/tasks/run.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - include_tasks: setup.yml - include_tasks: test.yml - include_tasks: no_bin_links.yml diff --git a/tests/integration/targets/npm/tasks/setup.yml b/tests/integration/targets/npm/tasks/setup.yml index a463b1f8b7..0c7a9eabfb 100644 --- a/tests/integration/targets/npm/tasks/setup.yml +++ b/tests/integration/targets/npm/tasks/setup.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 'Download NPM' unarchive: src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/npm/{{ nodejs_path }}.tar.gz' diff --git a/tests/integration/targets/npm/tasks/test.yml b/tests/integration/targets/npm/tasks/test.yml index d254710f0b..c8e83f6027 100644 --- a/tests/integration/targets/npm/tasks/test.yml +++ b/tests/integration/targets/npm/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 'Remove any node modules' file: path: '{{ remote_dir }}/node_modules' diff --git a/tests/integration/targets/odbc/aliases b/tests/integration/targets/odbc/aliases index 6e13799f82..75f18e362c 100644 --- a/tests/integration/targets/odbc/aliases +++ b/tests/integration/targets/odbc/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/osx diff --git a/tests/integration/targets/odbc/defaults/main.yml b/tests/integration/targets/odbc/defaults/main.yml index aa8eeb74a5..dd75f54718 100644 --- a/tests/integration/targets/odbc/defaults/main.yml +++ b/tests/integration/targets/odbc/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # defaults file for test_postgresql_db my_user: 'ansible_user' my_pass: 'md5d5e044ccd9b4b8adc89e8fed2eb0db8a' diff --git a/tests/integration/targets/odbc/meta/main.yml b/tests/integration/targets/odbc/meta/main.yml index d88c3e1429..0d06eaa398 100644 --- a/tests/integration/targets/odbc/meta/main.yml +++ b/tests/integration/targets/odbc/meta/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_postgresql_db diff --git a/tests/integration/targets/odbc/tasks/install_pyodbc.yml b/tests/integration/targets/odbc/tasks/install_pyodbc.yml index ab808b92fc..e0cefe14d3 100644 --- a/tests/integration/targets/odbc/tasks/install_pyodbc.yml +++ b/tests/integration/targets/odbc/tasks/install_pyodbc.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Install {{ ansible_os_family }} Libraries" package: name: "{{ packages[ansible_os_family] }}" diff --git a/tests/integration/targets/odbc/tasks/negative_tests.yml b/tests/integration/targets/odbc/tasks/negative_tests.yml index a560b73cf9..56b7a9b824 100644 --- a/tests/integration/targets/odbc/tasks/negative_tests.yml +++ b/tests/integration/targets/odbc/tasks/negative_tests.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # # Missing params for the module # There is nothing you need to do here because the params are required diff --git a/tests/integration/targets/odbc/tasks/no_pyodbc.yml b/tests/integration/targets/odbc/tasks/no_pyodbc.yml index ac66edd94b..417549b63f 100644 --- a/tests/integration/targets/odbc/tasks/no_pyodbc.yml +++ b/tests/integration/targets/odbc/tasks/no_pyodbc.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Testing the module without pyodbc odbc: dsn: "Test" diff --git a/tests/integration/targets/one_host/aliases b/tests/integration/targets/one_host/aliases index c3d15acf55..7fba83598a 100644 --- a/tests/integration/targets/one_host/aliases +++ b/tests/integration/targets/one_host/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/opennebula shippable/cloud/group1 disabled # FIXME diff --git a/tests/integration/targets/one_host/meta/main.yml b/tests/integration/targets/one_host/meta/main.yml index 86752df8dd..de2e79f32d 100644 --- a/tests/integration/targets/one_host/meta/main.yml +++ b/tests/integration/targets/one_host/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_opennebula \ No newline at end of file diff --git a/tests/integration/targets/one_template/aliases b/tests/integration/targets/one_template/aliases index c3d15acf55..7fba83598a 100644 --- a/tests/integration/targets/one_template/aliases +++ b/tests/integration/targets/one_template/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/opennebula shippable/cloud/group1 disabled # FIXME diff --git a/tests/integration/targets/one_template/meta/main.yml b/tests/integration/targets/one_template/meta/main.yml index 86752df8dd..de2e79f32d 100644 --- a/tests/integration/targets/one_template/meta/main.yml +++ b/tests/integration/targets/one_template/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_opennebula \ No newline at end of file diff --git a/tests/integration/targets/osx_defaults/aliases b/tests/integration/targets/osx_defaults/aliases index 6e0b78e003..ee063facf6 100644 --- a/tests/integration/targets/osx_defaults/aliases +++ b/tests/integration/targets/osx_defaults/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/osx_defaults/tasks/main.yml b/tests/integration/targets/osx_defaults/tasks/main.yml index 917cdb51f2..0de351991a 100644 --- a/tests/integration/targets/osx_defaults/tasks/main.yml +++ b/tests/integration/targets/osx_defaults/tasks/main.yml @@ -1,3 +1,4 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # @@ -7,7 +8,7 @@ # Copyright (c) 2019, Abhijeet Kasurde # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ---- + - name: Check if name is required for present osx_defaults: domain: NSGlobalDomain diff --git a/tests/integration/targets/pacman/aliases b/tests/integration/targets/pacman/aliases index 4db7e45ee5..0262a240bb 100644 --- a/tests/integration/targets/pacman/aliases +++ b/tests/integration/targets/pacman/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/pacman/meta/main.yml b/tests/integration/targets/pacman/meta/main.yml index add84cee60..08ce20c21d 100644 --- a/tests/integration/targets/pacman/meta/main.yml +++ b/tests/integration/targets/pacman/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir - setup_pkg_mgr diff --git a/tests/integration/targets/pacman/tasks/basic.yml b/tests/integration/targets/pacman/tasks/basic.yml index eac3bc4eec..ae2f9c0b56 100644 --- a/tests/integration/targets/pacman/tasks/basic.yml +++ b/tests/integration/targets/pacman/tasks/basic.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - vars: package_name: unarj block: diff --git a/tests/integration/targets/pacman/tasks/locally_installed_package.yml b/tests/integration/targets/pacman/tasks/locally_installed_package.yml index 308d39e442..a5f1832364 100644 --- a/tests/integration/targets/pacman/tasks/locally_installed_package.yml +++ b/tests/integration/targets/pacman/tasks/locally_installed_package.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - vars: package_name: ansible-test-foo username: ansible-regular-user diff --git a/tests/integration/targets/pacman/tasks/package_urls.yml b/tests/integration/targets/pacman/tasks/package_urls.yml index 653657f1ec..8cd4ddc01d 100644 --- a/tests/integration/targets/pacman/tasks/package_urls.yml +++ b/tests/integration/targets/pacman/tasks/package_urls.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - vars: http_port: 27617 reg_pkg: ed diff --git a/tests/integration/targets/pacman/tasks/reason.yml b/tests/integration/targets/pacman/tasks/reason.yml index 51b2bf36ba..3e7f2e11e4 100644 --- a/tests/integration/targets/pacman/tasks/reason.yml +++ b/tests/integration/targets/pacman/tasks/reason.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - vars: reg_pkg: ed url_pkg: lemon diff --git a/tests/integration/targets/pacman/tasks/remove_nosave.yml b/tests/integration/targets/pacman/tasks/remove_nosave.yml index 54d056f33e..c6d1c961cb 100644 --- a/tests/integration/targets/pacman/tasks/remove_nosave.yml +++ b/tests/integration/targets/pacman/tasks/remove_nosave.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - vars: package_name: xinetd config_file: /etc/xinetd.conf diff --git a/tests/integration/targets/pacman/tasks/update_cache.yml b/tests/integration/targets/pacman/tasks/update_cache.yml index c9b33e65ff..ee2ac3b9f4 100644 --- a/tests/integration/targets/pacman/tasks/update_cache.yml +++ b/tests/integration/targets/pacman/tasks/update_cache.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Make sure package cache is updated pacman: update_cache: true diff --git a/tests/integration/targets/pagerduty_user/aliases b/tests/integration/targets/pagerduty_user/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/pagerduty_user/aliases +++ b/tests/integration/targets/pagerduty_user/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/pagerduty_user/vars/main.yml b/tests/integration/targets/pagerduty_user/vars/main.yml index 384d4b9917..209b886707 100644 --- a/tests/integration/targets/pagerduty_user/vars/main.yml +++ b/tests/integration/targets/pagerduty_user/vars/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + pd_api_access_token: your_api_access_token fullname: User Name email: user@email.com diff --git a/tests/integration/targets/pam_limits/aliases b/tests/integration/targets/pam_limits/aliases index abe0a21e22..3cde3b1715 100644 --- a/tests/integration/targets/pam_limits/aliases +++ b/tests/integration/targets/pam_limits/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/pamd/aliases b/tests/integration/targets/pamd/aliases index abe0a21e22..3cde3b1715 100644 --- a/tests/integration/targets/pamd/aliases +++ b/tests/integration/targets/pamd/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/pids/aliases b/tests/integration/targets/pids/aliases index b59832142f..7a0fc5c1ea 100644 --- a/tests/integration/targets/pids/aliases +++ b/tests/integration/targets/pids/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 diff --git a/tests/integration/targets/pids/files/obtainpid.sh b/tests/integration/targets/pids/files/obtainpid.sh index 0cfa6a9e34..1090f87786 100644 --- a/tests/integration/targets/pids/files/obtainpid.sh +++ b/tests/integration/targets/pids/files/obtainpid.sh @@ -1,3 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + "$1" 100 & echo "$!" > "$2" diff --git a/tests/integration/targets/pids/meta/main.yml b/tests/integration/targets/pids/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/pids/meta/main.yml +++ b/tests/integration/targets/pids/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/pipx/aliases b/tests/integration/targets/pipx/aliases index 9f7f442b32..0f370b3776 100644 --- a/tests/integration/targets/pipx/aliases +++ b/tests/integration/targets/pipx/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group2 skip/python2 diff --git a/tests/integration/targets/pipx/tasks/main.yml b/tests/integration/targets/pipx/tasks/main.yml index ebf2b31076..ff6d921697 100644 --- a/tests/integration/targets/pipx/tasks/main.yml +++ b/tests/integration/targets/pipx/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: install pipx pip: name: pipx diff --git a/tests/integration/targets/pkgng/aliases b/tests/integration/targets/pkgng/aliases index 360849e61b..6972c2b6c8 100644 --- a/tests/integration/targets/pkgng/aliases +++ b/tests/integration/targets/pkgng/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 needs/root skip/docker diff --git a/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml b/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml index 7010aeaa0a..e63cb72312 100644 --- a/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml +++ b/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create temporary directory for package creation tempfile: state: directory diff --git a/tests/integration/targets/pkgng/tasks/freebsd.yml b/tests/integration/targets/pkgng/tasks/freebsd.yml index b06f5a0333..a864daa130 100644 --- a/tests/integration/targets/pkgng/tasks/freebsd.yml +++ b/tests/integration/targets/pkgng/tasks/freebsd.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ## ## pkgng - prepare test environment ## diff --git a/tests/integration/targets/pkgng/tasks/install_single_package.yml b/tests/integration/targets/pkgng/tasks/install_single_package.yml index 7115b8a8a1..00768085ca 100644 --- a/tests/integration/targets/pkgng/tasks/install_single_package.yml +++ b/tests/integration/targets/pkgng/tasks/install_single_package.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Verify package sentinel file is not present stat: path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}' diff --git a/tests/integration/targets/pkgng/tasks/main.yml b/tests/integration/targets/pkgng/tasks/main.yml index d9e340bd40..59ca83d9f0 100644 --- a/tests/integration/targets/pkgng/tasks/main.yml +++ b/tests/integration/targets/pkgng/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: freebsd.yml when: - ansible_facts.distribution == 'FreeBSD' diff --git a/tests/integration/targets/pkgng/tasks/setup-testjail.yml b/tests/integration/targets/pkgng/tasks/setup-testjail.yml index 22130745ef..99505af591 100644 --- a/tests/integration/targets/pkgng/tasks/setup-testjail.yml +++ b/tests/integration/targets/pkgng/tasks/setup-testjail.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # # Instructions for setting up a jail # https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-ezjail.html diff --git a/tests/integration/targets/pkgng/vars/main.yml b/tests/integration/targets/pkgng/vars/main.yml index d5aca65cdd..e32cc4110c 100644 --- a/tests/integration/targets/pkgng/vars/main.yml +++ b/tests/integration/targets/pkgng/vars/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + pkgng_test_outofdate_pkg_path: "/tmp/ansible_pkgng_test_package.pkg" pkgng_test_pkg_name: zsh pkgng_test_pkg_category: shells diff --git a/tests/integration/targets/pkgutil/aliases b/tests/integration/targets/pkgutil/aliases index 5e163ed765..4232e0baa5 100644 --- a/tests/integration/targets/pkgutil/aliases +++ b/tests/integration/targets/pkgutil/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive unsupported diff --git a/tests/integration/targets/proxmox/aliases b/tests/integration/targets/proxmox/aliases index caa35b7354..5e5957a5c2 100644 --- a/tests/integration/targets/proxmox/aliases +++ b/tests/integration/targets/proxmox/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported proxmox_domain_info proxmox_group_info diff --git a/tests/integration/targets/python_requirements_info/aliases b/tests/integration/targets/python_requirements_info/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/python_requirements_info/aliases +++ b/tests/integration/targets/python_requirements_info/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/read_csv/aliases b/tests/integration/targets/read_csv/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/read_csv/aliases +++ b/tests/integration/targets/read_csv/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/redis_info/aliases b/tests/integration/targets/redis_info/aliases index c8c8757ff2..8573c40daa 100644 --- a/tests/integration/targets/redis_info/aliases +++ b/tests/integration/targets/redis_info/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/redis_info/defaults/main.yml b/tests/integration/targets/redis_info/defaults/main.yml index e1f03ee7ed..56e9c4386d 100644 --- a/tests/integration/targets/redis_info/defaults/main.yml +++ b/tests/integration/targets/redis_info/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + redis_password: PASS master_port: 6379 replica_port: 6380 diff --git a/tests/integration/targets/redis_info/meta/main.yml b/tests/integration/targets/redis_info/meta/main.yml index 5b07837132..cd516fd239 100644 --- a/tests/integration/targets/redis_info/meta/main.yml +++ b/tests/integration/targets/redis_info/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_redis_replication diff --git a/tests/integration/targets/rundeck/aliases b/tests/integration/targets/rundeck/aliases index 41c0922440..0da9ab1822 100644 --- a/tests/integration/targets/rundeck/aliases +++ b/tests/integration/targets/rundeck/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/rundeck/defaults/main.yml b/tests/integration/targets/rundeck/defaults/main.yml index 1fe3871186..4d7ea31468 100644 --- a/tests/integration/targets/rundeck/defaults/main.yml +++ b/tests/integration/targets/rundeck/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + rundeck_url: http://localhost:4440 rundeck_api_version: 39 rundeck_job_id: 3b8a6e54-69fb-42b7-b98f-f82e59238478 diff --git a/tests/integration/targets/rundeck/files/test_job.yaml b/tests/integration/targets/rundeck/files/test_job.yaml index baae3ac9d8..baa852ecce 100644 --- a/tests/integration/targets/rundeck/files/test_job.yaml +++ b/tests/integration/targets/rundeck/files/test_job.yaml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - defaultTab: nodes description: '' executionEnabled: true diff --git a/tests/integration/targets/rundeck/meta/main.yml b/tests/integration/targets/rundeck/meta/main.yml index 3b4174fac6..c125e4046a 100644 --- a/tests/integration/targets/rundeck/meta/main.yml +++ b/tests/integration/targets/rundeck/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_rundeck diff --git a/tests/integration/targets/scaleway_compute/aliases b/tests/integration/targets/scaleway_compute/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_compute/aliases +++ b/tests/integration/targets/scaleway_compute/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_compute/defaults/main.yml b/tests/integration/targets/scaleway_compute/defaults/main.yml index 4b2b2799c3..dfa104bdd0 100644 --- a/tests/integration/targets/scaleway_compute/defaults/main.yml +++ b/tests/integration/targets/scaleway_compute/defaults/main.yml @@ -1,5 +1,9 @@ -# Below information has been taken from https://developer.scaleway.com/#servers --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +# Below information has been taken from https://developer.scaleway.com/#servers scaleway_image_id: 6a601340-19c1-4ca7-9c1c-0704bcc9f5fe scaleway_organization: '{{ scw_org }}' scaleway_region: ams1 diff --git a/tests/integration/targets/scaleway_compute/tasks/ip.yml b/tests/integration/targets/scaleway_compute/tasks/ip.yml index 445e955d8c..dbbfe4b549 100644 --- a/tests/integration/targets/scaleway_compute/tasks/ip.yml +++ b/tests/integration/targets/scaleway_compute/tasks/ip.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a server with no IP (Check) check_mode: yes scaleway_compute: diff --git a/tests/integration/targets/scaleway_compute/tasks/pagination.yml b/tests/integration/targets/scaleway_compute/tasks/pagination.yml index 7b7dd49bd4..5a674b8014 100644 --- a/tests/integration/targets/scaleway_compute/tasks/pagination.yml +++ b/tests/integration/targets/scaleway_compute/tasks/pagination.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a first server scaleway_compute: name: '{{ first_server_name }}' diff --git a/tests/integration/targets/scaleway_compute/tasks/security_group.yml b/tests/integration/targets/scaleway_compute/tasks/security_group.yml index a0e273c2ca..6126514212 100644 --- a/tests/integration/targets/scaleway_compute/tasks/security_group.yml +++ b/tests/integration/targets/scaleway_compute/tasks/security_group.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a scaleway security_group scaleway_security_group: state: present diff --git a/tests/integration/targets/scaleway_compute/tasks/state.yml b/tests/integration/targets/scaleway_compute/tasks/state.yml index effd27e85f..8f015ad337 100644 --- a/tests/integration/targets/scaleway_compute/tasks/state.yml +++ b/tests/integration/targets/scaleway_compute/tasks/state.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a server (Check) check_mode: yes scaleway_compute: diff --git a/tests/integration/targets/scaleway_database_backup/aliases b/tests/integration/targets/scaleway_database_backup/aliases index 03de00bcd8..bc773973cd 100644 --- a/tests/integration/targets/scaleway_database_backup/aliases +++ b/tests/integration/targets/scaleway_database_backup/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported \ No newline at end of file diff --git a/tests/integration/targets/scaleway_database_backup/defaults/main.yml b/tests/integration/targets/scaleway_database_backup/defaults/main.yml index 0e2cdcb94a..4cfd12619b 100644 --- a/tests/integration/targets/scaleway_database_backup/defaults/main.yml +++ b/tests/integration/targets/scaleway_database_backup/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + scaleway_name: scaleway_database_backup_test scaleway_region: fr-par scaleway_database_name: scaleway_database_test diff --git a/tests/integration/targets/scaleway_image_info/aliases b/tests/integration/targets/scaleway_image_info/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_image_info/aliases +++ b/tests/integration/targets/scaleway_image_info/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_ip/aliases b/tests/integration/targets/scaleway_ip/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_ip/aliases +++ b/tests/integration/targets/scaleway_ip/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_ip/defaults/main.yml b/tests/integration/targets/scaleway_ip/defaults/main.yml index fe7aa93baf..00ec26ff66 100644 --- a/tests/integration/targets/scaleway_ip/defaults/main.yml +++ b/tests/integration/targets/scaleway_ip/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + scaleway_organization: '{{ scw_org }}' scaleway_region: ams1 scaleway_image_id: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe diff --git a/tests/integration/targets/scaleway_ip_info/aliases b/tests/integration/targets/scaleway_ip_info/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_ip_info/aliases +++ b/tests/integration/targets/scaleway_ip_info/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_lb/aliases b/tests/integration/targets/scaleway_lb/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_lb/aliases +++ b/tests/integration/targets/scaleway_lb/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_lb/defaults/main.yml b/tests/integration/targets/scaleway_lb/defaults/main.yml index 48d56e1089..c0d37800ad 100644 --- a/tests/integration/targets/scaleway_lb/defaults/main.yml +++ b/tests/integration/targets/scaleway_lb/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + scaleway_region: fr-par name: lb_ansible_test description: Load-balancer used for testing scaleway_lb ansible module diff --git a/tests/integration/targets/scaleway_organization_info/aliases b/tests/integration/targets/scaleway_organization_info/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_organization_info/aliases +++ b/tests/integration/targets/scaleway_organization_info/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_security_group/aliases b/tests/integration/targets/scaleway_security_group/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_security_group/aliases +++ b/tests/integration/targets/scaleway_security_group/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_security_group/defaults/main.yml b/tests/integration/targets/scaleway_security_group/defaults/main.yml index 13bbef06af..ffada80807 100644 --- a/tests/integration/targets/scaleway_security_group/defaults/main.yml +++ b/tests/integration/targets/scaleway_security_group/defaults/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + scaleway_organization: '{{ scw_org }}' scaleway_region: ams1 diff --git a/tests/integration/targets/scaleway_security_group_info/aliases b/tests/integration/targets/scaleway_security_group_info/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_security_group_info/aliases +++ b/tests/integration/targets/scaleway_security_group_info/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_security_group_rule/aliases b/tests/integration/targets/scaleway_security_group_rule/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_security_group_rule/aliases +++ b/tests/integration/targets/scaleway_security_group_rule/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_security_group_rule/defaults/main.yml b/tests/integration/targets/scaleway_security_group_rule/defaults/main.yml index 9c56c4db77..965ccf594a 100644 --- a/tests/integration/targets/scaleway_security_group_rule/defaults/main.yml +++ b/tests/integration/targets/scaleway_security_group_rule/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + scaleway_organization: '{{ scw_org }}' scaleway_region: par1 protocol: "TCP" diff --git a/tests/integration/targets/scaleway_server_info/aliases b/tests/integration/targets/scaleway_server_info/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_server_info/aliases +++ b/tests/integration/targets/scaleway_server_info/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_snapshot_info/aliases b/tests/integration/targets/scaleway_snapshot_info/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_snapshot_info/aliases +++ b/tests/integration/targets/scaleway_snapshot_info/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_sshkey/aliases b/tests/integration/targets/scaleway_sshkey/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_sshkey/aliases +++ b/tests/integration/targets/scaleway_sshkey/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_user_data/aliases b/tests/integration/targets/scaleway_user_data/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_user_data/aliases +++ b/tests/integration/targets/scaleway_user_data/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_user_data/defaults/main.yml b/tests/integration/targets/scaleway_user_data/defaults/main.yml index 69396fccaa..7c53696b69 100644 --- a/tests/integration/targets/scaleway_user_data/defaults/main.yml +++ b/tests/integration/targets/scaleway_user_data/defaults/main.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later cloud_init_script: ''' #cloud-config diff --git a/tests/integration/targets/scaleway_volume/aliases b/tests/integration/targets/scaleway_volume/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_volume/aliases +++ b/tests/integration/targets/scaleway_volume/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/scaleway_volume/defaults/main.yml b/tests/integration/targets/scaleway_volume/defaults/main.yml index 13bbef06af..ffada80807 100644 --- a/tests/integration/targets/scaleway_volume/defaults/main.yml +++ b/tests/integration/targets/scaleway_volume/defaults/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + scaleway_organization: '{{ scw_org }}' scaleway_region: ams1 diff --git a/tests/integration/targets/scaleway_volume_info/aliases b/tests/integration/targets/scaleway_volume_info/aliases index f24a42a8e5..b2267f6311 100644 --- a/tests/integration/targets/scaleway_volume_info/aliases +++ b/tests/integration/targets/scaleway_volume_info/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cloud/scaleway unsupported diff --git a/tests/integration/targets/sefcontext/aliases b/tests/integration/targets/sefcontext/aliases index 58a2a31e7e..3a1d1f7e34 100644 --- a/tests/integration/targets/sefcontext/aliases +++ b/tests/integration/targets/sefcontext/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/root shippable/posix/group2 skip/aix diff --git a/tests/integration/targets/sefcontext/meta/main.yml b/tests/integration/targets/sefcontext/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/sefcontext/meta/main.yml +++ b/tests/integration/targets/sefcontext/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/sensu_client/aliases b/tests/integration/targets/sensu_client/aliases index 5dcaaac61c..225cabc08b 100644 --- a/tests/integration/targets/sensu_client/aliases +++ b/tests/integration/targets/sensu_client/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 needs/root diff --git a/tests/integration/targets/sensu_handler/aliases b/tests/integration/targets/sensu_handler/aliases index 5dcaaac61c..225cabc08b 100644 --- a/tests/integration/targets/sensu_handler/aliases +++ b/tests/integration/targets/sensu_handler/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 needs/root diff --git a/tests/integration/targets/sensu_handler/tasks/pipe.yml b/tests/integration/targets/sensu_handler/tasks/pipe.yml index 02f59a4cd1..46fe240808 100644 --- a/tests/integration/targets/sensu_handler/tasks/pipe.yml +++ b/tests/integration/targets/sensu_handler/tasks/pipe.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Note: Pipe handlers are also tested and used as part of basic main.yml coverage - name: Configuring a handler with missing pipe parameters should fail sensu_handler: diff --git a/tests/integration/targets/sensu_handler/tasks/set.yml b/tests/integration/targets/sensu_handler/tasks/set.yml index 393d711dc3..e9a86057c2 100644 --- a/tests/integration/targets/sensu_handler/tasks/set.yml +++ b/tests/integration/targets/sensu_handler/tasks/set.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Configuring a handler with missing set parameters should fail sensu_handler: name: "set" diff --git a/tests/integration/targets/sensu_handler/tasks/tcp.yml b/tests/integration/targets/sensu_handler/tasks/tcp.yml index 076ea14e1e..a5db1d3973 100644 --- a/tests/integration/targets/sensu_handler/tasks/tcp.yml +++ b/tests/integration/targets/sensu_handler/tasks/tcp.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Configuring a handler with missing tcp parameters should fail sensu_handler: name: "tcp" diff --git a/tests/integration/targets/sensu_handler/tasks/transport.yml b/tests/integration/targets/sensu_handler/tasks/transport.yml index 34816194fa..fa2563fa9b 100644 --- a/tests/integration/targets/sensu_handler/tasks/transport.yml +++ b/tests/integration/targets/sensu_handler/tasks/transport.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Configuring a handler with missing transport parameters should fail sensu_handler: name: "transport" diff --git a/tests/integration/targets/sensu_handler/tasks/udp.yml b/tests/integration/targets/sensu_handler/tasks/udp.yml index 8f13a2a25e..60e88bb986 100644 --- a/tests/integration/targets/sensu_handler/tasks/udp.yml +++ b/tests/integration/targets/sensu_handler/tasks/udp.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Configuring a handler with missing udp parameters should fail sensu_handler: name: "udp" diff --git a/tests/integration/targets/setup_cron/defaults/main.yml b/tests/integration/targets/setup_cron/defaults/main.yml index e4b0123da2..aa7de77fec 100644 --- a/tests/integration/targets/setup_cron/defaults/main.yml +++ b/tests/integration/targets/setup_cron/defaults/main.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + remote_dir: "{{ lookup('env', 'OUTPUT_DIR') }}" diff --git a/tests/integration/targets/setup_cron/meta/main.yml b/tests/integration/targets/setup_cron/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/setup_cron/meta/main.yml +++ b/tests/integration/targets/setup_cron/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/setup_cron/vars/alpine.yml b/tests/integration/targets/setup_cron/vars/alpine.yml index ae713e3a8d..7c28829c60 100644 --- a/tests/integration/targets/setup_cron/vars/alpine.yml +++ b/tests/integration/targets/setup_cron/vars/alpine.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_pkg: cronie cron_service: cronie list_pkg_files: apk info -L diff --git a/tests/integration/targets/setup_cron/vars/archlinux.yml b/tests/integration/targets/setup_cron/vars/archlinux.yml index 2ebe8d11ca..c714683ada 100644 --- a/tests/integration/targets/setup_cron/vars/archlinux.yml +++ b/tests/integration/targets/setup_cron/vars/archlinux.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_pkg: cronie cron_service: cronie list_pkg_files: pacman -Ql diff --git a/tests/integration/targets/setup_cron/vars/debian.yml b/tests/integration/targets/setup_cron/vars/debian.yml index cd04871c5d..1eefe007c7 100644 --- a/tests/integration/targets/setup_cron/vars/debian.yml +++ b/tests/integration/targets/setup_cron/vars/debian.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_pkg: cron cron_service: cron list_pkg_files: dpkg -L diff --git a/tests/integration/targets/setup_cron/vars/default.yml b/tests/integration/targets/setup_cron/vars/default.yml index e69de29bb2..b4bfd8560b 100644 --- a/tests/integration/targets/setup_cron/vars/default.yml +++ b/tests/integration/targets/setup_cron/vars/default.yml @@ -0,0 +1,4 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file diff --git a/tests/integration/targets/setup_cron/vars/fedora.yml b/tests/integration/targets/setup_cron/vars/fedora.yml index b80a51b54d..0d17db6bad 100644 --- a/tests/integration/targets/setup_cron/vars/fedora.yml +++ b/tests/integration/targets/setup_cron/vars/fedora.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_pkg: cronie cron_service: crond list_pkg_files: rpm -ql diff --git a/tests/integration/targets/setup_cron/vars/freebsd.yml b/tests/integration/targets/setup_cron/vars/freebsd.yml index 41ed449395..2848710160 100644 --- a/tests/integration/targets/setup_cron/vars/freebsd.yml +++ b/tests/integration/targets/setup_cron/vars/freebsd.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_pkg: cron_service: cron list_pkg_files: pkg info --list-files diff --git a/tests/integration/targets/setup_cron/vars/redhat.yml b/tests/integration/targets/setup_cron/vars/redhat.yml index 2dff13de09..2998f7b845 100644 --- a/tests/integration/targets/setup_cron/vars/redhat.yml +++ b/tests/integration/targets/setup_cron/vars/redhat.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_pkg: cronie cron_service: crond faketime_pkg: diff --git a/tests/integration/targets/setup_cron/vars/suse.yml b/tests/integration/targets/setup_cron/vars/suse.yml index cd3677a6e8..77e7e09e34 100644 --- a/tests/integration/targets/setup_cron/vars/suse.yml +++ b/tests/integration/targets/setup_cron/vars/suse.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cron_pkg: cron cron_service: cron list_pkg_files: rpm -ql diff --git a/tests/integration/targets/setup_etcd3/meta/main.yml b/tests/integration/targets/setup_etcd3/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/setup_etcd3/meta/main.yml +++ b/tests/integration/targets/setup_etcd3/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml b/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml index 2e0c082446..8c36cb043e 100644 --- a/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml +++ b/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + etcd3_pip_module: etcd3<0.12 \ No newline at end of file diff --git a/tests/integration/targets/setup_etcd3/vars/Suse-py3.yml b/tests/integration/targets/setup_etcd3/vars/Suse-py3.yml index bacd4a371a..4e7c275b89 100644 --- a/tests/integration/targets/setup_etcd3/vars/Suse-py3.yml +++ b/tests/integration/targets/setup_etcd3/vars/Suse-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # SuSE's python 3.6.10 comes with six 1.11.0 as distutil # we restrict to etcd3 < 0.11 to avoid pip to try to upgrade six etcd3_pip_module: 'etcd3<0.11' diff --git a/tests/integration/targets/setup_etcd3/vars/Suse.yml b/tests/integration/targets/setup_etcd3/vars/Suse.yml index bacd4a371a..4e7c275b89 100644 --- a/tests/integration/targets/setup_etcd3/vars/Suse.yml +++ b/tests/integration/targets/setup_etcd3/vars/Suse.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # SuSE's python 3.6.10 comes with six 1.11.0 as distutil # we restrict to etcd3 < 0.11 to avoid pip to try to upgrade six etcd3_pip_module: 'etcd3<0.11' diff --git a/tests/integration/targets/setup_etcd3/vars/default.yml b/tests/integration/targets/setup_etcd3/vars/default.yml index 4a01b0ace8..575865c19b 100644 --- a/tests/integration/targets/setup_etcd3/vars/default.yml +++ b/tests/integration/targets/setup_etcd3/vars/default.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # default should don't touch anything \ No newline at end of file diff --git a/tests/integration/targets/setup_flatpak_remote/create-repo.sh b/tests/integration/targets/setup_flatpak_remote/create-repo.sh index 3f44fe96f2..11c7621842 100755 --- a/tests/integration/targets/setup_flatpak_remote/create-repo.sh +++ b/tests/integration/targets/setup_flatpak_remote/create-repo.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + set -eux # Delete traces from last run diff --git a/tests/integration/targets/setup_flatpak_remote/handlers/main.yaml b/tests/integration/targets/setup_flatpak_remote/handlers/main.yaml index 9380dee96b..0c88d256e9 100644 --- a/tests/integration/targets/setup_flatpak_remote/handlers/main.yaml +++ b/tests/integration/targets/setup_flatpak_remote/handlers/main.yaml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: remove temporary flatpak link file: state: absent diff --git a/tests/integration/targets/setup_flatpak_remote/meta/main.yaml b/tests/integration/targets/setup_flatpak_remote/meta/main.yaml index 75ee4583ac..1b3d5b8758 100644 --- a/tests/integration/targets/setup_flatpak_remote/meta/main.yaml +++ b/tests/integration/targets/setup_flatpak_remote/meta/main.yaml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/setup_gnutar/handlers/main.yml b/tests/integration/targets/setup_gnutar/handlers/main.yml index b4f66cd393..975e0b47a8 100644 --- a/tests/integration/targets/setup_gnutar/handlers/main.yml +++ b/tests/integration/targets/setup_gnutar/handlers/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: uninstall gnu-tar community.general.homebrew: name: gnu-tar diff --git a/tests/integration/targets/setup_gnutar/tasks/main.yml b/tests/integration/targets/setup_gnutar/tasks/main.yml index 7b973d474b..c7024666b0 100644 --- a/tests/integration/targets/setup_gnutar/tasks/main.yml +++ b/tests/integration/targets/setup_gnutar/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - when: ansible_facts.distribution == 'MacOSX' block: - name: MACOS | Find brew binary diff --git a/tests/integration/targets/setup_influxdb/tasks/setup.yml b/tests/integration/targets/setup_influxdb/tasks/setup.yml index 0069be1562..205bd27d8f 100644 --- a/tests/integration/targets/setup_influxdb/tasks/setup.yml +++ b/tests/integration/targets/setup_influxdb/tasks/setup.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Install https transport for apt and ca-certificates apt: name={{ item }} state=latest force=yes diff --git a/tests/integration/targets/setup_java_keytool/meta/main.yml b/tests/integration/targets/setup_java_keytool/meta/main.yml index 2be15776b7..d4a5c7d05a 100644 --- a/tests/integration/targets/setup_java_keytool/meta/main.yml +++ b/tests/integration/targets/setup_java_keytool/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_constraints - setup_pkg_mgr diff --git a/tests/integration/targets/setup_java_keytool/vars/Alpine.yml b/tests/integration/targets/setup_java_keytool/vars/Alpine.yml index 471da74d6b..4ff75ae8c3 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Alpine.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Alpine.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + keytool_package_name: openjdk11-jre-headless diff --git a/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml b/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml index 15acabe1e5..9e29065b3d 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + keytool_package_name: jre11-openjdk-headless diff --git a/tests/integration/targets/setup_java_keytool/vars/Debian.yml b/tests/integration/targets/setup_java_keytool/vars/Debian.yml index faace450a7..30ae5cd047 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Debian.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Debian.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + keytool_package_name: ca-certificates-java diff --git a/tests/integration/targets/setup_java_keytool/vars/RedHat.yml b/tests/integration/targets/setup_java_keytool/vars/RedHat.yml index d301dff436..c200091f81 100644 --- a/tests/integration/targets/setup_java_keytool/vars/RedHat.yml +++ b/tests/integration/targets/setup_java_keytool/vars/RedHat.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + keytool_package_name: java-11-openjdk-headless diff --git a/tests/integration/targets/setup_java_keytool/vars/Suse.yml b/tests/integration/targets/setup_java_keytool/vars/Suse.yml index d301dff436..c200091f81 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Suse.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Suse.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + keytool_package_name: java-11-openjdk-headless diff --git a/tests/integration/targets/setup_mosquitto/meta/main.yml b/tests/integration/targets/setup_mosquitto/meta/main.yml index af05db79d4..488c355d06 100644 --- a/tests/integration/targets/setup_mosquitto/meta/main.yml +++ b/tests/integration/targets/setup_mosquitto/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_tls diff --git a/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml b/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml index 5675cb8923..dd1c340d08 100644 --- a/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml +++ b/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install https transport for apt apt: name: apt-transport-https diff --git a/tests/integration/targets/setup_openldap/meta/main.yml b/tests/integration/targets/setup_openldap/meta/main.yml index b63c3d017c..2fcd152f95 100644 --- a/tests/integration/targets/setup_openldap/meta/main.yml +++ b/tests/integration/targets/setup_openldap/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/setup_openldap/vars/Debian.yml b/tests/integration/targets/setup_openldap/vars/Debian.yml index bcc4feb9ed..3b4f198108 100644 --- a/tests/integration/targets/setup_openldap/vars/Debian.yml +++ b/tests/integration/targets/setup_openldap/vars/Debian.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + python_ldap_package_name: python-ldap python_ldap_package_name_python3: python3-ldap openldap_packages_name: diff --git a/tests/integration/targets/setup_openldap/vars/Ubuntu.yml b/tests/integration/targets/setup_openldap/vars/Ubuntu.yml index bcc4feb9ed..3b4f198108 100644 --- a/tests/integration/targets/setup_openldap/vars/Ubuntu.yml +++ b/tests/integration/targets/setup_openldap/vars/Ubuntu.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + python_ldap_package_name: python-ldap python_ldap_package_name_python3: python3-ldap openldap_packages_name: diff --git a/tests/integration/targets/setup_opennebula/meta/main.yml b/tests/integration/targets/setup_opennebula/meta/main.yml index 91a63627f6..fe9e33681d 100644 --- a/tests/integration/targets/setup_opennebula/meta/main.yml +++ b/tests/integration/targets/setup_opennebula/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_constraints diff --git a/tests/integration/targets/setup_opennebula/tasks/main.yml b/tests/integration/targets/setup_opennebula/tasks/main.yml index 6d18e147da..b7babbaab4 100644 --- a/tests/integration/targets/setup_opennebula/tasks/main.yml +++ b/tests/integration/targets/setup_opennebula/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required library pip: name: pyone diff --git a/tests/integration/targets/setup_opennebula/vars/main.yml b/tests/integration/targets/setup_opennebula/vars/main.yml index 05cf47e2cf..747659e1fd 100644 --- a/tests/integration/targets/setup_opennebula/vars/main.yml +++ b/tests/integration/targets/setup_opennebula/vars/main.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later opennebula_test: hosts: diff --git a/tests/integration/targets/setup_openssl/meta/main.yml b/tests/integration/targets/setup_openssl/meta/main.yml index 2be15776b7..d4a5c7d05a 100644 --- a/tests/integration/targets/setup_openssl/meta/main.yml +++ b/tests/integration/targets/setup_openssl/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_constraints - setup_pkg_mgr diff --git a/tests/integration/targets/setup_openssl/vars/Alpine.yml b/tests/integration/targets/setup_openssl/vars/Alpine.yml index 664da81f7f..c5d4d23a4c 100644 --- a/tests/integration/targets/setup_openssl/vars/Alpine.yml +++ b/tests/integration/targets/setup_openssl/vars/Alpine.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: py-cryptography cryptography_package_name_python3: py3-cryptography pyopenssl_package_name: py-openssl diff --git a/tests/integration/targets/setup_openssl/vars/Archlinux.yml b/tests/integration/targets/setup_openssl/vars/Archlinux.yml index f503b8e9d0..b6ae2fe108 100644 --- a/tests/integration/targets/setup_openssl/vars/Archlinux.yml +++ b/tests/integration/targets/setup_openssl/vars/Archlinux.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: python-cryptography cryptography_package_name_python3: python-cryptography pyopenssl_package_name: python-pyopenssl diff --git a/tests/integration/targets/setup_openssl/vars/CentOS-8.yml b/tests/integration/targets/setup_openssl/vars/CentOS-8.yml index a3521337c9..875a697183 100644 --- a/tests/integration/targets/setup_openssl/vars/CentOS-8.yml +++ b/tests/integration/targets/setup_openssl/vars/CentOS-8.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: python-cryptography cryptography_package_name_python3: python3-cryptography openssl_package_name: openssl diff --git a/tests/integration/targets/setup_openssl/vars/Darwin.yml b/tests/integration/targets/setup_openssl/vars/Darwin.yml index 8dfa88ebae..b3dbd9811d 100644 --- a/tests/integration/targets/setup_openssl/vars/Darwin.yml +++ b/tests/integration/targets/setup_openssl/vars/Darwin.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_from_pip: true diff --git a/tests/integration/targets/setup_openssl/vars/Debian.yml b/tests/integration/targets/setup_openssl/vars/Debian.yml index 8181922778..6ef3df1a10 100644 --- a/tests/integration/targets/setup_openssl/vars/Debian.yml +++ b/tests/integration/targets/setup_openssl/vars/Debian.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: python-cryptography cryptography_package_name_python3: python3-cryptography pyopenssl_package_name: python-openssl diff --git a/tests/integration/targets/setup_openssl/vars/FreeBSD.yml b/tests/integration/targets/setup_openssl/vars/FreeBSD.yml index 6de6920e5d..e5ad6812f0 100644 --- a/tests/integration/targets/setup_openssl/vars/FreeBSD.yml +++ b/tests/integration/targets/setup_openssl/vars/FreeBSD.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: py27-cryptography cryptography_package_name_python3: "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-cryptography" pyopenssl_package_name: py27-openssl diff --git a/tests/integration/targets/setup_openssl/vars/RedHat-9.yml b/tests/integration/targets/setup_openssl/vars/RedHat-9.yml index 587309dc07..ac9b3344eb 100644 --- a/tests/integration/targets/setup_openssl/vars/RedHat-9.yml +++ b/tests/integration/targets/setup_openssl/vars/RedHat-9.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: python-cryptography cryptography_package_name_python3: python3-cryptography openssl_package_name: openssl diff --git a/tests/integration/targets/setup_openssl/vars/RedHat.yml b/tests/integration/targets/setup_openssl/vars/RedHat.yml index 0ae46a475f..ef78bab01d 100644 --- a/tests/integration/targets/setup_openssl/vars/RedHat.yml +++ b/tests/integration/targets/setup_openssl/vars/RedHat.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: python-cryptography cryptography_package_name_python3: python3-cryptography pyopenssl_package_name: pyOpenSSL diff --git a/tests/integration/targets/setup_openssl/vars/Suse.yml b/tests/integration/targets/setup_openssl/vars/Suse.yml index 6725aa79b6..b7d246653c 100644 --- a/tests/integration/targets/setup_openssl/vars/Suse.yml +++ b/tests/integration/targets/setup_openssl/vars/Suse.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + cryptography_package_name: python-cryptography cryptography_package_name_python3: python3-cryptography pyopenssl_package_name: python-pyOpenSSL diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml b/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml index b92f22d2e1..fc75f84dfd 100644 --- a/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml +++ b/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Since Arch Linux is a rolling distribution, it regularly needs its packages upgraded, otherwise some tests might # stop working due to conflicts during package installation. Since there is no good way to do this on container # startup time, we use the setup_pkg_mgr setup role to do this once per CI run (hopefully). In case the Arch Linux diff --git a/tests/integration/targets/setup_postgresql_db/defaults/main.yml b/tests/integration/targets/setup_postgresql_db/defaults/main.yml index aea0244280..1a33ecafab 100644 --- a/tests/integration/targets/setup_postgresql_db/defaults/main.yml +++ b/tests/integration/targets/setup_postgresql_db/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_service: postgresql postgresql_packages: diff --git a/tests/integration/targets/setup_postgresql_db/meta/main.yml b/tests/integration/targets/setup_postgresql_db/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/setup_postgresql_db/meta/main.yml +++ b/tests/integration/targets/setup_postgresql_db/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/setup_postgresql_db/vars/Alpine-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Alpine-py3.yml index e7d9b5aea6..99a8a14b86 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Alpine-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Alpine-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "py3-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Archlinux-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Archlinux-py3.yml index 693328e92b..40215d1ad9 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Archlinux-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Archlinux-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "python-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Debian-11-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Debian-11-py3.yml index a46ecd2bd5..1ffd257b2e 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Debian-11-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Debian-11-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml b/tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml index c5c6795eac..87063214a8 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml index e24226b4bc..a92de47cb2 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - postgresql95-server - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml index efb0603b5e..c38f3b59be 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - postgresql95-server - py27-psycopg2 diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml index e24226b4bc..a92de47cb2 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - postgresql95-server - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml index 1fe6678262..7c5586f5bf 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - postgresql96-server - py27-psycopg2 diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml index d116e42589..8e5ddfa137 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - postgresql11-server - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml index 0b1ab5b26e..0cdc22e13b 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - postgresql11-server - py27-psycopg2 diff --git a/tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml index ee08372226..3892f2e451 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql-server" - "python3-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml b/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml index 20c4b1f5b7..5670a7fc92 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql-server" - "python-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml index 4b6e744b44..1d850de845 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml index ffcc8dd496..881fc533ea 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml index b088c3105e..482982fe1e 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml index 897efd2c76..f2df72af7c 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18-py3.yml index 10453bdf90..19213f4d6a 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20-py3.yml index 7322bcb216..58fb8a06f7 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml index b1521e4bc5..8ea444099d 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql" - "postgresql-common" diff --git a/tests/integration/targets/setup_postgresql_db/vars/default-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/default-py3.yml index 19152a6435..6f96043a39 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/default-py3.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/default-py3.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql-server" - "python3-psycopg2" diff --git a/tests/integration/targets/setup_postgresql_db/vars/default.yml b/tests/integration/targets/setup_postgresql_db/vars/default.yml index ab36dd9f1d..9d64d969aa 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/default.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/default.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + postgresql_packages: - "postgresql-server" - "python-psycopg2" diff --git a/tests/integration/targets/setup_redis_replication/defaults/main.yml b/tests/integration/targets/setup_redis_replication/defaults/main.yml index 1ab3c53a15..46dae9898a 100644 --- a/tests/integration/targets/setup_redis_replication/defaults/main.yml +++ b/tests/integration/targets/setup_redis_replication/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # General redis_packages: Alpine: diff --git a/tests/integration/targets/setup_redis_replication/handlers/main.yml b/tests/integration/targets/setup_redis_replication/handlers/main.yml index 1b3cd57912..a0595cbe30 100644 --- a/tests/integration/targets/setup_redis_replication/handlers/main.yml +++ b/tests/integration/targets/setup_redis_replication/handlers/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: stop redis services shell: | kill -TERM $(cat /var/run/redis_{{ master_port }}.pid) diff --git a/tests/integration/targets/setup_redis_replication/meta/main.yml b/tests/integration/targets/setup_redis_replication/meta/main.yml index bfccf6072b..db2617f4ce 100644 --- a/tests/integration/targets/setup_redis_replication/meta/main.yml +++ b/tests/integration/targets/setup_redis_replication/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_constraints diff --git a/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml b/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml index 534f3d5686..dd48bf2b64 100644 --- a/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml +++ b/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # We run two servers listening different ports # to be able to check replication (one server for master, another for replica). diff --git a/tests/integration/targets/setup_remote_constraints/aliases b/tests/integration/targets/setup_remote_constraints/aliases index 1ad133ba0a..27ce6b0875 100644 --- a/tests/integration/targets/setup_remote_constraints/aliases +++ b/tests/integration/targets/setup_remote_constraints/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/file/tests/utils/constraints.txt diff --git a/tests/integration/targets/setup_remote_constraints/meta/main.yml b/tests/integration/targets/setup_remote_constraints/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/setup_remote_constraints/meta/main.yml +++ b/tests/integration/targets/setup_remote_constraints/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml b/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml index 229037c8b2..f1c55b04f3 100644 --- a/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml +++ b/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: delete temporary directory include_tasks: default-cleanup.yml diff --git a/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml b/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml index 39872d749f..e19d903e6b 100644 --- a/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml +++ b/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: delete temporary directory file: path: "{{ remote_tmp_dir }}" diff --git a/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml b/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml index 1e0f51b890..c9d871c698 100644 --- a/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml +++ b/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: create temporary directory tempfile: state: directory diff --git a/tests/integration/targets/setup_rundeck/defaults/main.yml b/tests/integration/targets/setup_rundeck/defaults/main.yml index 5b6f45f527..c842901c0f 100644 --- a/tests/integration/targets/setup_rundeck/defaults/main.yml +++ b/tests/integration/targets/setup_rundeck/defaults/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + rundeck_war_url: https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/rundeck-3.4.4-20210920.war/artifacts/rundeck-3.4.4-20210920.war/download rundeck_cli_url: https://github.com/rundeck/rundeck-cli/releases/download/v1.3.10/rundeck-cli-1.3.10-all.jar diff --git a/tests/integration/targets/setup_rundeck/meta/main.yml b/tests/integration/targets/setup_rundeck/meta/main.yml index b63c3d017c..2fcd152f95 100644 --- a/tests/integration/targets/setup_rundeck/meta/main.yml +++ b/tests/integration/targets/setup_rundeck/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/setup_rundeck/vars/Alpine.yml b/tests/integration/targets/setup_rundeck/vars/Alpine.yml index 7a5b937e3f..dbf16b7472 100644 --- a/tests/integration/targets/setup_rundeck/vars/Alpine.yml +++ b/tests/integration/targets/setup_rundeck/vars/Alpine.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + openjdk_pkg: openjdk11-jre-headless diff --git a/tests/integration/targets/setup_rundeck/vars/Archlinux.yml b/tests/integration/targets/setup_rundeck/vars/Archlinux.yml index a3b6a08ddf..fd4429c0bd 100644 --- a/tests/integration/targets/setup_rundeck/vars/Archlinux.yml +++ b/tests/integration/targets/setup_rundeck/vars/Archlinux.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + openjdk_pkg: jre11-openjdk-headless diff --git a/tests/integration/targets/setup_rundeck/vars/Debian.yml b/tests/integration/targets/setup_rundeck/vars/Debian.yml index b5f0c421c1..1407cede6a 100644 --- a/tests/integration/targets/setup_rundeck/vars/Debian.yml +++ b/tests/integration/targets/setup_rundeck/vars/Debian.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + openjdk_pkg: openjdk-11-jre-headless diff --git a/tests/integration/targets/setup_rundeck/vars/RedHat.yml b/tests/integration/targets/setup_rundeck/vars/RedHat.yml index 08e32950f8..314f0ef415 100644 --- a/tests/integration/targets/setup_rundeck/vars/RedHat.yml +++ b/tests/integration/targets/setup_rundeck/vars/RedHat.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + openjdk_pkg: java-1.8.0-openjdk diff --git a/tests/integration/targets/setup_snap/aliases b/tests/integration/targets/setup_snap/aliases index 65e831523c..0a430dff10 100644 --- a/tests/integration/targets/setup_snap/aliases +++ b/tests/integration/targets/setup_snap/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/target/setup_epel diff --git a/tests/integration/targets/setup_snap/defaults/main.yml b/tests/integration/targets/setup_snap/defaults/main.yml index 2290001f7e..7b4ab8dc7f 100644 --- a/tests/integration/targets/setup_snap/defaults/main.yml +++ b/tests/integration/targets/setup_snap/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + has_snap: false snap_packages: diff --git a/tests/integration/targets/setup_snap/handlers/main.yml b/tests/integration/targets/setup_snap/handlers/main.yml index a80cc98e49..08c1a23f1d 100644 --- a/tests/integration/targets/setup_snap/handlers/main.yml +++ b/tests/integration/targets/setup_snap/handlers/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Remove snapd package: name: "{{ snap_packages }}" diff --git a/tests/integration/targets/setup_snap/meta/main.yml b/tests/integration/targets/setup_snap/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/setup_snap/meta/main.yml +++ b/tests/integration/targets/setup_snap/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/setup_snap/tasks/default.yml b/tests/integration/targets/setup_snap/tasks/default.yml index 938addc33a..391ae86f8d 100644 --- a/tests/integration/targets/setup_snap/tasks/default.yml +++ b/tests/integration/targets/setup_snap/tasks/default.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install snapd package: name: "{{ snap_packages }}" diff --git a/tests/integration/targets/setup_snap/tasks/nothing.yml b/tests/integration/targets/setup_snap/tasks/nothing.yml index 11642d1fcd..5bbfaff128 100644 --- a/tests/integration/targets/setup_snap/tasks/nothing.yml +++ b/tests/integration/targets/setup_snap/tasks/nothing.yml @@ -1,2 +1,6 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Do nothing diff --git a/tests/integration/targets/setup_tls/files/ca_certificate.pem b/tests/integration/targets/setup_tls/files/ca_certificate.pem index a438d9266e..130e0a2daf 100644 --- a/tests/integration/targets/setup_tls/files/ca_certificate.pem +++ b/tests/integration/targets/setup_tls/files/ca_certificate.pem @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN CERTIFICATE----- MIIDAjCCAeqgAwIBAgIJANguFROhaWocMA0GCSqGSIb3DQEBCwUAMDExIDAeBgNV BAMMF1RMU0dlblNlbGZTaWduZWR0Um9vdENBMQ0wCwYDVQQHDAQkJCQkMB4XDTE5 diff --git a/tests/integration/targets/setup_tls/files/ca_key.pem b/tests/integration/targets/setup_tls/files/ca_key.pem index 0a950eda06..d9dc5ca0f5 100644 --- a/tests/integration/targets/setup_tls/files/ca_key.pem +++ b/tests/integration/targets/setup_tls/files/ca_key.pem @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDqVt84czSxWnWW 4Ng6hmKE3NarbLsycwtjrYBokV7Kk7Mp7PrBbYF05FOgSdJLvL6grlRSQK2VPsXd diff --git a/tests/integration/targets/setup_tls/files/client_certificate.pem b/tests/integration/targets/setup_tls/files/client_certificate.pem index 501d83897f..9e956e6b0f 100644 --- a/tests/integration/targets/setup_tls/files/client_certificate.pem +++ b/tests/integration/targets/setup_tls/files/client_certificate.pem @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN CERTIFICATE----- MIIDRjCCAi6gAwIBAgIBAjANBgkqhkiG9w0BAQsFADAxMSAwHgYDVQQDDBdUTFNH ZW5TZWxmU2lnbmVkdFJvb3RDQTENMAsGA1UEBwwEJCQkJDAeFw0xOTAxMTEwODMz diff --git a/tests/integration/targets/setup_tls/files/client_key.pem b/tests/integration/targets/setup_tls/files/client_key.pem index 850260a87f..3848ad7cf1 100644 --- a/tests/integration/targets/setup_tls/files/client_key.pem +++ b/tests/integration/targets/setup_tls/files/client_key.pem @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAqDPjkNxwpwlAAM/Shhk8FgfYUG1HwGV5v7LZW9v7jgKd6zcM QJQrP4IspgRxOiLupqytNOlZ/mfYm6iKw9i7gjsXLtucvIKKhutk4HT+bGvcEfuf diff --git a/tests/integration/targets/setup_tls/files/server_certificate.pem b/tests/integration/targets/setup_tls/files/server_certificate.pem index 4a0ebc6ec0..b714ddbfb8 100644 --- a/tests/integration/targets/setup_tls/files/server_certificate.pem +++ b/tests/integration/targets/setup_tls/files/server_certificate.pem @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN CERTIFICATE----- MIIDRjCCAi6gAwIBAgIBATANBgkqhkiG9w0BAQsFADAxMSAwHgYDVQQDDBdUTFNH ZW5TZWxmU2lnbmVkdFJvb3RDQTENMAsGA1UEBwwEJCQkJDAeFw0xOTAxMTEwODMz diff --git a/tests/integration/targets/setup_tls/files/server_key.pem b/tests/integration/targets/setup_tls/files/server_key.pem index c79ab64804..ec0134993e 100644 --- a/tests/integration/targets/setup_tls/files/server_key.pem +++ b/tests/integration/targets/setup_tls/files/server_key.pem @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAyMBKx8AHrEQX3fR4mZJgd1WIdvHNUJBPSPJ2MhySl9mQVIQM yvofNAZHEySfeNuualsgAh/8JeeF3v6HxVBaxmuL89Ks+FJC/yiNDhsNvGOKpyna diff --git a/tests/integration/targets/setup_wildfly_server/defaults/main.yml b/tests/integration/targets/setup_wildfly_server/defaults/main.yml index 64019a04b3..03b12c95c5 100644 --- a/tests/integration/targets/setup_wildfly_server/defaults/main.yml +++ b/tests/integration/targets/setup_wildfly_server/defaults/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + wf_tmp_dir: '{{ remote_tmp_dir }}/wildfly_tmp' wf_homedir: '{{ wf_tmp_dir }}/wildfly' wf_service_file_path: /etc/systemd/system/wildfly.service diff --git a/tests/integration/targets/setup_wildfly_server/handlers/main.yml b/tests/integration/targets/setup_wildfly_server/handlers/main.yml index 98db569dba..641025edb1 100644 --- a/tests/integration/targets/setup_wildfly_server/handlers/main.yml +++ b/tests/integration/targets/setup_wildfly_server/handlers/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Stop wildfly (jboss) systemd: name: wildfly diff --git a/tests/integration/targets/setup_wildfly_server/meta/main.yml b/tests/integration/targets/setup_wildfly_server/meta/main.yml index 6dabc5c7e6..2d29ebb672 100644 --- a/tests/integration/targets/setup_wildfly_server/meta/main.yml +++ b/tests/integration/targets/setup_wildfly_server/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/shutdown/aliases b/tests/integration/targets/shutdown/aliases index a6dafcf8cd..abc0d5476d 100644 --- a/tests/integration/targets/shutdown/aliases +++ b/tests/integration/targets/shutdown/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 diff --git a/tests/integration/targets/snap/aliases b/tests/integration/targets/snap/aliases index ee303bf346..b8fcb9ee4a 100644 --- a/tests/integration/targets/snap/aliases +++ b/tests/integration/targets/snap/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/snap/meta/main.yml b/tests/integration/targets/snap/meta/main.yml index 6ee9a022c1..f36427f71a 100644 --- a/tests/integration/targets/snap/meta/main.yml +++ b/tests/integration/targets/snap/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_snap diff --git a/tests/integration/targets/snap_alias/aliases b/tests/integration/targets/snap_alias/aliases index ee303bf346..b8fcb9ee4a 100644 --- a/tests/integration/targets/snap_alias/aliases +++ b/tests/integration/targets/snap_alias/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/snap_alias/meta/main.yml b/tests/integration/targets/snap_alias/meta/main.yml index 6ee9a022c1..f36427f71a 100644 --- a/tests/integration/targets/snap_alias/meta/main.yml +++ b/tests/integration/targets/snap_alias/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_snap diff --git a/tests/integration/targets/snap_alias/tasks/test.yml b/tests/integration/targets/snap_alias/tasks/test.yml index 6bfcc04341..50e6e33b49 100644 --- a/tests/integration/targets/snap_alias/tasks/test.yml +++ b/tests/integration/targets/snap_alias/tasks/test.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Ensure snap 'hello-world' is not installed community.general.snap: name: hello-world diff --git a/tests/integration/targets/spectrum_model_attrs/aliases b/tests/integration/targets/spectrum_model_attrs/aliases index ad7ccf7ada..bd1f024441 100644 --- a/tests/integration/targets/spectrum_model_attrs/aliases +++ b/tests/integration/targets/spectrum_model_attrs/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unsupported diff --git a/tests/integration/targets/spectrum_model_attrs/tasks/main.yml b/tests/integration/targets/spectrum_model_attrs/tasks/main.yml index c39d5c3ba2..42e53d7d7d 100644 --- a/tests/integration/targets/spectrum_model_attrs/tasks/main.yml +++ b/tests/integration/targets/spectrum_model_attrs/tasks/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "Verify required variables: model_name, model_type, oneclick_username, oneclick_password, oneclick_url" fail: msg: "One or more of the following variables are not set: model_name, model_type, oneclick_username, oneclick_password, oneclick_url" diff --git a/tests/integration/targets/ssh_config/aliases b/tests/integration/targets/ssh_config/aliases index 631a9b3e4a..6803185a41 100644 --- a/tests/integration/targets/ssh_config/aliases +++ b/tests/integration/targets/ssh_config/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group2 skip/python2.6 # stromssh only supports python3 diff --git a/tests/integration/targets/ssh_config/meta/main.yml b/tests/integration/targets/ssh_config/meta/main.yml index 4c6838dbe1..4cdaaefbaf 100644 --- a/tests/integration/targets/ssh_config/meta/main.yml +++ b/tests/integration/targets/ssh_config/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_constraints - setup_remote_tmp_dir diff --git a/tests/integration/targets/ssh_config/tasks/options.yml b/tests/integration/targets/ssh_config/tasks/options.yml index a8ab3010ef..04586873ad 100644 --- a/tests/integration/targets/ssh_config/tasks/options.yml +++ b/tests/integration/targets/ssh_config/tasks/options.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Reset ssh_config before testing options - name: Copy sample config file copy: diff --git a/tests/integration/targets/sudoers/aliases b/tests/integration/targets/sudoers/aliases index 765b70da79..be75e3ddab 100644 --- a/tests/integration/targets/sudoers/aliases +++ b/tests/integration/targets/sudoers/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 diff --git a/tests/integration/targets/sudoers/tasks/main.yml b/tests/integration/targets/sudoers/tasks/main.yml index 292aeec4e4..682bd7efff 100644 --- a/tests/integration/targets/sudoers/tasks/main.yml +++ b/tests/integration/targets/sudoers/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Initialise environment - name: Register variables diff --git a/tests/integration/targets/supervisorctl/aliases b/tests/integration/targets/supervisorctl/aliases index 1dbdd80109..453d04cb3b 100644 --- a/tests/integration/targets/supervisorctl/aliases +++ b/tests/integration/targets/supervisorctl/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group2 skip/python3 diff --git a/tests/integration/targets/supervisorctl/files/sendProcessStdin.py b/tests/integration/targets/supervisorctl/files/sendProcessStdin.py index 90b318cc82..8635b07491 100644 --- a/tests/integration/targets/supervisorctl/files/sendProcessStdin.py +++ b/tests/integration/targets/supervisorctl/files/sendProcessStdin.py @@ -1,4 +1,8 @@ #!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) diff --git a/tests/integration/targets/supervisorctl/meta/main.yml b/tests/integration/targets/supervisorctl/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/supervisorctl/meta/main.yml +++ b/tests/integration/targets/supervisorctl/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/supervisorctl/tasks/install_Linux.yml b/tests/integration/targets/supervisorctl/tasks/install_Linux.yml index ef2dab5eae..e5a7b009e0 100644 --- a/tests/integration/targets/supervisorctl/tasks/install_Linux.yml +++ b/tests/integration/targets/supervisorctl/tasks/install_Linux.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: install supervisor package: name: supervisor diff --git a/tests/integration/targets/supervisorctl/tasks/install_pip.yml b/tests/integration/targets/supervisorctl/tasks/install_pip.yml index e3582160c8..b1d3bd7796 100644 --- a/tests/integration/targets/supervisorctl/tasks/install_pip.yml +++ b/tests/integration/targets/supervisorctl/tasks/install_pip.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: install supervisord pip: name: supervisor<4.0.0 # supervisor version 4.0.0 fails tests diff --git a/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml b/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml index 1354bc8632..906d7aca4d 100644 --- a/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml +++ b/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: start supervisord command: 'supervisord -c {{ remote_dir }}/supervisord.conf' diff --git a/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml b/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml index 4da09da222..52e064d153 100644 --- a/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml +++ b/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: stop supervisord command: "supervisorctl -c {{ remote_dir }}/supervisord.conf {% if credentials.username %}-u {{ credentials.username }} -p {{ credentials.password }}{% endif %} shutdown" diff --git a/tests/integration/targets/supervisorctl/tasks/test.yml b/tests/integration/targets/supervisorctl/tasks/test.yml index 9b43c21dec..5d1a867edc 100644 --- a/tests/integration/targets/supervisorctl/tasks/test.yml +++ b/tests/integration/targets/supervisorctl/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: generate supervisor configuration template: src: supervisord.conf diff --git a/tests/integration/targets/supervisorctl/tasks/test_start.yml b/tests/integration/targets/supervisorctl/tasks/test_start.yml index c05a7dd400..b814486cdb 100644 --- a/tests/integration/targets/supervisorctl/tasks/test_start.yml +++ b/tests/integration/targets/supervisorctl/tasks/test_start.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: start py1 service (without auth) supervisorctl: name: 'pys:py1' diff --git a/tests/integration/targets/supervisorctl/tasks/test_stop.yml b/tests/integration/targets/supervisorctl/tasks/test_stop.yml index 729f0ebd42..8d8fdd42af 100644 --- a/tests/integration/targets/supervisorctl/tasks/test_stop.yml +++ b/tests/integration/targets/supervisorctl/tasks/test_stop.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: stop py1 service supervisorctl: name: 'pys:py1' diff --git a/tests/integration/targets/supervisorctl/tasks/uninstall_Linux.yml b/tests/integration/targets/supervisorctl/tasks/uninstall_Linux.yml index 300239730b..442c61b729 100644 --- a/tests/integration/targets/supervisorctl/tasks/uninstall_Linux.yml +++ b/tests/integration/targets/supervisorctl/tasks/uninstall_Linux.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: uninstall supervisor package: name: supervisor diff --git a/tests/integration/targets/supervisorctl/tasks/uninstall_pip.yml b/tests/integration/targets/supervisorctl/tasks/uninstall_pip.yml index 5bb5ee130e..cf339dfd17 100644 --- a/tests/integration/targets/supervisorctl/tasks/uninstall_pip.yml +++ b/tests/integration/targets/supervisorctl/tasks/uninstall_pip.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: uninstall supervisord pip: name: supervisor diff --git a/tests/integration/targets/supervisorctl/vars/Debian.yml b/tests/integration/targets/supervisorctl/vars/Debian.yml index d4b1bdcca9..cba575a7c5 100644 --- a/tests/integration/targets/supervisorctl/vars/Debian.yml +++ b/tests/integration/targets/supervisorctl/vars/Debian.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + supervisor_service_name: supervisor diff --git a/tests/integration/targets/supervisorctl/vars/defaults.yml b/tests/integration/targets/supervisorctl/vars/defaults.yml index fc3aa0a81c..1df9ae2503 100644 --- a/tests/integration/targets/supervisorctl/vars/defaults.yml +++ b/tests/integration/targets/supervisorctl/vars/defaults.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + supervisor_service_name: supervisord diff --git a/tests/integration/targets/sysrc/aliases b/tests/integration/targets/sysrc/aliases index 360849e61b..6972c2b6c8 100644 --- a/tests/integration/targets/sysrc/aliases +++ b/tests/integration/targets/sysrc/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 needs/root skip/docker diff --git a/tests/integration/targets/sysrc/tasks/main.yml b/tests/integration/targets/sysrc/tasks/main.yml index b8292f785b..58a0f19cf2 100644 --- a/tests/integration/targets/sysrc/tasks/main.yml +++ b/tests/integration/targets/sysrc/tasks/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test on FreeBSD VMs when: - ansible_facts.virtualization_type != 'docker' diff --git a/tests/integration/targets/sysrc/tasks/setup-testjail.yml b/tests/integration/targets/sysrc/tasks/setup-testjail.yml index e75957d19f..4ad0d63b16 100644 --- a/tests/integration/targets/sysrc/tasks/setup-testjail.yml +++ b/tests/integration/targets/sysrc/tasks/setup-testjail.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # # Instructions for setting up a jail # https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-ezjail.html diff --git a/tests/integration/targets/terraform/aliases b/tests/integration/targets/terraform/aliases index 71a9c13cf1..fcfdb195e8 100644 --- a/tests/integration/targets/terraform/aliases +++ b/tests/integration/targets/terraform/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/windows skip/aix diff --git a/tests/integration/targets/terraform/meta/main.yml b/tests/integration/targets/terraform/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/terraform/meta/main.yml +++ b/tests/integration/targets/terraform/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/terraform/tasks/main.yml b/tests/integration/targets/terraform/tasks/main.yml index f8ac3a919d..071fbaf797 100644 --- a/tests/integration/targets/terraform/tasks/main.yml +++ b/tests/integration/targets/terraform/tasks/main.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # This block checks and registers Terraform version of the binary found in path. diff --git a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml index 26cc0d842a..51f528b97b 100644 --- a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml +++ b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Output terraform provider test project ansible.builtin.template: diff --git a/tests/integration/targets/terraform/vars/main.yml b/tests/integration/targets/terraform/vars/main.yml index 64307e889d..7474836387 100644 --- a/tests/integration/targets/terraform/vars/main.yml +++ b/tests/integration/targets/terraform/vars/main.yml @@ -1,4 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Terraform version that will be downloaded terraform_version: 1.1.7 diff --git a/tests/integration/targets/test_a_module/aliases b/tests/integration/targets/test_a_module/aliases index b59832142f..7a0fc5c1ea 100644 --- a/tests/integration/targets/test_a_module/aliases +++ b/tests/integration/targets/test_a_module/aliases @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group3 diff --git a/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/galaxy.yml b/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/galaxy.yml index f66a8af4c9..2243e0dba8 100644 --- a/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/galaxy.yml +++ b/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/galaxy.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + namespace: testns name: testcoll version: 0.0.1 diff --git a/tests/integration/targets/test_a_module/runme.sh b/tests/integration/targets/test_a_module/runme.sh index a0a78be131..118abbc296 100755 --- a/tests/integration/targets/test_a_module/runme.sh +++ b/tests/integration/targets/test_a_module/runme.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/test_a_module/runme.yml b/tests/integration/targets/test_a_module/runme.yml index 1175bef20c..4b7a5ec2ce 100644 --- a/tests/integration/targets/test_a_module/runme.yml +++ b/tests/integration/targets/test_a_module/runme.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - hosts: localhost tasks: - name: Test a_module diff --git a/tests/integration/targets/timezone/aliases b/tests/integration/targets/timezone/aliases index 1ef4c3619a..86d2291bb5 100644 --- a/tests/integration/targets/timezone/aliases +++ b/tests/integration/targets/timezone/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/timezone/meta/main.yml b/tests/integration/targets/timezone/meta/main.yml index b63c3d017c..2fcd152f95 100644 --- a/tests/integration/targets/timezone/meta/main.yml +++ b/tests/integration/targets/timezone/meta/main.yml @@ -1,3 +1,7 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/timezone/tasks/test.yml b/tests/integration/targets/timezone/tasks/test.yml index 1b944fb925..5a58559d7c 100644 --- a/tests/integration/targets/timezone/tasks/test.yml +++ b/tests/integration/targets/timezone/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + ## ## test setting timezone, idempotency and checkmode ## diff --git a/tests/integration/targets/ufw/aliases b/tests/integration/targets/ufw/aliases index bb5347a578..ba9e581292 100644 --- a/tests/integration/targets/ufw/aliases +++ b/tests/integration/targets/ufw/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/aix skip/osx diff --git a/tests/integration/targets/ufw/meta/main.yml b/tests/integration/targets/ufw/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/ufw/meta/main.yml +++ b/tests/integration/targets/ufw/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/ufw/tasks/run-test.yml b/tests/integration/targets/ufw/tasks/run-test.yml index e9c5d2929c..e9e7b33f5c 100644 --- a/tests/integration/targets/ufw/tasks/run-test.yml +++ b/tests/integration/targets/ufw/tasks/run-test.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - pause: # ufw creates backups of the rule files with a timestamp; if reset is called # twice in a row fast enough (so that both timestamps are taken in the same second), diff --git a/tests/integration/targets/ufw/tasks/tests/basic.yml b/tests/integration/targets/ufw/tasks/tests/basic.yml index 3c625112f3..9aac5e6dd8 100644 --- a/tests/integration/targets/ufw/tasks/tests/basic.yml +++ b/tests/integration/targets/ufw/tasks/tests/basic.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # ############################################ - name: Make sure it is off ufw: diff --git a/tests/integration/targets/ufw/tasks/tests/global-state.yml b/tests/integration/targets/ufw/tasks/tests/global-state.yml index 69b2cde938..3e8ab4460e 100644 --- a/tests/integration/targets/ufw/tasks/tests/global-state.yml +++ b/tests/integration/targets/ufw/tasks/tests/global-state.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Enable ufw ufw: state: enabled diff --git a/tests/integration/targets/ufw/tasks/tests/insert_relative_to.yml b/tests/integration/targets/ufw/tasks/tests/insert_relative_to.yml index 3bb44a0e27..67328a0e3f 100644 --- a/tests/integration/targets/ufw/tasks/tests/insert_relative_to.yml +++ b/tests/integration/targets/ufw/tasks/tests/insert_relative_to.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Enable ufw: state: enabled diff --git a/tests/integration/targets/ufw/tasks/tests/interface.yml b/tests/integration/targets/ufw/tasks/tests/interface.yml index 776a72f879..9c7c570dc7 100644 --- a/tests/integration/targets/ufw/tasks/tests/interface.yml +++ b/tests/integration/targets/ufw/tasks/tests/interface.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Enable ufw: state: enabled diff --git a/tests/integration/targets/wakeonlan/aliases b/tests/integration/targets/wakeonlan/aliases index ed821c2754..4ed7114b08 100644 --- a/tests/integration/targets/wakeonlan/aliases +++ b/tests/integration/targets/wakeonlan/aliases @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/aix diff --git a/tests/integration/targets/xattr/aliases b/tests/integration/targets/xattr/aliases index 48e54c3f5f..093fe91e51 100644 --- a/tests/integration/targets/xattr/aliases +++ b/tests/integration/targets/xattr/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group2 skip/aix skip/docker diff --git a/tests/integration/targets/xattr/defaults/main.yml b/tests/integration/targets/xattr/defaults/main.yml index c208bf6fb9..29c6d5d15e 100644 --- a/tests/integration/targets/xattr/defaults/main.yml +++ b/tests/integration/targets/xattr/defaults/main.yml @@ -1 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + test_file: "{{ remote_tmp_dir }}/foo.txt" diff --git a/tests/integration/targets/xattr/meta/main.yml b/tests/integration/targets/xattr/meta/main.yml index 56bc554611..ca1915e05c 100644 --- a/tests/integration/targets/xattr/meta/main.yml +++ b/tests/integration/targets/xattr/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/xattr/tasks/setup.yml b/tests/integration/targets/xattr/tasks/setup.yml index 674e250aea..1338b1b30d 100644 --- a/tests/integration/targets/xattr/tasks/setup.yml +++ b/tests/integration/targets/xattr/tasks/setup.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install package: name: attr diff --git a/tests/integration/targets/xattr/tasks/test.yml b/tests/integration/targets/xattr/tasks/test.yml index 616432681f..7fe852d77a 100644 --- a/tests/integration/targets/xattr/tasks/test.yml +++ b/tests/integration/targets/xattr/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Set attributes xattr: path: "{{ test_file }}" diff --git a/tests/integration/targets/xfs_quota/aliases b/tests/integration/targets/xfs_quota/aliases index 8781d1ef7c..41006522bc 100644 --- a/tests/integration/targets/xfs_quota/aliases +++ b/tests/integration/targets/xfs_quota/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + needs/privileged needs/root shippable/posix/group1 diff --git a/tests/integration/targets/xfs_quota/defaults/main.yml b/tests/integration/targets/xfs_quota/defaults/main.yml index ff030ce79b..b209f949ab 100644 --- a/tests/integration/targets/xfs_quota/defaults/main.yml +++ b/tests/integration/targets/xfs_quota/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + uquota_default_bsoft: 1m uquota_default_bhard: 2m uquota_default_isoft: 100 diff --git a/tests/integration/targets/xfs_quota/meta/main.yml b/tests/integration/targets/xfs_quota/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/xfs_quota/meta/main.yml +++ b/tests/integration/targets/xfs_quota/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/xfs_quota/tasks/gquota.yml b/tests/integration/targets/xfs_quota/tasks/gquota.yml index daa50d9599..88c6799d1a 100644 --- a/tests/integration/targets/xfs_quota/tasks/gquota.yml +++ b/tests/integration/targets/xfs_quota/tasks/gquota.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create disk image command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-gquota bs=1M count=20 diff --git a/tests/integration/targets/xfs_quota/tasks/pquota.yml b/tests/integration/targets/xfs_quota/tasks/pquota.yml index 4e82f059dc..58b92dff73 100644 --- a/tests/integration/targets/xfs_quota/tasks/pquota.yml +++ b/tests/integration/targets/xfs_quota/tasks/pquota.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create disk image command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-pquota bs=1M count=20 diff --git a/tests/integration/targets/xfs_quota/tasks/uquota.yml b/tests/integration/targets/xfs_quota/tasks/uquota.yml index d2e5bfe241..1cca2adb2c 100644 --- a/tests/integration/targets/xfs_quota/tasks/uquota.yml +++ b/tests/integration/targets/xfs_quota/tasks/uquota.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create disk image command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-uquota bs=1M count=20 diff --git a/tests/integration/targets/xml/aliases b/tests/integration/targets/xml/aliases index 0725da563f..64596c2b12 100644 --- a/tests/integration/targets/xml/aliases +++ b/tests/integration/targets/xml/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/xml/meta/main.yml b/tests/integration/targets/xml/meta/main.yml index 5438ced5c3..2fcd152f95 100644 --- a/tests/integration/targets/xml/meta/main.yml +++ b/tests/integration/targets/xml/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr diff --git a/tests/integration/targets/xml/results/test-add-element-implicitly.yml b/tests/integration/targets/xml/results/test-add-element-implicitly.xml similarity index 100% rename from tests/integration/targets/xml/results/test-add-element-implicitly.yml rename to tests/integration/targets/xml/results/test-add-element-implicitly.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml b/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml index d89c29ae27..57bea2d7eb 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-elements.yml b/tests/integration/targets/xml/tasks/test-add-children-elements.yml index 3c439c7ac2..719a84234e 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-elements.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml b/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml index 818fdf09b9..4ad50d0406 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml b/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml index 479052ebdd..fbeff105b2 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml b/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml index 9839d7cc91..3c3212c30e 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml b/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml index 585157c970..e085dcb57b 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml b/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml index c3704801d9..cfcb906fc6 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml b/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml index 6166cd46b9..e3ed8080f7 100644 --- a/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml +++ b/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml @@ -99,7 +103,7 @@ - name: Compare to expected result copy: - src: results/test-add-element-implicitly.yml + src: results/test-add-element-implicitly.xml dest: /tmp/ansible-xml-beers-implicit.xml check_mode: yes diff: yes @@ -109,7 +113,7 @@ assert: that: - comparison is not changed # identical - #command: diff -u {{ role_path }}/results/test-add-element-implicitly.yml /tmp/ansible-xml-beers-implicit.xml + #command: diff -u {{ role_path }}/results/test-add-element-implicitly.xml /tmp/ansible-xml-beers-implicit.xml # Now we repeat the same, just to ensure proper use of namespaces diff --git a/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml b/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml index 2cac73e65c..56c0d0ba44 100644 --- a/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-namespaced-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-children-elements-xml.yml b/tests/integration/targets/xml/tasks/test-children-elements-xml.yml index 6b50d819c3..d0c27bbc1f 100644 --- a/tests/integration/targets/xml/tasks/test-children-elements-xml.yml +++ b/tests/integration/targets/xml/tasks/test-children-elements-xml.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-count-unicode.yml b/tests/integration/targets/xml/tasks/test-count-unicode.yml index a9a462b5da..58d01b8318 100644 --- a/tests/integration/targets/xml/tasks/test-count-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-count-unicode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers-unicode.xml diff --git a/tests/integration/targets/xml/tasks/test-count.yml b/tests/integration/targets/xml/tasks/test-count.yml index b8a21870f7..cc778ddcd6 100644 --- a/tests/integration/targets/xml/tasks/test-count.yml +++ b/tests/integration/targets/xml/tasks/test-count.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-get-element-content-unicode.yml b/tests/integration/targets/xml/tasks/test-get-element-content-unicode.yml index 718f12d640..475f962ebe 100644 --- a/tests/integration/targets/xml/tasks/test-get-element-content-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-get-element-content-unicode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers-unicode.xml diff --git a/tests/integration/targets/xml/tasks/test-get-element-content.yml b/tests/integration/targets/xml/tasks/test-get-element-content.yml index d38aa70d95..c75bdb223a 100644 --- a/tests/integration/targets/xml/tasks/test-get-element-content.yml +++ b/tests/integration/targets/xml/tasks/test-get-element-content.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml b/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml index 07a71f9153..0eb92fe083 100644 --- a/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml +++ b/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-pretty-print-only.yml b/tests/integration/targets/xml/tasks/test-pretty-print-only.yml index 16fcf629c5..0657186ca5 100644 --- a/tests/integration/targets/xml/tasks/test-pretty-print-only.yml +++ b/tests/integration/targets/xml/tasks/test-pretty-print-only.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-pretty-print.yml b/tests/integration/targets/xml/tasks/test-pretty-print.yml index fd47ff3d82..2ef0a0ce8b 100644 --- a/tests/integration/targets/xml/tasks/test-pretty-print.yml +++ b/tests/integration/targets/xml/tasks/test-pretty-print.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml index fbd73237f1..97bc7f525a 100644 --- a/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: results/test-remove-attribute.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-attribute.yml b/tests/integration/targets/xml/tasks/test-remove-attribute.yml index 52b5214213..4f91a46a7a 100644 --- a/tests/integration/targets/xml/tasks/test-remove-attribute.yml +++ b/tests/integration/targets/xml/tasks/test-remove-attribute.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml index e548bfabf8..ada95029e8 100644 --- a/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: results/test-remove-element.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-element.yml b/tests/integration/targets/xml/tasks/test-remove-element.yml index 092ca3e033..ff70dcd799 100644 --- a/tests/integration/targets/xml/tasks/test-remove-element.yml +++ b/tests/integration/targets/xml/tasks/test-remove-element.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml index 19c14dec8d..80dc6fee42 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: results/test-remove-namespaced-attribute.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml index 9e54911ba5..11d6183d5f 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-namespaced-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml index b96f2a7819..5bbb9ef7c7 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: results/test-remove-element.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml index 660baa9840..0f898cf5a3 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-namespaced-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml b/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml index b72d502f12..cce97e6fab 100644 --- a/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-attribute-value.yml b/tests/integration/targets/xml/tasks/test-set-attribute-value.yml index 6a2aa6c511..ffe4b828fc 100644 --- a/tests/integration/targets/xml/tasks/test-set-attribute-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-attribute-value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml b/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml index 7fa926e879..18bb17585d 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml b/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml index 3cc25cd999..e6fe28f267 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements.yml b/tests/integration/targets/xml/tasks/test-set-children-elements.yml index 7c305ead74..d6cf46d918 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml b/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml index 4575d5e75f..ccbd3e8552 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml b/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml index 139087fcd9..6324e18558 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-element-value.yml b/tests/integration/targets/xml/tasks/test-set-element-value.yml index 2f845e949b..a6d00cf9ed 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml index 2ba83a8330..e9fb691d20 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-namespaced-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml index 6204c8c74d..72d342c514 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-namespaced-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml index cf6a8a7eb0..5a20b6b56f 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup test fixture copy: src: fixtures/ansible-xml-namespaced-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-xmlstring.yml b/tests/integration/targets/xml/tasks/test-xmlstring.yml index 82781fa94d..4a0e4ad343 100644 --- a/tests/integration/targets/xml/tasks/test-xmlstring.yml +++ b/tests/integration/targets/xml/tasks/test-xmlstring.yml @@ -1,4 +1,8 @@ --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Copy expected results to remote copy: src: "results/{{ item }}" diff --git a/tests/integration/targets/xml/vars/main.yml b/tests/integration/targets/xml/vars/main.yml index 7c5675bd93..a8dfc23962 100644 --- a/tests/integration/targets/xml/vars/main.yml +++ b/tests/integration/targets/xml/vars/main.yml @@ -1,5 +1,10 @@ -# -*- mode: yaml -* --- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +# -*- mode: yaml -* + bad_beers: - beer: "Natty Lite" - beer: "Miller Lite" diff --git a/tests/integration/targets/yarn/aliases b/tests/integration/targets/yarn/aliases index 6cd621d42d..323adc00f3 100644 --- a/tests/integration/targets/yarn/aliases +++ b/tests/integration/targets/yarn/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 destructive skip/aix diff --git a/tests/integration/targets/yarn/meta/main.yml b/tests/integration/targets/yarn/meta/main.yml index 230548b160..6147ad33e5 100644 --- a/tests/integration/targets/yarn/meta/main.yml +++ b/tests/integration/targets/yarn/meta/main.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_pkg_mgr - setup_gnutar diff --git a/tests/integration/targets/yarn/tasks/run.yml b/tests/integration/targets/yarn/tasks/run.yml index 906880797f..faee660410 100644 --- a/tests/integration/targets/yarn/tasks/run.yml +++ b/tests/integration/targets/yarn/tasks/run.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: 'Create directory for Node' file: path: /usr/local/lib/nodejs diff --git a/tests/integration/targets/yum_versionlock/aliases b/tests/integration/targets/yum_versionlock/aliases index 8e981834b6..6bbff0fe26 100644 --- a/tests/integration/targets/yum_versionlock/aliases +++ b/tests/integration/targets/yum_versionlock/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + shippable/posix/group1 skip/aix skip/freebsd diff --git a/tests/integration/targets/zypper/aliases b/tests/integration/targets/zypper/aliases index 817614d6a7..58cfb98d53 100644 --- a/tests/integration/targets/zypper/aliases +++ b/tests/integration/targets/zypper/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/zypper/meta/main.yml b/tests/integration/targets/zypper/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/zypper/meta/main.yml +++ b/tests/integration/targets/zypper/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/zypper/tasks/zypper.yml b/tests/integration/targets/zypper/tasks/zypper.yml index 3394b8154e..ab1bc179eb 100644 --- a/tests/integration/targets/zypper/tasks/zypper.yml +++ b/tests/integration/targets/zypper/tasks/zypper.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: get hello package version shell: zypper --xmlout se -svx hello | grep 'name="hello"' | grep 'repository="Main Repository"' | sed 's/.*edition="\([^ ]*\)".*/\1/' register: hello_version diff --git a/tests/integration/targets/zypper_repository/aliases b/tests/integration/targets/zypper_repository/aliases index 817614d6a7..58cfb98d53 100644 --- a/tests/integration/targets/zypper_repository/aliases +++ b/tests/integration/targets/zypper_repository/aliases @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + destructive shippable/posix/group1 skip/aix diff --git a/tests/integration/targets/zypper_repository/meta/main.yml b/tests/integration/targets/zypper_repository/meta/main.yml index 1810d4bec9..982de6eb03 100644 --- a/tests/integration/targets/zypper_repository/meta/main.yml +++ b/tests/integration/targets/zypper_repository/meta/main.yml @@ -1,2 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + dependencies: - setup_remote_tmp_dir diff --git a/tests/integration/targets/zypper_repository/tasks/test.yml b/tests/integration/targets/zypper_repository/tasks/test.yml index 1033ee1e7d..2f030daf48 100644 --- a/tests/integration/targets/zypper_repository/tasks/test.yml +++ b/tests/integration/targets/zypper_repository/tasks/test.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: collect repo configuration before test shell: "grep . /etc/zypp/repos.d/*" register: before diff --git a/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml b/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml index 3a892cd72d..740cffd37d 100644 --- a/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml +++ b/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Delete test repo community.general.zypper_repository: name: test diff --git a/tests/requirements.yml b/tests/requirements.yml index 7b431b1fe0..acad510733 100644 --- a/tests/requirements.yml +++ b/tests/requirements.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + integration_tests_dependencies: - ansible.posix - community.crypto diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/mock/__init__.py b/tests/unit/mock/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/mock/path.py b/tests/unit/mock/path.py index c1c075bc02..62ae023431 100644 --- a/tests/unit/mock/path.py +++ b/tests/unit/mock/path.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/__init__.py b/tests/unit/plugins/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/become/__init__.py b/tests/unit/plugins/become/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/cache/__init__.py b/tests/unit/plugins/cache/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/callback/__init__.py b/tests/unit/plugins/callback/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/connection/__init__.py b/tests/unit/plugins/connection/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/inventory/__init__.py b/tests/unit/plugins/inventory/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/lookup/__init__.py b/tests/unit/plugins/lookup/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/__init__.py b/tests/unit/plugins/module_utils/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/cloud/__init__.py b/tests/unit/plugins/module_utils/cloud/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/hwc/__init__.py b/tests/unit/plugins/module_utils/hwc/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/identity/__init__.py b/tests/unit/plugins/module_utils/identity/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/identity/keycloak/__init__.py b/tests/unit/plugins/module_utils/identity/keycloak/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/identity/keycloak/test_keycloak_connect.py b/tests/unit/plugins/module_utils/identity/keycloak/test_keycloak_connect.py index 49692a412e..9a816cfe25 100644 --- a/tests/unit/plugins/module_utils/identity/keycloak/test_keycloak_connect.py +++ b/tests/unit/plugins/module_utils/identity/keycloak/test_keycloak_connect.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/module_utils/net_tools/__init__.py b/tests/unit/plugins/module_utils/net_tools/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/net_tools/pritunl/__init__.py b/tests/unit/plugins/module_utils/net_tools/pritunl/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/remote_management/__init__.py b/tests/unit/plugins/module_utils/remote_management/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/module_utils/xenserver/__init__.py b/tests/unit/plugins/module_utils/xenserver/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/__init__.py b/tests/unit/plugins/modules/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/cloud/__init__.py b/tests/unit/plugins/modules/cloud/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/cloud/linode/__init__.py b/tests/unit/plugins/modules/cloud/linode/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/cloud/linode/test_linode.py b/tests/unit/plugins/modules/cloud/linode/test_linode.py index 51e9b805b8..ad769eba6e 100644 --- a/tests/unit/plugins/modules/cloud/linode/test_linode.py +++ b/tests/unit/plugins/modules/cloud/linode/test_linode.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py b/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py index c966f79d5b..6e0bdea007 100644 --- a/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py +++ b/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/cloud/misc/__init__.py b/tests/unit/plugins/modules/cloud/misc/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/cloud/xenserver/__init__.py b/tests/unit/plugins/modules/cloud/xenserver/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/database/__init__.py b/tests/unit/plugins/modules/database/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/database/misc/__init__.py b/tests/unit/plugins/modules/database/misc/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/database/saphana/__init__.py b/tests/unit/plugins/modules/database/saphana/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/files/__init__.py b/tests/unit/plugins/modules/files/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/identity/__init__.py b/tests/unit/plugins/modules/identity/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/identity/ipa/__init__.py b/tests/unit/plugins/modules/identity/ipa/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/identity/keycloak/__init__.py b/tests/unit/plugins/modules/identity/keycloak/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/messaging/__init__.py b/tests/unit/plugins/modules/messaging/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/monitoring/__init__.py b/tests/unit/plugins/modules/monitoring/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/net_tools/__init__.py b/tests/unit/plugins/modules/net_tools/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/notification/__init__.py b/tests/unit/plugins/modules/notification/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/notification/test_campfire.py b/tests/unit/plugins/modules/notification/test_campfire.py index 72bbd57921..f05cc239da 100644 --- a/tests/unit/plugins/modules/notification/test_campfire.py +++ b/tests/unit/plugins/modules/notification/test_campfire.py @@ -1,3 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/packaging/__init__.py b/tests/unit/plugins/modules/packaging/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/packaging/language/__init__.py b/tests/unit/plugins/modules/packaging/language/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/packaging/os/__init__.py b/tests/unit/plugins/modules/packaging/os/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/remote_management/__init__.py b/tests/unit/plugins/modules/remote_management/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/remote_management/lxca/__init__.py b/tests/unit/plugins/modules/remote_management/lxca/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/remote_management/oneview/__init__.py b/tests/unit/plugins/modules/remote_management/oneview/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/source_control/__init__.py b/tests/unit/plugins/modules/source_control/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/source_control/bitbucket/__init__.py b/tests/unit/plugins/modules/source_control/bitbucket/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/source_control/github/__init__.py b/tests/unit/plugins/modules/source_control/github/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/source_control/github/test_github_repo.py b/tests/unit/plugins/modules/source_control/github/test_github_repo.py index 9c6a7037d1..2f494f7957 100644 --- a/tests/unit/plugins/modules/source_control/github/test_github_repo.py +++ b/tests/unit/plugins/modules/source_control/github/test_github_repo.py @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/modules/source_control/gitlab/__init__.py b/tests/unit/plugins/modules/source_control/gitlab/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/storage/__init__.py b/tests/unit/plugins/modules/storage/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/storage/hpe3par/__init__.py b/tests/unit/plugins/modules/storage/hpe3par/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/__init__.py b/tests/unit/plugins/modules/system/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/__init__.py b/tests/unit/plugins/modules/system/interfaces_file/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/__init__.py b/tests/unit/plugins/modules/system/interfaces_file/fixtures/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/modules/web_infrastructure/__init__.py b/tests/unit/plugins/modules/web_infrastructure/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/utils/shippable/cloud.sh b/tests/utils/shippable/cloud.sh index d76c32282d..a2e6ebf2be 100755 --- a/tests/utils/shippable/cloud.sh +++ b/tests/utils/shippable/cloud.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -o pipefail -eux diff --git a/tests/utils/shippable/linux-community.sh b/tests/utils/shippable/linux-community.sh index e68bdf387e..5adafa0cff 100755 --- a/tests/utils/shippable/linux-community.sh +++ b/tests/utils/shippable/linux-community.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -o pipefail -eux diff --git a/tests/utils/shippable/linux.sh b/tests/utils/shippable/linux.sh index 9cc2f966cb..ce3ac34df3 100755 --- a/tests/utils/shippable/linux.sh +++ b/tests/utils/shippable/linux.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -o pipefail -eux diff --git a/tests/utils/shippable/remote.sh b/tests/utils/shippable/remote.sh index 76065b8178..725c199b90 100755 --- a/tests/utils/shippable/remote.sh +++ b/tests/utils/shippable/remote.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -o pipefail -eux diff --git a/tests/utils/shippable/sanity.sh b/tests/utils/shippable/sanity.sh index eacbd81609..5b88a26778 100755 --- a/tests/utils/shippable/sanity.sh +++ b/tests/utils/shippable/sanity.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -o pipefail -eux diff --git a/tests/utils/shippable/shippable.sh b/tests/utils/shippable/shippable.sh index a562342a39..ba8842d97b 100755 --- a/tests/utils/shippable/shippable.sh +++ b/tests/utils/shippable/shippable.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -o pipefail -eux diff --git a/tests/utils/shippable/units.sh b/tests/utils/shippable/units.sh index b24b08432a..f591ec25aa 100755 --- a/tests/utils/shippable/units.sh +++ b/tests/utils/shippable/units.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later set -o pipefail -eux From 79b201ae496d77fdd3b592a94ddebb2313be239b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 5 Aug 2022 20:46:35 +0200 Subject: [PATCH 0152/2104] Remove superfluous empty file. (#5077) --- tests/integration/targets/ldap_search/tasks/run-test.yml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 tests/integration/targets/ldap_search/tasks/run-test.yml diff --git a/tests/integration/targets/ldap_search/tasks/run-test.yml b/tests/integration/targets/ldap_search/tasks/run-test.yml deleted file mode 100644 index b4bfd8560b..0000000000 --- a/tests/integration/targets/ldap_search/tasks/run-test.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# Copyright (c) Ansible Project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file From fa6c009ff0322413c8aa80f643e49e8598d91fa5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 5 Aug 2022 21:08:41 +0200 Subject: [PATCH 0153/2104] Make sure all files have trailing newline (#5076) * Make sure all files have trailing newline. * Adjust tests. --- .gitignore | 2 +- .../4682-compatibility-virtualmedia-resource-location.yaml | 2 +- changelogs/fragments/4719-fix-keycloak-realm.yaml | 2 +- changelogs/fragments/4746-add-vpn-support-nmcli.yaml | 2 +- changelogs/fragments/4911-dsv-honor-tld-option.yml | 2 +- changelogs/fragments/5019-slack-support-more-groups.yml | 2 +- changelogs/fragments/5022-lastpass-lookup-cleanup.yml | 2 +- changelogs/fragments/5023-http-agent-param-keycloak.yml | 2 +- tests/integration/targets/archive/files/bar.txt | 2 +- tests/integration/targets/git_config/files/gitconfig | 2 +- tests/integration/targets/git_config/tasks/setup.yml | 2 +- tests/integration/targets/git_config/vars/main.yml | 2 +- tests/integration/targets/gitlab_branch/defaults/main.yml | 2 +- tests/integration/targets/gitlab_group_members/aliases | 2 +- tests/integration/targets/gitlab_group_variable/tasks/main.yml | 1 - tests/integration/targets/gitlab_project_members/aliases | 2 +- tests/integration/targets/homebrew_cask/defaults/main.yml | 2 +- tests/integration/targets/iso_extract/vars/default.yml | 2 +- tests/integration/targets/kernel_blacklist/files/blacklist | 2 +- tests/integration/targets/kernel_blacklist/tasks/main.yml | 2 +- tests/integration/targets/keyring/tasks/main.yml | 2 +- tests/integration/targets/ldap_search/tasks/main.yml | 2 +- .../ansible_collections/testns/testcoll_mf/FILES.json | 2 +- .../ansible_collections/testns/testcoll_mf/MANIFEST.json | 2 +- .../integration/targets/lookup_passwordstore/vars/default.yml | 2 +- tests/integration/targets/lookup_random_pet/dependencies.yml | 2 +- tests/integration/targets/mas/aliases | 2 +- tests/integration/targets/memset_dns_reload/meta/main.yml | 2 +- tests/integration/targets/memset_memstore_info/meta/main.yml | 2 +- tests/integration/targets/memset_server_info/meta/main.yml | 2 +- tests/integration/targets/memset_zone_domain/meta/main.yml | 2 +- tests/integration/targets/mssql_script/aliases | 2 +- tests/integration/targets/mssql_script/defaults/main.yml | 2 +- tests/integration/targets/mssql_script/tasks/main.yml | 1 - tests/integration/targets/one_host/meta/main.yml | 2 +- tests/integration/targets/one_template/meta/main.yml | 2 +- tests/integration/targets/pagerduty_user/tasks/main.yml | 2 +- tests/integration/targets/pagerduty_user/vars/main.yml | 2 +- tests/integration/targets/scaleway_compute/tasks/ip.yml | 2 +- tests/integration/targets/scaleway_database_backup/aliases | 2 +- .../targets/scaleway_database_backup/defaults/main.yml | 2 +- .../integration/targets/scaleway_security_group/tasks/main.yml | 2 +- .../targets/scaleway_security_group_rule/tasks/main.yml | 2 +- tests/integration/targets/setup_cron/vars/default.yml | 2 +- tests/integration/targets/setup_etcd3/vars/RedHat-7.yml | 2 +- tests/integration/targets/setup_etcd3/vars/default.yml | 2 +- .../targets/setup_openldap/files/initial_config.ldif | 2 +- .../targets/setup_openldap/files/rootpw_cnconfig.ldif | 2 +- tests/integration/targets/setup_opennebula/vars/main.yml | 2 +- tests/integration/targets/sysrc/tasks/main.yml | 2 +- tests/integration/targets/terraform/.gitignore | 2 +- tests/integration/targets/terraform/aliases | 2 +- tests/integration/targets/terraform/tasks/main.yml | 2 +- .../targets/terraform/tasks/test_provider_upgrade.yml | 2 +- .../targets/terraform/templates/provider_test/main.tf.j2 | 2 +- tests/integration/targets/xattr/tasks/setup.yml | 2 +- tests/integration/targets/xml/fixtures/ansible-xml-beers.xml | 2 +- .../targets/xml/fixtures/ansible-xml-namespaced-beers.xml | 2 +- .../targets/xml/results/test-add-children-elements-unicode.xml | 2 +- .../targets/xml/results/test-add-children-elements.xml | 2 +- .../targets/xml/results/test-add-children-from-groupvars.xml | 2 +- .../xml/results/test-add-children-with-attributes-unicode.xml | 2 +- .../targets/xml/results/test-add-children-with-attributes.xml | 2 +- .../xml/results/test-add-namespaced-children-elements.xml | 2 +- .../integration/targets/xml/results/test-remove-attribute.xml | 2 +- tests/integration/targets/xml/results/test-remove-element.xml | 2 +- .../targets/xml/results/test-remove-namespaced-attribute.xml | 2 +- .../targets/xml/results/test-remove-namespaced-element.xml | 2 +- .../targets/xml/results/test-set-attribute-value-unicode.xml | 2 +- .../targets/xml/results/test-set-attribute-value.xml | 2 +- .../targets/xml/results/test-set-children-elements-level.xml | 2 +- .../targets/xml/results/test-set-children-elements-unicode.xml | 2 +- .../targets/xml/results/test-set-children-elements.xml | 2 +- .../targets/xml/results/test-set-element-value-empty.xml | 2 +- .../targets/xml/results/test-set-element-value-unicode.xml | 2 +- .../integration/targets/xml/results/test-set-element-value.xml | 2 +- .../xml/results/test-set-namespaced-attribute-value.xml | 2 +- .../targets/xml/results/test-set-namespaced-element-value.xml | 2 +- .../targets/xml/tasks/test-add-children-elements-unicode.yml | 3 +++ .../targets/xml/tasks/test-add-children-elements.yml | 3 +++ .../targets/xml/tasks/test-add-children-from-groupvars.yml | 3 +++ .../xml/tasks/test-add-children-with-attributes-unicode.yml | 3 +++ .../targets/xml/tasks/test-add-children-with-attributes.yml | 3 +++ .../xml/tasks/test-add-namespaced-children-elements.yml | 3 +++ .../targets/xml/tasks/test-children-elements-xml.yml | 3 +++ tests/integration/targets/xml/tasks/test-remove-attribute.yml | 3 +++ tests/integration/targets/xml/tasks/test-remove-element.yml | 3 +++ .../targets/xml/tasks/test-remove-namespaced-attribute.yml | 3 +++ .../targets/xml/tasks/test-remove-namespaced-element.yml | 3 +++ .../targets/xml/tasks/test-set-attribute-value-unicode.yml | 3 +++ .../integration/targets/xml/tasks/test-set-attribute-value.yml | 3 +++ .../targets/xml/tasks/test-set-children-elements-level.yml | 3 +++ .../targets/xml/tasks/test-set-children-elements-unicode.yml | 3 +++ .../targets/xml/tasks/test-set-children-elements.yml | 3 +++ .../targets/xml/tasks/test-set-element-value-empty.yml | 3 +++ .../targets/xml/tasks/test-set-element-value-unicode.yml | 3 +++ tests/integration/targets/xml/tasks/test-set-element-value.yml | 3 +++ .../targets/xml/tasks/test-set-namespaced-attribute-value.yml | 3 +++ .../targets/xml/tasks/test-set-namespaced-element-value.yml | 3 +++ tests/integration/targets/yarn/templates/package.j2 | 2 +- .../fixtures/golden_output/address_family.test_no_changes.json | 2 +- .../golden_output/address_family_add_aggi_up.exceptions.txt | 2 +- .../fixtures/golden_output/address_family_add_aggi_up.json | 2 +- .../address_family_add_aggi_up_twice.exceptions.txt | 2 +- .../golden_output/address_family_add_aggi_up_twice.json | 2 +- .../address_family_add_and_delete_aggi_up.exceptions.txt | 2 +- .../golden_output/address_family_add_and_delete_aggi_up.json | 2 +- .../address_family_aggi_remove_dup.exceptions.txt | 2 +- .../fixtures/golden_output/address_family_aggi_remove_dup.json | 2 +- .../fixtures/golden_output/address_family_change_ipv4.json | 2 +- .../golden_output/address_family_change_ipv4_post_up.json | 2 +- .../golden_output/address_family_change_ipv4_pre_up.json | 2 +- .../fixtures/golden_output/address_family_change_ipv6.json | 2 +- .../golden_output/address_family_change_ipv6_post_up.json | 2 +- .../golden_output/address_family_change_ipv6_pre_up.json | 2 +- .../golden_output/address_family_change_method.exceptions.txt | 2 +- .../fixtures/golden_output/address_family_change_method.json | 2 +- .../fixtures/golden_output/address_family_revert.json | 2 +- .../address_family_set_aggi_and_eth0_mtu.exceptions.txt | 2 +- .../golden_output/address_family_set_aggi_and_eth0_mtu.json | 2 +- .../address_family_set_aggi_slaves.exceptions.txt | 2 +- .../fixtures/golden_output/address_family_set_aggi_slaves.json | 2 +- .../fixtures/golden_output/default_dhcp.test_no_changes.json | 2 +- .../golden_output/default_dhcp_add_aggi_up.exceptions.txt | 2 +- .../fixtures/golden_output/default_dhcp_add_aggi_up.json | 2 +- .../default_dhcp_add_aggi_up_twice.exceptions.txt | 2 +- .../fixtures/golden_output/default_dhcp_add_aggi_up_twice.json | 2 +- .../default_dhcp_add_and_delete_aggi_up.exceptions.txt | 2 +- .../golden_output/default_dhcp_add_and_delete_aggi_up.json | 2 +- .../golden_output/default_dhcp_aggi_remove_dup.exceptions.txt | 2 +- .../fixtures/golden_output/default_dhcp_aggi_remove_dup.json | 2 +- .../fixtures/golden_output/default_dhcp_change_ipv4.json | 2 +- .../golden_output/default_dhcp_change_ipv4_post_up.json | 2 +- .../golden_output/default_dhcp_change_ipv4_pre_up.json | 2 +- .../golden_output/default_dhcp_change_ipv6.exceptions.txt | 2 +- .../fixtures/golden_output/default_dhcp_change_ipv6.json | 2 +- .../default_dhcp_change_ipv6_post_up.exceptions.txt | 2 +- .../golden_output/default_dhcp_change_ipv6_post_up.json | 2 +- .../default_dhcp_change_ipv6_pre_up.exceptions.txt | 2 +- .../golden_output/default_dhcp_change_ipv6_pre_up.json | 2 +- .../golden_output/default_dhcp_change_method.exceptions.txt | 2 +- .../fixtures/golden_output/default_dhcp_change_method.json | 2 +- .../fixtures/golden_output/default_dhcp_revert.json | 2 +- .../default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt | 2 +- .../golden_output/default_dhcp_set_aggi_and_eth0_mtu.json | 2 +- .../golden_output/default_dhcp_set_aggi_slaves.exceptions.txt | 2 +- .../fixtures/golden_output/default_dhcp_set_aggi_slaves.json | 2 +- .../fixtures/golden_output/servers.com.test_no_changes.json | 2 +- .../fixtures/golden_output/servers.com_add_aggi_up.json | 2 +- .../fixtures/golden_output/servers.com_add_aggi_up_twice.json | 2 +- .../golden_output/servers.com_add_and_delete_aggi_up.json | 2 +- .../fixtures/golden_output/servers.com_aggi_remove_dup.json | 2 +- .../golden_output/servers.com_change_ipv4.exceptions.txt | 2 +- .../fixtures/golden_output/servers.com_change_ipv4.json | 2 +- .../servers.com_change_ipv4_post_up.exceptions.txt | 2 +- .../golden_output/servers.com_change_ipv4_post_up.json | 2 +- .../servers.com_change_ipv4_pre_up.exceptions.txt | 2 +- .../fixtures/golden_output/servers.com_change_ipv4_pre_up.json | 2 +- .../golden_output/servers.com_change_ipv6.exceptions.txt | 2 +- .../fixtures/golden_output/servers.com_change_ipv6.json | 2 +- .../servers.com_change_ipv6_post_up.exceptions.txt | 2 +- .../golden_output/servers.com_change_ipv6_post_up.json | 2 +- .../servers.com_change_ipv6_pre_up.exceptions.txt | 2 +- .../fixtures/golden_output/servers.com_change_ipv6_pre_up.json | 2 +- .../fixtures/golden_output/servers.com_change_method.json | 2 +- .../fixtures/golden_output/servers.com_revert.exceptions.txt | 2 +- .../fixtures/golden_output/servers.com_revert.json | 2 +- .../servers.com_set_aggi_and_eth0_mtu.exceptions.txt | 2 +- .../golden_output/servers.com_set_aggi_and_eth0_mtu.json | 2 +- .../fixtures/golden_output/servers.com_set_aggi_slaves.json | 2 +- .../fixtures/golden_output/up_down_dup.test_no_changes.json | 2 +- .../fixtures/golden_output/up_down_dup_add_aggi_up.json | 2 +- .../fixtures/golden_output/up_down_dup_add_aggi_up_twice.json | 2 +- .../golden_output/up_down_dup_add_and_delete_aggi_up.json | 2 +- .../fixtures/golden_output/up_down_dup_aggi_remove_dup.json | 2 +- .../golden_output/up_down_dup_change_ipv4.exceptions.txt | 2 +- .../fixtures/golden_output/up_down_dup_change_ipv4.json | 2 +- .../up_down_dup_change_ipv4_post_up.exceptions.txt | 2 +- .../golden_output/up_down_dup_change_ipv4_post_up.json | 2 +- .../up_down_dup_change_ipv4_pre_up.exceptions.txt | 2 +- .../fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json | 2 +- .../golden_output/up_down_dup_change_ipv6.exceptions.txt | 2 +- .../fixtures/golden_output/up_down_dup_change_ipv6.json | 2 +- .../up_down_dup_change_ipv6_post_up.exceptions.txt | 2 +- .../golden_output/up_down_dup_change_ipv6_post_up.json | 2 +- .../up_down_dup_change_ipv6_pre_up.exceptions.txt | 2 +- .../fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json | 2 +- .../golden_output/up_down_dup_change_method.exceptions.txt | 2 +- .../fixtures/golden_output/up_down_dup_change_method.json | 2 +- .../fixtures/golden_output/up_down_dup_revert.exceptions.txt | 2 +- .../fixtures/golden_output/up_down_dup_revert.json | 2 +- .../up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt | 2 +- .../golden_output/up_down_dup_set_aggi_and_eth0_mtu.json | 2 +- .../fixtures/golden_output/up_down_dup_set_aggi_slaves.json | 2 +- .../modules/system/interfaces_file/test_interfaces_file.py | 2 ++ 195 files changed, 236 insertions(+), 173 deletions(-) diff --git a/.gitignore b/.gitignore index b95546f623..c3d5dcb8b7 100644 --- a/.gitignore +++ b/.gitignore @@ -505,4 +505,4 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk -# End of https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks diff --git a/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml b/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml index c15ee4d15c..7549ee2eea 100644 --- a/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml +++ b/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml @@ -1,2 +1,2 @@ bugfixes: - - xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). \ No newline at end of file + - xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). diff --git a/changelogs/fragments/4719-fix-keycloak-realm.yaml b/changelogs/fragments/4719-fix-keycloak-realm.yaml index 3071756ec5..31c3f8c887 100644 --- a/changelogs/fragments/4719-fix-keycloak-realm.yaml +++ b/changelogs/fragments/4719-fix-keycloak-realm.yaml @@ -1,2 +1,2 @@ bugfixes: - - "keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241)." \ No newline at end of file + - "keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241)." diff --git a/changelogs/fragments/4746-add-vpn-support-nmcli.yaml b/changelogs/fragments/4746-add-vpn-support-nmcli.yaml index 1ab7e8a20a..5f5a1c847e 100644 --- a/changelogs/fragments/4746-add-vpn-support-nmcli.yaml +++ b/changelogs/fragments/4746-add-vpn-support-nmcli.yaml @@ -1,2 +1,2 @@ minor_changes: - - nmcli - adds ``vpn`` type and parameter for supporting VPN with service type L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). \ No newline at end of file + - nmcli - adds ``vpn`` type and parameter for supporting VPN with service type L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). diff --git a/changelogs/fragments/4911-dsv-honor-tld-option.yml b/changelogs/fragments/4911-dsv-honor-tld-option.yml index f4b8d7070e..2831d7ea46 100644 --- a/changelogs/fragments/4911-dsv-honor-tld-option.yml +++ b/changelogs/fragments/4911-dsv-honor-tld-option.yml @@ -1,3 +1,3 @@ --- bugfixes: - - dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). \ No newline at end of file + - dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). diff --git a/changelogs/fragments/5019-slack-support-more-groups.yml b/changelogs/fragments/5019-slack-support-more-groups.yml index 184bab353a..99356af94e 100644 --- a/changelogs/fragments/5019-slack-support-more-groups.yml +++ b/changelogs/fragments/5019-slack-support-more-groups.yml @@ -1,2 +1,2 @@ bugfixes: - - slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). \ No newline at end of file + - slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). diff --git a/changelogs/fragments/5022-lastpass-lookup-cleanup.yml b/changelogs/fragments/5022-lastpass-lookup-cleanup.yml index b9f96d5b9e..e737318251 100644 --- a/changelogs/fragments/5022-lastpass-lookup-cleanup.yml +++ b/changelogs/fragments/5022-lastpass-lookup-cleanup.yml @@ -1,2 +1,2 @@ minor_changes: - - lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). \ No newline at end of file + - lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). diff --git a/changelogs/fragments/5023-http-agent-param-keycloak.yml b/changelogs/fragments/5023-http-agent-param-keycloak.yml index 64e2ace369..121a310ae7 100644 --- a/changelogs/fragments/5023-http-agent-param-keycloak.yml +++ b/changelogs/fragments/5023-http-agent-param-keycloak.yml @@ -1,2 +1,2 @@ minor_changes: - - keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` (https://github.com/ansible-collections/community.general/issues/5023). \ No newline at end of file + - keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` (https://github.com/ansible-collections/community.general/issues/5023). diff --git a/tests/integration/targets/archive/files/bar.txt b/tests/integration/targets/archive/files/bar.txt index 5f34b0af07..e5dbdfdf8b 100644 --- a/tests/integration/targets/archive/files/bar.txt +++ b/tests/integration/targets/archive/files/bar.txt @@ -1 +1 @@ -bar.txt \ No newline at end of file +bar.txt diff --git a/tests/integration/targets/git_config/files/gitconfig b/tests/integration/targets/git_config/files/gitconfig index 989aa1c8bf..7dcde69b55 100644 --- a/tests/integration/targets/git_config/files/gitconfig +++ b/tests/integration/targets/git_config/files/gitconfig @@ -1,2 +1,2 @@ [http] - proxy = foo \ No newline at end of file + proxy = foo diff --git a/tests/integration/targets/git_config/tasks/setup.yml b/tests/integration/targets/git_config/tasks/setup.yml index 1707bc26c8..0112011bd6 100644 --- a/tests/integration/targets/git_config/tasks/setup.yml +++ b/tests/integration/targets/git_config/tasks/setup.yml @@ -12,4 +12,4 @@ shell: "git --version | grep 'git version' | sed 's/git version //'" register: git_version ignore_errors: yes -... \ No newline at end of file +... diff --git a/tests/integration/targets/git_config/vars/main.yml b/tests/integration/targets/git_config/vars/main.yml index 3c948cbdf8..3cca3ef6e4 100644 --- a/tests/integration/targets/git_config/vars/main.yml +++ b/tests/integration/targets/git_config/vars/main.yml @@ -7,4 +7,4 @@ git_version_supporting_includes: 1.7.10 option_name: http.proxy option_value: 'foo' option_scope: global -... \ No newline at end of file +... diff --git a/tests/integration/targets/gitlab_branch/defaults/main.yml b/tests/integration/targets/gitlab_branch/defaults/main.yml index 3e71f0e261..a5f0a07510 100644 --- a/tests/integration/targets/gitlab_branch/defaults/main.yml +++ b/tests/integration/targets/gitlab_branch/defaults/main.yml @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later gitlab_branch: ansible_test_branch -gitlab_project_name: ansible_test_project \ No newline at end of file +gitlab_project_name: ansible_test_project diff --git a/tests/integration/targets/gitlab_group_members/aliases b/tests/integration/targets/gitlab_group_members/aliases index d2086eecf8..bd1f024441 100644 --- a/tests/integration/targets/gitlab_group_members/aliases +++ b/tests/integration/targets/gitlab_group_members/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -unsupported \ No newline at end of file +unsupported diff --git a/tests/integration/targets/gitlab_group_variable/tasks/main.yml b/tests/integration/targets/gitlab_group_variable/tasks/main.yml index 1bba0c9d1d..072a5c7dce 100644 --- a/tests/integration/targets/gitlab_group_variable/tasks/main.yml +++ b/tests/integration/targets/gitlab_group_variable/tasks/main.yml @@ -700,4 +700,3 @@ that: - gitlab_group_variable_state.changed - gitlab_group_variable_state.group_variable.removed|length == 1 - \ No newline at end of file diff --git a/tests/integration/targets/gitlab_project_members/aliases b/tests/integration/targets/gitlab_project_members/aliases index d2086eecf8..bd1f024441 100644 --- a/tests/integration/targets/gitlab_project_members/aliases +++ b/tests/integration/targets/gitlab_project_members/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -unsupported \ No newline at end of file +unsupported diff --git a/tests/integration/targets/homebrew_cask/defaults/main.yml b/tests/integration/targets/homebrew_cask/defaults/main.yml index 144be0a470..18ebd7b105 100644 --- a/tests/integration/targets/homebrew_cask/defaults/main.yml +++ b/tests/integration/targets/homebrew_cask/defaults/main.yml @@ -3,4 +3,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -cask: brooklyn \ No newline at end of file +cask: brooklyn diff --git a/tests/integration/targets/iso_extract/vars/default.yml b/tests/integration/targets/iso_extract/vars/default.yml index b4bfd8560b..f55df21f81 100644 --- a/tests/integration/targets/iso_extract/vars/default.yml +++ b/tests/integration/targets/iso_extract/vars/default.yml @@ -1,4 +1,4 @@ --- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/kernel_blacklist/files/blacklist b/tests/integration/targets/kernel_blacklist/files/blacklist index 4e815584eb..f8c0c9b16f 100644 --- a/tests/integration/targets/kernel_blacklist/files/blacklist +++ b/tests/integration/targets/kernel_blacklist/files/blacklist @@ -1,3 +1,3 @@ blacklist aaaa blacklist bbbb -blacklist cccc \ No newline at end of file +blacklist cccc diff --git a/tests/integration/targets/kernel_blacklist/tasks/main.yml b/tests/integration/targets/kernel_blacklist/tasks/main.yml index 1a8b736991..5f8d50092f 100644 --- a/tests/integration/targets/kernel_blacklist/tasks/main.yml +++ b/tests/integration/targets/kernel_blacklist/tasks/main.yml @@ -44,7 +44,7 @@ - orig_stat.stat.size == stat_test_1.stat.size - orig_stat.stat.checksum == stat_test_1.stat.checksum - orig_stat.stat.mtime == stat_test_1.stat.mtime - - stat_test_1.stat.checksum == 'blacklist aaaa\nblacklist bbbb\nblacklist cccc'|checksum + - stat_test_1.stat.checksum == 'blacklist aaaa\nblacklist bbbb\nblacklist cccc\n' | checksum - name: add new item to list community.general.kernel_blacklist: diff --git a/tests/integration/targets/keyring/tasks/main.yml b/tests/integration/targets/keyring/tasks/main.yml index 3e684887f7..3833018e80 100644 --- a/tests/integration/targets/keyring/tasks/main.yml +++ b/tests/integration/targets/keyring/tasks/main.yml @@ -96,4 +96,4 @@ - name: Assert that the password no longer exists ansible.builtin.assert: that: - - test_del_password.passphrase is not defined \ No newline at end of file + - test_del_password.passphrase is not defined diff --git a/tests/integration/targets/ldap_search/tasks/main.yml b/tests/integration/targets/ldap_search/tasks/main.yml index f4a51013a8..c67ffd3ac7 100644 --- a/tests/integration/targets/ldap_search/tasks/main.yml +++ b/tests/integration/targets/ldap_search/tasks/main.yml @@ -8,4 +8,4 @@ - include_tasks: "{{ item }}" with_fileglob: - 'tests/*.yml' - when: ansible_os_family in ['Ubuntu', 'Debian'] \ No newline at end of file + when: ansible_os_family in ['Ubuntu', 'Debian'] diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json index 99eb4c0bfb..57bc66cc21 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json @@ -37,4 +37,4 @@ } ], "format": 1 -} \ No newline at end of file +} diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json index f1d009a73f..e4a9e7d8f2 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json @@ -27,4 +27,4 @@ "format": 1 }, "format": 1 -} \ No newline at end of file +} diff --git a/tests/integration/targets/lookup_passwordstore/vars/default.yml b/tests/integration/targets/lookup_passwordstore/vars/default.yml index b4bfd8560b..f55df21f81 100644 --- a/tests/integration/targets/lookup_passwordstore/vars/default.yml +++ b/tests/integration/targets/lookup_passwordstore/vars/default.yml @@ -1,4 +1,4 @@ --- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_random_pet/dependencies.yml b/tests/integration/targets/lookup_random_pet/dependencies.yml index a411197fb9..464b5c428b 100644 --- a/tests/integration/targets/lookup_random_pet/dependencies.yml +++ b/tests/integration/targets/lookup_random_pet/dependencies.yml @@ -7,4 +7,4 @@ tasks: - name: Install Petname Python package pip: - name: petname \ No newline at end of file + name: petname diff --git a/tests/integration/targets/mas/aliases b/tests/integration/targets/mas/aliases index 91d38c3b47..ea236467f3 100644 --- a/tests/integration/targets/mas/aliases +++ b/tests/integration/targets/mas/aliases @@ -3,4 +3,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later needs/root -unsupported \ No newline at end of file +unsupported diff --git a/tests/integration/targets/memset_dns_reload/meta/main.yml b/tests/integration/targets/memset_dns_reload/meta/main.yml index b4bfd8560b..f55df21f81 100644 --- a/tests/integration/targets/memset_dns_reload/meta/main.yml +++ b/tests/integration/targets/memset_dns_reload/meta/main.yml @@ -1,4 +1,4 @@ --- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/memset_memstore_info/meta/main.yml b/tests/integration/targets/memset_memstore_info/meta/main.yml index b4bfd8560b..f55df21f81 100644 --- a/tests/integration/targets/memset_memstore_info/meta/main.yml +++ b/tests/integration/targets/memset_memstore_info/meta/main.yml @@ -1,4 +1,4 @@ --- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/memset_server_info/meta/main.yml b/tests/integration/targets/memset_server_info/meta/main.yml index b4bfd8560b..f55df21f81 100644 --- a/tests/integration/targets/memset_server_info/meta/main.yml +++ b/tests/integration/targets/memset_server_info/meta/main.yml @@ -1,4 +1,4 @@ --- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/memset_zone_domain/meta/main.yml b/tests/integration/targets/memset_zone_domain/meta/main.yml index b4bfd8560b..f55df21f81 100644 --- a/tests/integration/targets/memset_zone_domain/meta/main.yml +++ b/tests/integration/targets/memset_zone_domain/meta/main.yml @@ -1,4 +1,4 @@ --- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/mssql_script/aliases b/tests/integration/targets/mssql_script/aliases index f7e30d271e..ee4e2125f9 100644 --- a/tests/integration/targets/mssql_script/aliases +++ b/tests/integration/targets/mssql_script/aliases @@ -6,4 +6,4 @@ skip/osx skip/macos skip/freebsd skip/rhel -disabled \ No newline at end of file +disabled diff --git a/tests/integration/targets/mssql_script/defaults/main.yml b/tests/integration/targets/mssql_script/defaults/main.yml index 0e66154749..42ad1d44b8 100644 --- a/tests/integration/targets/mssql_script/defaults/main.yml +++ b/tests/integration/targets/mssql_script/defaults/main.yml @@ -6,4 +6,4 @@ mssql_host: localhost mssql_port: 14330 mssql_login_user: sa -mssql_login_password: "yourStrong(!)Password" \ No newline at end of file +mssql_login_password: "yourStrong(!)Password" diff --git a/tests/integration/targets/mssql_script/tasks/main.yml b/tests/integration/targets/mssql_script/tasks/main.yml index c17d3b764c..bbe40025ea 100644 --- a/tests/integration/targets/mssql_script/tasks/main.yml +++ b/tests/integration/targets/mssql_script/tasks/main.yml @@ -221,4 +221,3 @@ - empty_result.query_results[0][1] | length == 0 - empty_result.query_results[0][2][0][0] == 'msdb' failed_when: false # known issue - \ No newline at end of file diff --git a/tests/integration/targets/one_host/meta/main.yml b/tests/integration/targets/one_host/meta/main.yml index de2e79f32d..1a4a42fb57 100644 --- a/tests/integration/targets/one_host/meta/main.yml +++ b/tests/integration/targets/one_host/meta/main.yml @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later dependencies: - - setup_opennebula \ No newline at end of file + - setup_opennebula diff --git a/tests/integration/targets/one_template/meta/main.yml b/tests/integration/targets/one_template/meta/main.yml index de2e79f32d..1a4a42fb57 100644 --- a/tests/integration/targets/one_template/meta/main.yml +++ b/tests/integration/targets/one_template/meta/main.yml @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later dependencies: - - setup_opennebula \ No newline at end of file + - setup_opennebula diff --git a/tests/integration/targets/pagerduty_user/tasks/main.yml b/tests/integration/targets/pagerduty_user/tasks/main.yml index 27638cd2bc..13a0a5e09a 100644 --- a/tests/integration/targets/pagerduty_user/tasks/main.yml +++ b/tests/integration/targets/pagerduty_user/tasks/main.yml @@ -22,4 +22,4 @@ access_token: "{{ pd_api_access_token }}" pd_user: "{{ fullname }}" pd_email: "{{ email }}" - state: "absent" \ No newline at end of file + state: "absent" diff --git a/tests/integration/targets/pagerduty_user/vars/main.yml b/tests/integration/targets/pagerduty_user/vars/main.yml index 209b886707..7237557271 100644 --- a/tests/integration/targets/pagerduty_user/vars/main.yml +++ b/tests/integration/targets/pagerduty_user/vars/main.yml @@ -7,4 +7,4 @@ pd_api_access_token: your_api_access_token fullname: User Name email: user@email.com pd_role: observer -pd_teams: team1 \ No newline at end of file +pd_teams: team1 diff --git a/tests/integration/targets/scaleway_compute/tasks/ip.yml b/tests/integration/targets/scaleway_compute/tasks/ip.yml index dbbfe4b549..f6b7840fd9 100644 --- a/tests/integration/targets/scaleway_compute/tasks/ip.yml +++ b/tests/integration/targets/scaleway_compute/tasks/ip.yml @@ -203,4 +203,4 @@ - assert: that: - server_destroy_task is success - - server_destroy_task is changed \ No newline at end of file + - server_destroy_task is changed diff --git a/tests/integration/targets/scaleway_database_backup/aliases b/tests/integration/targets/scaleway_database_backup/aliases index bc773973cd..b2267f6311 100644 --- a/tests/integration/targets/scaleway_database_backup/aliases +++ b/tests/integration/targets/scaleway_database_backup/aliases @@ -3,4 +3,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later cloud/scaleway -unsupported \ No newline at end of file +unsupported diff --git a/tests/integration/targets/scaleway_database_backup/defaults/main.yml b/tests/integration/targets/scaleway_database_backup/defaults/main.yml index 4cfd12619b..1a5306ecf4 100644 --- a/tests/integration/targets/scaleway_database_backup/defaults/main.yml +++ b/tests/integration/targets/scaleway_database_backup/defaults/main.yml @@ -6,4 +6,4 @@ scaleway_name: scaleway_database_backup_test scaleway_region: fr-par scaleway_database_name: scaleway_database_test -scaleway_instance_id: \ No newline at end of file +scaleway_instance_id: diff --git a/tests/integration/targets/scaleway_security_group/tasks/main.yml b/tests/integration/targets/scaleway_security_group/tasks/main.yml index 1c4e409b63..f3c25c5728 100644 --- a/tests/integration/targets/scaleway_security_group/tasks/main.yml +++ b/tests/integration/targets/scaleway_security_group/tasks/main.yml @@ -131,4 +131,4 @@ assert: that: - security_group_deletion is success - - security_group_deletion is not changed \ No newline at end of file + - security_group_deletion is not changed diff --git a/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml b/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml index c6f6396b7b..fb0f535346 100644 --- a/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml +++ b/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml @@ -244,4 +244,4 @@ stateful: true inbound_default_policy: accept outbound_default_policy: accept - organization_default: false \ No newline at end of file + organization_default: false diff --git a/tests/integration/targets/setup_cron/vars/default.yml b/tests/integration/targets/setup_cron/vars/default.yml index b4bfd8560b..f55df21f81 100644 --- a/tests/integration/targets/setup_cron/vars/default.yml +++ b/tests/integration/targets/setup_cron/vars/default.yml @@ -1,4 +1,4 @@ --- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later \ No newline at end of file +# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml b/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml index 8c36cb043e..6e1017fe83 100644 --- a/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml +++ b/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml @@ -3,4 +3,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -etcd3_pip_module: etcd3<0.12 \ No newline at end of file +etcd3_pip_module: etcd3<0.12 diff --git a/tests/integration/targets/setup_etcd3/vars/default.yml b/tests/integration/targets/setup_etcd3/vars/default.yml index 575865c19b..f7e08fa314 100644 --- a/tests/integration/targets/setup_etcd3/vars/default.yml +++ b/tests/integration/targets/setup_etcd3/vars/default.yml @@ -3,4 +3,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -# default should don't touch anything \ No newline at end of file +# default should don't touch anything diff --git a/tests/integration/targets/setup_openldap/files/initial_config.ldif b/tests/integration/targets/setup_openldap/files/initial_config.ldif index 13397758f3..8f8c537bd3 100644 --- a/tests/integration/targets/setup_openldap/files/initial_config.ldif +++ b/tests/integration/targets/setup_openldap/files/initial_config.ldif @@ -19,4 +19,4 @@ cn: LDAP Test gecos: LDAP Test displayName: LDAP Test mail: ldap.test@example.com -sn: Test \ No newline at end of file +sn: Test diff --git a/tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif b/tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif index 1fc061dde8..7fb34d93ba 100644 --- a/tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif +++ b/tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif @@ -1,4 +1,4 @@ dn: olcDatabase={0}config,cn=config changetype: modify replace: olcRootPW -olcRootPW: "Test1234!" \ No newline at end of file +olcRootPW: "Test1234!" diff --git a/tests/integration/targets/setup_opennebula/vars/main.yml b/tests/integration/targets/setup_opennebula/vars/main.yml index 747659e1fd..39b48270a3 100644 --- a/tests/integration/targets/setup_opennebula/vars/main.yml +++ b/tests/integration/targets/setup_opennebula/vars/main.yml @@ -6,4 +6,4 @@ opennebula_test: hosts: - hv1 - - hv2 \ No newline at end of file + - hv2 diff --git a/tests/integration/targets/sysrc/tasks/main.yml b/tests/integration/targets/sysrc/tasks/main.yml index 58a0f19cf2..544dc63c65 100644 --- a/tests/integration/targets/sysrc/tasks/main.yml +++ b/tests/integration/targets/sysrc/tasks/main.yml @@ -338,4 +338,4 @@ - name: Restore /boot/loader.conf copy: content: "{{ cached_boot_loaderconf_content }}" - dest: /boot/loader.conf \ No newline at end of file + dest: /boot/loader.conf diff --git a/tests/integration/targets/terraform/.gitignore b/tests/integration/targets/terraform/.gitignore index 45b67fdab4..81fe39d2df 100644 --- a/tests/integration/targets/terraform/.gitignore +++ b/tests/integration/targets/terraform/.gitignore @@ -1,4 +1,4 @@ **/.terraform/* *.tfstate *.tfstate.* -.terraform.lock.hcl \ No newline at end of file +.terraform.lock.hcl diff --git a/tests/integration/targets/terraform/aliases b/tests/integration/targets/terraform/aliases index fcfdb195e8..1f9abfc0a2 100644 --- a/tests/integration/targets/terraform/aliases +++ b/tests/integration/targets/terraform/aliases @@ -8,4 +8,4 @@ skip/aix skip/osx skip/macos skip/freebsd -skip/python2 \ No newline at end of file +skip/python2 diff --git a/tests/integration/targets/terraform/tasks/main.yml b/tests/integration/targets/terraform/tasks/main.yml index 071fbaf797..75c096bade 100644 --- a/tests/integration/targets/terraform/tasks/main.yml +++ b/tests/integration/targets/terraform/tasks/main.yml @@ -70,4 +70,4 @@ tf_provider: "{{ terraform_provider_versions[provider_index] }}" loop: "{{ terraform_provider_versions }}" loop_control: - index_var: provider_index \ No newline at end of file + index_var: provider_index diff --git a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml index 51f528b97b..ac76c38837 100644 --- a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml +++ b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml @@ -23,4 +23,4 @@ register: terraform_init_result - assert: - that: terraform_init_result is not failed \ No newline at end of file + that: terraform_init_result is not failed diff --git a/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 b/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 index 58eb3a24bb..48215f74bd 100644 --- a/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 +++ b/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 @@ -5,4 +5,4 @@ terraform { version = "{{ tf_provider['version'] }}" } } -} \ No newline at end of file +} diff --git a/tests/integration/targets/xattr/tasks/setup.yml b/tests/integration/targets/xattr/tasks/setup.yml index 1338b1b30d..0eda72d8c9 100644 --- a/tests/integration/targets/xattr/tasks/setup.yml +++ b/tests/integration/targets/xattr/tasks/setup.yml @@ -11,4 +11,4 @@ - name: Create file file: path: "{{ test_file }}" - state: touch \ No newline at end of file + state: touch diff --git a/tests/integration/targets/xml/fixtures/ansible-xml-beers.xml b/tests/integration/targets/xml/fixtures/ansible-xml-beers.xml index 5afc797414..f47909ac69 100644 --- a/tests/integration/targets/xml/fixtures/ansible-xml-beers.xml +++ b/tests/integration/targets/xml/fixtures/ansible-xml-beers.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml b/tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml index 61747d4bbb..acaca7f591 100644 --- a/tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml +++ b/tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-add-children-elements-unicode.xml b/tests/integration/targets/xml/results/test-add-children-elements-unicode.xml index 525330c217..ebf02ecf5a 100644 --- a/tests/integration/targets/xml/results/test-add-children-elements-unicode.xml +++ b/tests/integration/targets/xml/results/test-add-children-elements-unicode.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-add-children-elements.xml b/tests/integration/targets/xml/results/test-add-children-elements.xml index f9ff25176a..3fff3d0d2e 100644 --- a/tests/integration/targets/xml/results/test-add-children-elements.xml +++ b/tests/integration/targets/xml/results/test-add-children-elements.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-add-children-from-groupvars.xml b/tests/integration/targets/xml/results/test-add-children-from-groupvars.xml index 565ba402b6..e9b59a6ac1 100644 --- a/tests/integration/targets/xml/results/test-add-children-from-groupvars.xml +++ b/tests/integration/targets/xml/results/test-add-children-from-groupvars.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml b/tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml index 374652244f..f206af231b 100644 --- a/tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml +++ b/tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-add-children-with-attributes.xml b/tests/integration/targets/xml/results/test-add-children-with-attributes.xml index 5a3907f6f2..a4471b7f17 100644 --- a/tests/integration/targets/xml/results/test-add-children-with-attributes.xml +++ b/tests/integration/targets/xml/results/test-add-children-with-attributes.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml b/tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml index 3d27e8aa3c..dc53d2f8ad 100644 --- a/tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml +++ b/tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-remove-attribute.xml b/tests/integration/targets/xml/results/test-remove-attribute.xml index 8a621cf144..5797419186 100644 --- a/tests/integration/targets/xml/results/test-remove-attribute.xml +++ b/tests/integration/targets/xml/results/test-remove-attribute.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-remove-element.xml b/tests/integration/targets/xml/results/test-remove-element.xml index 454d905cd4..b7b1a1a5c4 100644 --- a/tests/integration/targets/xml/results/test-remove-element.xml +++ b/tests/integration/targets/xml/results/test-remove-element.xml @@ -10,4 +10,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml b/tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml index 732a0ed224..4c4dcb1807 100644 --- a/tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml +++ b/tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-remove-namespaced-element.xml b/tests/integration/targets/xml/results/test-remove-namespaced-element.xml index 16df98e201..e723120328 100644 --- a/tests/integration/targets/xml/results/test-remove-namespaced-element.xml +++ b/tests/integration/targets/xml/results/test-remove-namespaced-element.xml @@ -10,4 +10,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml b/tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml index de3bc3f600..df50daba4e 100644 --- a/tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml +++ b/tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-attribute-value.xml b/tests/integration/targets/xml/results/test-set-attribute-value.xml index 143fe7bf4e..28dcff81a8 100644 --- a/tests/integration/targets/xml/results/test-set-attribute-value.xml +++ b/tests/integration/targets/xml/results/test-set-attribute-value.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-children-elements-level.xml b/tests/integration/targets/xml/results/test-set-children-elements-level.xml index 0ef2b7e6e6..b985090d74 100644 --- a/tests/integration/targets/xml/results/test-set-children-elements-level.xml +++ b/tests/integration/targets/xml/results/test-set-children-elements-level.xml @@ -8,4 +8,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-children-elements-unicode.xml b/tests/integration/targets/xml/results/test-set-children-elements-unicode.xml index f19d53566a..3cd586dd05 100644 --- a/tests/integration/targets/xml/results/test-set-children-elements-unicode.xml +++ b/tests/integration/targets/xml/results/test-set-children-elements-unicode.xml @@ -8,4 +8,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-children-elements.xml b/tests/integration/targets/xml/results/test-set-children-elements.xml index be313a5a8d..6348c3e8fe 100644 --- a/tests/integration/targets/xml/results/test-set-children-elements.xml +++ b/tests/integration/targets/xml/results/test-set-children-elements.xml @@ -8,4 +8,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-element-value-empty.xml b/tests/integration/targets/xml/results/test-set-element-value-empty.xml index 785beb645d..5ecab798e9 100644 --- a/tests/integration/targets/xml/results/test-set-element-value-empty.xml +++ b/tests/integration/targets/xml/results/test-set-element-value-empty.xml @@ -11,4 +11,4 @@
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-element-value-unicode.xml b/tests/integration/targets/xml/results/test-set-element-value-unicode.xml index 734fe6dbf1..6c5ca8dd96 100644 --- a/tests/integration/targets/xml/results/test-set-element-value-unicode.xml +++ b/tests/integration/targets/xml/results/test-set-element-value-unicode.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
-пять \ No newline at end of file +пять diff --git a/tests/integration/targets/xml/results/test-set-element-value.xml b/tests/integration/targets/xml/results/test-set-element-value.xml index fc97ec3bed..59fb1e5163 100644 --- a/tests/integration/targets/xml/results/test-set-element-value.xml +++ b/tests/integration/targets/xml/results/test-set-element-value.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
-5 \ No newline at end of file +5 diff --git a/tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml b/tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml index 44abda43f0..229b31ad72 100644 --- a/tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml +++ b/tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/results/test-set-namespaced-element-value.xml b/tests/integration/targets/xml/results/test-set-namespaced-element-value.xml index 0cc8a79e39..f78873e7a0 100644 --- a/tests/integration/targets/xml/results/test-set-namespaced-element-value.xml +++ b/tests/integration/targets/xml/results/test-set-namespaced-element-value.xml @@ -11,4 +11,4 @@
http://tastybeverageco.com
- \ No newline at end of file + diff --git a/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml b/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml index 57bea2d7eb..fbc74a9367 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml @@ -17,6 +17,9 @@ - beer: Окское register: add_children_elements_unicode + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-add-children-elements-unicode.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-elements.yml b/tests/integration/targets/xml/tasks/test-add-children-elements.yml index 719a84234e..7b5e0be42a 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-elements.yml @@ -17,6 +17,9 @@ - beer: Old Rasputin register: add_children_elements + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-add-children-elements.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml b/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml index 4ad50d0406..f6733d6e82 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml @@ -16,6 +16,9 @@ add_children: '{{ bad_beers }}' register: add_children_from_groupvars + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-add-children-from-groupvars.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml b/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml index e085dcb57b..7c928b239d 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml @@ -19,6 +19,9 @@ type: экстра register: add_children_with_attributes_unicode + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-add-children-with-attributes-unicode.xml diff --git a/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml b/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml index cfcb906fc6..e11dda7639 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml @@ -19,6 +19,9 @@ type: light register: add_children_with_attributes + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-add-children-with-attributes.xml diff --git a/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml b/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml index 56c0d0ba44..dd3ada48e1 100644 --- a/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml @@ -20,6 +20,9 @@ - beer: Old Rasputin register: add_namespaced_children_elements + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml + - name: Compare to expected result copy: src: results/test-add-namespaced-children-elements.xml diff --git a/tests/integration/targets/xml/tasks/test-children-elements-xml.yml b/tests/integration/targets/xml/tasks/test-children-elements-xml.yml index d0c27bbc1f..139281fb34 100644 --- a/tests/integration/targets/xml/tasks/test-children-elements-xml.yml +++ b/tests/integration/targets/xml/tasks/test-children-elements-xml.yml @@ -18,6 +18,9 @@ - 'Old Rasputin' register: children_elements + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-add-children-elements.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-attribute.yml b/tests/integration/targets/xml/tasks/test-remove-attribute.yml index 4f91a46a7a..84e15aa446 100644 --- a/tests/integration/targets/xml/tasks/test-remove-attribute.yml +++ b/tests/integration/targets/xml/tasks/test-remove-attribute.yml @@ -16,6 +16,9 @@ state: absent register: remove_attribute + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-remove-attribute.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-element.yml b/tests/integration/targets/xml/tasks/test-remove-element.yml index ff70dcd799..243e148984 100644 --- a/tests/integration/targets/xml/tasks/test-remove-element.yml +++ b/tests/integration/targets/xml/tasks/test-remove-element.yml @@ -16,6 +16,9 @@ state: absent register: remove_element + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-remove-element.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml index 11d6183d5f..75c1a505d9 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml @@ -21,6 +21,9 @@ state: absent register: remove_namespaced_attribute + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml + - name: Compare to expected result copy: src: results/test-remove-namespaced-attribute.xml diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml index 0f898cf5a3..70a86dcd30 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml @@ -21,6 +21,9 @@ state: absent register: remove_namespaced_element + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml + - name: Compare to expected result copy: src: results/test-remove-element.xml diff --git a/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml b/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml index cce97e6fab..27e759c6b8 100644 --- a/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml @@ -17,6 +17,9 @@ value: нет register: set_attribute_value_unicode + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-attribute-value-unicode.xml diff --git a/tests/integration/targets/xml/tasks/test-set-attribute-value.yml b/tests/integration/targets/xml/tasks/test-set-attribute-value.yml index ffe4b828fc..ada4d9ab56 100644 --- a/tests/integration/targets/xml/tasks/test-set-attribute-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-attribute-value.yml @@ -17,6 +17,9 @@ value: 'false' register: set_attribute_value + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-attribute-value.xml diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml b/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml index 18bb17585d..7fb755bfcc 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml @@ -40,6 +40,9 @@ quantity: 20g register: set_children_elements_level + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-children-elements-level.xml diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml b/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml index e6fe28f267..5e3a7a5758 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml @@ -18,6 +18,9 @@ - beer: Невское register: set_children_elements_unicode + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-children-elements-unicode.xml diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements.yml b/tests/integration/targets/xml/tasks/test-set-children-elements.yml index d6cf46d918..8ab14d5080 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements.yml @@ -18,6 +18,9 @@ - beer: Harvest Pumpkin Ale register: set_children_elements + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-children-elements.xml diff --git a/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml b/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml index ccbd3e8552..49a4903ad0 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml @@ -16,6 +16,9 @@ value: '' register: set_element_value_empty + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-element-value-empty.xml diff --git a/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml b/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml index 6324e18558..9dbb47b94b 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml @@ -30,6 +30,9 @@ value: пять register: set_element_second_run + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-element-value-unicode.xml diff --git a/tests/integration/targets/xml/tasks/test-set-element-value.yml b/tests/integration/targets/xml/tasks/test-set-element-value.yml index a6d00cf9ed..50bbe71f95 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value.yml @@ -30,6 +30,9 @@ value: '5' register: set_element_second_run + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-beers.xml + - name: Compare to expected result copy: src: results/test-set-element-value.xml diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml index e9fb691d20..90a9aef725 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml @@ -22,6 +22,9 @@ value: 'false' register: set_namespaced_attribute_value + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml + - name: Compare to expected result copy: src: results/test-set-namespaced-attribute-value.xml diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml index 5a20b6b56f..7b3839a2b3 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml @@ -33,6 +33,9 @@ value: '11' register: set_element_second_run + - name: Add trailing newline + shell: echo "" >> /tmp/ansible-xml-namespaced-beers.xml + - name: Compare to expected result copy: src: results/test-set-namespaced-element-value.xml diff --git a/tests/integration/targets/yarn/templates/package.j2 b/tests/integration/targets/yarn/templates/package.j2 index 8ca73aa83a..0d7a676faa 100644 --- a/tests/integration/targets/yarn/templates/package.j2 +++ b/tests/integration/targets/yarn/templates/package.j2 @@ -6,4 +6,4 @@ "iconv-lite": "^0.4.21", "@types/node": "^12.0.0" } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt index 8d223b041b..bb6a333ab0 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "up", "state": "present", "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt index a90dd1cafa..f1bdb5fd13 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt @@ -14,4 +14,4 @@ options: "option": "up", "state": "present", "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt index 1c9adbd9fc..53c9acd13b 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt @@ -14,4 +14,4 @@ options: "option": "up", "state": "absent", "value": null -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt index 7e1aa336c2..122f18652b 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt @@ -14,4 +14,4 @@ options: "option": "up", "state": "present", "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt index 050a983971..6e0ba79f38 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "method", "state": "present", "value": "dhcp" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt index 3f0da8b1c7..8b9c5a14b2 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "mtu", "state": "present", "value": "1350" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt index 0af87750b7..a6ce9ad69d 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "slaves", "state": "present", "value": "int1 int3" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json index ee632bd542..8903ee647c 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json @@ -18,4 +18,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt index 8d223b041b..bb6a333ab0 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "up", "state": "present", "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt index a90dd1cafa..f1bdb5fd13 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt @@ -14,4 +14,4 @@ options: "option": "up", "state": "present", "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt index 1c9adbd9fc..53c9acd13b 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt @@ -14,4 +14,4 @@ options: "option": "up", "state": "absent", "value": null -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt index 7e1aa336c2..122f18652b 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt @@ -14,4 +14,4 @@ options: "option": "up", "state": "present", "value": "route add -net 224.0.0.0 netmask 240.0.0.0 dev aggi" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt index 04c2089186..0150522757 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "address", "state": "present", "value": "fc00::42" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt index 48cb29b0aa..2a73a2b777 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "post-up", "state": "present", "value": "XXXX_ipv6" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt index fbfed6be37..262ffe9f34 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "pre-up", "state": "present", "value": "XXXX_ipv6" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt index 050a983971..6e0ba79f38 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "method", "state": "present", "value": "dhcp" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt index 3f0da8b1c7..8b9c5a14b2 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "mtu", "state": "present", "value": "1350" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt index 0af87750b7..a6ce9ad69d 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "slaves", "state": "present", "value": "int1 int3" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json index bffc17a989..782b4d0fb4 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json @@ -15,4 +15,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt index a1600d9a67..bab7cce06e 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "address", "state": "present", "value": "192.168.0.42" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt index e1e0152320..d1ce159755 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "post-up", "state": "present", "value": "XXXX_ipv4" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt index 9e510654c2..8a439db4c0 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "pre-up", "state": "present", "value": "XXXX_ipv4" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt index 04c2089186..0150522757 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "address", "state": "present", "value": "fc00::42" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt index 48cb29b0aa..2a73a2b777 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "post-up", "state": "present", "value": "XXXX_ipv6" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt index fbfed6be37..262ffe9f34 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "pre-up", "state": "present", "value": "XXXX_ipv6" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json index 8e9863b2ea..6df01a42ff 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt index fddf3b3b0a..57f3fe6f76 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "mtu", "state": "absent", "value": "1350" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt index 764c9cb016..007dd44446 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "mtu", "state": "present", "value": "1350" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json index 9e97da32aa..c854211970 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json @@ -106,4 +106,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt index a1600d9a67..bab7cce06e 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "address", "state": "present", "value": "192.168.0.42" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt index e1e0152320..d1ce159755 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "post-up", "state": "present", "value": "XXXX_ipv4" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt index 9e510654c2..8a439db4c0 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "pre-up", "state": "present", "value": "XXXX_ipv4" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt index 04c2089186..0150522757 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "address", "state": "present", "value": "fc00::42" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt index 48cb29b0aa..2a73a2b777 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "post-up", "state": "present", "value": "XXXX_ipv6" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt index fbfed6be37..262ffe9f34 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt @@ -6,4 +6,4 @@ options: "option": "pre-up", "state": "present", "value": "XXXX_ipv6" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt index 050a983971..6e0ba79f38 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "method", "state": "present", "value": "dhcp" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt index fddf3b3b0a..57f3fe6f76 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "mtu", "state": "absent", "value": "1350" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt index 764c9cb016..007dd44446 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt @@ -5,4 +5,4 @@ options: "option": "mtu", "state": "present", "value": "1350" -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json index d21e3317ca..80b7c210c5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json @@ -21,4 +21,4 @@ "pre-up": [], "up": [] } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py index 4f76da9ce8..d3fc97d71e 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py @@ -77,6 +77,8 @@ class TestInterfacesFileModule(unittest.TestCase): def compareStringWithFile(self, string, path): # self.assertEqual("","_",msg=path) testfilepath = os.path.join(golden_output_path, path) + if string and not string.endswith('\n'): + string += '\n' goldenstring = string if not os.path.isfile(testfilepath): f = io.open(testfilepath, 'wb') From 68e7e5255770f1827355b47ca485abdbd7c81c3e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 5 Aug 2022 21:31:34 +0200 Subject: [PATCH 0154/2104] Add simple license headers, not completely at top. (#5080) --- .github/settings.yml | 5 +++++ changelogs/fragments/licenses.yml | 2 +- tests/integration/targets/aix_devices/tasks/main.yml | 5 +++++ tests/integration/targets/aix_filesystem/tasks/main.yml | 5 +++++ tests/integration/targets/alerta_customer/tasks/main.yml | 5 +++++ tests/integration/targets/apache2_module/tasks/main.yml | 3 +++ tests/integration/targets/callback/tasks/main.yml | 4 ++++ tests/integration/targets/callback_diy/tasks/main.yml | 5 +++++ tests/integration/targets/callback_yaml/tasks/main.yml | 4 ++++ .../integration/targets/cloud_init_data_facts/tasks/main.yml | 4 ++++ tests/integration/targets/consul/tasks/main.yml | 5 +++++ tests/integration/targets/cronvar/tasks/main.yml | 5 +++++ tests/integration/targets/deploy_helper/tasks/main.yml | 4 ++++ tests/integration/targets/discord/tasks/main.yml | 5 +++++ tests/integration/targets/dpkg_divert/tasks/main.yml | 4 ++++ tests/integration/targets/filesize/tasks/main.yml | 4 ++++ tests/integration/targets/filesystem/tasks/main.yml | 4 ++++ tests/integration/targets/filter_counter/tasks/main.yml | 4 ++++ tests/integration/targets/filter_dict_kv/tasks/main.yml | 4 ++++ tests/integration/targets/filter_from_csv/tasks/main.yml | 5 +++++ tests/integration/targets/filter_hashids/tasks/main.yml | 5 +++++ tests/integration/targets/filter_jc/tasks/main.yml | 4 ++++ tests/integration/targets/filter_json_query/tasks/main.yml | 5 +++++ tests/integration/targets/filter_time/tasks/main.yml | 4 ++++ .../targets/filter_unicode_normalize/tasks/main.yml | 5 +++++ tests/integration/targets/filter_version_sort/tasks/main.yml | 4 ++++ tests/integration/targets/git_config/tasks/main.yml | 3 +++ tests/integration/targets/gitlab_branch/tasks/main.yml | 5 +++++ tests/integration/targets/gitlab_deploy_key/tasks/main.yml | 5 +++++ tests/integration/targets/gitlab_group/tasks/main.yml | 5 +++++ .../integration/targets/gitlab_group_variable/tasks/main.yml | 4 ++++ tests/integration/targets/gitlab_hook/tasks/main.yml | 5 +++++ tests/integration/targets/gitlab_project/tasks/main.yml | 5 +++++ .../targets/gitlab_project_variable/tasks/main.yml | 5 +++++ tests/integration/targets/gitlab_runner/tasks/main.yml | 5 +++++ tests/integration/targets/gitlab_user/tasks/main.yml | 5 +++++ tests/integration/targets/gitlab_user/tasks/sshkey.yml | 5 +++++ tests/integration/targets/hwc_ecs_instance/tasks/main.yml | 4 ++++ tests/integration/targets/hwc_evs_disk/tasks/main.yml | 4 ++++ tests/integration/targets/hwc_network_vpc/tasks/main.yml | 4 ++++ tests/integration/targets/hwc_smn_topic/tasks/main.yml | 5 +++++ tests/integration/targets/hwc_vpc_eip/tasks/main.yml | 4 ++++ .../targets/hwc_vpc_peering_connect/tasks/main.yml | 4 ++++ tests/integration/targets/hwc_vpc_port/tasks/main.yml | 4 ++++ tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml | 4 ++++ tests/integration/targets/hwc_vpc_route/tasks/main.yml | 4 ++++ .../targets/hwc_vpc_security_group/tasks/main.yml | 4 ++++ .../targets/hwc_vpc_security_group_rule/tasks/main.yml | 4 ++++ tests/integration/targets/hwc_vpc_subnet/tasks/main.yml | 4 ++++ tests/integration/targets/influxdb_user/tasks/main.yml | 3 +++ tests/integration/targets/iptables_state/tasks/main.yml | 4 ++++ tests/integration/targets/ipwcli_dns/tasks/main.yml | 4 ++++ tests/integration/targets/java_cert/tasks/main.yml | 5 +++++ tests/integration/targets/java_keystore/tasks/main.yml | 5 +++++ tests/integration/targets/jboss/tasks/main.yml | 5 +++++ tests/integration/targets/launchd/tasks/main.yml | 3 +++ tests/integration/targets/ldap_search/tasks/main.yml | 5 +++++ tests/integration/targets/lookup_cartesian/tasks/main.yml | 5 +++++ tests/integration/targets/lookup_flattened/tasks/main.yml | 5 +++++ .../integration/targets/lookup_passwordstore/tasks/main.yml | 5 +++++ tests/integration/targets/lvg/tasks/main.yml | 5 +++++ tests/integration/targets/mail/tasks/main.yml | 5 +++++ tests/integration/targets/memset_dns_reload/tasks/main.yml | 4 ++++ .../integration/targets/memset_memstore_info/tasks/main.yml | 4 ++++ tests/integration/targets/memset_server_info/tasks/main.yml | 4 ++++ tests/integration/targets/memset_zone/tasks/main.yml | 4 ++++ tests/integration/targets/memset_zone_domain/tasks/main.yml | 4 ++++ tests/integration/targets/memset_zone_record/tasks/main.yml | 5 +++++ tests/integration/targets/monit/tasks/main.yml | 5 +++++ tests/integration/targets/mqtt/tasks/main.yml | 5 +++++ tests/integration/targets/mssql_script/tasks/main.yml | 5 +++++ tests/integration/targets/odbc/tasks/main.yml | 5 +++++ tests/integration/targets/one_host/tasks/main.yml | 5 ++++- tests/integration/targets/one_template/tasks/main.yml | 5 ++++- tests/integration/targets/pacman/tasks/main.yml | 4 ++++ .../targets/python_requirements_info/tasks/main.yml | 5 +++++ tests/integration/targets/read_csv/tasks/main.yml | 5 +++++ tests/integration/targets/rundeck/tasks/main.yml | 4 ++++ tests/integration/targets/scaleway_compute/tasks/main.yml | 5 +++++ .../targets/scaleway_database_backup/tasks/main.yml | 5 +++++ tests/integration/targets/scaleway_image_info/tasks/main.yml | 5 +++++ tests/integration/targets/scaleway_ip/tasks/main.yml | 5 +++++ tests/integration/targets/scaleway_ip_info/tasks/main.yml | 5 +++++ tests/integration/targets/scaleway_lb/tasks/main.yml | 5 +++++ .../targets/scaleway_organization_info/tasks/main.yml | 5 +++++ .../targets/scaleway_security_group/tasks/main.yml | 5 +++++ .../targets/scaleway_security_group_info/tasks/main.yml | 5 +++++ .../targets/scaleway_security_group_rule/tasks/main.yml | 5 +++++ .../integration/targets/scaleway_server_info/tasks/main.yml | 5 +++++ .../targets/scaleway_snapshot_info/tasks/main.yml | 5 +++++ tests/integration/targets/scaleway_sshkey/tasks/main.yml | 5 +++++ tests/integration/targets/scaleway_user_data/tasks/main.yml | 5 +++++ tests/integration/targets/scaleway_volume/tasks/main.yml | 5 +++++ .../integration/targets/scaleway_volume_info/tasks/main.yml | 5 +++++ tests/integration/targets/sensu_client/tasks/main.yml | 5 +++++ tests/integration/targets/sensu_handler/tasks/main.yml | 5 +++++ tests/integration/targets/setup_cron/tasks/main.yml | 5 +++++ tests/integration/targets/setup_epel/tasks/main.yml | 5 +++++ .../integration/targets/setup_flatpak_remote/tasks/main.yaml | 5 +++++ tests/integration/targets/setup_influxdb/tasks/main.yml | 3 +++ tests/integration/targets/setup_java_keytool/tasks/main.yml | 5 +++++ tests/integration/targets/setup_mosquitto/tasks/main.yml | 4 ++++ tests/integration/targets/setup_openldap/tasks/main.yml | 4 ++++ tests/integration/targets/setup_openssl/tasks/main.yml | 4 ++++ tests/integration/targets/setup_pkg_mgr/tasks/main.yml | 4 ++++ tests/integration/targets/setup_postgresql_db/tasks/main.yml | 5 +++++ .../targets/setup_remote_constraints/tasks/main.yml | 5 +++++ .../integration/targets/setup_remote_tmp_dir/tasks/main.yml | 5 +++++ tests/integration/targets/setup_rundeck/tasks/main.yml | 4 ++++ tests/integration/targets/setup_snap/tasks/main.yml | 4 ++++ tests/integration/targets/setup_tls/tasks/main.yml | 4 ++++ .../integration/targets/setup_wildfly_server/tasks/main.yml | 5 +++++ tests/integration/targets/shutdown/tasks/main.yml | 4 ++++ tests/integration/targets/snap/tasks/main.yml | 4 ++++ tests/integration/targets/snap_alias/tasks/main.yml | 4 ++++ tests/integration/targets/supervisorctl/tasks/main.yml | 5 +++++ tests/integration/targets/timezone/tasks/main.yml | 5 +++++ tests/integration/targets/ufw/tasks/main.yml | 4 ++++ tests/integration/targets/wakeonlan/tasks/main.yml | 5 +++++ tests/integration/targets/xattr/tasks/main.yml | 5 +++++ tests/integration/targets/xfs_quota/tasks/main.yml | 4 ++++ tests/integration/targets/xml/tasks/main.yml | 4 ++++ tests/integration/targets/yum_versionlock/tasks/main.yml | 4 ++++ 123 files changed, 552 insertions(+), 3 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 8a5b8d32f2..3e8a5f9ad8 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -1,3 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # DO NOT MODIFY # Settings: https://probot.github.io/apps/settings/ diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml index 18737a9ee4..ad4a608a79 100644 --- a/changelogs/fragments/licenses.yml +++ b/changelogs/fragments/licenses.yml @@ -1,3 +1,3 @@ minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065)." + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5080)." - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/tests/integration/targets/aix_devices/tasks/main.yml b/tests/integration/targets/aix_devices/tasks/main.yml index 3bb3329b7b..d007e9b611 100644 --- a/tests/integration/targets/aix_devices/tasks/main.yml +++ b/tests/integration/targets/aix_devices/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Scan new devices. aix_devices: device: all diff --git a/tests/integration/targets/aix_filesystem/tasks/main.yml b/tests/integration/targets/aix_filesystem/tasks/main.yml index ed326d933d..e17ec4d263 100644 --- a/tests/integration/targets/aix_filesystem/tasks/main.yml +++ b/tests/integration/targets/aix_filesystem/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Umounting /testfs aix_filesystem: filesystem: /testfs diff --git a/tests/integration/targets/alerta_customer/tasks/main.yml b/tests/integration/targets/alerta_customer/tasks/main.yml index 8e80e5a323..b91c24b531 100644 --- a/tests/integration/targets/alerta_customer/tasks/main.yml +++ b/tests/integration/targets/alerta_customer/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create customer (check mode) alerta_customer: alerta_url: "{{ alerta_url }}" diff --git a/tests/integration/targets/apache2_module/tasks/main.yml b/tests/integration/targets/apache2_module/tasks/main.yml index d840ff60e8..650e36474c 100644 --- a/tests/integration/targets/apache2_module/tasks/main.yml +++ b/tests/integration/targets/apache2_module/tasks/main.yml @@ -4,6 +4,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: install apache via apt apt: diff --git a/tests/integration/targets/callback/tasks/main.yml b/tests/integration/targets/callback/tasks/main.yml index 1b178f93bf..827217a532 100644 --- a/tests/integration/targets/callback/tasks/main.yml +++ b/tests/integration/targets/callback/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - name: Create temporary playbook files tempfile: diff --git a/tests/integration/targets/callback_diy/tasks/main.yml b/tests/integration/targets/callback_diy/tasks/main.yml index d087e452f5..fa468b52ba 100644 --- a/tests/integration/targets/callback_diy/tasks/main.yml +++ b/tests/integration/targets/callback_diy/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Run tests include_role: name: callback diff --git a/tests/integration/targets/callback_yaml/tasks/main.yml b/tests/integration/targets/callback_yaml/tasks/main.yml index a764f44a6a..f3c36663da 100644 --- a/tests/integration/targets/callback_yaml/tasks/main.yml +++ b/tests/integration/targets/callback_yaml/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Run tests include_role: name: callback diff --git a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml index 9565dc1199..fc634a972f 100644 --- a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: test cloud-init # TODO: check for a workaround # install 'cloud-init'' failed: dpkg-divert: error: `diversion of /etc/init/ureadahead.conf diff --git a/tests/integration/targets/consul/tasks/main.yml b/tests/integration/targets/consul/tasks/main.yml index ab343029fd..a2b63ac955 100644 --- a/tests/integration/targets/consul/tasks/main.yml +++ b/tests/integration/targets/consul/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install Consul and test vars: consul_version: 1.5.0 diff --git a/tests/integration/targets/cronvar/tasks/main.yml b/tests/integration/targets/cronvar/tasks/main.yml index f8090db1b6..73ec41abca 100644 --- a/tests/integration/targets/cronvar/tasks/main.yml +++ b/tests/integration/targets/cronvar/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Ensure /etc/cron.d directory exists file: path: /etc/cron.d diff --git a/tests/integration/targets/deploy_helper/tasks/main.yml b/tests/integration/targets/deploy_helper/tasks/main.yml index 6d03b8da0e..fdd8bd87b2 100644 --- a/tests/integration/targets/deploy_helper/tasks/main.yml +++ b/tests/integration/targets/deploy_helper/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: record the output directory set_fact: deploy_helper_test_root={{remote_tmp_dir}}/deploy_helper_test_root diff --git a/tests/integration/targets/discord/tasks/main.yml b/tests/integration/targets/discord/tasks/main.yml index 44cd663756..29314ba238 100644 --- a/tests/integration/targets/discord/tasks/main.yml +++ b/tests/integration/targets/discord/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Send basic message community.general.discord: webhook_id: "{{ discord_id }}" diff --git a/tests/integration/targets/dpkg_divert/tasks/main.yml b/tests/integration/targets/dpkg_divert/tasks/main.yml index 6e71f1bdcf..910f174e17 100644 --- a/tests/integration/targets/dpkg_divert/tasks/main.yml +++ b/tests/integration/targets/dpkg_divert/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: "include tasks for Debian family" include_tasks: prepare.yml when: ansible_pkg_mgr == "apt" diff --git a/tests/integration/targets/filesize/tasks/main.yml b/tests/integration/targets/filesize/tasks/main.yml index 14415dac9a..68cd8934cf 100644 --- a/tests/integration/targets/filesize/tasks/main.yml +++ b/tests/integration/targets/filesize/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Ensure the test dir is present ansible.builtin.file: path: "{{ filesize_testdir }}" diff --git a/tests/integration/targets/filesystem/tasks/main.yml b/tests/integration/targets/filesystem/tasks/main.yml index 70ff890cc7..0ff0f23091 100644 --- a/tests/integration/targets/filesystem/tasks/main.yml +++ b/tests/integration/targets/filesystem/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - ansible.builtin.debug: msg: '{{ role_name }}' - ansible.builtin.debug: diff --git a/tests/integration/targets/filter_counter/tasks/main.yml b/tests/integration/targets/filter_counter/tasks/main.yml index 69f8bed3b0..881d55d2f6 100644 --- a/tests/integration/targets/filter_counter/tasks/main.yml +++ b/tests/integration/targets/filter_counter/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: test counter filter assert: that: diff --git a/tests/integration/targets/filter_dict_kv/tasks/main.yml b/tests/integration/targets/filter_dict_kv/tasks/main.yml index 871962e93d..47dc8e25dc 100644 --- a/tests/integration/targets/filter_dict_kv/tasks/main.yml +++ b/tests/integration/targets/filter_dict_kv/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: test dict_kv filter assert: that: diff --git a/tests/integration/targets/filter_from_csv/tasks/main.yml b/tests/integration/targets/filter_from_csv/tasks/main.yml index 5a67494a00..f82e7d6069 100644 --- a/tests/integration/targets/filter_from_csv/tasks/main.yml +++ b/tests/integration/targets/filter_from_csv/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Parse valid csv input assert: that: diff --git a/tests/integration/targets/filter_hashids/tasks/main.yml b/tests/integration/targets/filter_hashids/tasks/main.yml index 95bcc91346..4a76540f6b 100644 --- a/tests/integration/targets/filter_hashids/tasks/main.yml +++ b/tests/integration/targets/filter_hashids/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test valid hashable inputs assert: that: diff --git a/tests/integration/targets/filter_jc/tasks/main.yml b/tests/integration/targets/filter_jc/tasks/main.yml index 3cae22d620..a06a0bfa45 100644 --- a/tests/integration/targets/filter_jc/tasks/main.yml +++ b/tests/integration/targets/filter_jc/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: test jc key/value parser assert: that: diff --git a/tests/integration/targets/filter_json_query/tasks/main.yml b/tests/integration/targets/filter_json_query/tasks/main.yml index 2cc3e12da2..92db6d876a 100644 --- a/tests/integration/targets/filter_json_query/tasks/main.yml +++ b/tests/integration/targets/filter_json_query/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test json_query filter assert: that: diff --git a/tests/integration/targets/filter_time/tasks/main.yml b/tests/integration/targets/filter_time/tasks/main.yml index 7f0d092f34..bd8c53ac31 100644 --- a/tests/integration/targets/filter_time/tasks/main.yml +++ b/tests/integration/targets/filter_time/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: test zero is 0 assert: that: diff --git a/tests/integration/targets/filter_unicode_normalize/tasks/main.yml b/tests/integration/targets/filter_unicode_normalize/tasks/main.yml index 948ca74b4b..13902706e2 100644 --- a/tests/integration/targets/filter_unicode_normalize/tasks/main.yml +++ b/tests/integration/targets/filter_unicode_normalize/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test 'NFC' normalization assert: that: diff --git a/tests/integration/targets/filter_version_sort/tasks/main.yml b/tests/integration/targets/filter_version_sort/tasks/main.yml index 2edca18c9c..08985d1bae 100644 --- a/tests/integration/targets/filter_version_sort/tasks/main.yml +++ b/tests/integration/targets/filter_version_sort/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: validate that versions are properly sorted in a stable way assert: that: diff --git a/tests/integration/targets/git_config/tasks/main.yml b/tests/integration/targets/git_config/tasks/main.yml index c88d52e27a..4dc72824c8 100644 --- a/tests/integration/targets/git_config/tasks/main.yml +++ b/tests/integration/targets/git_config/tasks/main.yml @@ -5,6 +5,9 @@ #################################################################### # test code for the git_config module +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: setup import_tasks: setup.yml diff --git a/tests/integration/targets/gitlab_branch/tasks/main.yml b/tests/integration/targets/gitlab_branch/tasks/main.yml index 78fe772012..e9b64fc3a3 100644 --- a/tests/integration/targets/gitlab_branch/tasks/main.yml +++ b/tests/integration/targets/gitlab_branch/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_deploy_key/tasks/main.yml b/tests/integration/targets/gitlab_deploy_key/tasks/main.yml index 430d46f4ab..4330eb674c 100644 --- a/tests/integration/targets/gitlab_deploy_key/tasks/main.yml +++ b/tests/integration/targets/gitlab_deploy_key/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_group/tasks/main.yml b/tests/integration/targets/gitlab_group/tasks/main.yml index 0d17f6a9d4..a0355094f4 100644 --- a/tests/integration/targets/gitlab_group/tasks/main.yml +++ b/tests/integration/targets/gitlab_group/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_group_variable/tasks/main.yml b/tests/integration/targets/gitlab_group_variable/tasks/main.yml index 072a5c7dce..0f4a93f461 100644 --- a/tests/integration/targets/gitlab_group_variable/tasks/main.yml +++ b/tests/integration/targets/gitlab_group_variable/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_hook/tasks/main.yml b/tests/integration/targets/gitlab_hook/tasks/main.yml index 0ef6cb5c08..410af63e9f 100644 --- a/tests/integration/targets/gitlab_hook/tasks/main.yml +++ b/tests/integration/targets/gitlab_hook/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_project/tasks/main.yml b/tests/integration/targets/gitlab_project/tasks/main.yml index 2e6dd0cfd3..611d6548f6 100644 --- a/tests/integration/targets/gitlab_project/tasks/main.yml +++ b/tests/integration/targets/gitlab_project/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_project_variable/tasks/main.yml b/tests/integration/targets/gitlab_project_variable/tasks/main.yml index 18dbf7eccd..3c90bfe467 100644 --- a/tests/integration/targets/gitlab_project_variable/tasks/main.yml +++ b/tests/integration/targets/gitlab_project_variable/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_runner/tasks/main.yml b/tests/integration/targets/gitlab_runner/tasks/main.yml index 42b4182087..e4529f8ffc 100644 --- a/tests/integration/targets/gitlab_runner/tasks/main.yml +++ b/tests/integration/targets/gitlab_runner/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_user/tasks/main.yml b/tests/integration/targets/gitlab_user/tasks/main.yml index dddf7aaea8..1f16074f70 100644 --- a/tests/integration/targets/gitlab_user/tasks/main.yml +++ b/tests/integration/targets/gitlab_user/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required libs pip: name: python-gitlab diff --git a/tests/integration/targets/gitlab_user/tasks/sshkey.yml b/tests/integration/targets/gitlab_user/tasks/sshkey.yml index 2d2067e74b..bba724d5ee 100644 --- a/tests/integration/targets/gitlab_user/tasks/sshkey.yml +++ b/tests/integration/targets/gitlab_user/tasks/sshkey.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create gitlab user with sshkey credentials gitlab_user: api_url: "{{ gitlab_host }}" diff --git a/tests/integration/targets/hwc_ecs_instance/tasks/main.yml b/tests/integration/targets/hwc_ecs_instance/tasks/main.yml index 4d36c11286..9322558f96 100644 --- a/tests/integration/targets/hwc_ecs_instance/tasks/main.yml +++ b/tests/integration/targets/hwc_ecs_instance/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a vpc hwc_network_vpc: diff --git a/tests/integration/targets/hwc_evs_disk/tasks/main.yml b/tests/integration/targets/hwc_evs_disk/tasks/main.yml index e2380450cd..e691169016 100644 --- a/tests/integration/targets/hwc_evs_disk/tasks/main.yml +++ b/tests/integration/targets/hwc_evs_disk/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: delete a disk hwc_evs_disk: availability_zone: "cn-north-1a" diff --git a/tests/integration/targets/hwc_network_vpc/tasks/main.yml b/tests/integration/targets/hwc_network_vpc/tasks/main.yml index e3b979d0b5..3695fd2100 100644 --- a/tests/integration/targets/hwc_network_vpc/tasks/main.yml +++ b/tests/integration/targets/hwc_network_vpc/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** diff --git a/tests/integration/targets/hwc_smn_topic/tasks/main.yml b/tests/integration/targets/hwc_smn_topic/tasks/main.yml index a9879aea54..323904773f 100644 --- a/tests/integration/targets/hwc_smn_topic/tasks/main.yml +++ b/tests/integration/targets/hwc_smn_topic/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: delete a smn topic hwc_smn_topic: identity_endpoint: "{{ identity_endpoint }}" diff --git a/tests/integration/targets/hwc_vpc_eip/tasks/main.yml b/tests/integration/targets/hwc_vpc_eip/tasks/main.yml index bdf5d763a7..462b5ff93f 100644 --- a/tests/integration/targets/hwc_vpc_eip/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_eip/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a vpc hwc_network_vpc: diff --git a/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml b/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml index cb6a15f750..6a5eb19b89 100644 --- a/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a vpc hwc_network_vpc: diff --git a/tests/integration/targets/hwc_vpc_port/tasks/main.yml b/tests/integration/targets/hwc_vpc_port/tasks/main.yml index 00f5ae8b2e..d78498cbb6 100644 --- a/tests/integration/targets/hwc_vpc_port/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_port/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a vpc hwc_network_vpc: diff --git a/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml b/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml index 5531d575f8..8bfd3e4d82 100644 --- a/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a vpc hwc_network_vpc: diff --git a/tests/integration/targets/hwc_vpc_route/tasks/main.yml b/tests/integration/targets/hwc_vpc_route/tasks/main.yml index 9c9c37e8c0..c7ae7989ca 100644 --- a/tests/integration/targets/hwc_vpc_route/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_route/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a vpc hwc_network_vpc: diff --git a/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml b/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml index 9f853ca8e7..f9d8e5bf76 100644 --- a/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: delete a security group hwc_vpc_security_group: diff --git a/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml b/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml index 04213e7162..0b7f99fd61 100644 --- a/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a security group hwc_vpc_security_group: diff --git a/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml b/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml index c16ff85241..90243203f6 100644 --- a/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Pre-test setup - name: create a vpc hwc_network_vpc: diff --git a/tests/integration/targets/influxdb_user/tasks/main.yml b/tests/integration/targets/influxdb_user/tasks/main.yml index ad625367e0..23c37b7960 100644 --- a/tests/integration/targets/influxdb_user/tasks/main.yml +++ b/tests/integration/targets/influxdb_user/tasks/main.yml @@ -4,6 +4,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - include: tests.yml when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty' diff --git a/tests/integration/targets/iptables_state/tasks/main.yml b/tests/integration/targets/iptables_state/tasks/main.yml index 5e9bf88ecd..8ed0b46d0e 100644 --- a/tests/integration/targets/iptables_state/tasks/main.yml +++ b/tests/integration/targets/iptables_state/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: ensure iptables package is installed package: name: diff --git a/tests/integration/targets/ipwcli_dns/tasks/main.yml b/tests/integration/targets/ipwcli_dns/tasks/main.yml index 870f249e07..ca47b4dece 100644 --- a/tests/integration/targets/ipwcli_dns/tasks/main.yml +++ b/tests/integration/targets/ipwcli_dns/tasks/main.yml @@ -1,9 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # Test code for ipwcli_dns +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: variables username, password, container, tld must be set fail: diff --git a/tests/integration/targets/java_cert/tasks/main.yml b/tests/integration/targets/java_cert/tasks/main.yml index 2088e3bfda..54d205c255 100644 --- a/tests/integration/targets/java_cert/tasks/main.yml +++ b/tests/integration/targets/java_cert/tasks/main.yml @@ -3,6 +3,11 @@ # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - when: has_java_keytool block: diff --git a/tests/integration/targets/java_keystore/tasks/main.yml b/tests/integration/targets/java_keystore/tasks/main.yml index b5f1f01624..2a95cfe502 100644 --- a/tests/integration/targets/java_keystore/tasks/main.yml +++ b/tests/integration/targets/java_keystore/tasks/main.yml @@ -3,6 +3,11 @@ # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - when: has_java_keytool connection: local block: diff --git a/tests/integration/targets/jboss/tasks/main.yml b/tests/integration/targets/jboss/tasks/main.yml index fb3860bf6f..891c802d7d 100644 --- a/tests/integration/targets/jboss/tasks/main.yml +++ b/tests/integration/targets/jboss/tasks/main.yml @@ -1,6 +1,11 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - import_tasks: jboss.yml diff --git a/tests/integration/targets/launchd/tasks/main.yml b/tests/integration/targets/launchd/tasks/main.yml index d014f224b0..8f5b14a596 100644 --- a/tests/integration/targets/launchd/tasks/main.yml +++ b/tests/integration/targets/launchd/tasks/main.yml @@ -4,6 +4,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Test launchd module block: diff --git a/tests/integration/targets/ldap_search/tasks/main.yml b/tests/integration/targets/ldap_search/tasks/main.yml index c67ffd3ac7..521075b5e1 100644 --- a/tests/integration/targets/ldap_search/tasks/main.yml +++ b/tests/integration/targets/ldap_search/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Run LDAP search module tests block: - include_tasks: "{{ item }}" diff --git a/tests/integration/targets/lookup_cartesian/tasks/main.yml b/tests/integration/targets/lookup_cartesian/tasks/main.yml index 6e563e0cff..5575f22ba6 100644 --- a/tests/integration/targets/lookup_cartesian/tasks/main.yml +++ b/tests/integration/targets/lookup_cartesian/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test cartesian lookup debug: var=item register: product diff --git a/tests/integration/targets/lookup_flattened/tasks/main.yml b/tests/integration/targets/lookup_flattened/tasks/main.yml index 7d69c6dfe4..37af1327bf 100644 --- a/tests/integration/targets/lookup_flattened/tasks/main.yml +++ b/tests/integration/targets/lookup_flattened/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: test with_flattened set_fact: '{{ item }}=flattened' with_community.general.flattened: diff --git a/tests/integration/targets/lookup_passwordstore/tasks/main.yml b/tests/integration/targets/lookup_passwordstore/tasks/main.yml index 882b4a35ae..c0b5eb5bdb 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/main.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - include_tasks: package.yml - include_tasks: tests.yml diff --git a/tests/integration/targets/lvg/tasks/main.yml b/tests/integration/targets/lvg/tasks/main.yml index c9b92d00f8..e14c48c3fd 100644 --- a/tests/integration/targets/lvg/tasks/main.yml +++ b/tests/integration/targets/lvg/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install required packages (Linux) package: name: lvm2 diff --git a/tests/integration/targets/mail/tasks/main.yml b/tests/integration/targets/mail/tasks/main.yml index 11c810da30..a79d9e9162 100644 --- a/tests/integration/targets/mail/tasks/main.yml +++ b/tests/integration/targets/mail/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # TODO: Our current implementation does not handle SMTP authentication # NOTE: If the system does not support smtpd-tls (python 2.6 and older) we do basic tests diff --git a/tests/integration/targets/memset_dns_reload/tasks/main.yml b/tests/integration/targets/memset_dns_reload/tasks/main.yml index 20b00b54bb..153df95ba9 100644 --- a/tests/integration/targets/memset_dns_reload/tasks/main.yml +++ b/tests/integration/targets/memset_dns_reload/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: request reload with invalid API key memset_dns_reload: api_key: "wa9aerahhie0eekee9iaphoorovooyia" diff --git a/tests/integration/targets/memset_memstore_info/tasks/main.yml b/tests/integration/targets/memset_memstore_info/tasks/main.yml index 6cc728189b..7dc7f7c698 100644 --- a/tests/integration/targets/memset_memstore_info/tasks/main.yml +++ b/tests/integration/targets/memset_memstore_info/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: query API with invalid API key memset_memstore_info: api_key: 'wa9aerahhie0eekee9iaphoorovooyia' diff --git a/tests/integration/targets/memset_server_info/tasks/main.yml b/tests/integration/targets/memset_server_info/tasks/main.yml index 1a8c776e99..79066fac7d 100644 --- a/tests/integration/targets/memset_server_info/tasks/main.yml +++ b/tests/integration/targets/memset_server_info/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: query API with invalid API key memset_server_info: api_key: 'wa9aerahhie0eekee9iaphoorovooyia' diff --git a/tests/integration/targets/memset_zone/tasks/main.yml b/tests/integration/targets/memset_zone/tasks/main.yml index abc61dd701..091bab8232 100644 --- a/tests/integration/targets/memset_zone/tasks/main.yml +++ b/tests/integration/targets/memset_zone/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: create random string set_fact: zone_name: "{{ 65535 | random | string }}.ansible.example.com" diff --git a/tests/integration/targets/memset_zone_domain/tasks/main.yml b/tests/integration/targets/memset_zone_domain/tasks/main.yml index 7edb809296..e92ffcdcf5 100644 --- a/tests/integration/targets/memset_zone_domain/tasks/main.yml +++ b/tests/integration/targets/memset_zone_domain/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: create domain with invalid API key memset_zone_domain: api_key: "wa9aerahhie0eekee9iaphoorovooyia" diff --git a/tests/integration/targets/memset_zone_record/tasks/main.yml b/tests/integration/targets/memset_zone_record/tasks/main.yml index d8b245a148..c1bdd6873b 100644 --- a/tests/integration/targets/memset_zone_record/tasks/main.yml +++ b/tests/integration/targets/memset_zone_record/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: create record with incorrect API key memset_zone_record: api_key: "wa9aerahhie0eekee9iaphoorovooyia" diff --git a/tests/integration/targets/monit/tasks/main.yml b/tests/integration/targets/monit/tasks/main.yml index 7b10cbf190..2ad2a1ba39 100644 --- a/tests/integration/targets/monit/tasks/main.yml +++ b/tests/integration/targets/monit/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - name: Install EPEL repository (RHEL only) include_role: diff --git a/tests/integration/targets/mqtt/tasks/main.yml b/tests/integration/targets/mqtt/tasks/main.yml index ddd37c11e1..6403b20181 100644 --- a/tests/integration/targets/mqtt/tasks/main.yml +++ b/tests/integration/targets/mqtt/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - include: ubuntu.yml when: - ansible_distribution == 'Ubuntu' diff --git a/tests/integration/targets/mssql_script/tasks/main.yml b/tests/integration/targets/mssql_script/tasks/main.yml index bbe40025ea..2ecfd51c15 100644 --- a/tests/integration/targets/mssql_script/tasks/main.yml +++ b/tests/integration/targets/mssql_script/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # TODO: Find out how to setup mssql server for tests # For the moment you have to run the tests locally # docker run --name mssql-test -e "ACCEPT_EULA=Y" -e 'SA_PASSWORD={{ mssql_login_password }}' -p "{ mssql_port }"0:"{ mssql_port }" -d mcr.microsoft.com/mssql/server:2019-latest diff --git a/tests/integration/targets/odbc/tasks/main.yml b/tests/integration/targets/odbc/tasks/main.yml index c28a6e5705..cdc925df69 100644 --- a/tests/integration/targets/odbc/tasks/main.yml +++ b/tests/integration/targets/odbc/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - when: - ansible_os_family != 'Archlinux' # TODO install driver from AUR: https://aur.archlinux.org/packages/psqlodbc block: diff --git a/tests/integration/targets/one_host/tasks/main.yml b/tests/integration/targets/one_host/tasks/main.yml index 7d38c2a890..ffd5ac04ca 100644 --- a/tests/integration/targets/one_host/tasks/main.yml +++ b/tests/integration/targets/one_host/tasks/main.yml @@ -1,10 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # test code for the one_host module - +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ENVIRONENT PREPARACTION diff --git a/tests/integration/targets/one_template/tasks/main.yml b/tests/integration/targets/one_template/tasks/main.yml index fb60e5a98c..58bca9c6c5 100644 --- a/tests/integration/targets/one_template/tasks/main.yml +++ b/tests/integration/targets/one_template/tasks/main.yml @@ -1,10 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # test code for the one_template module - +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ENVIRONMENT PREPARATION diff --git a/tests/integration/targets/pacman/tasks/main.yml b/tests/integration/targets/pacman/tasks/main.yml index cabf9b7c40..95f4374b75 100644 --- a/tests/integration/targets/pacman/tasks/main.yml +++ b/tests/integration/targets/pacman/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - when: ansible_os_family == 'Archlinux' block: # Add more tests here by including more task files: diff --git a/tests/integration/targets/python_requirements_info/tasks/main.yml b/tests/integration/targets/python_requirements_info/tasks/main.yml index 035306cdee..24a7d1366a 100644 --- a/tests/integration/targets/python_requirements_info/tasks/main.yml +++ b/tests/integration/targets/python_requirements_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: run python_requirements_info module python_requirements_info: register: basic_info diff --git a/tests/integration/targets/read_csv/tasks/main.yml b/tests/integration/targets/read_csv/tasks/main.yml index e1379b1ccd..325a102c21 100644 --- a/tests/integration/targets/read_csv/tasks/main.yml +++ b/tests/integration/targets/read_csv/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Create basic CSV file - name: Create unique CSV file copy: diff --git a/tests/integration/targets/rundeck/tasks/main.yml b/tests/integration/targets/rundeck/tasks/main.yml index e9bb2beb8d..0c7e5bd09d 100644 --- a/tests/integration/targets/rundeck/tasks/main.yml +++ b/tests/integration/targets/rundeck/tasks/main.yml @@ -1,8 +1,12 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Generate a Rundeck API Token ansible.builtin.command: java -jar {{ rdeck_base }}/rundeck-cli.jar tokens create -u admin -d 24h -r admin diff --git a/tests/integration/targets/scaleway_compute/tasks/main.yml b/tests/integration/targets/scaleway_compute/tasks/main.yml index 8945a41cc1..eca689b402 100644 --- a/tests/integration/targets/scaleway_compute/tasks/main.yml +++ b/tests/integration/targets/scaleway_compute/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - include_tasks: state.yml - include_tasks: ip.yml - include_tasks: security_group.yml diff --git a/tests/integration/targets/scaleway_database_backup/tasks/main.yml b/tests/integration/targets/scaleway_database_backup/tasks/main.yml index 11d06f8fff..b0af65c0ae 100644 --- a/tests/integration/targets/scaleway_database_backup/tasks/main.yml +++ b/tests/integration/targets/scaleway_database_backup/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a backup (Check) check_mode: yes scaleway_database_backup: diff --git a/tests/integration/targets/scaleway_image_info/tasks/main.yml b/tests/integration/targets/scaleway_image_info/tasks/main.yml index 20513771c3..2cdf34fdd4 100644 --- a/tests/integration/targets/scaleway_image_info/tasks/main.yml +++ b/tests/integration/targets/scaleway_image_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get image informations and register it in a variable scaleway_image_info: region: par1 diff --git a/tests/integration/targets/scaleway_ip/tasks/main.yml b/tests/integration/targets/scaleway_ip/tasks/main.yml index dcb4fae754..fe0f578fa8 100644 --- a/tests/integration/targets/scaleway_ip/tasks/main.yml +++ b/tests/integration/targets/scaleway_ip/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create IP (Check) check_mode: yes scaleway_ip: diff --git a/tests/integration/targets/scaleway_ip_info/tasks/main.yml b/tests/integration/targets/scaleway_ip_info/tasks/main.yml index 519189794a..b560b56586 100644 --- a/tests/integration/targets/scaleway_ip_info/tasks/main.yml +++ b/tests/integration/targets/scaleway_ip_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get ip informations and register it in a variable scaleway_ip_info: region: par1 diff --git a/tests/integration/targets/scaleway_lb/tasks/main.yml b/tests/integration/targets/scaleway_lb/tasks/main.yml index 7da0bcbb71..05237e1a78 100644 --- a/tests/integration/targets/scaleway_lb/tasks/main.yml +++ b/tests/integration/targets/scaleway_lb/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a load-balancer (Check) check_mode: yes scaleway_lb: diff --git a/tests/integration/targets/scaleway_organization_info/tasks/main.yml b/tests/integration/targets/scaleway_organization_info/tasks/main.yml index 3998360953..7326ca2266 100644 --- a/tests/integration/targets/scaleway_organization_info/tasks/main.yml +++ b/tests/integration/targets/scaleway_organization_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get organization informations and register it in a variable scaleway_organization_info: register: organizations diff --git a/tests/integration/targets/scaleway_security_group/tasks/main.yml b/tests/integration/targets/scaleway_security_group/tasks/main.yml index f3c25c5728..362166e291 100644 --- a/tests/integration/targets/scaleway_security_group/tasks/main.yml +++ b/tests/integration/targets/scaleway_security_group/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create security group check check_mode: yes scaleway_security_group: diff --git a/tests/integration/targets/scaleway_security_group_info/tasks/main.yml b/tests/integration/targets/scaleway_security_group_info/tasks/main.yml index 1c0c0afcd9..8029a1e9aa 100644 --- a/tests/integration/targets/scaleway_security_group_info/tasks/main.yml +++ b/tests/integration/targets/scaleway_security_group_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get security group informations and register it in a variable scaleway_security_group_info: region: par1 diff --git a/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml b/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml index fb0f535346..3839421955 100644 --- a/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml +++ b/tests/integration/targets/scaleway_security_group_rule/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a scaleway security_group scaleway_security_group: state: present diff --git a/tests/integration/targets/scaleway_server_info/tasks/main.yml b/tests/integration/targets/scaleway_server_info/tasks/main.yml index a85a221f11..7274e8a85b 100644 --- a/tests/integration/targets/scaleway_server_info/tasks/main.yml +++ b/tests/integration/targets/scaleway_server_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get server informations and register it in a variable scaleway_server_info: region: par1 diff --git a/tests/integration/targets/scaleway_snapshot_info/tasks/main.yml b/tests/integration/targets/scaleway_snapshot_info/tasks/main.yml index 39807698f1..44f15d5156 100644 --- a/tests/integration/targets/scaleway_snapshot_info/tasks/main.yml +++ b/tests/integration/targets/scaleway_snapshot_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get snapshot informations and register it in a variable scaleway_snapshot_info: region: par1 diff --git a/tests/integration/targets/scaleway_sshkey/tasks/main.yml b/tests/integration/targets/scaleway_sshkey/tasks/main.yml index b951fbad18..2871086251 100644 --- a/tests/integration/targets/scaleway_sshkey/tasks/main.yml +++ b/tests/integration/targets/scaleway_sshkey/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - scaleway_sshkey: ssh_pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDf29yyommeGyKSIgSmX0ISVXP+3x6RUY4JDGLoAMFh2efkfDaRVdsvkvnFuUywgP2RewrjTyLE8w0NpCBHVS5Fm1BAn3yvxOUtTMxTbsQcw6HQ8swJ02+1tewJYjHPwc4GrBqiDo3Nmlq354Us0zBOJg/bBzuEnVD5eJ3GO3gKaCSUYTVrYwO0U4eJE0D9OJeUP9J48kl4ULbCub976+mTHdBvlzRw0Tzfl2kxgdDwlks0l2NefY/uiTdz2oMt092bAY3wZHxjto/DXoChxvaf5s2k8Zb+J7CjimUYnzPlH+zA9F6ROjP5AUu6ZWPd0jOIBl1nDWWb2j/qfNLYM43l sieben@sieben-macbook.local" state: present diff --git a/tests/integration/targets/scaleway_user_data/tasks/main.yml b/tests/integration/targets/scaleway_user_data/tasks/main.yml index df744709d9..b1cd856ec8 100644 --- a/tests/integration/targets/scaleway_user_data/tasks/main.yml +++ b/tests/integration/targets/scaleway_user_data/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Create a server scaleway_compute: name: foobar diff --git a/tests/integration/targets/scaleway_volume/tasks/main.yml b/tests/integration/targets/scaleway_volume/tasks/main.yml index 3f983db9d3..2828a8502c 100644 --- a/tests/integration/targets/scaleway_volume/tasks/main.yml +++ b/tests/integration/targets/scaleway_volume/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Make sure volume is not there before tests scaleway_volume: name: ansible-test-volume diff --git a/tests/integration/targets/scaleway_volume_info/tasks/main.yml b/tests/integration/targets/scaleway_volume_info/tasks/main.yml index ce3f13cb93..45995a54c4 100644 --- a/tests/integration/targets/scaleway_volume_info/tasks/main.yml +++ b/tests/integration/targets/scaleway_volume_info/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Get volume informations and register it in a variable scaleway_volume_info: region: par1 diff --git a/tests/integration/targets/sensu_client/tasks/main.yml b/tests/integration/targets/sensu_client/tasks/main.yml index 0203ee0cf9..61e49cda02 100644 --- a/tests/integration/targets/sensu_client/tasks/main.yml +++ b/tests/integration/targets/sensu_client/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Creating a client if the directory doesn't exist should work sensu_client: subscriptions: diff --git a/tests/integration/targets/sensu_handler/tasks/main.yml b/tests/integration/targets/sensu_handler/tasks/main.yml index 795cdfcb6b..606be6b789 100644 --- a/tests/integration/targets/sensu_handler/tasks/main.yml +++ b/tests/integration/targets/sensu_handler/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Creating a handler if the directory doesn't exist should work sensu_handler: name: "handler" diff --git a/tests/integration/targets/setup_cron/tasks/main.yml b/tests/integration/targets/setup_cron/tasks/main.yml index 5a83e025be..cca7071a3a 100644 --- a/tests/integration/targets/setup_cron/tasks/main.yml +++ b/tests/integration/targets/setup_cron/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - when: - not (ansible_os_family == 'Alpine' and ansible_distribution_version is version('3.15', '<')) # TODO block: diff --git a/tests/integration/targets/setup_epel/tasks/main.yml b/tests/integration/targets/setup_epel/tasks/main.yml index b848ac2144..186d515f41 100644 --- a/tests/integration/targets/setup_epel/tasks/main.yml +++ b/tests/integration/targets/setup_epel/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install EPEL yum: name: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm diff --git a/tests/integration/targets/setup_flatpak_remote/tasks/main.yaml b/tests/integration/targets/setup_flatpak_remote/tasks/main.yaml index 65581abed7..037784738a 100644 --- a/tests/integration/targets/setup_flatpak_remote/tasks/main.yaml +++ b/tests/integration/targets/setup_flatpak_remote/tasks/main.yaml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Set up dummy flatpak repository remote when: | ansible_distribution == 'Fedora' or diff --git a/tests/integration/targets/setup_influxdb/tasks/main.yml b/tests/integration/targets/setup_influxdb/tasks/main.yml index 6b2a59c52d..939a49da73 100644 --- a/tests/integration/targets/setup_influxdb/tasks/main.yml +++ b/tests/integration/targets/setup_influxdb/tasks/main.yml @@ -4,6 +4,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - include: setup.yml when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty' diff --git a/tests/integration/targets/setup_java_keytool/tasks/main.yml b/tests/integration/targets/setup_java_keytool/tasks/main.yml index be84495266..2ab57d59d6 100644 --- a/tests/integration/targets/setup_java_keytool/tasks/main.yml +++ b/tests/integration/targets/setup_java_keytool/tasks/main.yml @@ -3,6 +3,11 @@ # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - set_fact: has_java_keytool: >- {{ diff --git a/tests/integration/targets/setup_mosquitto/tasks/main.yml b/tests/integration/targets/setup_mosquitto/tasks/main.yml index 6573ca4684..836d94529e 100644 --- a/tests/integration/targets/setup_mosquitto/tasks/main.yml +++ b/tests/integration/targets/setup_mosquitto/tasks/main.yml @@ -4,5 +4,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - include: ubuntu.yml when: ansible_distribution == 'Ubuntu' diff --git a/tests/integration/targets/setup_openldap/tasks/main.yml b/tests/integration/targets/setup_openldap/tasks/main.yml index dcf2cc7834..67f6d5c9c2 100644 --- a/tests/integration/targets/setup_openldap/tasks/main.yml +++ b/tests/integration/targets/setup_openldap/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup OpenLDAP on Debian or Ubuntu block: - name: Include OS-specific variables diff --git a/tests/integration/targets/setup_openssl/tasks/main.yml b/tests/integration/targets/setup_openssl/tasks/main.yml index a449926eaf..2ce926ba54 100644 --- a/tests/integration/targets/setup_openssl/tasks/main.yml +++ b/tests/integration/targets/setup_openssl/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Include OS-specific variables include_vars: '{{ lookup("first_found", search) }}' vars: diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml index 9e028ffeed..a42b4b4a03 100644 --- a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - set_fact: pkg_mgr: community.general.pkgng ansible_pkg_mgr: community.general.pkgng diff --git a/tests/integration/targets/setup_postgresql_db/tasks/main.yml b/tests/integration/targets/setup_postgresql_db/tasks/main.yml index 4812cf2ab0..7c9baa4074 100644 --- a/tests/integration/targets/setup_postgresql_db/tasks/main.yml +++ b/tests/integration/targets/setup_postgresql_db/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Exit when Suse because it causes CI problems - meta: end_play when: ansible_os_family == 'Suse' diff --git a/tests/integration/targets/setup_remote_constraints/tasks/main.yml b/tests/integration/targets/setup_remote_constraints/tasks/main.yml index d4f8148c82..a1ac1aeadc 100644 --- a/tests/integration/targets/setup_remote_constraints/tasks/main.yml +++ b/tests/integration/targets/setup_remote_constraints/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: record constraints.txt path on remote host set_fact: remote_constraints: "{{ remote_tmp_dir }}/constraints.txt" diff --git a/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml b/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml index 93d786f0f3..6632cc8489 100644 --- a/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml +++ b/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: make sure we have the ansible_os_family and ansible_distribution_version facts setup: gather_subset: distribution diff --git a/tests/integration/targets/setup_rundeck/tasks/main.yml b/tests/integration/targets/setup_rundeck/tasks/main.yml index 41c9f1c142..ea8b35f65e 100644 --- a/tests/integration/targets/setup_rundeck/tasks/main.yml +++ b/tests/integration/targets/setup_rundeck/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Skip unsupported platforms meta: end_play when: ansible_distribution not in ['CentOS', 'Fedora', 'Debian', 'Ubuntu'] diff --git a/tests/integration/targets/setup_snap/tasks/main.yml b/tests/integration/targets/setup_snap/tasks/main.yml index 6851a204f3..8f3744a70e 100644 --- a/tests/integration/targets/setup_snap/tasks/main.yml +++ b/tests/integration/targets/setup_snap/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Print information on which we distinguish debug: msg: "Distribution '{{ ansible_facts.distribution }}', version '{{ ansible_facts.distribution_version }}', OS family '{{ ansible_facts.os_family }}'" diff --git a/tests/integration/targets/setup_tls/tasks/main.yml b/tests/integration/targets/setup_tls/tasks/main.yml index bbdc30ccf9..ea4b9ecaa1 100644 --- a/tests/integration/targets/setup_tls/tasks/main.yml +++ b/tests/integration/targets/setup_tls/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Generated certificate with: https://github.com/michaelklishin/tls-gen # ~/tls-gen/basic# make PASSWORD=bunnies CN=ansible.tls.tests # verify with: make info diff --git a/tests/integration/targets/setup_wildfly_server/tasks/main.yml b/tests/integration/targets/setup_wildfly_server/tasks/main.yml index beb58f8d14..e2bda5736e 100644 --- a/tests/integration/targets/setup_wildfly_server/tasks/main.yml +++ b/tests/integration/targets/setup_wildfly_server/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Skip unsupported platforms meta: end_play when: (ansible_distribution != 'CentOS') or diff --git a/tests/integration/targets/shutdown/tasks/main.yml b/tests/integration/targets/shutdown/tasks/main.yml index 0f256c08bb..3f765ff059 100644 --- a/tests/integration/targets/shutdown/tasks/main.yml +++ b/tests/integration/targets/shutdown/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install systemd-sysv on Ubuntu 18 and Debian apt: name: systemd-sysv diff --git a/tests/integration/targets/snap/tasks/main.yml b/tests/integration/targets/snap/tasks/main.yml index 502a82d914..367376202a 100644 --- a/tests/integration/targets/snap/tasks/main.yml +++ b/tests/integration/targets/snap/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - name: Make sure package is not installed (hello-world) community.general.snap: diff --git a/tests/integration/targets/snap_alias/tasks/main.yml b/tests/integration/targets/snap_alias/tasks/main.yml index 81b7c3618a..1934eeb9f6 100644 --- a/tests/integration/targets/snap_alias/tasks/main.yml +++ b/tests/integration/targets/snap_alias/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Test include_tasks: test.yml when: has_snap diff --git a/tests/integration/targets/supervisorctl/tasks/main.yml b/tests/integration/targets/supervisorctl/tasks/main.yml index 0c3dd31b76..6f8c7968c0 100644 --- a/tests/integration/targets/supervisorctl/tasks/main.yml +++ b/tests/integration/targets/supervisorctl/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - tempfile: state: directory diff --git a/tests/integration/targets/timezone/tasks/main.yml b/tests/integration/targets/timezone/tasks/main.yml index 3a25d74eac..3644eeafad 100644 --- a/tests/integration/targets/timezone/tasks/main.yml +++ b/tests/integration/targets/timezone/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Because hwclock usually isn't available inside Docker containers in Shippable # these tasks will detect if hwclock works and only run hwclock tests if it is # supported. That is why it is recommended to run these tests locally with diff --git a/tests/integration/targets/ufw/tasks/main.yml b/tests/integration/targets/ufw/tasks/main.yml index ab9b109a18..c870f85d47 100644 --- a/tests/integration/targets/ufw/tasks/main.yml +++ b/tests/integration/targets/ufw/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Make sure ufw is installed - name: Install EPEL repository (RHEL only) include_role: diff --git a/tests/integration/targets/wakeonlan/tasks/main.yml b/tests/integration/targets/wakeonlan/tasks/main.yml index 166bef9992..03df57e989 100644 --- a/tests/integration/targets/wakeonlan/tasks/main.yml +++ b/tests/integration/targets/wakeonlan/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66 wakeonlan: mac: 00:00:5E:00:53:66 diff --git a/tests/integration/targets/xattr/tasks/main.yml b/tests/integration/targets/xattr/tasks/main.yml index 989d19ea0c..b5293db770 100644 --- a/tests/integration/targets/xattr/tasks/main.yml +++ b/tests/integration/targets/xattr/tasks/main.yml @@ -1,8 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Setup include: setup.yml diff --git a/tests/integration/targets/xfs_quota/tasks/main.yml b/tests/integration/targets/xfs_quota/tasks/main.yml index 0256d5cd44..e98b1452ab 100644 --- a/tests/integration/targets/xfs_quota/tasks/main.yml +++ b/tests/integration/targets/xfs_quota/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - block: - name: Create test user user: diff --git a/tests/integration/targets/xml/tasks/main.yml b/tests/integration/targets/xml/tasks/main.yml index 928c46e0f3..fe46b3ae5c 100644 --- a/tests/integration/targets/xml/tasks/main.yml +++ b/tests/integration/targets/xml/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Install lxml (FreeBSD) package: name: 'py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-lxml' diff --git a/tests/integration/targets/yum_versionlock/tasks/main.yml b/tests/integration/targets/yum_versionlock/tasks/main.yml index 2e551b48ca..d1d6726247 100644 --- a/tests/integration/targets/yum_versionlock/tasks/main.yml +++ b/tests/integration/targets/yum_versionlock/tasks/main.yml @@ -4,6 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + - name: Update procps-ng temporary until issue (#2539) is fixed yum: name: procps-ng From 496bf27b5c896c2b8f055e04692e1c5db2288584 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 5 Aug 2022 22:12:10 +0200 Subject: [PATCH 0155/2104] Fix copyright lines (make sure 'Copyright' is there). (#5083) --- changelogs/fragments/licenses.yml | 2 +- plugins/cache/memcached.py | 4 ++-- plugins/cache/pickle.py | 4 ++-- plugins/cache/redis.py | 4 ++-- plugins/cache/yaml.py | 4 ++-- plugins/callback/cgroup_memory_recap.py | 2 +- plugins/callback/context_demo.py | 4 ++-- plugins/callback/counter_enabled.py | 2 +- plugins/callback/dense.py | 4 ++-- plugins/callback/elastic.py | 2 +- plugins/callback/hipchat.py | 4 ++-- plugins/callback/log_plays.py | 4 ++-- plugins/callback/logdna.py | 2 +- plugins/callback/logentries.py | 4 ++-- plugins/callback/logstash.py | 4 ++-- plugins/callback/nrdp.py | 2 +- plugins/callback/null.py | 2 +- plugins/callback/opentelemetry.py | 2 +- plugins/callback/say.py | 4 ++-- plugins/callback/selective.py | 4 ++-- plugins/callback/slack.py | 4 ++-- plugins/callback/syslog_json.py | 2 +- plugins/callback/yaml.py | 2 +- plugins/connection/lxd.py | 4 ++-- plugins/connection/saltstack.py | 4 ++-- plugins/lookup/bitwarden.py | 2 +- plugins/lookup/cartesian.py | 4 ++-- plugins/lookup/chef_databag.py | 4 ++-- plugins/lookup/collection_version.py | 2 +- plugins/lookup/consul_kv.py | 4 ++-- plugins/lookup/credstash.py | 4 ++-- plugins/lookup/cyberarkpassword.py | 4 ++-- plugins/lookup/dependent.py | 4 ++-- plugins/lookup/dig.py | 4 ++-- plugins/lookup/dnstxt.py | 4 ++-- plugins/lookup/etcd3.py | 2 +- plugins/lookup/filetree.py | 4 ++-- plugins/lookup/flattened.py | 4 ++-- plugins/lookup/hiera.py | 4 ++-- plugins/lookup/keyring.py | 4 ++-- plugins/lookup/lastpass.py | 4 ++-- plugins/lookup/lmdb_kv.py | 4 ++-- plugins/lookup/manifold.py | 4 ++-- plugins/lookup/passwordstore.py | 4 ++-- plugins/lookup/redis.py | 4 ++-- plugins/lookup/shelvefile.py | 4 ++-- plugins/module_utils/cloud.py | 3 +-- plugins/module_utils/cmd_runner.py | 2 +- plugins/module_utils/gconftool2.py | 2 +- plugins/module_utils/lxd.py | 9 +-------- plugins/module_utils/oneandone.py | 6 ------ plugins/module_utils/source_control/bitbucket.py | 1 - plugins/module_utils/storage/emc/emc_vnx.py | 9 +-------- plugins/module_utils/xfconf.py | 2 +- plugins/modules/cloud/lxd/lxd_project.py | 1 - plugins/modules/cloud/misc/cloud_init_data_facts.py | 3 +-- plugins/modules/cloud/misc/terraform.py | 3 +-- plugins/modules/cloud/online/online_server_info.py | 1 - plugins/modules/cloud/online/online_user_info.py | 1 - plugins/modules/cloud/packet/packet_device.py | 7 +++---- plugins/modules/cloud/rackspace/rax_files.py | 3 +-- plugins/modules/cloud/rackspace/rax_files_objects.py | 3 +-- .../modules/cloud/scaleway/scaleway_image_info.py | 2 +- plugins/modules/cloud/scaleway/scaleway_ip_info.py | 2 +- .../cloud/scaleway/scaleway_organization_info.py | 2 +- .../cloud/scaleway/scaleway_security_group_info.py | 2 +- .../modules/cloud/scaleway/scaleway_server_info.py | 2 +- .../modules/cloud/scaleway/scaleway_snapshot_info.py | 2 +- .../modules/cloud/scaleway/scaleway_volume_info.py | 2 +- plugins/modules/cloud/smartos/imgadm.py | 2 +- plugins/modules/cloud/smartos/smartos_image_info.py | 2 +- plugins/modules/cloud/smartos/vmadm.py | 2 +- plugins/modules/clustering/consul/consul.py | 2 +- plugins/modules/clustering/consul/consul_acl.py | 2 +- plugins/modules/clustering/consul/consul_kv.py | 4 ++-- plugins/modules/clustering/etcd3.py | 2 +- plugins/modules/clustering/nomad/nomad_job.py | 2 +- plugins/modules/clustering/nomad/nomad_job_info.py | 2 +- .../modules/database/misc/elasticsearch_plugin.py | 4 ++-- plugins/modules/database/misc/riak.py | 2 +- plugins/modules/database/mssql/mssql_db.py | 2 +- plugins/modules/identity/onepassword_info.py | 6 +++--- plugins/modules/monitoring/circonus_annotation.py | 2 +- plugins/modules/monitoring/librato_annotation.py | 2 +- plugins/modules/monitoring/logentries.py | 2 +- plugins/modules/monitoring/logstash_plugin.py | 2 +- plugins/modules/monitoring/monit.py | 2 +- plugins/modules/monitoring/sensu/sensu_check.py | 2 +- plugins/modules/monitoring/sensu/sensu_client.py | 2 +- plugins/modules/monitoring/sensu/sensu_handler.py | 2 +- plugins/modules/monitoring/sensu/sensu_silence.py | 2 +- .../modules/monitoring/sensu/sensu_subscription.py | 2 +- plugins/modules/monitoring/spectrum_device.py | 2 +- plugins/modules/monitoring/spectrum_model_attrs.py | 2 +- plugins/modules/monitoring/statusio_maintenance.py | 2 +- plugins/modules/net_tools/netcup_dns.py | 2 +- plugins/modules/net_tools/nsupdate.py | 6 +++--- plugins/modules/net_tools/omapi_host.py | 2 +- plugins/modules/notification/catapult.py | 2 +- plugins/modules/notification/irc.py | 2 +- plugins/modules/notification/jabber.py | 2 +- plugins/modules/notification/matrix.py | 2 +- plugins/modules/notification/mattermost.py | 10 +++++----- plugins/modules/notification/mqtt.py | 2 +- plugins/modules/notification/nexmo.py | 2 +- plugins/modules/notification/rocketchat.py | 6 +++--- plugins/modules/notification/say.py | 2 +- plugins/modules/notification/slack.py | 12 ++++++------ plugins/modules/notification/telegram.py | 2 +- plugins/modules/notification/twilio.py | 2 +- .../packaging/language/ansible_galaxy_install.py | 2 +- plugins/modules/packaging/language/bower.py | 2 +- plugins/modules/packaging/language/bundler.py | 2 +- plugins/modules/packaging/language/composer.py | 2 +- plugins/modules/packaging/language/cpanm.py | 4 ++-- plugins/modules/packaging/language/easy_install.py | 2 +- plugins/modules/packaging/language/gem.py | 2 +- plugins/modules/packaging/language/pear.py | 6 +++--- .../modules/packaging/language/pip_package_info.py | 2 +- plugins/modules/packaging/language/pipx.py | 2 +- plugins/modules/packaging/os/apk.py | 2 +- plugins/modules/packaging/os/homebrew.py | 6 +++--- plugins/modules/packaging/os/layman.py | 2 +- plugins/modules/packaging/os/macports.py | 2 +- plugins/modules/packaging/os/openbsd_pkg.py | 2 +- plugins/modules/packaging/os/opkg.py | 2 +- plugins/modules/packaging/os/pkgng.py | 2 +- plugins/modules/packaging/os/portage.py | 4 ++-- plugins/modules/packaging/os/portinstall.py | 2 +- plugins/modules/packaging/os/pulp_repo.py | 2 +- plugins/modules/packaging/os/redhat_subscription.py | 2 +- plugins/modules/packaging/os/rhsm_release.py | 2 +- plugins/modules/packaging/os/slackpkg.py | 2 +- plugins/modules/packaging/os/sorcery.py | 2 +- plugins/modules/packaging/os/svr4pkg.py | 2 +- plugins/modules/packaging/os/swdepot.py | 2 +- plugins/modules/packaging/os/swupd.py | 2 +- plugins/modules/packaging/os/zypper.py | 6 +++--- plugins/modules/packaging/os/zypper_repository.py | 4 ++-- plugins/modules/remote_management/hpilo/hponcfg.py | 2 +- plugins/modules/remote_management/imc/imc_rest.py | 2 +- .../remote_management/manageiq/manageiq_policies.py | 4 ++-- .../remote_management/manageiq/manageiq_provider.py | 4 ++-- .../remote_management/manageiq/manageiq_tags.py | 4 ++-- plugins/modules/remote_management/wakeonlan.py | 2 +- plugins/modules/source_control/git_config.py | 4 ++-- plugins/modules/storage/zfs/zfs_facts.py | 2 +- plugins/modules/storage/zfs/zpool_facts.py | 2 +- plugins/modules/system/gconftool2_info.py | 2 +- plugins/modules/system/homectl.py | 2 +- plugins/modules/system/mksysb.py | 4 ++-- plugins/modules/system/nosh.py | 2 +- plugins/modules/system/ohai.py | 2 +- plugins/modules/system/openwrt_init.py | 2 +- plugins/modules/system/sysrc.py | 2 +- plugins/modules/system/xfconf.py | 2 +- plugins/modules/system/xfconf_info.py | 2 +- .../modules/web_infrastructure/apache2_mod_proxy.py | 2 +- 158 files changed, 219 insertions(+), 249 deletions(-) diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml index ad4a608a79..8c7c8345a6 100644 --- a/changelogs/fragments/licenses.yml +++ b/changelogs/fragments/licenses.yml @@ -1,3 +1,3 @@ minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5080)." + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083)." - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/plugins/cache/memcached.py b/plugins/cache/memcached.py index 68d228639c..77f1717e45 100644 --- a/plugins/cache/memcached.py +++ b/plugins/cache/memcached.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2014, Brian Coca, Josh Drake, et al -# (c) 2017 Ansible Project +# Copyright (c) 2014, Brian Coca, Josh Drake, et al +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/cache/pickle.py b/plugins/cache/pickle.py index 6624067cf3..10295bb5d2 100644 --- a/plugins/cache/pickle.py +++ b/plugins/cache/pickle.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2017, Brian Coca -# (c) 2017 Ansible Project +# Copyright (c) 2017, Brian Coca +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/cache/redis.py b/plugins/cache/redis.py index ea7bf9e1dd..121f9b22f4 100644 --- a/plugins/cache/redis.py +++ b/plugins/cache/redis.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2014, Brian Coca, Josh Drake, et al -# (c) 2017 Ansible Project +# Copyright (c) 2014, Brian Coca, Josh Drake, et al +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/cache/yaml.py b/plugins/cache/yaml.py index 3a9217afcf..08620816b6 100644 --- a/plugins/cache/yaml.py +++ b/plugins/cache/yaml.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2017, Brian Coca -# (c) 2017 Ansible Project +# Copyright (c) 2017, Brian Coca +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/cgroup_memory_recap.py b/plugins/callback/cgroup_memory_recap.py index 643e2af9b7..a894336c8f 100644 --- a/plugins/callback/cgroup_memory_recap.py +++ b/plugins/callback/cgroup_memory_recap.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2018 Matt Martz +# Copyright (c) 2018 Matt Martz # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/context_demo.py b/plugins/callback/context_demo.py index df55efd54f..9c3c9c5afc 100644 --- a/plugins/callback/context_demo.py +++ b/plugins/callback/context_demo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (C) 2012, Michael DeHaan, -# (c) 2017 Ansible Project +# Copyright (C) 2012, Michael DeHaan, +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/counter_enabled.py b/plugins/callback/counter_enabled.py index 688da75195..e0e040c9d4 100644 --- a/plugins/callback/counter_enabled.py +++ b/plugins/callback/counter_enabled.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2018, Ivan Aragones Muniesa +# Copyright (c) 2018, Ivan Aragones Muniesa # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later ''' diff --git a/plugins/callback/dense.py b/plugins/callback/dense.py index 7c77fae1a5..37a9a16b21 100644 --- a/plugins/callback/dense.py +++ b/plugins/callback/dense.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2016, Dag Wieers -# (c) 2017 Ansible Project +# Copyright (c) 2016, Dag Wieers +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/elastic.py b/plugins/callback/elastic.py index ddbb87fa4d..37526c155d 100644 --- a/plugins/callback/elastic.py +++ b/plugins/callback/elastic.py @@ -1,4 +1,4 @@ -# (C) 2021, Victor Martinez +# Copyright (c) 2021, Victor Martinez # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/hipchat.py b/plugins/callback/hipchat.py index 2450a87976..dc70789dbe 100644 --- a/plugins/callback/hipchat.py +++ b/plugins/callback/hipchat.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (C) 2014, Matt Martz -# (c) 2017 Ansible Project +# Copyright (c) 2014, Matt Martz +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/log_plays.py b/plugins/callback/log_plays.py index b7344fad39..b1dc69364c 100644 --- a/plugins/callback/log_plays.py +++ b/plugins/callback/log_plays.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (C) 2012, Michael DeHaan, -# (c) 2017 Ansible Project +# Copyright (c) 2012, Michael DeHaan, +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/logdna.py b/plugins/callback/logdna.py index 5050ee1e4f..c84054c592 100644 --- a/plugins/callback/logdna.py +++ b/plugins/callback/logdna.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2018, Samir Musali +# Copyright (c) 2018, Samir Musali # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/logentries.py b/plugins/callback/logentries.py index 5aa45cb1ee..945757edd6 100644 --- a/plugins/callback/logentries.py +++ b/plugins/callback/logentries.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2015, Logentries.com, Jimmy Tang -# (c) 2017 Ansible Project +# Copyright (c) 2015, Logentries.com, Jimmy Tang +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/callback/logstash.py b/plugins/callback/logstash.py index ebd5b0413e..5d3c1e50b8 100644 --- a/plugins/callback/logstash.py +++ b/plugins/callback/logstash.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (C) 2020, Yevhen Khmelenko -# (C) 2017 Ansible Project +# Copyright (c) 2020, Yevhen Khmelenko +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/nrdp.py b/plugins/callback/nrdp.py index 14b70d4ed5..8295bf9759 100644 --- a/plugins/callback/nrdp.py +++ b/plugins/callback/nrdp.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2018 Remi Verchere +# Copyright (c) 2018 Remi Verchere # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/null.py b/plugins/callback/null.py index bddecbc4d9..01f5f6ca06 100644 --- a/plugins/callback/null.py +++ b/plugins/callback/null.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2017 Ansible Project +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/opentelemetry.py b/plugins/callback/opentelemetry.py index edcfb4bf4f..d9faa4d729 100644 --- a/plugins/callback/opentelemetry.py +++ b/plugins/callback/opentelemetry.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (C) 2021, Victor Martinez +# Copyright (c) 2021, Victor Martinez # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/say.py b/plugins/callback/say.py index 7c1038e74c..03d7060352 100644 --- a/plugins/callback/say.py +++ b/plugins/callback/say.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2012, Michael DeHaan, -# (c) 2017 Ansible Project +# Copyright (c) 2012, Michael DeHaan, +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/selective.py b/plugins/callback/selective.py index 8a9b4b51b9..78c28ec7a5 100644 --- a/plugins/callback/selective.py +++ b/plugins/callback/selective.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) Fastly, inc 2016 -# (c) 2017 Ansible Project +# Copyright (c) Fastly, inc 2016 +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/slack.py b/plugins/callback/slack.py index ba1d6b9f9b..46340ee44c 100644 --- a/plugins/callback/slack.py +++ b/plugins/callback/slack.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (C) 2014-2015, Matt Martz -# (C) 2017 Ansible Project +# Copyright (c) 2014-2015, Matt Martz +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/syslog_json.py b/plugins/callback/syslog_json.py index 6da70a0b88..7ca99a9edd 100644 --- a/plugins/callback/syslog_json.py +++ b/plugins/callback/syslog_json.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2017 Ansible Project +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/callback/yaml.py b/plugins/callback/yaml.py index 2f573efd97..81d59e2e70 100644 --- a/plugins/callback/yaml.py +++ b/plugins/callback/yaml.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2017 Ansible Project +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/connection/lxd.py b/plugins/connection/lxd.py index 49644ef540..affb87dfd0 100644 --- a/plugins/connection/lxd.py +++ b/plugins/connection/lxd.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2016 Matt Clay -# (c) 2017 Ansible Project +# Copyright (c) 2016 Matt Clay +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/connection/saltstack.py b/plugins/connection/saltstack.py index 13587457e7..1dbc7296c7 100644 --- a/plugins/connection/saltstack.py +++ b/plugins/connection/saltstack.py @@ -2,8 +2,8 @@ # Based on local.py (c) 2012, Michael DeHaan # Based on chroot.py (c) 2013, Maykel Moya # Based on func.py -# (c) 2014, Michael Scherer -# (c) 2017 Ansible Project +# Copyright (c) 2014, Michael Scherer +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/lookup/bitwarden.py b/plugins/lookup/bitwarden.py index e06d81f8fb..124c139c78 100644 --- a/plugins/lookup/bitwarden.py +++ b/plugins/lookup/bitwarden.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2022, Jonathan Lung +# Copyright (c) 2022, Jonathan Lung # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/cartesian.py b/plugins/lookup/cartesian.py index 9445e3d916..6d98c271ee 100644 --- a/plugins/lookup/cartesian.py +++ b/plugins/lookup/cartesian.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2013, Bradley Young -# (c) 2017 Ansible Project +# Copyright (c) 2013, Bradley Young +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/chef_databag.py b/plugins/lookup/chef_databag.py index ecae14cfbb..04ef7ee41d 100644 --- a/plugins/lookup/chef_databag.py +++ b/plugins/lookup/chef_databag.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2016, Josh Bradley -# (c) 2017 Ansible Project +# Copyright (c) 2016, Josh Bradley +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/collection_version.py b/plugins/lookup/collection_version.py index 15b33f78b0..4d25585b81 100644 --- a/plugins/lookup/collection_version.py +++ b/plugins/lookup/collection_version.py @@ -1,4 +1,4 @@ -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/lookup/consul_kv.py b/plugins/lookup/consul_kv.py index 1a2a321b23..794df197fc 100644 --- a/plugins/lookup/consul_kv.py +++ b/plugins/lookup/consul_kv.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2015, Steve Gargan -# (c) 2017 Ansible Project +# Copyright (c) 2015, Steve Gargan +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/credstash.py b/plugins/lookup/credstash.py index 774d9eabbc..a783f8ba08 100644 --- a/plugins/lookup/credstash.py +++ b/plugins/lookup/credstash.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2015, Ensighten -# (c) 2017 Ansible Project +# Copyright (c) 2015, Ensighten +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/cyberarkpassword.py b/plugins/lookup/cyberarkpassword.py index db503baef4..a0e36d3efe 100644 --- a/plugins/lookup/cyberarkpassword.py +++ b/plugins/lookup/cyberarkpassword.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2017, Edward Nunez -# (c) 2017 Ansible Project +# Copyright (c) 2017, Edward Nunez +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/dependent.py b/plugins/lookup/dependent.py index d9ab6ea330..0bd234c1b4 100644 --- a/plugins/lookup/dependent.py +++ b/plugins/lookup/dependent.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2015-2021, Felix Fontein -# (c) 2018 Ansible Project +# Copyright (c) 2015-2021, Felix Fontein +# Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index 08c297e7be..eb13415050 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2015, Jan-Piet Mens -# (c) 2017 Ansible Project +# Copyright (c) 2015, Jan-Piet Mens +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/dnstxt.py b/plugins/lookup/dnstxt.py index 97599cc183..7f4516ce5b 100644 --- a/plugins/lookup/dnstxt.py +++ b/plugins/lookup/dnstxt.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2012, Jan-Piet Mens -# (c) 2017 Ansible Project +# Copyright (c) 2012, Jan-Piet Mens +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/etcd3.py b/plugins/lookup/etcd3.py index f15dd9c94d..901d602174 100644 --- a/plugins/lookup/etcd3.py +++ b/plugins/lookup/etcd3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# (c) 2020, SCC France, Eric Belhomme +# Copyright (c) 2020, SCC France, Eric Belhomme # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/lookup/filetree.py b/plugins/lookup/filetree.py index d8f9fde78d..2979257640 100644 --- a/plugins/lookup/filetree.py +++ b/plugins/lookup/filetree.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2016 Dag Wieers -# (c) 2017 Ansible Project +# Copyright (c) 2016 Dag Wieers +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/flattened.py b/plugins/lookup/flattened.py index 38c3165434..0e802d369c 100644 --- a/plugins/lookup/flattened.py +++ b/plugins/lookup/flattened.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2013, Serge van Ginderachter -# (c) 2017 Ansible Project +# Copyright (c) 2013, Serge van Ginderachter +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/hiera.py b/plugins/lookup/hiera.py index 8aafe3bd82..d3aa8b99b4 100644 --- a/plugins/lookup/hiera.py +++ b/plugins/lookup/hiera.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2017, Juan Manuel Parrilla -# (c) 2012-17 Ansible Project +# Copyright (c) 2017, Juan Manuel Parrilla +# Copyright (c) 2012-17 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/keyring.py b/plugins/lookup/keyring.py index 2d90ba7602..56718c32e9 100644 --- a/plugins/lookup/keyring.py +++ b/plugins/lookup/keyring.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2016, Samuel Boucher -# (c) 2017 Ansible Project +# Copyright (c) 2016, Samuel Boucher +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/lookup/lastpass.py b/plugins/lookup/lastpass.py index 530be72ce0..8eb3090b76 100644 --- a/plugins/lookup/lastpass.py +++ b/plugins/lookup/lastpass.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2016, Andrew Zenk -# (c) 2017 Ansible Project +# Copyright (c) 2016, Andrew Zenk +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/lmdb_kv.py b/plugins/lookup/lmdb_kv.py index 0f5cce793e..569a49a5f0 100644 --- a/plugins/lookup/lmdb_kv.py +++ b/plugins/lookup/lmdb_kv.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2017-2018, Jan-Piet Mens -# (c) 2018 Ansible Project +# Copyright (c) 2017-2018, Jan-Piet Mens +# Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/manifold.py b/plugins/lookup/manifold.py index c4c242ba38..f83104d93b 100644 --- a/plugins/lookup/manifold.py +++ b/plugins/lookup/manifold.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2018, Arigato Machine Inc. -# (c) 2018, Ansible Project +# Copyright (c) 2018, Arigato Machine Inc. +# Copyright (c) 2018, Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index f5579e3c99..6330671f58 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2017, Patrick Deelman -# (c) 2017 Ansible Project +# Copyright (c) 2017, Patrick Deelman +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/redis.py b/plugins/lookup/redis.py index 57708a058c..490751a398 100644 --- a/plugins/lookup/redis.py +++ b/plugins/lookup/redis.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2012, Jan-Piet Mens -# (c) 2017 Ansible Project +# Copyright (c) 2012, Jan-Piet Mens +# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/shelvefile.py b/plugins/lookup/shelvefile.py index 5534742838..ee84a40027 100644 --- a/plugins/lookup/shelvefile.py +++ b/plugins/lookup/shelvefile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2015, Alejandro Guirao -# (c) 2012-17 Ansible Project +# Copyright (c) 2015, Alejandro Guirao +# Copyright (c) 2012-17 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/module_utils/cloud.py b/plugins/module_utils/cloud.py index 2e91252b7f..092fe16ada 100644 --- a/plugins/module_utils/cloud.py +++ b/plugins/module_utils/cloud.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # -# (c) 2016 Allen Sanabria, -# +# Copyright (c) 2016 Allen Sanabria, # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index 41449f09a6..141a6be9b2 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/module_utils/gconftool2.py b/plugins/module_utils/gconftool2.py index 5a2f727b89..cd9de57695 100644 --- a/plugins/module_utils/gconftool2.py +++ b/plugins/module_utils/gconftool2.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/module_utils/lxd.py b/plugins/module_utils/lxd.py index 819825c19c..bdf026313a 100644 --- a/plugins/module_utils/lxd.py +++ b/plugins/module_utils/lxd.py @@ -1,13 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2016, Hiroaki Nakamura -# -# This code is part of Ansible, but is an independent component. -# This particular file snippet, and this file snippet only, is BSD licensed. -# Modules you write using this snippet, which is embedded dynamically by Ansible -# still belong to the author of the module, and may assign their own license -# to the complete work. -# +# Copyright (c) 2016, Hiroaki Nakamura # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/module_utils/oneandone.py b/plugins/module_utils/oneandone.py index 512bb08467..1ced3f3868 100644 --- a/plugins/module_utils/oneandone.py +++ b/plugins/module_utils/oneandone.py @@ -1,10 +1,4 @@ # -*- coding: utf-8 -*- -# This code is part of Ansible, but is an independent component. -# This particular file snippet, and this file snippet only, is BSD licensed. -# Modules you write using this snippet, which is embedded dynamically by Ansible -# still belong to the author of the module, and may assign their own license -# to the complete work. -# # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/module_utils/source_control/bitbucket.py b/plugins/module_utils/source_control/bitbucket.py index 1a143c5433..22a153ff00 100644 --- a/plugins/module_utils/source_control/bitbucket.py +++ b/plugins/module_utils/source_control/bitbucket.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/module_utils/storage/emc/emc_vnx.py b/plugins/module_utils/storage/emc/emc_vnx.py index a4b312e519..2e391b8fbe 100644 --- a/plugins/module_utils/storage/emc/emc_vnx.py +++ b/plugins/module_utils/storage/emc/emc_vnx.py @@ -1,12 +1,5 @@ # -*- coding: utf-8 -*- -# This code is part of Ansible, but is an independent component. -# This particular file snippet, and this file snippet only, is BSD licensed. -# Modules you write using this snippet, which is embedded dynamically by Ansible -# still belong to the author of the module, and may assign their own license -# to the complete work. -# -# (c) 2018 Luca 'remix_tj' Lorenzetto -# +# Copyright (c) 2018 Luca 'remix_tj' Lorenzetto # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/module_utils/xfconf.py b/plugins/module_utils/xfconf.py index ae331e4404..b63518d0c4 100644 --- a/plugins/module_utils/xfconf.py +++ b/plugins/module_utils/xfconf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/lxd/lxd_project.py b/plugins/modules/cloud/lxd/lxd_project.py index 5a93a22859..e6a77a3d06 100644 --- a/plugins/modules/cloud/lxd/lxd_project.py +++ b/plugins/modules/cloud/lxd/lxd_project.py @@ -1,6 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/misc/cloud_init_data_facts.py b/plugins/modules/cloud/misc/cloud_init_data_facts.py index 26ae722175..d02fd2301d 100644 --- a/plugins/modules/cloud/misc/cloud_init_data_facts.py +++ b/plugins/modules/cloud/misc/cloud_init_data_facts.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# -# (c) 2018, René Moser +# Copyright (c) 2018, René Moser # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index d500f656f5..c8b654eb12 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - -# (c) 2017, Ryan Scott Brown +# Copyright (c) 2017, Ryan Scott Brown # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/online/online_server_info.py b/plugins/modules/cloud/online/online_server_info.py index a9783d239b..3815db9a83 100644 --- a/plugins/modules/cloud/online/online_server_info.py +++ b/plugins/modules/cloud/online/online_server_info.py @@ -1,6 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/online/online_user_info.py b/plugins/modules/cloud/online/online_user_info.py index 96264fba88..1a96fb1446 100644 --- a/plugins/modules/cloud/online/online_user_info.py +++ b/plugins/modules/cloud/online/online_user_info.py @@ -1,6 +1,5 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index 7859ae6799..5547999ec4 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -1,9 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Tomas Karasek -# (c) 2016, Matt Baldwin -# (c) 2016, Thibaud Morel l'Horset -# +# Copyright (c) 2016, Tomas Karasek +# Copyright (c) 2016, Matt Baldwin +# Copyright (c) 2016, Thibaud Morel l'Horset # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/cloud/rackspace/rax_files.py index b827117de8..4c1b7ab4ea 100644 --- a/plugins/modules/cloud/rackspace/rax_files.py +++ b/plugins/modules/cloud/rackspace/rax_files.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - -# (c) 2013, Paul Durivage +# Copyright (c) 2013, Paul Durivage # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index 3fd24fc81c..dcaacf7946 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -1,7 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - -# (c) 2013, Paul Durivage +# Copyright (c) 2013, Paul Durivage # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_image_info.py b/plugins/modules/cloud/scaleway/scaleway_image_info.py index d61bff6370..c68cc99684 100644 --- a/plugins/modules/cloud/scaleway/scaleway_image_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_image_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Yanis Guenane +# Copyright (c) 2018, Yanis Guenane # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_ip_info.py b/plugins/modules/cloud/scaleway/scaleway_ip_info.py index c148113a85..c65c7e6ab9 100644 --- a/plugins/modules/cloud/scaleway/scaleway_ip_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_ip_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Yanis Guenane +# Copyright (c) 2018, Yanis Guenane # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_organization_info.py b/plugins/modules/cloud/scaleway/scaleway_organization_info.py index 447ed6d182..542b8d4603 100644 --- a/plugins/modules/cloud/scaleway/scaleway_organization_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_organization_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Yanis Guenane +# Copyright (c) 2018, Yanis Guenane # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group_info.py b/plugins/modules/cloud/scaleway/scaleway_security_group_info.py index bf8ce58a7f..5e2cc95a1c 100644 --- a/plugins/modules/cloud/scaleway/scaleway_security_group_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_security_group_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Yanis Guenane +# Copyright (c) 2018, Yanis Guenane # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_server_info.py b/plugins/modules/cloud/scaleway/scaleway_server_info.py index 35b531539d..087be54d24 100644 --- a/plugins/modules/cloud/scaleway/scaleway_server_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_server_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Yanis Guenane +# Copyright (c) 2018, Yanis Guenane # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py b/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py index 9f890ef4a1..bebf27395c 100644 --- a/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Yanis Guenane +# Copyright (c) 2018, Yanis Guenane # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_volume_info.py b/plugins/modules/cloud/scaleway/scaleway_volume_info.py index a2715ffe90..14a8c96884 100644 --- a/plugins/modules/cloud/scaleway/scaleway_volume_info.py +++ b/plugins/modules/cloud/scaleway/scaleway_volume_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Yanis Guenane +# Copyright (c) 2018, Yanis Guenane # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/smartos/imgadm.py b/plugins/modules/cloud/smartos/imgadm.py index 968027762b..2357fffa30 100644 --- a/plugins/modules/cloud/smartos/imgadm.py +++ b/plugins/modules/cloud/smartos/imgadm.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, 2017 Jasper Lievisse Adriaanse +# Copyright (c) 2016, 2017 Jasper Lievisse Adriaanse # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/smartos/smartos_image_info.py b/plugins/modules/cloud/smartos/smartos_image_info.py index 78cce37857..fb8c782317 100644 --- a/plugins/modules/cloud/smartos/smartos_image_info.py +++ b/plugins/modules/cloud/smartos/smartos_image_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Adam Števko +# Copyright (c) 2015, Adam Števko # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/cloud/smartos/vmadm.py index df130d939f..6850474fca 100644 --- a/plugins/modules/cloud/smartos/vmadm.py +++ b/plugins/modules/cloud/smartos/vmadm.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Jasper Lievisse Adriaanse +# Copyright (c) 2017, Jasper Lievisse Adriaanse # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/clustering/consul/consul.py b/plugins/modules/clustering/consul/consul.py index 9475b56979..039e67b254 100644 --- a/plugins/modules/clustering/consul/consul.py +++ b/plugins/modules/clustering/consul/consul.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2015, Steve Gargan +# Copyright (c) 2015, Steve Gargan # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/clustering/consul/consul_acl.py b/plugins/modules/clustering/consul/consul_acl.py index 2d00c483eb..23a6431cd7 100644 --- a/plugins/modules/clustering/consul/consul_acl.py +++ b/plugins/modules/clustering/consul/consul_acl.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2015, Steve Gargan +# Copyright (c) 2015, Steve Gargan # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/clustering/consul/consul_kv.py index 1ade2ddaae..9fdfb53342 100644 --- a/plugins/modules/clustering/consul/consul_kv.py +++ b/plugins/modules/clustering/consul/consul_kv.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2015, Steve Gargan -# (c) 2018 Genome Research Ltd. +# Copyright (c) 2015, Steve Gargan +# Copyright (c) 2018 Genome Research Ltd. # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/clustering/etcd3.py b/plugins/modules/clustering/etcd3.py index 6d73e481a5..5bd0d06a1a 100644 --- a/plugins/modules/clustering/etcd3.py +++ b/plugins/modules/clustering/etcd3.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Jean-Philippe Evrard +# Copyright (c) 2018, Jean-Philippe Evrard # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/clustering/nomad/nomad_job.py b/plugins/modules/clustering/nomad/nomad_job.py index e1076ba743..05e2556c1b 100644 --- a/plugins/modules/clustering/nomad/nomad_job.py +++ b/plugins/modules/clustering/nomad/nomad_job.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2020, FERREIRA Christophe +# Copyright (c) 2020, FERREIRA Christophe # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/clustering/nomad/nomad_job_info.py b/plugins/modules/clustering/nomad/nomad_job_info.py index 8cfa9d760f..9e293a59d3 100644 --- a/plugins/modules/clustering/nomad/nomad_job_info.py +++ b/plugins/modules/clustering/nomad/nomad_job_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2020, FERREIRA Christophe +# Copyright (c) 2020, FERREIRA Christophe # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/database/misc/elasticsearch_plugin.py b/plugins/modules/database/misc/elasticsearch_plugin.py index bee6f5a5fc..3bf259f584 100644 --- a/plugins/modules/database/misc/elasticsearch_plugin.py +++ b/plugins/modules/database/misc/elasticsearch_plugin.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Mathew Davies -# (c) 2017, Sam Doran +# Copyright (c) 2015, Mathew Davies +# Copyright (c) 2017, Sam Doran # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/database/misc/riak.py b/plugins/modules/database/misc/riak.py index 7811dc381d..d8679bef2f 100644 --- a/plugins/modules/database/misc/riak.py +++ b/plugins/modules/database/misc/riak.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, James Martin , Drew Kerrigan +# Copyright (c) 2013, James Martin , Drew Kerrigan # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/database/mssql/mssql_db.py index f9686196de..ad66fc921c 100644 --- a/plugins/modules/database/mssql/mssql_db.py +++ b/plugins/modules/database/mssql/mssql_db.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Vedit Firat Arig +# Copyright (c) 2014, Vedit Firat Arig # Outline and parts are reused from Mark Theunissen's mysql_db module # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index ab991410f0..316b1f1d90 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -1,9 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2018, Ryan Conway (@rylon) -# (c) 2018, Scott Buchanan (onepassword.py used as starting point) -# (c) 2018, Ansible Project +# Copyright (c) 2018, Ryan Conway (@rylon) +# Copyright (c) 2018, Scott Buchanan (onepassword.py used as starting point) +# Copyright (c) 2018, Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/circonus_annotation.py b/plugins/modules/monitoring/circonus_annotation.py index ddd1db90eb..6248fd2f55 100644 --- a/plugins/modules/monitoring/circonus_annotation.py +++ b/plugins/modules/monitoring/circonus_annotation.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2014-2015, Epic Games, Inc. +# Copyright (c) 2014-2015, Epic Games, Inc. # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/librato_annotation.py b/plugins/modules/monitoring/librato_annotation.py index 79c263da1e..4ca2e7204a 100644 --- a/plugins/modules/monitoring/librato_annotation.py +++ b/plugins/modules/monitoring/librato_annotation.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (C) Seth Edwards, 2014 +# Copyright (c) Seth Edwards, 2014 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/logentries.py b/plugins/modules/monitoring/logentries.py index eb56ccfb96..a605c41316 100644 --- a/plugins/modules/monitoring/logentries.py +++ b/plugins/modules/monitoring/logentries.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Ivan Vanderbyl +# Copyright (c) 2013, Ivan Vanderbyl # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/logstash_plugin.py b/plugins/modules/monitoring/logstash_plugin.py index 01cc97d567..b174515643 100644 --- a/plugins/modules/monitoring/logstash_plugin.py +++ b/plugins/modules/monitoring/logstash_plugin.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Loic Blot +# Copyright (c) 2017, Loic Blot # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/monit.py b/plugins/modules/monitoring/monit.py index 7a5867f4d5..729b05b5d1 100644 --- a/plugins/modules/monitoring/monit.py +++ b/plugins/modules/monitoring/monit.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Darryl Stoflet +# Copyright (c) 2013, Darryl Stoflet # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index c03b11b605..dd955cc70f 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Anders Ingemann +# Copyright (c) 2014, Anders Ingemann # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/sensu/sensu_client.py b/plugins/modules/monitoring/sensu/sensu_client.py index 2f15268e85..a142751d82 100644 --- a/plugins/modules/monitoring/sensu/sensu_client.py +++ b/plugins/modules/monitoring/sensu/sensu_client.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Red Hat Inc. +# Copyright (c) 2017, Red Hat Inc. # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/sensu/sensu_handler.py b/plugins/modules/monitoring/sensu/sensu_handler.py index 6a5fcf6cce..08ea1335e6 100644 --- a/plugins/modules/monitoring/sensu/sensu_handler.py +++ b/plugins/modules/monitoring/sensu/sensu_handler.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Red Hat Inc. +# Copyright (c) 2017, Red Hat Inc. # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/sensu/sensu_silence.py b/plugins/modules/monitoring/sensu/sensu_silence.py index f508bd5d39..c5ed10e36d 100644 --- a/plugins/modules/monitoring/sensu/sensu_silence.py +++ b/plugins/modules/monitoring/sensu/sensu_silence.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Steven Bambling +# Copyright (c) 2017, Steven Bambling # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/sensu/sensu_subscription.py b/plugins/modules/monitoring/sensu/sensu_subscription.py index b7d97e93ea..63170f337b 100644 --- a/plugins/modules/monitoring/sensu/sensu_subscription.py +++ b/plugins/modules/monitoring/sensu/sensu_subscription.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Anders Ingemann +# Copyright (c) 2014, Anders Ingemann # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/spectrum_device.py b/plugins/modules/monitoring/spectrum_device.py index 36e46cb917..814aff46ed 100644 --- a/plugins/modules/monitoring/spectrum_device.py +++ b/plugins/modules/monitoring/spectrum_device.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Renato Orgito +# Copyright (c) 2016, Renato Orgito # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/spectrum_model_attrs.py b/plugins/modules/monitoring/spectrum_model_attrs.py index dc518b5e16..ed60291d58 100644 --- a/plugins/modules/monitoring/spectrum_model_attrs.py +++ b/plugins/modules/monitoring/spectrum_model_attrs.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2021, Tyler Gates +# Copyright (c) 2021, Tyler Gates # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/statusio_maintenance.py b/plugins/modules/monitoring/statusio_maintenance.py index b98b45006d..ab4cfbe361 100644 --- a/plugins/modules/monitoring/statusio_maintenance.py +++ b/plugins/modules/monitoring/statusio_maintenance.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Benjamin Copeland (@bhcopeland) +# Copyright (c) 2015, Benjamin Copeland (@bhcopeland) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/net_tools/netcup_dns.py b/plugins/modules/net_tools/netcup_dns.py index 14264081ad..bf5422ee86 100644 --- a/plugins/modules/net_tools/netcup_dns.py +++ b/plugins/modules/net_tools/netcup_dns.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2018 Nicolai Buchwitz +# Copyright (c) 2018 Nicolai Buchwitz # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/net_tools/nsupdate.py b/plugins/modules/net_tools/nsupdate.py index d71775e61c..9f29d4b5fd 100644 --- a/plugins/modules/net_tools/nsupdate.py +++ b/plugins/modules/net_tools/nsupdate.py @@ -1,9 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Marcin Skarbek -# (c) 2016, Andreas Olsson -# (c) 2017, Loic Blot +# Copyright (c) 2016, Marcin Skarbek +# Copyright (c) 2016, Andreas Olsson +# Copyright (c) 2017, Loic Blot # # This module was ported from https://github.com/mskarbek/ansible-nsupdate # diff --git a/plugins/modules/net_tools/omapi_host.py b/plugins/modules/net_tools/omapi_host.py index 5d03e16618..a0c62b74e9 100644 --- a/plugins/modules/net_tools/omapi_host.py +++ b/plugins/modules/net_tools/omapi_host.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# copyright: (c) 2016, Loic Blot +# Copyright (c) 2016, Loic Blot # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) diff --git a/plugins/modules/notification/catapult.py b/plugins/modules/notification/catapult.py index 10fb11b4b3..64853849fc 100644 --- a/plugins/modules/notification/catapult.py +++ b/plugins/modules/notification/catapult.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Jonathan Mainguy +# Copyright (c) 2016, Jonathan Mainguy # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later # diff --git a/plugins/modules/notification/irc.py b/plugins/modules/notification/irc.py index 16dbdb62bf..b1bca89aaa 100644 --- a/plugins/modules/notification/irc.py +++ b/plugins/modules/notification/irc.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Jan-Piet Mens +# Copyright (c) 2013, Jan-Piet Mens # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/jabber.py b/plugins/modules/notification/jabber.py index 8b4df4ad43..110b618d77 100644 --- a/plugins/modules/notification/jabber.py +++ b/plugins/modules/notification/jabber.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2015, Brian Coca +# Copyright (c) 2015, Brian Coca # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/matrix.py b/plugins/modules/notification/matrix.py index 07c3755338..f339e76593 100644 --- a/plugins/modules/notification/matrix.py +++ b/plugins/modules/notification/matrix.py @@ -1,7 +1,7 @@ #!/usr/bin/python # coding: utf-8 -# (c) 2018, Jan Christian Grünhage +# Copyright (c) 2018, Jan Christian Grünhage # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/mattermost.py b/plugins/modules/notification/mattermost.py index 486c7f3e1f..c3ee910888 100644 --- a/plugins/modules/notification/mattermost.py +++ b/plugins/modules/notification/mattermost.py @@ -1,12 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Benjamin Jolivot +# Copyright (c) Benjamin Jolivot # Inspired by slack module : -# # (c) 2017, Steve Pletcher -# # (c) 2016, René Moser -# # (c) 2015, Stefan Berggren -# # (c) 2014, Ramon de la Fuente ) +# # Copyright (c) 2017, Steve Pletcher +# # Copyright (c) 2016, René Moser +# # Copyright (c) 2015, Stefan Berggren +# # Copyright (c) 2014, Ramon de la Fuente ) # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/mqtt.py b/plugins/modules/notification/mqtt.py index 698c20c4e6..9e2712b2c1 100644 --- a/plugins/modules/notification/mqtt.py +++ b/plugins/modules/notification/mqtt.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, 2014, Jan-Piet Mens +# Copyright (c) 2013, 2014, Jan-Piet Mens # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/nexmo.py b/plugins/modules/notification/nexmo.py index fa3f613072..103f366d2f 100644 --- a/plugins/modules/notification/nexmo.py +++ b/plugins/modules/notification/nexmo.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Matt Martz +# Copyright (c) 2014, Matt Martz # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/rocketchat.py b/plugins/modules/notification/rocketchat.py index ffb4f6e7af..ed7c35da78 100644 --- a/plugins/modules/notification/rocketchat.py +++ b/plugins/modules/notification/rocketchat.py @@ -1,9 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Deepak Kothandan -# (c) 2015, Stefan Berggren -# (c) 2014, Ramon de la Fuente +# Copyright (c) 2016, Deepak Kothandan +# Copyright (c) 2015, Stefan Berggren +# Copyright (c) 2014, Ramon de la Fuente # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/say.py b/plugins/modules/notification/say.py index ae470bedcf..fe36b02d15 100644 --- a/plugins/modules/notification/say.py +++ b/plugins/modules/notification/say.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Michael DeHaan +# Copyright (c) 2013, Michael DeHaan # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/slack.py b/plugins/modules/notification/slack.py index c54ac6f4d4..eb5cf325f3 100644 --- a/plugins/modules/notification/slack.py +++ b/plugins/modules/notification/slack.py @@ -1,12 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2020, Lee Goolsbee -# (c) 2020, Michal Middleton -# (c) 2017, Steve Pletcher -# (c) 2016, René Moser -# (c) 2015, Stefan Berggren -# (c) 2014, Ramon de la Fuente +# Copyright (c) 2020, Lee Goolsbee +# Copyright (c) 2020, Michal Middleton +# Copyright (c) 2017, Steve Pletcher +# Copyright (c) 2016, René Moser +# Copyright (c) 2015, Stefan Berggren +# Copyright (c) 2014, Ramon de la Fuente # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/telegram.py b/plugins/modules/notification/telegram.py index 20fcd207bc..c647565fd4 100644 --- a/plugins/modules/notification/telegram.py +++ b/plugins/modules/notification/telegram.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Artem Feofanov +# Copyright (c) 2016, Artem Feofanov # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/notification/twilio.py b/plugins/modules/notification/twilio.py index 1c8c468b43..1934820fe3 100644 --- a/plugins/modules/notification/twilio.py +++ b/plugins/modules/notification/twilio.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Matt Makai +# Copyright (c) 2015, Matt Makai # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/ansible_galaxy_install.py b/plugins/modules/packaging/language/ansible_galaxy_install.py index bd7a5f3401..3964cdab9f 100644 --- a/plugins/modules/packaging/language/ansible_galaxy_install.py +++ b/plugins/modules/packaging/language/ansible_galaxy_install.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/bower.py b/plugins/modules/packaging/language/bower.py index d0d6ef9fe8..9ad564af4d 100644 --- a/plugins/modules/packaging/language/bower.py +++ b/plugins/modules/packaging/language/bower.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Michael Warkentin +# Copyright (c) 2014, Michael Warkentin # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/bundler.py b/plugins/modules/packaging/language/bundler.py index 8bdfa954e3..07be3e7b5c 100644 --- a/plugins/modules/packaging/language/bundler.py +++ b/plugins/modules/packaging/language/bundler.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Tim Hoiberg +# Copyright (c) 2015, Tim Hoiberg # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 38e4b63c0f..2a78611026 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Dimitrios Tydeas Mengidis +# Copyright (c) 2014, Dimitrios Tydeas Mengidis # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/cpanm.py b/plugins/modules/packaging/language/cpanm.py index dd2ebefb12..3511865f58 100644 --- a/plugins/modules/packaging/language/cpanm.py +++ b/plugins/modules/packaging/language/cpanm.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2012, Franck Cuny -# (c) 2021, Alexei Znamensky +# Copyright (c) 2012, Franck Cuny +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/easy_install.py b/plugins/modules/packaging/language/easy_install.py index 6e122178a7..e0adeefd99 100644 --- a/plugins/modules/packaging/language/easy_install.py +++ b/plugins/modules/packaging/language/easy_install.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2012, Matt Wright +# Copyright (c) 2012, Matt Wright # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/gem.py b/plugins/modules/packaging/language/gem.py index 77b16a1f86..d95f27b26a 100644 --- a/plugins/modules/packaging/language/gem.py +++ b/plugins/modules/packaging/language/gem.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Johan Wiren +# Copyright (c) 2013, Johan Wiren # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/pear.py b/plugins/modules/packaging/language/pear.py index bf96484d61..4e10ca0414 100644 --- a/plugins/modules/packaging/language/pear.py +++ b/plugins/modules/packaging/language/pear.py @@ -1,9 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2012, Afterburn -# (c) 2013, Aaron Bull Schaefer -# (c) 2015, Jonathan Lestrelin +# Copyright (c) 2012, Afterburn +# Copyright (c) 2013, Aaron Bull Schaefer +# Copyright (c) 2015, Jonathan Lestrelin # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/pip_package_info.py b/plugins/modules/packaging/language/pip_package_info.py index 152f21ce4d..db6cc14e65 100644 --- a/plugins/modules/packaging/language/pip_package_info.py +++ b/plugins/modules/packaging/language/pip_package_info.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2018, Ansible Project +# Copyright (c) 2018, Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/packaging/language/pipx.py index e4b29f2193..f947345777 100644 --- a/plugins/modules/packaging/language/pipx.py +++ b/plugins/modules/packaging/language/pipx.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/apk.py b/plugins/modules/packaging/os/apk.py index 15b70eb2a2..dfc27767b1 100644 --- a/plugins/modules/packaging/os/apk.py +++ b/plugins/modules/packaging/os/apk.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Kevin Brebanov +# Copyright (c) 2015, Kevin Brebanov # Based on pacman (Afterburn , Aaron Bull Schaefer ) # and apt (Matthew Williams ) modules. # diff --git a/plugins/modules/packaging/os/homebrew.py b/plugins/modules/packaging/os/homebrew.py index 1034418f58..b4f8be7422 100644 --- a/plugins/modules/packaging/os/homebrew.py +++ b/plugins/modules/packaging/os/homebrew.py @@ -1,9 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Andrew Dunham -# (c) 2013, Daniel Jaouen -# (c) 2015, Indrajit Raychaudhuri +# Copyright (c) 2013, Andrew Dunham +# Copyright (c) 2013, Daniel Jaouen +# Copyright (c) 2015, Indrajit Raychaudhuri # # Based on macports (Jimmy Tang ) # diff --git a/plugins/modules/packaging/os/layman.py b/plugins/modules/packaging/os/layman.py index 18d928c338..7202ed8f94 100644 --- a/plugins/modules/packaging/os/layman.py +++ b/plugins/modules/packaging/os/layman.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Jakub Jirutka +# Copyright (c) 2014, Jakub Jirutka # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/macports.py b/plugins/modules/packaging/os/macports.py index 9eac411d48..a1d976cc36 100644 --- a/plugins/modules/packaging/os/macports.py +++ b/plugins/modules/packaging/os/macports.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Jimmy Tang +# Copyright (c) 2013, Jimmy Tang # Based on okpg (Patrick Pelletier ), pacman # (Afterburn) and pkgin (Shaun Zinck) modules # diff --git a/plugins/modules/packaging/os/openbsd_pkg.py b/plugins/modules/packaging/os/openbsd_pkg.py index 67484d9401..ed917deb54 100644 --- a/plugins/modules/packaging/os/openbsd_pkg.py +++ b/plugins/modules/packaging/os/openbsd_pkg.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Patrik Lundin +# Copyright (c) 2013, Patrik Lundin # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/packaging/os/opkg.py index b6c28c6321..6019e040f5 100644 --- a/plugins/modules/packaging/os/opkg.py +++ b/plugins/modules/packaging/os/opkg.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Patrick Pelletier +# Copyright (c) 2013, Patrick Pelletier # Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) diff --git a/plugins/modules/packaging/os/pkgng.py b/plugins/modules/packaging/os/pkgng.py index 08af1482fc..e49471c509 100644 --- a/plugins/modules/packaging/os/pkgng.py +++ b/plugins/modules/packaging/os/pkgng.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, bleader +# Copyright (c) 2013, bleader # Written by bleader # Based on pkgin module written by Shaun Zinck # that was based on pacman module written by Afterburn diff --git a/plugins/modules/packaging/os/portage.py b/plugins/modules/packaging/os/portage.py index 4493ed866f..6f48cb33d9 100644 --- a/plugins/modules/packaging/os/portage.py +++ b/plugins/modules/packaging/os/portage.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, William L Thomson Jr -# (c) 2013, Yap Sok Ann +# Copyright (c) 2016, William L Thomson Jr +# Copyright (c) 2013, Yap Sok Ann # Written by Yap Sok Ann # Modified by William L. Thomson Jr. # Based on apt module written by Matthew Williams diff --git a/plugins/modules/packaging/os/portinstall.py b/plugins/modules/packaging/os/portinstall.py index 31d4799adf..2ae478681c 100644 --- a/plugins/modules/packaging/os/portinstall.py +++ b/plugins/modules/packaging/os/portinstall.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, berenddeboer +# Copyright (c) 2013, berenddeboer # Written by berenddeboer # Based on pkgng module written by bleader # diff --git a/plugins/modules/packaging/os/pulp_repo.py b/plugins/modules/packaging/os/pulp_repo.py index 67f64ebd4d..c0d12241e0 100644 --- a/plugins/modules/packaging/os/pulp_repo.py +++ b/plugins/modules/packaging/os/pulp_repo.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Joe Adams <@sysadmind> +# Copyright (c) 2016, Joe Adams <@sysadmind> # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index d9c544e5f9..79ef89400a 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# James Laska (jlaska@redhat.com) +# Copyright (c) James Laska (jlaska@redhat.com) # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/rhsm_release.py b/plugins/modules/packaging/os/rhsm_release.py index a577c25cdb..698e64f995 100644 --- a/plugins/modules/packaging/os/rhsm_release.py +++ b/plugins/modules/packaging/os/rhsm_release.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2018, Sean Myers +# Copyright (c) 2018, Sean Myers # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/slackpkg.py b/plugins/modules/packaging/os/slackpkg.py index 291e25cb6f..1a6cdf7705 100644 --- a/plugins/modules/packaging/os/slackpkg.py +++ b/plugins/modules/packaging/os/slackpkg.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Kim Nørgaard +# Copyright (c) 2014, Kim Nørgaard # Written by Kim Nørgaard # Based on pkgng module written by bleader # that was based on pkgin module written by Shaun Zinck diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index 10ce1884d3..f7be9b71c9 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015-2016, Vlad Glagolev +# Copyright (c) 2015-2016, Vlad Glagolev # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/svr4pkg.py b/plugins/modules/packaging/os/svr4pkg.py index 7d4a4438dd..6501d36bb4 100644 --- a/plugins/modules/packaging/os/svr4pkg.py +++ b/plugins/modules/packaging/os/svr4pkg.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2012, Boyd Adamson +# Copyright (c) 2012, Boyd Adamson # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/swdepot.py b/plugins/modules/packaging/os/swdepot.py index 56236b6f08..17d0157bb5 100644 --- a/plugins/modules/packaging/os/swdepot.py +++ b/plugins/modules/packaging/os/swdepot.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Raul Melo +# Copyright (c) 2013, Raul Melo # Written by Raul Melo # Based on yum module written by Seth Vidal # diff --git a/plugins/modules/packaging/os/swupd.py b/plugins/modules/packaging/os/swupd.py index 446d0c31ef..b05885648f 100644 --- a/plugins/modules/packaging/os/swupd.py +++ b/plugins/modules/packaging/os/swupd.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Alberto Murillo +# Copyright (c) 2017, Alberto Murillo # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/packaging/os/zypper.py index 5963910135..86571d5487 100644 --- a/plugins/modules/packaging/os/zypper.py +++ b/plugins/modules/packaging/os/zypper.py @@ -1,14 +1,14 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Patrick Callahan +# Copyright (c) 2013, Patrick Callahan # based on # openbsd_pkg -# (c) 2013 +# Copyright (c) 2013 # Patrik Lundin # # yum -# (c) 2012, Red Hat, Inc +# Copyright (c) 2012, Red Hat, Inc # Written by Seth Vidal # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) diff --git a/plugins/modules/packaging/os/zypper_repository.py b/plugins/modules/packaging/os/zypper_repository.py index 81d36d364e..425e7a0edc 100644 --- a/plugins/modules/packaging/os/zypper_repository.py +++ b/plugins/modules/packaging/os/zypper_repository.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Matthias Vogelgesang -# (c) 2014, Justin Lecher +# Copyright (c) 2013, Matthias Vogelgesang +# Copyright (c) 2014, Justin Lecher # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/hpilo/hponcfg.py b/plugins/modules/remote_management/hpilo/hponcfg.py index 18a45478f7..eeecf9a35b 100644 --- a/plugins/modules/remote_management/hpilo/hponcfg.py +++ b/plugins/modules/remote_management/hpilo/hponcfg.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2012, Dag Wieers +# Copyright (c) 2012, Dag Wieers # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/imc/imc_rest.py b/plugins/modules/remote_management/imc/imc_rest.py index 8dc4a72891..c4ffce3002 100644 --- a/plugins/modules/remote_management/imc/imc_rest.py +++ b/plugins/modules/remote_management/imc/imc_rest.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Dag Wieers +# Copyright (c) 2017, Dag Wieers # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/manageiq/manageiq_policies.py b/plugins/modules/remote_management/manageiq/manageiq_policies.py index a5fbaff64e..38018771fc 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_policies.py +++ b/plugins/modules/remote_management/manageiq/manageiq_policies.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Daniel Korn -# (c) 2017, Yaacov Zamir +# Copyright (c) 2017, Daniel Korn +# Copyright (c) 2017, Yaacov Zamir # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/manageiq/manageiq_provider.py b/plugins/modules/remote_management/manageiq/manageiq_provider.py index 918408b510..f33176e15a 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_provider.py +++ b/plugins/modules/remote_management/manageiq/manageiq_provider.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Daniel Korn -# (c) 2017, Yaacov Zamir +# Copyright (c) 2017, Daniel Korn +# Copyright (c) 2017, Yaacov Zamir # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/manageiq/manageiq_tags.py b/plugins/modules/remote_management/manageiq/manageiq_tags.py index c5e7d6a4ea..cb85796455 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tags.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tags.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Daniel Korn -# (c) 2017, Yaacov Zamir +# Copyright (c) 2017, Daniel Korn +# Copyright (c) 2017, Yaacov Zamir # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/wakeonlan.py b/plugins/modules/remote_management/wakeonlan.py index 7087d47ba6..bbdbcfdeff 100644 --- a/plugins/modules/remote_management/wakeonlan.py +++ b/plugins/modules/remote_management/wakeonlan.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Dag Wieers +# Copyright (c) 2016, Dag Wieers # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/source_control/git_config.py b/plugins/modules/source_control/git_config.py index e58958b74e..2045341ed1 100644 --- a/plugins/modules/source_control/git_config.py +++ b/plugins/modules/source_control/git_config.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Marius Gedminas -# (c) 2016, Matthew Gamble +# Copyright (c) 2015, Marius Gedminas +# Copyright (c) 2016, Matthew Gamble # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index 353d90812c..41342472c0 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Adam Števko +# Copyright (c) 2016, Adam Števko # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/storage/zfs/zpool_facts.py b/plugins/modules/storage/zfs/zpool_facts.py index 07e6f213db..3aa953fcae 100644 --- a/plugins/modules/storage/zfs/zpool_facts.py +++ b/plugins/modules/storage/zfs/zpool_facts.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Adam Števko +# Copyright (c) 2016, Adam Števko # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/gconftool2_info.py b/plugins/modules/system/gconftool2_info.py index 888e06b3c7..acebb44013 100644 --- a/plugins/modules/system/gconftool2_info.py +++ b/plugins/modules/system/gconftool2_info.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/homectl.py b/plugins/modules/system/homectl.py index 759443df2c..1bcbf971bc 100644 --- a/plugins/modules/system/homectl.py +++ b/plugins/modules/system/homectl.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2022, James Livulpi +# Copyright (c) 2022, James Livulpi # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/mksysb.py b/plugins/modules/system/mksysb.py index 2c880a40ff..f25d88e6a3 100644 --- a/plugins/modules/system/mksysb.py +++ b/plugins/modules/system/mksysb.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky (@russoz) -# (c) 2017, Kairo Araujo +# Copyright (c) 2021, Alexei Znamensky (@russoz) +# Copyright (c) 2017, Kairo Araujo # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index acd4589215..31c6b854b0 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Thomas Caravia +# Copyright (c) 2017, Thomas Caravia # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/ohai.py b/plugins/modules/system/ohai.py index 5188a03a43..c7322c0962 100644 --- a/plugins/modules/system/ohai.py +++ b/plugins/modules/system/ohai.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2012, Michael DeHaan +# Copyright (c) 2012, Michael DeHaan # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/openwrt_init.py b/plugins/modules/system/openwrt_init.py index 2c3f9c7eed..0bd20a03bf 100644 --- a/plugins/modules/system/openwrt_init.py +++ b/plugins/modules/system/openwrt_init.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Andrew Gaffney +# Copyright (c) 2016, Andrew Gaffney # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/sysrc.py b/plugins/modules/system/sysrc.py index 431bcbd604..ccd5c2c545 100644 --- a/plugins/modules/system/sysrc.py +++ b/plugins/modules/system/sysrc.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2019 David Lundgren +# Copyright (c) 2019 David Lundgren # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index e3584ed89e..7a400d0797 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Joseph Benden +# Copyright (c) 2017, Joseph Benden # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/xfconf_info.py b/plugins/modules/system/xfconf_info.py index d69da374fe..2bdb745393 100644 --- a/plugins/modules/system/xfconf_info.py +++ b/plugins/modules/system/xfconf_info.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/apache2_mod_proxy.py b/plugins/modules/web_infrastructure/apache2_mod_proxy.py index 955794dec4..5dbe356a66 100644 --- a/plugins/modules/web_infrastructure/apache2_mod_proxy.py +++ b/plugins/modules/web_infrastructure/apache2_mod_proxy.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Olivier Boukili +# Copyright (c) 2016, Olivier Boukili # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later From 6062ae8fae89c58392e985178fbf65f9fefb7b49 Mon Sep 17 00:00:00 2001 From: Mike Moerk Date: Sun, 7 Aug 2022 01:56:07 -0600 Subject: [PATCH 0156/2104] WDC Redfish support for chassis indicator LED toggling. (#5059) * WDC Redfish support for chassis indicator LED toggling. * Added changelog fragment. * Apply suggestions from code review Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...059-wdc_redfish_command-indicator-leds.yml | 2 + plugins/module_utils/wdc_redfish_utils.py | 47 +++++++ .../redfish/wdc_redfish_command.py | 91 +++++++++++-- .../wdc/test_wdc_redfish_command.py | 123 +++++++++++++++++- 4 files changed, 245 insertions(+), 18 deletions(-) create mode 100644 changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml diff --git a/changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml b/changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml new file mode 100644 index 0000000000..0a00b44e73 --- /dev/null +++ b/changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml @@ -0,0 +1,2 @@ +minor_changes: + - wdc_redfish_command - add ``IndicatorLedOn`` and ``IndicatorLedOff`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5059). diff --git a/plugins/module_utils/wdc_redfish_utils.py b/plugins/module_utils/wdc_redfish_utils.py index 44289e86d7..0ae22de64a 100644 --- a/plugins/module_utils/wdc_redfish_utils.py +++ b/plugins/module_utils/wdc_redfish_utils.py @@ -405,3 +405,50 @@ class WdcRedfishUtils(RedfishUtils): return iom_b_firmware_version else: return None + + @staticmethod + def _get_led_locate_uri(data): + """Get the LED locate URI given a resource body.""" + if "Actions" not in data: + return None + if "Oem" not in data["Actions"]: + return None + if "WDC" not in data["Actions"]["Oem"]: + return None + if "#Chassis.Locate" not in data["Actions"]["Oem"]["WDC"]: + return None + if "target" not in data["Actions"]["Oem"]["WDC"]["#Chassis.Locate"]: + return None + return data["Actions"]["Oem"]["WDC"]["#Chassis.Locate"]["target"] + + def manage_indicator_led(self, command, resource_uri): + key = 'IndicatorLED' + + payloads = {'IndicatorLedOn': 'On', 'IndicatorLedOff': 'Off'} + current_led_status_map = {'IndicatorLedOn': 'Blinking', 'IndicatorLedOff': 'Off'} + + result = {} + response = self.get_request(self.root_uri + resource_uri) + if response['ret'] is False: + return response + result['ret'] = True + data = response['data'] + if key not in data: + return {'ret': False, 'msg': "Key %s not found" % key} + current_led_status = data[key] + if current_led_status == current_led_status_map[command]: + return {'ret': True, 'changed': False} + + led_locate_uri = self._get_led_locate_uri(data) + if led_locate_uri is None: + return {'ret': False, 'msg': 'LED locate URI not found.'} + + if command in payloads.keys(): + payload = {'LocateState': payloads[command]} + response = self.post_request(self.root_uri + led_locate_uri, payload) + if response['ret'] is False: + return response + else: + return {'ret': False, 'msg': 'Invalid command'} + + return result diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_command.py b/plugins/modules/remote_management/redfish/wdc_redfish_command.py index 809e3984bd..29d6f304ef 100644 --- a/plugins/modules/remote_management/redfish/wdc_redfish_command.py +++ b/plugins/modules/remote_management/redfish/wdc_redfish_command.py @@ -55,6 +55,12 @@ options: - Timeout in seconds for URL requests to OOB controller. default: 10 type: int + resource_id: + required: false + description: + - ID of the component to modify, such as C(Enclosure), C(IOModuleAFRU), C(PowerSupplyBFRU), C(FanExternalFRU3), or C(FanInternalFRU). + type: str + version_added: 5.4.0 update_image_uri: required: false description: @@ -76,8 +82,6 @@ options: description: - The password for retrieving the update image. type: str -requirements: - - dnspython (2.1.0 for Python 3, 1.16.0 for Python 2) notes: - In the inventory, you can specify baseuri or ioms. See the EXAMPLES section. - ioms is a list of FQDNs for the enclosure's IOMs. @@ -125,6 +129,47 @@ EXAMPLES = ''' update_creds: username: operator password: supersecretpwd + +- name: Turn on enclosure indicator LED + community.general.wdc_redfish_command: + category: Chassis + resource_id: Enclosure + command: IndicatorLedOn + username: "{{ username }}" + password: "{{ password }}" + +- name: Turn off IOM A indicator LED + community.general.wdc_redfish_command: + category: Chassis + resource_id: IOModuleAFRU + command: IndicatorLedOff + username: "{{ username }}" + password: "{{ password }}" + +- name: Turn on Power Supply B indicator LED + community.general.wdc_redfish_command: + category: Chassis + resource_id: PowerSupplyBFRU + command: IndicatorLedOn + username: "{{ username }}" + password: "{{ password }}" + +- name: Turn on External Fan 3 indicator LED + community.general.wdc_redfish_command: + category: Chassis + resource_id: FanExternalFRU3 + command: IndicatorLedOn + username: "{{ username }}" + password: "{{ password }}" + +- name: Turn on Internal Fan indicator LED + community.general.wdc_redfish_command: + category: Chassis + resource_id: FanInternalFRU + command: IndicatorLedOn + username: "{{ username }}" + password: "{{ password }}" + ''' RETURN = ''' @@ -143,6 +188,10 @@ CATEGORY_COMMANDS_ALL = { "Update": [ "FWActivate", "UpdateAndActivate" + ], + "Chassis": [ + "IndicatorLedOn", + "IndicatorLedOff" ] } @@ -164,6 +213,7 @@ def main(): password=dict(no_log=True) ) ), + resource_id=dict(), update_image_uri=dict(), timeout=dict(type='int', default=10) ), @@ -191,6 +241,9 @@ def main(): # timeout timeout = module.params['timeout'] + # Resource to modify + resource_id = module.params['resource_id'] + # Check that Category is valid if category not in CATEGORY_COMMANDS_ALL: module.fail_json(msg=to_native("Invalid Category '%s'. Valid Categories = %s" % (category, sorted(CATEGORY_COMMANDS_ALL.keys())))) @@ -209,7 +262,7 @@ def main(): "https://" + iom for iom in module.params['ioms'] ] rf_utils = WdcRedfishUtils(creds, root_uris, timeout, module, - resource_id=None, data_modification=True) + resource_id=resource_id, data_modification=True) # Organize by Categories / Commands @@ -236,17 +289,33 @@ def main(): update_opts["update_image_uri"] = module.params['update_image_uri'] result = rf_utils.update_and_activate(update_opts) + elif category == "Chassis": + result = rf_utils._find_chassis_resource() if result['ret'] is False: module.fail_json(msg=to_native(result['msg'])) + + led_commands = ["IndicatorLedOn", "IndicatorLedOff"] + + # Check if more than one led_command is present + num_led_commands = sum([command in led_commands for command in command_list]) + if num_led_commands > 1: + result = {'ret': False, 'msg': "Only one IndicatorLed command should be sent at a time."} else: - del result['ret'] - changed = result.get('changed', True) - session = result.get('session', dict()) - module.exit_json(changed=changed, - session=session, - msg='Action was successful' if not module.check_mode else result.get( - 'msg', "No action performed in check mode." - )) + for command in command_list: + if command.startswith("IndicatorLed"): + result = rf_utils.manage_chassis_indicator_led(command) + + if result['ret'] is False: + module.fail_json(msg=to_native(result['msg'])) + else: + del result['ret'] + changed = result.get('changed', True) + session = result.get('session', dict()) + module.exit_json(changed=changed, + session=session, + msg='Action was successful' if not module.check_mode else result.get( + 'msg', "No action performed in check mode." + )) if __name__ == '__main__': diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py index 53e59ebd74..1e66acc082 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py @@ -49,6 +49,37 @@ MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE = { "data": { "UpdateService": { "@odata.id": "/UpdateService" + }, + "Chassis": { + "@odata.id": "/Chassis" + } + } +} + +MOCK_SUCCESSFUL_RESPONSE_CHASSIS = { + "ret": True, + "data": { + "Members": [ + { + "@odata.id": "/redfish/v1/Chassis/Enclosure" + } + ] + } +} + +MOCK_SUCCESSFUL_RESPONSE_CHASSIS_ENCLOSURE = { + "ret": True, + "data": { + "Id": "Enclosure", + "IndicatorLED": "Off", + "Actions": { + "Oem": { + "WDC": { + "#Chassis.Locate": { + "target": "/Chassis.Locate" + } + } + } } } } @@ -205,15 +236,31 @@ def mock_get_request_enclosure_multi_tenant(*args, **kwargs): raise RuntimeError("Illegal call to get_request in test: " + args[1]) +def mock_get_request_led_indicator(*args, **kwargs): + """Mock for get_request for LED indicator tests.""" + if args[1].endswith("/redfish/v1") or args[1].endswith("/redfish/v1/"): + return MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE + elif args[1].endswith("/Chassis"): + return MOCK_SUCCESSFUL_RESPONSE_CHASSIS + elif args[1].endswith("Chassis/Enclosure"): + return MOCK_SUCCESSFUL_RESPONSE_CHASSIS_ENCLOSURE + else: + raise RuntimeError("Illegal call to get_request in test: " + args[1]) + + def mock_post_request(*args, **kwargs): """Mock post_request with successful response.""" - if args[1].endswith("/UpdateService.FWActivate"): - return { - "ret": True, - "data": ACTION_WAS_SUCCESSFUL_MESSAGE - } - else: - raise RuntimeError("Illegal POST call to: " + args[1]) + valid_endpoints = [ + "/UpdateService.FWActivate", + "/Chassis.Locate" + ] + for endpoint in valid_endpoints: + if args[1].endswith(endpoint): + return { + "ret": True, + "data": ACTION_WAS_SUCCESSFUL_MESSAGE + } + raise RuntimeError("Illegal POST call to: " + args[1]) def mock_get_firmware_inventory_version_1_2_3(*args, **kwargs): @@ -277,6 +324,68 @@ class TestWdcRedfishCommand(unittest.TestCase): }) module.main() + def test_module_enclosure_led_indicator_on(self): + """Test turning on a valid LED indicator (in this case we use the Enclosure resource).""" + module_args = { + 'category': 'Chassis', + 'command': 'IndicatorLedOn', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + "resource_id": "Enclosure", + "baseuri": "example.com" + } + set_module_args(module_args) + + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + get_request=mock_get_request_led_indicator, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, + get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_module_invalid_resource_led_indicator_on(self): + """Test turning LED on for an invalid resource id.""" + module_args = { + 'category': 'Chassis', + 'command': 'IndicatorLedOn', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + "resource_id": "Disk99", + "baseuri": "example.com" + } + set_module_args(module_args) + + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + get_request=mock_get_request_led_indicator, + post_request=mock_post_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + module.main() + expected_error_message = "Chassis resource Disk99 not found" + self.assertEqual(expected_error_message, + get_exception_message(ansible_fail_json)) + + def test_module_enclosure_led_off_already_off(self): + """Test turning LED indicator off when it's already off. Confirm changed is False and no POST occurs.""" + module_args = { + 'category': 'Chassis', + 'command': 'IndicatorLedOff', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + "resource_id": "Enclosure", + "baseuri": "example.com" + } + set_module_args(module_args) + + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + get_request=mock_get_request_led_indicator): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, + get_exception_message(ansible_exit_json)) + self.assertFalse(is_changed(ansible_exit_json)) + def test_module_fw_activate_first_iom_unavailable(self): """Test that if the first IOM is not available, the 2nd one is used.""" ioms = [ From 2a9fd7359f4fe2015e0e06d90c68e4ca9af8378b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 7 Aug 2022 13:37:23 +0200 Subject: [PATCH 0157/2104] Add more license statements (#5079) * Add more license statements. These were modified manually incorporating existing data. * Remove accidentally added line. --- changelogs/fragments/licenses.yml | 2 +- plugins/callback/splunk.py | 17 +++--------- plugins/callback/sumologic.py | 17 +++--------- plugins/filter/jc.py | 19 +++---------- plugins/filter/json_query.py | 19 +++---------- plugins/filter/random_mac.py | 19 +++---------- plugins/lookup/etcd.py | 20 +++----------- plugins/module_utils/_mount.py | 1 + .../identity/keycloak/keycloak.py | 27 ++----------------- plugins/module_utils/scaleway.py | 4 +++ .../cloud/dimensiondata/dimensiondata_vlan.py | 17 ++---------- .../oneandone/oneandone_firewall_policy.py | 17 +++--------- .../oneandone/oneandone_load_balancer.py | 17 +++--------- .../oneandone/oneandone_monitoring_policy.py | 17 +++--------- .../oneandone/oneandone_private_network.py | 17 +++--------- .../cloud/oneandone/oneandone_public_ip.py | 17 +++--------- .../cloud/oneandone/oneandone_server.py | 17 +++--------- plugins/modules/cloud/opennebula/one_image.py | 3 +++ .../cloud/opennebula/one_image_info.py | 3 +++ .../modules/cloud/opennebula/one_service.py | 3 +++ plugins/modules/cloud/opennebula/one_vm.py | 3 +++ plugins/modules/net_tools/ip_netns.py | 20 +++----------- plugins/modules/notification/bearychat.py | 20 +++----------- .../manageiq/manageiq_group.py | 20 +++----------- .../manageiq/manageiq_tenant.py | 20 +++----------- .../manageiq/manageiq_user.py | 20 +++----------- plugins/modules/system/selogin.py | 18 +++---------- .../apache2_module/tasks/actualtest.yml | 18 +++---------- .../targets/archive/tasks/main.yml | 19 +++---------- .../targets/archive/tests/core.yml | 19 +++---------- .../integration/targets/etcd3/tasks/main.yml | 19 +++---------- .../targets/etcd3/tasks/run_tests.yml | 21 +++------------ .../targets/flatpak/tasks/main.yml | 22 ++++----------- .../targets/flatpak_remote/tasks/main.yml | 22 ++++----------- tests/integration/targets/gem/tasks/main.yml | 20 +++----------- .../targets/ini_file/tasks/main.yml | 19 +++---------- .../targets/ipify_facts/tasks/main.yml | 21 +++------------ .../targets/iso_extract/tasks/7zip.yml | 22 ++++----------- .../targets/iso_extract/tasks/main.yml | 22 ++++----------- .../targets/iso_extract/tasks/prepare.yml | 22 ++++----------- .../targets/iso_extract/tasks/tests.yml | 22 ++++----------- .../integration/targets/jboss/tasks/jboss.yml | 2 ++ .../targets/locale_gen/tasks/main.yml | 20 +++----------- tests/integration/targets/npm/tasks/main.yml | 19 +++---------- .../targets/sefcontext/tasks/main.yml | 20 +++----------- .../targets/sefcontext/tasks/sefcontext.yml | 20 +++----------- .../targets/setup_etcd3/tasks/main.yml | 21 +++------------ tests/integration/targets/yarn/tasks/main.yml | 20 +++----------- .../integration/targets/zypper/tasks/main.yml | 27 +++++-------------- .../targets/zypper_repository/tasks/main.yml | 21 +++------------ tests/unit/compat/builtins.py | 19 +++---------- tests/unit/compat/mock.py | 19 +++---------- tests/unit/compat/unittest.py | 19 +++---------- tests/unit/plugins/cache/test_memcached.py | 19 +++---------- tests/unit/plugins/cache/test_redis.py | 19 +++---------- tests/unit/plugins/callback/test_splunk.py | 18 +++---------- tests/unit/plugins/connection/test_lxc.py | 20 +++----------- tests/unit/plugins/inventory/test_cobbler.py | 18 ++----------- tests/unit/plugins/inventory/test_linode.py | 18 ++----------- tests/unit/plugins/lookup/test_lastpass.py | 19 +++---------- .../plugins/module_utils/test_saslprep.py | 2 ++ 61 files changed, 205 insertions(+), 837 deletions(-) diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml index 8c7c8345a6..b408cf7834 100644 --- a/changelogs/fragments/licenses.yml +++ b/changelogs/fragments/licenses.yml @@ -1,3 +1,3 @@ minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083)." + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083)." - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/plugins/callback/splunk.py b/plugins/callback/splunk.py index cb63d3b23f..701cbfdebd 100644 --- a/plugins/callback/splunk.py +++ b/plugins/callback/splunk.py @@ -1,18 +1,7 @@ # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/callback/sumologic.py b/plugins/callback/sumologic.py index b1ce85af77..0b6c9b6fee 100644 --- a/plugins/callback/sumologic.py +++ b/plugins/callback/sumologic.py @@ -1,18 +1,7 @@ # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index 19634340b9..8f83871407 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -1,20 +1,7 @@ # -*- coding: utf-8 -*- -# (c) 2015, Filipe Niero Felisbino -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2015, Filipe Niero Felisbino +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # contributed by Kelly Brazil diff --git a/plugins/filter/json_query.py b/plugins/filter/json_query.py index 7b04455181..9e8fa4ef2e 100644 --- a/plugins/filter/json_query.py +++ b/plugins/filter/json_query.py @@ -1,20 +1,7 @@ # -*- coding: utf-8 -*- -# (c) 2015, Filipe Niero Felisbino -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2015, Filipe Niero Felisbino +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/filter/random_mac.py b/plugins/filter/random_mac.py index 544cd0aa0b..662c62b07c 100644 --- a/plugins/filter/random_mac.py +++ b/plugins/filter/random_mac.py @@ -1,20 +1,7 @@ # -*- coding: utf-8 -*- -# (c) 2020 Ansible Project -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2020 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/lookup/etcd.py b/plugins/lookup/etcd.py index 0c81d0215b..8f7c4954d1 100644 --- a/plugins/lookup/etcd.py +++ b/plugins/lookup/etcd.py @@ -1,22 +1,10 @@ # -*- coding: utf-8 -*- -# (c) 2013, Jan-Piet Mens +# Copyright (c) 2013, Jan-Piet Mens # (m) 2016, Mihai Moldovanu # (m) 2017, Juan Manuel Parrilla -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/module_utils/_mount.py b/plugins/module_utils/_mount.py index 5a3dece95e..07fff92053 100644 --- a/plugins/module_utils/_mount.py +++ b/plugins/module_utils/_mount.py @@ -4,6 +4,7 @@ # Lib/posixpath.py of cpython # It is licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # (See LICENSES/PSF-2.0.txt in this collection) +# SPDX-License-Identifier: PSF-2.0 from __future__ import absolute_import, division, print_function diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 19430e9077..1769d6c48f 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -1,30 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Eike Frost -# -# This code is part of Ansible, but is an independent component. -# This particular file snippet, and this file snippet only, is BSD licensed. -# Modules you write using this snippet, which is embedded dynamically by Ansible -# still belong to the author of the module, and may assign their own license -# to the complete work. -# -# Redistribution and use in source and binary forms, with or without modification, -# are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD 2-Clause license (see LICENSES/BSD-2-Clause.txt) +# SPDX-License-Identifier: BSD-2-Clause from __future__ import absolute_import, division, print_function diff --git a/plugins/module_utils/scaleway.py b/plugins/module_utils/scaleway.py index e6fb8109cc..4c1a475689 100644 --- a/plugins/module_utils/scaleway.py +++ b/plugins/module_utils/scaleway.py @@ -1,4 +1,8 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py index 26c621f44b..c7cacdccf5 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py @@ -1,24 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# # Copyright (c) 2016 Dimension Data -# -# This module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This software is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this software. If not, see . +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # # Authors: # - Adam Friedman -# from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py index d46ce38897..e891954a61 100644 --- a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py @@ -1,19 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py index 5f541a878c..d5147bc9d7 100644 --- a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py +++ b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py @@ -1,19 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py index 28dd0d41c5..a283d9c49b 100644 --- a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py @@ -1,19 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/oneandone/oneandone_private_network.py b/plugins/modules/cloud/oneandone/oneandone_private_network.py index 6a16cf683e..9a80f0075c 100644 --- a/plugins/modules/cloud/oneandone/oneandone_private_network.py +++ b/plugins/modules/cloud/oneandone/oneandone_private_network.py @@ -1,19 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/oneandone/oneandone_public_ip.py b/plugins/modules/cloud/oneandone/oneandone_public_ip.py index 96b1c9f3a5..b46bcae8ba 100644 --- a/plugins/modules/cloud/oneandone/oneandone_public_ip.py +++ b/plugins/modules/cloud/oneandone/oneandone_public_ip.py @@ -1,19 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/oneandone/oneandone_server.py b/plugins/modules/cloud/oneandone/oneandone_server.py index 375a55a813..8275162d1a 100644 --- a/plugins/modules/cloud/oneandone/oneandone_server.py +++ b/plugins/modules/cloud/oneandone/oneandone_server.py @@ -1,19 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/cloud/opennebula/one_image.py b/plugins/modules/cloud/opennebula/one_image.py index 5a80306fd1..e65d43553c 100644 --- a/plugins/modules/cloud/opennebula/one_image.py +++ b/plugins/modules/cloud/opennebula/one_image.py @@ -1,5 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/cloud/opennebula/one_image_info.py b/plugins/modules/cloud/opennebula/one_image_info.py index e03b8ad724..e94d41fcda 100644 --- a/plugins/modules/cloud/opennebula/one_image_info.py +++ b/plugins/modules/cloud/opennebula/one_image_info.py @@ -1,5 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index c6de47a50b..e1b92aaa27 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -1,5 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/cloud/opennebula/one_vm.py b/plugins/modules/cloud/opennebula/one_vm.py index 86061f73cb..e0140f3350 100644 --- a/plugins/modules/cloud/opennebula/one_vm.py +++ b/plugins/modules/cloud/opennebula/one_vm.py @@ -1,5 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/net_tools/ip_netns.py b/plugins/modules/net_tools/ip_netns.py index 00f1112bc0..e719874f7d 100644 --- a/plugins/modules/net_tools/ip_netns.py +++ b/plugins/modules/net_tools/ip_netns.py @@ -1,21 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Arie Bregman -# -# This file is a module for Ansible that interacts with Network Manager -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, Arie Bregman +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/notification/bearychat.py b/plugins/modules/notification/bearychat.py index 4c907ea6b7..e66b736d75 100644 --- a/plugins/modules/notification/bearychat.py +++ b/plugins/modules/notification/bearychat.py @@ -1,22 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - -# (c) 2016, Jiangge Zhang -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2016, Jiangge Zhang +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/modules/remote_management/manageiq/manageiq_group.py b/plugins/modules/remote_management/manageiq/manageiq_group.py index 2452e101d1..a1fbc758b6 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_group.py +++ b/plugins/modules/remote_management/manageiq/manageiq_group.py @@ -1,22 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# -# (c) 2018, Evert Mulder (base on manageiq_user.py by Daniel Korn ) -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2018, Evert Mulder (base on manageiq_user.py by Daniel Korn ) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/remote_management/manageiq/manageiq_tenant.py b/plugins/modules/remote_management/manageiq/manageiq_tenant.py index 58c2e1ed71..2cd8deea64 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tenant.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tenant.py @@ -1,22 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# -# (c) 2018, Evert Mulder (base on manageiq_user.py by Daniel Korn ) -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2018, Evert Mulder (base on manageiq_user.py by Daniel Korn ) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/remote_management/manageiq/manageiq_user.py b/plugins/modules/remote_management/manageiq/manageiq_user.py index f3dc8103f7..42a507924f 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_user.py +++ b/plugins/modules/remote_management/manageiq/manageiq_user.py @@ -1,22 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# -# (c) 2017, Daniel Korn -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, Daniel Korn +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/plugins/modules/system/selogin.py b/plugins/modules/system/selogin.py index 46daf1a76a..5d90961ab4 100644 --- a/plugins/modules/system/selogin.py +++ b/plugins/modules/system/selogin.py @@ -1,21 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - -# (c) 2017, Petr Lautrbach +# Copyright (c) 2017, Petr Lautrbach # Based on seport.py module (c) 2014, Dan Keder - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/tests/integration/targets/apache2_module/tasks/actualtest.yml b/tests/integration/targets/apache2_module/tasks/actualtest.yml index 886e746f07..156b54047d 100644 --- a/tests/integration/targets/apache2_module/tasks/actualtest.yml +++ b/tests/integration/targets/apache2_module/tasks/actualtest.yml @@ -1,17 +1,7 @@ -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: disable userdir module community.general.apache2_module: diff --git a/tests/integration/targets/archive/tasks/main.yml b/tests/integration/targets/archive/tasks/main.yml index e7b6c44175..29742ccf9c 100644 --- a/tests/integration/targets/archive/tasks/main.yml +++ b/tests/integration/targets/archive/tasks/main.yml @@ -1,25 +1,14 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # Test code for the archive module. -# (c) 2017, Abhijeet Kasurde +# Copyright (c) 2017, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . # Make sure we start fresh # Test setup diff --git a/tests/integration/targets/archive/tests/core.yml b/tests/integration/targets/archive/tests/core.yml index f3ae906429..1c4f4d1aaf 100644 --- a/tests/integration/targets/archive/tests/core.yml +++ b/tests/integration/targets/archive/tests/core.yml @@ -1,25 +1,14 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # Test code for the archive module. -# (c) 2017, Abhijeet Kasurde +# Copyright (c) 2017, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . # Make sure we start fresh # Core functionality tests diff --git a/tests/integration/targets/etcd3/tasks/main.yml b/tests/integration/targets/etcd3/tasks/main.yml index a5f1c78add..2fe7435dc9 100644 --- a/tests/integration/targets/etcd3/tasks/main.yml +++ b/tests/integration/targets/etcd3/tasks/main.yml @@ -5,22 +5,9 @@ #################################################################### # test code for the etcd3 module -# (c) 2017, Jean-Philippe Evrard - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, Jean-Philippe Evrard +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ============================================================ diff --git a/tests/integration/targets/etcd3/tasks/run_tests.yml b/tests/integration/targets/etcd3/tasks/run_tests.yml index 66b53830bd..4bd8fa4ec3 100644 --- a/tests/integration/targets/etcd3/tasks/run_tests.yml +++ b/tests/integration/targets/etcd3/tasks/run_tests.yml @@ -1,22 +1,9 @@ --- # test code for the etcd3 module -# (c) 2017, Jean-Philippe Evrard -# 2020, SCC France, Eric Belhomme - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, Jean-Philippe Evrard +# Copyright 2020, SCC France, Eric Belhomme +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ============================================================ diff --git a/tests/integration/targets/flatpak/tasks/main.yml b/tests/integration/targets/flatpak/tasks/main.yml index 68d41d2efe..deaf354e8a 100644 --- a/tests/integration/targets/flatpak/tasks/main.yml +++ b/tests/integration/targets/flatpak/tasks/main.yml @@ -1,25 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### -# (c) 2018, Alexander Bethke -# (c) 2018, Ansible Project - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2018, Alexander Bethke +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - block: diff --git a/tests/integration/targets/flatpak_remote/tasks/main.yml b/tests/integration/targets/flatpak_remote/tasks/main.yml index 91fa7262df..1c50912328 100644 --- a/tests/integration/targets/flatpak_remote/tasks/main.yml +++ b/tests/integration/targets/flatpak_remote/tasks/main.yml @@ -1,25 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### -# (c) 2018, Alexander Bethke -# (c) 2018, Ansible Project - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2018, Alexander Bethke +# Copyright (c) 2018, Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - block: diff --git a/tests/integration/targets/gem/tasks/main.yml b/tests/integration/targets/gem/tasks/main.yml index 1e6cd25ff7..edf813ba4a 100644 --- a/tests/integration/targets/gem/tasks/main.yml +++ b/tests/integration/targets/gem/tasks/main.yml @@ -1,25 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # test code for the gem module -# (c) 2014, James Tanner - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2014, James Tanner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - when: - not (ansible_os_family == 'Alpine') # TODO diff --git a/tests/integration/targets/ini_file/tasks/main.yml b/tests/integration/targets/ini_file/tasks/main.yml index b3a1c85531..11c5bf3b23 100644 --- a/tests/integration/targets/ini_file/tasks/main.yml +++ b/tests/integration/targets/ini_file/tasks/main.yml @@ -5,22 +5,9 @@ #################################################################### # test code for ini_file plugins -# (c) 2017 Red Hat Inc. - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017 Red Hat Inc. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: record the output directory set_fact: diff --git a/tests/integration/targets/ipify_facts/tasks/main.yml b/tests/integration/targets/ipify_facts/tasks/main.yml index 7b620ff9ec..78e44e9462 100644 --- a/tests/integration/targets/ipify_facts/tasks/main.yml +++ b/tests/integration/targets/ipify_facts/tasks/main.yml @@ -1,26 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # Test code for the ipify_facts -# (c) 2017, Abhijeet Kasurde - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . -# +# Copyright (c) 2017, Abhijeet Kasurde +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - debug: var=ansible_distribution - debug: var=ansible_distribution_version diff --git a/tests/integration/targets/iso_extract/tasks/7zip.yml b/tests/integration/targets/iso_extract/tasks/7zip.yml index a6bf95ad84..3d3c12250a 100644 --- a/tests/integration/targets/iso_extract/tasks/7zip.yml +++ b/tests/integration/targets/iso_extract/tasks/7zip.yml @@ -1,21 +1,9 @@ +--- # Test code for the iso_extract module. -# (c) 2017, James Tanner -# (c) 2017, Dag Wieers - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, James Tanner +# Copyright (c) 2017, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Gather facts setup: diff --git a/tests/integration/targets/iso_extract/tasks/main.yml b/tests/integration/targets/iso_extract/tasks/main.yml index 15f270cb05..4a7097de8a 100644 --- a/tests/integration/targets/iso_extract/tasks/main.yml +++ b/tests/integration/targets/iso_extract/tasks/main.yml @@ -1,26 +1,14 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # Test code for the iso_extract module. -# (c) 2017, James Tanner -# (c) 2017, Dag Wieers - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, James Tanner +# Copyright (c) 2017, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - set_fact: output_test_dir: '{{ remote_tmp_dir }}/test_iso_extract' diff --git a/tests/integration/targets/iso_extract/tasks/prepare.yml b/tests/integration/targets/iso_extract/tasks/prepare.yml index 4e240caca6..57e10c0dbb 100644 --- a/tests/integration/targets/iso_extract/tasks/prepare.yml +++ b/tests/integration/targets/iso_extract/tasks/prepare.yml @@ -1,21 +1,9 @@ +--- # Test code for the iso_extract module. -# (c) 2017, James Tanner -# (c) 2017, Dag Wieers - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, James Tanner +# Copyright (c) 2017, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Make sure our testing sub-directory does not exist file: diff --git a/tests/integration/targets/iso_extract/tasks/tests.yml b/tests/integration/targets/iso_extract/tasks/tests.yml index 1475027adf..6919a7c2e3 100644 --- a/tests/integration/targets/iso_extract/tasks/tests.yml +++ b/tests/integration/targets/iso_extract/tasks/tests.yml @@ -1,21 +1,9 @@ +--- # Test code for the iso_extract module. -# (c) 2017, James Tanner -# (c) 2017, Dag Wieers - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2017, James Tanner +# Copyright (c) 2017, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: Extract the iso iso_extract: diff --git a/tests/integration/targets/jboss/tasks/jboss.yml b/tests/integration/targets/jboss/tasks/jboss.yml index fe9d6f394a..ec04a13f26 100644 --- a/tests/integration/targets/jboss/tasks/jboss.yml +++ b/tests/integration/targets/jboss/tasks/jboss.yml @@ -1,6 +1,8 @@ +--- # Copyright (c) 2019, Andrew Klychkov (@Andersson007) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # Integration tests for jboss module. +# SPDX-License-Identifier: GPL-3.0-or-later # helloworld.war (got from https://github.com/aeimer/java-example-helloworld-war/) license: # MIT License diff --git a/tests/integration/targets/locale_gen/tasks/main.yml b/tests/integration/targets/locale_gen/tasks/main.yml index 7ceb35fd49..1616f8fc32 100644 --- a/tests/integration/targets/locale_gen/tasks/main.yml +++ b/tests/integration/targets/locale_gen/tasks/main.yml @@ -1,24 +1,12 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### -# (c) 2014, James Tanner - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2014, James Tanner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - include: 'locale_gen.yml' when: ansible_distribution in ('Ubuntu', 'Debian') diff --git a/tests/integration/targets/npm/tasks/main.yml b/tests/integration/targets/npm/tasks/main.yml index 8e1d388e2c..500e15fdb5 100644 --- a/tests/integration/targets/npm/tasks/main.yml +++ b/tests/integration/targets/npm/tasks/main.yml @@ -1,24 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # test code for the npm module - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ------------------------------------------------------------- # Setup steps diff --git a/tests/integration/targets/sefcontext/tasks/main.yml b/tests/integration/targets/sefcontext/tasks/main.yml index e450dee977..8eeac62fb5 100644 --- a/tests/integration/targets/sefcontext/tasks/main.yml +++ b/tests/integration/targets/sefcontext/tasks/main.yml @@ -1,24 +1,12 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### -# (c) 2016, Dag Wieers - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2016, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # FIXME: Unfortunately ansible_selinux could be a boolean or a dictionary ! - debug: diff --git a/tests/integration/targets/sefcontext/tasks/sefcontext.yml b/tests/integration/targets/sefcontext/tasks/sefcontext.yml index b452ea28c2..e4d2d50baa 100644 --- a/tests/integration/targets/sefcontext/tasks/sefcontext.yml +++ b/tests/integration/targets/sefcontext/tasks/sefcontext.yml @@ -1,19 +1,7 @@ -# (c) 2016, Dag Wieers - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +--- +# Copyright (c) 2016, Dag Wieers +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - name: install requirements for RHEL package: diff --git a/tests/integration/targets/setup_etcd3/tasks/main.yml b/tests/integration/targets/setup_etcd3/tasks/main.yml index de7697e927..ddd7ab8988 100644 --- a/tests/integration/targets/setup_etcd3/tasks/main.yml +++ b/tests/integration/targets/setup_etcd3/tasks/main.yml @@ -5,23 +5,10 @@ #################################################################### # setup etcd3 for integration tests on module/lookup -# (c) 2017, Jean-Philippe Evrard -# 2020, SCC France, Eric Belhomme - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright 2017, Jean-Philippe Evrard +# Copyright 2020, SCC France, Eric Belhomme +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ============================================================ diff --git a/tests/integration/targets/yarn/tasks/main.yml b/tests/integration/targets/yarn/tasks/main.yml index 83ddea760f..e8f4d0e6a2 100644 --- a/tests/integration/targets/yarn/tasks/main.yml +++ b/tests/integration/targets/yarn/tasks/main.yml @@ -1,25 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # Yarn package manager integration tests -# (c) 2018 David Gunter, - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2018 David Gunter, +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # ============================================================ diff --git a/tests/integration/targets/zypper/tasks/main.yml b/tests/integration/targets/zypper/tasks/main.yml index b0181e6930..e12c64839d 100644 --- a/tests/integration/targets/zypper/tasks/main.yml +++ b/tests/integration/targets/zypper/tasks/main.yml @@ -1,30 +1,15 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### -# test code for the zyppe module -# -# (c) 2015, Guido Günther -# +# test code for the zypper module +# Copyright 2015, Guido Günther # heavily based on the yum tests which are -# -# (c) 2014, James Tanner - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright 2014, James Tanner +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - include: 'zypper.yml' when: ansible_os_family == 'Suse' diff --git a/tests/integration/targets/zypper_repository/tasks/main.yml b/tests/integration/targets/zypper_repository/tasks/main.yml index bbba3bcc5b..67fd4dde35 100644 --- a/tests/integration/targets/zypper_repository/tasks/main.yml +++ b/tests/integration/targets/zypper_repository/tasks/main.yml @@ -1,26 +1,13 @@ +--- #################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### # test code for the zypper repository module -# -# (c) 2016, Guido Günther - -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2016, Guido Günther +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later - include: 'test.yml' when: ansible_os_family == 'Suse' diff --git a/tests/unit/compat/builtins.py b/tests/unit/compat/builtins.py index f60ee67822..b0cc618676 100644 --- a/tests/unit/compat/builtins.py +++ b/tests/unit/compat/builtins.py @@ -1,19 +1,6 @@ -# (c) 2014, Toshio Kuratomi -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2014, Toshio Kuratomi +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/compat/mock.py b/tests/unit/compat/mock.py index 0972cd2e8e..f8f565dcf3 100644 --- a/tests/unit/compat/mock.py +++ b/tests/unit/compat/mock.py @@ -1,19 +1,6 @@ -# (c) 2014, Toshio Kuratomi -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2014, Toshio Kuratomi +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/compat/unittest.py b/tests/unit/compat/unittest.py index 98f08ad6a8..1872e58337 100644 --- a/tests/unit/compat/unittest.py +++ b/tests/unit/compat/unittest.py @@ -1,19 +1,6 @@ -# (c) 2014, Toshio Kuratomi -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2014, Toshio Kuratomi +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/cache/test_memcached.py b/tests/unit/plugins/cache/test_memcached.py index bfa9deec6c..8e203cfabc 100644 --- a/tests/unit/plugins/cache/test_memcached.py +++ b/tests/unit/plugins/cache/test_memcached.py @@ -1,19 +1,6 @@ -# (c) 2012-2015, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2012-2015, Michael DeHaan +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/cache/test_redis.py b/tests/unit/plugins/cache/test_redis.py index 9fdc3584ec..26f97c127e 100644 --- a/tests/unit/plugins/cache/test_redis.py +++ b/tests/unit/plugins/cache/test_redis.py @@ -1,19 +1,6 @@ -# (c) 2012-2015, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2012-2015, Michael DeHaan +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/callback/test_splunk.py b/tests/unit/plugins/callback/test_splunk.py index 3230228da1..595d1530b6 100644 --- a/tests/unit/plugins/callback/test_splunk.py +++ b/tests/unit/plugins/callback/test_splunk.py @@ -1,17 +1,7 @@ -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/connection/test_lxc.py b/tests/unit/plugins/connection/test_lxc.py index 28bfc33156..4a1139d6e9 100644 --- a/tests/unit/plugins/connection/test_lxc.py +++ b/tests/unit/plugins/connection/test_lxc.py @@ -1,20 +1,6 @@ -# -# (c) 2020 Red Hat Inc. -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2020 Red Hat Inc. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/inventory/test_cobbler.py b/tests/unit/plugins/inventory/test_cobbler.py index e184d166dc..6db9b91cbc 100644 --- a/tests/unit/plugins/inventory/test_cobbler.py +++ b/tests/unit/plugins/inventory/test_cobbler.py @@ -1,21 +1,7 @@ # -*- coding: utf-8 -*- - # Copyright 2020 Orion Poplawski -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/inventory/test_linode.py b/tests/unit/plugins/inventory/test_linode.py index d6c1794a91..60b3c8cb68 100644 --- a/tests/unit/plugins/inventory/test_linode.py +++ b/tests/unit/plugins/inventory/test_linode.py @@ -1,21 +1,7 @@ # -*- coding: utf-8 -*- - # Copyright 2018 Luke Murphy -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/tests/unit/plugins/lookup/test_lastpass.py b/tests/unit/plugins/lookup/test_lastpass.py index 7002d48762..f9749716d7 100644 --- a/tests/unit/plugins/lookup/test_lastpass.py +++ b/tests/unit/plugins/lookup/test_lastpass.py @@ -1,19 +1,6 @@ -# (c)2016 Andrew Zenk -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright (c) 2016 Andrew Zenk +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/module_utils/test_saslprep.py b/tests/unit/plugins/module_utils/test_saslprep.py index e3e0405f6b..d7a302248f 100644 --- a/tests/unit/plugins/module_utils/test_saslprep.py +++ b/tests/unit/plugins/module_utils/test_saslprep.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Andrey Tuzhilin # Copyright (c) 2020, Andrew Klychkov (@Andersson007) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type From 2ecaa91f68846b02fd575340a0deef681d9c0e09 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 8 Aug 2022 18:02:56 +1200 Subject: [PATCH 0158/2104] pipx: use CmdRunner (#5085) * pipx: use CmdRunner * added BOTMETA entry for pipx module_utils * add changelog fragment * add missing line * Update plugins/module_utils/pipx.py Co-authored-by: Felix Fontein * Update plugins/module_utils/pipx.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 3 + .../fragments/5085-pipx-use-cmd-runner.yaml | 3 + plugins/module_utils/pipx.py | 50 +++++++++++ plugins/modules/packaging/language/pipx.py | 90 +++++++++---------- 4 files changed, 96 insertions(+), 50 deletions(-) create mode 100644 changelogs/fragments/5085-pipx-use-cmd-runner.yaml create mode 100644 plugins/module_utils/pipx.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 6f6bae2fc6..aff10b2255 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -295,6 +295,9 @@ files: $module_utils/oracle/oci_utils.py: maintainers: $team_oracle labels: cloud + $module_utils/pipx.py: + maintainers: russoz + labels: pipx $module_utils/pure.py: maintainers: $team_purestorage labels: pure pure_storage diff --git a/changelogs/fragments/5085-pipx-use-cmd-runner.yaml b/changelogs/fragments/5085-pipx-use-cmd-runner.yaml new file mode 100644 index 0000000000..f4963e2bea --- /dev/null +++ b/changelogs/fragments/5085-pipx-use-cmd-runner.yaml @@ -0,0 +1,3 @@ +minor_changes: + - pipx module utils - created new module util ``pipx`` providing a ``cmd_runner`` specific for the ``pipx`` module (https://github.com/ansible-collections/community.general/pull/5085). + - pipx - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/5085). diff --git a/plugins/module_utils/pipx.py b/plugins/module_utils/pipx.py new file mode 100644 index 0000000000..5dd02c0422 --- /dev/null +++ b/plugins/module_utils/pipx.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2022, Alexei Znamensky +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +from ansible.module_utils.parsing.convert_bool import boolean +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt + + +_state_map = dict( + install='install', + present='install', + uninstall='uninstall', + absent='uninstall', + uninstall_all='uninstall-all', + inject='inject', + upgrade='upgrade', + upgrade_all='upgrade-all', + reinstall='reinstall', + reinstall_all='reinstall-all', +) + + +def pipx_runner(module, command, **kwargs): + runner = CmdRunner( + module, + command=command, + arg_formats=dict( + + state=fmt.as_map(_state_map), + name=fmt.as_list(), + name_source=fmt.as_func(fmt.unpack_args(lambda n, s: [s] if s else [n])), + install_deps=fmt.as_bool("--include-deps"), + inject_packages=fmt.as_list(), + force=fmt.as_bool("--force"), + include_injected=fmt.as_bool("--include-injected"), + index_url=fmt.as_opt_val('--index-url'), + python=fmt.as_opt_val('--python'), + _list=fmt.as_fixed(['list', '--include-injected', '--json']), + editable=fmt.as_bool("--editable"), + pip_args=fmt.as_opt_val('--pip-args'), + ), + environ_update={'USE_EMOJI': '0'}, + check_rc=True, + **kwargs + ) + return runner diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/packaging/language/pipx.py index f947345777..968d0f7d82 100644 --- a/plugins/modules/packaging/language/pipx.py +++ b/plugins/modules/packaging/language/pipx.py @@ -134,22 +134,13 @@ EXAMPLES = ''' import json -from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdStateModuleHelper, ArgFormat -) +from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper +from ansible_collections.community.general.plugins.module_utils.pipx import pipx_runner + from ansible.module_utils.facts.compat import ansible_facts -_state_map = dict( - present='install', - absent='uninstall', - uninstall_all='uninstall-all', - upgrade_all='upgrade-all', - reinstall_all='reinstall-all', -) - - -class PipX(CmdStateModuleHelper): +class PipX(StateModuleHelper): output_params = ['name', 'source', 'index_url', 'force', 'installdeps'] module = dict( argument_spec=dict( @@ -173,27 +164,11 @@ class PipX(CmdStateModuleHelper): ('state', 'install', ['name']), ('state', 'absent', ['name']), ('state', 'uninstall', ['name']), + # missing upgrade and reinstall requiring 'name' ('state', 'inject', ['name', 'inject_packages']), ], supports_check_mode=True, ) - command_args_formats = dict( - state=dict(fmt=lambda v: [_state_map.get(v, v)]), - name_source=dict(fmt=lambda n, s: [s] if s else [n], stars=1), - install_deps=dict(fmt="--include-deps", style=ArgFormat.BOOLEAN), - inject_packages=dict(fmt=lambda v: v), - force=dict(fmt="--force", style=ArgFormat.BOOLEAN), - include_injected=dict(fmt="--include-injected", style=ArgFormat.BOOLEAN), - index_url=dict(fmt=('--index-url', '{0}'),), - python=dict(fmt=('--python', '{0}'),), - _list=dict(fmt=('list', '--include-injected', '--json'), style=ArgFormat.BOOLEAN), - editable=dict(fmt="--editable", style=ArgFormat.BOOLEAN), - pip_args=dict(fmt=('--pip-args', '{0}'),), - ) - check_rc = True - run_command_fixed_options = dict( - environ_update={'USE_EMOJI': '0'} - ) def _retrieve_installed(self): def process_list(rc, out, err): @@ -211,8 +186,7 @@ class PipX(CmdStateModuleHelper): } return results - installed = self.run_command(params=[{'_list': True}], process_output=process_list, - publish_rc=False, publish_out=False, publish_err=False, publish_cmd=False) + installed = self.runner('_list', output_process=process_list).run(_list=1) if self.vars.name is not None: app_list = installed.get(self.vars.name) @@ -229,19 +203,26 @@ class PipX(CmdStateModuleHelper): else: facts = ansible_facts(self.module, gather_subset=['python']) self.command = [facts['python']['executable'], '-m', 'pipx'] + self.runner = pipx_runner(self.module, self.command) self.vars.set('application', self._retrieve_installed(), change=True, diff=True) def __quit_module__(self): self.vars.application = self._retrieve_installed() + def _capture_results(self, ctx): + self.vars.stdout = ctx.results_out + self.vars.stderr = ctx.results_err + self.vars.cmd = ctx.cmd + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info + def state_install(self): if not self.vars.application or self.vars.force: self.changed = True - if not self.module.check_mode: - self.run_command(params=[ - 'state', 'index_url', 'install_deps', 'force', 'python', 'editable', 'pip_args', - {'name_source': [self.vars.name, self.vars.source]}]) + with self.runner('state index_url install_deps force python editable pip_args name_source', check_mode_skip=True) as ctx: + ctx.run(name_source=[self.vars.name, self.vars.source]) + self._capture_results(ctx) state_present = state_install @@ -250,12 +231,16 @@ class PipX(CmdStateModuleHelper): self.do_raise("Trying to upgrade a non-existent application: {0}".format(self.vars.name)) if self.vars.force: self.changed = True - if not self.module.check_mode: - self.run_command(params=['state', 'index_url', 'install_deps', 'force', 'editable', 'pip_args', 'name']) + + with self.runner('state index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx: + ctx.run() + self._capture_results(ctx) def state_uninstall(self): - if self.vars.application and not self.module.check_mode: - self.run_command(params=['state', 'name']) + if self.vars.application: + with self.runner('state name', check_mode_skip=True) as ctx: + ctx.run() + self._capture_results(ctx) state_absent = state_uninstall @@ -263,30 +248,35 @@ class PipX(CmdStateModuleHelper): if not self.vars.application: self.do_raise("Trying to reinstall a non-existent application: {0}".format(self.vars.name)) self.changed = True - if not self.module.check_mode: - self.run_command(params=['state', 'name', 'python']) + with self.runner('state name python', check_mode_skip=True) as ctx: + ctx.run() + self._capture_results(ctx) def state_inject(self): if not self.vars.application: self.do_raise("Trying to inject packages into a non-existent application: {0}".format(self.vars.name)) if self.vars.force: self.changed = True - if not self.module.check_mode: - self.run_command(params=['state', 'index_url', 'force', 'editable', 'pip_args', 'name', 'inject_packages']) + with self.runner('state index_url force editable pip_args name inject_packages', check_mode_skip=True) as ctx: + ctx.run() + self._capture_results(ctx) def state_uninstall_all(self): - if not self.module.check_mode: - self.run_command(params=['state']) + with self.runner('state', check_mode_skip=True) as ctx: + ctx.run() + self._capture_results(ctx) def state_reinstall_all(self): - if not self.module.check_mode: - self.run_command(params=['state', 'python']) + with self.runner('state python', check_mode_skip=True) as ctx: + ctx.run() + self._capture_results(ctx) def state_upgrade_all(self): if self.vars.force: self.changed = True - if not self.module.check_mode: - self.run_command(params=['state', 'include_injected', 'force']) + with self.runner('state include_injected force', check_mode_skip=True) as ctx: + ctx.run() + self._capture_results(ctx) def main(): From 9327b12c4d67a30eefba7cd8123cb5223ef05910 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 8 Aug 2022 08:44:19 +0200 Subject: [PATCH 0159/2104] Add more default license and copyright notices (#5087) * Add more default license and copyright notices. * Fix tests. * Fix typos. * Fix task type. * Add URL to changelog fragment. * Improve headers for setup_wildfly_server. --- .azure-pipelines/README.md | 6 ++++++ .gitignore | 3 +++ CONTRIBUTING.md | 6 ++++++ README.md | 6 ++++++ changelogs/.gitignore | 4 ++++ changelogs/fragments/licenses.yml | 2 +- commit-rights.md | 6 ++++++ .../helper/lists_mergeby/examples_all.rst.j2 | 5 +++++ ...tions_merging_lists_of_dictionaries.rst.j2 | 5 +++++ .../docsite/helper/lists_mergeby/list3.out.j2 | 5 +++++ docs/docsite/rst/filter_guide.rst | 4 ++++ .../filter_guide_abstract_informations.rst | 5 +++++ ...rmations_counting_elements_in_sequence.rst | 5 +++++ ...ide_abstract_informations_dictionaries.rst | 5 +++++ ...r_guide_abstract_informations_grouping.rst | 5 +++++ ...rmations_merging_lists_of_dictionaries.rst | 5 +++++ docs/docsite/rst/filter_guide_conversions.rst | 5 +++++ .../rst/filter_guide_creating_identifiers.rst | 5 +++++ docs/docsite/rst/filter_guide_paths.rst | 5 +++++ .../rst/filter_guide_selecting_json_data.rst | 5 +++++ .../rst/filter_guide_working_with_times.rst | 5 +++++ .../rst/filter_guide_working_with_unicode.rst | 5 +++++ .../filter_guide_working_with_versions.rst | 5 +++++ docs/docsite/rst/test_guide.rst | 5 +++++ tests/.gitignore | 4 ++++ .../alternatives/templates/dummy_alternative | 5 +++++ .../alternatives/templates/dummy_command | 4 ++++ .../integration/targets/archive/files/bar.txt | 4 ++++ .../integration/targets/archive/files/foo.txt | 4 ++++ .../test_connection.inventory | 4 ++++ .../connection_jail/test_connection.inventory | 4 ++++ .../connection_lxc/test_connection.inventory | 4 ++++ .../connection_lxd/test_connection.inventory | 4 ++++ .../consul/templates/consul_config.hcl.j2 | 5 +++++ tests/integration/targets/discord/README.md | 6 ++++++ .../targets/git_config/files/gitconfig | 4 ++++ .../interfaces_file/files/interfaces_ff | 4 ++++ .../interfaces_file/files/interfaces_ff_3841 | 4 ++++ .../targets/iso_create/files/test1.cfg | 5 +++++ .../iso_create/files/test_dir/test2.cfg | 5 +++++ .../iso_extract/files/test.iso.license | 3 +++ .../java_cert/files/testpkcs.p12.license | 3 +++ .../targets/kernel_blacklist/files/blacklist | 4 ++++ .../targets/kernel_blacklist/tasks/main.yml | 19 ++++++++++++++++++- .../targets/keycloak_client/README.md | 6 ++++++ .../templates/launchd.test.service.plist.j2 | 5 +++++ .../modified.launchd.test.service.plist.j2 | 5 +++++ .../testns/testcoll_mf/FILES.json.license | 3 +++ .../testns/testcoll_mf/MANIFEST.json.license | 3 +++ .../templates/input.license | 3 +++ .../templates/security-privacy.repo.j2 | 6 ++++++ .../targets/mail/files/smtpserver.crt | 4 ++++ .../targets/mail/files/smtpserver.key | 4 ++++ .../targets/monit/templates/monitrc.j2 | 6 ++++++ tests/integration/targets/nomad/files/job.hcl | 4 ++++ .../tmp/opennebula-fixtures.json.gz.license | 3 +++ .../tmp/opennebula-fixtures.json.gz.license | 3 +++ .../pam_limits/files/test_pam_limits.conf | 4 ++++ .../pkgng/templates/MANIFEST.json.j2.license | 3 +++ .../targets/setup_flatpak_remote/README.md | 6 ++++++ .../files/repo.tar.xz.license | 3 +++ .../setup_mosquitto/files/mosquitto.conf | 4 ++++ .../files/initial_config.ldif.license | 3 +++ .../files/rootpw_cnconfig.ldif.license | 3 +++ .../setup_postgresql_db/files/dummy--1.0.sql | 4 ++++ .../setup_postgresql_db/files/dummy--2.0.sql | 4 ++++ .../setup_postgresql_db/files/dummy--3.0.sql | 4 ++++ .../files/dummy.control.license | 3 +++ .../setup_postgresql_db/files/pg_hba.conf | 4 ++++ .../setup_wildfly_server/files/wildfly.conf | 4 ++++ .../templates/launch.sh.j2 | 3 +++ .../templates/wildfly.service.j2 | 4 ++++ .../supervisorctl/templates/supervisord.conf | 6 ++++++ .../integration/targets/terraform/.gitignore | 4 ++++ .../templates/provider_test/main.tf.j2 | 5 +++++ .../ansible-xml-beers-unicode.xml.license | 3 +++ .../fixtures/ansible-xml-beers.xml.license | 3 +++ .../ansible-xml-namespaced-beers.xml.license | 3 +++ ...-add-children-elements-unicode.xml.license | 3 +++ .../test-add-children-elements.xml.license | 3 +++ ...st-add-children-from-groupvars.xml.license | 3 +++ .../test-add-children-insertafter.xml.license | 3 +++ ...test-add-children-insertbefore.xml.license | 3 +++ ...ildren-with-attributes-unicode.xml.license | 3 +++ ...t-add-children-with-attributes.xml.license | 3 +++ .../test-add-element-implicitly.xml.license | 3 +++ ...d-namespaced-children-elements.xml.license | 3 +++ .../test-pretty-print-only.xml.license | 3 +++ .../xml/results/test-pretty-print.xml.license | 3 +++ .../results/test-remove-attribute.xml.license | 3 +++ .../results/test-remove-element.xml.license | 3 +++ ...st-remove-namespaced-attribute.xml.license | 3 +++ ...test-remove-namespaced-element.xml.license | 3 +++ ...st-set-attribute-value-unicode.xml.license | 3 +++ .../test-set-attribute-value.xml.license | 3 +++ ...st-set-children-elements-level.xml.license | 3 +++ ...-set-children-elements-unicode.xml.license | 3 +++ .../test-set-children-elements.xml.license | 3 +++ .../test-set-element-value-empty.xml.license | 3 +++ ...test-set-element-value-unicode.xml.license | 3 +++ .../test-set-element-value.xml.license | 3 +++ ...set-namespaced-attribute-value.xml.license | 3 +++ ...t-set-namespaced-element-value.xml.license | 3 +++ tests/integration/targets/yarn/tasks/run.yml | 4 ++-- .../targets/yarn/templates/package.j2 | 5 +++++ .../targets/zypper/files/empty.spec.license | 3 +++ .../zypper/templates/duplicate.spec.j2 | 6 ++++++ .../files/systemsmanagement_Uyuni_Utils.repo | 4 ++++ .../fixtures/lxd_inventory.atd.license | 3 +++ .../opennebula_inventory.json.license | 3 +++ .../ansible-test-vm-1-facts.json.license | 3 +++ .../ansible-test-vm-1-params.json.license | 3 +++ .../ansible-test-vm-2-facts.json.license | 3 +++ .../ansible-test-vm-2-params.json.license | 3 +++ .../ansible-test-vm-3-facts.json.license | 3 +++ .../ansible-test-vm-3-params.json.license | 3 +++ .../modules/system/interfaces_file/README.md | 6 ++++++ ...ddress_family.test_no_changes.json.license | 3 +++ .../address_family.test_no_changes.license | 3 +++ ..._family_add_aggi_up.exceptions.txt.license | 3 +++ .../address_family_add_aggi_up.json.license | 3 +++ .../address_family_add_aggi_up.license | 3 +++ ...y_add_aggi_up_twice.exceptions.txt.license | 3 +++ ...ress_family_add_aggi_up_twice.json.license | 3 +++ .../address_family_add_aggi_up_twice.license | 3 +++ ..._and_delete_aggi_up.exceptions.txt.license | 3 +++ ...family_add_and_delete_aggi_up.json.license | 3 +++ ...ress_family_add_and_delete_aggi_up.license | 3 +++ ...ily_aggi_remove_dup.exceptions.txt.license | 3 +++ ...ddress_family_aggi_remove_dup.json.license | 3 +++ .../address_family_aggi_remove_dup.license | 3 +++ .../address_family_change_ipv4.json.license | 3 +++ .../address_family_change_ipv4.license | 3 +++ ...ss_family_change_ipv4_post_up.json.license | 3 +++ ...address_family_change_ipv4_post_up.license | 3 +++ ...ess_family_change_ipv4_pre_up.json.license | 3 +++ .../address_family_change_ipv4_pre_up.license | 3 +++ .../address_family_change_ipv6.json.license | 3 +++ .../address_family_change_ipv6.license | 3 +++ ...ss_family_change_ipv6_post_up.json.license | 3 +++ ...address_family_change_ipv6_post_up.license | 3 +++ ...ess_family_change_ipv6_pre_up.json.license | 3 +++ .../address_family_change_ipv6_pre_up.license | 3 +++ ...amily_change_method.exceptions.txt.license | 3 +++ .../address_family_change_method.json.license | 3 +++ .../address_family_change_method.license | 3 +++ .../address_family_revert.json.license | 3 +++ .../address_family_revert.license | 3 +++ ...t_aggi_and_eth0_mtu.exceptions.txt.license | 3 +++ ..._family_set_aggi_and_eth0_mtu.json.license | 3 +++ ...dress_family_set_aggi_and_eth0_mtu.license | 3 +++ ...ily_set_aggi_slaves.exceptions.txt.license | 3 +++ ...ddress_family_set_aggi_slaves.json.license | 3 +++ .../address_family_set_aggi_slaves.license | 3 +++ .../default_dhcp.test_no_changes.json.license | 3 +++ .../default_dhcp.test_no_changes.license | 3 +++ ...lt_dhcp_add_aggi_up.exceptions.txt.license | 3 +++ .../default_dhcp_add_aggi_up.json.license | 3 +++ .../default_dhcp_add_aggi_up.license | 3 +++ ...p_add_aggi_up_twice.exceptions.txt.license | 3 +++ ...efault_dhcp_add_aggi_up_twice.json.license | 3 +++ .../default_dhcp_add_aggi_up_twice.license | 3 +++ ..._and_delete_aggi_up.exceptions.txt.license | 3 +++ ...t_dhcp_add_and_delete_aggi_up.json.license | 3 +++ ...efault_dhcp_add_and_delete_aggi_up.license | 3 +++ ...hcp_aggi_remove_dup.exceptions.txt.license | 3 +++ .../default_dhcp_aggi_remove_dup.json.license | 3 +++ .../default_dhcp_aggi_remove_dup.license | 3 +++ .../default_dhcp_change_ipv4.json.license | 3 +++ .../default_dhcp_change_ipv4.license | 3 +++ ...ault_dhcp_change_ipv4_post_up.json.license | 3 +++ .../default_dhcp_change_ipv4_post_up.license | 3 +++ ...fault_dhcp_change_ipv4_pre_up.json.license | 3 +++ .../default_dhcp_change_ipv4_pre_up.license | 3 +++ ...lt_dhcp_change_ipv6.exceptions.txt.license | 3 +++ .../default_dhcp_change_ipv6.json.license | 3 +++ .../default_dhcp_change_ipv6.license | 3 +++ ...change_ipv6_post_up.exceptions.txt.license | 3 +++ ...ault_dhcp_change_ipv6_post_up.json.license | 3 +++ .../default_dhcp_change_ipv6_post_up.license | 3 +++ ..._change_ipv6_pre_up.exceptions.txt.license | 3 +++ ...fault_dhcp_change_ipv6_pre_up.json.license | 3 +++ .../default_dhcp_change_ipv6_pre_up.license | 3 +++ ..._dhcp_change_method.exceptions.txt.license | 3 +++ .../default_dhcp_change_method.json.license | 3 +++ .../default_dhcp_change_method.license | 3 +++ .../default_dhcp_revert.json.license | 3 +++ .../golden_output/default_dhcp_revert.license | 3 +++ ...t_aggi_and_eth0_mtu.exceptions.txt.license | 3 +++ ...lt_dhcp_set_aggi_and_eth0_mtu.json.license | 3 +++ ...default_dhcp_set_aggi_and_eth0_mtu.license | 3 +++ ...hcp_set_aggi_slaves.exceptions.txt.license | 3 +++ .../default_dhcp_set_aggi_slaves.json.license | 3 +++ .../default_dhcp_set_aggi_slaves.license | 3 +++ .../servers.com.test_no_changes.json.license | 3 +++ .../servers.com.test_no_changes.license | 3 +++ .../servers.com_add_aggi_up.json.license | 3 +++ .../servers.com_add_aggi_up.license | 3 +++ ...servers.com_add_aggi_up_twice.json.license | 3 +++ .../servers.com_add_aggi_up_twice.license | 3 +++ ...rs.com_add_and_delete_aggi_up.json.license | 3 +++ ...servers.com_add_and_delete_aggi_up.license | 3 +++ .../servers.com_aggi_remove_dup.json.license | 3 +++ .../servers.com_aggi_remove_dup.license | 3 +++ ...ers.com_change_ipv4.exceptions.txt.license | 3 +++ .../servers.com_change_ipv4.json.license | 3 +++ .../servers.com_change_ipv4.license | 3 +++ ...change_ipv4_post_up.exceptions.txt.license | 3 +++ ...rvers.com_change_ipv4_post_up.json.license | 3 +++ .../servers.com_change_ipv4_post_up.license | 3 +++ ..._change_ipv4_pre_up.exceptions.txt.license | 3 +++ ...ervers.com_change_ipv4_pre_up.json.license | 3 +++ .../servers.com_change_ipv4_pre_up.license | 3 +++ ...ers.com_change_ipv6.exceptions.txt.license | 3 +++ .../servers.com_change_ipv6.json.license | 3 +++ .../servers.com_change_ipv6.license | 3 +++ ...change_ipv6_post_up.exceptions.txt.license | 3 +++ ...rvers.com_change_ipv6_post_up.json.license | 3 +++ .../servers.com_change_ipv6_post_up.license | 3 +++ ..._change_ipv6_pre_up.exceptions.txt.license | 3 +++ ...ervers.com_change_ipv6_pre_up.json.license | 3 +++ .../servers.com_change_ipv6_pre_up.license | 3 +++ .../servers.com_change_method.json.license | 3 +++ .../servers.com_change_method.license | 3 +++ .../servers.com_revert.exceptions.txt.license | 3 +++ .../servers.com_revert.json.license | 3 +++ .../golden_output/servers.com_revert.license | 3 +++ ...t_aggi_and_eth0_mtu.exceptions.txt.license | 3 +++ ...ers.com_set_aggi_and_eth0_mtu.json.license | 3 +++ .../servers.com_set_aggi_and_eth0_mtu.license | 3 +++ .../servers.com_set_aggi_slaves.json.license | 3 +++ .../servers.com_set_aggi_slaves.license | 3 +++ .../up_down_dup.test_no_changes.json.license | 3 +++ .../up_down_dup.test_no_changes.license | 3 +++ .../up_down_dup_add_aggi_up.json.license | 3 +++ .../up_down_dup_add_aggi_up.license | 3 +++ ...up_down_dup_add_aggi_up_twice.json.license | 3 +++ .../up_down_dup_add_aggi_up_twice.license | 3 +++ ...wn_dup_add_and_delete_aggi_up.json.license | 3 +++ ...up_down_dup_add_and_delete_aggi_up.license | 3 +++ .../up_down_dup_aggi_remove_dup.json.license | 3 +++ .../up_down_dup_aggi_remove_dup.license | 3 +++ ...own_dup_change_ipv4.exceptions.txt.license | 3 +++ .../up_down_dup_change_ipv4.json.license | 3 +++ .../up_down_dup_change_ipv4.license | 3 +++ ...change_ipv4_post_up.exceptions.txt.license | 3 +++ ..._down_dup_change_ipv4_post_up.json.license | 3 +++ .../up_down_dup_change_ipv4_post_up.license | 3 +++ ..._change_ipv4_pre_up.exceptions.txt.license | 3 +++ ...p_down_dup_change_ipv4_pre_up.json.license | 3 +++ .../up_down_dup_change_ipv4_pre_up.license | 3 +++ ...own_dup_change_ipv6.exceptions.txt.license | 3 +++ .../up_down_dup_change_ipv6.json.license | 3 +++ .../up_down_dup_change_ipv6.license | 3 +++ ...change_ipv6_post_up.exceptions.txt.license | 3 +++ ..._down_dup_change_ipv6_post_up.json.license | 3 +++ .../up_down_dup_change_ipv6_post_up.license | 3 +++ ..._change_ipv6_pre_up.exceptions.txt.license | 3 +++ ...p_down_dup_change_ipv6_pre_up.json.license | 3 +++ .../up_down_dup_change_ipv6_pre_up.license | 3 +++ ...n_dup_change_method.exceptions.txt.license | 3 +++ .../up_down_dup_change_method.json.license | 3 +++ .../up_down_dup_change_method.license | 3 +++ .../up_down_dup_revert.exceptions.txt.license | 3 +++ .../up_down_dup_revert.json.license | 3 +++ .../golden_output/up_down_dup_revert.license | 3 +++ ...t_aggi_and_eth0_mtu.exceptions.txt.license | 3 +++ ...own_dup_set_aggi_and_eth0_mtu.json.license | 3 +++ .../up_down_dup_set_aggi_and_eth0_mtu.license | 3 +++ .../up_down_dup_set_aggi_slaves.json.license | 3 +++ .../up_down_dup_set_aggi_slaves.license | 3 +++ .../fixtures/input/address_family.license | 3 +++ .../fixtures/input/default_dhcp.license | 3 +++ .../fixtures/input/servers.com.license | 3 +++ .../fixtures/input/up_down_dup.license | 3 +++ .../interfaces_file/test_interfaces_file.py | 1 + tests/unit/requirements.txt | 4 ++++ tests/utils/constraints.txt | 4 ++++ 278 files changed, 957 insertions(+), 4 deletions(-) create mode 100644 tests/integration/targets/iso_extract/files/test.iso.license create mode 100644 tests/integration/targets/java_cert/files/testpkcs.p12.license create mode 100644 tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json.license create mode 100644 tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json.license create mode 100644 tests/integration/targets/lookup_passwordstore/templates/input.license create mode 100644 tests/integration/targets/one_host/files/testhost/tmp/opennebula-fixtures.json.gz.license create mode 100644 tests/integration/targets/one_template/files/testhost/tmp/opennebula-fixtures.json.gz.license create mode 100644 tests/integration/targets/pkgng/templates/MANIFEST.json.j2.license create mode 100644 tests/integration/targets/setup_flatpak_remote/files/repo.tar.xz.license create mode 100644 tests/integration/targets/setup_openldap/files/initial_config.ldif.license create mode 100644 tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif.license create mode 100644 tests/integration/targets/setup_postgresql_db/files/dummy.control.license create mode 100644 tests/integration/targets/xml/fixtures/ansible-xml-beers-unicode.xml.license create mode 100644 tests/integration/targets/xml/fixtures/ansible-xml-beers.xml.license create mode 100644 tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-children-elements-unicode.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-children-elements.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-children-from-groupvars.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-children-insertafter.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-children-insertbefore.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-children-with-attributes.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-element-implicitly.xml.license create mode 100644 tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml.license create mode 100644 tests/integration/targets/xml/results/test-pretty-print-only.xml.license create mode 100644 tests/integration/targets/xml/results/test-pretty-print.xml.license create mode 100644 tests/integration/targets/xml/results/test-remove-attribute.xml.license create mode 100644 tests/integration/targets/xml/results/test-remove-element.xml.license create mode 100644 tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml.license create mode 100644 tests/integration/targets/xml/results/test-remove-namespaced-element.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-attribute-value.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-children-elements-level.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-children-elements-unicode.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-children-elements.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-element-value-empty.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-element-value-unicode.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-element-value.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml.license create mode 100644 tests/integration/targets/xml/results/test-set-namespaced-element-value.xml.license create mode 100644 tests/integration/targets/zypper/files/empty.spec.license create mode 100644 tests/unit/plugins/inventory/fixtures/lxd_inventory.atd.license create mode 100644 tests/unit/plugins/inventory/fixtures/opennebula_inventory.json.license create mode 100644 tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-facts.json.license create mode 100644 tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-params.json.license create mode 100644 tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-facts.json.license create mode 100644 tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-params.json.license create mode 100644 tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-facts.json.license create mode 100644 tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-params.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com.license create mode 100644 tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup.license diff --git a/.azure-pipelines/README.md b/.azure-pipelines/README.md index 385e70bac5..9e8ad74104 100644 --- a/.azure-pipelines/README.md +++ b/.azure-pipelines/README.md @@ -1,3 +1,9 @@ + + ## Azure Pipelines Configuration Please see the [Documentation](https://github.com/ansible/community/wiki/Testing:-Azure-Pipelines) for more information. diff --git a/.gitignore b/.gitignore index c3d5dcb8b7..c39969326d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later # Created by https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks # Edit at https://www.toptal.com/developers/gitignore?templates=vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ea1547f96..ae10c4afc4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,9 @@ + + # Contributing We follow [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) in all our contributions and interactions within this repository. diff --git a/README.md b/README.md index e064b5f378..92a4421393 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + + # Community General Collection [![Build Status](https://dev.azure.com/ansible/community.general/_apis/build/status/CI?branchName=main)](https://dev.azure.com/ansible/community.general/_build?definitionId=31) diff --git a/changelogs/.gitignore b/changelogs/.gitignore index 6be6b5331d..3d7ad8262c 100644 --- a/changelogs/.gitignore +++ b/changelogs/.gitignore @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + /.plugin-cache.yaml diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml index b408cf7834..0b6738f506 100644 --- a/changelogs/fragments/licenses.yml +++ b/changelogs/fragments/licenses.yml @@ -1,3 +1,3 @@ minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083)." + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087)." - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/commit-rights.md b/commit-rights.md index 43836350c5..196565eca7 100644 --- a/commit-rights.md +++ b/commit-rights.md @@ -1,3 +1,9 @@ + + Committers Guidelines for community.general =========================================== diff --git a/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 b/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 index 014ff2d112..95a0fafddc 100644 --- a/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 +++ b/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + {% for i in examples %} {{ i.label }} diff --git a/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 b/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 index 23cb6de07c..71d0d5da6c 100644 --- a/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 +++ b/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Merging lists of dictionaries ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/docsite/helper/lists_mergeby/list3.out.j2 b/docs/docsite/helper/lists_mergeby/list3.out.j2 index 764ce3bd1d..b51f6b8681 100644 --- a/docs/docsite/helper/lists_mergeby/list3.out.j2 +++ b/docs/docsite/helper/lists_mergeby/list3.out.j2 @@ -1,2 +1,7 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} list3: {{ list3|to_nice_yaml(indent=0) }} diff --git a/docs/docsite/rst/filter_guide.rst b/docs/docsite/rst/filter_guide.rst index bab223d344..1c6468ddec 100644 --- a/docs/docsite/rst/filter_guide.rst +++ b/docs/docsite/rst/filter_guide.rst @@ -1,3 +1,7 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later .. _ansible_collections.community.general.docsite.filter_guide: diff --git a/docs/docsite/rst/filter_guide_abstract_informations.rst b/docs/docsite/rst/filter_guide_abstract_informations.rst index 04fb49bdb0..8f997f1637 100644 --- a/docs/docsite/rst/filter_guide_abstract_informations.rst +++ b/docs/docsite/rst/filter_guide_abstract_informations.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Abstract transformations ------------------------ diff --git a/docs/docsite/rst/filter_guide_abstract_informations_counting_elements_in_sequence.rst b/docs/docsite/rst/filter_guide_abstract_informations_counting_elements_in_sequence.rst index c4282abab1..dcadd5a793 100644 --- a/docs/docsite/rst/filter_guide_abstract_informations_counting_elements_in_sequence.rst +++ b/docs/docsite/rst/filter_guide_abstract_informations_counting_elements_in_sequence.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Counting elements in a sequence ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/docsite/rst/filter_guide_abstract_informations_dictionaries.rst b/docs/docsite/rst/filter_guide_abstract_informations_dictionaries.rst index 944eda2ba4..840bd1542c 100644 --- a/docs/docsite/rst/filter_guide_abstract_informations_dictionaries.rst +++ b/docs/docsite/rst/filter_guide_abstract_informations_dictionaries.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Dictionaries ^^^^^^^^^^^^ diff --git a/docs/docsite/rst/filter_guide_abstract_informations_grouping.rst b/docs/docsite/rst/filter_guide_abstract_informations_grouping.rst index 8a46c10ebf..2cea7f9bab 100644 --- a/docs/docsite/rst/filter_guide_abstract_informations_grouping.rst +++ b/docs/docsite/rst/filter_guide_abstract_informations_grouping.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Grouping ^^^^^^^^ diff --git a/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst b/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst index de60869059..9b56e98d7e 100644 --- a/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst +++ b/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Merging lists of dictionaries ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/docsite/rst/filter_guide_conversions.rst b/docs/docsite/rst/filter_guide_conversions.rst index 3214736dcb..78970c17b9 100644 --- a/docs/docsite/rst/filter_guide_conversions.rst +++ b/docs/docsite/rst/filter_guide_conversions.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Conversions ----------- diff --git a/docs/docsite/rst/filter_guide_creating_identifiers.rst b/docs/docsite/rst/filter_guide_creating_identifiers.rst index 4e29f72fcb..af0a8b7bab 100644 --- a/docs/docsite/rst/filter_guide_creating_identifiers.rst +++ b/docs/docsite/rst/filter_guide_creating_identifiers.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Creating identifiers -------------------- diff --git a/docs/docsite/rst/filter_guide_paths.rst b/docs/docsite/rst/filter_guide_paths.rst index b853909b23..dac8931454 100644 --- a/docs/docsite/rst/filter_guide_paths.rst +++ b/docs/docsite/rst/filter_guide_paths.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Paths ----- diff --git a/docs/docsite/rst/filter_guide_selecting_json_data.rst b/docs/docsite/rst/filter_guide_selecting_json_data.rst index c3e52c87fa..d8de07b926 100644 --- a/docs/docsite/rst/filter_guide_selecting_json_data.rst +++ b/docs/docsite/rst/filter_guide_selecting_json_data.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + .. _ansible_collections.community.general.docsite.json_query_filter: Selecting JSON data: JSON queries diff --git a/docs/docsite/rst/filter_guide_working_with_times.rst b/docs/docsite/rst/filter_guide_working_with_times.rst index f218c9972e..dc68f2a2e3 100644 --- a/docs/docsite/rst/filter_guide_working_with_times.rst +++ b/docs/docsite/rst/filter_guide_working_with_times.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Working with times ------------------ diff --git a/docs/docsite/rst/filter_guide_working_with_unicode.rst b/docs/docsite/rst/filter_guide_working_with_unicode.rst index 25e7ba123d..2e5a67f8fa 100644 --- a/docs/docsite/rst/filter_guide_working_with_unicode.rst +++ b/docs/docsite/rst/filter_guide_working_with_unicode.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Working with Unicode --------------------- diff --git a/docs/docsite/rst/filter_guide_working_with_versions.rst b/docs/docsite/rst/filter_guide_working_with_versions.rst index 91cc6aca18..2488427b73 100644 --- a/docs/docsite/rst/filter_guide_working_with_versions.rst +++ b/docs/docsite/rst/filter_guide_working_with_versions.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + Working with versions --------------------- diff --git a/docs/docsite/rst/test_guide.rst b/docs/docsite/rst/test_guide.rst index 2df0ed04cd..b0b7885f9b 100644 --- a/docs/docsite/rst/test_guide.rst +++ b/docs/docsite/rst/test_guide.rst @@ -1,3 +1,8 @@ +.. + Copyright (c) Ansible Project + GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + SPDX-License-Identifier: GPL-3.0-or-later + .. _ansible_collections.community.general.docsite.test_guide: community.general Test (Plugin) Guide diff --git a/tests/.gitignore b/tests/.gitignore index ea1472ec1f..6edf5dc10c 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + output/ diff --git a/tests/integration/targets/alternatives/templates/dummy_alternative b/tests/integration/targets/alternatives/templates/dummy_alternative index 5dce8adde7..9b7136d565 100644 --- a/tests/integration/targets/alternatives/templates/dummy_alternative +++ b/tests/integration/targets/alternatives/templates/dummy_alternative @@ -1,3 +1,8 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} {{ mode }} /usr/bin/dummy diff --git a/tests/integration/targets/alternatives/templates/dummy_command b/tests/integration/targets/alternatives/templates/dummy_command index 332d9fe1a9..afd80e6733 100644 --- a/tests/integration/targets/alternatives/templates/dummy_command +++ b/tests/integration/targets/alternatives/templates/dummy_command @@ -1,2 +1,6 @@ #!/bin/sh +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + echo dummy{{ item }} diff --git a/tests/integration/targets/archive/files/bar.txt b/tests/integration/targets/archive/files/bar.txt index e5dbdfdf8b..32276adb82 100644 --- a/tests/integration/targets/archive/files/bar.txt +++ b/tests/integration/targets/archive/files/bar.txt @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + bar.txt diff --git a/tests/integration/targets/archive/files/foo.txt b/tests/integration/targets/archive/files/foo.txt index 7c6ded14ec..a40d2f0080 100644 --- a/tests/integration/targets/archive/files/foo.txt +++ b/tests/integration/targets/archive/files/foo.txt @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + foo.txt diff --git a/tests/integration/targets/connection_chroot/test_connection.inventory b/tests/integration/targets/connection_chroot/test_connection.inventory index db13a110fb..126b29c8a9 100644 --- a/tests/integration/targets/connection_chroot/test_connection.inventory +++ b/tests/integration/targets/connection_chroot/test_connection.inventory @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + [chroot] chroot-pipelining ansible_ssh_pipelining=true chroot-no-pipelining ansible_ssh_pipelining=false diff --git a/tests/integration/targets/connection_jail/test_connection.inventory b/tests/integration/targets/connection_jail/test_connection.inventory index 466f7776eb..995c324441 100644 --- a/tests/integration/targets/connection_jail/test_connection.inventory +++ b/tests/integration/targets/connection_jail/test_connection.inventory @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + [jail] jail-pipelining ansible_ssh_pipelining=true jail-no-pipelining ansible_ssh_pipelining=false diff --git a/tests/integration/targets/connection_lxc/test_connection.inventory b/tests/integration/targets/connection_lxc/test_connection.inventory index 5e3e3c3f40..cfcd7a32f9 100644 --- a/tests/integration/targets/connection_lxc/test_connection.inventory +++ b/tests/integration/targets/connection_lxc/test_connection.inventory @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + [lxc] lxc-pipelining ansible_ssh_pipelining=true lxc-no-pipelining ansible_ssh_pipelining=false diff --git a/tests/integration/targets/connection_lxd/test_connection.inventory b/tests/integration/targets/connection_lxd/test_connection.inventory index 73ab06561f..d2d2c10e35 100644 --- a/tests/integration/targets/connection_lxd/test_connection.inventory +++ b/tests/integration/targets/connection_lxd/test_connection.inventory @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + [lxd] lxd-pipelining ansible_ssh_pipelining=true lxd-no-pipelining ansible_ssh_pipelining=false diff --git a/tests/integration/targets/consul/templates/consul_config.hcl.j2 b/tests/integration/targets/consul/templates/consul_config.hcl.j2 index 811c124bb7..96da5d6642 100644 --- a/tests/integration/targets/consul/templates/consul_config.hcl.j2 +++ b/tests/integration/targets/consul/templates/consul_config.hcl.j2 @@ -1,3 +1,8 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} # {{ ansible_managed }} server = true pid_file = "{{ remote_dir }}/consul.pid" diff --git a/tests/integration/targets/discord/README.md b/tests/integration/targets/discord/README.md index 0cd3277924..528ea06432 100644 --- a/tests/integration/targets/discord/README.md +++ b/tests/integration/targets/discord/README.md @@ -1,3 +1,9 @@ + + The integration tests can be executed locally: 1. Create or use an existing discord server diff --git a/tests/integration/targets/git_config/files/gitconfig b/tests/integration/targets/git_config/files/gitconfig index 7dcde69b55..92eeb7eb9f 100644 --- a/tests/integration/targets/git_config/files/gitconfig +++ b/tests/integration/targets/git_config/files/gitconfig @@ -1,2 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + [http] proxy = foo diff --git a/tests/integration/targets/interfaces_file/files/interfaces_ff b/tests/integration/targets/interfaces_file/files/interfaces_ff index c3319a4872..c7f0452df4 100644 --- a/tests/integration/targets/interfaces_file/files/interfaces_ff +++ b/tests/integration/targets/interfaces_file/files/interfaces_ff @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iface eno1 inet static address 1.2.3.4 netmask 255.255.255.0 diff --git a/tests/integration/targets/interfaces_file/files/interfaces_ff_3841 b/tests/integration/targets/interfaces_file/files/interfaces_ff_3841 index 06f78dd74f..9f47879c59 100644 --- a/tests/integration/targets/interfaces_file/files/interfaces_ff_3841 +++ b/tests/integration/targets/interfaces_file/files/interfaces_ff_3841 @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + iface eth0 inet static address 1.2.3.4 netmask 255.255.255.0 diff --git a/tests/integration/targets/iso_create/files/test1.cfg b/tests/integration/targets/iso_create/files/test1.cfg index 1c6d0d0d86..8cd712916a 100644 --- a/tests/integration/targets/iso_create/files/test1.cfg +++ b/tests/integration/targets/iso_create/files/test1.cfg @@ -1,4 +1,9 @@ #version=DEVEL + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # System authorization information auth --enableshadow --passalgo=sha512 # Use CDROM installation media diff --git a/tests/integration/targets/iso_create/files/test_dir/test2.cfg b/tests/integration/targets/iso_create/files/test_dir/test2.cfg index 1c6d0d0d86..8cd712916a 100644 --- a/tests/integration/targets/iso_create/files/test_dir/test2.cfg +++ b/tests/integration/targets/iso_create/files/test_dir/test2.cfg @@ -1,4 +1,9 @@ #version=DEVEL + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # System authorization information auth --enableshadow --passalgo=sha512 # Use CDROM installation media diff --git a/tests/integration/targets/iso_extract/files/test.iso.license b/tests/integration/targets/iso_extract/files/test.iso.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/iso_extract/files/test.iso.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/java_cert/files/testpkcs.p12.license b/tests/integration/targets/java_cert/files/testpkcs.p12.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/java_cert/files/testpkcs.p12.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/kernel_blacklist/files/blacklist b/tests/integration/targets/kernel_blacklist/files/blacklist index f8c0c9b16f..eeaf322460 100644 --- a/tests/integration/targets/kernel_blacklist/files/blacklist +++ b/tests/integration/targets/kernel_blacklist/files/blacklist @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + blacklist aaaa blacklist bbbb blacklist cccc diff --git a/tests/integration/targets/kernel_blacklist/tasks/main.yml b/tests/integration/targets/kernel_blacklist/tasks/main.yml index 5f8d50092f..3b34bfe423 100644 --- a/tests/integration/targets/kernel_blacklist/tasks/main.yml +++ b/tests/integration/targets/kernel_blacklist/tasks/main.yml @@ -44,7 +44,16 @@ - orig_stat.stat.size == stat_test_1.stat.size - orig_stat.stat.checksum == stat_test_1.stat.checksum - orig_stat.stat.mtime == stat_test_1.stat.mtime - - stat_test_1.stat.checksum == 'blacklist aaaa\nblacklist bbbb\nblacklist cccc\n' | checksum + - stat_test_1.stat.checksum == expected_content | checksum + vars: + expected_content: | + # Copyright (c) Ansible Project + # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + # SPDX-License-Identifier: GPL-3.0-or-later + + blacklist aaaa + blacklist bbbb + blacklist cccc - name: add new item to list community.general.kernel_blacklist: @@ -65,6 +74,10 @@ - slurp_test_2.content|b64decode == content vars: content: | + # Copyright (c) Ansible Project + # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + # SPDX-License-Identifier: GPL-3.0-or-later + blacklist aaaa blacklist bbbb blacklist cccc @@ -89,6 +102,10 @@ - slurp_test_3.content|b64decode == content vars: content: | + # Copyright (c) Ansible Project + # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + # SPDX-License-Identifier: GPL-3.0-or-later + blacklist aaaa blacklist cccc blacklist dddd diff --git a/tests/integration/targets/keycloak_client/README.md b/tests/integration/targets/keycloak_client/README.md index 06c2a4b414..d8bcc08ecc 100644 --- a/tests/integration/targets/keycloak_client/README.md +++ b/tests/integration/targets/keycloak_client/README.md @@ -1,3 +1,9 @@ + + The integration test can be performed as follows: ``` diff --git a/tests/integration/targets/launchd/templates/launchd.test.service.plist.j2 b/tests/integration/targets/launchd/templates/launchd.test.service.plist.j2 index 27affa3b39..43f43c24fd 100644 --- a/tests/integration/targets/launchd/templates/launchd.test.service.plist.j2 +++ b/tests/integration/targets/launchd/templates/launchd.test.service.plist.j2 @@ -1,3 +1,8 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} diff --git a/tests/integration/targets/launchd/templates/modified.launchd.test.service.plist.j2 b/tests/integration/targets/launchd/templates/modified.launchd.test.service.plist.j2 index ac25cab0d7..a41b655628 100644 --- a/tests/integration/targets/launchd/templates/modified.launchd.test.service.plist.j2 +++ b/tests/integration/targets/launchd/templates/modified.launchd.test.service.plist.j2 @@ -1,3 +1,8 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json.license b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/FILES.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json.license b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/MANIFEST.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/lookup_passwordstore/templates/input.license b/tests/integration/targets/lookup_passwordstore/templates/input.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/lookup_passwordstore/templates/input.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 b/tests/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 index e698129aa1..72eca99ec9 100644 --- a/tests/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 +++ b/tests/integration/targets/lookup_passwordstore/templates/security-privacy.repo.j2 @@ -1,3 +1,9 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} + [security_privacy] name=Crypto applications and utilities (openSUSE_Leap_{{ ansible_distribution_version }}) type=rpm-md diff --git a/tests/integration/targets/mail/files/smtpserver.crt b/tests/integration/targets/mail/files/smtpserver.crt index 44c18a243e..2fcbb3a1dd 100644 --- a/tests/integration/targets/mail/files/smtpserver.crt +++ b/tests/integration/targets/mail/files/smtpserver.crt @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN CERTIFICATE----- MIIDrzCCApegAwIBAgIJAJyHQUcqSOQpMA0GCSqGSIb3DQEBCwUAMG4xCzAJBgNV BAYTAkJFMRMwEQYDVQQIDApWbGFhbmRlcmVuMQ0wCwYDVQQHDARHZW50MQ4wDAYD diff --git a/tests/integration/targets/mail/files/smtpserver.key b/tests/integration/targets/mail/files/smtpserver.key index 48ddf644c9..193ec9cdac 100644 --- a/tests/integration/targets/mail/files/smtpserver.key +++ b/tests/integration/targets/mail/files/smtpserver.key @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDS6gRoCBeOFM0Y TbqRsEigHkyF0+J1zyCSpSItZE0kMLcsEJgcOpXgZb49asFO9/p4asEnJSK2Md5b diff --git a/tests/integration/targets/monit/templates/monitrc.j2 b/tests/integration/targets/monit/templates/monitrc.j2 index aba574c24d..4f1a6e2473 100644 --- a/tests/integration/targets/monit/templates/monitrc.j2 +++ b/tests/integration/targets/monit/templates/monitrc.j2 @@ -1,3 +1,9 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} + set daemon 2 set logfile /var/log/monit.log set idfile /var/lib/monit/id diff --git a/tests/integration/targets/nomad/files/job.hcl b/tests/integration/targets/nomad/files/job.hcl index abcc6854f8..8f01f04396 100644 --- a/tests/integration/targets/nomad/files/job.hcl +++ b/tests/integration/targets/nomad/files/job.hcl @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # There can only be a single job definition per file. This job is named # "example" so it will create a job with the ID and Name "example". diff --git a/tests/integration/targets/one_host/files/testhost/tmp/opennebula-fixtures.json.gz.license b/tests/integration/targets/one_host/files/testhost/tmp/opennebula-fixtures.json.gz.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/one_host/files/testhost/tmp/opennebula-fixtures.json.gz.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/one_template/files/testhost/tmp/opennebula-fixtures.json.gz.license b/tests/integration/targets/one_template/files/testhost/tmp/opennebula-fixtures.json.gz.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/one_template/files/testhost/tmp/opennebula-fixtures.json.gz.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/pam_limits/files/test_pam_limits.conf b/tests/integration/targets/pam_limits/files/test_pam_limits.conf index 7310b4a021..7d5d8bc858 100644 --- a/tests/integration/targets/pam_limits/files/test_pam_limits.conf +++ b/tests/integration/targets/pam_limits/files/test_pam_limits.conf @@ -1 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # /etc/security/limits.conf diff --git a/tests/integration/targets/pkgng/templates/MANIFEST.json.j2.license b/tests/integration/targets/pkgng/templates/MANIFEST.json.j2.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/pkgng/templates/MANIFEST.json.j2.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/setup_flatpak_remote/README.md b/tests/integration/targets/setup_flatpak_remote/README.md index d7916c14b3..44dfeb0c63 100644 --- a/tests/integration/targets/setup_flatpak_remote/README.md +++ b/tests/integration/targets/setup_flatpak_remote/README.md @@ -1,3 +1,9 @@ + + # Create a dummy flatpak repository remote This document describes how to create a local flatpak dummy repo. Just like the one contained in the `files/repo.tar.gxz` archive. diff --git a/tests/integration/targets/setup_flatpak_remote/files/repo.tar.xz.license b/tests/integration/targets/setup_flatpak_remote/files/repo.tar.xz.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/setup_flatpak_remote/files/repo.tar.xz.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/setup_mosquitto/files/mosquitto.conf b/tests/integration/targets/setup_mosquitto/files/mosquitto.conf index 84a80b71c3..4503302939 100644 --- a/tests/integration/targets/setup_mosquitto/files/mosquitto.conf +++ b/tests/integration/targets/setup_mosquitto/files/mosquitto.conf @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # Plain MQTT protocol listener 1883 diff --git a/tests/integration/targets/setup_openldap/files/initial_config.ldif.license b/tests/integration/targets/setup_openldap/files/initial_config.ldif.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/setup_openldap/files/initial_config.ldif.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif.license b/tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/setup_openldap/files/rootpw_cnconfig.ldif.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/setup_postgresql_db/files/dummy--1.0.sql b/tests/integration/targets/setup_postgresql_db/files/dummy--1.0.sql index 53c79666b4..89b318d77c 100644 --- a/tests/integration/targets/setup_postgresql_db/files/dummy--1.0.sql +++ b/tests/integration/targets/setup_postgresql_db/files/dummy--1.0.sql @@ -1,2 +1,6 @@ +-- Copyright (c) Ansible Project +-- GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +-- SPDX-License-Identifier: GPL-3.0-or-later + CREATE OR REPLACE FUNCTION dummy_display_ext_version() RETURNS text LANGUAGE SQL AS 'SELECT (''1.0'')::text'; diff --git a/tests/integration/targets/setup_postgresql_db/files/dummy--2.0.sql b/tests/integration/targets/setup_postgresql_db/files/dummy--2.0.sql index 227ba1b4c4..c9386cac49 100644 --- a/tests/integration/targets/setup_postgresql_db/files/dummy--2.0.sql +++ b/tests/integration/targets/setup_postgresql_db/files/dummy--2.0.sql @@ -1,2 +1,6 @@ +-- Copyright (c) Ansible Project +-- GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +-- SPDX-License-Identifier: GPL-3.0-or-later + CREATE OR REPLACE FUNCTION dummy_display_ext_version() RETURNS text LANGUAGE SQL AS 'SELECT (''2.0'')::text'; diff --git a/tests/integration/targets/setup_postgresql_db/files/dummy--3.0.sql b/tests/integration/targets/setup_postgresql_db/files/dummy--3.0.sql index 7d6a60e543..a96bc85874 100644 --- a/tests/integration/targets/setup_postgresql_db/files/dummy--3.0.sql +++ b/tests/integration/targets/setup_postgresql_db/files/dummy--3.0.sql @@ -1,2 +1,6 @@ +-- Copyright (c) Ansible Project +-- GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +-- SPDX-License-Identifier: GPL-3.0-or-later + CREATE OR REPLACE FUNCTION dummy_display_ext_version() RETURNS text LANGUAGE SQL AS 'SELECT (''3.0'')::text'; diff --git a/tests/integration/targets/setup_postgresql_db/files/dummy.control.license b/tests/integration/targets/setup_postgresql_db/files/dummy.control.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/setup_postgresql_db/files/dummy.control.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/setup_postgresql_db/files/pg_hba.conf b/tests/integration/targets/setup_postgresql_db/files/pg_hba.conf index 58de3607f9..e6b14c4d79 100644 --- a/tests/integration/targets/setup_postgresql_db/files/pg_hba.conf +++ b/tests/integration/targets/setup_postgresql_db/files/pg_hba.conf @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # !!! This file managed by Ansible. Any local changes may be overwritten. !!! # Database administrative login by UNIX sockets diff --git a/tests/integration/targets/setup_wildfly_server/files/wildfly.conf b/tests/integration/targets/setup_wildfly_server/files/wildfly.conf index 4ff3293b72..684ce12a21 100644 --- a/tests/integration/targets/setup_wildfly_server/files/wildfly.conf +++ b/tests/integration/targets/setup_wildfly_server/files/wildfly.conf @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + # The configuration you want to run WILDFLY_CONFIG=standalone.xml diff --git a/tests/integration/targets/setup_wildfly_server/templates/launch.sh.j2 b/tests/integration/targets/setup_wildfly_server/templates/launch.sh.j2 index a01bcc513e..7a80251a14 100644 --- a/tests/integration/targets/setup_wildfly_server/templates/launch.sh.j2 +++ b/tests/integration/targets/setup_wildfly_server/templates/launch.sh.j2 @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later if [ "x$WILDFLY_HOME" = "x" ]; then WILDFLY_HOME="{{ wf_homedir }}" diff --git a/tests/integration/targets/setup_wildfly_server/templates/wildfly.service.j2 b/tests/integration/targets/setup_wildfly_server/templates/wildfly.service.j2 index 686c30193e..ec10551329 100644 --- a/tests/integration/targets/setup_wildfly_server/templates/wildfly.service.j2 +++ b/tests/integration/targets/setup_wildfly_server/templates/wildfly.service.j2 @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + [Unit] Description=The WildFly Application Server After=syslog.target network.target diff --git a/tests/integration/targets/supervisorctl/templates/supervisord.conf b/tests/integration/targets/supervisorctl/templates/supervisord.conf index 28b6ac09f9..f3d36b92e7 100644 --- a/tests/integration/targets/supervisorctl/templates/supervisord.conf +++ b/tests/integration/targets/supervisorctl/templates/supervisord.conf @@ -1,3 +1,9 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} + [supervisord] pidfile={{ remote_dir }}/supervisord.pid logfile={{ remote_dir }}/supervisord.log diff --git a/tests/integration/targets/terraform/.gitignore b/tests/integration/targets/terraform/.gitignore index 81fe39d2df..c477f5db78 100644 --- a/tests/integration/targets/terraform/.gitignore +++ b/tests/integration/targets/terraform/.gitignore @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + **/.terraform/* *.tfstate *.tfstate.* diff --git a/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 b/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 index 48215f74bd..886a0c2de1 100644 --- a/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 +++ b/tests/integration/targets/terraform/templates/provider_test/main.tf.j2 @@ -1,3 +1,8 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} terraform { required_providers { {{ tf_provider['name'] }} = { diff --git a/tests/integration/targets/xml/fixtures/ansible-xml-beers-unicode.xml.license b/tests/integration/targets/xml/fixtures/ansible-xml-beers-unicode.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/fixtures/ansible-xml-beers-unicode.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/fixtures/ansible-xml-beers.xml.license b/tests/integration/targets/xml/fixtures/ansible-xml-beers.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/fixtures/ansible-xml-beers.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml.license b/tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/fixtures/ansible-xml-namespaced-beers.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-children-elements-unicode.xml.license b/tests/integration/targets/xml/results/test-add-children-elements-unicode.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-children-elements-unicode.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-children-elements.xml.license b/tests/integration/targets/xml/results/test-add-children-elements.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-children-elements.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-children-from-groupvars.xml.license b/tests/integration/targets/xml/results/test-add-children-from-groupvars.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-children-from-groupvars.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-children-insertafter.xml.license b/tests/integration/targets/xml/results/test-add-children-insertafter.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-children-insertafter.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-children-insertbefore.xml.license b/tests/integration/targets/xml/results/test-add-children-insertbefore.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-children-insertbefore.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml.license b/tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-children-with-attributes-unicode.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-children-with-attributes.xml.license b/tests/integration/targets/xml/results/test-add-children-with-attributes.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-children-with-attributes.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-element-implicitly.xml.license b/tests/integration/targets/xml/results/test-add-element-implicitly.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-element-implicitly.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml.license b/tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-add-namespaced-children-elements.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-pretty-print-only.xml.license b/tests/integration/targets/xml/results/test-pretty-print-only.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-pretty-print-only.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-pretty-print.xml.license b/tests/integration/targets/xml/results/test-pretty-print.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-pretty-print.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-remove-attribute.xml.license b/tests/integration/targets/xml/results/test-remove-attribute.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-remove-attribute.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-remove-element.xml.license b/tests/integration/targets/xml/results/test-remove-element.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-remove-element.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml.license b/tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-remove-namespaced-attribute.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-remove-namespaced-element.xml.license b/tests/integration/targets/xml/results/test-remove-namespaced-element.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-remove-namespaced-element.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml.license b/tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-attribute-value-unicode.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-attribute-value.xml.license b/tests/integration/targets/xml/results/test-set-attribute-value.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-attribute-value.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-children-elements-level.xml.license b/tests/integration/targets/xml/results/test-set-children-elements-level.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-children-elements-level.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-children-elements-unicode.xml.license b/tests/integration/targets/xml/results/test-set-children-elements-unicode.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-children-elements-unicode.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-children-elements.xml.license b/tests/integration/targets/xml/results/test-set-children-elements.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-children-elements.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-element-value-empty.xml.license b/tests/integration/targets/xml/results/test-set-element-value-empty.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-element-value-empty.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-element-value-unicode.xml.license b/tests/integration/targets/xml/results/test-set-element-value-unicode.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-element-value-unicode.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-element-value.xml.license b/tests/integration/targets/xml/results/test-set-element-value.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-element-value.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml.license b/tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-namespaced-attribute-value.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/results/test-set-namespaced-element-value.xml.license b/tests/integration/targets/xml/results/test-set-namespaced-element-value.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-namespaced-element-value.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/yarn/tasks/run.yml b/tests/integration/targets/yarn/tasks/run.yml index faee660410..367d7dcf2c 100644 --- a/tests/integration/targets/yarn/tasks/run.yml +++ b/tests/integration/targets/yarn/tasks/run.yml @@ -48,8 +48,8 @@ register: yarn_version - name: 'Create dummy package.json' - copy: - src: templates/package.j2 + template: + src: package.j2 dest: '{{ remote_tmp_dir }}/package.json' - name: 'Install all packages.' diff --git a/tests/integration/targets/yarn/templates/package.j2 b/tests/integration/targets/yarn/templates/package.j2 index 0d7a676faa..3f5456ad2e 100644 --- a/tests/integration/targets/yarn/templates/package.j2 +++ b/tests/integration/targets/yarn/templates/package.j2 @@ -1,3 +1,8 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} { "name": "ansible-yarn-testing", "version": "1.0.0", diff --git a/tests/integration/targets/zypper/files/empty.spec.license b/tests/integration/targets/zypper/files/empty.spec.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/zypper/files/empty.spec.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/zypper/templates/duplicate.spec.j2 b/tests/integration/targets/zypper/templates/duplicate.spec.j2 index 9d1dd56a53..6f63b665c8 100644 --- a/tests/integration/targets/zypper/templates/duplicate.spec.j2 +++ b/tests/integration/targets/zypper/templates/duplicate.spec.j2 @@ -1,3 +1,9 @@ +{# +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +#} + Summary: Duplicate{{ item }} RPM. Installs one file that is a duplicate of other Duplicate# RPMs Name: duplicate{{ item }} Version: 1 diff --git a/tests/integration/targets/zypper_repository/files/systemsmanagement_Uyuni_Utils.repo b/tests/integration/targets/zypper_repository/files/systemsmanagement_Uyuni_Utils.repo index 1df76802a7..aaa486d929 100644 --- a/tests/integration/targets/zypper_repository/files/systemsmanagement_Uyuni_Utils.repo +++ b/tests/integration/targets/zypper_repository/files/systemsmanagement_Uyuni_Utils.repo @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + [systemsmanagement_Uyuni_Utils] name=Several utilities to develop, build or release Uyuni (openSUSE_Leap_15.3) type=rpm-md diff --git a/tests/unit/plugins/inventory/fixtures/lxd_inventory.atd.license b/tests/unit/plugins/inventory/fixtures/lxd_inventory.atd.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/inventory/fixtures/lxd_inventory.atd.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/inventory/fixtures/opennebula_inventory.json.license b/tests/unit/plugins/inventory/fixtures/opennebula_inventory.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/inventory/fixtures/opennebula_inventory.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-facts.json.license b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-facts.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-facts.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-params.json.license b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-params.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-1-params.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-facts.json.license b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-facts.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-facts.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-params.json.license b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-params.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-2-params.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-facts.json.license b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-facts.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-facts.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-params.json.license b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-params.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/module_utils/xenserver/fixtures/ansible-test-vm-3-params.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/README.md b/tests/unit/plugins/modules/system/interfaces_file/README.md index c78c3e3264..b0c22f3dc3 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/README.md +++ b/tests/unit/plugins/modules/system/interfaces_file/README.md @@ -1,3 +1,9 @@ + + # interfaces_file unit tests ## Tests structure diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup.license b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py index d3fc97d71e..ea15eb30b5 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py @@ -46,6 +46,7 @@ golden_output_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'golden class TestInterfacesFileModule(unittest.TestCase): def getTestFiles(self, include_filter=None, exclude_filter=None): flist = next(os.walk(fixture_path))[2] + flist = [file for file in flist if not file.endswith('.license')] if include_filter: flist = filter(lambda x: re.match(include_filter, x), flist) if exclude_filter: diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt index 932aa1d4fd..788fa4cb6c 100644 --- a/tests/unit/requirements.txt +++ b/tests/unit/requirements.txt @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + unittest2 ; python_version < '2.7' importlib ; python_version < '2.7' diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index 47b3907b8d..b72b0fe838 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -1,3 +1,7 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + certifi < 2022.5.18 ; python_version < '3.5' # certifi 2022.5.18 requires Python 3.5 or later coverage >= 4.2, < 5.0.0, != 4.3.2 ; python_version <= '3.7' # features in 4.2+ required, avoid known bug in 4.3.2 on python 2.6, coverage 5.0+ incompatible coverage >= 4.5.4, < 5.0.0 ; python_version > '3.7' # coverage had a bug in < 4.5.4 that would cause unit tests to hang in Python 3.8, coverage 5.0+ incompatible From 424d706f921d268e37f26d5ab395d5996373e4ae Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 8 Aug 2022 14:24:58 +0200 Subject: [PATCH 0160/2104] Fix more copyright lines, add more default copyright lines (#5095) * Fix copyright lines. * Add default copyright line. --- changelogs/fragments/licenses.yml | 2 +- plugins/callback/loganalytics.py | 1 + plugins/doc_fragments/auth_basic.py | 2 +- plugins/doc_fragments/gitlab.py | 2 +- plugins/doc_fragments/online.py | 2 +- plugins/doc_fragments/proxmox.py | 2 +- plugins/lookup/random_words.py | 1 + plugins/module_utils/oneandone.py | 1 + plugins/module_utils/onepassword.py | 1 + plugins/module_utils/online.py | 1 + plugins/module_utils/source_control/bitbucket.py | 1 + plugins/modules/cloud/lxd/lxd_project.py | 1 + plugins/modules/cloud/online/online_server_info.py | 1 + plugins/modules/cloud/online/online_user_info.py | 1 + .../cloud/scaleway/scaleway_compute_private_network.py | 1 + plugins/modules/cloud/scaleway/scaleway_ip.py | 1 + plugins/modules/cloud/scaleway/scaleway_private_network.py | 1 + .../identity/keycloak/keycloak_client_rolemapping.py | 1 + plugins/modules/identity/keycloak/keycloak_clientscope.py | 1 + .../modules/identity/keycloak/keycloak_identity_provider.py | 1 + plugins/modules/identity/keycloak/keycloak_realm_info.py | 1 + .../modules/identity/keycloak/keycloak_user_federation.py | 1 + .../remote_management/lenovoxcc/xcc_redfish_command.py | 1 + plugins/modules/remote_management/lxca/lxca_cmms.py | 1 + plugins/modules/remote_management/lxca/lxca_nodes.py | 1 + plugins/modules/source_control/github/github_deploy_key.py | 1 + plugins/modules/system/locale_gen.py | 1 + plugins/modules/web_infrastructure/apache2_module.py | 2 +- plugins/modules/web_infrastructure/deploy_helper.py | 4 ++-- plugins/modules/web_infrastructure/django_manage.py | 2 +- plugins/modules/web_infrastructure/gunicorn.py | 2 +- plugins/modules/web_infrastructure/htpasswd.py | 2 +- plugins/modules/web_infrastructure/jboss.py | 2 +- plugins/modules/web_infrastructure/jenkins_plugin.py | 2 +- plugins/modules/web_infrastructure/jenkins_script.py | 2 +- plugins/modules/web_infrastructure/jira.py | 6 +++--- plugins/modules/web_infrastructure/nginx_status_info.py | 2 +- plugins/modules/web_infrastructure/rundeck_acl_policy.py | 2 +- plugins/modules/web_infrastructure/rundeck_project.py | 2 +- plugins/modules/web_infrastructure/supervisorctl.py | 2 +- plugins/modules/web_infrastructure/taiga_issue.py | 2 +- plugins/test/a_module.py | 2 +- tests/integration/targets/cmd_runner/library/cmd_echo.py | 2 +- tests/integration/targets/cmd_runner/tasks/main.yml | 2 +- tests/integration/targets/cmd_runner/vars/main.yml | 2 +- tests/integration/targets/cpanm/tasks/main.yml | 4 ++-- .../testns/testcoll/plugins/modules/collection_module.py | 2 +- .../testns/testcoll_mf/plugins/modules/collection_module.py | 2 +- .../testcoll_nothing/plugins/modules/collection_module.py | 2 +- .../testns/testcoll_nv/plugins/modules/collection_module.py | 2 +- .../lookup_collection_version/library/local_module.py | 2 +- tests/integration/targets/lookup_etcd3/runme.sh | 1 + tests/integration/targets/lookup_etcd3/tasks/main.yml | 2 +- tests/integration/targets/lookup_etcd3/tasks/tests.yml | 2 +- tests/integration/targets/lookup_lmdb_kv/runme.sh | 1 + tests/integration/targets/lookup_random_pet/runme.sh | 1 + tests/integration/targets/lookup_random_string/runme.sh | 1 + tests/integration/targets/lookup_random_words/runme.sh | 1 + tests/integration/targets/lxd_project/tasks/main.yml | 1 + tests/integration/targets/module_helper/library/mdepfail.py | 2 +- tests/integration/targets/module_helper/library/msimple.py | 2 +- .../integration/targets/module_helper/library/msimpleda.py | 2 +- tests/integration/targets/module_helper/library/mstate.py | 2 +- tests/integration/targets/module_helper/tasks/main.yml | 2 +- tests/integration/targets/module_helper/tasks/mdepfail.yml | 2 +- tests/integration/targets/module_helper/tasks/msimple.yml | 2 +- tests/integration/targets/module_helper/tasks/msimpleda.yml | 2 +- tests/integration/targets/module_helper/tasks/mstate.yml | 2 +- tests/integration/targets/monit/files/httpd_echo.py | 2 +- tests/integration/targets/pamd/tasks/main.yml | 2 +- tests/integration/targets/pids/files/sleeper.c | 2 +- .../testns/testcoll/plugins/modules/collection_module.py | 2 +- .../targets/test_a_module/library/local_module.py | 2 +- tests/unit/mock/loader.py | 2 +- tests/unit/mock/procenv.py | 4 ++-- tests/unit/mock/vault_helper.py | 1 + tests/unit/mock/yaml_helper.py | 1 + tests/unit/plugins/become/conftest.py | 4 ++-- tests/unit/plugins/become/helper.py | 2 +- tests/unit/plugins/become/test_doas.py | 4 ++-- tests/unit/plugins/become/test_dzdo.py | 4 ++-- tests/unit/plugins/become/test_ksu.py | 4 ++-- tests/unit/plugins/become/test_pbrun.py | 4 ++-- tests/unit/plugins/become/test_pfexec.py | 4 ++-- tests/unit/plugins/become/test_sudosu.py | 4 ++-- tests/unit/plugins/callback/test_elastic.py | 2 +- tests/unit/plugins/callback/test_loganalytics.py | 1 + tests/unit/plugins/callback/test_opentelemetry.py | 2 +- tests/unit/plugins/lookup/test_bitwarden.py | 2 +- tests/unit/plugins/lookup/test_dependent.py | 2 +- tests/unit/plugins/lookup/test_dsv.py | 2 +- tests/unit/plugins/lookup/test_etcd3.py | 2 +- tests/unit/plugins/lookup/test_manifold.py | 4 ++-- tests/unit/plugins/lookup/test_onepassword.py | 4 ++-- tests/unit/plugins/lookup/test_tss.py | 2 +- tests/unit/plugins/module_utils/cloud/test_backoff.py | 1 + tests/unit/plugins/module_utils/hwc/test_dict_comparison.py | 2 +- tests/unit/plugins/module_utils/hwc/test_hwc_utils.py | 1 + tests/unit/plugins/module_utils/test_cmd_runner.py | 2 +- tests/unit/plugins/module_utils/test_csv.py | 1 + tests/unit/plugins/module_utils/test_database.py | 1 + tests/unit/plugins/modules/cloud/linode/conftest.py | 1 + tests/unit/plugins/modules/files/test_archive.py | 1 + .../unit/plugins/modules/monitoring/test_alerta_customer.py | 1 + .../plugins/modules/monitoring/test_circonus_annotation.py | 1 + .../modules/monitoring/test_datadog_downtime.py.disabled | 1 + tests/unit/plugins/modules/monitoring/test_monit.py | 1 + tests/unit/plugins/modules/monitoring/test_pagerduty.py | 1 + .../unit/plugins/modules/monitoring/test_pagerduty_alert.py | 1 + .../plugins/modules/monitoring/test_pagerduty_change.py | 1 + tests/unit/plugins/modules/monitoring/test_statsd.py | 1 + .../plugins/modules/net_tools/pritunl/test_pritunl_org.py | 2 +- .../plugins/modules/net_tools/pritunl/test_pritunl_user.py | 2 +- tests/unit/plugins/modules/net_tools/test_dnsimple.py | 1 + tests/unit/plugins/modules/net_tools/test_dnsimple_info.py | 1 + tests/unit/plugins/modules/notification/test_discord.py | 1 + tests/unit/plugins/modules/notification/test_slack.py | 1 + tests/unit/plugins/modules/packaging/os/conftest.py | 1 + tests/unit/plugins/modules/packaging/os/test_apk.py | 1 + tests/unit/plugins/modules/packaging/os/test_homebrew.py | 1 + .../unit/plugins/modules/packaging/os/test_homebrew_cask.py | 1 + tests/unit/plugins/modules/packaging/os/test_macports.py | 1 + tests/unit/plugins/modules/packaging/os/test_pacman.py | 1 + tests/unit/plugins/modules/packaging/os/test_pkgin.py | 1 + .../unit/plugins/modules/packaging/os/test_rhn_register.py | 1 + .../unit/plugins/modules/packaging/os/test_rhsm_release.py | 2 +- .../remote_management/lenovoxcc/test_xcc_redfish_command.py | 1 + .../modules/remote_management/lxca/test_lxca_cmms.py | 1 + .../modules/remote_management/lxca/test_lxca_nodes.py | 1 + .../remote_management/wdc/test_wdc_redfish_command.py | 1 + .../modules/remote_management/wdc/test_wdc_redfish_info.py | 1 + .../source_control/bitbucket/test_bitbucket_access_key.py | 1 + .../bitbucket/test_bitbucket_pipeline_key_pair.py | 1 + .../bitbucket/test_bitbucket_pipeline_known_host.py | 1 + .../bitbucket/test_bitbucket_pipeline_variable.py | 1 + .../modules/system/interfaces_file/test_interfaces_file.py | 2 +- tests/unit/plugins/modules/system/test_modprobe.py | 1 + tests/unit/plugins/modules/system/test_pamd.py | 1 + .../plugins/modules/system/test_sap_task_list_execute.py | 1 + tests/unit/plugins/modules/system/test_sysupgrade.py | 1 + tests/unit/plugins/modules/utils.py | 1 + .../modules/web_infrastructure/test_apache2_module.py | 1 + .../modules/web_infrastructure/test_jenkins_build.py | 1 + .../modules/web_infrastructure/test_jenkins_plugin.py | 1 + 144 files changed, 158 insertions(+), 84 deletions(-) diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml index 0b6738f506..468dc4b343 100644 --- a/changelogs/fragments/licenses.yml +++ b/changelogs/fragments/licenses.yml @@ -1,3 +1,3 @@ minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087)." + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095)." - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/plugins/callback/loganalytics.py b/plugins/callback/loganalytics.py index 8974f15a94..54acf846a3 100644 --- a/plugins/callback/loganalytics.py +++ b/plugins/callback/loganalytics.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/doc_fragments/auth_basic.py b/plugins/doc_fragments/auth_basic.py index ae47a7ed27..e05311af03 100644 --- a/plugins/doc_fragments/auth_basic.py +++ b/plugins/doc_fragments/auth_basic.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/doc_fragments/gitlab.py b/plugins/doc_fragments/gitlab.py index 76c1fac923..705a93c023 100644 --- a/plugins/doc_fragments/gitlab.py +++ b/plugins/doc_fragments/gitlab.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/doc_fragments/online.py b/plugins/doc_fragments/online.py index 7c8408ae99..c0757ca6a1 100644 --- a/plugins/doc_fragments/online.py +++ b/plugins/doc_fragments/online.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/doc_fragments/proxmox.py b/plugins/doc_fragments/proxmox.py index 5584568b07..50fe6ea0e6 100644 --- a/plugins/doc_fragments/proxmox.py +++ b/plugins/doc_fragments/proxmox.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/lookup/random_words.py b/plugins/lookup/random_words.py index d80c5855b4..a4aa1b3178 100644 --- a/plugins/lookup/random_words.py +++ b/plugins/lookup/random_words.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/module_utils/oneandone.py b/plugins/module_utils/oneandone.py index 1ced3f3868..bbad2eaa05 100644 --- a/plugins/module_utils/oneandone.py +++ b/plugins/module_utils/oneandone.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/module_utils/onepassword.py b/plugins/module_utils/onepassword.py index 98f9aa4fb6..3023165b1a 100644 --- a/plugins/module_utils/onepassword.py +++ b/plugins/module_utils/onepassword.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/module_utils/online.py b/plugins/module_utils/online.py index 596f4553b3..a2f6e77a03 100644 --- a/plugins/module_utils/online.py +++ b/plugins/module_utils/online.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/module_utils/source_control/bitbucket.py b/plugins/module_utils/source_control/bitbucket.py index 22a153ff00..592905a65f 100644 --- a/plugins/module_utils/source_control/bitbucket.py +++ b/plugins/module_utils/source_control/bitbucket.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) # SPDX-License-Identifier: BSD-2-Clause diff --git a/plugins/modules/cloud/lxd/lxd_project.py b/plugins/modules/cloud/lxd/lxd_project.py index e6a77a3d06..f0aa4058e7 100644 --- a/plugins/modules/cloud/lxd/lxd_project.py +++ b/plugins/modules/cloud/lxd/lxd_project.py @@ -1,5 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/online/online_server_info.py b/plugins/modules/cloud/online/online_server_info.py index 3815db9a83..6ba3e4aa4f 100644 --- a/plugins/modules/cloud/online/online_server_info.py +++ b/plugins/modules/cloud/online/online_server_info.py @@ -1,5 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/online/online_user_info.py b/plugins/modules/cloud/online/online_user_info.py index 1a96fb1446..1086502040 100644 --- a/plugins/modules/cloud/online/online_user_info.py +++ b/plugins/modules/cloud/online/online_user_info.py @@ -1,5 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py b/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py index aac9fac824..f85b2f2444 100644 --- a/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py +++ b/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py @@ -3,6 +3,7 @@ # # Scaleway VPC management module # +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_ip.py b/plugins/modules/cloud/scaleway/scaleway_ip.py index 1738be4712..eccd64e47b 100644 --- a/plugins/modules/cloud/scaleway/scaleway_ip.py +++ b/plugins/modules/cloud/scaleway/scaleway_ip.py @@ -3,6 +3,7 @@ # # Scaleway IP management module # +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/cloud/scaleway/scaleway_private_network.py b/plugins/modules/cloud/scaleway/scaleway_private_network.py index eed5254aa2..6a611fa32b 100644 --- a/plugins/modules/cloud/scaleway/scaleway_private_network.py +++ b/plugins/modules/cloud/scaleway/scaleway_private_network.py @@ -3,6 +3,7 @@ # # Scaleway VPC management module # +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py index 0f199bad5c..c4dde9bee1 100644 --- a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py +++ b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/identity/keycloak/keycloak_clientscope.py b/plugins/modules/identity/keycloak/keycloak_clientscope.py index fbb6e8db1f..b690cf4802 100644 --- a/plugins/modules/identity/keycloak/keycloak_clientscope.py +++ b/plugins/modules/identity/keycloak/keycloak_clientscope.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/identity/keycloak/keycloak_identity_provider.py b/plugins/modules/identity/keycloak/keycloak_identity_provider.py index 8635d60635..5915006d6b 100644 --- a/plugins/modules/identity/keycloak/keycloak_identity_provider.py +++ b/plugins/modules/identity/keycloak/keycloak_identity_provider.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/identity/keycloak/keycloak_realm_info.py b/plugins/modules/identity/keycloak/keycloak_realm_info.py index 45a8e4e986..4214ba06be 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm_info.py +++ b/plugins/modules/identity/keycloak/keycloak_realm_info.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/identity/keycloak/keycloak_user_federation.py b/plugins/modules/identity/keycloak/keycloak_user_federation.py index ee48fbe326..55915d08c4 100644 --- a/plugins/modules/identity/keycloak/keycloak_user_federation.py +++ b/plugins/modules/identity/keycloak/keycloak_user_federation.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index 9efb7b309c..8a213d85ff 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/remote_management/lxca/lxca_cmms.py b/plugins/modules/remote_management/lxca/lxca_cmms.py index 671975f626..0941b4521e 100644 --- a/plugins/modules/remote_management/lxca/lxca_cmms.py +++ b/plugins/modules/remote_management/lxca/lxca_cmms.py @@ -1,5 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later # diff --git a/plugins/modules/remote_management/lxca/lxca_nodes.py b/plugins/modules/remote_management/lxca/lxca_nodes.py index 9188d50dd6..b3445b1c0b 100644 --- a/plugins/modules/remote_management/lxca/lxca_nodes.py +++ b/plugins/modules/remote_management/lxca/lxca_nodes.py @@ -1,5 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later # diff --git a/plugins/modules/source_control/github/github_deploy_key.py b/plugins/modules/source_control/github/github_deploy_key.py index 2f4040487e..cbf6c286a3 100644 --- a/plugins/modules/source_control/github/github_deploy_key.py +++ b/plugins/modules/source_control/github/github_deploy_key.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/system/locale_gen.py b/plugins/modules/system/locale_gen.py index 3f2922c409..814a82c72a 100644 --- a/plugins/modules/system/locale_gen.py +++ b/plugins/modules/system/locale_gen.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/apache2_module.py b/plugins/modules/web_infrastructure/apache2_module.py index aabbe4d0ca..e887a628c8 100644 --- a/plugins/modules/web_infrastructure/apache2_module.py +++ b/plugins/modules/web_infrastructure/apache2_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013-2014, Christian Berendt +# Copyright (c) 2013-2014, Christian Berendt # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/deploy_helper.py b/plugins/modules/web_infrastructure/deploy_helper.py index 79a7ac7ebf..7ab10dc5b8 100644 --- a/plugins/modules/web_infrastructure/deploy_helper.py +++ b/plugins/modules/web_infrastructure/deploy_helper.py @@ -1,8 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Jasper N. Brouwer -# (c) 2014, Ramon de la Fuente +# Copyright (c) 2014, Jasper N. Brouwer +# Copyright (c) 2014, Ramon de la Fuente # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/django_manage.py b/plugins/modules/web_infrastructure/django_manage.py index 85e66eb2b9..5d68ae9bcf 100644 --- a/plugins/modules/web_infrastructure/django_manage.py +++ b/plugins/modules/web_infrastructure/django_manage.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Scott Anderson +# Copyright (c) 2013, Scott Anderson # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/gunicorn.py b/plugins/modules/web_infrastructure/gunicorn.py index 74e681feeb..9ed903dfd5 100644 --- a/plugins/modules/web_infrastructure/gunicorn.py +++ b/plugins/modules/web_infrastructure/gunicorn.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Alejandro Gomez +# Copyright (c) 2017, Alejandro Gomez # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/htpasswd.py b/plugins/modules/web_infrastructure/htpasswd.py index 6d9a490d13..28dfeda158 100644 --- a/plugins/modules/web_infrastructure/htpasswd.py +++ b/plugins/modules/web_infrastructure/htpasswd.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Nimbis Services, Inc. +# Copyright (c) 2013, Nimbis Services, Inc. # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/jboss.py b/plugins/modules/web_infrastructure/jboss.py index f411b1acea..1ddd161d78 100644 --- a/plugins/modules/web_infrastructure/jboss.py +++ b/plugins/modules/web_infrastructure/jboss.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2013, Jeroen Hoekx +# Copyright (c) 2013, Jeroen Hoekx # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py index d7c8d34ce1..478bd0be08 100644 --- a/plugins/modules/web_infrastructure/jenkins_plugin.py +++ b/plugins/modules/web_infrastructure/jenkins_plugin.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, Jiri Tyr +# Copyright (c) 2016, Jiri Tyr # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/jenkins_script.py b/plugins/modules/web_infrastructure/jenkins_script.py index 91f7057c2c..c7cad4655d 100644 --- a/plugins/modules/web_infrastructure/jenkins_script.py +++ b/plugins/modules/web_infrastructure/jenkins_script.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2016, James Hogarth +# Copyright (c) 2016, James Hogarth # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index 85ab678e27..979dd6d69c 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -1,11 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2014, Steve Smith +# Copyright (c) 2014, Steve Smith # Atlassian open-source approval reference OSR-76. # -# (c) 2020, Per Abildgaard Toft Search and update function -# (c) 2021, Brandon McNama Issue attachment functionality +# Copyright (c) 2020, Per Abildgaard Toft Search and update function +# Copyright (c) 2021, Brandon McNama Issue attachment functionality # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/nginx_status_info.py b/plugins/modules/web_infrastructure/nginx_status_info.py index 3b61b22da4..1c99fb2370 100644 --- a/plugins/modules/web_infrastructure/nginx_status_info.py +++ b/plugins/modules/web_infrastructure/nginx_status_info.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# (c) 2016, René Moser +# Copyright (c) 2016, René Moser # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/rundeck_acl_policy.py b/plugins/modules/web_infrastructure/rundeck_acl_policy.py index 897a2972c0..e76b25e792 100644 --- a/plugins/modules/web_infrastructure/rundeck_acl_policy.py +++ b/plugins/modules/web_infrastructure/rundeck_acl_policy.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2017, Loic Blot +# Copyright (c) 2017, Loic Blot # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) diff --git a/plugins/modules/web_infrastructure/rundeck_project.py b/plugins/modules/web_infrastructure/rundeck_project.py index c902846673..0c2fb8686e 100644 --- a/plugins/modules/web_infrastructure/rundeck_project.py +++ b/plugins/modules/web_infrastructure/rundeck_project.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Ansible module to manage rundeck projects -# (c) 2017, Loic Blot +# Copyright (c) 2017, Loic Blot # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # diff --git a/plugins/modules/web_infrastructure/supervisorctl.py b/plugins/modules/web_infrastructure/supervisorctl.py index a7dd3e5f8a..e108ebb81d 100644 --- a/plugins/modules/web_infrastructure/supervisorctl.py +++ b/plugins/modules/web_infrastructure/supervisorctl.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2012, Matt Wright +# Copyright (c) 2012, Matt Wright # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/web_infrastructure/taiga_issue.py b/plugins/modules/web_infrastructure/taiga_issue.py index a70d551536..78505afb76 100644 --- a/plugins/modules/web_infrastructure/taiga_issue.py +++ b/plugins/modules/web_infrastructure/taiga_issue.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2015, Alejandro Guirao +# Copyright (c) 2015, Alejandro Guirao # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/test/a_module.py b/plugins/test/a_module.py index baabce6e00..0d6cecac6a 100644 --- a/plugins/test/a_module.py +++ b/plugins/test/a_module.py @@ -1,4 +1,4 @@ -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/cmd_runner/library/cmd_echo.py b/tests/integration/targets/cmd_runner/library/cmd_echo.py index 7becddb6b2..cd87662647 100644 --- a/tests/integration/targets/cmd_runner/library/cmd_echo.py +++ b/tests/integration/targets/cmd_runner/library/cmd_echo.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/cmd_runner/tasks/main.yml b/tests/integration/targets/cmd_runner/tasks/main.yml index 7cd9ed7d7c..36ab039f0f 100644 --- a/tests/integration/targets/cmd_runner/tasks/main.yml +++ b/tests/integration/targets/cmd_runner/tasks/main.yml @@ -1,4 +1,4 @@ -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/cmd_runner/vars/main.yml b/tests/integration/targets/cmd_runner/vars/main.yml index 019ef5bf84..7f0027d499 100644 --- a/tests/integration/targets/cmd_runner/vars/main.yml +++ b/tests/integration/targets/cmd_runner/vars/main.yml @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/cpanm/tasks/main.yml b/tests/integration/targets/cpanm/tasks/main.yml index 04d19373f5..ed3c02b692 100644 --- a/tests/integration/targets/cpanm/tasks/main.yml +++ b/tests/integration/targets/cpanm/tasks/main.yml @@ -1,5 +1,5 @@ -# (c) 2020, Berkhan Berkdemir -# (c) 2021, Alexei Znamensky +# Copyright (c) 2020, Berkhan Berkdemir +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py index 2db6063cc2..e7f1a987a4 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py index 2db6063cc2..e7f1a987a4 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_mf/plugins/modules/collection_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py index 2db6063cc2..e7f1a987a4 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nothing/plugins/modules/collection_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py index 2db6063cc2..e7f1a987a4 100644 --- a/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py +++ b/tests/integration/targets/lookup_collection_version/collections/ansible_collections/testns/testcoll_nv/plugins/modules/collection_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_collection_version/library/local_module.py b/tests/integration/targets/lookup_collection_version/library/local_module.py index 022c7877af..9e9e649cb4 100644 --- a/tests/integration/targets/lookup_collection_version/library/local_module.py +++ b/tests/integration/targets/lookup_collection_version/library/local_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_etcd3/runme.sh b/tests/integration/targets/lookup_etcd3/runme.sh index 7559a1e5a2..1b37ae4f35 100755 --- a/tests/integration/targets/lookup_etcd3/runme.sh +++ b/tests/integration/targets/lookup_etcd3/runme.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/lookup_etcd3/tasks/main.yml b/tests/integration/targets/lookup_etcd3/tasks/main.yml index aef43e7cdf..47f1916c02 100644 --- a/tests/integration/targets/lookup_etcd3/tasks/main.yml +++ b/tests/integration/targets/lookup_etcd3/tasks/main.yml @@ -5,7 +5,7 @@ #################################################################### # lookup_etcd3 integration tests -# 2020, SCC France, Eric Belhomme +# Copyright 2020, SCC France, Eric Belhomme # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_etcd3/tasks/tests.yml b/tests/integration/targets/lookup_etcd3/tasks/tests.yml index 851dde5321..929c6f142a 100644 --- a/tests/integration/targets/lookup_etcd3/tasks/tests.yml +++ b/tests/integration/targets/lookup_etcd3/tasks/tests.yml @@ -1,6 +1,6 @@ --- # lookup_etcd3 integration tests -# 2020, SCC France, Eric Belhomme +# Copyright 2020, SCC France, Eric Belhomme # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/lookup_lmdb_kv/runme.sh b/tests/integration/targets/lookup_lmdb_kv/runme.sh index f6b2e50478..71faa439d1 100755 --- a/tests/integration/targets/lookup_lmdb_kv/runme.sh +++ b/tests/integration/targets/lookup_lmdb_kv/runme.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/lookup_random_pet/runme.sh b/tests/integration/targets/lookup_random_pet/runme.sh index f6b2e50478..71faa439d1 100755 --- a/tests/integration/targets/lookup_random_pet/runme.sh +++ b/tests/integration/targets/lookup_random_pet/runme.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/lookup_random_string/runme.sh b/tests/integration/targets/lookup_random_string/runme.sh index ac959fee33..35c79500ce 100755 --- a/tests/integration/targets/lookup_random_string/runme.sh +++ b/tests/integration/targets/lookup_random_string/runme.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/lookup_random_words/runme.sh b/tests/integration/targets/lookup_random_words/runme.sh index f6b2e50478..71faa439d1 100755 --- a/tests/integration/targets/lookup_random_words/runme.sh +++ b/tests/integration/targets/lookup_random_words/runme.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later set -eux diff --git a/tests/integration/targets/lxd_project/tasks/main.yml b/tests/integration/targets/lxd_project/tasks/main.yml index 7c8e165acf..d1340eebd9 100644 --- a/tests/integration/targets/lxd_project/tasks/main.yml +++ b/tests/integration/targets/lxd_project/tasks/main.yml @@ -3,6 +3,7 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/library/mdepfail.py b/tests/integration/targets/module_helper/library/mdepfail.py index c08c12e147..d48727980a 100644 --- a/tests/integration/targets/module_helper/library/mdepfail.py +++ b/tests/integration/targets/module_helper/library/mdepfail.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/library/msimple.py b/tests/integration/targets/module_helper/library/msimple.py index a8b560edc9..60a49dccb1 100644 --- a/tests/integration/targets/module_helper/library/msimple.py +++ b/tests/integration/targets/module_helper/library/msimple.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/library/msimpleda.py b/tests/integration/targets/module_helper/library/msimpleda.py index 99e4754bcf..74ec4ba010 100644 --- a/tests/integration/targets/module_helper/library/msimpleda.py +++ b/tests/integration/targets/module_helper/library/msimpleda.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/library/mstate.py b/tests/integration/targets/module_helper/library/mstate.py index b0f30f1b77..6c69f9c720 100644 --- a/tests/integration/targets/module_helper/library/mstate.py +++ b/tests/integration/targets/module_helper/library/mstate.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/tasks/main.yml b/tests/integration/targets/module_helper/tasks/main.yml index eaf9e35dc3..90006f701d 100644 --- a/tests/integration/targets/module_helper/tasks/main.yml +++ b/tests/integration/targets/module_helper/tasks/main.yml @@ -1,4 +1,4 @@ -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/tasks/mdepfail.yml b/tests/integration/targets/module_helper/tasks/mdepfail.yml index 73f981a956..3f4ed9039d 100644 --- a/tests/integration/targets/module_helper/tasks/mdepfail.yml +++ b/tests/integration/targets/module_helper/tasks/mdepfail.yml @@ -1,4 +1,4 @@ -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/tasks/msimple.yml b/tests/integration/targets/module_helper/tasks/msimple.yml index edae1a09ff..9010c455ca 100644 --- a/tests/integration/targets/module_helper/tasks/msimple.yml +++ b/tests/integration/targets/module_helper/tasks/msimple.yml @@ -1,4 +1,4 @@ -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/tasks/msimpleda.yml b/tests/integration/targets/module_helper/tasks/msimpleda.yml index 2d1064c2f2..e01b65e12c 100644 --- a/tests/integration/targets/module_helper/tasks/msimpleda.yml +++ b/tests/integration/targets/module_helper/tasks/msimpleda.yml @@ -1,4 +1,4 @@ -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/module_helper/tasks/mstate.yml b/tests/integration/targets/module_helper/tasks/mstate.yml index 7d2141adfa..7a4e9ad3e4 100644 --- a/tests/integration/targets/module_helper/tasks/mstate.yml +++ b/tests/integration/targets/module_helper/tasks/mstate.yml @@ -1,4 +1,4 @@ -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/monit/files/httpd_echo.py b/tests/integration/targets/monit/files/httpd_echo.py index 2b8f039a29..cd77da26b5 100644 --- a/tests/integration/targets/monit/files/httpd_echo.py +++ b/tests/integration/targets/monit/files/httpd_echo.py @@ -1,4 +1,4 @@ -# (c) 2020, Simon Kelly +# Copyright (c) 2020, Simon Kelly # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/pamd/tasks/main.yml b/tests/integration/targets/pamd/tasks/main.yml index 5a40c45a64..fdd16d166c 100644 --- a/tests/integration/targets/pamd/tasks/main.yml +++ b/tests/integration/targets/pamd/tasks/main.yml @@ -1,4 +1,4 @@ -# (c) 2021, Alexei Znamensky +# Copyright (c) 2021, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/pids/files/sleeper.c b/tests/integration/targets/pids/files/sleeper.c index f2d969e40b..16d4b0eaa4 100644 --- a/tests/integration/targets/pids/files/sleeper.c +++ b/tests/integration/targets/pids/files/sleeper.c @@ -1,5 +1,5 @@ /* - * (c) 2022, Alexei Znamensky + * Copyright (c) 2022, Alexei Znamensky * GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) * SPDX-License-Identifier: GPL-3.0-or-later */ diff --git a/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py b/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py index 2db6063cc2..e7f1a987a4 100644 --- a/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py +++ b/tests/integration/targets/test_a_module/collections/ansible_collections/testns/testcoll/plugins/modules/collection_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/test_a_module/library/local_module.py b/tests/integration/targets/test_a_module/library/local_module.py index 022c7877af..9e9e649cb4 100644 --- a/tests/integration/targets/test_a_module/library/local_module.py +++ b/tests/integration/targets/test_a_module/library/local_module.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (c) 2021, Felix Fontein +# Copyright (c) 2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/mock/loader.py b/tests/unit/mock/loader.py index d1cb7cee3c..948f4eecd9 100644 --- a/tests/unit/mock/loader.py +++ b/tests/unit/mock/loader.py @@ -1,4 +1,4 @@ -# (c) 2012-2014, Michael DeHaan +# Copyright (c) 2012-2014, Michael DeHaan # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/mock/procenv.py b/tests/unit/mock/procenv.py index 2b9617d9f7..4646d7f355 100644 --- a/tests/unit/mock/procenv.py +++ b/tests/unit/mock/procenv.py @@ -1,5 +1,5 @@ -# (c) 2016, Matt Davis -# (c) 2016, Toshio Kuratomi +# Copyright (c) 2016, Matt Davis +# Copyright (c) 2016, Toshio Kuratomi # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/mock/vault_helper.py b/tests/unit/mock/vault_helper.py index dbe91a5945..2b116129f5 100644 --- a/tests/unit/mock/vault_helper.py +++ b/tests/unit/mock/vault_helper.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/mock/yaml_helper.py b/tests/unit/mock/yaml_helper.py index dc50c6ef64..ce1bd719b8 100644 --- a/tests/unit/mock/yaml_helper.py +++ b/tests/unit/mock/yaml_helper.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/conftest.py b/tests/unit/plugins/become/conftest.py index c6e9cc7429..93b593bdfd 100644 --- a/tests/unit/plugins/become/conftest.py +++ b/tests/unit/plugins/become/conftest.py @@ -1,5 +1,5 @@ -# (c) 2012-2014, Michael DeHaan -# (c) 2017 Ansible Project +# Copyright (c) 2012-2014, Michael DeHaan +# Copyright (c) 2017 Ansible Project # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/helper.py b/tests/unit/plugins/become/helper.py index 46a1c2175d..410738504b 100644 --- a/tests/unit/plugins/become/helper.py +++ b/tests/unit/plugins/become/helper.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# (c) 2012-2014, Michael DeHaan +# Copyright (c) 2012-2014, Michael DeHaan # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/test_doas.py b/tests/unit/plugins/become/test_doas.py index b8659d14e8..4a922e9f2b 100644 --- a/tests/unit/plugins/become/test_doas.py +++ b/tests/unit/plugins/become/test_doas.py @@ -1,5 +1,5 @@ -# (c) 2012-2014, Michael DeHaan -# (c) 2020 Ansible Project +# Copyright (c) 2012-2014, Michael DeHaan +# Copyright (c) 2020 Ansible Project # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/test_dzdo.py b/tests/unit/plugins/become/test_dzdo.py index 94044873b3..24af2b50c2 100644 --- a/tests/unit/plugins/become/test_dzdo.py +++ b/tests/unit/plugins/become/test_dzdo.py @@ -1,5 +1,5 @@ -# (c) 2012-2014, Michael DeHaan -# (c) 2020 Ansible Project +# Copyright (c) 2012-2014, Michael DeHaan +# Copyright (c) 2020 Ansible Project # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/test_ksu.py b/tests/unit/plugins/become/test_ksu.py index 369e54f0b9..3ec1716612 100644 --- a/tests/unit/plugins/become/test_ksu.py +++ b/tests/unit/plugins/become/test_ksu.py @@ -1,5 +1,5 @@ -# (c) 2012-2014, Michael DeHaan -# (c) 2020 Ansible Project +# Copyright (c) 2012-2014, Michael DeHaan +# Copyright (c) 2020 Ansible Project # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/test_pbrun.py b/tests/unit/plugins/become/test_pbrun.py index bc174c997d..eceea2e66b 100644 --- a/tests/unit/plugins/become/test_pbrun.py +++ b/tests/unit/plugins/become/test_pbrun.py @@ -1,5 +1,5 @@ -# (c) 2012-2014, Michael DeHaan -# (c) 2020 Ansible Project +# Copyright (c) 2012-2014, Michael DeHaan +# Copyright (c) 2020 Ansible Project # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/test_pfexec.py b/tests/unit/plugins/become/test_pfexec.py index 3799319d08..445185c197 100644 --- a/tests/unit/plugins/become/test_pfexec.py +++ b/tests/unit/plugins/become/test_pfexec.py @@ -1,5 +1,5 @@ -# (c) 2012-2014, Michael DeHaan -# (c) 2020 Ansible Project +# Copyright (c) 2012-2014, Michael DeHaan +# Copyright (c) 2020 Ansible Project # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/become/test_sudosu.py b/tests/unit/plugins/become/test_sudosu.py index 9d40ba18e7..f63f48df70 100644 --- a/tests/unit/plugins/become/test_sudosu.py +++ b/tests/unit/plugins/become/test_sudosu.py @@ -1,5 +1,5 @@ -# (c) 2012-2014, Michael DeHaan -# (c) 2021 Ansible Project +# Copyright (c) 2012-2014, Michael DeHaan +# Copyright (c) 2021 Ansible Project # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/callback/test_elastic.py b/tests/unit/plugins/callback/test_elastic.py index bb825dbeda..73f4a6c27c 100644 --- a/tests/unit/plugins/callback/test_elastic.py +++ b/tests/unit/plugins/callback/test_elastic.py @@ -1,4 +1,4 @@ -# (C) 2021, Victor Martinez +# Copyright (c) 2021, Victor Martinez # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/callback/test_loganalytics.py b/tests/unit/plugins/callback/test_loganalytics.py index 9c9893694c..a61ad32d3a 100644 --- a/tests/unit/plugins/callback/test_loganalytics.py +++ b/tests/unit/plugins/callback/test_loganalytics.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/callback/test_opentelemetry.py b/tests/unit/plugins/callback/test_opentelemetry.py index 4ab6811cdb..1865e0b153 100644 --- a/tests/unit/plugins/callback/test_opentelemetry.py +++ b/tests/unit/plugins/callback/test_opentelemetry.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (C) 2021, Victor Martinez +# Copyright (c) 2021, Victor Martinez # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/lookup/test_bitwarden.py b/tests/unit/plugins/lookup/test_bitwarden.py index b496ec2a5e..7f86c39697 100644 --- a/tests/unit/plugins/lookup/test_bitwarden.py +++ b/tests/unit/plugins/lookup/test_bitwarden.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2022, Jonathan Lung +# Copyright (c) 2022, Jonathan Lung # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/lookup/test_dependent.py b/tests/unit/plugins/lookup/test_dependent.py index 2de6b93314..74d7c41239 100644 --- a/tests/unit/plugins/lookup/test_dependent.py +++ b/tests/unit/plugins/lookup/test_dependent.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2020-2021, Felix Fontein +# Copyright (c) 2020-2021, Felix Fontein # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/lookup/test_dsv.py b/tests/unit/plugins/lookup/test_dsv.py index f8eac520a5..a9a2d30ee6 100644 --- a/tests/unit/plugins/lookup/test_dsv.py +++ b/tests/unit/plugins/lookup/test_dsv.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2020, Adam Migus +# Copyright (c) 2020, Adam Migus # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/lookup/test_etcd3.py b/tests/unit/plugins/lookup/test_etcd3.py index 797f293eaa..798d537ed9 100644 --- a/tests/unit/plugins/lookup/test_etcd3.py +++ b/tests/unit/plugins/lookup/test_etcd3.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# (c) 2020, SCC France, Eric Belhomme +# Copyright (c) 2020, SCC France, Eric Belhomme # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/lookup/test_manifold.py b/tests/unit/plugins/lookup/test_manifold.py index f3f70384a3..e9fd912b2b 100644 --- a/tests/unit/plugins/lookup/test_manifold.py +++ b/tests/unit/plugins/lookup/test_manifold.py @@ -1,5 +1,5 @@ -# (c) 2018, Arigato Machine Inc. -# (c) 2018, Ansible Project +# Copyright (c) 2018, Arigato Machine Inc. +# Copyright (c) 2018, Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/lookup/test_onepassword.py b/tests/unit/plugins/lookup/test_onepassword.py index 2386bf80f4..e639dcddbe 100644 --- a/tests/unit/plugins/lookup/test_onepassword.py +++ b/tests/unit/plugins/lookup/test_onepassword.py @@ -1,5 +1,5 @@ -# (c) 2018, Scott Buchanan -# (c) 2016, Andrew Zenk (test_lastpass.py used as starting point) +# Copyright (c) 2018, Scott Buchanan +# Copyright (c) 2016, Andrew Zenk (test_lastpass.py used as starting point) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/lookup/test_tss.py b/tests/unit/plugins/lookup/test_tss.py index e25c9ae22d..47ca79a697 100644 --- a/tests/unit/plugins/lookup/test_tss.py +++ b/tests/unit/plugins/lookup/test_tss.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2020, Adam Migus +# Copyright (c) 2020, Adam Migus # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/module_utils/cloud/test_backoff.py b/tests/unit/plugins/module_utils/cloud/test_backoff.py index 06df9c14a7..5a5188669a 100644 --- a/tests/unit/plugins/module_utils/cloud/test_backoff.py +++ b/tests/unit/plugins/module_utils/cloud/test_backoff.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py b/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py index ddf0201785..037305d3f9 100644 --- a/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py +++ b/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # 2018.07.26 --- use DictComparison instead of GcpRequest # -# (c) 2016, Tom Melendez +# Copyright (c) 2016, Tom Melendez # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py b/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py index a3fdadac9d..1344496b18 100644 --- a/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py +++ b/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/module_utils/test_cmd_runner.py b/tests/unit/plugins/module_utils/test_cmd_runner.py index edbafe00db..5fdc5fb5fc 100644 --- a/tests/unit/plugins/module_utils/test_cmd_runner.py +++ b/tests/unit/plugins/module_utils/test_cmd_runner.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Alexei Znamensky # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/module_utils/test_csv.py b/tests/unit/plugins/module_utils/test_csv.py index 94b0219a62..8b83908e79 100644 --- a/tests/unit/plugins/module_utils/test_csv.py +++ b/tests/unit/plugins/module_utils/test_csv.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/module_utils/test_database.py b/tests/unit/plugins/module_utils/test_database.py index 7067eb3b4e..c766712025 100644 --- a/tests/unit/plugins/module_utils/test_database.py +++ b/tests/unit/plugins/module_utils/test_database.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/cloud/linode/conftest.py b/tests/unit/plugins/modules/cloud/linode/conftest.py index 8193d134d2..33a704d343 100644 --- a/tests/unit/plugins/modules/cloud/linode/conftest.py +++ b/tests/unit/plugins/modules/cloud/linode/conftest.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/files/test_archive.py b/tests/unit/plugins/modules/files/test_archive.py index b181978bfe..00c16db33c 100644 --- a/tests/unit/plugins/modules/files/test_archive.py +++ b/tests/unit/plugins/modules/files/test_archive.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_alerta_customer.py b/tests/unit/plugins/modules/monitoring/test_alerta_customer.py index 1212847816..21f6804d8a 100644 --- a/tests/unit/plugins/modules/monitoring/test_alerta_customer.py +++ b/tests/unit/plugins/modules/monitoring/test_alerta_customer.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py b/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py index a69aea0af3..34f1bc6914 100644 --- a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py +++ b/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled b/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled index 5201cc8e45..52f27710cf 100644 --- a/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled +++ b/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_monit.py b/tests/unit/plugins/modules/monitoring/test_monit.py index 313530d6d3..7e5744a10e 100644 --- a/tests/unit/plugins/modules/monitoring/test_monit.py +++ b/tests/unit/plugins/modules/monitoring/test_monit.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty.py b/tests/unit/plugins/modules/monitoring/test_pagerduty.py index fdf09ce33f..47aae12b3e 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty.py +++ b/tests/unit/plugins/modules/monitoring/test_pagerduty.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py b/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py index 110e6f186a..d076bc4f38 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py +++ b/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py b/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py index 7699f4a74c..d8cd3d5a99 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py +++ b/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/monitoring/test_statsd.py b/tests/unit/plugins/modules/monitoring/test_statsd.py index 8a065f1e6e..05613e369b 100644 --- a/tests/unit/plugins/modules/monitoring/test_statsd.py +++ b/tests/unit/plugins/modules/monitoring/test_statsd.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py index 65fc99dd72..308d352517 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2021 Florian Dambrine +# Copyright (c) 2021 Florian Dambrine # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py index a283652acf..d66cf63711 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# (c) 2021 Florian Dambrine +# Copyright (c) 2021 Florian Dambrine # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/net_tools/test_dnsimple.py b/tests/unit/plugins/modules/net_tools/test_dnsimple.py index 60d890ceda..2e246e5f66 100644 --- a/tests/unit/plugins/modules/net_tools/test_dnsimple.py +++ b/tests/unit/plugins/modules/net_tools/test_dnsimple.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py b/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py index b949c1d5d4..bd08df4ee5 100644 --- a/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py +++ b/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/notification/test_discord.py b/tests/unit/plugins/modules/notification/test_discord.py index d11b49a176..20f9547d43 100644 --- a/tests/unit/plugins/modules/notification/test_discord.py +++ b/tests/unit/plugins/modules/notification/test_discord.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/notification/test_slack.py b/tests/unit/plugins/modules/notification/test_slack.py index 5c6c24ded4..fd6fe0e4bf 100644 --- a/tests/unit/plugins/modules/notification/test_slack.py +++ b/tests/unit/plugins/modules/notification/test_slack.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/conftest.py b/tests/unit/plugins/modules/packaging/os/conftest.py index 9213ad7e62..a8f890050e 100644 --- a/tests/unit/plugins/modules/packaging/os/conftest.py +++ b/tests/unit/plugins/modules/packaging/os/conftest.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_apk.py b/tests/unit/plugins/modules/packaging/os/test_apk.py index 3525f66e80..a7f3bee895 100644 --- a/tests/unit/plugins/modules/packaging/os/test_apk.py +++ b/tests/unit/plugins/modules/packaging/os/test_apk.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_homebrew.py b/tests/unit/plugins/modules/packaging/os/test_homebrew.py index dee1bd5b3b..a1b561906e 100644 --- a/tests/unit/plugins/modules/packaging/os/test_homebrew.py +++ b/tests/unit/plugins/modules/packaging/os/test_homebrew.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py b/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py index 1e5a8533ba..ac872c7b6c 100644 --- a/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py +++ b/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_macports.py b/tests/unit/plugins/modules/packaging/os/test_macports.py index 6d32644fe8..189f9616fe 100644 --- a/tests/unit/plugins/modules/packaging/os/test_macports.py +++ b/tests/unit/plugins/modules/packaging/os/test_macports.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman.py b/tests/unit/plugins/modules/packaging/os/test_pacman.py index 83283c1d1f..6826ee81e2 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman.py +++ b/tests/unit/plugins/modules/packaging/os/test_pacman.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_pkgin.py b/tests/unit/plugins/modules/packaging/os/test_pkgin.py index c17418f0de..4504e46963 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pkgin.py +++ b/tests/unit/plugins/modules/packaging/os/test_pkgin.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py index 40e906db17..cfbdfb36f4 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py b/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py index f83197f66c..54fde2138a 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py @@ -1,4 +1,4 @@ -# (c) 2018, Sean Myers +# Copyright (c) 2018, Sean Myers # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py index 39ed699e9f..035d4c9852 100644 --- a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py index 6577550179..c8fccc9703 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py +++ b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py index e5beab9614..b13ea4ca9a 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py +++ b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py index 1e66acc082..e33db12bf2 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py index 63d3537c2c..c9b7cf8a7f 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py index 6b2a6a13f0..4c53cd8246 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py index ef2773e79c..8b370a10ed 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py index b1d78895e5..faf8ca009a 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py index a8c832ee36..ad9ec58044 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py index ea15eb30b5..60303234a3 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py @@ -1,4 +1,4 @@ -# (c) 2017, Roman Belyakovsky +# Copyright (c) 2017, Roman Belyakovsky # # This file is part of Ansible # diff --git a/tests/unit/plugins/modules/system/test_modprobe.py b/tests/unit/plugins/modules/system/test_modprobe.py index 37ff737b82..306399375b 100644 --- a/tests/unit/plugins/modules/system/test_modprobe.py +++ b/tests/unit/plugins/modules/system/test_modprobe.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/system/test_pamd.py b/tests/unit/plugins/modules/system/test_pamd.py index 810a038afa..cf89acf5c6 100644 --- a/tests/unit/plugins/modules/system/test_pamd.py +++ b/tests/unit/plugins/modules/system/test_pamd.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/system/test_sap_task_list_execute.py b/tests/unit/plugins/modules/system/test_sap_task_list_execute.py index 63c341c6da..fb8bfa9d7f 100644 --- a/tests/unit/plugins/modules/system/test_sap_task_list_execute.py +++ b/tests/unit/plugins/modules/system/test_sap_task_list_execute.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/system/test_sysupgrade.py b/tests/unit/plugins/modules/system/test_sysupgrade.py index e2b75b2ea6..4811e686a2 100644 --- a/tests/unit/plugins/modules/system/test_sysupgrade.py +++ b/tests/unit/plugins/modules/system/test_sysupgrade.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/utils.py b/tests/unit/plugins/modules/utils.py index 9691976357..1f7f14722f 100644 --- a/tests/unit/plugins/modules/utils.py +++ b/tests/unit/plugins/modules/utils.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py b/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py index 67401c5b16..b39bc99a8c 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py +++ b/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py index f8716b3c8a..bf32068897 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py +++ b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py index bdacd2bc57..f8a65be23e 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py +++ b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py @@ -1,3 +1,4 @@ +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later From aab22e7f323206ddc735d3c5157ca975c03cf771 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 8 Aug 2022 23:23:08 +0200 Subject: [PATCH 0161/2104] Add remaining copyright statements, add licenses sanity test (#5098) * Add sanity test (currently fails). * doc_fragments can also be non-GPLv3+. * Replace 'Author:' by 'Copyright:' in some specific cases. * Avoid matching string for license checkers. * Reformulate not to throw license detection off. * Add PSF copyright notice for plugins/module_utils/_mount.py. * Add generic copyright notices. * Update changelog fragment. --- changelogs/fragments/licenses.yml | 2 +- plugins/module_utils/_mount.py | 2 + .../monitoring/datadog/datadog_event.py | 1 + plugins/modules/monitoring/icinga2_host.py | 1 + plugins/modules/net_tools/snmp_facts.py | 1 + .../integration/targets/jboss/tasks/jboss.yml | 4 +- .../targets/kernel_blacklist/tasks/main.yml | 6 +- tests/sanity/extra/licenses.json | 4 + tests/sanity/extra/licenses.py | 113 ++++++++++++++++++ .../modules/packaging/language/test_cpanm.py | 6 +- .../packaging/os/test_redhat_subscription.py | 2 +- .../modules/system/test_gconftool2_info.py | 2 +- .../plugins/modules/system/test_xfconf.py | 6 +- .../modules/system/test_xfconf_info.py | 2 +- 14 files changed, 137 insertions(+), 15 deletions(-) create mode 100644 tests/sanity/extra/licenses.json create mode 100755 tests/sanity/extra/licenses.py diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml index 468dc4b343..465effc699 100644 --- a/changelogs/fragments/licenses.yml +++ b/changelogs/fragments/licenses.yml @@ -1,3 +1,3 @@ minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095)." + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098)." - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/plugins/module_utils/_mount.py b/plugins/module_utils/_mount.py index 07fff92053..63de457d7d 100644 --- a/plugins/module_utils/_mount.py +++ b/plugins/module_utils/_mount.py @@ -2,6 +2,8 @@ # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is based on # Lib/posixpath.py of cpython +# +# Copyright (c) 2001-2022 Python Software Foundation. All rights reserved. # It is licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # (See LICENSES/PSF-2.0.txt in this collection) # SPDX-License-Identifier: PSF-2.0 diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/monitoring/datadog/datadog_event.py index b7a4c75e43..45671dd7d7 100644 --- a/plugins/modules/monitoring/datadog/datadog_event.py +++ b/plugins/modules/monitoring/datadog/datadog_event.py @@ -6,6 +6,7 @@ # # This module is proudly sponsored by iGeolise (www.igeolise.com) and # Tiny Lab Productions (www.tinylabproductions.com). +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/monitoring/icinga2_host.py b/plugins/modules/monitoring/icinga2_host.py index 498f1a9938..6b42a5d8da 100644 --- a/plugins/modules/monitoring/icinga2_host.py +++ b/plugins/modules/monitoring/icinga2_host.py @@ -3,6 +3,7 @@ # This module is proudly sponsored by CGI (www.cgi.com) and # KPN (www.kpn.com). +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/plugins/modules/net_tools/snmp_facts.py b/plugins/modules/net_tools/snmp_facts.py index 71dd9259bb..7683d7308b 100644 --- a/plugins/modules/net_tools/snmp_facts.py +++ b/plugins/modules/net_tools/snmp_facts.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- # This file is part of Networklore's snmp library for Ansible +# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/integration/targets/jboss/tasks/jboss.yml b/tests/integration/targets/jboss/tasks/jboss.yml index ec04a13f26..13d0c6bc70 100644 --- a/tests/integration/targets/jboss/tasks/jboss.yml +++ b/tests/integration/targets/jboss/tasks/jboss.yml @@ -4,8 +4,8 @@ # Integration tests for jboss module. # SPDX-License-Identifier: GPL-3.0-or-later -# helloworld.war (got from https://github.com/aeimer/java-example-helloworld-war/) license: -# MIT License +# helloworld.war (got from https://github.com/aeimer/java-example-helloworld-war/) is licensed +# under the MIT license: # # Copyright (c) 2017 Alex Eimer # diff --git a/tests/integration/targets/kernel_blacklist/tasks/main.yml b/tests/integration/targets/kernel_blacklist/tasks/main.yml index 3b34bfe423..e169d5479e 100644 --- a/tests/integration/targets/kernel_blacklist/tasks/main.yml +++ b/tests/integration/targets/kernel_blacklist/tasks/main.yml @@ -49,7 +49,7 @@ expected_content: | # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) - # SPDX-License-Identifier: GPL-3.0-or-later + # SPDX-{{ '' }}License-Identifier: GPL-3.0-or-later blacklist aaaa blacklist bbbb @@ -76,7 +76,7 @@ content: | # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) - # SPDX-License-Identifier: GPL-3.0-or-later + # SPDX-{{ '' }}License-Identifier: GPL-3.0-or-later blacklist aaaa blacklist bbbb @@ -104,7 +104,7 @@ content: | # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) - # SPDX-License-Identifier: GPL-3.0-or-later + # SPDX-{{ '' }}License-Identifier: GPL-3.0-or-later blacklist aaaa blacklist cccc diff --git a/tests/sanity/extra/licenses.json b/tests/sanity/extra/licenses.json new file mode 100644 index 0000000000..50e47ca88b --- /dev/null +++ b/tests/sanity/extra/licenses.json @@ -0,0 +1,4 @@ +{ + "include_symlinks": false, + "output": "path-message" +} diff --git a/tests/sanity/extra/licenses.py b/tests/sanity/extra/licenses.py new file mode 100755 index 0000000000..7fdc21bcae --- /dev/null +++ b/tests/sanity/extra/licenses.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python +# Copyright (c) 2022, Felix Fontein +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +"""Prevent files without a correct license identifier from being added to the source tree.""" +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import glob +import sys + + +def format_license_list(licenses): + if not licenses: + return '(empty)' + return ', '.join(['"%s"' % license for license in licenses]) + + +def find_licenses(filename, relax=False): + spdx_license_identifiers = [] + other_license_identifiers = [] + has_copyright = False + try: + with open(filename, 'r', encoding='utf-8') as f: + for line in f: + line = line.rstrip() + if 'Copyright ' in line: + has_copyright = True + if 'Copyright: ' in line: + print('%s: found copyright line with "Copyright:". Please remove the colon.' % (filename, )) + if 'SPDX-FileCopyrightText: ' in line: + has_copyright = True + idx = line.find('SPDX-License-Identifier: ') + if idx >= 0: + spdx_license_identifiers.append(line[idx + len('SPDX-License-Identifier: '):]) + if 'GNU General Public License' in line: + if 'v3.0+' in line: + other_license_identifiers.append('GPL-3.0-or-later') + if 'version 3 or later' in line: + other_license_identifiers.append('GPL-3.0-or-later') + if 'Simplified BSD License' in line: + other_license_identifiers.append('BSD-2-Clause') + if 'Apache License 2.0' in line: + other_license_identifiers.append('Apache-2.0') + if 'PSF License' in line or 'Python-2.0' in line: + other_license_identifiers.append('PSF-2.0') + if 'MIT License' in line: + other_license_identifiers.append('MIT') + except Exception as exc: + print('%s: error while processing file: %s' % (filename, exc)) + if len(set(spdx_license_identifiers)) < len(spdx_license_identifiers): + print('%s: found identical SPDX-License-Identifier values' % (filename, )) + if other_license_identifiers and set(other_license_identifiers) != set(spdx_license_identifiers): + print('%s: SPDX-License-Identifier yielded the license list %s, while manual guessing yielded the license list %s' % ( + filename, format_license_list(spdx_license_identifiers), format_license_list(other_license_identifiers))) + if not has_copyright and not relax: + print('%s: found no copyright notice' % (filename, )) + return sorted(spdx_license_identifiers) + + +def main(): + """Main entry point.""" + paths = sys.argv[1:] or sys.stdin.read().splitlines() + + # The following paths are allowed to have no license identifier + no_comments_allowed = [ + 'changelogs/fragments/*.yml', + 'changelogs/fragments/*.yaml', + 'tests/sanity/extra/*.json', + 'tests/sanity/ignore-2.*.txt', + 'COPYING', + ] + + # These files are completely ignored + ignore_paths = [ + 'CHANGELOG.rst', + 'changelogs/changelog.yaml', + 'tests/sanity/extra/licenses.py', # The strings in find_licenses() confuse this code :-) + '.ansible-test-timeout.json', + 'LICENSES/*.txt', + ] + + no_comments_allowed = [fn for pattern in no_comments_allowed for fn in glob.glob(pattern)] + ignore_paths = [fn for pattern in ignore_paths for fn in glob.glob(pattern)] + + valid_licenses = [license_file[len('LICENSES/'):-len('.txt')] for license_file in glob.glob('LICENSES/*.txt')] + + for path in paths: + if path.startswith('./'): + path = path[2:] + if path in ignore_paths or path.startswith('tests/output/'): + continue + if os.stat(path).st_size == 0: + continue + if not path.endswith('.license') and os.path.exists(path + '.license'): + path = path + '.license' + valid_licenses_for_path = valid_licenses + if path.startswith('plugins/') and not path.startswith(('plugins/modules/', 'plugins/module_utils/', 'plugins/doc_fragments/')): + valid_licenses_for_path = [license for license in valid_licenses if license == 'GPL-3.0-or-later'] + licenses = find_licenses(path, relax=path in no_comments_allowed) + if not licenses: + if path not in no_comments_allowed: + print('%s: must have at least one license' % (path, )) + else: + for license in licenses: + if license not in valid_licenses_for_path: + print('%s: found not allowed license "%s", must be one of %s' % ( + path, license, format_license_list(valid_licenses_for_path))) + + +if __name__ == '__main__': + main() diff --git a/tests/unit/plugins/modules/packaging/language/test_cpanm.py b/tests/unit/plugins/modules/packaging/language/test_cpanm.py index af79101599..a52396cd36 100644 --- a/tests/unit/plugins/modules/packaging/language/test_cpanm.py +++ b/tests/unit/plugins/modules/packaging/language/test_cpanm.py @@ -1,6 +1,6 @@ -# Author: Alexei Znamensky (russoz@gmail.com) -# Largely adapted from test_redhat_subscription by -# Jiri Hnidek (jhnidek@redhat.com) +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# Largely adapted from test_redhat_subscription: +# Copyright (c) Jiri Hnidek (jhnidek@redhat.com) # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py index 11a0ca7cfe..95c02137b9 100644 --- a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Author: Jiri Hnidek (jhnidek@redhat.com) +# Copyright (c) Jiri Hnidek (jhnidek@redhat.com) # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/system/test_gconftool2_info.py b/tests/unit/plugins/modules/system/test_gconftool2_info.py index e94b62dc25..1847dce428 100644 --- a/tests/unit/plugins/modules/system/test_gconftool2_info.py +++ b/tests/unit/plugins/modules/system/test_gconftool2_info.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Author: Alexei Znamensky (russoz@gmail.com) +# Copyright (c) Alexei Znamensky (russoz@gmail.com) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/system/test_xfconf.py index 653cb13664..c944d7be05 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/system/test_xfconf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# Author: Alexei Znamensky (russoz@gmail.com) -# Largely adapted from test_redhat_subscription by -# Jiri Hnidek (jhnidek@redhat.com) +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# Largely adapted from test_redhat_subscription: +# Copyright (c) Jiri Hnidek (jhnidek@redhat.com) # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later diff --git a/tests/unit/plugins/modules/system/test_xfconf_info.py b/tests/unit/plugins/modules/system/test_xfconf_info.py index 4d6d626f65..cdb59e81af 100644 --- a/tests/unit/plugins/modules/system/test_xfconf_info.py +++ b/tests/unit/plugins/modules/system/test_xfconf_info.py @@ -1,4 +1,4 @@ -# Author: Alexei Znamensky (russoz@gmail.com) +# Copyright (c) Alexei Znamensky (russoz@gmail.com) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later From 83317419d7249051e75b1a5c84879677df79f056 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 9 Aug 2022 20:15:51 +1200 Subject: [PATCH 0162/2104] pipx: add required_if fo upgrade and reinstall (#5100) * pipx: add required_if for upgrade and reinstall * add changelog fragment --- changelogs/fragments/5100-pipx-req-if.yaml | 2 ++ plugins/modules/packaging/language/pipx.py | 3 ++- tests/integration/targets/pipx/tasks/main.yml | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5100-pipx-req-if.yaml diff --git a/changelogs/fragments/5100-pipx-req-if.yaml b/changelogs/fragments/5100-pipx-req-if.yaml new file mode 100644 index 0000000000..8986503eb7 --- /dev/null +++ b/changelogs/fragments/5100-pipx-req-if.yaml @@ -0,0 +1,2 @@ +minor_changes: + - pipx - module fails faster when ``name`` is missing for states ``upgrade`` and ``reinstall`` (https://github.com/ansible-collections/community.general/pull/5100). diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/packaging/language/pipx.py index 968d0f7d82..36117bacea 100644 --- a/plugins/modules/packaging/language/pipx.py +++ b/plugins/modules/packaging/language/pipx.py @@ -164,7 +164,8 @@ class PipX(StateModuleHelper): ('state', 'install', ['name']), ('state', 'absent', ['name']), ('state', 'uninstall', ['name']), - # missing upgrade and reinstall requiring 'name' + ('state', 'upgrade', ['name']), + ('state', 'reinstall', ['name']), ('state', 'inject', ['name', 'inject_packages']), ], supports_check_mode=True, diff --git a/tests/integration/targets/pipx/tasks/main.yml b/tests/integration/targets/pipx/tasks/main.yml index ff6d921697..7013880ad4 100644 --- a/tests/integration/targets/pipx/tasks/main.yml +++ b/tests/integration/targets/pipx/tasks/main.yml @@ -24,7 +24,6 @@ community.general.pipx: name: tox register: install_tox_again - ignore_errors: yes - name: install application tox again force community.general.pipx: @@ -61,12 +60,24 @@ state: reinstall register: reinstall_tox_324 +- name: reinstall without name + community.general.pipx: + state: reinstall + register: reinstall_noname + ignore_errors: yes + - name: upgrade tox 3.24.0 community.general.pipx: name: tox state: upgrade register: upgrade_tox_324 +- name: upgrade without name + community.general.pipx: + state: upgrade + register: upgrade_noname + ignore_errors: yes + - name: downgrade tox 3.24.0 community.general.pipx: name: tox @@ -94,6 +105,8 @@ - downgrade_tox_324.application.tox.version == '3.24.0' - uninstall_tox_324 is changed - "'tox' not in uninstall_tox_324.application" + - upgrade_noname is failed + - reinstall_noname is failed ############################################################################## - name: ensure application ansible-lint is uninstalled From dc170441499ed91af2405b3ff2e577369f39262d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 10 Aug 2022 18:28:14 +0200 Subject: [PATCH 0163/2104] Next expected release is 5.5.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index f48f8dd8ca..e2f868d53b 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 5.4.0 +version: 5.5.0 readme: README.md authors: - Ansible (https://github.com/ansible) From 0338eb7a7c4f28882ea2df57192b9b8c0093a1ec Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 12 Aug 2022 04:03:57 +0200 Subject: [PATCH 0164/2104] Fix Proxmox `node`, `name` condition. (#5108) * Fix Proxmox `node`, `name` condition. * Add changelog entry. --- changelogs/fragments/5108-proxmox-node-name-condition.yml | 2 ++ plugins/modules/cloud/misc/proxmox_kvm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5108-proxmox-node-name-condition.yml diff --git a/changelogs/fragments/5108-proxmox-node-name-condition.yml b/changelogs/fragments/5108-proxmox-node-name-condition.yml new file mode 100644 index 0000000000..e5d2aef89a --- /dev/null +++ b/changelogs/fragments/5108-proxmox-node-name-condition.yml @@ -0,0 +1,2 @@ +bugfixes: + - proxmox_kvm - fix wrong condition (https://github.com/ansible-collections/community.general/pull/5108). diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 774a926f59..90e9a14e6a 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -1234,7 +1234,7 @@ def main(): module.exit_json(changed=False, vmid=vmid, msg="VM with vmid <%s> already exists" % vmid) elif proxmox.get_vmid(name, ignore_missing=True) and not (update or clone): module.exit_json(changed=False, vmid=proxmox.get_vmid(name), msg="VM with name <%s> already exists" % name) - elif not (node, name): + elif (not node) or (not name): module.fail_json(msg='node, name is mandatory for creating/updating vm') elif not proxmox.get_node(node): module.fail_json(msg="node '%s' does not exist in cluster" % node) From a54af8909c79b25efaa55422a71f158a2dde924e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 12 Aug 2022 11:07:30 +0200 Subject: [PATCH 0165/2104] Fix linting errors; fix some real bugs (#5111) * Fix linting errors. * Fix bugs. * Another linter error ignored. * More fixes. * Ignore sanity errors with older versions. ci_complete * Forgot to commit more changes. --- changelogs/fragments/5111-fixes.yml | 7 +++++++ plugins/callback/dense.py | 4 ++-- plugins/connection/funcd.py | 2 +- plugins/module_utils/ilo_redfish_utils.py | 2 +- plugins/module_utils/memset.py | 8 ++++---- plugins/module_utils/rax.py | 3 +-- plugins/module_utils/redfish_utils.py | 2 +- plugins/module_utils/redis.py | 2 ++ .../modules/cloud/memset/memset_dns_reload.py | 6 +++--- .../cloud/memset/memset_memstore_info.py | 4 ++-- .../modules/cloud/memset/memset_server_info.py | 4 ++-- plugins/modules/cloud/memset/memset_zone.py | 10 +++++----- .../modules/cloud/memset/memset_zone_domain.py | 12 ++++++------ .../modules/cloud/memset/memset_zone_record.py | 18 +++++++++--------- plugins/modules/cloud/misc/rhevm.py | 1 - plugins/modules/cloud/opennebula/one_image.py | 2 +- .../modules/cloud/opennebula/one_image_info.py | 2 +- .../modules/cloud/opennebula/one_service.py | 2 +- .../modules/cloud/packet/packet_ip_subnet.py | 2 +- .../profitbricks/profitbricks_datacenter.py | 2 +- .../cloud/profitbricks/profitbricks_volume.py | 2 +- .../scaleway/scaleway_security_group_rule.py | 1 + plugins/modules/clustering/etcd3.py | 1 + plugins/modules/files/ini_file.py | 2 +- plugins/modules/identity/ipa/ipa_otptoken.py | 4 ++-- plugins/modules/monitoring/pagerduty_user.py | 2 ++ plugins/modules/net_tools/dnsimple_info.py | 16 ++++++++-------- .../packaging/language/pip_package_info.py | 9 ++++----- plugins/modules/packaging/language/yarn.py | 2 +- plugins/modules/packaging/os/copr.py | 1 + plugins/modules/packaging/os/flatpak.py | 14 +++++++------- plugins/modules/packaging/os/flatpak_remote.py | 6 +++--- plugins/modules/packaging/os/xbps.py | 2 +- .../manageiq/manageiq_alert_profiles.py | 2 +- .../gitlab/gitlab_group_members.py | 1 + .../gitlab/gitlab_project_members.py | 1 + .../source_control/gitlab/gitlab_runner.py | 2 +- plugins/modules/storage/pmem/pmem.py | 1 + plugins/modules/system/beadm.py | 4 ++-- plugins/modules/system/homectl.py | 2 +- plugins/modules/system/keyring.py | 1 + plugins/modules/system/keyring_info.py | 1 + plugins/modules/system/parted.py | 12 ++++++------ .../modules/system/sap_task_list_execute.py | 2 ++ .../web_infrastructure/apache2_mod_proxy.py | 4 ++-- .../targets/mail/files/smtpserver.py | 2 +- tests/sanity/ignore-2.11.txt | 1 + tests/sanity/ignore-2.12.txt | 1 + tests/sanity/ignore-2.13.txt | 1 + .../remote_management/lxca/test_lxca_cmms.py | 4 ++-- .../remote_management/lxca/test_lxca_nodes.py | 4 ++-- .../plugins/modules/storage/pmem/test_pmem.py | 6 +++--- 52 files changed, 115 insertions(+), 94 deletions(-) create mode 100644 changelogs/fragments/5111-fixes.yml diff --git a/changelogs/fragments/5111-fixes.yml b/changelogs/fragments/5111-fixes.yml new file mode 100644 index 0000000000..88bde345cd --- /dev/null +++ b/changelogs/fragments/5111-fixes.yml @@ -0,0 +1,7 @@ +bugfixes: + - "funcd connection plugin - fix signature of ``exec_command`` (https://github.com/ansible-collections/community.general/pull/5111)." + - "packet_ip_subnet - fix error reporting in case of invalid CIDR prefix lengths (https://github.com/ansible-collections/community.general/pull/5111)." + - "dnsimple_info - correctly report missing library as ``requests`` and not ``another_library`` (https://github.com/ansible-collections/community.general/pull/5111)." + - "pip_package_info - remove usage of global variable (https://github.com/ansible-collections/community.general/pull/5111)." + - "manageiq_alert_profiles - avoid crash when reporting unknown profile caused by trying to return an undefined variable (https://github.com/ansible-collections/community.general/pull/5111)." + - "apache2_mod_proxy - avoid crash when reporting inability to parse balancer_member_page HTML caused by using an undefined variable in the error message (https://github.com/ansible-collections/community.general/pull/5111)." diff --git a/plugins/callback/dense.py b/plugins/callback/dense.py index 37a9a16b21..18e4f162ff 100644 --- a/plugins/callback/dense.py +++ b/plugins/callback/dense.py @@ -233,13 +233,13 @@ class CallbackModule(CallbackModule_default): # Remove non-essential attributes for attr in self.removed_attributes: if attr in result: - del(result[attr]) + del result[attr] # Remove empty attributes (list, dict, str) for attr in result.copy(): if isinstance(result[attr], (MutableSequence, MutableMapping, binary_type, text_type)): if not result[attr]: - del(result[attr]) + del result[attr] def _handle_exceptions(self, result): if 'exception' in result: diff --git a/plugins/connection/funcd.py b/plugins/connection/funcd.py index c8639965d0..9f37f791de 100644 --- a/plugins/connection/funcd.py +++ b/plugins/connection/funcd.py @@ -64,7 +64,7 @@ class Connection(ConnectionBase): self.client = fc.Client(self.host) return self - def exec_command(self, cmd, become_user=None, sudoable=False, executable='/bin/sh', in_data=None): + def exec_command(self, cmd, in_data=None, sudoable=True): """ run a command on the remote minion """ if in_data: diff --git a/plugins/module_utils/ilo_redfish_utils.py b/plugins/module_utils/ilo_redfish_utils.py index fb14ae87f0..2d4d999cef 100644 --- a/plugins/module_utils/ilo_redfish_utils.py +++ b/plugins/module_utils/ilo_redfish_utils.py @@ -92,7 +92,7 @@ class iLORedfishUtils(RedfishUtils): data = response['data'] ntp_list = data[setkey] - if(len(ntp_list) == 2): + if len(ntp_list) == 2: ntp_list.pop(0) ntp_list.append(mgr_attributes['mgr_attr_value']) diff --git a/plugins/module_utils/memset.py b/plugins/module_utils/memset.py index a66d375802..671a8de308 100644 --- a/plugins/module_utils/memset.py +++ b/plugins/module_utils/memset.py @@ -79,7 +79,7 @@ def memset_api_call(api_key, api_method, payload=None): if msg is None: msg = response.json() - return(has_failed, msg, response) + return has_failed, msg, response def check_zone_domain(data, domain): @@ -93,7 +93,7 @@ def check_zone_domain(data, domain): if zone_domain['domain'] == domain: exists = True - return(exists) + return exists def check_zone(data, name): @@ -110,7 +110,7 @@ def check_zone(data, name): if counter == 1: exists = True - return(exists, counter) + return exists, counter def get_zone_id(zone_name, current_zones): @@ -136,4 +136,4 @@ def get_zone_id(zone_name, current_zones): zone_id = None msg = 'Zone ID could not be returned as duplicate zone names were detected' - return(zone_exists, msg, counter, zone_id) + return zone_exists, msg, counter, zone_id diff --git a/plugins/module_utils/rax.py b/plugins/module_utils/rax.py index 29e9d794f1..2372088033 100644 --- a/plugins/module_utils/rax.py +++ b/plugins/module_utils/rax.py @@ -123,8 +123,7 @@ def rax_find_image(module, rax_module, image, exit=True): except ValueError: try: image = cs.images.find(human_id=image) - except(cs.exceptions.NotFound, - cs.exceptions.NoUniqueMatch): + except (cs.exceptions.NotFound, cs.exceptions.NoUniqueMatch): try: image = cs.images.find(name=image) except (cs.exceptions.NotFound, diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 15763aebee..9068f9b92a 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -2061,7 +2061,7 @@ class RedfishUtils(object): if property in data: nic[property] = data[property] result['entries'] = nic - return(result) + return result def get_nic_inventory(self, resource_uri): result = {} diff --git a/plugins/module_utils/redis.py b/plugins/module_utils/redis.py index 808acd7c6c..c4d87aca51 100644 --- a/plugins/module_utils/redis.py +++ b/plugins/module_utils/redis.py @@ -16,6 +16,7 @@ try: from redis import Redis from redis import __version__ as redis_version HAS_REDIS_PACKAGE = True + REDIS_IMP_ERR = None except ImportError: REDIS_IMP_ERR = traceback.format_exc() HAS_REDIS_PACKAGE = False @@ -23,6 +24,7 @@ except ImportError: try: import certifi HAS_CERTIFI_PACKAGE = True + CERTIFI_IMPORT_ERROR = None except ImportError: CERTIFI_IMPORT_ERROR = traceback.format_exc() HAS_CERTIFI_PACKAGE = False diff --git a/plugins/modules/cloud/memset/memset_dns_reload.py b/plugins/modules/cloud/memset/memset_dns_reload.py index abf5a918fc..ab6eecd227 100644 --- a/plugins/modules/cloud/memset/memset_dns_reload.py +++ b/plugins/modules/cloud/memset/memset_dns_reload.py @@ -112,7 +112,7 @@ def poll_reload_status(api_key=None, job_id=None, payload=None): memset_api = response.json() msg = None - return(memset_api, msg, stderr) + return memset_api, msg, stderr def reload_dns(args=None): @@ -134,7 +134,7 @@ def reload_dns(args=None): retvals['failed'] = has_failed retvals['memset_api'] = response.json() retvals['msg'] = msg - return(retvals) + return retvals # set changed to true if the reload request was accepted. has_changed = True @@ -154,7 +154,7 @@ def reload_dns(args=None): if val is not None: retvals[val] = eval(val) - return(retvals) + return retvals def main(): diff --git a/plugins/modules/cloud/memset/memset_memstore_info.py b/plugins/modules/cloud/memset/memset_memstore_info.py index ab16720b79..1247085ab9 100644 --- a/plugins/modules/cloud/memset/memset_memstore_info.py +++ b/plugins/modules/cloud/memset/memset_memstore_info.py @@ -128,7 +128,7 @@ def get_facts(args=None): retvals['failed'] = has_failed retvals['msg'] = msg retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) - return(retvals) + return retvals # we don't want to return the same thing twice msg = None @@ -140,7 +140,7 @@ def get_facts(args=None): if val is not None: retvals[val] = eval(val) - return(retvals) + return retvals def main(): diff --git a/plugins/modules/cloud/memset/memset_server_info.py b/plugins/modules/cloud/memset/memset_server_info.py index cd0ba5923f..b756a8338e 100644 --- a/plugins/modules/cloud/memset/memset_server_info.py +++ b/plugins/modules/cloud/memset/memset_server_info.py @@ -253,7 +253,7 @@ def get_facts(args=None): retvals['failed'] = has_failed retvals['msg'] = msg retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) - return(retvals) + return retvals # we don't want to return the same thing twice msg = None @@ -265,7 +265,7 @@ def get_facts(args=None): if val is not None: retvals[val] = eval(val) - return(retvals) + return retvals def main(): diff --git a/plugins/modules/cloud/memset/memset_zone.py b/plugins/modules/cloud/memset/memset_zone.py index 5fb03ab34b..f402e0e0f4 100644 --- a/plugins/modules/cloud/memset/memset_zone.py +++ b/plugins/modules/cloud/memset/memset_zone.py @@ -140,7 +140,7 @@ def check(args=None): retvals['changed'] = has_changed retvals['failed'] = has_failed - return(retvals) + return retvals def create_zone(args=None, zone_exists=None, payload=None): @@ -186,7 +186,7 @@ def create_zone(args=None, zone_exists=None, payload=None): _has_failed, _msg, response = memset_api_call(api_key=args['api_key'], api_method=api_method, payload=payload) memset_api = response.json() - return(has_failed, has_changed, memset_api, msg) + return has_failed, has_changed, memset_api, msg def delete_zone(args=None, zone_exists=None, payload=None): @@ -234,7 +234,7 @@ def delete_zone(args=None, zone_exists=None, payload=None): else: has_failed, has_changed = False, False - return(has_failed, has_changed, memset_api, msg) + return has_failed, has_changed, memset_api, msg def create_or_delete(args=None): @@ -256,7 +256,7 @@ def create_or_delete(args=None): retvals['failed'] = _has_failed retvals['msg'] = _msg - return(retvals) + return retvals zone_exists, _msg, counter, _zone_id = get_zone_id(zone_name=args['name'], current_zones=response.json()) @@ -272,7 +272,7 @@ def create_or_delete(args=None): if val is not None: retvals[val] = eval(val) - return(retvals) + return retvals def main(): diff --git a/plugins/modules/cloud/memset/memset_zone_domain.py b/plugins/modules/cloud/memset/memset_zone_domain.py index 40552b9c2a..995c7bc8d3 100644 --- a/plugins/modules/cloud/memset/memset_zone_domain.py +++ b/plugins/modules/cloud/memset/memset_zone_domain.py @@ -111,7 +111,7 @@ def check(args=None): retvals['changed'] = has_changed retvals['failed'] = has_failed - return(retvals) + return retvals def create_zone_domain(args=None, zone_exists=None, zone_id=None, payload=None): @@ -139,7 +139,7 @@ def create_zone_domain(args=None, zone_exists=None, zone_id=None, payload=None): if not has_failed: has_changed = True - return(has_failed, has_changed, msg) + return has_failed, has_changed, msg def delete_zone_domain(args=None, payload=None): @@ -166,7 +166,7 @@ def delete_zone_domain(args=None, payload=None): # unset msg as we don't want to return unnecessary info to the user. msg = None - return(has_failed, has_changed, memset_api, msg) + return has_failed, has_changed, memset_api, msg def create_or_delete_domain(args=None): @@ -189,7 +189,7 @@ def create_or_delete_domain(args=None): retvals['failed'] = has_failed retvals['msg'] = msg retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) - return(retvals) + return retvals zone_exists, msg, counter, zone_id = get_zone_id(zone_name=args['zone'], current_zones=response.json()) @@ -204,7 +204,7 @@ def create_or_delete_domain(args=None): retvals['failed'] = has_failed retvals['msg'] = stderr - return(retvals) + return retvals if args['state'] == 'present': has_failed, has_changed, msg = create_zone_domain(args=args, zone_exists=zone_exists, zone_id=zone_id, payload=payload) @@ -218,7 +218,7 @@ def create_or_delete_domain(args=None): if val is not None: retvals[val] = eval(val) - return(retvals) + return retvals def main(): diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/cloud/memset/memset_zone_record.py index 03cb21f99d..a92cd2923f 100644 --- a/plugins/modules/cloud/memset/memset_zone_record.py +++ b/plugins/modules/cloud/memset/memset_zone_record.py @@ -222,7 +222,7 @@ def create_zone_record(args=None, zone_id=None, records=None, payload=None): # nothing to do; record is already correct so we populate # the return var with the existing record's details. memset_api = zone_record - return(has_changed, has_failed, memset_api, msg) + return has_changed, has_failed, memset_api, msg else: # merge dicts ensuring we change any updated values payload = zone_record.copy() @@ -232,7 +232,7 @@ def create_zone_record(args=None, zone_id=None, records=None, payload=None): has_changed = True # return the new record to the user in the returned var. memset_api = new_record - return(has_changed, has_failed, memset_api, msg) + return has_changed, has_failed, memset_api, msg has_failed, msg, response = memset_api_call(api_key=args['api_key'], api_method=api_method, payload=payload) if not has_failed: has_changed = True @@ -247,7 +247,7 @@ def create_zone_record(args=None, zone_id=None, records=None, payload=None): has_changed = True # populate the return var with the new record's details. memset_api = new_record - return(has_changed, has_failed, memset_api, msg) + return has_changed, has_failed, memset_api, msg has_failed, msg, response = memset_api_call(api_key=args['api_key'], api_method=api_method, payload=payload) if not has_failed: has_changed = True @@ -255,7 +255,7 @@ def create_zone_record(args=None, zone_id=None, records=None, payload=None): # empty msg as we don't want to return a boatload of json to the user. msg = None - return(has_changed, has_failed, memset_api, msg) + return has_changed, has_failed, memset_api, msg def delete_zone_record(args=None, records=None, payload=None): @@ -271,7 +271,7 @@ def delete_zone_record(args=None, records=None, payload=None): for zone_record in records: if args['check_mode']: has_changed = True - return(has_changed, has_failed, memset_api, msg) + return has_changed, has_failed, memset_api, msg payload['id'] = zone_record['id'] api_method = 'dns.zone_record_delete' has_failed, msg, response = memset_api_call(api_key=args['api_key'], api_method=api_method, payload=payload) @@ -281,7 +281,7 @@ def delete_zone_record(args=None, records=None, payload=None): # empty msg as we don't want to return a boatload of json to the user. msg = None - return(has_changed, has_failed, memset_api, msg) + return has_changed, has_failed, memset_api, msg def create_or_delete(args=None): @@ -305,7 +305,7 @@ def create_or_delete(args=None): retvals['failed'] = _has_failed retvals['msg'] = msg retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) - return(retvals) + return retvals zone_exists, _msg, counter, zone_id = get_zone_id(zone_name=args['zone'], current_zones=response.json()) @@ -318,7 +318,7 @@ def create_or_delete(args=None): retvals['failed'] = has_failed retvals['msg'] = stderr retvals['stderr'] = stderr - return(retvals) + return retvals # get a list of all records ( as we can't limit records by zone) api_method = 'dns.zone_record_list' @@ -340,7 +340,7 @@ def create_or_delete(args=None): if val is not None: retvals[val] = eval(val) - return(retvals) + return retvals def main(): diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 5b99931344..fbc332c2b1 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -1253,7 +1253,6 @@ def setChanged(): def setMsg(message): - global failed msg.append(message) diff --git a/plugins/modules/cloud/opennebula/one_image.py b/plugins/modules/cloud/opennebula/one_image.py index e65d43553c..693a13f927 100644 --- a/plugins/modules/cloud/opennebula/one_image.py +++ b/plugins/modules/cloud/opennebula/one_image.py @@ -349,7 +349,7 @@ def get_connection_info(module): if not password: password = os.environ.get('ONE_PASSWORD') - if not(url and username and password): + if not (url and username and password): module.fail_json(msg="One or more connection parameters (api_url, api_username, api_password) were not specified") from collections import namedtuple diff --git a/plugins/modules/cloud/opennebula/one_image_info.py b/plugins/modules/cloud/opennebula/one_image_info.py index e94d41fcda..08521a7acd 100644 --- a/plugins/modules/cloud/opennebula/one_image_info.py +++ b/plugins/modules/cloud/opennebula/one_image_info.py @@ -243,7 +243,7 @@ def get_connection_info(module): if not password: password = os.environ.get('ONE_PASSWORD') - if not(url and username and password): + if not (url and username and password): module.fail_json(msg="One or more connection parameters (api_url, api_username, api_password) were not specified") from collections import namedtuple diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index e1b92aaa27..2985a28a0e 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -664,7 +664,7 @@ def get_connection_info(module): if not password: password = os.environ.get('ONEFLOW_PASSWORD') - if not(url and username and password): + if not (url and username and password): module.fail_json(msg="One or more connection parameters (api_url, api_username, api_password) were not specified") from collections import namedtuple diff --git a/plugins/modules/cloud/packet/packet_ip_subnet.py b/plugins/modules/cloud/packet/packet_ip_subnet.py index 97f537b34e..b2441dd9c7 100644 --- a/plugins/modules/cloud/packet/packet_ip_subnet.py +++ b/plugins/modules/cloud/packet/packet_ip_subnet.py @@ -217,7 +217,7 @@ def parse_subnet_cidr(cidr): try: prefixlen = int(prefixlen) except ValueError: - raise("Wrong prefix length in CIDR expression {0}".format(cidr)) + raise Exception("Wrong prefix length in CIDR expression {0}".format(cidr)) return addr, prefixlen diff --git a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py index 643677c9d1..cda5360018 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py @@ -184,7 +184,7 @@ def remove_datacenter(module, profitbricks): name = module.params.get('name') changed = False - if(uuid_match.match(name)): + if uuid_match.match(name): _remove_datacenter(module, profitbricks, name) changed = True else: diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index 2522afd030..40264bc294 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -325,7 +325,7 @@ def delete_volume(module, profitbricks): break for n in instance_ids: - if(uuid_match.match(n)): + if uuid_match.match(n): _delete_volume(module, profitbricks, datacenter, n) changed = True else: diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py b/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py index 047449cd09..d0b16aeb50 100644 --- a/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py +++ b/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py @@ -143,6 +143,7 @@ except ImportError: IPADDRESS_IMP_ERR = traceback.format_exc() HAS_IPADDRESS = False else: + IPADDRESS_IMP_ERR = None HAS_IPADDRESS = True diff --git a/plugins/modules/clustering/etcd3.py b/plugins/modules/clustering/etcd3.py index 5bd0d06a1a..e67227cc19 100644 --- a/plugins/modules/clustering/etcd3.py +++ b/plugins/modules/clustering/etcd3.py @@ -127,6 +127,7 @@ from ansible.module_utils.common.text.converters import to_native try: import etcd3 HAS_ETCD = True + ETCD_IMP_ERR = None except ImportError: ETCD_IMP_ERR = traceback.format_exc() HAS_ETCD = False diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/files/ini_file.py index a0c786cb8a..f3040632c0 100644 --- a/plugins/modules/files/ini_file.py +++ b/plugins/modules/files/ini_file.py @@ -310,7 +310,7 @@ def do_ini(module, filename, section=None, option=None, values=None, # override option with no value to option with value if not allow_no_value if len(values) > 0: for index, line in enumerate(section_lines): - if not changed_lines[index] and match_active_opt(option, section_lines[index]): + if not changed_lines[index] and match_active_opt(option, section_lines[index]): # pylint: disable=unnecessary-list-index-lookup newline = assignment_format % (option, values.pop(0)) (changed, msg) = update_section_line(changed, section_lines, index, changed_lines, newline, msg) if len(values) == 0: diff --git a/plugins/modules/identity/ipa/ipa_otptoken.py b/plugins/modules/identity/ipa/ipa_otptoken.py index 96fa612525..0cc06d7163 100644 --- a/plugins/modules/identity/ipa/ipa_otptoken.py +++ b/plugins/modules/identity/ipa/ipa_otptoken.py @@ -446,8 +446,8 @@ def ensure(module, client): module_otptoken['all'] = True ipa_otptoken = client.otptoken_add(name=uniqueid, item=module_otptoken) else: - if not(validate_modifications(ansible_to_ipa, module, ipa_otptoken, - module_otptoken, unmodifiable_after_creation)): + if not validate_modifications(ansible_to_ipa, module, ipa_otptoken, + module_otptoken, unmodifiable_after_creation): module.fail_json(msg="Modifications requested in module are not valid") # IPA will reject 'modifications' that do not actually modify anything diff --git a/plugins/modules/monitoring/pagerduty_user.py b/plugins/modules/monitoring/pagerduty_user.py index 360fbe17ad..4d8e32248f 100644 --- a/plugins/modules/monitoring/pagerduty_user.py +++ b/plugins/modules/monitoring/pagerduty_user.py @@ -87,6 +87,7 @@ from os import path try: from pdpyras import APISession HAS_PD_PY = True + PD_IMPORT_ERR = None except ImportError: HAS_PD_PY = False PD_IMPORT_ERR = traceback.format_exc() @@ -94,6 +95,7 @@ except ImportError: try: from pdpyras import PDClientError HAS_PD_CLIENT_ERR = True + PD_CLIENT_ERR_IMPORT_ERR = None except ImportError: HAS_PD_CLIENT_ERR = False PD_CLIENT_ERR_IMPORT_ERR = traceback.format_exc() diff --git a/plugins/modules/net_tools/dnsimple_info.py b/plugins/modules/net_tools/dnsimple_info.py index 163d1f6f6a..b7f5be1a6d 100644 --- a/plugins/modules/net_tools/dnsimple_info.py +++ b/plugins/modules/net_tools/dnsimple_info.py @@ -234,10 +234,11 @@ import json try: from requests import Request, Session except ImportError: - HAS_ANOTHER_LIBRARY = False - ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc() + HAS_REQUESTS = False + REQUESTS_IMPORT_ERROR = traceback.format_exc() else: - HAS_ANOTHER_LIBRARY = True + HAS_REQUESTS = True + REQUESTS_IMPORT_ERROR = None def build_url(account, key, is_sandbox): @@ -262,7 +263,7 @@ def iterate_data(module, request_object): request_object.url = base_url + '&page=' + str(page) new_results = Session().send(request_object) data = data + new_results.json()["data"] - return(data) + return data else: module.fail_json('API Call failed, check ID, key and sandbox values') @@ -306,11 +307,10 @@ def main(): params['api_key'], params['sandbox']) - if not HAS_ANOTHER_LIBRARY: - # Needs: from ansible.module_utils.basic import missing_required_lib + if not HAS_REQUESTS: module.exit_json( - msg=missing_required_lib('another_library'), - exception=ANOTHER_LIBRARY_IMPORT_ERROR) + msg=missing_required_lib('requests'), + exception=REQUESTS_IMPORT_ERROR) # At minimum we need account and key if params['account_id'] and params['api_key']: diff --git a/plugins/modules/packaging/language/pip_package_info.py b/plugins/modules/packaging/language/pip_package_info.py index db6cc14e65..e5d3acae6f 100644 --- a/plugins/modules/packaging/language/pip_package_info.py +++ b/plugins/modules/packaging/language/pip_package_info.py @@ -98,13 +98,13 @@ from ansible.module_utils.facts.packages import CLIMgr class PIP(CLIMgr): - def __init__(self, pip): + def __init__(self, pip, module): self.CLI = pip + self.module = module def list_installed(self): - global module - rc, out, err = module.run_command([self._cli, 'list', '-l', '--format=json']) + rc, out, err = self.module.run_command([self._cli, 'list', '-l', '--format=json']) if rc != 0: raise Exception("Unable to list packages rc=%s : %s" % (rc, err)) return json.loads(out) @@ -117,7 +117,6 @@ class PIP(CLIMgr): def main(): # start work - global module module = AnsibleModule( argument_spec=dict( clients=dict(type='list', elements='path', default=['pip']), @@ -134,7 +133,7 @@ def main(): module.warn('Skipping invalid pip client: %s' % (pip)) continue try: - pip_mgr = PIP(pip) + pip_mgr = PIP(pip, module) if pip_mgr.is_available(): found += 1 packages[pip] = pip_mgr.get_packages() diff --git a/plugins/modules/packaging/language/yarn.py b/plugins/modules/packaging/language/yarn.py index 43af767e48..b3f6604530 100644 --- a/plugins/modules/packaging/language/yarn.py +++ b/plugins/modules/packaging/language/yarn.py @@ -222,7 +222,7 @@ class Yarn(object): rc, out, err = self.module.run_command(cmd, check_rc=check_rc, cwd=cwd) return out, err - return(None, None) + return None, None def list(self): cmd = ['list', '--depth=0', '--json'] diff --git a/plugins/modules/packaging/os/copr.py b/plugins/modules/packaging/os/copr.py index 58c4a0b6a2..68738a6c98 100644 --- a/plugins/modules/packaging/os/copr.py +++ b/plugins/modules/packaging/os/copr.py @@ -85,6 +85,7 @@ try: import dnf.repodict from dnf.conf import Conf HAS_DNF_PACKAGES = True + DNF_IMP_ERR = None except ImportError: DNF_IMP_ERR = traceback.format_exc() HAS_DNF_PACKAGES = False diff --git a/plugins/modules/packaging/os/flatpak.py b/plugins/modules/packaging/os/flatpak.py index d194bec0e0..d6264a50d3 100644 --- a/plugins/modules/packaging/os/flatpak.py +++ b/plugins/modules/packaging/os/flatpak.py @@ -163,7 +163,7 @@ OUTDATED_FLATPAK_VERSION_ERROR_MESSAGE = "Unknown option --columns=application" def install_flat(module, binary, remote, names, method, no_dependencies): """Add new flatpaks.""" - global result + global result # pylint: disable=global-variable-not-assigned uri_names = [] id_names = [] for name in names: @@ -190,7 +190,7 @@ def install_flat(module, binary, remote, names, method, no_dependencies): def uninstall_flat(module, binary, names, method): """Remove existing flatpaks.""" - global result + global result # pylint: disable=global-variable-not-assigned installed_flat_names = [ _match_installed_flat_name(module, binary, name, method) for name in names @@ -225,7 +225,7 @@ def _match_installed_flat_name(module, binary, name, method): # This is a difficult function, since if the user supplies a flatpakref url, # we have to rely on a naming convention: # The flatpakref file name needs to match the flatpak name - global result + global result # pylint: disable=global-variable-not-assigned parsed_name = _parse_flatpak_name(name) # Try running flatpak list with columns feature command = [binary, "list", "--{0}".format(method), "--app", "--columns=application"] @@ -249,7 +249,7 @@ def _match_installed_flat_name(module, binary, name, method): def _match_flat_using_outdated_flatpak_format(module, binary, parsed_name, method): - global result + global result # pylint: disable=global-variable-not-assigned command = [binary, "list", "--{0}".format(method), "--app", "--columns=application"] output = _flatpak_command(module, False, command) for row in output.split('\n'): @@ -258,7 +258,7 @@ def _match_flat_using_outdated_flatpak_format(module, binary, parsed_name, metho def _match_flat_using_flatpak_column_feature(module, binary, parsed_name, method): - global result + global result # pylint: disable=global-variable-not-assigned command = [binary, "list", "--{0}".format(method), "--app"] output = _flatpak_command(module, False, command) for row in output.split('\n'): @@ -277,7 +277,7 @@ def _parse_flatpak_name(name): def _flatpak_version(module, binary): - global result + global result # pylint: disable=global-variable-not-assigned command = [binary, "--version"] output = _flatpak_command(module, False, command) version_number = output.split()[1] @@ -285,7 +285,7 @@ def _flatpak_version(module, binary): def _flatpak_command(module, noop, command, ignore_failure=False): - global result + global result # pylint: disable=global-variable-not-assigned result['command'] = ' '.join(command) if noop: result['rc'] = 0 diff --git a/plugins/modules/packaging/os/flatpak_remote.py b/plugins/modules/packaging/os/flatpak_remote.py index a80ea21768..bc52d5461a 100644 --- a/plugins/modules/packaging/os/flatpak_remote.py +++ b/plugins/modules/packaging/os/flatpak_remote.py @@ -125,7 +125,7 @@ from ansible.module_utils.common.text.converters import to_bytes, to_native def add_remote(module, binary, name, flatpakrepo_url, method): """Add a new remote.""" - global result + global result # pylint: disable=global-variable-not-assigned command = [binary, "remote-add", "--{0}".format(method), name, flatpakrepo_url] _flatpak_command(module, module.check_mode, command) result['changed'] = True @@ -133,7 +133,7 @@ def add_remote(module, binary, name, flatpakrepo_url, method): def remove_remote(module, binary, name, method): """Remove an existing remote.""" - global result + global result # pylint: disable=global-variable-not-assigned command = [binary, "remote-delete", "--{0}".format(method), "--force", name] _flatpak_command(module, module.check_mode, command) result['changed'] = True @@ -154,7 +154,7 @@ def remote_exists(module, binary, name, method): def _flatpak_command(module, noop, command): - global result + global result # pylint: disable=global-variable-not-assigned result['command'] = ' '.join(command) if noop: result['rc'] = 0 diff --git a/plugins/modules/packaging/os/xbps.py b/plugins/modules/packaging/os/xbps.py index a9bf879ed6..f1f12f4d9e 100644 --- a/plugins/modules/packaging/os/xbps.py +++ b/plugins/modules/packaging/os/xbps.py @@ -159,7 +159,7 @@ def upgrade(module, xbps_path): rc, stdout, stderr = module.run_command(cmdneedupgrade, check_rc=False) if rc == 0: - if(len(stdout.splitlines()) == 0): + if len(stdout.splitlines()) == 0: module.exit_json(changed=False, msg='Nothing to upgrade') elif module.check_mode: module.exit_json(changed=True, msg='Would have performed upgrade') diff --git a/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py b/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py index af0c31b1d5..e5b5944d1e 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py +++ b/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py @@ -239,7 +239,7 @@ class ManageIQAlertProfiles(object): except Exception as e: msg = "Updating profile '{name}' failed: {error}" msg = msg.format(name=old_profile['name'], error=e) - self.module.fail_json(msg=msg, result=result) + self.module.fail_json(msg=msg) if changed: msg = "Profile {name} updated successfully".format(name=desired_profile['name']) diff --git a/plugins/modules/source_control/gitlab/gitlab_group_members.py b/plugins/modules/source_control/gitlab/gitlab_group_members.py index c2ccdc4d55..231d275350 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_members.py @@ -161,6 +161,7 @@ import traceback try: import gitlab HAS_PY_GITLAB = True + GITLAB_IMP_ERR = None except ImportError: GITLAB_IMP_ERR = traceback.format_exc() HAS_PY_GITLAB = False diff --git a/plugins/modules/source_control/gitlab/gitlab_project_members.py b/plugins/modules/source_control/gitlab/gitlab_project_members.py index cfbada8681..1fe0c818de 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_members.py @@ -164,6 +164,7 @@ import traceback try: import gitlab HAS_PY_GITLAB = True + GITLAB_IMP_ERR = None except ImportError: GITLAB_IMP_ERR = traceback.format_exc() HAS_PY_GITLAB = False diff --git a/plugins/modules/source_control/gitlab/gitlab_runner.py b/plugins/modules/source_control/gitlab/gitlab_runner.py index 9aceb0c77d..b6af300a9d 100644 --- a/plugins/modules/source_control/gitlab/gitlab_runner.py +++ b/plugins/modules/source_control/gitlab/gitlab_runner.py @@ -189,7 +189,7 @@ from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication try: - cmp + cmp # pylint: disable=used-before-assignment except NameError: def cmp(a, b): return (a > b) - (a < b) diff --git a/plugins/modules/storage/pmem/pmem.py b/plugins/modules/storage/pmem/pmem.py index 0090687f89..b2027642b3 100644 --- a/plugins/modules/storage/pmem/pmem.py +++ b/plugins/modules/storage/pmem/pmem.py @@ -212,6 +212,7 @@ except ImportError: XMLTODICT_LIBRARY_IMPORT_ERROR = traceback.format_exc() else: HAS_XMLTODICT_LIBRARY = True + XMLTODICT_LIBRARY_IMPORT_ERROR = None class PersistentMemory(object): diff --git a/plugins/modules/system/beadm.py b/plugins/modules/system/beadm.py index 36f47c086a..a55aa23b3d 100644 --- a/plugins/modules/system/beadm.py +++ b/plugins/modules/system/beadm.py @@ -165,10 +165,10 @@ class BE(object): for line in out.splitlines(): if self.is_freebsd: check = line.split() - if(check == []): + if check == []: continue full_name = check[0].split('/') - if(full_name == []): + if full_name == []: continue check[0] = full_name[len(full_name) - 1] if check[0] == self.name: diff --git a/plugins/modules/system/homectl.py b/plugins/modules/system/homectl.py index 1bcbf971bc..2fc5313cff 100644 --- a/plugins/modules/system/homectl.py +++ b/plugins/modules/system/homectl.py @@ -329,7 +329,7 @@ class Homectl(object): cmd = [self.module.get_bin_path('homectl', True)] cmd.append('create') cmd.append('--identity=-') # Read the user record from standard input. - return(self.module.run_command(cmd, data=record)) + return self.module.run_command(cmd, data=record) def _hash_password(self, password): method = crypt.METHOD_SHA512 diff --git a/plugins/modules/system/keyring.py b/plugins/modules/system/keyring.py index 6c3a1a487a..43dfb8c5dc 100644 --- a/plugins/modules/system/keyring.py +++ b/plugins/modules/system/keyring.py @@ -84,6 +84,7 @@ try: import keyring HAS_KEYRING = True + KEYRING_IMP_ERR = None except ImportError: HAS_KEYRING = False KEYRING_IMP_ERR = traceback.format_exc() diff --git a/plugins/modules/system/keyring_info.py b/plugins/modules/system/keyring_info.py index 3862c755de..e0c33ce724 100644 --- a/plugins/modules/system/keyring_info.py +++ b/plugins/modules/system/keyring_info.py @@ -74,6 +74,7 @@ try: import keyring HAS_KEYRING = True + KEYRING_IMP_ERR = None except ImportError: HAS_KEYRING = False KEYRING_IMP_ERR = traceback.format_exc() diff --git a/plugins/modules/system/parted.py b/plugins/modules/system/parted.py index 57391b439d..b2c76df6c4 100644 --- a/plugins/modules/system/parted.py +++ b/plugins/modules/system/parted.py @@ -363,7 +363,7 @@ def format_disk_size(size_bytes, unit): This function has been adapted from https://github.com/Distrotech/parted/blo b/279d9d869ff472c52b9ec2e180d568f0c99e30b0/libparted/unit.c """ - global units_si, units_iec + global units_si, units_iec # pylint: disable=global-variable-not-assigned unit = unit.lower() @@ -459,7 +459,7 @@ def get_device_info(device, unit): Fetches information about a disk and its partitions and it returns a dictionary. """ - global module, parted_exec + global module, parted_exec # pylint: disable=global-variable-not-assigned # If parted complains about missing labels, it means there are no partitions. # In this case only, use a custom function to fetch information and emulate @@ -486,7 +486,7 @@ def check_parted_label(device): to 3.1 don't return data when there is no label. For more information see: http://upstream.rosalinux.ru/changelogs/libparted/3.1/changelog.html """ - global parted_exec + global parted_exec # pylint: disable=global-variable-not-assigned # Check the version parted_major, parted_minor, dummy = parted_version() @@ -532,7 +532,7 @@ def parted_version(): """ Returns the major and minor version of parted installed on the system. """ - global module, parted_exec + global module, parted_exec # pylint: disable=global-variable-not-assigned rc, out, err = module.run_command("%s --version" % parted_exec) if rc != 0: @@ -551,7 +551,7 @@ def parted(script, device, align): """ Runs a parted script. """ - global module, parted_exec + global module, parted_exec # pylint: disable=global-variable-not-assigned align_option = '-a %s' % align if align == 'undefined': @@ -602,7 +602,7 @@ def check_size_format(size_str): def main(): - global module, units_si, units_iec, parted_exec + global module, units_si, units_iec, parted_exec # pylint: disable=global-variable-not-assigned changed = False output_script = "" diff --git a/plugins/modules/system/sap_task_list_execute.py b/plugins/modules/system/sap_task_list_execute.py index baa0f059d1..52c2361414 100644 --- a/plugins/modules/system/sap_task_list_execute.py +++ b/plugins/modules/system/sap_task_list_execute.py @@ -188,6 +188,7 @@ except ImportError: PYRFC_LIBRARY_IMPORT_ERROR = traceback.format_exc() else: HAS_PYRFC_LIBRARY = True + PYRFC_LIBRARY_IMPORT_ERROR = None try: import xmltodict except ImportError: @@ -195,6 +196,7 @@ except ImportError: XMLTODICT_LIBRARY_IMPORT_ERROR = traceback.format_exc() else: HAS_XMLTODICT_LIBRARY = True + XMLTODICT_LIBRARY_IMPORT_ERROR = None def call_rfc_method(connection, method_name, kwargs): diff --git a/plugins/modules/web_infrastructure/apache2_mod_proxy.py b/plugins/modules/web_infrastructure/apache2_mod_proxy.py index 5dbe356a66..5e444047fd 100644 --- a/plugins/modules/web_infrastructure/apache2_mod_proxy.py +++ b/plugins/modules/web_infrastructure/apache2_mod_proxy.py @@ -262,8 +262,8 @@ class BalancerMember(object): else: try: soup = BeautifulSoup(balancer_member_page[0]) - except TypeError: - self.module.fail_json(msg="Cannot parse balancer_member_page HTML! " + str(soup)) + except TypeError as exc: + self.module.fail_json(msg="Cannot parse balancer_member_page HTML! " + str(exc)) else: subsoup = soup.findAll('table')[1].findAll('tr') keys = subsoup[0].findAll('th') diff --git a/tests/integration/targets/mail/files/smtpserver.py b/tests/integration/targets/mail/files/smtpserver.py index f193316e8b..18c6fbf9be 100644 --- a/tests/integration/targets/mail/files/smtpserver.py +++ b/tests/integration/targets/mail/files/smtpserver.py @@ -62,7 +62,7 @@ if HAS_TLS and ssl_ctx is not None: smtp_server2 = smtpd_tls.DebuggingServer(('127.0.0.1', port2), None, ssl_ctx=ssl_ctx, starttls=False) else: print('Start SMTP server on port', port1) - smtp_server1 = smtpd.DebuggingServer(('127.0.0.1', port1), None) + smtp_server1 = smtpd.DebuggingServer(('127.0.0.1', port1), None) # pylint: disable=used-before-assignment if port2: print('WARNING: TLS is NOT supported on this system, not listening on port %s.' % port2) diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 855883d64a..e6919b17b7 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -22,6 +22,7 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no- plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/files/ini_file.py pylint:bad-option-value plugins/modules/packaging/language/yarn.py use-argspec-type-path plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 39c97f6bf8..ae52113f15 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -17,6 +17,7 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no- plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/files/ini_file.py pylint:bad-option-value plugins/modules/packaging/language/yarn.py use-argspec-type-path plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 39c97f6bf8..ae52113f15 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -17,6 +17,7 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no- plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/files/ini_file.py pylint:bad-option-value plugins/modules/packaging/language/yarn.py use-argspec-type-path plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py index c8fccc9703..95e73054a0 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py +++ b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py @@ -75,8 +75,8 @@ class TestMyModule(): } mod_obj.params = args lxca_cmms.main() - assert(mock.call(argument_spec=expected_arguments_spec, - supports_check_mode=False) == ansible_mod_cls.call_args) + assert mock.call(argument_spec=expected_arguments_spec, + supports_check_mode=False) == ansible_mod_cls.call_args @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms._cmms_by_uuid', diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py index b13ea4ca9a..4e46547d82 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py +++ b/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py @@ -79,8 +79,8 @@ class TestMyModule(): } mod_obj.params = args lxca_nodes.main() - assert(mock.call(argument_spec=expected_arguments_spec, - supports_check_mode=False) == ansible_mod_cls.call_args) + assert mock.call(argument_spec=expected_arguments_spec, + supports_check_mode=False) == ansible_mod_cls.call_args @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes._nodes_by_uuid', diff --git a/tests/unit/plugins/modules/storage/pmem/test_pmem.py b/tests/unit/plugins/modules/storage/pmem/test_pmem.py index d01b8fb309..116ace745b 100644 --- a/tests/unit/plugins/modules/storage/pmem/test_pmem.py +++ b/tests/unit/plugins/modules/storage/pmem/test_pmem.py @@ -315,9 +315,9 @@ class TestPmem(ModuleTestCase): test_result = result.exception.args[0]['result'] expected = json.loads(namespace) - for i, notuse in enumerate(test_result): - self.assertEqual(test_result[i]['dev'], expected[i]['dev']) - self.assertEqual(test_result[i]['size'], expected[i]['size']) + for i, result in enumerate(test_result): + self.assertEqual(result['dev'], expected[i]['dev']) + self.assertEqual(result['size'], expected[i]['size']) def test_fail_when_required_args_missing(self): with self.assertRaises(AnsibleFailJson): From 3dcff121c4c5a7cedf5e974064b8ae96f98459ae Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 13 Aug 2022 12:08:07 +0200 Subject: [PATCH 0166/2104] Try to install virtualenv via pip on Arch. (#5116) ci_complete --- tests/integration/targets/django_manage/tasks/main.yaml | 8 ++++---- tests/integration/targets/monit/tasks/main.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/integration/targets/django_manage/tasks/main.yaml b/tests/integration/targets/django_manage/tasks/main.yaml index 362daee1bb..0d8c8acbef 100644 --- a/tests/integration/targets/django_manage/tasks/main.yaml +++ b/tests/integration/targets/django_manage/tasks/main.yaml @@ -9,15 +9,15 @@ suffix: .django_manage register: tmp_django_root -- name: Install virtualenv +- name: Install virtualenv on CentOS 8 package: name: virtualenv state: present when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '8' -- name: Install virtualenv - package: - name: python-virtualenv +- name: Install virtualenv on Arch Linux + pip: + name: virtualenv state: present when: ansible_os_family == 'Archlinux' diff --git a/tests/integration/targets/monit/tasks/main.yml b/tests/integration/targets/monit/tasks/main.yml index 2ad2a1ba39..73b6cfc8a6 100644 --- a/tests/integration/targets/monit/tasks/main.yml +++ b/tests/integration/targets/monit/tasks/main.yml @@ -51,15 +51,15 @@ src: httpd_echo.py dest: "{{ process_file }}" - - name: Install virtualenv + - name: Install virtualenv on CentOS 8 package: name: virtualenv state: present when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '8' - - name: Install virtualenv - package: - name: python-virtualenv + - name: Install virtualenv on Arch Linux + pip: + name: virtualenv state: present when: ansible_os_family == 'Archlinux' From c8925058aa5c6443f4590c46f36cde4fb5c64a26 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 13 Aug 2022 16:56:40 +0200 Subject: [PATCH 0167/2104] Update copyright statements. (#5106) --- changelogs/fragments/licenses.yml | 2 +- tests/unit/plugins/modules/packaging/language/test_cpanm.py | 5 ++++- tests/unit/plugins/modules/system/test_xfconf.py | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml index 465effc699..8ab3dbe42e 100644 --- a/changelogs/fragments/licenses.yml +++ b/changelogs/fragments/licenses.yml @@ -1,3 +1,3 @@ minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098)." + - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098, https://github.com/ansible-collections/community.general/pull/5106)." - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/tests/unit/plugins/modules/packaging/language/test_cpanm.py b/tests/unit/plugins/modules/packaging/language/test_cpanm.py index a52396cd36..1426b26d75 100644 --- a/tests/unit/plugins/modules/packaging/language/test_cpanm.py +++ b/tests/unit/plugins/modules/packaging/language/test_cpanm.py @@ -1,5 +1,8 @@ +# Author: Alexei Znamensky (russoz@gmail.com) +# Largely adapted from test_redhat_subscription by +# Jiri Hnidek (jhnidek@redhat.com) +# # Copyright (c) Alexei Znamensky (russoz@gmail.com) -# Largely adapted from test_redhat_subscription: # Copyright (c) Jiri Hnidek (jhnidek@redhat.com) # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/system/test_xfconf.py index c944d7be05..14ac62fc6b 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/system/test_xfconf.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*- +# Author: Alexei Znamensky (russoz@gmail.com) +# Largely adapted from test_redhat_subscription by +# Jiri Hnidek (jhnidek@redhat.com) +# # Copyright (c) Alexei Znamensky (russoz@gmail.com) -# Largely adapted from test_redhat_subscription: # Copyright (c) Jiri Hnidek (jhnidek@redhat.com) # # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) From ad0c7095d48990589a3b9a51954679327c3bfff8 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 16 Aug 2022 21:46:35 +0200 Subject: [PATCH 0168/2104] Remove Fedora 35 from devel CI runs. (#5121) --- .azure-pipelines/azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 110c207913..60b9e31023 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -256,8 +256,6 @@ stages: targets: - name: CentOS 7 test: centos7 - - name: Fedora 35 - test: fedora35 - name: Fedora 36 test: fedora36 - name: openSUSE 15 From 3c960ac6207acc30bea990cf95fdab7e226dba1f Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 18 Aug 2022 16:44:18 +1200 Subject: [PATCH 0169/2104] pipx: add state latest (#5105) * pipx: add state latest * add changelog fragment * Update plugins/modules/packaging/language/pipx.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/5105-pipx-state-latest.yaml | 2 + plugins/modules/packaging/language/pipx.py | 18 +- tests/integration/targets/pipx/tasks/main.yml | 157 ++++++++++++------ 3 files changed, 128 insertions(+), 49 deletions(-) create mode 100644 changelogs/fragments/5105-pipx-state-latest.yaml diff --git a/changelogs/fragments/5105-pipx-state-latest.yaml b/changelogs/fragments/5105-pipx-state-latest.yaml new file mode 100644 index 0000000000..999e5c3748 --- /dev/null +++ b/changelogs/fragments/5105-pipx-state-latest.yaml @@ -0,0 +1,2 @@ +minor_changes: + - pipx - added state ``latest`` to the module (https://github.com/ansible-collections/community.general/pull/5105). diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/packaging/language/pipx.py index 36117bacea..a94b7d8d03 100644 --- a/plugins/modules/packaging/language/pipx.py +++ b/plugins/modules/packaging/language/pipx.py @@ -19,11 +19,13 @@ description: options: state: type: str - choices: [present, absent, install, uninstall, uninstall_all, inject, upgrade, upgrade_all, reinstall, reinstall_all] + choices: [present, absent, install, uninstall, uninstall_all, inject, upgrade, upgrade_all, reinstall, reinstall_all, latest] default: install description: - Desired state for the application. - The states C(present) and C(absent) are aliases to C(install) and C(uninstall), respectively. + - The state C(latest) is equivalent to executing the task twice, with state C(install) and then C(upgrade). + It was added in community.general 5.5.0. name: type: str description: @@ -146,7 +148,7 @@ class PipX(StateModuleHelper): argument_spec=dict( state=dict(type='str', default='install', choices=['present', 'absent', 'install', 'uninstall', 'uninstall_all', - 'inject', 'upgrade', 'upgrade_all', 'reinstall', 'reinstall_all']), + 'inject', 'upgrade', 'upgrade_all', 'reinstall', 'reinstall_all', 'latest']), name=dict(type='str'), source=dict(type='str'), install_deps=dict(type='bool', default=False), @@ -166,6 +168,7 @@ class PipX(StateModuleHelper): ('state', 'uninstall', ['name']), ('state', 'upgrade', ['name']), ('state', 'reinstall', ['name']), + ('state', 'latest', ['name']), ('state', 'inject', ['name', 'inject_packages']), ], supports_check_mode=True, @@ -279,6 +282,17 @@ class PipX(StateModuleHelper): ctx.run() self._capture_results(ctx) + def state_latest(self): + if not self.vars.application or self.vars.force: + self.changed = True + with self.runner('state index_url install_deps force python editable pip_args name_source', check_mode_skip=True) as ctx: + ctx.run(state='install', name_source=[self.vars.name, self.vars.source]) + self._capture_results(ctx) + + with self.runner('state index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx: + ctx.run(state='upgrade') + self._capture_results(ctx) + def main(): PipX.execute() diff --git a/tests/integration/targets/pipx/tasks/main.yml b/tests/integration/targets/pipx/tasks/main.yml index 7013880ad4..2318a59ba4 100644 --- a/tests/integration/targets/pipx/tasks/main.yml +++ b/tests/integration/targets/pipx/tasks/main.yml @@ -20,6 +20,10 @@ name: tox register: install_tox +- name: set fact latest_tox_version + set_fact: + latest_tox_version: "{{ install_tox.application.tox.version }}" + - name: install application tox again community.general.pipx: name: tox @@ -40,12 +44,12 @@ - name: check assertions tox assert: that: - - install_tox is changed - - "'tox' in install_tox.application" - - install_tox_again is not changed - - install_tox_again_force is changed - - uninstall_tox is changed - - "'tox' not in uninstall_tox.application" + - install_tox is changed + - "'tox' in install_tox.application" + - install_tox_again is not changed + - install_tox_again_force is changed + - uninstall_tox is changed + - "'tox' not in uninstall_tox.application" ############################################################################## - name: install application tox 3.24.0 @@ -66,7 +70,7 @@ register: reinstall_noname ignore_errors: yes -- name: upgrade tox 3.24.0 +- name: upgrade tox from 3.24.0 community.general.pipx: name: tox state: upgrade @@ -94,19 +98,78 @@ - name: check assertions tox 3.24.0 assert: that: - - install_tox_324 is changed - - "'tox' in install_tox_324.application" - - install_tox_324.application.tox.version == '3.24.0' - - reinstall_tox_324 is changed - - reinstall_tox_324.application.tox.version == '3.24.0' - - upgrade_tox_324 is changed - - upgrade_tox_324.application.tox.version != '3.24.0' - - downgrade_tox_324 is changed - - downgrade_tox_324.application.tox.version == '3.24.0' - - uninstall_tox_324 is changed - - "'tox' not in uninstall_tox_324.application" - - upgrade_noname is failed - - reinstall_noname is failed + - install_tox_324 is changed + - "'tox' in install_tox_324.application" + - install_tox_324.application.tox.version == '3.24.0' + - reinstall_tox_324 is changed + - reinstall_tox_324.application.tox.version == '3.24.0' + - upgrade_tox_324 is changed + - upgrade_tox_324.application.tox.version != '3.24.0' + - downgrade_tox_324 is changed + - downgrade_tox_324.application.tox.version == '3.24.0' + - uninstall_tox_324 is changed + - "'tox' not in uninstall_tox_324.application" + - upgrade_noname is failed + - reinstall_noname is failed + +############################################################################## +- name: install application latest tox + community.general.pipx: + name: tox + state: latest + register: install_tox_latest + +- name: cleanup tox latest + community.general.pipx: + state: absent + name: tox + register: uninstall_tox_latest + +- name: install application tox 3.24.0 for latest + community.general.pipx: + name: tox + source: tox==3.24.0 + register: install_tox_324_for_latest + +- name: install application latest tox + community.general.pipx: + name: tox + state: latest + register: install_tox_latest_with_preinstall + +- name: install application latest tox again + community.general.pipx: + name: tox + state: latest + register: install_tox_latest_with_preinstall_again + +- name: install application latest tox + community.general.pipx: + name: tox + state: latest + force: true + register: install_tox_latest_with_preinstall_again_force + +- name: cleanup tox latest again + community.general.pipx: + state: absent + name: tox + register: uninstall_tox_latest_again + +- name: check assertions tox latest + assert: + that: + - install_tox_latest is changed + - uninstall_tox_latest is changed + - install_tox_324_for_latest is changed + - install_tox_324_for_latest.application.tox.version == '3.24.0' + - install_tox_latest_with_preinstall is changed + - install_tox_latest_with_preinstall.application.tox.version == latest_tox_version + - install_tox_latest_with_preinstall_again is not changed + - install_tox_latest_with_preinstall_again.application.tox.version == latest_tox_version + - install_tox_latest_with_preinstall_again_force is changed + - install_tox_latest_with_preinstall_again_force.application.tox.version == latest_tox_version + - uninstall_tox_latest_again is changed ############################################################################## - name: ensure application ansible-lint is uninstalled @@ -136,34 +199,34 @@ - name: check assertions inject_packages assert: that: - - install_ansible_lint is changed - - inject_pkgs_ansible_lint is changed - - '"ansible-lint" in inject_pkgs_ansible_lint.application' - - '"licenses" in inject_pkgs_ansible_lint.application["ansible-lint"]["injected"]' - - uninstall_ansible_lint is changed + - install_ansible_lint is changed + - inject_pkgs_ansible_lint is changed + - '"ansible-lint" in inject_pkgs_ansible_lint.application' + - '"licenses" in inject_pkgs_ansible_lint.application["ansible-lint"]["injected"]' + - uninstall_ansible_lint is changed ############################################################################## - name: install jupyter - not working smoothly in freebsd - block: - - name: ensure application jupyter is uninstalled - community.general.pipx: - name: jupyter - state: absent - - - name: install application jupyter - community.general.pipx: - name: jupyter - install_deps: true - register: install_jupyter - - - name: cleanup jupyter - community.general.pipx: - state: absent - name: jupyter - - - name: check assertions - assert: - that: - - install_jupyter is changed - - '"ipython" in install_jupyter.stdout' when: ansible_system != 'FreeBSD' + block: + - name: ensure application jupyter is uninstalled + community.general.pipx: + name: jupyter + state: absent + + - name: install application jupyter + community.general.pipx: + name: jupyter + install_deps: true + register: install_jupyter + + - name: cleanup jupyter + community.general.pipx: + state: absent + name: jupyter + + - name: check assertions + assert: + that: + - install_jupyter is changed + - '"ipython" in install_jupyter.stdout' From 0be7b6e7b91bb2d7b6e16773cc9b93a655ca0dd6 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 20 Aug 2022 13:21:07 +0200 Subject: [PATCH 0170/2104] Change Proxmox `agent` argument to string. (#5107) * Change Proxmox `agent` argument to string. * Add changelog entry. * Pass boolean directly to `proxmoxer`. --- .../fragments/5107-proxmox-agent-argument.yaml | 2 ++ plugins/modules/cloud/misc/proxmox_kvm.py | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5107-proxmox-agent-argument.yaml diff --git a/changelogs/fragments/5107-proxmox-agent-argument.yaml b/changelogs/fragments/5107-proxmox-agent-argument.yaml new file mode 100644 index 0000000000..78e7927da1 --- /dev/null +++ b/changelogs/fragments/5107-proxmox-agent-argument.yaml @@ -0,0 +1,2 @@ +minor_changes: + - proxmox_kvm - allow ``agent`` argument to be a string (https://github.com/ansible-collections/community.general/pull/5107). diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 90e9a14e6a..1e9c840493 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -25,7 +25,9 @@ options: agent: description: - Specify if the QEMU Guest Agent should be enabled/disabled. - type: bool + - Since community.general 5.5.0, this can also be a string instead of a boolean. + This allows to specify values such as C(enabled=1,fstrim_cloned_disks=1). + type: str args: description: - Pass arbitrary arguments to kvm. @@ -809,6 +811,7 @@ from ansible_collections.community.general.plugins.module_utils.proxmox import ( from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.parsing.convert_bool import boolean def parse_mac(netstr): @@ -960,7 +963,14 @@ class ProxmoxKvmAnsible(ProxmoxAnsible): kwargs.update(kwargs[k]) del kwargs[k] - # Rename numa_enabled to numa. According the API documentation + try: + # The API also allows booleans instead of e.g. `enabled=1` for backward-compatibility. + kwargs['agent'] = boolean(kwargs['agent'], strict=True) + except TypeError: + # Not something that Ansible would parse as a boolean. + pass + + # Rename numa_enabled to numa, according the API documentation if 'numa_enabled' in kwargs: kwargs['numa'] = kwargs['numa_enabled'] del kwargs['numa_enabled'] @@ -1040,7 +1050,7 @@ def main(): module_args = proxmox_auth_argument_spec() kvm_args = dict( acpi=dict(type='bool'), - agent=dict(type='bool'), + agent=dict(type='str'), args=dict(type='str'), autostart=dict(type='bool'), balloon=dict(type='int'), From ad8965218d820f842e84b856d4de5ae7111645e3 Mon Sep 17 00:00:00 2001 From: Jonathan Lung Date: Sat, 20 Aug 2022 07:22:13 -0400 Subject: [PATCH 0171/2104] Fix nsupdate when updating NS record (#5112) * Fix nsupdate when updating NS record * Changelog fragment * Update changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml Co-authored-by: Felix Fontein * Switch to fallback to AUTHORITY instead of using with NS type. * Update plugins/modules/net_tools/nsupdate.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nsupdate.py Co-authored-by: Felix Fontein Co-authored-by: jonathan lung Co-authored-by: Felix Fontein --- changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml | 2 ++ plugins/modules/net_tools/nsupdate.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml diff --git a/changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml b/changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml new file mode 100644 index 0000000000..c5f8653fd6 --- /dev/null +++ b/changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml @@ -0,0 +1,2 @@ +bugfixes: + - nsupdate - compatibility with NS records (https://github.com/ansible-collections/community.general/pull/5112). diff --git a/plugins/modules/net_tools/nsupdate.py b/plugins/modules/net_tools/nsupdate.py index 9f29d4b5fd..512e44da2f 100644 --- a/plugins/modules/net_tools/nsupdate.py +++ b/plugins/modules/net_tools/nsupdate.py @@ -427,7 +427,10 @@ class RecordManager(object): if lookup.rcode() != dns.rcode.NOERROR: self.module.fail_json(msg='Failed to lookup TTL of existing matching record.') - current_ttl = lookup.answer[0].ttl + if self.module.params['type'] == 'NS': + current_ttl = lookup.answer[0].ttl if lookup.answer else lookup.authority[0].ttl + else: + current_ttl = lookup.answer[0].ttl return current_ttl != self.module.params['ttl'] From 98ea27847f5dcfa51bccb2bf91dc07877cc821e0 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 20 Aug 2022 13:42:45 +0200 Subject: [PATCH 0172/2104] Increase xfs size to 300 MB. This seems to be new minimal size. (#5133) --- tests/integration/targets/filesystem/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/filesystem/defaults/main.yml b/tests/integration/targets/filesystem/defaults/main.yml index edbf3c22f5..947d4a1648 100644 --- a/tests/integration/targets/filesystem/defaults/main.yml +++ b/tests/integration/targets/filesystem/defaults/main.yml @@ -19,7 +19,7 @@ tested_filesystems: ext4dev: {fssize: 10, grow: True} ext3: {fssize: 10, grow: True} ext2: {fssize: 10, grow: True} - xfs: {fssize: 20, grow: False} # grow requires a mounted filesystem + xfs: {fssize: 300, grow: False} # grow requires a mounted filesystem btrfs: {fssize: 150, grow: False} # grow requires a mounted filesystem reiserfs: {fssize: 33, grow: False} # grow not implemented vfat: {fssize: 20, grow: True} From 3c2d7eb193ac6676a054396c2d41328f23862104 Mon Sep 17 00:00:00 2001 From: Michal Hybner <76526074+mu1f407@users.noreply.github.com> Date: Sat, 20 Aug 2022 14:31:15 +0200 Subject: [PATCH 0173/2104] dig: Fix evaluation of boolean parameters (#5129) * Add lookup_dig tests * Fix boolean evaluation * Add changelog fragment * Apply review changes * Add license --- .../fragments/5129-dig-boolean-params-fix.yml | 2 + plugins/lookup/dig.py | 5 ++- tests/integration/targets/lookup_dig/aliases | 6 +++ .../targets/lookup_dig/meta/main.yml | 7 ++++ .../targets/lookup_dig/tasks/main.yml | 37 +++++++++++++++++++ 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5129-dig-boolean-params-fix.yml create mode 100644 tests/integration/targets/lookup_dig/aliases create mode 100644 tests/integration/targets/lookup_dig/meta/main.yml create mode 100644 tests/integration/targets/lookup_dig/tasks/main.yml diff --git a/changelogs/fragments/5129-dig-boolean-params-fix.yml b/changelogs/fragments/5129-dig-boolean-params-fix.yml new file mode 100644 index 0000000000..2e302f07b1 --- /dev/null +++ b/changelogs/fragments/5129-dig-boolean-params-fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - dig lookup plugin - fix evaluation of falsy values for boolean parameters ``fail_on_error`` and ``retry_servfail`` (https://github.com/ansible-collections/community.general/pull/5129). diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index eb13415050..d7a7d8ec28 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -172,6 +172,7 @@ RETURN = """ from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.parsing.convert_bool import boolean from ansible.utils.display import Display import socket @@ -321,9 +322,9 @@ class LookupModule(LookupBase): except Exception as e: raise AnsibleError("dns lookup illegal CLASS: %s" % to_native(e)) elif opt == 'retry_servfail': - myres.retry_servfail = bool(arg) + myres.retry_servfail = boolean(arg) elif opt == 'fail_on_error': - fail_on_error = bool(arg) + fail_on_error = boolean(arg) continue diff --git a/tests/integration/targets/lookup_dig/aliases b/tests/integration/targets/lookup_dig/aliases new file mode 100644 index 0000000000..1def1a1485 --- /dev/null +++ b/tests/integration/targets/lookup_dig/aliases @@ -0,0 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +shippable/posix/group1 +skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_dig/meta/main.yml b/tests/integration/targets/lookup_dig/meta/main.yml new file mode 100644 index 0000000000..fe9e33681d --- /dev/null +++ b/tests/integration/targets/lookup_dig/meta/main.yml @@ -0,0 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +dependencies: + - setup_remote_constraints diff --git a/tests/integration/targets/lookup_dig/tasks/main.yml b/tests/integration/targets/lookup_dig/tasks/main.yml new file mode 100644 index 0000000000..5c0ebeb761 --- /dev/null +++ b/tests/integration/targets/lookup_dig/tasks/main.yml @@ -0,0 +1,37 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Install dnspython library + pip: + name: dnspython + state: present + extra_args: "-c {{ remote_constraints }}" + +- name: Test dig lookup with existing domain + set_fact: + dig_existing: "{{ lookup('community.general.dig', 'github.com.') }}" + +- name: Test dig lookup with non-existing domain and fail_on_error=no + set_fact: + dig_nonexisting_fail_no: "{{ lookup('community.general.dig', 'non-existing.domain.', 'fail_on_error=no') }}" + +- name: Verify that NXDOMAIN was returned + assert: + that: dig_nonexisting_fail_no == 'NXDOMAIN' + +- name: Test dig lookup with non-existing domain and fail_on_error=yes + set_fact: + dig_nonexisting_fail_yes: "{{ lookup('community.general.dig', 'non-existing.domain.', 'fail_on_error=yes') }}" + ignore_errors: yes + register: dig_nonexisting_fail_yes_result + +- name: Verify that the task failed + assert: + that: dig_nonexisting_fail_yes_result is failed From eea7977788f0519fd0d34a18599d5384a47a3c89 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 20 Aug 2022 17:44:46 +0200 Subject: [PATCH 0174/2104] Do not build docs for test-only, changelog-only, or meta-only changes. (#5134) --- .github/workflows/docs-pr.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 03c5c9a1fd..a3d5636ba5 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -10,6 +10,11 @@ concurrency: on: pull_request_target: types: [opened, synchronize, reopened, closed] + paths-ignore: + - '.azure-pipelines/**' + - 'changelogs/**' + - 'meta/**' + - 'tests/**' jobs: build-docs: From 02d9a1de9e840664e6516f6c11c82488cadda090 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 21 Aug 2022 08:27:01 +0200 Subject: [PATCH 0175/2104] Make reuse conformant (#5138) * Add .license files. * Add reuse test. * Update README. * Also remove .yaml changelog fragments. * Add changelog fragment. * Normalize licenses extra sanity test. * Declare REUSE conformance. * Update README.md --- .github/workflows/reuse.yml | 30 +++++++++++++++++++ .reuse/dep5 | 5 ++++ CHANGELOG.rst.license | 3 ++ README.md | 8 +++-- changelogs/changelog.yaml.license | 3 ++ changelogs/fragments/licenses-2.yml | 2 ++ tests/sanity/extra/aliases.json.license | 3 ++ tests/sanity/extra/botmeta.json.license | 3 ++ tests/sanity/extra/extra-docs.json.license | 3 ++ tests/sanity/extra/licenses.json.license | 3 ++ tests/sanity/extra/licenses.py | 11 +++---- tests/sanity/extra/licenses.py.license | 3 ++ .../extra/no-unwanted-files.json.license | 3 ++ tests/sanity/ignore-2.11.txt.license | 3 ++ tests/sanity/ignore-2.12.txt.license | 3 ++ tests/sanity/ignore-2.13.txt.license | 3 ++ tests/sanity/ignore-2.14.txt.license | 3 ++ 17 files changed, 83 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/reuse.yml create mode 100644 .reuse/dep5 create mode 100644 CHANGELOG.rst.license create mode 100644 changelogs/changelog.yaml.license create mode 100644 changelogs/fragments/licenses-2.yml create mode 100644 tests/sanity/extra/aliases.json.license create mode 100644 tests/sanity/extra/botmeta.json.license create mode 100644 tests/sanity/extra/extra-docs.json.license create mode 100644 tests/sanity/extra/licenses.json.license create mode 100644 tests/sanity/extra/licenses.py.license create mode 100644 tests/sanity/extra/no-unwanted-files.json.license create mode 100644 tests/sanity/ignore-2.11.txt.license create mode 100644 tests/sanity/ignore-2.12.txt.license create mode 100644 tests/sanity/ignore-2.13.txt.license create mode 100644 tests/sanity/ignore-2.14.txt.license diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 0000000000..d2b0dc915f --- /dev/null +++ b/.github/workflows/reuse.yml @@ -0,0 +1,30 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +name: Verify REUSE + +on: + push: + branches: [main] + pull_request: + branches: [main] + # Run CI once per day (at 07:30 UTC) + schedule: + - cron: '30 7 * * *' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: | + pip install reuse + + - name: Check REUSE compliance + run: | + reuse lint diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 0000000000..0c3745ebf8 --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,5 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: changelogs/fragments/* +Copyright: Ansible Project +License: GPL-3.0-or-later diff --git a/CHANGELOG.rst.license b/CHANGELOG.rst.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/CHANGELOG.rst.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/README.md b/README.md index 92a4421393..d38a5653ec 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,10 @@ See [this issue](https://github.com/ansible-collections/community.general/issues ## Licensing -GNU General Public License v3.0 or later. +This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later. -See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. +See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.general/blob/main/COPYING) for the full text. + +Parts of the collection are licensed under the [BSD 2-Clause license](https://github.com/ansible-collections/community.general/blob/main/LICENSES/BSD-2-Clause.txt), the [MIT license](https://github.com/ansible-collections/community.general/blob/main/LICENSES/MIT.txt), and the [PSF 2.0 license](https://github.com/ansible-collections/community.general/blob/main/LICENSES/PSF-2.0.txt). + +All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `.reuse/dep5`. This conforms to the [REUSE specification](https://reuse.software/spec/). diff --git a/changelogs/changelog.yaml.license b/changelogs/changelog.yaml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/changelogs/changelog.yaml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/changelogs/fragments/licenses-2.yml b/changelogs/fragments/licenses-2.yml new file mode 100644 index 0000000000..1515dabfc5 --- /dev/null +++ b/changelogs/fragments/licenses-2.yml @@ -0,0 +1,2 @@ +minor_changes: + - "The collection repository conforms to the `REUSE specification `__ except for the changelog fragments (https://github.com/ansible-collections/community.general/pull/5138)." diff --git a/tests/sanity/extra/aliases.json.license b/tests/sanity/extra/aliases.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/extra/aliases.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/extra/botmeta.json.license b/tests/sanity/extra/botmeta.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/extra/botmeta.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/extra/extra-docs.json.license b/tests/sanity/extra/extra-docs.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/extra/extra-docs.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/extra/licenses.json.license b/tests/sanity/extra/licenses.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/extra/licenses.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/extra/licenses.py b/tests/sanity/extra/licenses.py index 7fdc21bcae..6227ee22f2 100755 --- a/tests/sanity/extra/licenses.py +++ b/tests/sanity/extra/licenses.py @@ -33,7 +33,8 @@ def find_licenses(filename, relax=False): has_copyright = True idx = line.find('SPDX-License-Identifier: ') if idx >= 0: - spdx_license_identifiers.append(line[idx + len('SPDX-License-Identifier: '):]) + lic_id = line[idx + len('SPDX-License-Identifier: '):] + spdx_license_identifiers.extend(lic_id.split(' OR ')) if 'GNU General Public License' in line: if 'v3.0+' in line: other_license_identifiers.append('GPL-3.0-or-later') @@ -67,18 +68,14 @@ def main(): no_comments_allowed = [ 'changelogs/fragments/*.yml', 'changelogs/fragments/*.yaml', - 'tests/sanity/extra/*.json', - 'tests/sanity/ignore-2.*.txt', - 'COPYING', ] # These files are completely ignored ignore_paths = [ - 'CHANGELOG.rst', - 'changelogs/changelog.yaml', - 'tests/sanity/extra/licenses.py', # The strings in find_licenses() confuse this code :-) '.ansible-test-timeout.json', + '.reuse/dep5', 'LICENSES/*.txt', + 'COPYING', ] no_comments_allowed = [fn for pattern in no_comments_allowed for fn in glob.glob(pattern)] diff --git a/tests/sanity/extra/licenses.py.license b/tests/sanity/extra/licenses.py.license new file mode 100644 index 0000000000..6c4958feba --- /dev/null +++ b/tests/sanity/extra/licenses.py.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2022, Felix Fontein diff --git a/tests/sanity/extra/no-unwanted-files.json.license b/tests/sanity/extra/no-unwanted-files.json.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/extra/no-unwanted-files.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/ignore-2.11.txt.license b/tests/sanity/ignore-2.11.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/ignore-2.11.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/ignore-2.12.txt.license b/tests/sanity/ignore-2.12.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/ignore-2.12.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/ignore-2.13.txt.license b/tests/sanity/ignore-2.13.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/ignore-2.13.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/sanity/ignore-2.14.txt.license b/tests/sanity/ignore-2.14.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/ignore-2.14.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project From 2149056595e359d42d2e074519ead65beb9fa479 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 21 Aug 2022 11:35:27 +0200 Subject: [PATCH 0176/2104] Fix workflow's permissions. --- .github/workflows/reuse.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index d2b0dc915f..a63b325f6c 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -15,7 +15,9 @@ on: - cron: '30 7 * * *' jobs: - build: + check: + permissions: + contents: read runs-on: ubuntu-latest steps: From 8e9ec610c3749d543befc299e7c58ff782640bd1 Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Sun, 21 Aug 2022 12:10:31 +0200 Subject: [PATCH 0177/2104] feat: Add crc32 filter (#5062) * feat: Add crc32 filter Compute CRC32 checksum of a string and return its hex representation. Can be use to create short checksums. Signed-off-by: Julien Riou * Update license lines * Improve string check of a crc32 value Signed-off-by: Julien Riou Signed-off-by: Julien Riou Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 + plugins/filter/crc32.py | 64 +++++++++++++++++++++++++ tests/unit/plugins/filter/test_crc32.py | 17 +++++++ 3 files changed, 83 insertions(+) create mode 100644 plugins/filter/crc32.py create mode 100644 tests/unit/plugins/filter/test_crc32.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index aff10b2255..5ae2935209 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -125,6 +125,8 @@ files: labels: xenserver $filters/counter.py: maintainers: keilr + $filters/crc32.py: + maintainers: jouir $filters/dict.py: maintainers: felixfontein $filters/dict_kv.py: diff --git a/plugins/filter/crc32.py b/plugins/filter/crc32.py new file mode 100644 index 0000000000..1f0aa2e9b0 --- /dev/null +++ b/plugins/filter/crc32.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2022, Julien Riou +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.errors import AnsibleFilterError +from ansible.module_utils.common.text.converters import to_bytes +from ansible.module_utils.common.collections import is_string + +try: + from zlib import crc32 + HAS_ZLIB = True +except ImportError: + HAS_ZLIB = False + + +DOCUMENTATION = ''' + name: crc32 + short_description: Generate a CRC32 checksum + version_added: 5.4.0 + description: + - Checksum a string using CRC32 algorithm and return its hexadecimal representation. + options: + _input: + description: + - The string to checksum. + type: string + required: true + author: + - Julien Riou +''' + +EXAMPLES = ''' + - name: Checksum a test string + ansible.builtin.debug: + msg: "{{ 'test' | community.general.crc32 }}" +''' + +RETURN = ''' + _value: + description: CRC32 checksum. + type: string +''' + + +def crc32s(value): + if not is_string(value): + raise AnsibleFilterError('Invalid value type (%s) for crc32 (%r)' % + (type(value), value)) + + if not HAS_ZLIB: + raise AnsibleFilterError('Failed to import zlib module') + + data = to_bytes(value, errors='surrogate_or_strict') + return "{0:x}".format(crc32(data) & 0xffffffff) + + +class FilterModule: + def filters(self): + return { + 'crc32': crc32s, + } diff --git a/tests/unit/plugins/filter/test_crc32.py b/tests/unit/plugins/filter/test_crc32.py new file mode 100644 index 0000000000..961840235d --- /dev/null +++ b/tests/unit/plugins/filter/test_crc32.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2022, Julien Riou +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible.errors import AnsibleError +from ansible_collections.community.general.plugins.filter.crc32 import crc32s + + +class TestFilterCrc32(unittest.TestCase): + + def test_checksum(self): + self.assertEqual(crc32s('test'), 'd87f7e0c') From be9b445392913b208cc49628565871d8bb02ba1d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 23 Aug 2022 14:07:09 +0200 Subject: [PATCH 0178/2104] Next expected release is 5.6.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index e2f868d53b..410e4b40c1 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 5.5.0 +version: 5.6.0 readme: README.md authors: - Ansible (https://github.com/ansible) From 9f39294f50fdc6c793b1de805dd814beb31716de Mon Sep 17 00:00:00 2001 From: Tom Reeb Date: Tue, 23 Aug 2022 15:53:06 -0400 Subject: [PATCH 0179/2104] adding nested try block for tss.py to import new Delinea library (#5151) * adding nested try block to import delinea library * whitespace * Update plugins/lookup/tss.py Co-authored-by: Felix Fontein * adding changelog fragment * Update changelogs/fragments/5151-add-delinea-support-tss-lookup.yml Co-authored-by: Felix Fontein Co-authored-by: Tom Reeb Co-authored-by: Felix Fontein --- .../5151-add-delinea-support-tss-lookup.yml | 3 +++ plugins/lookup/tss.py | 24 +++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/5151-add-delinea-support-tss-lookup.yml diff --git a/changelogs/fragments/5151-add-delinea-support-tss-lookup.yml b/changelogs/fragments/5151-add-delinea-support-tss-lookup.yml new file mode 100644 index 0000000000..38d9c9e593 --- /dev/null +++ b/changelogs/fragments/5151-add-delinea-support-tss-lookup.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - tss lookup plugin - adding support for updated Delinea library (https://github.com/DelineaXPM/python-tss-sdk/issues/9, https://github.com/ansible-collections/community.general/pull/5151). diff --git a/plugins/lookup/tss.py b/plugins/lookup/tss.py index 756f168e5b..935b5f4b46 100644 --- a/plugins/lookup/tss.py +++ b/plugins/lookup/tss.py @@ -171,19 +171,29 @@ try: HAS_TSS_SDK = True except ImportError: - SecretServer = None - SecretServerError = None - HAS_TSS_SDK = False + try: + from delinea.secrets.server import SecretServer, SecretServerError + + HAS_TSS_SDK = True + except ImportError: + SecretServer = None + SecretServerError = None + HAS_TSS_SDK = False try: from thycotic.secrets.server import PasswordGrantAuthorizer, DomainPasswordGrantAuthorizer, AccessTokenAuthorizer HAS_TSS_AUTHORIZER = True except ImportError: - PasswordGrantAuthorizer = None - DomainPasswordGrantAuthorizer = None - AccessTokenAuthorizer = None - HAS_TSS_AUTHORIZER = False + try: + from delinea.secrets.server import PasswordGrantAuthorizer, DomainPasswordGrantAuthorizer, AccessTokenAuthorizer + + HAS_TSS_AUTHORIZER = True + except ImportError: + PasswordGrantAuthorizer = None + DomainPasswordGrantAuthorizer = None + AccessTokenAuthorizer = None + HAS_TSS_AUTHORIZER = False display = Display() From bcecf2dcdcb2de9c6e61c19f2e98d081e34ad961 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 19:58:42 +0200 Subject: [PATCH 0180/2104] Adjust booleans in doc fragments. (#5152) --- plugins/doc_fragments/auth_basic.py | 2 +- plugins/doc_fragments/dimensiondata.py | 2 +- plugins/doc_fragments/dimensiondata_wait.py | 2 +- plugins/doc_fragments/influxdb.py | 6 +++--- plugins/doc_fragments/ipa.py | 6 +++--- plugins/doc_fragments/keycloak.py | 2 +- plugins/doc_fragments/ldap.py | 6 +++--- plugins/doc_fragments/manageiq.py | 2 +- plugins/doc_fragments/oneview.py | 2 +- plugins/doc_fragments/online.py | 2 +- plugins/doc_fragments/opennebula.py | 2 +- plugins/doc_fragments/openswitch.py | 4 ++-- plugins/doc_fragments/oracle_wait_options.py | 8 ++++---- plugins/doc_fragments/proxmox.py | 4 ++-- plugins/doc_fragments/scaleway.py | 2 +- plugins/doc_fragments/utm.py | 2 +- plugins/doc_fragments/vexata.py | 4 ++-- plugins/doc_fragments/xenserver.py | 2 +- 18 files changed, 30 insertions(+), 30 deletions(-) diff --git a/plugins/doc_fragments/auth_basic.py b/plugins/doc_fragments/auth_basic.py index e05311af03..674fb1e9ab 100644 --- a/plugins/doc_fragments/auth_basic.py +++ b/plugins/doc_fragments/auth_basic.py @@ -28,5 +28,5 @@ options: description: - Whether or not to validate SSL certs when supplying a https endpoint. type: bool - default: yes + default: true ''' diff --git a/plugins/doc_fragments/dimensiondata.py b/plugins/doc_fragments/dimensiondata.py index f754f9cc76..f8372431e0 100644 --- a/plugins/doc_fragments/dimensiondata.py +++ b/plugins/doc_fragments/dimensiondata.py @@ -47,5 +47,5 @@ options: - If C(false), SSL certificates will not be validated. - This should only be used on private instances of the CloudControl API that use self-signed certificates. type: bool - default: yes + default: true ''' diff --git a/plugins/doc_fragments/dimensiondata_wait.py b/plugins/doc_fragments/dimensiondata_wait.py index 509f5c56fb..d371528396 100644 --- a/plugins/doc_fragments/dimensiondata_wait.py +++ b/plugins/doc_fragments/dimensiondata_wait.py @@ -21,7 +21,7 @@ options: description: - Should we wait for the task to complete before moving onto the next. type: bool - default: no + default: false wait_time: description: - The maximum amount of time (in seconds) to wait for the task to complete. diff --git a/plugins/doc_fragments/influxdb.py b/plugins/doc_fragments/influxdb.py index 133041a628..f9e08550bd 100644 --- a/plugins/doc_fragments/influxdb.py +++ b/plugins/doc_fragments/influxdb.py @@ -46,10 +46,10 @@ options: version_added: '0.2.0' validate_certs: description: - - If set to C(no), the SSL certificates will not be validated. - - This should only set to C(no) used on personally controlled sites using self-signed certificates. + - If set to C(false), the SSL certificates will not be validated. + - This should only set to C(false) used on personally controlled sites using self-signed certificates. type: bool - default: yes + default: true ssl: description: - Use https instead of http to connect to InfluxDB server. diff --git a/plugins/doc_fragments/ipa.py b/plugins/doc_fragments/ipa.py index d799bac184..5051c55390 100644 --- a/plugins/doc_fragments/ipa.py +++ b/plugins/doc_fragments/ipa.py @@ -61,10 +61,10 @@ options: validate_certs: description: - This only applies if C(ipa_prot) is I(https). - - If set to C(no), the SSL certificates will not be validated. - - This should only set to C(no) used on personally controlled sites using self-signed certificates. + - If set to C(false), the SSL certificates will not be validated. + - This should only set to C(false) used on personally controlled sites using self-signed certificates. type: bool - default: yes + default: true ipa_timeout: description: - Specifies idle timeout (in seconds) for the connection. diff --git a/plugins/doc_fragments/keycloak.py b/plugins/doc_fragments/keycloak.py index 3ef0aeb9e3..5d79fad7c0 100644 --- a/plugins/doc_fragments/keycloak.py +++ b/plugins/doc_fragments/keycloak.py @@ -61,7 +61,7 @@ options: description: - Verify TLS certificates (do not disable this in production). type: bool - default: yes + default: true connection_timeout: description: diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index d5c8107d35..28e9d2fdae 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -49,13 +49,13 @@ options: description: - If true, we'll use the START_TLS LDAP extension. type: bool - default: no + default: false validate_certs: description: - - If set to C(no), SSL certificates will not be validated. + - If set to C(false), SSL certificates will not be validated. - This should only be used on sites using self-signed certificates. type: bool - default: yes + default: true sasl_class: description: - The class to use for SASL authentication. diff --git a/plugins/doc_fragments/manageiq.py b/plugins/doc_fragments/manageiq.py index be0dd70694..030d682385 100644 --- a/plugins/doc_fragments/manageiq.py +++ b/plugins/doc_fragments/manageiq.py @@ -40,7 +40,7 @@ options: description: - Whether SSL certificates should be verified for HTTPS requests. defaults to True. type: bool - default: yes + default: true aliases: [ verify_ssl ] ca_cert: description: diff --git a/plugins/doc_fragments/oneview.py b/plugins/doc_fragments/oneview.py index 0ab50e637b..54288e51f6 100644 --- a/plugins/doc_fragments/oneview.py +++ b/plugins/doc_fragments/oneview.py @@ -63,7 +63,7 @@ options: - When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. type: bool - default: yes + default: true ''' FACTSPARAMS = r''' diff --git a/plugins/doc_fragments/online.py b/plugins/doc_fragments/online.py index c0757ca6a1..d7e13765b0 100644 --- a/plugins/doc_fragments/online.py +++ b/plugins/doc_fragments/online.py @@ -34,7 +34,7 @@ options: description: - Validate SSL certs of the Online API. type: bool - default: yes + default: true notes: - Also see the API documentation on U(https://console.online.net/en/api/) - If C(api_token) is not set within the module, the following diff --git a/plugins/doc_fragments/opennebula.py b/plugins/doc_fragments/opennebula.py index 91bfd09529..0fc323271a 100644 --- a/plugins/doc_fragments/opennebula.py +++ b/plugins/doc_fragments/opennebula.py @@ -36,7 +36,7 @@ options: - Whether to validate the SSL certificates or not. - This parameter is ignored if PYTHONHTTPSVERIFY environment variable is used. type: bool - default: yes + default: true wait_timeout: description: - Time to wait for the desired state to be reached before timeout, in seconds. diff --git a/plugins/doc_fragments/openswitch.py b/plugins/doc_fragments/openswitch.py index 317ec904e5..9d5f0be742 100644 --- a/plugins/doc_fragments/openswitch.py +++ b/plugins/doc_fragments/openswitch.py @@ -71,11 +71,11 @@ options: default: ssh use_ssl: description: - - Configures the I(transport) to use SSL if set to C(yes) only when the + - Configures the I(transport) to use SSL if set to C(true) only when the I(transport) argument is configured as rest. If the transport argument is not I(rest), this value is ignored. type: bool - default: yes + default: true provider: description: - Convenience method that allows all I(openswitch) arguments to be passed as diff --git a/plugins/doc_fragments/oracle_wait_options.py b/plugins/doc_fragments/oracle_wait_options.py index 6ca2a8c033..ce7ea776e2 100644 --- a/plugins/doc_fragments/oracle_wait_options.py +++ b/plugins/doc_fragments/oracle_wait_options.py @@ -12,15 +12,15 @@ class ModuleDocFragment(object): options: wait: description: Whether to wait for create or delete operation to complete. - default: yes + default: true type: bool wait_timeout: - description: Time, in seconds, to wait when I(wait=yes). + description: Time, in seconds, to wait when I(wait=true). default: 1200 type: int wait_until: - description: The lifecycle state to wait for the resource to transition into when I(wait=yes). By default, - when I(wait=yes), we wait for the resource to get into ACTIVE/ATTACHED/AVAILABLE/PROVISIONED/ + description: The lifecycle state to wait for the resource to transition into when I(wait=true). By default, + when I(wait=true), we wait for the resource to get into ACTIVE/ATTACHED/AVAILABLE/PROVISIONED/ RUNNING applicable lifecycle state during create operation & to get into DELETED/DETACHED/ TERMINATED lifecycle state during delete operation. type: str diff --git a/plugins/doc_fragments/proxmox.py b/plugins/doc_fragments/proxmox.py index 50fe6ea0e6..e39af4f3a6 100644 --- a/plugins/doc_fragments/proxmox.py +++ b/plugins/doc_fragments/proxmox.py @@ -38,10 +38,10 @@ options: version_added: 1.3.0 validate_certs: description: - - If C(no), SSL certificates will not be validated. + - If C(false), SSL certificates will not be validated. - This should only be used on personally controlled sites using self-signed certificates. type: bool - default: no + default: false requirements: [ "proxmoxer", "requests" ] ''' diff --git a/plugins/doc_fragments/scaleway.py b/plugins/doc_fragments/scaleway.py index 187288fbf8..b08d11dbb0 100644 --- a/plugins/doc_fragments/scaleway.py +++ b/plugins/doc_fragments/scaleway.py @@ -40,7 +40,7 @@ options: description: - Validate SSL certs of the Scaleway API. type: bool - default: yes + default: true notes: - Also see the API documentation on U(https://developer.scaleway.com/) - If C(api_token) is not set within the module, the following diff --git a/plugins/doc_fragments/utm.py b/plugins/doc_fragments/utm.py index 6700ac5320..d8b2305d23 100644 --- a/plugins/doc_fragments/utm.py +++ b/plugins/doc_fragments/utm.py @@ -43,7 +43,7 @@ options: description: - Whether the REST interface's ssl certificate should be verified or not. type: bool - default: yes + default: true state: description: - The desired state of the object. diff --git a/plugins/doc_fragments/vexata.py b/plugins/doc_fragments/vexata.py index 31e2f24f74..ff79613eec 100644 --- a/plugins/doc_fragments/vexata.py +++ b/plugins/doc_fragments/vexata.py @@ -40,10 +40,10 @@ options: validate_certs: description: - Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted. - - If set to C(yes), please make sure Python >= 2.7.9 is installed on the given machine. + - If set to C(true), please make sure Python >= 2.7.9 is installed on the given machine. required: false type: bool - default: 'no' + default: false requirements: - Vexata VX100 storage array with VXOS >= v3.5.0 on storage array diff --git a/plugins/doc_fragments/xenserver.py b/plugins/doc_fragments/xenserver.py index 66522fcf4c..eaee173849 100644 --- a/plugins/doc_fragments/xenserver.py +++ b/plugins/doc_fragments/xenserver.py @@ -37,5 +37,5 @@ options: - Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted. - If the value is not specified in the task, the value of environment variable C(XENSERVER_VALIDATE_CERTS) will be used instead. type: bool - default: yes + default: true ''' From be2de15c66428f614e9f403961bb736d758e6a36 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 19:59:01 +0200 Subject: [PATCH 0181/2104] Adjust booleans in system modules (#5153) * Adjust booleans in system modules. * Fix some IP addresses Co-authored-by: Sandra McCann Co-authored-by: Sandra McCann --- plugins/modules/system/aix_devices.py | 8 ++--- plugins/modules/system/aix_filesystem.py | 14 +++++---- plugins/modules/system/aix_inittab.py | 12 ++++---- plugins/modules/system/aix_lvg.py | 2 +- plugins/modules/system/awall.py | 6 ++-- plugins/modules/system/capabilities.py | 4 +-- plugins/modules/system/cronvar.py | 4 +-- plugins/modules/system/crypttab.py | 4 +-- plugins/modules/system/dpkg_divert.py | 10 +++--- plugins/modules/system/filesystem.py | 14 ++++----- plugins/modules/system/gconftool2.py | 10 +++--- plugins/modules/system/homectl.py | 2 +- plugins/modules/system/interfaces_file.py | 4 +-- plugins/modules/system/iptables_state.py | 6 ++-- plugins/modules/system/java_cert.py | 8 ++--- plugins/modules/system/java_keystore.py | 2 +- plugins/modules/system/launchd.py | 6 ++-- plugins/modules/system/listen_ports_facts.py | 2 +- plugins/modules/system/lvg.py | 10 +++--- plugins/modules/system/lvol.py | 24 +++++++-------- plugins/modules/system/make.py | 2 +- plugins/modules/system/mksysb.py | 22 +++++++------- plugins/modules/system/nosh.py | 32 ++++++++++++++------ plugins/modules/system/open_iscsi.py | 18 +++++------ plugins/modules/system/openwrt_init.py | 2 +- plugins/modules/system/osx_defaults.py | 4 +-- plugins/modules/system/pam_limits.py | 12 ++++---- plugins/modules/system/pamd.py | 2 +- plugins/modules/system/puppet.py | 6 ++-- plugins/modules/system/runit.py | 2 +- plugins/modules/system/sefcontext.py | 8 ++--- plugins/modules/system/selinux_permissive.py | 4 +-- plugins/modules/system/selogin.py | 2 +- plugins/modules/system/seport.py | 4 +-- plugins/modules/system/solaris_zone.py | 2 +- plugins/modules/system/sysupgrade.py | 14 ++++----- plugins/modules/system/ufw.py | 12 ++++---- plugins/modules/system/vdo.py | 6 ++-- plugins/modules/system/xfconf.py | 2 +- 39 files changed, 162 insertions(+), 146 deletions(-) diff --git a/plugins/modules/system/aix_devices.py b/plugins/modules/system/aix_devices.py index b338f94379..be23937baa 100644 --- a/plugins/modules/system/aix_devices.py +++ b/plugins/modules/system/aix_devices.py @@ -30,12 +30,12 @@ options: description: - Forces action. type: bool - default: no + default: false recursive: description: - Removes or defines a device and children devices. type: bool - default: no + default: false state: description: - Controls the device state. @@ -87,13 +87,13 @@ EXAMPLES = r''' - name: Put vscsi1 and children devices in Defined state. community.general.aix_devices: device: vscsi1 - recursive: yes + recursive: true state: defined - name: Removes vscsi1 and children devices. community.general.aix_devices: device: vscsi1 - recursive: yes + recursive: true state: removed - name: Changes en1 mtu to 9000 and disables arp. diff --git a/plugins/modules/system/aix_filesystem.py b/plugins/modules/system/aix_filesystem.py index de682ca333..77d065a59a 100644 --- a/plugins/modules/system/aix_filesystem.py +++ b/plugins/modules/system/aix_filesystem.py @@ -24,18 +24,20 @@ options: description: - Specifies whether the file system is to be processed by the accounting subsystem. type: bool - default: no + default: false attributes: description: - Specifies attributes for files system separated by comma. type: list elements: str - default: agblksize='4096',isnapshot='no' + default: + - agblksize='4096' + - isnapshot='no' auto_mount: description: - File system is automatically mounted at system restart. type: bool - default: yes + default: true device: description: - Logical volume (LV) device name or remote export device to create a NFS file system. @@ -70,7 +72,7 @@ options: description: - Removes the mount point directory when used with state C(absent). type: bool - default: no + default: false size: description: - Specifies the file system size. @@ -149,13 +151,13 @@ EXAMPLES = r''' - name: Remove NFS filesystem /home/ftp. community.general.aix_filesystem: filesystem: /home/ftp - rm_mount_point: yes + rm_mount_point: true state: absent - name: Remove /newfs. community.general.aix_filesystem: filesystem: /newfs - rm_mount_point: yes + rm_mount_point: true state: absent ''' diff --git a/plugins/modules/system/aix_inittab.py b/plugins/modules/system/aix_inittab.py index d0d712483e..57ef4758cb 100644 --- a/plugins/modules/system/aix_inittab.py +++ b/plugins/modules/system/aix_inittab.py @@ -21,13 +21,13 @@ options: description: - Name of the inittab entry. type: str - required: yes + required: true aliases: [ service ] runlevel: description: - Runlevel of the entry. type: str - required: yes + required: true action: description: - Action what the init has to do with this entry. @@ -49,7 +49,7 @@ options: description: - What command has to run. type: str - required: yes + required: true insertafter: description: - After which inittabline should the new entry inserted. @@ -78,7 +78,7 @@ EXAMPLES = ''' command: echo hello insertafter: existingservice state: present - become: yes + become: true # Change inittab entry startmyservice to runlevel "2" and processaction "wait". - name: Change startmyservice to inittab @@ -88,7 +88,7 @@ EXAMPLES = ''' action: wait command: echo hello state: present - become: yes + become: true - name: Remove startmyservice from inittab community.general.aix_inittab: @@ -97,7 +97,7 @@ EXAMPLES = ''' action: wait command: echo hello state: absent - become: yes + become: true ''' RETURN = ''' diff --git a/plugins/modules/system/aix_lvg.py b/plugins/modules/system/aix_lvg.py index 4fbf45060b..44ad631236 100644 --- a/plugins/modules/system/aix_lvg.py +++ b/plugins/modules/system/aix_lvg.py @@ -21,7 +21,7 @@ options: description: - Force volume group creation. type: bool - default: no + default: false pp_size: description: - The size of the physical partition in megabytes. diff --git a/plugins/modules/system/awall.py b/plugins/modules/system/awall.py index 279bc1bf67..dc13d46789 100644 --- a/plugins/modules/system/awall.py +++ b/plugins/modules/system/awall.py @@ -35,7 +35,7 @@ options: - Activate the new firewall rules. - Can be run with other steps or on its own. type: bool - default: no + default: false ''' EXAMPLES = r''' @@ -50,11 +50,11 @@ EXAMPLES = r''' - foo - bar state: disabled - activate: no + activate: false - name: Activate currently enabled firewall rules community.general.awall: - activate: yes + activate: true ''' RETURN = ''' # ''' diff --git a/plugins/modules/system/capabilities.py b/plugins/modules/system/capabilities.py index 2e329649af..9309958eca 100644 --- a/plugins/modules/system/capabilities.py +++ b/plugins/modules/system/capabilities.py @@ -19,13 +19,13 @@ options: description: - Specifies the path to the file to be managed. type: str - required: yes + required: true aliases: [ key ] capability: description: - Desired capability to set (with operator and flags, if state is C(present)) or remove (if state is C(absent)) type: str - required: yes + required: true aliases: [ cap ] state: description: diff --git a/plugins/modules/system/cronvar.py b/plugins/modules/system/cronvar.py index 2883f9558c..fd539c1d1f 100644 --- a/plugins/modules/system/cronvar.py +++ b/plugins/modules/system/cronvar.py @@ -29,7 +29,7 @@ options: description: - Name of the crontab variable. type: str - required: yes + required: true value: description: - The value to set this variable to. @@ -67,7 +67,7 @@ options: - If set, create a backup of the crontab before it is modified. The location of the backup is returned in the C(backup) variable by this module. type: bool - default: no + default: false requirements: - cron author: diff --git a/plugins/modules/system/crypttab.py b/plugins/modules/system/crypttab.py index 6cbfe933d3..a334e8ab3f 100644 --- a/plugins/modules/system/crypttab.py +++ b/plugins/modules/system/crypttab.py @@ -21,7 +21,7 @@ options: optionally prefixed with C(/dev/mapper/), as it appears in the filesystem. I(/dev/mapper/) will be stripped from I(name). type: str - required: yes + required: true state: description: - Use I(present) to add a line to C(/etc/crypttab) or update its definition @@ -31,7 +31,7 @@ options: different values will be updated. - Use I(opts_absent) to remove options from the existing set. type: str - required: yes + required: true choices: [ absent, opts_absent, opts_present, present ] backing_device: description: diff --git a/plugins/modules/system/dpkg_divert.py b/plugins/modules/system/dpkg_divert.py index c346fdfac6..52e6c33d0d 100644 --- a/plugins/modules/system/dpkg_divert.py +++ b/plugins/modules/system/dpkg_divert.py @@ -70,7 +70,7 @@ options: exists (this lock being a dpkg-divert feature, and bypassing it being a module feature). type: bool - default: no + default: false force: description: - When I(rename=true) and I(force=true), renaming is performed even if @@ -78,7 +78,7 @@ options: file at this location will be lost. - This parameter is ignored when I(rename=false). type: bool - default: no + default: false notes: - This module supports I(check_mode) and I(diff). requirements: @@ -99,14 +99,14 @@ EXAMPLES = r''' community.general.dpkg_divert: path: /usr/bin/busybox divert: /usr/bin/busybox.dpkg-divert - rename: yes + rename: true - name: Remove the busybox diversion and move the diverted file back community.general.dpkg_divert: path: /usr/bin/busybox state: absent - rename: yes - force: yes + rename: true + force: true ''' RETURN = r''' diff --git a/plugins/modules/system/filesystem.py b/plugins/modules/system/filesystem.py index ee382cf51f..d88f104a4a 100644 --- a/plugins/modules/system/filesystem.py +++ b/plugins/modules/system/filesystem.py @@ -50,16 +50,16 @@ options: a regular file as their target I(dev). - Support for character devices on FreeBSD has been added in community.general 3.4.0. type: path - required: yes + required: true aliases: [device] force: description: - - If C(yes), allows to create new filesystem on devices that already has filesystem. + - If C(true), allows to create new filesystem on devices that already has filesystem. type: bool - default: 'no' + default: false resizefs: description: - - If C(yes), if the block device and filesystem size differ, grow the filesystem into the space. + - If C(true), if the block device and filesystem size differ, grow the filesystem into the space. - Supported for C(btrfs), C(ext2), C(ext3), C(ext4), C(ext4dev), C(f2fs), C(lvm), C(xfs), C(ufs) and C(vfat) filesystems. Attempts to resize other filesystem types will fail. - XFS Will only grow if mounted. Currently, the module is based on commands @@ -67,7 +67,7 @@ options: not supported on FreeBSD systems. - vFAT will likely fail if fatresize < 1.04. type: bool - default: 'no' + default: false opts: description: - List of options to be passed to mkfs command. @@ -82,7 +82,7 @@ notes: - Potential filesystems on I(dev) are checked using C(blkid). In case C(blkid) is unable to detect a filesystem (and in case C(fstyp) on FreeBSD is also unable to detect a filesystem), this filesystem is overwritten even if - I(force) is C(no). + I(force) is C(false). - On FreeBSD systems, both C(e2fsprogs) and C(util-linux) packages provide a C(blkid) command that is compatible with this module. However, these packages conflict with each other, and only the C(util-linux) package @@ -581,7 +581,7 @@ def main(): module.exit_json(changed=True, msg=out) elif fs and not force: - module.fail_json(msg="'%s' is already used as %s, use force=yes to overwrite" % (dev, fs), rc=rc, err=err) + module.fail_json(msg="'%s' is already used as %s, use force=true to overwrite" % (dev, fs), rc=rc, err=err) # create fs filesystem.create(mkfs_opts, dev) diff --git a/plugins/modules/system/gconftool2.py b/plugins/modules/system/gconftool2.py index c53480aa09..931b43d76c 100644 --- a/plugins/modules/system/gconftool2.py +++ b/plugins/modules/system/gconftool2.py @@ -23,7 +23,7 @@ options: description: - A GConf preference key is an element in the GConf repository that corresponds to an application preference. See man gconftool-2(1). - required: yes + required: true value: type: str description: @@ -40,7 +40,7 @@ options: description: - The action to take upon the key/value. - State C(get) is deprecated and will be removed in community.general 8.0.0. Please use the module M(community.general.gconftool2_info) instead. - required: yes + required: true choices: [ absent, get, present ] config_source: type: str @@ -53,7 +53,7 @@ options: specified then the config_source must be specified as well. See man gconftool-2(1). type: bool - default: 'no' + default: false ''' EXAMPLES = """ @@ -192,11 +192,11 @@ def main(): % str(state)) if direct and config_source is None: - module.fail_json(msg='If "direct" is "yes" then the ' + + module.fail_json(msg='If "direct" is "true" then the ' + '"config_source" must be specified') elif not direct and config_source is not None: module.fail_json(msg='If the "config_source" is specified ' + - 'then "direct" must be "yes"') + 'then "direct" must be "true"') # Create a gconf2 preference gconf_pref = GConf2Preference(module, key, value_type, diff --git a/plugins/modules/system/homectl.py b/plugins/modules/system/homectl.py index 2fc5313cff..c14dc4af9a 100644 --- a/plugins/modules/system/homectl.py +++ b/plugins/modules/system/homectl.py @@ -196,7 +196,7 @@ EXAMPLES = ''' password: myreallysecurepassword1! state: present disksize: 10G - resize: yes + resize: true - name: Remove an existing user 'janet' community.general.homectl: diff --git a/plugins/modules/system/interfaces_file.py b/plugins/modules/system/interfaces_file.py index e9efe37c37..fe4223a12f 100644 --- a/plugins/modules/system/interfaces_file.py +++ b/plugins/modules/system/interfaces_file.py @@ -48,7 +48,7 @@ options: - Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. type: bool - default: 'no' + default: false state: type: str description: @@ -136,7 +136,7 @@ EXAMPLES = ''' iface: eth1 option: mtu value: 8000 - backup: yes + backup: true state: present register: eth1_cfg ''' diff --git a/plugins/modules/system/iptables_state.py b/plugins/modules/system/iptables_state.py index 38eb1c2eeb..1e94631c7f 100644 --- a/plugins/modules/system/iptables_state.py +++ b/plugins/modules/system/iptables_state.py @@ -71,14 +71,14 @@ options: - The file the iptables state should be saved to. - The file the iptables state should be restored from. type: path - required: yes + required: true state: description: - Whether the firewall state should be saved (into a file) or restored (from a file). type: str choices: [ saved, restored ] - required: yes + required: true table: description: - When I(state=restored), restore only the named table even if the input @@ -133,7 +133,7 @@ EXAMPLES = r''' community.general.iptables_state: state: saved path: /tmp/iptables - check_mode: yes + check_mode: true changed_when: false register: iptables_state diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index b9e80afa73..6d1df19093 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -119,7 +119,7 @@ EXAMPLES = r''' cert_path: /opt/certs/rootca.crt keystore_path: /tmp/cacerts keystore_pass: changeit - keystore_create: yes + keystore_create: true state: present cert_alias: LE_RootCA trust_cacert: True @@ -129,7 +129,7 @@ EXAMPLES = r''' cert_url: google.com keystore_path: /tmp/cacerts keystore_pass: changeit - keystore_create: yes + keystore_create: true state: present - name: Import a pkcs12 keystore with a specified alias, create it if it doesn't exist @@ -138,7 +138,7 @@ EXAMPLES = r''' cert_alias: default keystore_path: /opt/wildfly/standalone/configuration/defaultkeystore.jks keystore_pass: changeit - keystore_create: yes + keystore_create: true state: present - name: Import SSL certificate to JCEKS keystore @@ -150,7 +150,7 @@ EXAMPLES = r''' keystore_path: /opt/someapp/security/keystore.jceks keystore_type: "JCEKS" keystore_pass: changeit - keystore_create: yes + keystore_create: true state: present ''' diff --git a/plugins/modules/system/java_keystore.py b/plugins/modules/system/java_keystore.py index 33fb048611..2383c8cc48 100644 --- a/plugins/modules/system/java_keystore.py +++ b/plugins/modules/system/java_keystore.py @@ -76,7 +76,7 @@ options: description: - Keystore is created even if it already exists. type: bool - default: 'no' + default: false owner: description: - Name of the user that should own jks file. diff --git a/plugins/modules/system/launchd.py b/plugins/modules/system/launchd.py index 61d3554007..6e14e4c10c 100644 --- a/plugins/modules/system/launchd.py +++ b/plugins/modules/system/launchd.py @@ -47,9 +47,9 @@ options: - Whether the service should not be restarted automatically by launchd. - Services might have the 'KeepAlive' attribute set to true in a launchd configuration. In case this is set to true, stopping a service will cause that launchd starts the service again. - - Set this option to C(yes) to let this module change the 'KeepAlive' attribute to false. + - Set this option to C(true) to let this module change the 'KeepAlive' attribute to false. type: bool - default: no + default: false notes: - A user must privileged to manage services using this module. requirements: @@ -82,7 +82,7 @@ EXAMPLES = r''' community.general.launchd: name: org.memcached state: stopped - force_stop: yes + force_stop: true - name: Restart memcached community.general.launchd: diff --git a/plugins/modules/system/listen_ports_facts.py b/plugins/modules/system/listen_ports_facts.py index 7c20992507..c137a33e42 100644 --- a/plugins/modules/system/listen_ports_facts.py +++ b/plugins/modules/system/listen_ports_facts.py @@ -71,7 +71,7 @@ EXAMPLES = r''' - name: Gather facts on all ports and override which command to use community.general.listen_ports_facts: command: 'netstat' - include_non_listening: 'yes' + include_non_listening: true ''' RETURN = r''' diff --git a/plugins/modules/system/lvg.py b/plugins/modules/system/lvg.py index 4fc5a14084..0bb91583fa 100644 --- a/plugins/modules/system/lvg.py +++ b/plugins/modules/system/lvg.py @@ -44,7 +44,7 @@ options: type: str pvresize: description: - - If C(yes), resize the physical volume to the maximum available size. + - If C(true), resize the physical volume to the maximum available size. type: bool default: false version_added: '0.2.0' @@ -60,9 +60,9 @@ options: default: present force: description: - - If C(yes), allows to remove volume group with logical volumes. + - If C(true), allows to remove volume group with logical volumes. type: bool - default: no + default: false seealso: - module: community.general.filesystem - module: community.general.lvol @@ -102,7 +102,7 @@ EXAMPLES = r''' community.general.lvg: vg: resizableVG pvs: /dev/sda3 - pvresize: yes + pvresize: true ''' import itertools @@ -258,7 +258,7 @@ def main(): else: module.fail_json(msg="Failed to remove volume group %s" % (vg), rc=rc, err=err) else: - module.fail_json(msg="Refuse to remove non-empty volume group %s without force=yes" % (vg)) + module.fail_json(msg="Refuse to remove non-empty volume group %s without force=true" % (vg)) # resize VG current_devs = [os.path.realpath(pv['name']) for pv in pvs if pv['vg_name'] == vg] diff --git a/plugins/modules/system/lvol.py b/plugins/modules/system/lvol.py index 882e21846a..4489258da5 100644 --- a/plugins/modules/system/lvol.py +++ b/plugins/modules/system/lvol.py @@ -52,13 +52,13 @@ options: description: - Whether the volume is active and visible to the host. type: bool - default: 'yes' + default: true force: description: - Shrink or remove operations of volumes requires this switch. Ensures that that filesystems get never corrupted/destroyed by mistake. type: bool - default: 'no' + default: false opts: type: str description: @@ -79,14 +79,14 @@ options: description: - Shrink if current size is higher than size requested. type: bool - default: 'yes' + default: true resizefs: description: - Resize the underlying filesystem together with the logical volume. - Supported for C(ext2), C(ext3), C(ext4), C(reiserfs) and C(XFS) filesystems. Attempts to resize other filesystem types will fail. type: bool - default: 'no' + default: false notes: - You must specify lv (when managing the state of logical volumes) or thinpool (when managing a thin provisioned volume). ''' @@ -161,35 +161,35 @@ EXAMPLES = ''' vg: firefly lv: test size: 80%VG - force: yes + force: true - name: Reduce the logical volume to 512m community.general.lvol: vg: firefly lv: test size: 512 - force: yes + force: true - name: Reduce the logical volume by given space community.general.lvol: vg: firefly lv: test size: -512M - force: yes + force: true - name: Set the logical volume to 512m and do not try to shrink if size is lower than current one community.general.lvol: vg: firefly lv: test size: 512 - shrink: no + shrink: false - name: Remove the logical volume. community.general.lvol: vg: firefly lv: test state: absent - force: yes + force: true - name: Create a snapshot volume of the test logical volume. community.general.lvol: @@ -487,7 +487,7 @@ def main(): if state == 'absent': # remove LV if not force: - module.fail_json(msg="Sorry, no removal of logical volume %s without force=yes." % (this_lv['name'])) + module.fail_json(msg="Sorry, no removal of logical volume %s without force=true." % (this_lv['name'])) lvremove_cmd = module.get_bin_path("lvremove", required=True) rc, dummy, err = module.run_command("%s %s --force %s/%s" % (lvremove_cmd, test_opt, vg, this_lv['name'])) if rc == 0: @@ -527,7 +527,7 @@ def main(): if size_requested < 1: module.fail_json(msg="Sorry, no shrinking of %s to 0 permitted." % (this_lv['name'])) elif not force: - module.fail_json(msg="Sorry, no shrinking of %s without force=yes" % (this_lv['name'])) + module.fail_json(msg="Sorry, no shrinking of %s without force=true" % (this_lv['name'])) else: tool = module.get_bin_path("lvreduce", required=True) tool = '%s %s' % (tool, '--force') @@ -561,7 +561,7 @@ def main(): if float(size) == 0: module.fail_json(msg="Sorry, no shrinking of %s to 0 permitted." % (this_lv['name'])) if not force: - module.fail_json(msg="Sorry, no shrinking of %s without force=yes." % (this_lv['name'])) + module.fail_json(msg="Sorry, no shrinking of %s without force=true." % (this_lv['name'])) else: tool = module.get_bin_path("lvreduce", required=True) tool = '%s %s' % (tool, '--force') diff --git a/plugins/modules/system/make.py b/plugins/modules/system/make.py index e87569389e..31da07c579 100644 --- a/plugins/modules/system/make.py +++ b/plugins/modules/system/make.py @@ -59,7 +59,7 @@ EXAMPLES = r''' community.general.make: chdir: /home/ubuntu/cool-project target: install - become: yes + become: true - name: Build 'all' target with extra arguments community.general.make: diff --git a/plugins/modules/system/mksysb.py b/plugins/modules/system/mksysb.py index f25d88e6a3..a2e3f4e6c8 100644 --- a/plugins/modules/system/mksysb.py +++ b/plugins/modules/system/mksysb.py @@ -22,32 +22,32 @@ options: description: - Backup encrypted files. type: bool - default: "yes" + default: true backup_dmapi_fs: description: - Back up DMAPI filesystem files. type: bool - default: "yes" + default: true create_map_files: description: - Creates a new MAP files. type: bool - default: "no" + default: false exclude_files: description: - Excludes files using C(/etc/rootvg.exclude). type: bool - default: "no" + default: false exclude_wpar_files: description: - Excludes WPAR files. type: bool - default: "no" + default: false extended_attrs: description: - Backup extended attributes. type: bool - default: "yes" + default: true name: type: str description: @@ -57,13 +57,13 @@ options: description: - Creates a new file data. type: bool - default: "yes" + default: true software_packing: description: - Exclude files from packing option listed in C(/etc/exclude_packing.rootvg). type: bool - default: "no" + default: false storage_path: type: str description: @@ -73,7 +73,7 @@ options: description: - Creates backup using snapshots. type: bool - default: "no" + default: false ''' EXAMPLES = ''' @@ -81,8 +81,8 @@ EXAMPLES = ''' community.general.mksysb: name: myserver storage_path: /repository/images - exclude_files: yes - exclude_wpar_files: yes + exclude_files: true + exclude_wpar_files: true ''' RETURN = ''' diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index 31c6b854b0..190a26a55b 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -51,7 +51,7 @@ options: effect prior to I(state=reset). user: required: false - default: 'no' + default: false type: bool description: - Run system-control talking to the calling user's service manager, rather than @@ -64,10 +64,14 @@ notes: EXAMPLES = ''' - name: Start dnscache if not running - community.general.nosh: name=dnscache state=started + community.general.nosh: + name: dnscache + state: started - name: Stop mpd, if running - community.general.nosh: name=mpd state=stopped + community.general.nosh: + name: mpd + state: stopped - name: Restart unbound or start it if not already running community.general.nosh: @@ -80,26 +84,36 @@ EXAMPLES = ''' state: reloaded - name: Disable nsd - community.general.nosh: name=nsd enabled=no + community.general.nosh: + name: nsd + enabled: false - name: For package installers, set nginx running state according to local enable settings, preset and reset - community.general.nosh: name=nginx preset=True state=reset + community.general.nosh: + name: nginx + preset: true + state: reset - name: Reboot the host if nosh is the system manager, would need a "wait_for*" task at least, not recommended as-is - community.general.nosh: name=reboot state=started + community.general.nosh: + name: reboot + state: started - name: Using conditionals with the module facts tasks: - name: Obtain information on tinydns service - community.general.nosh: name=tinydns + community.general.nosh: + name: tinydns register: result - name: Fail if service not loaded - ansible.builtin.fail: msg="The {{ result.name }} service is not loaded" + ansible.builtin.fail: + msg: "The {{ result.name }} service is not loaded" when: not result.status - name: Fail if service is running - ansible.builtin.fail: msg="The {{ result.name }} service is running" + ansible.builtin.fail: + msg: "The {{ result.name }} service is running" when: result.status and result.status['DaemontoolsEncoreState'] == "running" ''' diff --git a/plugins/modules/system/open_iscsi.py b/plugins/modules/system/open_iscsi.py index e729e8017d..23157df874 100644 --- a/plugins/modules/system/open_iscsi.py +++ b/plugins/modules/system/open_iscsi.py @@ -78,7 +78,7 @@ options: - Whether the list of target nodes on the portal should be (re)discovered and added to the persistent iSCSI database. - Keep in mind that C(iscsiadm) discovery resets configuration, like C(node.startup) - to manual, hence combined with C(auto_node_startup=yes) will always return + to manual, hence combined with C(auto_node_startup=true) will always return a changed state. type: bool default: false @@ -100,31 +100,31 @@ options: EXAMPLES = r''' - name: Perform a discovery on sun.com and show available target nodes community.general.open_iscsi: - show_nodes: yes - discover: yes + show_nodes: true + discover: true portal: sun.com - name: Perform a discovery on 10.1.2.3 and show available target nodes community.general.open_iscsi: - show_nodes: yes - discover: yes + show_nodes: true + discover: true ip: 10.1.2.3 # NOTE: Only works if exactly one target is exported to the initiator - name: Discover targets on portal and login to the one available community.general.open_iscsi: portal: '{{ iscsi_target }}' - login: yes - discover: yes + login: true + discover: true - name: Connect to the named target, after updating the local persistent database (cache) community.general.open_iscsi: - login: yes + login: true target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d - name: Disconnect from the cached named target community.general.open_iscsi: - login: no + login: false target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d - name: Override and disable automatic portal login on specific portal diff --git a/plugins/modules/system/openwrt_init.py b/plugins/modules/system/openwrt_init.py index 0bd20a03bf..be7031791e 100644 --- a/plugins/modules/system/openwrt_init.py +++ b/plugins/modules/system/openwrt_init.py @@ -64,7 +64,7 @@ EXAMPLES = ''' - name: Enable service httpd community.general.openwrt_init: name: httpd - enabled: yes + enabled: true ''' RETURN = ''' diff --git a/plugins/modules/system/osx_defaults.py b/plugins/modules/system/osx_defaults.py index 32906682ea..8f7c2a8cf3 100644 --- a/plugins/modules/system/osx_defaults.py +++ b/plugins/modules/system/osx_defaults.py @@ -47,7 +47,7 @@ options: description: - Add new elements to the array for a key which has an array as its value. type: bool - default: no + default: false value: description: - The value to write. @@ -92,7 +92,7 @@ EXAMPLES = r''' key: AutomaticCheckEnabled type: int value: 1 - become: yes + become: true - community.general.osx_defaults: domain: com.apple.screensaver diff --git a/plugins/modules/system/pam_limits.py b/plugins/modules/system/pam_limits.py index fb019e05c9..d80ba5ffbf 100644 --- a/plugins/modules/system/pam_limits.py +++ b/plugins/modules/system/pam_limits.py @@ -69,23 +69,23 @@ options: the original file back if you somehow clobbered it incorrectly. required: false type: bool - default: "no" + default: false use_min: description: - - If set to C(yes), the minimal value will be used or conserved. + - If set to C(true), the minimal value will be used or conserved. - If the specified value is inferior to the value in the file, file content is replaced with the new value, else content is not modified. required: false type: bool - default: "no" + default: false use_max: description: - - If set to C(yes), the maximal value will be used or conserved. + - If set to C(true), the maximal value will be used or conserved. - If the specified value is superior to the value in the file, file content is replaced with the new value, else content is not modified. required: false type: bool - default: "no" + default: false dest: type: str description: @@ -116,7 +116,7 @@ EXAMPLES = r''' limit_type: hard limit_item: fsize value: 1000000 - use_max: yes + use_max: true - name: Add or modify memlock, both soft and hard, limit for the user james with a comment community.general.pam_limits: diff --git a/plugins/modules/system/pamd.py b/plugins/modules/system/pamd.py index 8e1882a41b..9b7ac77857 100644 --- a/plugins/modules/system/pamd.py +++ b/plugins/modules/system/pamd.py @@ -95,7 +95,7 @@ options: - Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. type: bool - default: no + default: false ''' EXAMPLES = r''' diff --git a/plugins/modules/system/puppet.py b/plugins/modules/system/puppet.py index 25d4f0fc75..c787a7f00c 100644 --- a/plugins/modules/system/puppet.py +++ b/plugins/modules/system/puppet.py @@ -35,8 +35,8 @@ options: noop: description: - Override puppet.conf noop mode. - - When C(yes), run Puppet agent with C(--noop) switch set. - - When C(no), run Puppet agent with C(--no-noop) switch set. + - When C(true), run Puppet agent with C(--noop) switch set. + - When C(false), run Puppet agent with C(--no-noop) switch set. - When unset (default), use default or puppet.conf value if defined. type: bool facts: @@ -139,7 +139,7 @@ EXAMPLES = r''' - name: Run puppet agent in noop mode community.general.puppet: - noop: yes + noop: true - name: Run a manifest with debug, log to both syslog and console, specify module path community.general.puppet: diff --git a/plugins/modules/system/runit.py b/plugins/modules/system/runit.py index ecd682648b..7b60215300 100644 --- a/plugins/modules/system/runit.py +++ b/plugins/modules/system/runit.py @@ -21,7 +21,7 @@ options: description: - Name of the service to manage. type: str - required: yes + required: true state: description: - C(started)/C(stopped) are idempotent actions that will not run diff --git a/plugins/modules/system/sefcontext.py b/plugins/modules/system/sefcontext.py index d9b93b636c..8183ed7d71 100644 --- a/plugins/modules/system/sefcontext.py +++ b/plugins/modules/system/sefcontext.py @@ -20,7 +20,7 @@ options: description: - Target path (expression). type: str - required: yes + required: true aliases: [ path ] ftype: description: @@ -41,7 +41,7 @@ options: description: - SELinux type for the specified target. type: str - required: yes + required: true seuser: description: - SELinux user for the specified target. @@ -62,12 +62,12 @@ options: - Reload SELinux policy after commit. - Note that this does not apply SELinux file contexts to existing files. type: bool - default: yes + default: true ignore_selinux_state: description: - Useful for scenarios (chrooted environment) that you can't get the real SELinux state. type: bool - default: no + default: false notes: - The changes are persistent across reboots. - The M(community.general.sefcontext) module does not modify existing files to the new diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/system/selinux_permissive.py index 30952e0aa7..2578519909 100644 --- a/plugins/modules/system/selinux_permissive.py +++ b/plugins/modules/system/selinux_permissive.py @@ -30,10 +30,10 @@ options: no_reload: description: - Disable reloading of the SELinux policy after making change to a domain's permissive setting. - - The default is C(no), which causes policy to be reloaded when a domain changes state. + - The default is C(false), which causes policy to be reloaded when a domain changes state. - Reloading the policy does not work on older versions of the C(policycoreutils-python) library, for example in EL 6." type: bool - default: no + default: false store: description: - Name of the SELinux policy store to use. diff --git a/plugins/modules/system/selogin.py b/plugins/modules/system/selogin.py index 5d90961ab4..59222e073a 100644 --- a/plugins/modules/system/selogin.py +++ b/plugins/modules/system/selogin.py @@ -40,7 +40,7 @@ options: description: - Reload SELinux policy after commit. type: bool - default: yes + default: true ignore_selinux_state: description: - Run independent of selinux runtime state diff --git a/plugins/modules/system/seport.py b/plugins/modules/system/seport.py index 5420ce0fd7..65cf09e22d 100644 --- a/plugins/modules/system/seport.py +++ b/plugins/modules/system/seport.py @@ -43,12 +43,12 @@ options: description: - Reload SELinux policy after commit. type: bool - default: yes + default: true ignore_selinux_state: description: - Run independent of selinux runtime state type: bool - default: no + default: false notes: - The changes are persistent across reboots. - Not tested on any debian based system. diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/system/solaris_zone.py index 502107e279..972d9cf2db 100644 --- a/plugins/modules/system/solaris_zone.py +++ b/plugins/modules/system/solaris_zone.py @@ -53,7 +53,7 @@ options: description: - Whether to create a sparse (C(true)) or whole root (C(false)) zone. type: bool - default: no + default: false root_password: description: - The password hash for the root account. If not specified, the zone's root account diff --git a/plugins/modules/system/sysupgrade.py b/plugins/modules/system/sysupgrade.py index bed9bad784..e597db975b 100644 --- a/plugins/modules/system/sysupgrade.py +++ b/plugins/modules/system/sysupgrade.py @@ -20,24 +20,24 @@ options: description: - Apply the latest snapshot. - Otherwise release will be applied. - default: no + default: false type: bool force: description: - Force upgrade (for snapshots only). - default: no + default: false type: bool keep_files: description: - Keep the files under /home/_sysupgrade. - By default, the files will be deleted after the upgrade. - default: no + default: false type: bool fetch_only: description: - Fetch and verify files and create /bsd.upgrade but do not reboot. - Set to C(false) if you want sysupgrade to reboot. This will cause Ansible to error, as it expects the module to exit gracefully. See the examples. - default: yes + default: true type: bool installurl: description: @@ -55,7 +55,7 @@ EXAMPLES = r''' - name: Upgrade to latest snapshot community.general.sysupgrade: - snapshot: yes + snapshot: true installurl: https://cloudflare.cdn.openbsd.org/pub/OpenBSD register: sysupgrade @@ -68,8 +68,8 @@ EXAMPLES = r''' - name: Have sysupgrade automatically reboot community.general.sysupgrade: - fetch_only: no - ignore_errors: yes + fetch_only: false + ignore_errors: true ''' RETURN = r''' diff --git a/plugins/modules/system/ufw.py b/plugins/modules/system/ufw.py index c3b0fcd0fa..6d18f3f781 100644 --- a/plugins/modules/system/ufw.py +++ b/plugins/modules/system/ufw.py @@ -179,7 +179,7 @@ EXAMPLES = r''' - community.general.ufw: rule: reject port: auth - log: yes + log: true # ufw supports connection rate limiting, which is useful for protecting # against brute-force login attacks. ufw will deny connections if an IP @@ -192,7 +192,7 @@ EXAMPLES = r''' proto: tcp # Allow OpenSSH. (Note that as ufw manages its own state, simply removing -# a rule=allow task can leave those ports exposed. Either use delete=yes +# a rule=allow task can leave those ports exposed. Either use delete=true # or a separate state=reset task) - community.general.ufw: rule: allow @@ -202,7 +202,7 @@ EXAMPLES = r''' community.general.ufw: rule: allow name: OpenSSH - delete: yes + delete: true - name: Deny all access to port 53 community.general.ufw: @@ -285,9 +285,9 @@ EXAMPLES = r''' - name: Deny forwarded/routed traffic from subnet 1.2.3.0/24 to subnet 4.5.6.0/24 community.general.ufw: rule: deny - route: yes - src: 1.2.3.0/24 - dest: 4.5.6.0/24 + route: true + src: 192.0.2.0/24 + dest: 198.51.100.0/24 ''' import re diff --git a/plugins/modules/system/vdo.py b/plugins/modules/system/vdo.py index 8a51af385c..21e8a96100 100644 --- a/plugins/modules/system/vdo.py +++ b/plugins/modules/system/vdo.py @@ -48,7 +48,7 @@ options: activated: description: - The "activate" status for a VDO volume. If this is set - to "no", the VDO volume cannot be started, and it will + to C(false), the VDO volume cannot be started, and it will not start on system startup. However, on initial creation, a VDO volume with "activated" set to "off" will be running, until stopped. This is the default @@ -270,7 +270,7 @@ options: checks it is important to make sure that all parameters provided are accurate and intentional." type: bool - default: no + default: false version_added: 2.4.0 notes: - In general, the default thread configuration should be used. @@ -725,7 +725,7 @@ def run_module(): # Note that a disabled VDO volume cannot be started by the # 'vdo start' command, by design. To accurately track changed # status, don't try to start a disabled VDO volume. - # If the playbook contains 'activated: yes', assume that + # If the playbook contains 'activated: true', assume that # the activate_vdo() operation succeeded, as 'vdoactivatestatus' # will have the activated status prior to the activate_vdo() # call. diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index 7a400d0797..aaf80d4db2 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -72,7 +72,7 @@ options: description: - Force array even if only one element type: bool - default: 'no' + default: false aliases: ['array'] version_added: 1.0.0 disable_facts: From ddc989ec6d4ba8834c86285c491e716e89873f4f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 19:59:13 +0200 Subject: [PATCH 0182/2104] Adjust booleans in packaging modules. (#5154) --- plugins/modules/packaging/language/bower.py | 6 +- plugins/modules/packaging/language/bundler.py | 10 ++-- .../modules/packaging/language/composer.py | 4 +- plugins/modules/packaging/language/cpanm.py | 8 +-- .../packaging/language/easy_install.py | 2 +- plugins/modules/packaging/language/gem.py | 12 ++-- .../packaging/language/maven_artifact.py | 12 ++-- plugins/modules/packaging/language/npm.py | 18 +++--- plugins/modules/packaging/language/yarn.py | 10 ++-- plugins/modules/packaging/os/apk.py | 28 +++++----- plugins/modules/packaging/os/apt_repo.py | 8 +-- plugins/modules/packaging/os/apt_rpm.py | 4 +- plugins/modules/packaging/os/homebrew.py | 14 ++--- plugins/modules/packaging/os/homebrew_cask.py | 8 +-- plugins/modules/packaging/os/installp.py | 10 ++-- plugins/modules/packaging/os/layman.py | 8 +-- plugins/modules/packaging/os/macports.py | 10 ++-- plugins/modules/packaging/os/mas.py | 10 ++-- plugins/modules/packaging/os/openbsd_pkg.py | 16 +++--- plugins/modules/packaging/os/opkg.py | 2 +- plugins/modules/packaging/os/pacman.py | 16 +++--- plugins/modules/packaging/os/pkg5.py | 6 +- plugins/modules/packaging/os/pkgin.py | 24 ++++---- plugins/modules/packaging/os/pkgng.py | 6 +- plugins/modules/packaging/os/pkgutil.py | 8 +-- plugins/modules/packaging/os/portage.py | 56 +++++++++---------- plugins/modules/packaging/os/portinstall.py | 2 +- plugins/modules/packaging/os/pulp_repo.py | 22 ++++---- .../packaging/os/redhat_subscription.py | 4 +- plugins/modules/packaging/os/rhn_register.py | 14 ++--- .../modules/packaging/os/rhsm_repository.py | 4 +- plugins/modules/packaging/os/snap.py | 4 +- plugins/modules/packaging/os/sorcery.py | 14 ++--- plugins/modules/packaging/os/swupd.py | 6 +- plugins/modules/packaging/os/urpmi.py | 10 ++-- plugins/modules/packaging/os/xbps.py | 38 +++++++++---- plugins/modules/packaging/os/zypper.py | 18 +++--- .../modules/packaging/os/zypper_repository.py | 18 +++--- 38 files changed, 242 insertions(+), 228 deletions(-) diff --git a/plugins/modules/packaging/language/bower.py b/plugins/modules/packaging/language/bower.py index 9ad564af4d..8964bd0434 100644 --- a/plugins/modules/packaging/language/bower.py +++ b/plugins/modules/packaging/language/bower.py @@ -25,12 +25,12 @@ options: description: - Install packages from local cache, if the packages were installed before type: bool - default: 'no' + default: false production: description: - Install with --production flag type: bool - default: 'no' + default: false path: type: path description: @@ -80,7 +80,7 @@ EXAMPLES = ''' - npm: path: /app/location name: bower - global: no + global: false - community.general.bower: path: /app/location relative_execpath: node_modules/.bin diff --git a/plugins/modules/packaging/language/bundler.py b/plugins/modules/packaging/language/bundler.py index 07be3e7b5c..5811fa720c 100644 --- a/plugins/modules/packaging/language/bundler.py +++ b/plugins/modules/packaging/language/bundler.py @@ -45,7 +45,7 @@ options: - Only applies if state is C(present). If set removes any gems on the target host that are not in the gemfile type: bool - default: 'no' + default: false gemfile: type: path description: @@ -55,19 +55,19 @@ options: description: - If set only installs gems from the cache on the target host type: bool - default: 'no' + default: false deployment_mode: description: - Only applies if state is C(present). If set it will install gems in ./vendor/bundle instead of the default location. Requires a Gemfile.lock file to have been created prior type: bool - default: 'no' + default: false user_install: description: - Only applies if state is C(present). Installs gems in the local user's cache or for all users type: bool - default: 'yes' + default: true gem_path: type: path description: @@ -106,7 +106,7 @@ EXAMPLES = ''' - name: Install gems into ./vendor/bundle community.general.bundler: state: present - deployment_mode: yes + deployment_mode: true - name: Install gems using a Gemfile in another directory community.general.bundler: diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 2a78611026..fbc5ba3f01 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -126,12 +126,12 @@ EXAMPLES = ''' command: create-project arguments: package/package /path/to/project ~1.0 working_dir: /path/to/project - prefer_dist: yes + prefer_dist: true - name: Install a package globally community.general.composer: command: require - global_command: yes + global_command: true arguments: my/package ''' diff --git a/plugins/modules/packaging/language/cpanm.py b/plugins/modules/packaging/language/cpanm.py index 3511865f58..1e85ac04c3 100644 --- a/plugins/modules/packaging/language/cpanm.py +++ b/plugins/modules/packaging/language/cpanm.py @@ -31,7 +31,7 @@ options: description: - Do not run unit tests. type: bool - default: no + default: false locallib: description: - Specify the install base to install modules. @@ -44,12 +44,12 @@ options: description: - Use the mirror's index file instead of the CPAN Meta DB. type: bool - default: no + default: false installdeps: description: - Only install dependencies. type: bool - default: no + default: false version: description: - Version specification for the perl module. When I(mode) is C(new), C(cpanm) version operators are accepted. @@ -122,7 +122,7 @@ EXAMPLES = ''' mirror: 'http://cpan.cpantesters.org/' - name: Install Dancer perl package into the system root path - become: yes + become: true community.general.cpanm: name: Dancer diff --git a/plugins/modules/packaging/language/easy_install.py b/plugins/modules/packaging/language/easy_install.py index e0adeefd99..0a3158c926 100644 --- a/plugins/modules/packaging/language/easy_install.py +++ b/plugins/modules/packaging/language/easy_install.py @@ -34,7 +34,7 @@ options: have any effect, the environment must be deleted and newly created. type: bool - default: 'no' + default: false virtualenv_command: type: str description: diff --git a/plugins/modules/packaging/language/gem.py b/plugins/modules/packaging/language/gem.py index d95f27b26a..e30bf458d4 100644 --- a/plugins/modules/packaging/language/gem.py +++ b/plugins/modules/packaging/language/gem.py @@ -38,7 +38,7 @@ options: - Whether to include dependencies or not. required: false type: bool - default: "yes" + default: true repository: type: str description: @@ -50,7 +50,7 @@ options: - Install gem in user's local gems cache or for all users required: false type: bool - default: "yes" + default: true executable: type: path description: @@ -80,7 +80,7 @@ options: description: - Rewrite the shebang line on installed scripts to use /usr/bin/env. required: false - default: "no" + default: false type: bool version: type: str @@ -91,13 +91,13 @@ options: description: - Allow installation of pre-release versions of the gem. required: false - default: "no" + default: false type: bool include_doc: description: - Install with or without docs. required: false - default: "no" + default: false type: bool build_flags: type: str @@ -108,7 +108,7 @@ options: description: - Force gem to install, bypassing dependency checks. required: false - default: "no" + default: false type: bool author: - "Ansible Core Team" diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index f7b690e79b..b909f509a4 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -83,7 +83,7 @@ options: responds to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. - default: 'no' + default: false type: bool version_added: '0.2.0' dest: @@ -105,9 +105,9 @@ options: default: 10 validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be set to C(no) when no other option exists. + - If C(false), SSL certificates will not be validated. This should only be set to C(false) when no other option exists. type: bool - default: 'yes' + default: true client_cert: description: - PEM formatted certificate chain file to be used for SSL client authentication. @@ -122,11 +122,11 @@ options: version_added: '1.3.0' keep_name: description: - - If C(yes), the downloaded artifact's name is preserved, i.e the version number remains part of it. + - If C(true), the downloaded artifact's name is preserved, i.e the version number remains part of it. - This option only has effect when C(dest) is a directory and C(version) is set to C(latest) or C(version_by_spec) is defined. type: bool - default: 'no' + default: false verify_checksum: type: str description: @@ -214,7 +214,7 @@ EXAMPLES = ''' artifact_id: spring-core group_id: org.springframework dest: /tmp/ - keep_name: yes + keep_name: true - name: Download the latest version of the JUnit framework artifact from Maven local community.general.maven_artifact: diff --git a/plugins/modules/packaging/language/npm.py b/plugins/modules/packaging/language/npm.py index c34aaa076c..02d97de766 100644 --- a/plugins/modules/packaging/language/npm.py +++ b/plugins/modules/packaging/language/npm.py @@ -35,7 +35,7 @@ options: description: - Install the node.js library globally. required: false - default: no + default: false type: bool executable: description: @@ -48,23 +48,23 @@ options: - Use the C(--ignore-scripts) flag when installing. required: false type: bool - default: no + default: false unsafe_perm: description: - Use the C(--unsafe-perm) flag when installing. type: bool - default: no + default: false ci: description: - Install packages based on package-lock file, same as running C(npm ci). type: bool - default: no + default: false production: description: - Install dependencies in production mode, excluding devDependencies. required: false type: bool - default: no + default: false registry: description: - The registry to install modules from. @@ -81,13 +81,13 @@ options: description: - Use the C(--no-optional) flag when installing. type: bool - default: no + default: false version_added: 2.0.0 no_bin_links: description: - Use the C(--no-bin-links) flag when installing. type: bool - default: no + default: false version_added: 2.5.0 requirements: - npm installed in bin path (recommended /usr/local/bin) @@ -108,12 +108,12 @@ EXAMPLES = r''' - name: Install "coffee-script" node.js package globally. community.general.npm: name: coffee-script - global: yes + global: true - name: Remove the globally package "coffee-script". community.general.npm: name: coffee-script - global: yes + global: true state: absent - name: Install "coffee-script" node.js package from custom registry. diff --git a/plugins/modules/packaging/language/yarn.py b/plugins/modules/packaging/language/yarn.py index b3f6604530..5c533aadcc 100644 --- a/plugins/modules/packaging/language/yarn.py +++ b/plugins/modules/packaging/language/yarn.py @@ -44,7 +44,7 @@ options: description: - Install the node.js library globally required: false - default: no + default: false type: bool executable: type: path @@ -56,14 +56,14 @@ options: - Use the --ignore-scripts flag when installing. required: false type: bool - default: no + default: false production: description: - Install dependencies in production mode. - Yarn will ignore any dependencies under devDependencies in package.json required: false type: bool - default: no + default: false registry: type: str description: @@ -96,12 +96,12 @@ EXAMPLES = ''' - name: Install "imagemin" node.js package globally. community.general.yarn: name: imagemin - global: yes + global: true - name: Remove the globally-installed package "imagemin". community.general.yarn: name: imagemin - global: yes + global: true state: absent - name: Install "imagemin" node.js package from custom registry. diff --git a/plugins/modules/packaging/os/apk.py b/plugins/modules/packaging/os/apk.py index dfc27767b1..831ab60749 100644 --- a/plugins/modules/packaging/os/apk.py +++ b/plugins/modules/packaging/os/apk.py @@ -25,7 +25,7 @@ options: - During upgrade, reset versioned world dependencies and change logic to prefer replacing or downgrading packages (instead of holding them) if the currently installed package is no longer available from any repository. type: bool - default: no + default: false name: description: - A package name, like C(foo), or multiple packages, like C(foo, bar). @@ -35,7 +35,7 @@ options: description: - Do not use any local cache path. type: bool - default: no + default: false version_added: 1.0.0 repository: description: @@ -56,12 +56,12 @@ options: description: - Update repository indexes. Can be run with other steps or on it's own. type: bool - default: no + default: false upgrade: description: - Upgrade all installed packages to their latest version. type: bool - default: no + default: false world: description: - Use a custom world file when checking for explicitly installed packages. @@ -77,12 +77,12 @@ EXAMPLES = ''' - name: Update repositories and install foo package community.general.apk: name: foo - update_cache: yes + update_cache: true - name: Update repositories and install foo and bar packages community.general.apk: name: foo,bar - update_cache: yes + update_cache: true - name: Remove foo package community.general.apk: @@ -108,39 +108,39 @@ EXAMPLES = ''' community.general.apk: name: foo state: latest - update_cache: yes + update_cache: true - name: Update repositories and update packages foo and bar to latest versions community.general.apk: name: foo,bar state: latest - update_cache: yes + update_cache: true - name: Update all installed packages to the latest versions community.general.apk: - upgrade: yes + upgrade: true - name: Upgrade / replace / downgrade / uninstall all installed packages to the latest versions available community.general.apk: - available: yes - upgrade: yes + available: true + upgrade: true - name: Update repositories as a separate step community.general.apk: - update_cache: yes + update_cache: true - name: Install package from a specific repository community.general.apk: name: foo state: latest - update_cache: yes + update_cache: true repository: http://dl-3.alpinelinux.org/alpine/edge/main - name: Install package without using cache community.general.apk: name: foo state: latest - no_cache: yes + no_cache: true - name: Install package checking a custom world community.general.apk: diff --git a/plugins/modules/packaging/os/apt_repo.py b/plugins/modules/packaging/os/apt_repo.py index db69d86226..2e9c9b109c 100644 --- a/plugins/modules/packaging/os/apt_repo.py +++ b/plugins/modules/packaging/os/apt_repo.py @@ -36,12 +36,12 @@ options: - Remove other then added repositories - Used if I(state=present) type: bool - default: no + default: false update: description: - Update the package database after changing repositories. type: bool - default: no + default: false author: - Mikhail Gordeev (@obirvalger) ''' @@ -56,13 +56,13 @@ EXAMPLES = ''' community.general.apt_repo: repo: Sisysphus state: present - remove_others: yes + remove_others: true - name: Add local repository `/space/ALT/Sisyphus` and update package cache community.general.apt_repo: repo: copy:///space/ALT/Sisyphus state: present - update: yes + update: true ''' RETURN = ''' # ''' diff --git a/plugins/modules/packaging/os/apt_rpm.py b/plugins/modules/packaging/os/apt_rpm.py index fbca31405e..35e3ba5d45 100644 --- a/plugins/modules/packaging/os/apt_rpm.py +++ b/plugins/modules/packaging/os/apt_rpm.py @@ -35,7 +35,7 @@ options: description: - update the package database first C(apt-get update). type: bool - default: no + default: false author: - Evgenii Terechkov (@evgkrsk) ''' @@ -68,7 +68,7 @@ EXAMPLES = ''' community.general.apt_rpm: name: bar state: present - update_cache: yes + update_cache: true ''' import json diff --git a/plugins/modules/packaging/os/homebrew.py b/plugins/modules/packaging/os/homebrew.py index b4f8be7422..b5c6dbdc34 100644 --- a/plugins/modules/packaging/os/homebrew.py +++ b/plugins/modules/packaging/os/homebrew.py @@ -51,12 +51,12 @@ options: description: - update homebrew itself first. type: bool - default: no + default: false upgrade_all: description: - upgrade all homebrew packages. type: bool - default: no + default: false aliases: ['upgrade'] install_options: description: @@ -91,18 +91,18 @@ EXAMPLES = ''' - community.general.homebrew: name: foo state: present - update_homebrew: yes + update_homebrew: true # Update homebrew first and upgrade formula foo to latest available with 'brew' in default path - community.general.homebrew: name: foo state: latest - update_homebrew: yes + update_homebrew: true # Update homebrew and upgrade all packages - community.general.homebrew: - update_homebrew: yes - upgrade_all: yes + update_homebrew: true + upgrade_all: true # Miscellaneous other examples - community.general.homebrew: @@ -133,7 +133,7 @@ EXAMPLES = ''' - name: Use ignore-pinned option while upgrading all community.general.homebrew: - upgrade_all: yes + upgrade_all: true upgrade_options: ignore-pinned ''' diff --git a/plugins/modules/packaging/os/homebrew_cask.py b/plugins/modules/packaging/os/homebrew_cask.py index 15bb41500d..8198c22b16 100644 --- a/plugins/modules/packaging/os/homebrew_cask.py +++ b/plugins/modules/packaging/os/homebrew_cask.py @@ -51,7 +51,7 @@ options: - Update homebrew itself first. - Note that C(brew cask update) is a synonym for C(brew update). type: bool - default: no + default: false install_options: description: - Options flags to install a package. @@ -62,13 +62,13 @@ options: description: - Allow external apps. type: bool - default: no + default: false upgrade_all: description: - Upgrade all casks. - Mutually exclusive with C(upgraded) state. type: bool - default: no + default: false aliases: [ 'upgrade' ] greedy: description: @@ -76,7 +76,7 @@ options: - Passes --greedy to brew cask outdated when checking if an installed cask has a newer version available. type: bool - default: no + default: false ''' EXAMPLES = ''' - name: Install cask diff --git a/plugins/modules/packaging/os/installp.py b/plugins/modules/packaging/os/installp.py index 750cc4dea7..f1421bc390 100644 --- a/plugins/modules/packaging/os/installp.py +++ b/plugins/modules/packaging/os/installp.py @@ -21,7 +21,7 @@ options: description: - Whether to accept the license for the package(s). type: bool - default: no + default: false name: description: - One or more packages to install or remove. @@ -49,28 +49,28 @@ EXAMPLES = r''' community.general.installp: name: foo repository_path: /repository/AIX71/installp/base - accept_license: yes + accept_license: true state: present - name: Install bos.sysmgt that includes bos.sysmgt.nim.master, bos.sysmgt.nim.spot community.general.installp: name: bos.sysmgt repository_path: /repository/AIX71/installp/base - accept_license: yes + accept_license: true state: present - name: Install bos.sysmgt.nim.master only community.general.installp: name: bos.sysmgt.nim.master repository_path: /repository/AIX71/installp/base - accept_license: yes + accept_license: true state: present - name: Install bos.sysmgt.nim.master and bos.sysmgt.nim.spot community.general.installp: name: bos.sysmgt.nim.master, bos.sysmgt.nim.spot repository_path: /repository/AIX71/installp/base - accept_license: yes + accept_license: true state: present - name: Remove packages bos.sysmgt.nim.master diff --git a/plugins/modules/packaging/os/layman.py b/plugins/modules/packaging/os/layman.py index 7202ed8f94..1b50ae48cd 100644 --- a/plugins/modules/packaging/os/layman.py +++ b/plugins/modules/packaging/os/layman.py @@ -43,11 +43,11 @@ options: type: str validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be - set to C(no) when no other option exists. Prior to 1.9.3 the code - defaulted to C(no). + - If C(false), SSL certificates will not be validated. This should only be + set to C(false) when no other option exists. Prior to 1.9.3 the code + defaulted to C(false). type: bool - default: yes + default: true ''' EXAMPLES = ''' diff --git a/plugins/modules/packaging/os/macports.py b/plugins/modules/packaging/os/macports.py index a1d976cc36..398a5552e0 100644 --- a/plugins/modules/packaging/os/macports.py +++ b/plugins/modules/packaging/os/macports.py @@ -31,7 +31,7 @@ options: - Update Macports and the ports tree, either prior to installing ports or as a separate step. - Equivalent to running C(port selfupdate). aliases: ['update_cache', 'update_ports'] - default: "no" + default: false type: bool state: description: @@ -43,7 +43,7 @@ options: description: - Upgrade all outdated ports, either prior to installing ports or as a separate step. - Equivalent to running C(port upgrade outdated). - default: "no" + default: false type: bool variant: description: @@ -72,13 +72,13 @@ EXAMPLES = ''' - name: Update Macports and the ports tree, then upgrade all outdated ports community.general.macports: - selfupdate: yes - upgrade: yes + selfupdate: true + upgrade: true - name: Update Macports and the ports tree, then install the foo port community.general.macports: name: foo - selfupdate: yes + selfupdate: true - name: Remove the foo port community.general.macports: diff --git a/plugins/modules/packaging/os/mas.py b/plugins/modules/packaging/os/mas.py index 236d564858..49faa53d9d 100644 --- a/plugins/modules/packaging/os/mas.py +++ b/plugins/modules/packaging/os/mas.py @@ -40,7 +40,7 @@ options: description: - Upgrade all installed Mac App Store apps. type: bool - default: "no" + default: false aliases: ["upgrade"] requirements: - macOS 10.11+ @@ -77,7 +77,7 @@ EXAMPLES = ''' - name: Upgrade all installed Mac App Store apps community.general.mas: - upgrade_all: yes + upgrade_all: true - name: Install specific apps and also upgrade all others community.general.mas: @@ -85,13 +85,13 @@ EXAMPLES = ''' - 409183694 # Keynote - 413857545 # Divvy state: present - upgrade_all: yes + upgrade_all: true - name: Uninstall Divvy community.general.mas: id: 413857545 state: absent - become: yes # Uninstallation requires root permissions + become: true # Uninstallation requires root permissions ''' RETURN = r''' # ''' @@ -274,7 +274,7 @@ def main(): if mas.is_installed(app): # Ensure we are root if os.getuid() != 0: - module.fail_json(msg="Uninstalling apps requires root permissions ('become: yes')") + module.fail_json(msg="Uninstalling apps requires root permissions ('become: true')") mas.app_command('uninstall', app) diff --git a/plugins/modules/packaging/os/openbsd_pkg.py b/plugins/modules/packaging/os/openbsd_pkg.py index ed917deb54..f99c5a24d0 100644 --- a/plugins/modules/packaging/os/openbsd_pkg.py +++ b/plugins/modules/packaging/os/openbsd_pkg.py @@ -24,7 +24,7 @@ options: name: description: - A name or a list of names of the packages. - required: yes + required: true type: list elements: str state: @@ -43,13 +43,13 @@ options: not already installed. - Mutually exclusive with I(snapshot). type: bool - default: no + default: false snapshot: description: - Force C(%c) and C(%m) to expand to C(snapshots), even on a release kernel. - Mutually exclusive with I(build). type: bool - default: no + default: false version_added: 1.3.0 ports_dir: description: @@ -63,13 +63,13 @@ options: file(s) in the old packages which are annotated with @extra in the packaging-list. type: bool - default: no + default: false quick: description: - Replace or delete packages quickly; do not bother with checksums before removing normal files. type: bool - default: no + default: false notes: - When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the I(name) option. @@ -95,7 +95,7 @@ EXAMPLES = ''' community.general.openbsd_pkg: name: nmap state: present - build: yes + build: true - name: Specify a pkg flavour with '--' community.general.openbsd_pkg: @@ -120,13 +120,13 @@ EXAMPLES = ''' - name: Purge a package and it's configuration files community.general.openbsd_pkg: name: mpd - clean: yes + clean: true state: absent - name: Quickly remove a package without checking checksums community.general.openbsd_pkg: name: qt5 - quick: yes + quick: true state: absent ''' diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/packaging/os/opkg.py index 6019e040f5..f7f3e6ab27 100644 --- a/plugins/modules/packaging/os/opkg.py +++ b/plugins/modules/packaging/os/opkg.py @@ -67,7 +67,7 @@ EXAMPLES = ''' community.general.opkg: name: foo state: present - update_cache: yes + update_cache: true - name: Remove foo community.general.opkg: diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index 4b8a4a0442..a1e0daf455 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -48,7 +48,7 @@ options: Same as C(extra_args="--nodeps --nodeps"). When combined with I(update_cache), force a refresh of all package databases. Same as C(update_cache_extra_args="--refresh --refresh"). - default: no + default: false type: bool remove_nosave: @@ -56,7 +56,7 @@ options: - When removing packages, do not save modified configuration files as C(.pacsave) files. (passes C(--nosave) to pacman) version_added: 4.6.0 - default: no + default: false type: bool executable: @@ -198,7 +198,7 @@ EXAMPLES = """ community.general.pacman: name: foo state: latest - update_cache: yes + update_cache: true - name: Remove packages foo and bar community.general.pacman: @@ -215,11 +215,11 @@ EXAMPLES = """ - name: Run the equivalent of "pacman -Sy" as a separate step community.general.pacman: - update_cache: yes + update_cache: true - name: Run the equivalent of "pacman -Su" as a separate step community.general.pacman: - upgrade: yes + upgrade: true - name: Run the equivalent of "pacman -Syu" as a separate step # Since community.general 5.0.0 the 'changed' state of this call @@ -232,14 +232,14 @@ EXAMPLES = """ # register: result # changed_when: result.packages | length > 0 community.general.pacman: - update_cache: yes - upgrade: yes + update_cache: true + upgrade: true - name: Run the equivalent of "pacman -Rdd", force remove package baz community.general.pacman: name: baz state: absent - force: yes + force: true - name: Install foo as dependency and leave reason untouched if already installed community.general.pacman: diff --git a/plugins/modules/packaging/os/pkg5.py b/plugins/modules/packaging/os/pkg5.py index f6f27a1d36..f8f6be24b9 100644 --- a/plugins/modules/packaging/os/pkg5.py +++ b/plugins/modules/packaging/os/pkg5.py @@ -36,7 +36,7 @@ options: description: - Accept any licences. type: bool - default: no + default: false aliases: [ accept, accept_licences ] be_name: description: @@ -46,7 +46,7 @@ options: description: - Refresh publishers before execution. type: bool - default: yes + default: true ''' EXAMPLES = ''' - name: Install Vim @@ -56,7 +56,7 @@ EXAMPLES = ''' - name: Install Vim without refreshing publishers community.general.pkg5: name: editor/vim - refresh: no + refresh: false - name: Remove finger daemon community.general.pkg5: diff --git a/plugins/modules/packaging/os/pkgin.py b/plugins/modules/packaging/os/pkgin.py index a350d1fe93..477460e0e3 100644 --- a/plugins/modules/packaging/os/pkgin.py +++ b/plugins/modules/packaging/os/pkgin.py @@ -49,27 +49,27 @@ options: description: - Update repository database. Can be run with other steps or on it's own. type: bool - default: no + default: false upgrade: description: - Upgrade main packages to their newer versions type: bool - default: no + default: false full_upgrade: description: - Upgrade all packages to their newer versions type: bool - default: no + default: false clean: description: - Clean packages cache type: bool - default: no + default: false force: description: - Force package reinstall type: bool - default: no + default: false ''' EXAMPLES = ''' @@ -86,7 +86,7 @@ EXAMPLES = ''' - name: Update cache and install foo package community.general.pkgin: name: foo - update_cache: yes + update_cache: true - name: Remove package foo community.general.pkgin: @@ -100,24 +100,24 @@ EXAMPLES = ''' - name: Update repositories as a separate step community.general.pkgin: - update_cache: yes + update_cache: true - name: Upgrade main packages (equivalent to pkgin upgrade) community.general.pkgin: - upgrade: yes + upgrade: true - name: Upgrade all packages (equivalent to pkgin full-upgrade) community.general.pkgin: - full_upgrade: yes + full_upgrade: true - name: Force-upgrade all packages (equivalent to pkgin -F full-upgrade) community.general.pkgin: - full_upgrade: yes - force: yes + full_upgrade: true + force: true - name: Clean packages cache (equivalent to pkgin clean) community.general.pkgin: - clean: yes + clean: true ''' diff --git a/plugins/modules/packaging/os/pkgng.py b/plugins/modules/packaging/os/pkgng.py index e49471c509..2160c80e48 100644 --- a/plugins/modules/packaging/os/pkgng.py +++ b/plugins/modules/packaging/os/pkgng.py @@ -48,7 +48,7 @@ options: - Use local package base instead of fetching an updated one. type: bool required: false - default: no + default: false annotation: description: - A list of keyvalue-pairs of the form @@ -91,14 +91,14 @@ options: - Remove automatically installed packages which are no longer needed. required: false type: bool - default: no + default: false ignore_osver: description: - Ignore FreeBSD OS version check, useful on -STABLE and -CURRENT branches. - Defines the C(IGNORE_OSVERSION) environment variable. required: false type: bool - default: no + default: false version_added: 1.3.0 author: "bleader (@bleader)" notes: diff --git a/plugins/modules/packaging/os/pkgutil.py b/plugins/modules/packaging/os/pkgutil.py index d24bb59001..e81f176b4a 100644 --- a/plugins/modules/packaging/os/pkgutil.py +++ b/plugins/modules/packaging/os/pkgutil.py @@ -47,12 +47,12 @@ options: choices: [ absent, installed, latest, present, removed ] update_catalog: description: - - If you always want to refresh your catalog from the mirror, even when it's not stale, set this to C(yes). + - If you always want to refresh your catalog from the mirror, even when it's not stale, set this to C(true). type: bool - default: no + default: false force: description: - - To allow the update process to downgrade packages to match what is present in the repository, set this to C(yes). + - To allow the update process to downgrade packages to match what is present in the repository, set this to C(true). - This is useful for rolling back to stable from testing, or similar operations. type: bool default: false @@ -94,7 +94,7 @@ EXAMPLES = r''' community.general.pkgutil: name: '*' state: latest - force: yes + force: true ''' RETURN = r''' # ''' diff --git a/plugins/modules/packaging/os/portage.py b/plugins/modules/packaging/os/portage.py index 6f48cb33d9..22f258cf1a 100644 --- a/plugins/modules/packaging/os/portage.py +++ b/plugins/modules/packaging/os/portage.py @@ -40,19 +40,19 @@ options: description: - Update packages to the best version available (--update) type: bool - default: no + default: false deep: description: - Consider the entire dependency tree of packages (--deep) type: bool - default: no + default: false newuse: description: - Include installed packages where USE flags have changed (--newuse) type: bool - default: no + default: false changed_use: description: @@ -60,31 +60,31 @@ options: - flags that the user has not enabled are added or removed - (--changed-use) type: bool - default: no + default: false oneshot: description: - Do not add the packages to the world file (--oneshot) type: bool - default: no + default: false noreplace: description: - Do not re-emerge installed packages (--noreplace) type: bool - default: yes + default: true nodeps: description: - Only merge packages but not their dependencies (--nodeps) type: bool - default: no + default: false onlydeps: description: - Only merge packages' dependencies but not the packages (--onlydeps) type: bool - default: no + default: false depclean: description: @@ -92,25 +92,25 @@ options: - If no package is specified, clean up the world's dependencies - Otherwise, --depclean serves as a dependency aware version of --unmerge type: bool - default: no + default: false quiet: description: - Run emerge in quiet mode (--quiet) type: bool - default: no + default: false verbose: description: - Run emerge in verbose mode (--verbose) type: bool - default: no + default: false sync: description: - Sync package repositories first - - If yes, perform "emerge --sync" - - If web, perform "emerge-webrsync" + - If C(yes), perform "emerge --sync" + - If C(web), perform "emerge-webrsync" choices: [ "web", "yes", "no" ] type: str @@ -118,32 +118,32 @@ options: description: - Merge only packages specified at C(PORTAGE_BINHOST) in C(make.conf). type: bool - default: no + default: false version_added: 1.3.0 getbinpkg: description: - Prefer packages specified at C(PORTAGE_BINHOST) in C(make.conf). type: bool - default: no + default: false usepkgonly: description: - Merge only binaries (no compiling). type: bool - default: no + default: false usepkg: description: - Tries to use the binary package(s) in the locally available packages directory. type: bool - default: no + default: false keepgoing: description: - Continue as much as possible after an error. type: bool - default: no + default: false jobs: description: @@ -165,7 +165,7 @@ options: - Redirect all build output to logs alone, and do not display it - on stdout (--quiet-build) type: bool - default: no + default: false quietfail: description: @@ -173,7 +173,7 @@ options: - Only the die message and the path of the build log will be - displayed on stdout. type: bool - default: no + default: false requirements: [ gentoolkit ] author: @@ -196,34 +196,34 @@ EXAMPLES = ''' - name: Update package foo to the latest version (os specific alternative to latest) community.general.portage: package: foo - update: yes + update: true - name: Install package foo using PORTAGE_BINHOST setup community.general.portage: package: foo - getbinpkg: yes + getbinpkg: true - name: Re-install world from binary packages only and do not allow any compiling community.general.portage: package: '@world' - usepkgonly: yes + usepkgonly: true - name: Sync repositories and update world community.general.portage: package: '@world' - update: yes - deep: yes - sync: yes + update: true + deep: true + sync: true - name: Remove unneeded packages community.general.portage: - depclean: yes + depclean: true - name: Remove package foo if it is not explicitly needed community.general.portage: package: foo state: absent - depclean: yes + depclean: true ''' import os diff --git a/plugins/modules/packaging/os/portinstall.py b/plugins/modules/packaging/os/portinstall.py index 2ae478681c..50e4e18646 100644 --- a/plugins/modules/packaging/os/portinstall.py +++ b/plugins/modules/packaging/os/portinstall.py @@ -37,7 +37,7 @@ options: - use packages instead of ports whenever available type: bool required: false - default: yes + default: true author: "berenddeboer (@berenddeboer)" ''' diff --git a/plugins/modules/packaging/os/pulp_repo.py b/plugins/modules/packaging/os/pulp_repo.py index c0d12241e0..030d2fd9af 100644 --- a/plugins/modules/packaging/os/pulp_repo.py +++ b/plugins/modules/packaging/os/pulp_repo.py @@ -23,7 +23,7 @@ options: description: - Whether or not to add the export distributor to new C(rpm) repositories. type: bool - default: no + default: false feed: description: - Upstream feed URL to receive updates from. @@ -36,14 +36,14 @@ options: properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. type: bool - default: no + default: false generate_sqlite: description: - Boolean flag to indicate whether sqlite files should be generated during a repository publish. required: false type: bool - default: no + default: false feed_ca_cert: description: - CA certificate string used to validate the feed source SSL certificate. @@ -120,20 +120,20 @@ options: repoview: description: - Whether to generate repoview files for a published repository. Setting - this to "yes" automatically activates C(generate_sqlite). + this to C(true) automatically activates C(generate_sqlite). required: false type: bool - default: no + default: false serve_http: description: - Make the repo available over HTTP. type: bool - default: no + default: false serve_https: description: - Make the repo available over HTTPS. type: bool - default: yes + default: true state: description: - The repo state. A state of C(sync) will queue a sync of the repo. @@ -152,15 +152,15 @@ options: - The username for use in HTTP basic authentication to the pulp API. validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: yes + default: true wait_for_completion: description: - Wait for asynchronous tasks to complete before returning. type: bool - default: no + default: false notes: - This module can currently only create distributors and importers on rpm repositories. Contributions to support other repo types are welcome. @@ -183,7 +183,7 @@ EXAMPLES = ''' relative_url: centos/6/updates url_username: admin url_password: admin - force_basic_auth: yes + force_basic_auth: true state: present - name: Remove a repo from the pulp server diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index 79ef89400a..da156c22ba 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -138,7 +138,7 @@ options: description: - Register the system even if it is already registered type: bool - default: no + default: false release: description: - Set a release version @@ -173,7 +173,7 @@ options: RHSM server immediately. When this option is false, then syspurpose attributes will be synchronized with RHSM server by rhsmcertd daemon. type: bool - default: no + default: false ''' EXAMPLES = ''' diff --git a/plugins/modules/packaging/os/rhn_register.py b/plugins/modules/packaging/os/rhn_register.py index cd6e891296..ba58c3345f 100644 --- a/plugins/modules/packaging/os/rhn_register.py +++ b/plugins/modules/packaging/os/rhn_register.py @@ -54,7 +54,7 @@ options: description: - Force registration, even if system is already registered. type: bool - default: no + default: false version_added: 2.0.0 ca_cert: description: @@ -73,14 +73,14 @@ options: default: [] enable_eus: description: - - If C(no), extended update support will be requested. + - If C(false), extended update support will be requested. type: bool - default: no + default: false nopackages: description: - - If C(yes), the registered node will not upload its installed packages information to Satellite server. + - If C(true), the registered node will not upload its installed packages information to Satellite server. type: bool - default: no + default: false ''' EXAMPLES = r''' @@ -100,7 +100,7 @@ EXAMPLES = r''' community.general.rhn_register: state: present activationkey: 1-222333444 - enable_eus: yes + enable_eus: true - name: Register with activationkey and set a profilename which may differ from the hostname community.general.rhn_register: @@ -128,7 +128,7 @@ EXAMPLES = r''' username: joe_user password: somepass server_url: https://xmlrpc.my.satellite/XMLRPC - force: yes + force: true ''' RETURN = r''' diff --git a/plugins/modules/packaging/os/rhsm_repository.py b/plugins/modules/packaging/os/rhsm_repository.py index e154b02ea7..5a42f95b86 100644 --- a/plugins/modules/packaging/os/rhsm_repository.py +++ b/plugins/modules/packaging/os/rhsm_repository.py @@ -35,7 +35,7 @@ options: - The ID of repositories to enable. - To operate on several repositories this can accept a comma separated list or a YAML list. - required: True + required: true type: list elements: str purge: @@ -44,7 +44,7 @@ options: Only set this to C(True) if passing in a list of repositories to the C(name) field. Using this with C(loop) will most likely not have the desired result. type: bool - default: no + default: false ''' EXAMPLES = ''' diff --git a/plugins/modules/packaging/os/snap.py b/plugins/modules/packaging/os/snap.py index ef18dbbc4c..c50e789c85 100644 --- a/plugins/modules/packaging/os/snap.py +++ b/plugins/modules/packaging/os/snap.py @@ -40,7 +40,7 @@ options: This option can only be specified if there is a single snap in the task. type: bool required: false - default: no + default: false channel: description: - Define which release of a snap is installed and tracked for updates. @@ -104,7 +104,7 @@ EXAMPLES = ''' - name: Install "foo" with option --classic community.general.snap: name: foo - classic: yes + classic: true # Install a snap with from a specific channel - name: Install "foo" with option --channel=latest/edge diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index f7be9b71c9..e1d353dbce 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -39,7 +39,7 @@ options: description: - Whether to cast, dispel or rebuild a package - state C(cast) is an equivalent of C(present), not C(latest) - - state C(latest) always triggers C(update_cache=yes) + - state C(latest) always triggers C(update_cache=true) - state C(rebuild) implies cast of all specified spells, not only those existed before choices: ["present", "latest", "absent", "cast", "dispelled", "rebuild"] @@ -61,13 +61,13 @@ options: description: - Whether or not to update sorcery scripts at the very first stage type: bool - default: no + default: false update_cache: description: - Whether or not to update grimoire collection before casting spells type: bool - default: no + default: false aliases: ["update_codex"] cache_valid_time: @@ -132,17 +132,17 @@ EXAMPLES = ''' community.general.sorcery: spell: '*' state: rebuild - update: yes - update_cache: yes + update: true + update_cache: true - name: Refresh the grimoire collection if it is 1 day old using native sorcerous alias community.general.sorcery: - update_codex: yes + update_codex: true cache_valid_time: 86400 - name: Update only Sorcery itself community.general.sorcery: - update: yes + update: true ''' diff --git a/plugins/modules/packaging/os/swupd.py b/plugins/modules/packaging/os/swupd.py index b05885648f..4567709f48 100644 --- a/plugins/modules/packaging/os/swupd.py +++ b/plugins/modules/packaging/os/swupd.py @@ -71,7 +71,7 @@ options: EXAMPLES = ''' - name: Update the OS to the latest version community.general.swupd: - update: yes + update: true - name: Installs the "foo" bundle community.general.swupd: @@ -85,11 +85,11 @@ EXAMPLES = ''' - name: Check integrity of filesystem community.general.swupd: - verify: yes + verify: true - name: Downgrade OS to release 12920 community.general.swupd: - verify: yes + verify: true manifest: 12920 ''' diff --git a/plugins/modules/packaging/os/urpmi.py b/plugins/modules/packaging/os/urpmi.py index 096e7e9e60..5f715f572f 100644 --- a/plugins/modules/packaging/os/urpmi.py +++ b/plugins/modules/packaging/os/urpmi.py @@ -21,7 +21,7 @@ options: name: description: - A list of package names to install, upgrade or remove. - required: yes + required: true aliases: [ package, pkg ] type: list elements: str @@ -35,18 +35,18 @@ options: description: - Update the package database first C(urpmi.update -a). type: bool - default: no + default: false no_recommends: description: - Corresponds to the C(--no-recommends) option for I(urpmi). type: bool - default: yes + default: true force: description: - Assume "yes" is the answer to any question urpmi has to ask. Corresponds to the C(--force) option for I(urpmi). type: bool - default: yes + default: true root: description: - Specifies an alternative install root, relative to which all packages will be installed. @@ -77,7 +77,7 @@ EXAMPLES = ''' - community.general.urpmi: name: bar state: present - update_cache: yes + update_cache: true ''' diff --git a/plugins/modules/packaging/os/xbps.py b/plugins/modules/packaging/os/xbps.py index f1f12f4d9e..5c533c135b 100644 --- a/plugins/modules/packaging/os/xbps.py +++ b/plugins/modules/packaging/os/xbps.py @@ -38,54 +38,68 @@ options: that they are not required by other packages and were not explicitly installed by a user. type: bool - default: no + default: false update_cache: description: - Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step. type: bool - default: yes + default: true upgrade: description: - Whether or not to upgrade whole system type: bool - default: no + default: false upgrade_xbps: description: - Whether or not to upgrade the xbps package when necessary. Before installing new packages, xbps requires the user to update the xbps package itself. - Thus when this option is set to C(no), + Thus when this option is set to C(false), upgrades and installations will fail when xbps is not up to date. type: bool - default: yes + default: true version_added: '0.2.0' ''' EXAMPLES = ''' - name: Install package foo (automatically updating the xbps package if needed) - community.general.xbps: name=foo state=present + community.general.xbps: + name: foo + state: present - name: Upgrade package foo - community.general.xbps: name=foo state=latest update_cache=yes + community.general.xbps: + name: foo + state: latest + update_cache: true - name: Remove packages foo and bar - community.general.xbps: name=foo,bar state=absent + community.general.xbps: + name: + - foo + - bar + state: absent - name: Recursively remove package foo - community.general.xbps: name=foo state=absent recurse=yes + community.general.xbps: + name: foo + state: absent + recurse: true - name: Update package cache - community.general.xbps: update_cache=yes + community.general.xbps: + update_cache: true - name: Upgrade packages - community.general.xbps: upgrade=yes + community.general.xbps: + upgrade: true - name: Install a package, failing if the xbps package is out of date community.general.xbps: name: foo state: present - upgrade_xbps: no + upgrade_xbps: false ''' RETURN = ''' diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/packaging/os/zypper.py index 86571d5487..d75a8c593b 100644 --- a/plugins/modules/packaging/os/zypper.py +++ b/plugins/modules/packaging/os/zypper.py @@ -73,33 +73,33 @@ options: signature being installed. Has an effect only if state is I(present) or I(latest). required: false - default: "no" + default: false type: bool disable_recommends: description: - - Corresponds to the C(--no-recommends) option for I(zypper). Default behavior (C(yes)) modifies zypper's default behavior; C(no) does + - Corresponds to the C(--no-recommends) option for I(zypper). Default behavior (C(true)) modifies zypper's default behavior; C(false) does install recommended packages. required: false - default: "yes" + default: true type: bool force: description: - Adds C(--force) option to I(zypper). Allows to downgrade packages and change vendor or architecture. required: false - default: "no" + default: false type: bool force_resolution: description: - Adds C(--force-resolution) option to I(zypper). Allows to (un)install packages with conflicting requirements (resolver will choose a solution). required: false - default: "no" + default: false type: bool version_added: '0.2.0' update_cache: description: - Run the equivalent of C(zypper refresh) before the operation. Disabled in check mode. required: false - default: "no" + default: false type: bool aliases: [ "refresh" ] oldpackage: @@ -107,7 +107,7 @@ options: - Adds C(--oldpackage) option to I(zypper). Allows to downgrade packages with less side-effects than force. This is implied as soon as a version is specified as part of the package name. required: false - default: "no" + default: false type: bool extra_args: required: false @@ -156,7 +156,7 @@ EXAMPLES = ''' community.general.zypper: name: apache2 state: present - disable_recommends: no + disable_recommends: false - name: Apply a given patch community.general.zypper: @@ -207,7 +207,7 @@ EXAMPLES = ''' community.general.zypper: name: openssl state: present - update_cache: yes + update_cache: true - name: "Install specific version (possible comparisons: <, >, <=, >=, =)" community.general.zypper: diff --git a/plugins/modules/packaging/os/zypper_repository.py b/plugins/modules/packaging/os/zypper_repository.py index 425e7a0edc..9a947254c5 100644 --- a/plugins/modules/packaging/os/zypper_repository.py +++ b/plugins/modules/packaging/os/zypper_repository.py @@ -44,12 +44,12 @@ options: I(present). - Needs zypper version >= 1.6.2. type: bool - default: no + default: false autorefresh: description: - Enable autorefresh of the repository. type: bool - default: yes + default: true aliases: [ "refresh" ] priority: description: @@ -62,7 +62,7 @@ options: - Overwrite multiple repository entries, if repositories with both name and URL already exist. type: bool - default: no + default: false auto_import_keys: description: - Automatically import the gpg signing key of the new or changed repository. @@ -70,18 +70,18 @@ options: - Implies runrefresh. - Only works with C(.repo) files if `name` is given explicitly. type: bool - default: no + default: false runrefresh: description: - Refresh the package list of the given repository. - Can be used with repo=* to refresh all repositories. type: bool - default: no + default: false enabled: description: - Set repository to enabled (or disabled). type: bool - default: yes + default: true requirements: @@ -109,19 +109,19 @@ EXAMPLES = ''' - name: Refresh all repos community.general.zypper_repository: repo: '*' - runrefresh: yes + runrefresh: true - name: Add a repo and add its gpg key community.general.zypper_repository: repo: 'http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.1/' - auto_import_keys: yes + auto_import_keys: true - name: Force refresh of a repository community.general.zypper_repository: repo: 'http://my_internal_ci_repo/repo' name: my_ci_repo state: present - runrefresh: yes + runrefresh: true ''' import traceback From 1b480e9f378f08de3a34a76ae5db9c7b337391e3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 19:59:30 +0200 Subject: [PATCH 0183/2104] Adjust booleans in monitoring modules. (#5156) --- plugins/modules/monitoring/airbrake_deployment.py | 4 ++-- plugins/modules/monitoring/bigpanda.py | 4 ++-- plugins/modules/monitoring/datadog/datadog_event.py | 4 ++-- .../modules/monitoring/datadog/datadog_monitor.py | 8 ++++---- plugins/modules/monitoring/honeybadger_deployment.py | 4 ++-- plugins/modules/monitoring/icinga2_host.py | 10 +++++----- plugins/modules/monitoring/newrelic_deployment.py | 4 ++-- plugins/modules/monitoring/pagerduty.py | 4 ++-- plugins/modules/monitoring/pagerduty_change.py | 4 ++-- plugins/modules/monitoring/rollbar_deployment.py | 4 ++-- plugins/modules/monitoring/sensu/sensu_check.py | 10 +++++----- plugins/modules/monitoring/sensu/sensu_client.py | 4 ++-- plugins/modules/monitoring/sensu/sensu_handler.py | 4 ++-- .../modules/monitoring/sensu/sensu_subscription.py | 4 ++-- plugins/modules/monitoring/spectrum_device.py | 10 +++++----- plugins/modules/monitoring/spectrum_model_attrs.py | 6 +++--- plugins/modules/monitoring/statusio_maintenance.py | 12 ++++++------ 17 files changed, 50 insertions(+), 50 deletions(-) diff --git a/plugins/modules/monitoring/airbrake_deployment.py b/plugins/modules/monitoring/airbrake_deployment.py index fd2bd018c2..2b3b1832f3 100644 --- a/plugins/modules/monitoring/airbrake_deployment.py +++ b/plugins/modules/monitoring/airbrake_deployment.py @@ -65,10 +65,10 @@ options: type: str validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. This should only be used + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool requirements: [] diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/monitoring/bigpanda.py index 2150750ed3..8c2a858877 100644 --- a/plugins/modules/monitoring/bigpanda.py +++ b/plugins/modules/monitoring/bigpanda.py @@ -68,10 +68,10 @@ options: default: https://api.bigpanda.io validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. This should only be used + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool deployment_message: type: str diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/monitoring/datadog/datadog_event.py index 45671dd7d7..0a669c4a81 100644 --- a/plugins/modules/monitoring/datadog/datadog_event.py +++ b/plugins/modules/monitoring/datadog/datadog_event.py @@ -75,10 +75,10 @@ options: description: ["An arbitrary string to use for aggregation."] validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true ''' EXAMPLES = ''' diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index 0d0aacc0c7..ef6aa84255 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -91,7 +91,7 @@ options: description: - Whether this monitor will notify when data stops reporting. type: bool - default: 'no' + default: false no_data_timeframe: description: - The number of minutes before a monitor will notify when data stops reporting. @@ -116,7 +116,7 @@ options: description: - Whether tagged users will be notified on changes to this monitor. type: bool - default: 'no' + default: false thresholds: type: dict description: @@ -128,7 +128,7 @@ options: description: - Whether changes to this monitor should be restricted to the creator or admins. type: bool - default: 'no' + default: false require_full_window: description: - Whether this monitor needs a full window of data before it gets evaluated. @@ -153,7 +153,7 @@ options: description: - Whether notifications from this monitor automatically inserts its triggering tags into the title. type: bool - default: yes + default: true version_added: 1.3.0 priority: description: diff --git a/plugins/modules/monitoring/honeybadger_deployment.py b/plugins/modules/monitoring/honeybadger_deployment.py index b0dd0ea8bc..be8412f9af 100644 --- a/plugins/modules/monitoring/honeybadger_deployment.py +++ b/plugins/modules/monitoring/honeybadger_deployment.py @@ -45,10 +45,10 @@ options: default: "https://api.honeybadger.io/v1/deploys" validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. This should only be used + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true ''' diff --git a/plugins/modules/monitoring/icinga2_host.py b/plugins/modules/monitoring/icinga2_host.py index 6b42a5d8da..a846c74f4c 100644 --- a/plugins/modules/monitoring/icinga2_host.py +++ b/plugins/modules/monitoring/icinga2_host.py @@ -26,16 +26,16 @@ options: - HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path use_proxy: description: - - If C(no), it will not use a proxy, even if one is defined in + - If C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool - default: 'yes' + default: true validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true url_username: type: str description: @@ -53,7 +53,7 @@ options: send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. type: bool - default: 'no' + default: false client_cert: type: path description: diff --git a/plugins/modules/monitoring/newrelic_deployment.py b/plugins/modules/monitoring/newrelic_deployment.py index d9b1fd770c..2fd4faf8e3 100644 --- a/plugins/modules/monitoring/newrelic_deployment.py +++ b/plugins/modules/monitoring/newrelic_deployment.py @@ -64,10 +64,10 @@ options: required: false validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool requirements: [] diff --git a/plugins/modules/monitoring/pagerduty.py b/plugins/modules/monitoring/pagerduty.py index c19ae2ac55..7df9cc1d16 100644 --- a/plugins/modules/monitoring/pagerduty.py +++ b/plugins/modules/monitoring/pagerduty.py @@ -73,10 +73,10 @@ options: default: Created by Ansible validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true ''' EXAMPLES = ''' diff --git a/plugins/modules/monitoring/pagerduty_change.py b/plugins/modules/monitoring/pagerduty_change.py index cc8f562eac..104e76e66a 100644 --- a/plugins/modules/monitoring/pagerduty_change.py +++ b/plugins/modules/monitoring/pagerduty_change.py @@ -73,10 +73,10 @@ options: type: str validate_certs: description: - - If C(no), SSL certificates for the target URL will not be validated. + - If C(false), SSL certificates for the target URL will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: yes + default: true type: bool notes: - Supports C(check_mode). Note that check mode simply does nothing except returning C(changed=true) in case the I(url) seems to be correct. diff --git a/plugins/modules/monitoring/rollbar_deployment.py b/plugins/modules/monitoring/rollbar_deployment.py index 10762061f2..c899d60163 100644 --- a/plugins/modules/monitoring/rollbar_deployment.py +++ b/plugins/modules/monitoring/rollbar_deployment.py @@ -56,11 +56,11 @@ options: default: 'https://api.rollbar.com/api/1/deploy/' validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool ''' diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index dd955cc70f..943a653249 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -43,7 +43,7 @@ options: - Create a backup file (if yes), including the timestamp information so - you can get the original file back if you somehow clobbered it incorrectly. type: bool - default: 'no' + default: false command: type: str description: @@ -97,7 +97,7 @@ options: description: - Whether the check is a metric type: bool - default: 'no' + default: false standalone: description: - Whether the check should be scheduled by the sensu client or server @@ -153,7 +153,7 @@ EXAMPLES = ''' community.general.sensu_check: name: cpu_load command: /etc/sensu/plugins/system/cpu-mpstat-metrics.rb - metric: yes + metric: true handlers: relay subscribers: common interval: 60 @@ -328,7 +328,7 @@ def main(): arg_spec = {'name': {'type': 'str', 'required': True}, 'path': {'type': 'str', 'default': '/etc/sensu/conf.d/checks.json'}, 'state': {'type': 'str', 'default': 'present', 'choices': ['present', 'absent']}, - 'backup': {'type': 'bool', 'default': 'no'}, + 'backup': {'type': 'bool', 'default': False}, 'command': {'type': 'str'}, 'handlers': {'type': 'list', 'elements': 'str'}, 'subscribers': {'type': 'list', 'elements': 'str'}, @@ -339,7 +339,7 @@ def main(): 'subdue_begin': {'type': 'str'}, 'subdue_end': {'type': 'str'}, 'dependencies': {'type': 'list', 'elements': 'str'}, - 'metric': {'type': 'bool', 'default': 'no'}, + 'metric': {'type': 'bool', 'default': False}, 'standalone': {'type': 'bool'}, 'publish': {'type': 'bool'}, 'occurrences': {'type': 'int'}, diff --git a/plugins/modules/monitoring/sensu/sensu_client.py b/plugins/modules/monitoring/sensu/sensu_client.py index a142751d82..ffd1fe9fbd 100644 --- a/plugins/modules/monitoring/sensu/sensu_client.py +++ b/plugins/modules/monitoring/sensu/sensu_client.py @@ -44,7 +44,7 @@ options: description: - If safe mode is enabled for the client. Safe mode requires local check definitions in order to accept a check request and execute the check. type: bool - default: 'no' + default: false redact: type: list elements: str @@ -58,7 +58,7 @@ options: description: - If Sensu should monitor keepalives for this client. type: bool - default: 'yes' + default: true keepalive: type: dict description: diff --git a/plugins/modules/monitoring/sensu/sensu_handler.py b/plugins/modules/monitoring/sensu/sensu_handler.py index 08ea1335e6..cd56f38f70 100644 --- a/plugins/modules/monitoring/sensu/sensu_handler.py +++ b/plugins/modules/monitoring/sensu/sensu_handler.py @@ -64,12 +64,12 @@ options: description: - If events matching one or more silence entries should be handled. type: bool - default: 'no' + default: false handle_flapping: description: - If events in the flapping state should be handled. type: bool - default: 'no' + default: false command: type: str description: diff --git a/plugins/modules/monitoring/sensu/sensu_subscription.py b/plugins/modules/monitoring/sensu/sensu_subscription.py index 63170f337b..a84d805221 100644 --- a/plugins/modules/monitoring/sensu/sensu_subscription.py +++ b/plugins/modules/monitoring/sensu/sensu_subscription.py @@ -40,7 +40,7 @@ options: - can get the original file back if you somehow clobbered it incorrectly. type: bool required: false - default: no + default: false requirements: [ ] author: Anders Ingemann (@andsens) ''' @@ -133,7 +133,7 @@ def main(): arg_spec = {'name': {'type': 'str', 'required': True}, 'path': {'type': 'str', 'default': '/etc/sensu/conf.d/subscriptions.json'}, 'state': {'type': 'str', 'default': 'present', 'choices': ['present', 'absent']}, - 'backup': {'type': 'bool', 'default': 'no'}, + 'backup': {'type': 'bool', 'default': False}, } module = AnsibleModule(argument_spec=arg_spec, diff --git a/plugins/modules/monitoring/spectrum_device.py b/plugins/modules/monitoring/spectrum_device.py index 814aff46ed..a72fd029c8 100644 --- a/plugins/modules/monitoring/spectrum_device.py +++ b/plugins/modules/monitoring/spectrum_device.py @@ -65,16 +65,16 @@ options: use_proxy: required: false description: - - if C(no), it will not use a proxy, even if one is defined in an environment + - if C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. - default: 'yes' + default: true type: bool validate_certs: required: false description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. - default: 'yes' + default: true type: bool agentport: type: int @@ -108,7 +108,7 @@ EXAMPLES = ''' oneclick_url: http://oneclick.example.com:8080 oneclick_user: username oneclick_password: password - use_proxy: no + use_proxy: false state: absent ''' diff --git a/plugins/modules/monitoring/spectrum_model_attrs.py b/plugins/modules/monitoring/spectrum_model_attrs.py index ed60291d58..5a92802f5f 100644 --- a/plugins/modules/monitoring/spectrum_model_attrs.py +++ b/plugins/modules/monitoring/spectrum_model_attrs.py @@ -43,9 +43,9 @@ options: aliases: [password] use_proxy: description: - - if C(no), it will not use a proxy, even if one is defined in + - if C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. - default: yes + default: true required: false type: bool name: @@ -63,7 +63,7 @@ options: - Validate SSL certificates. Only change this to C(false) if you can guarantee that you are talking to the correct endpoint and there is no man-in-the-middle attack happening. type: bool - default: yes + default: true required: false attributes: description: diff --git a/plugins/modules/monitoring/statusio_maintenance.py b/plugins/modules/monitoring/statusio_maintenance.py index ab4cfbe361..711e8917d0 100644 --- a/plugins/modules/monitoring/statusio_maintenance.py +++ b/plugins/modules/monitoring/statusio_maintenance.py @@ -74,32 +74,32 @@ options: description: - If it affects all components and containers type: bool - default: 'no' + default: false automation: description: - Automatically start and end the maintenance window type: bool - default: 'no' + default: false maintenance_notify_now: description: - Notify subscribers now type: bool - default: 'no' + default: false maintenance_notify_72_hr: description: - Notify subscribers 72 hours before maintenance start time type: bool - default: 'no' + default: false maintenance_notify_24_hr: description: - Notify subscribers 24 hours before maintenance start time type: bool - default: 'no' + default: false maintenance_notify_1_hr: description: - Notify subscribers 1 hour before maintenance start time type: bool - default: 'no' + default: false maintenance_id: type: str description: From 35a283918a58f3b5bdf80bb72d39ff899a3df16c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 19:59:46 +0200 Subject: [PATCH 0184/2104] Adjust booleans in notification modules. (#5157) --- plugins/modules/notification/bearychat.py | 6 +++--- plugins/modules/notification/cisco_webex.py | 8 ++++---- plugins/modules/notification/discord.py | 4 ++-- plugins/modules/notification/flowdock.py | 4 ++-- plugins/modules/notification/grove.py | 4 ++-- plugins/modules/notification/hipchat.py | 6 +++--- plugins/modules/notification/irc.py | 4 ++-- plugins/modules/notification/mail.py | 2 +- plugins/modules/notification/mattermost.py | 4 ++-- plugins/modules/notification/mqtt.py | 2 +- plugins/modules/notification/nexmo.py | 4 ++-- plugins/modules/notification/rocketchat.py | 4 ++-- plugins/modules/notification/sendgrid.py | 4 ++-- plugins/modules/notification/slack.py | 4 ++-- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/plugins/modules/notification/bearychat.py b/plugins/modules/notification/bearychat.py index e66b736d75..48d5c994fc 100644 --- a/plugins/modules/notification/bearychat.py +++ b/plugins/modules/notification/bearychat.py @@ -28,8 +28,8 @@ options: - Message to send. markdown: description: - - If C(yes), text will be parsed as markdown. - default: 'yes' + - If C(true), text will be parsed as markdown. + default: true type: bool channel: type: str @@ -58,7 +58,7 @@ EXAMPLES = """ url: | https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60 text: "{{ inventory_hostname }} completed" - markdown: no + markdown: false channel: "#ansible" attachments: - title: "Ansible on {{ inventory_hostname }}" diff --git a/plugins/modules/notification/cisco_webex.py b/plugins/modules/notification/cisco_webex.py index 7bcae7fcfa..95fcccb7d6 100644 --- a/plugins/modules/notification/cisco_webex.py +++ b/plugins/modules/notification/cisco_webex.py @@ -26,14 +26,14 @@ options: description: - The request parameter you would like to send the message to. - Messages can be sent to either a room or individual (by ID or E-Mail). - required: yes + required: true choices: ['roomId', 'toPersonEmail', 'toPersonId'] type: str recipient_id: description: - The unique identifier associated with the supplied C(recipient_type). - required: yes + required: true type: str msg_type: @@ -47,14 +47,14 @@ options: personal_token: description: - Your personal access token required to validate the Webex Teams API. - required: yes + required: true aliases: ['token'] type: str msg: description: - The message you would like to send. - required: yes + required: true type: str ''' diff --git a/plugins/modules/notification/discord.py b/plugins/modules/notification/discord.py index d31448529c..9df00ad7dd 100644 --- a/plugins/modules/notification/discord.py +++ b/plugins/modules/notification/discord.py @@ -25,13 +25,13 @@ options: description: - The webhook ID. - "Format from Discord webhook URL: C(/webhooks/{webhook.id}/{webhook.token})." - required: yes + required: true type: str webhook_token: description: - The webhook token. - "Format from Discord webhook URL: C(/webhooks/{webhook.id}/{webhook.token})." - required: yes + required: true type: str content: description: diff --git a/plugins/modules/notification/flowdock.py b/plugins/modules/notification/flowdock.py index 880236b36b..965ae62d7a 100644 --- a/plugins/modules/notification/flowdock.py +++ b/plugins/modules/notification/flowdock.py @@ -80,10 +80,10 @@ options: required: false validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool requirements: [ ] diff --git a/plugins/modules/notification/grove.py b/plugins/modules/notification/grove.py index 5cc65c0a65..d3ad6bb019 100644 --- a/plugins/modules/notification/grove.py +++ b/plugins/modules/notification/grove.py @@ -46,9 +46,9 @@ options: required: false validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. - default: 'yes' + default: true type: bool author: "Jonas Pfenniger (@zimbatm)" ''' diff --git a/plugins/modules/notification/hipchat.py b/plugins/modules/notification/hipchat.py index 7e1a2418ad..1871bd23ae 100644 --- a/plugins/modules/notification/hipchat.py +++ b/plugins/modules/notification/hipchat.py @@ -54,13 +54,13 @@ options: description: - If true, a notification will be triggered for users in the room. type: bool - default: 'yes' + default: true validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true api: type: str description: diff --git a/plugins/modules/notification/irc.py b/plugins/modules/notification/irc.py index b1bca89aaa..f45d610da7 100644 --- a/plugins/modules/notification/irc.py +++ b/plugins/modules/notification/irc.py @@ -76,13 +76,13 @@ options: description: - Designates whether TLS/SSL should be used when connecting to the IRC server type: bool - default: 'no' + default: false part: description: - Designates whether user should part from channel after sending message or not. Useful for when using a faux bot and not wanting join/parts between messages. type: bool - default: 'yes' + default: true style: type: str description: diff --git a/plugins/modules/notification/mail.py b/plugins/modules/notification/mail.py index 59206f4bb6..697ed49ee7 100644 --- a/plugins/modules/notification/mail.py +++ b/plugins/modules/notification/mail.py @@ -58,7 +58,7 @@ options: subject: description: - The subject of the email being sent. - required: yes + required: true type: str aliases: [ msg ] body: diff --git a/plugins/modules/notification/mattermost.py b/plugins/modules/notification/mattermost.py index c3ee910888..8f2f0b608f 100644 --- a/plugins/modules/notification/mattermost.py +++ b/plugins/modules/notification/mattermost.py @@ -64,9 +64,9 @@ options: default: https://www.ansible.com/favicon.ico validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. - default: yes + default: true type: bool ''' diff --git a/plugins/modules/notification/mqtt.py b/plugins/modules/notification/mqtt.py index 9e2712b2c1..81d2bf6a4f 100644 --- a/plugins/modules/notification/mqtt.py +++ b/plugins/modules/notification/mqtt.py @@ -63,7 +63,7 @@ options: applications that subsequently subscribe to the topic can received the last retained message immediately. type: bool - default: 'no' + default: false ca_cert: type: path description: diff --git a/plugins/modules/notification/nexmo.py b/plugins/modules/notification/nexmo.py index 103f366d2f..d1e6b8d35c 100644 --- a/plugins/modules/notification/nexmo.py +++ b/plugins/modules/notification/nexmo.py @@ -45,10 +45,10 @@ options: required: true validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true extends_documentation_fragment: - url ''' diff --git a/plugins/modules/notification/rocketchat.py b/plugins/modules/notification/rocketchat.py index ed7c35da78..affbb625e1 100644 --- a/plugins/modules/notification/rocketchat.py +++ b/plugins/modules/notification/rocketchat.py @@ -74,10 +74,10 @@ options: - 0 validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true color: type: str description: diff --git a/plugins/modules/notification/sendgrid.py b/plugins/modules/notification/sendgrid.py index 3424cf4194..d2a52e5f0e 100644 --- a/plugins/modules/notification/sendgrid.py +++ b/plugins/modules/notification/sendgrid.py @@ -81,7 +81,7 @@ options: description: - Whether the body is html content that should be rendered. type: bool - default: 'no' + default: false headers: type: dict description: @@ -90,7 +90,7 @@ options: type: str description: - The e-mail body content. - required: yes + required: true author: "Matt Makai (@makaimc)" ''' diff --git a/plugins/modules/notification/slack.py b/plugins/modules/notification/slack.py index eb5cf325f3..d985412932 100644 --- a/plugins/modules/notification/slack.py +++ b/plugins/modules/notification/slack.py @@ -104,10 +104,10 @@ options: - 'none' validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true color: type: str description: From 675bdef190a67a286726a4a00013dbfd5d18d7cc Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 19:59:56 +0200 Subject: [PATCH 0185/2104] Adjust booleans in source control modules. (#5158) --- .../bitbucket/bitbucket_pipeline_variable.py | 2 +- plugins/modules/source_control/bzr.py | 12 +++++----- plugins/modules/source_control/git_config.py | 16 ++++++------- .../github/github_deploy_key.py | 12 +++++----- .../source_control/github/github_key.py | 6 ++--- .../source_control/github/github_release.py | 6 ++--- .../source_control/github/github_repo.py | 4 ++-- .../gitlab/gitlab_deploy_key.py | 4 ++-- .../source_control/gitlab/gitlab_hook.py | 24 +++++++++---------- .../source_control/gitlab/gitlab_project.py | 8 +++---- .../gitlab/gitlab_project_variable.py | 4 ++-- .../source_control/gitlab/gitlab_runner.py | 8 +++---- .../source_control/gitlab/gitlab_user.py | 6 ++--- plugins/modules/source_control/hg.py | 24 +++++++++---------- 14 files changed, 68 insertions(+), 68 deletions(-) diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py index 196aff25d3..4c465482d0 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py @@ -44,7 +44,7 @@ options: description: - Whether to encrypt the variable value. type: bool - default: no + default: false state: description: - Indicates desired state of the variable. diff --git a/plugins/modules/source_control/bzr.py b/plugins/modules/source_control/bzr.py index 832e1c4afc..7832183806 100644 --- a/plugins/modules/source_control/bzr.py +++ b/plugins/modules/source_control/bzr.py @@ -22,12 +22,12 @@ options: description: - SSH or HTTP protocol address of the parent branch. aliases: [ parent ] - required: yes + required: true type: str dest: description: - Absolute path of where the branch should be cloned to. - required: yes + required: true type: path version: description: @@ -37,11 +37,11 @@ options: type: str force: description: - - If C(yes), any modified files in the working + - If C(true), any modified files in the working tree will be discarded. Before 1.9 the default - value was C(yes). + value was C(true). type: bool - default: 'no' + default: false executable: description: - Path to bzr executable to use. If not supplied, @@ -112,7 +112,7 @@ class Bzr(object): tree since that commit. ''' if not force and self.has_local_mods(): - self.module.fail_json(msg="Local modifications exist in branch (force=no).") + self.module.fail_json(msg="Local modifications exist in branch (force=false).") return self._command(["revert"], check_rc=True, cwd=self.dest) def fetch(self): diff --git a/plugins/modules/source_control/git_config.py b/plugins/modules/source_control/git_config.py index 2045341ed1..464e39040c 100644 --- a/plugins/modules/source_control/git_config.py +++ b/plugins/modules/source_control/git_config.py @@ -30,7 +30,7 @@ options: description: - List all settings (optionally limited to a given I(scope)). type: bool - default: 'no' + default: false name: description: - The name of the setting. If no value is supplied, the value will @@ -52,7 +52,7 @@ options: - This is required when setting config values. - If this is set to C(local), you must also specify the C(repo) parameter. - If this is set to C(file), you must also specify the C(file) parameter. - - It defaults to system only when not using I(list_all)=C(yes). + - It defaults to system only when not using I(list_all)=C(true). choices: [ "file", "local", "global", "system" ] type: str state: @@ -123,35 +123,35 @@ EXAMPLES = ''' name: alias.ci scope: global -- name: Scope system is also assumed when reading values, unless list_all=yes +- name: Scope system is also assumed when reading values, unless list_all=true community.general.git_config: name: alias.diffc - name: Read all values from git config community.general.git_config: - list_all: yes + list_all: true scope: global - name: When list_all is yes and no scope is specified, you get configuration from all scopes community.general.git_config: - list_all: yes + list_all: true - name: Specify a repository to include local settings community.general.git_config: - list_all: yes + list_all: true repo: /path/to/repo.git ''' RETURN = ''' --- config_value: - description: When list_all=no and value is not set, a string containing the value of the setting in name + description: When I(list_all=false) and value is not set, a string containing the value of the setting in name returned: success type: str sample: "vim" config_values: - description: When list_all=yes, a dict containing key/value pairs of multiple configuration settings + description: When I(list_all=true), a dict containing key/value pairs of multiple configuration settings returned: success type: dict sample: diff --git a/plugins/modules/source_control/github/github_deploy_key.py b/plugins/modules/source_control/github/github_deploy_key.py index cbf6c286a3..97e7a1ac7f 100644 --- a/plugins/modules/source_control/github/github_deploy_key.py +++ b/plugins/modules/source_control/github/github_deploy_key.py @@ -53,7 +53,7 @@ options: description: - If C(true), the deploy key will only be able to read repository contents. Otherwise, the deploy key will be able to read and write. type: bool - default: 'yes' + default: true state: description: - The state of the deploy key. @@ -64,7 +64,7 @@ options: description: - If C(true), forcefully adds the deploy key by deleting any existing deploy key with the same public key or title. type: bool - default: 'no' + default: false username: description: - The username to authenticate with. Should not be set when using personal access token @@ -92,7 +92,7 @@ EXAMPLES = ''' repo: "example" name: "new-deploy-key" key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwXxn7kIMNWzcDfou..." - read_only: yes + read_only: true username: "johndoe" password: "supersecretpassword" @@ -102,7 +102,7 @@ EXAMPLES = ''' repository: "example" name: "new-deploy-key" key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwXxn7kIMNWzcDfou..." - force: yes + force: true username: "johndoe" password: "supersecretpassword" state: absent @@ -113,7 +113,7 @@ EXAMPLES = ''' repository: "example" name: "new-deploy-key" key: "{{ lookup('file', '~/.ssh/github.pub') }}" - force: yes + force: true token: "ABAQDAwXxn7kIMNWzcDfo..." - name: Re-add a deploy key to a GitHub repository but with a different name @@ -142,7 +142,7 @@ EXAMPLES = ''' repo: "example" name: "new-deploy-key" key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwXxn7kIMNWzcDfou..." - read_only: yes + read_only: true username: "janedoe" password: "supersecretpassword" ''' diff --git a/plugins/modules/source_control/github/github_key.py b/plugins/modules/source_control/github/github_key.py index da8372d890..10dd3f9c00 100644 --- a/plugins/modules/source_control/github/github_key.py +++ b/plugins/modules/source_control/github/github_key.py @@ -37,11 +37,11 @@ options: type: str force: description: - - The default is C(yes), which will replace the existing remote key - if it's different than C(pubkey). If C(no), the key will only be + - The default is C(true), which will replace the existing remote key + if it's different than C(pubkey). If C(false), the key will only be set if no key with the given C(name) exists. type: bool - default: 'yes' + default: true author: Robert Estelle (@erydo) ''' diff --git a/plugins/modules/source_control/github/github_release.py b/plugins/modules/source_control/github/github_release.py index d0cd5c4ff9..84ce4ce4ec 100644 --- a/plugins/modules/source_control/github/github_release.py +++ b/plugins/modules/source_control/github/github_release.py @@ -59,13 +59,13 @@ options: draft: description: - Sets if the release is a draft or not. (boolean) - type: 'bool' - default: 'no' + type: bool + default: false prerelease: description: - Sets if the release is a prerelease or not. (boolean) type: bool - default: 'no' + default: false author: - "Adrian Moisey (@adrianmoisey)" diff --git a/plugins/modules/source_control/github/github_repo.py b/plugins/modules/source_control/github/github_repo.py index 609d377ddd..0549a5ad46 100644 --- a/plugins/modules/source_control/github/github_repo.py +++ b/plugins/modules/source_control/github/github_repo.py @@ -101,9 +101,9 @@ EXAMPLES = ''' organization: MyOrganization name: myrepo description: "Just for fun" - private: yes + private: true state: present - force_defaults: no + force_defaults: false register: result - name: Delete the repository diff --git a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py index 01ed49ffa4..e1449a83ee 100644 --- a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py +++ b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py @@ -46,7 +46,7 @@ options: description: - Whether this key can push to the project. type: bool - default: no + default: false state: description: - When C(present) the deploy key added to the project if it doesn't exist. @@ -73,7 +73,7 @@ EXAMPLES = ''' project: "my_group/my_project" title: "Jenkins CI" state: present - can_push: yes + can_push: true - name: "Remove the previous deploy key from the project" community.general.gitlab_deploy_key: diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index fad63ddc5c..f0824a96c7 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -49,7 +49,7 @@ options: description: - Trigger hook on push events. type: bool - default: yes + default: true push_events_branch_filter: description: - Branch name of wildcard to trigger hook on push events @@ -59,42 +59,42 @@ options: description: - Trigger hook on issues events. type: bool - default: no + default: false merge_requests_events: description: - Trigger hook on merge requests events. type: bool - default: no + default: false tag_push_events: description: - Trigger hook on tag push events. type: bool - default: no + default: false note_events: description: - Trigger hook on note events or when someone adds a comment. type: bool - default: no + default: false job_events: description: - Trigger hook on job events. type: bool - default: no + default: false pipeline_events: description: - Trigger hook on pipeline events. type: bool - default: no + default: false wiki_page_events: description: - Trigger hook on wiki events. type: bool - default: no + default: false hook_validate_certs: description: - Whether GitLab will do SSL verification when triggering the hook. type: bool - default: no + default: false aliases: [ enable_ssl_verification ] token: description: @@ -113,9 +113,9 @@ EXAMPLES = ''' project: "my_group/my_project" hook_url: "https://my-ci-server.example.com/gitlab-hook" state: present - push_events: yes - tag_push_events: yes - hook_validate_certs: no + push_events: true + tag_push_events: true + hook_validate_certs: false token: "my-super-secret-token-that-my-ci-server-will-check" - name: "Delete the previous hook" diff --git a/plugins/modules/source_control/gitlab/gitlab_project.py b/plugins/modules/source_control/gitlab/gitlab_project.py index 84594cbeb3..63a94bd444 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project.py +++ b/plugins/modules/source_control/gitlab/gitlab_project.py @@ -58,23 +58,23 @@ options: - Whether you want to create issues or not. - Possible values are true and false. type: bool - default: yes + default: true merge_requests_enabled: description: - If merge requests can be made or not. - Possible values are true and false. type: bool - default: yes + default: true wiki_enabled: description: - If an wiki for this project should be available or not. type: bool - default: yes + default: true snippets_enabled: description: - If creating snippets should be available or not. type: bool - default: yes + default: true visibility: description: - C(private) Project access must be granted explicitly for each user. diff --git a/plugins/modules/source_control/gitlab/gitlab_project_variable.py b/plugins/modules/source_control/gitlab/gitlab_project_variable.py index bfba9a5e37..3e71bfa347 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_variable.py @@ -117,8 +117,8 @@ EXAMPLES = ''' value: abc123 - name: SECRET_ACCESS_KEY value: dassgrfaeui8989 - masked: yes - protected: yes + masked: true + protected: true environment_scope: production - name: Set or update some CI/CD variables diff --git a/plugins/modules/source_control/gitlab/gitlab_runner.py b/plugins/modules/source_control/gitlab/gitlab_runner.py index b6af300a9d..f79bbc2628 100644 --- a/plugins/modules/source_control/gitlab/gitlab_runner.py +++ b/plugins/modules/source_control/gitlab/gitlab_runner.py @@ -66,14 +66,14 @@ options: description: - Searches only runners available to the user when searching for existing, when false admin token required. - Mutually exclusive with I(project) since community.general 4.5.0. - default: no + default: false type: bool version_added: 2.0.0 active: description: - Define if the runners is immediately active after creation. required: False - default: yes + default: true type: bool locked: description: @@ -100,7 +100,7 @@ options: description: - Run untagged jobs or not. required: False - default: yes + default: true type: bool tag_list: description: The tags that apply to the runner. @@ -135,7 +135,7 @@ EXAMPLES = ''' api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" description: Docker Machine t1 - owned: yes + owned: true state: absent - name: Register runner for a specific project diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/source_control/gitlab/gitlab_user.py index 6a322ebd0e..14be4bd177 100644 --- a/plugins/modules/source_control/gitlab/gitlab_user.py +++ b/plugins/modules/source_control/gitlab/gitlab_user.py @@ -102,17 +102,17 @@ options: description: - Require confirmation. type: bool - default: yes + default: true isadmin: description: - Grant admin privileges to the user. type: bool - default: no + default: false external: description: - Define external parameter for this user. type: bool - default: no + default: false identities: description: - List of identities to be added/updated for this user. diff --git a/plugins/modules/source_control/hg.py b/plugins/modules/source_control/hg.py index 398320515e..777feaa059 100644 --- a/plugins/modules/source_control/hg.py +++ b/plugins/modules/source_control/hg.py @@ -20,7 +20,7 @@ options: repo: description: - The repository address. - required: yes + required: true aliases: [ name ] type: str dest: @@ -37,24 +37,24 @@ options: force: description: - Discards uncommitted changes. Runs C(hg update -C). Prior to - 1.9, the default was C(yes). + 1.9, the default was C(true). type: bool - default: 'no' + default: false purge: description: - Deletes untracked files. Runs C(hg purge). type: bool - default: 'no' + default: false update: description: - - If C(no), do not retrieve new revisions from the origin repository + - If C(false), do not retrieve new revisions from the origin repository type: bool - default: 'yes' + default: true clone: description: - - If C(no), do not clone the repository if it does not exist locally. + - If C(false), do not clone the repository if it does not exist locally. type: bool - default: 'yes' + default: true executable: description: - Path to hg executable to use. If not supplied, @@ -77,14 +77,14 @@ EXAMPLES = ''' repo: https://bitbucket.org/user/repo1 dest: /home/user/repo1 revision: stable - purge: yes + purge: true - name: Get information about the repository whether or not it has already been cloned locally. community.general.hg: repo: git://bitbucket.org/user/repo dest: /srv/checkout - clone: no - update: no + clone: false + update: false ''' import os @@ -245,7 +245,7 @@ def main(): cleaned = False if not dest and (clone or update): - module.fail_json(msg="the destination directory must be specified unless clone=no and update=no") + module.fail_json(msg="the destination directory must be specified unless clone=false and update=false") hg = Hg(module, dest, repo, revision, hg_path) From 7533f9ac261536825be3c455c758007bcef1d0c5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 20:00:11 +0200 Subject: [PATCH 0186/2104] Adjust booleans in net tools, web infrastructure, and clustering modules. (#5159) --- plugins/modules/clustering/consul/consul.py | 2 +- .../modules/clustering/consul/consul_kv.py | 6 ++-- .../modules/clustering/pacemaker_cluster.py | 4 +-- plugins/modules/clustering/znode.py | 2 +- plugins/modules/net_tools/cloudflare_dns.py | 4 +-- plugins/modules/net_tools/dnsimple.py | 4 +-- plugins/modules/net_tools/dnsmadeeasy.py | 26 ++++++++--------- plugins/modules/net_tools/haproxy.py | 28 +++++++++---------- plugins/modules/net_tools/ipify_facts.py | 2 +- plugins/modules/net_tools/ldap/ldap_attrs.py | 6 ++-- plugins/modules/net_tools/nmcli.py | 8 +++--- plugins/modules/net_tools/omapi_host.py | 4 +-- .../modules/net_tools/pritunl/pritunl_user.py | 2 +- .../web_infrastructure/apache2_mod_proxy.py | 4 +-- .../web_infrastructure/deploy_helper.py | 2 +- .../web_infrastructure/django_manage.py | 2 +- .../modules/web_infrastructure/htpasswd.py | 4 +-- .../modules/web_infrastructure/jenkins_job.py | 6 ++-- .../web_infrastructure/jenkins_plugin.py | 20 ++++++------- .../web_infrastructure/jenkins_script.py | 8 +++--- 20 files changed, 72 insertions(+), 72 deletions(-) diff --git a/plugins/modules/clustering/consul/consul.py b/plugins/modules/clustering/consul/consul.py index 039e67b254..152d4577a1 100644 --- a/plugins/modules/clustering/consul/consul.py +++ b/plugins/modules/clustering/consul/consul.py @@ -70,7 +70,7 @@ options: description: - whether to verify the TLS certificate of the consul agent type: bool - default: 'yes' + default: true notes: type: str description: diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/clustering/consul/consul_kv.py index 9fdfb53342..2b0391389a 100644 --- a/plugins/modules/clustering/consul/consul_kv.py +++ b/plugins/modules/clustering/consul/consul_kv.py @@ -46,7 +46,7 @@ options: description: - The key at which the value should be stored. type: str - required: yes + required: true value: description: - The value should be associated with the given key, required if C(state) @@ -55,7 +55,7 @@ options: recurse: description: - If the key represents a prefix, each entry with the prefix can be - retrieved by setting this to C(yes). + retrieved by setting this to C(true). type: bool retrieve: description: @@ -103,7 +103,7 @@ options: description: - Whether to verify the tls certificate of the consul agent. type: bool - default: 'yes' + default: true ''' diff --git a/plugins/modules/clustering/pacemaker_cluster.py b/plugins/modules/clustering/pacemaker_cluster.py index 6e9d30c66c..823bb76257 100644 --- a/plugins/modules/clustering/pacemaker_cluster.py +++ b/plugins/modules/clustering/pacemaker_cluster.py @@ -37,13 +37,13 @@ options: description: - Force the change of the cluster state type: bool - default: 'yes' + default: true ''' EXAMPLES = ''' --- - name: Set cluster Online hosts: localhost - gather_facts: no + gather_facts: false tasks: - name: Get cluster state community.general.pacemaker_cluster: diff --git a/plugins/modules/clustering/znode.py b/plugins/modules/clustering/znode.py index 2c42d55643..07be85c145 100644 --- a/plugins/modules/clustering/znode.py +++ b/plugins/modules/clustering/znode.py @@ -48,7 +48,7 @@ options: description: - Recursively delete node and all its children. type: bool - default: 'no' + default: false requirements: - kazoo >= 2.1 - python >= 2.6 diff --git a/plugins/modules/net_tools/cloudflare_dns.py b/plugins/modules/net_tools/cloudflare_dns.py index 34e1d84500..12cd484565 100644 --- a/plugins/modules/net_tools/cloudflare_dns.py +++ b/plugins/modules/net_tools/cloudflare_dns.py @@ -84,7 +84,7 @@ options: description: - Proxy through Cloudflare network or just use DNS. type: bool - default: no + default: false record: description: - Record to add. @@ -206,7 +206,7 @@ EXAMPLES = r''' zone: example.net type: CNAME value: example.com - proxied: yes + proxied: true account_email: test@example.com account_api_key: dummyapitoken state: present diff --git a/plugins/modules/net_tools/dnsimple.py b/plugins/modules/net_tools/dnsimple.py index 79a8a7400a..e96c22613f 100644 --- a/plugins/modules/net_tools/dnsimple.py +++ b/plugins/modules/net_tools/dnsimple.py @@ -72,14 +72,14 @@ options: - Whether the record should be the only one for that record type and record name. - Only use with C(state) is set to C(present) on a record. type: 'bool' - default: no + default: false sandbox: description: - Use the DNSimple sandbox environment. - Requires a dedicated account in the dnsimple sandbox environment. - Check U(https://developer.dnsimple.com/sandbox/) for more information. type: 'bool' - default: no + default: false version_added: 3.5.0 requirements: - "dnsimple >= 2.0.0" diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/net_tools/dnsmadeeasy.py index 121f16584f..0efbe5b6e0 100644 --- a/plugins/modules/net_tools/dnsmadeeasy.py +++ b/plugins/modules/net_tools/dnsmadeeasy.py @@ -41,7 +41,7 @@ options: description: - Decides if the sandbox API should be used. Otherwise (default) the production API of DNS Made Easy is used. type: bool - default: 'no' + default: false record_name: description: @@ -80,16 +80,16 @@ options: validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true monitor: description: - - If C(yes), add or change the monitor. This is applicable only for A records. + - If C(true), add or change the monitor. This is applicable only for A records. type: bool - default: 'no' + default: false systemDescription: description: @@ -147,16 +147,16 @@ options: failover: description: - - If C(yes), add or change the failover. This is applicable only for A records. + - If C(true), add or change the failover. This is applicable only for A records. type: bool - default: 'no' + default: false autoFailover: description: - If true, fallback to the primary IP address is manual after a failover. - If false, fallback to the primary IP address is automatic after a failover. type: bool - default: 'no' + default: false ip1: description: @@ -283,7 +283,7 @@ EXAMPLES = ''' record_name: test record_type: A record_value: 127.0.0.1 - monitor: yes + monitor: true ip1: 127.0.0.2 protocol: HTTP # default port: 80 # default @@ -300,7 +300,7 @@ EXAMPLES = ''' record_name: test record_type: A record_value: 127.0.0.1 - monitor: yes + monitor: true ip1: 127.0.0.2 protocol: HTTP # default port: 80 # default @@ -323,7 +323,7 @@ EXAMPLES = ''' failover: True ip1: 127.0.0.2 ip2: 127.0.0.3 - monitor: yes + monitor: true protocol: HTTPS port: 443 maxEmails: 1 @@ -339,7 +339,7 @@ EXAMPLES = ''' record_name: test record_type: A record_value: 127.0.0.1 - failover: no + failover: false - name: Remove a monitor community.general.dnsmadeeasy: @@ -350,7 +350,7 @@ EXAMPLES = ''' record_name: test record_type: A record_value: 127.0.0.1 - monitor: no + monitor: false ''' # ============================================ diff --git a/plugins/modules/net_tools/haproxy.py b/plugins/modules/net_tools/haproxy.py index 71035c4ba8..322d2344bc 100644 --- a/plugins/modules/net_tools/haproxy.py +++ b/plugins/modules/net_tools/haproxy.py @@ -49,7 +49,7 @@ options: - This can be used to terminate long-running sessions after a server is put into maintenance mode. Overridden by the drain option. type: bool - default: no + default: false socket: description: - Path to the HAProxy socket file. @@ -68,25 +68,25 @@ options: description: - Disable/enable agent checks (depending on I(state) value). type: bool - default: no + default: false version_added: 1.0.0 health: description: - Disable/enable health checks (depending on I(state) value). type: bool - default: no + default: false version_added: "1.0.0" fail_on_not_found: description: - Fail whenever trying to enable/disable a backend host that does not exist type: bool - default: no + default: false wait: description: - Wait until the server reports a status of 'UP' when C(state=enabled), status of 'MAINT' when C(state=disabled) or status of 'DRAIN' when C(state=drain) type: bool - default: no + default: false wait_interval: description: - Number of seconds to wait between retries. @@ -118,8 +118,8 @@ EXAMPLES = r''' community.general.haproxy: state: disabled host: '{{ inventory_hostname }}' - health: yes - agent: yes + health: true + agent: true - name: Disable server without backend pool name (apply to all available backend pool) community.general.haproxy: @@ -139,7 +139,7 @@ EXAMPLES = r''' host: '{{ inventory_hostname }}' socket: /var/run/haproxy.sock backend: www - wait: yes + wait: true # Place server in drain mode, providing a socket file. Then check the server's # status every minute to see if it changes to maintenance mode, continuing if it @@ -149,8 +149,8 @@ EXAMPLES = r''' host: '{{ inventory_hostname }}' socket: /var/run/haproxy.sock backend: www - wait: yes - drain: yes + wait: true + drain: true wait_interval: 60 wait_retries: 60 @@ -160,13 +160,13 @@ EXAMPLES = r''' host: '{{ inventory_hostname }}' backend: www socket: /var/run/haproxy.sock - shutdown_sessions: yes + shutdown_sessions: true - name: Disable server without backend pool name (apply to all available backend pool) but fail when the backend host is not found community.general.haproxy: state: disabled host: '{{ inventory_hostname }}' - fail_on_not_found: yes + fail_on_not_found: true - name: Enable server in 'www' backend pool community.general.haproxy: @@ -179,14 +179,14 @@ EXAMPLES = r''' state: enabled host: '{{ inventory_hostname }}' backend: www - wait: yes + wait: true - name: Enable server in 'www' backend pool wait until healthy. Retry 10 times with intervals of 5 seconds to retrieve the health community.general.haproxy: state: enabled host: '{{ inventory_hostname }}' backend: www - wait: yes + wait: true wait_retries: 10 wait_interval: 5 diff --git a/plugins/modules/net_tools/ipify_facts.py b/plugins/modules/net_tools/ipify_facts.py index 2abc13af2a..8953c02940 100644 --- a/plugins/modules/net_tools/ipify_facts.py +++ b/plugins/modules/net_tools/ipify_facts.py @@ -33,7 +33,7 @@ options: description: - When set to C(NO), SSL certificates will not be validated. type: bool - default: yes + default: true notes: - Visit https://www.ipify.org to get more information. ''' diff --git a/plugins/modules/net_tools/ldap/ldap_attrs.py b/plugins/modules/net_tools/ldap/ldap_attrs.py index 39f6a59d34..df61233ab1 100644 --- a/plugins/modules/net_tools/ldap/ldap_attrs.py +++ b/plugins/modules/net_tools/ldap/ldap_attrs.py @@ -62,9 +62,9 @@ options: ordered: required: false type: bool - default: 'no' + default: false description: - - If C(yes), prepend list values with X-ORDERED index numbers in all + - If C(true), prepend list values with X-ORDERED index numbers in all attributes specified in the current task. This is useful mostly with I(olcAccess) attribute to easily manage LDAP Access Control Lists. extends_documentation_fragment: @@ -115,7 +115,7 @@ EXAMPLES = r''' to dn.base="dc=example,dc=com" by dn="cn=admin,dc=example,dc=com" write by * read - ordered: yes + ordered: true state: exact - name: Declare some indexes diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index e195249360..83bd984437 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -35,7 +35,7 @@ options: - Whether the connection should start on boot. - Whether the connection profile can be automatically activated type: bool - default: yes + default: true conn_name: description: - The name used to call the connection. Pattern is [-][-]. @@ -155,7 +155,7 @@ options: - Set as default route. - This parameter is mutually_exclusive with gw4 parameter. type: bool - default: no + default: false version_added: 2.0.0 dns4: description: @@ -331,7 +331,7 @@ options: description: - This is only used with bridge and controls whether Spanning Tree Protocol (STP) is enabled for this bridge. type: bool - default: yes + default: true priority: description: - This is only used with 'bridge' - sets STP priority. @@ -1183,7 +1183,7 @@ EXAMPLES = r''' ip4: 192.0.2.100/24 gw4: 192.0.2.1 state: present - autoconnect: yes + autoconnect: true - name: Optionally, at the same time specify IPv6 addresses for the device community.general.nmcli: diff --git a/plugins/modules/net_tools/omapi_host.py b/plugins/modules/net_tools/omapi_host.py index a0c62b74e9..7d1897ca55 100644 --- a/plugins/modules/net_tools/omapi_host.py +++ b/plugins/modules/net_tools/omapi_host.py @@ -70,7 +70,7 @@ options: description: - Enable dynamic DNS updates for this host. type: bool - default: no + default: false ''' EXAMPLES = r''' @@ -82,7 +82,7 @@ EXAMPLES = r''' macaddr: 44:dd:ab:dd:11:44 name: server01 ip: 192.168.88.99 - ddns: yes + ddns: true statements: - filename "pxelinux.0" - next-server 1.1.1.1 diff --git a/plugins/modules/net_tools/pritunl/pritunl_user.py b/plugins/modules/net_tools/pritunl/pritunl_user.py index 1ddd8a97af..817d6fb3f6 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_user.py +++ b/plugins/modules/net_tools/pritunl/pritunl_user.py @@ -108,7 +108,7 @@ EXAMPLES = """ organization: MyOrg user_name: Foo user_email: foo@bar.com - user_disabled: yes + user_disabled: true - name: Make sure the user Foo is not part of MyOrg anymore community.general.pritunl_user: diff --git a/plugins/modules/web_infrastructure/apache2_mod_proxy.py b/plugins/modules/web_infrastructure/apache2_mod_proxy.py index 5e444047fd..70ab5a42ed 100644 --- a/plugins/modules/web_infrastructure/apache2_mod_proxy.py +++ b/plugins/modules/web_infrastructure/apache2_mod_proxy.py @@ -50,12 +50,12 @@ options: description: - Use https to access balancer management page. type: bool - default: 'no' + default: false validate_certs: description: - Validate ssl/tls certificates. type: bool - default: 'yes' + default: true ''' EXAMPLES = ''' diff --git a/plugins/modules/web_infrastructure/deploy_helper.py b/plugins/modules/web_infrastructure/deploy_helper.py index 7ab10dc5b8..721f51f3c7 100644 --- a/plugins/modules/web_infrastructure/deploy_helper.py +++ b/plugins/modules/web_infrastructure/deploy_helper.py @@ -94,7 +94,7 @@ options: description: - Whether to run the clean procedure in case of C(state=finalize). type: bool - default: 'yes' + default: true keep_releases: type: int diff --git a/plugins/modules/web_infrastructure/django_manage.py b/plugins/modules/web_infrastructure/django_manage.py index 5d68ae9bcf..0d68e926eb 100644 --- a/plugins/modules/web_infrastructure/django_manage.py +++ b/plugins/modules/web_infrastructure/django_manage.py @@ -65,7 +65,7 @@ options: - Clear the existing files before trying to copy or link the original file. - Used only with the C(collectstatic) command. The C(--noinput) argument will be added automatically. required: false - default: no + default: false type: bool database: description: diff --git a/plugins/modules/web_infrastructure/htpasswd.py b/plugins/modules/web_infrastructure/htpasswd.py index 28dfeda158..4590607cc7 100644 --- a/plugins/modules/web_infrastructure/htpasswd.py +++ b/plugins/modules/web_infrastructure/htpasswd.py @@ -54,10 +54,10 @@ options: create: required: false type: bool - default: "yes" + default: true description: - Used with C(state=present). If specified, the file will be created - if it does not already exist. If set to "no", will fail if the + if it does not already exist. If set to C(false), will fail if the file does not exist notes: - "This module depends on the I(passlib) Python library, which needs to be installed on all target systems." diff --git a/plugins/modules/web_infrastructure/jenkins_job.py b/plugins/modules/web_infrastructure/jenkins_job.py index a2c15f55d5..7930766b8e 100644 --- a/plugins/modules/web_infrastructure/jenkins_job.py +++ b/plugins/modules/web_infrastructure/jenkins_job.py @@ -68,10 +68,10 @@ options: required: false validate_certs: type: bool - default: yes + default: true description: - - If set to C(no), the SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites + - If set to C(false), the SSL certificates will not be validated. + This should only set to C(false) used on personally controlled sites using self-signed certificates as it avoids verifying the source site. - The C(python-jenkins) library only handles this by using the environment variable C(PYTHONHTTPSVERIFY). version_added: 2.3.0 diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py index 478bd0be08..3142e1672d 100644 --- a/plugins/modules/web_infrastructure/jenkins_plugin.py +++ b/plugins/modules/web_infrastructure/jenkins_plugin.py @@ -37,7 +37,7 @@ options: type: str description: - Plugin name. - required: yes + required: true owner: type: str description: @@ -114,7 +114,7 @@ options: - Defines whether to install plugin dependencies. - This option takes effect only if the I(version) is not defined. type: bool - default: yes + default: true notes: - Plugin installation should be run under root or the same user which owns @@ -141,7 +141,7 @@ EXAMPLES = ''' - name: Install plugin without its dependencies community.general.jenkins_plugin: name: build-pipeline-plugin - with_dependencies: no + with_dependencies: false - name: Make sure the plugin is always up-to-date community.general.jenkins_plugin: @@ -196,11 +196,11 @@ EXAMPLES = ''' vars: my_jenkins_plugins: token-macro: - enabled: yes + enabled: true build-pipeline-plugin: version: "1.4.9" - pinned: no - enabled: yes + pinned: false + enabled: true tasks: - name: Install plugins without a specific version community.general.jenkins_plugin: @@ -221,17 +221,17 @@ EXAMPLES = ''' - name: Initiate the fact ansible.builtin.set_fact: - jenkins_restart_required: no + jenkins_restart_required: false - name: Check if restart is required by any of the versioned plugins ansible.builtin.set_fact: - jenkins_restart_required: yes + jenkins_restart_required: true when: item.changed with_items: "{{ my_jenkins_plugin_versioned.results }}" - name: Check if restart is required by any of the unversioned plugins ansible.builtin.set_fact: - jenkins_restart_required: yes + jenkins_restart_required: true when: item.changed with_items: "{{ my_jenkins_plugin_unversioned.results }}" @@ -257,7 +257,7 @@ EXAMPLES = ''' - name: Reset the fact ansible.builtin.set_fact: - jenkins_restart_required: no + jenkins_restart_required: false when: jenkins_restart_required - name: Plugin pinning diff --git a/plugins/modules/web_infrastructure/jenkins_script.py b/plugins/modules/web_infrastructure/jenkins_script.py index c7cad4655d..58d8e2c642 100644 --- a/plugins/modules/web_infrastructure/jenkins_script.py +++ b/plugins/modules/web_infrastructure/jenkins_script.py @@ -33,11 +33,11 @@ options: default: http://localhost:8080 validate_certs: description: - - If set to C(no), the SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites + - If set to C(false), the SSL certificates will not be validated. + This should only set to C(false) used on personally controlled sites using self-signed certificates as it avoids verifying the source site. type: bool - default: 'yes' + default: true user: type: str description: @@ -90,7 +90,7 @@ EXAMPLES = ''' user: admin password: admin url: https://localhost - validate_certs: no + validate_certs: false ''' RETURN = ''' From 403c4f7477f6f85563af7beb5f45283cfaba59ab Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 20:00:26 +0200 Subject: [PATCH 0187/2104] Adjust booleans in misc modules. (#5160) --- .../database/influxdb/influxdb_database.py | 4 +-- .../influxdb/influxdb_retention_policy.py | 12 ++++---- .../database/influxdb/influxdb_user.py | 4 +-- .../database/misc/elasticsearch_plugin.py | 2 +- plugins/modules/database/misc/odbc.py | 8 ++--- plugins/modules/database/misc/riak.py | 6 ++-- plugins/modules/database/mssql/mssql_db.py | 2 +- plugins/modules/files/archive.py | 4 +-- plugins/modules/files/ini_file.py | 30 +++++++++---------- plugins/modules/files/iso_create.py | 4 +-- plugins/modules/files/iso_extract.py | 14 ++++----- plugins/modules/files/read_csv.py | 4 +-- plugins/modules/files/xml.py | 20 ++++++------- plugins/modules/identity/ipa/ipa_group.py | 16 +++++----- .../identity/keycloak/keycloak_client.py | 2 +- .../identity/keycloak/keycloak_realm_info.py | 2 +- .../remote_management/cobbler/cobbler_sync.py | 12 ++++---- .../cobbler/cobbler_system.py | 14 ++++----- .../remote_management/hpilo/hpilo_boot.py | 2 +- .../remote_management/hpilo/hponcfg.py | 2 +- .../modules/remote_management/imc/imc_rest.py | 18 +++++------ .../remote_management/ipmi/ipmi_boot.py | 4 +-- .../manageiq/manageiq_provider.py | 8 ++--- .../remote_management/stacki/stacki_host.py | 2 +- .../modules/storage/hpe3par/ss_3par_cpg.py | 6 ++-- .../modules/storage/zfs/zfs_delegate_admin.py | 10 +++---- plugins/modules/storage/zfs/zfs_facts.py | 8 ++--- 27 files changed, 110 insertions(+), 110 deletions(-) diff --git a/plugins/modules/database/influxdb/influxdb_database.py b/plugins/modules/database/influxdb/influxdb_database.py index 1c245ad6da..8ffbece606 100644 --- a/plugins/modules/database/influxdb/influxdb_database.py +++ b/plugins/modules/database/influxdb/influxdb_database.py @@ -56,8 +56,8 @@ EXAMPLES = r''' username: "{{influxdb_username}}" password: "{{influxdb_password}}" database_name: "{{influxdb_database_name}}" - ssl: yes - validate_certs: yes + ssl: true + validate_certs: true ''' RETURN = r''' diff --git a/plugins/modules/database/influxdb/influxdb_retention_policy.py b/plugins/modules/database/influxdb/influxdb_retention_policy.py index 80f0513678..1b7d7eec9a 100644 --- a/plugins/modules/database/influxdb/influxdb_retention_policy.py +++ b/plugins/modules/database/influxdb/influxdb_retention_policy.py @@ -77,8 +77,8 @@ EXAMPLES = r''' policy_name: test duration: 1h replication: 1 - ssl: yes - validate_certs: yes + ssl: true + validate_certs: true state: present - name: Create 1 day retention policy with 1 hour shard group duration @@ -108,8 +108,8 @@ EXAMPLES = r''' policy_name: test duration: INF replication: 1 - ssl: no - validate_certs: no + ssl: false + validate_certs: false shard_group_duration: 1w state: present @@ -120,8 +120,8 @@ EXAMPLES = r''' policy_name: test duration: 5d1h30m replication: 1 - ssl: no - validate_certs: no + ssl: false + validate_certs: false shard_group_duration: 1d10h30m state: present diff --git a/plugins/modules/database/influxdb/influxdb_user.py b/plugins/modules/database/influxdb/influxdb_user.py index 30b92d9bfe..06ef13e2b3 100644 --- a/plugins/modules/database/influxdb/influxdb_user.py +++ b/plugins/modules/database/influxdb/influxdb_user.py @@ -35,7 +35,7 @@ options: description: - Whether the user should be in the admin role or not. - Since version 2.8, the role will also be updated. - default: no + default: false type: bool state: description: @@ -73,7 +73,7 @@ EXAMPLES = r''' community.general.influxdb_user: user_name: john user_password: s3cr3t - admin: yes + admin: true hostname: "{{ influxdb_hostname }}" login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}" diff --git a/plugins/modules/database/misc/elasticsearch_plugin.py b/plugins/modules/database/misc/elasticsearch_plugin.py index 3bf259f584..12aedc182f 100644 --- a/plugins/modules/database/misc/elasticsearch_plugin.py +++ b/plugins/modules/database/misc/elasticsearch_plugin.py @@ -109,7 +109,7 @@ EXAMPLES = ''' community.general.elasticsearch_plugin: name: ingest-geoip state: present - force: yes + force: true ''' import os diff --git a/plugins/modules/database/misc/odbc.py b/plugins/modules/database/misc/odbc.py index e220543d6f..3b6e8ad226 100644 --- a/plugins/modules/database/misc/odbc.py +++ b/plugins/modules/database/misc/odbc.py @@ -20,12 +20,12 @@ options: dsn: description: - The connection string passed into ODBC. - required: yes + required: true type: str query: description: - The SQL query to perform. - required: yes + required: true type: str params: description: @@ -38,7 +38,7 @@ options: - Some databases allow a commit after a select whereas others raise an exception. - Default is C(true) to support legacy module behavior. type: bool - default: yes + default: true version_added: 1.3.0 requirements: - "python >= 2.6" @@ -58,7 +58,7 @@ EXAMPLES = ''' params: - "value1" commit: false - changed_when: no + changed_when: false ''' RETURN = ''' diff --git a/plugins/modules/database/misc/riak.py b/plugins/modules/database/misc/riak.py index d8679bef2f..38f1c33c78 100644 --- a/plugins/modules/database/misc/riak.py +++ b/plugins/modules/database/misc/riak.py @@ -57,10 +57,10 @@ options: type: str validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true ''' EXAMPLES = ''' @@ -71,7 +71,7 @@ EXAMPLES = ''' - name: Wait for handoffs to finish. Use with async and poll. community.general.riak: - wait_for_handoffs: yes + wait_for_handoffs: true - name: Wait for riak_kv service to startup community.general.riak: diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/database/mssql/mssql_db.py index ad66fc921c..7e64dcc2cc 100644 --- a/plugins/modules/database/mssql/mssql_db.py +++ b/plugins/modules/database/mssql/mssql_db.py @@ -57,7 +57,7 @@ options: - Automatically commit the change only if the import succeed. Sometimes it is necessary to use autocommit=true, since some content can't be changed within a transaction. type: bool - default: 'no' + default: false notes: - Requires the pymssql Python package on the remote host. For Ubuntu, this is as easy as pip install pymssql (See M(ansible.builtin.pip).) diff --git a/plugins/modules/files/archive.py b/plugins/modules/files/archive.py index c1086d9e9d..9d82017b3c 100644 --- a/plugins/modules/files/archive.py +++ b/plugins/modules/files/archive.py @@ -64,7 +64,7 @@ options: description: - Remove any added source files and trees after adding to archive. type: bool - default: no + default: false notes: - Requires tarfile, zipfile, gzip and bzip2 packages on target host. - Requires lzma or backports.lzma if using xz format. @@ -84,7 +84,7 @@ EXAMPLES = r''' - name: Compress regular file /path/to/foo into /path/to/foo.gz and remove it community.general.archive: path: /path/to/foo - remove: yes + remove: true - name: Create a zip archive of /path/to/foo community.general.archive: diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/files/ini_file.py index f3040632c0..1ad82a5180 100644 --- a/plugins/modules/files/ini_file.py +++ b/plugins/modules/files/ini_file.py @@ -65,44 +65,44 @@ options: - Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. type: bool - default: no + default: false state: description: - - If set to C(absent) and I(exclusive) set to C(yes) all matching I(option) lines are removed. - - If set to C(absent) and I(exclusive) set to C(no) the specified C(option=value) lines are removed, + - If set to C(absent) and I(exclusive) set to C(true) all matching I(option) lines are removed. + - If set to C(absent) and I(exclusive) set to C(false) the specified C(option=value) lines are removed, but the other I(option)s with the same name are not touched. - - If set to C(present) and I(exclusive) set to C(no) the specified C(option=values) lines are added, + - If set to C(present) and I(exclusive) set to C(false) the specified C(option=values) lines are added, but the other I(option)s with the same name are not touched. - - If set to C(present) and I(exclusive) set to C(yes) all given C(option=values) lines will be + - If set to C(present) and I(exclusive) set to C(true) all given C(option=values) lines will be added and the other I(option)s with the same name are removed. type: str choices: [ absent, present ] default: present exclusive: description: - - If set to C(yes) (default), all matching I(option) lines are removed when I(state=absent), + - If set to C(true) (default), all matching I(option) lines are removed when I(state=absent), or replaced when I(state=present). - - If set to C(no), only the specified I(value(s)) are added when I(state=present), + - If set to C(false), only the specified I(value(s)) are added when I(state=present), or removed when I(state=absent), and existing ones are not modified. type: bool - default: yes + default: true version_added: 3.6.0 no_extra_spaces: description: - Do not insert spaces before and after '=' symbol. type: bool - default: no + default: false create: description: - - If set to C(no), the module will fail if the file does not already exist. + - If set to C(false), the module will fail if the file does not already exist. - By default it will create the file if it is missing. type: bool - default: yes + default: true allow_no_value: description: - Allow option without value and without '=' symbol. type: bool - default: no + default: false notes: - While it is possible to add an I(option) without specifying a I(value), this makes no sense. - As of Ansible 2.3, the I(dest) option has been changed to I(path) as default, but I(dest) still works as well. @@ -121,7 +121,7 @@ EXAMPLES = r''' option: fav value: lemonade mode: '0600' - backup: yes + backup: true - name: Ensure "temperature=cold is in section "[drinks]" in specified file community.general.ini_file: @@ -129,7 +129,7 @@ EXAMPLES = r''' section: drinks option: temperature value: cold - backup: yes + backup: true - name: Add "beverage=lemon juice" is in section "[drinks]" in specified file community.general.ini_file: @@ -139,7 +139,7 @@ EXAMPLES = r''' value: lemon juice mode: '0600' state: present - exclusive: no + exclusive: false - name: Ensure multiple values "beverage=coke" and "beverage=pepsi" are in section "[drinks]" in specified file community.general.ini_file: diff --git a/plugins/modules/files/iso_create.py b/plugins/modules/files/iso_create.py index 275b62a66b..1340ab9ce4 100644 --- a/plugins/modules/files/iso_create.py +++ b/plugins/modules/files/iso_create.py @@ -31,14 +31,14 @@ options: underscores (_). File names are limited to 31 characters, directory nesting is limited to 8 levels, and path names are limited to 255 characters.' type: list - required: yes + required: true elements: path dest_iso: description: - The absolute path with file name of the new generated ISO file on local machine. - Will create intermediate folders when they does not exist. type: path - required: yes + required: true interchange_level: description: - The ISO9660 interchange level to use, it dictates the rules on the names of files. diff --git a/plugins/modules/files/iso_extract.py b/plugins/modules/files/iso_extract.py index 904997a752..fb88f09882 100644 --- a/plugins/modules/files/iso_extract.py +++ b/plugins/modules/files/iso_extract.py @@ -35,26 +35,26 @@ options: description: - The ISO image to extract files from. type: path - required: yes + required: true aliases: [ path, src ] dest: description: - The destination directory to extract files to. type: path - required: yes + required: true files: description: - A list of files to extract from the image. - Extracting directories does not work. type: list elements: str - required: yes + required: true force: description: - - If C(yes), which will replace the remote file when contents are different than the source. - - If C(no), the file will only be extracted and copied if the destination does not already exist. + - If C(true), which will replace the remote file when contents are different than the source. + - If C(false), the file will only be extracted and copied if the destination does not already exist. type: bool - default: yes + default: true executable: description: - The path to the C(7z) executable to use for extracting files from the ISO. @@ -62,7 +62,7 @@ options: type: path notes: - Only the file checksum (content) is taken into account when extracting files - from the ISO image. If C(force=no), only checks the presence of the file. + from the ISO image. If C(force=false), only checks the presence of the file. - In Ansible 2.3 this module was using C(mount) and C(umount) commands only, requiring root access. This is no longer needed with the introduction of 7zip for extraction. diff --git a/plugins/modules/files/read_csv.py b/plugins/modules/files/read_csv.py index c6b8b9fe90..38c91ded07 100644 --- a/plugins/modules/files/read_csv.py +++ b/plugins/modules/files/read_csv.py @@ -21,7 +21,7 @@ options: description: - The CSV filename to read data from. type: path - required: yes + required: true aliases: [ filename ] key: description: @@ -45,7 +45,7 @@ options: description: - Whether the C(key) used is expected to be unique. type: bool - default: yes + default: true delimiter: description: - A one-character string used to separate fields. diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index d5a1fbfb78..1f8f50c4a4 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -81,18 +81,18 @@ options: - Search for a given C(xpath) and provide the count of any matches. - This parameter requires C(xpath) to be set. type: bool - default: no + default: false print_match: description: - Search for a given C(xpath) and print out any matches. - This parameter requires C(xpath) to be set. type: bool - default: no + default: false pretty_print: description: - Pretty print XML output. type: bool - default: no + default: false content: description: - Search for a given C(xpath) and get content. @@ -110,13 +110,13 @@ options: - Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. type: bool - default: no + default: false strip_cdata_tags: description: - Remove CDATA tags surrounding text values. - Note that this might break your XML file if text values contain characters that could be interpreted as XML. type: bool - default: no + default: false insertbefore: description: - Add additional child-element(s) before the first selected element for a given C(xpath). @@ -125,7 +125,7 @@ options: or a hash where the key is an element name and the value is the element value. - This parameter requires C(xpath) to be set. type: bool - default: no + default: false insertafter: description: - Add additional child-element(s) after the last selected element for a given C(xpath). @@ -134,7 +134,7 @@ options: or a hash where the key is an element name and the value is the element value. - This parameter requires C(xpath) to be set. type: bool - default: no + default: false requirements: - lxml >= 2.3.0 notes: @@ -193,7 +193,7 @@ EXAMPLES = r''' community.general.xml: path: /foo/bar.xml xpath: /business/beers/beer - count: yes + count: true register: hits - ansible.builtin.debug: @@ -219,7 +219,7 @@ EXAMPLES = r''' community.general.xml: path: /foo/bar.xml xpath: '/business/beers/beer[text()="Rochefort 10"]' - insertbefore: yes + insertbefore: true add_children: - beer: Old Rasputin - beer: Old Motor Oil @@ -330,7 +330,7 @@ actions: backup_file: description: The name of the backup file that was created type: str - returned: when backup=yes + returned: when I(backup=true) sample: /path/to/file.xml.1942.2017-08-24@14:16:01~ count: description: The count of xpath matches. diff --git a/plugins/modules/identity/ipa/ipa_group.py b/plugins/modules/identity/ipa/ipa_group.py index 9919a601f4..fa3c610d90 100644 --- a/plugins/modules/identity/ipa/ipa_group.py +++ b/plugins/modules/identity/ipa/ipa_group.py @@ -17,9 +17,9 @@ description: options: append: description: - - If C(yes), add the listed I(user) and I(group) to the group members. - - If C(no), only the listed I(user) and I(group) will be group members, removing any other members. - default: no + - If C(true), add the listed I(user) and I(group) to the group members. + - If C(false), only the listed I(user) and I(group) will be group members, removing any other members. + default: false type: bool version_added: 4.0.0 cn: @@ -45,9 +45,9 @@ options: group: description: - List of group names assigned to this group. - - If I(append=no) and an empty list is passed all groups will be removed from this group. + - If I(append=false) and an empty list is passed all groups will be removed from this group. - Groups that are already assigned but not passed will be removed. - - If I(append=yes) the listed groups will be assigned without removing other groups. + - If I(append=true) the listed groups will be assigned without removing other groups. - If option is omitted assigned groups will not be checked or changed. type: list elements: str @@ -58,9 +58,9 @@ options: user: description: - List of user names assigned to this group. - - If I(append=no) and an empty list is passed all users will be removed from this group. + - If I(append=false) and an empty list is passed all users will be removed from this group. - Users that are already assigned but not passed will be removed. - - If I(append=yes) the listed users will be assigned without removing other users. + - If I(append=true) the listed users will be assigned without removing other users. - If option is omitted assigned users will not be checked or changed. type: list elements: str @@ -110,7 +110,7 @@ EXAMPLES = r''' name: developers user: - john - append: yes + append: true state: present ipa_host: ipa.example.com ipa_user: admin diff --git a/plugins/modules/identity/keycloak/keycloak_client.py b/plugins/modules/identity/keycloak/keycloak_client.py index 547f6fd5fa..4fffeb2955 100644 --- a/plugins/modules/identity/keycloak/keycloak_client.py +++ b/plugins/modules/identity/keycloak/keycloak_client.py @@ -620,7 +620,7 @@ EXAMPLES = ''' client_template: test use_template_config: False use_template_scope: false - use_template_mappers: no + use_template_mappers: false always_display_in_console: true registered_nodes: node01.example.com: 1507828202 diff --git a/plugins/modules/identity/keycloak/keycloak_realm_info.py b/plugins/modules/identity/keycloak/keycloak_realm_info.py index 4214ba06be..0956f1b525 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm_info.py +++ b/plugins/modules/identity/keycloak/keycloak_realm_info.py @@ -38,7 +38,7 @@ options: description: - Verify TLS certificates (do not disable this in production). type: bool - default: yes + default: true realm: type: str diff --git a/plugins/modules/remote_management/cobbler/cobbler_sync.py b/plugins/modules/remote_management/cobbler/cobbler_sync.py index fd1f4010ad..5e7082ddf5 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_sync.py +++ b/plugins/modules/remote_management/cobbler/cobbler_sync.py @@ -36,15 +36,15 @@ options: type: str use_ssl: description: - - If C(no), an HTTP connection will be used instead of the default HTTPS connection. + - If C(false), an HTTP connection will be used instead of the default HTTPS connection. type: bool - default: 'yes' + default: true validate_certs: description: - - If C(no), SSL certificates will not be validated. - - This should only set to C(no) when used on personally controlled sites using self-signed certificates. + - If C(false), SSL certificates will not be validated. + - This should only set to C(false) when used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true author: - Dag Wieers (@dagwieers) todo: @@ -60,7 +60,7 @@ EXAMPLES = r''' host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd - run_once: yes + run_once: true delegate_to: localhost ''' diff --git a/plugins/modules/remote_management/cobbler/cobbler_system.py b/plugins/modules/remote_management/cobbler/cobbler_system.py index b824f5f4a4..7b70ccac34 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_system.py +++ b/plugins/modules/remote_management/cobbler/cobbler_system.py @@ -36,15 +36,15 @@ options: type: str use_ssl: description: - - If C(no), an HTTP connection will be used instead of the default HTTPS connection. + - If C(false), an HTTP connection will be used instead of the default HTTPS connection. type: bool - default: 'yes' + default: true validate_certs: description: - - If C(no), SSL certificates will not be validated. - - This should only set to C(no) when used on personally controlled sites using self-signed certificates. + - If C(false), SSL certificates will not be validated. + - This should only set to C(false) when used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true name: description: - The system name to manage. @@ -62,7 +62,7 @@ options: - Sync on changes. - Concurrently syncing Cobbler is bound to fail. type: bool - default: no + default: false state: description: - Whether the system should be present, absent or a query is made. @@ -101,7 +101,7 @@ EXAMPLES = r''' password: ins3965! name: bdsol-aci51-apic1.cisco.com properties: - netboot_enabled: yes + netboot_enabled: true state: present delegate_to: localhost diff --git a/plugins/modules/remote_management/hpilo/hpilo_boot.py b/plugins/modules/remote_management/hpilo/hpilo_boot.py index 483b82554c..f663a7b5f5 100644 --- a/plugins/modules/remote_management/hpilo/hpilo_boot.py +++ b/plugins/modules/remote_management/hpilo/hpilo_boot.py @@ -63,7 +63,7 @@ options: description: - Whether to force a reboot (even when the system is already booted). - As a safeguard, without force, hpilo_boot will refuse to reboot a server that is already running. - default: no + default: false type: bool ssl_version: description: diff --git a/plugins/modules/remote_management/hpilo/hponcfg.py b/plugins/modules/remote_management/hpilo/hponcfg.py index eeecf9a35b..9d2afc0ab1 100644 --- a/plugins/modules/remote_management/hpilo/hponcfg.py +++ b/plugins/modules/remote_management/hpilo/hponcfg.py @@ -36,7 +36,7 @@ options: verbose: description: - Run hponcfg in verbose mode (-v). - default: no + default: false type: bool requirements: - hponcfg tool diff --git a/plugins/modules/remote_management/imc/imc_rest.py b/plugins/modules/remote_management/imc/imc_rest.py index c4ffce3002..4259558053 100644 --- a/plugins/modules/remote_management/imc/imc_rest.py +++ b/plugins/modules/remote_management/imc/imc_rest.py @@ -71,10 +71,10 @@ options: type: int validate_certs: description: - - If C(no), SSL certificates will not be validated. - - This should only set to C(no) used on personally controlled sites using self-signed certificates. + - If C(false), SSL certificates will not be validated. + - This should only set to C(false) used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true notes: - The XML fragments don't need an authentication cookie, this is injected by the module automatically. - The Cisco IMC XML output is being translated to JSON using the Cobra convention. @@ -93,7 +93,7 @@ EXAMPLES = r''' hostname: '{{ imc_hostname }}' username: '{{ imc_username }}' password: '{{ imc_password }}' - validate_certs: no + validate_certs: false content: | @@ -105,7 +105,7 @@ EXAMPLES = r''' hostname: '{{ imc_hostname }}' username: '{{ imc_username }}' password: '{{ imc_password }}' - validate_certs: no + validate_certs: false timeout: 120 content: | @@ -130,7 +130,7 @@ EXAMPLES = r''' hostname: '{{ imc_hostname }}' username: '{{ imc_username }}' password: '{{ imc_password }}' - validate_certs: no + validate_certs: false content: | @@ -148,7 +148,7 @@ EXAMPLES = r''' hostname: '{{ imc_host }}' username: '{{ imc_username }}' password: '{{ imc_password }}' - validate_certs: no + validate_certs: false content: | @@ -160,7 +160,7 @@ EXAMPLES = r''' hostname: '{{ imc_host }}' username: '{{ imc_username }}' password: '{{ imc_password }}' - validate_certs: no + validate_certs: false content: | @@ -172,7 +172,7 @@ EXAMPLES = r''' hostname: '{{ imc_host }}' username: '{{ imc_username }}' password: '{{ imc_password }}' - validate_certs: no + validate_certs: false timeout: 120 content: | diff --git a/plugins/modules/remote_management/ipmi/ipmi_boot.py b/plugins/modules/remote_management/ipmi/ipmi_boot.py index 48f9116181..3cfa60d18e 100644 --- a/plugins/modules/remote_management/ipmi/ipmi_boot.py +++ b/plugins/modules/remote_management/ipmi/ipmi_boot.py @@ -77,14 +77,14 @@ options: - If set, ask that system firmware uses this device beyond next boot. Be aware many systems do not honor this. type: bool - default: 'no' + default: false uefiboot: description: - If set, request UEFI boot explicitly. Strictly speaking, the spec suggests that if not set, the system should BIOS boot and offers no "don't care" option. In practice, this flag not being set does not preclude UEFI boot on any system I've encountered. type: bool - default: 'no' + default: false requirements: - "python >= 2.6" - pyghmi diff --git a/plugins/modules/remote_management/manageiq/manageiq_provider.py b/plugins/modules/remote_management/manageiq/manageiq_provider.py index f33176e15a..50565936f4 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_provider.py +++ b/plugins/modules/remote_management/manageiq/manageiq_provider.py @@ -59,7 +59,7 @@ options: aliases: [ keystone_v3_domain_id ] tenant_mapping_enabled: type: bool - default: 'no' + default: false description: Whether to enable mapping of existing tenants. defaults to False. api_version: type: str @@ -88,7 +88,7 @@ options: validate_certs: description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. type: bool - default: 'yes' + default: true security_protocol: type: str description: How SSL certificates should be used for HTTPS requests. defaults to None. @@ -119,7 +119,7 @@ options: validate_certs: description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. type: bool - default: 'yes' + default: true security_protocol: type: str choices: ['ssl-with-validation','ssl-with-validation-custom-ca','ssl-without-validation','non-ssl'] @@ -179,7 +179,7 @@ options: description: - Whether certificates should be verified for connections. type: bool - default: yes + default: true aliases: [ verify_ssl ] ''' diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/remote_management/stacki/stacki_host.py index 9a13066865..9b46698a02 100644 --- a/plugins/modules/remote_management/stacki/stacki_host.py +++ b/plugins/modules/remote_management/stacki/stacki_host.py @@ -56,7 +56,7 @@ options: description: - Set value to C(true) to force node into install state if it already exists in stacki. type: bool - default: no + default: false state: description: - Set value to the desired state for the specified host. diff --git a/plugins/modules/storage/hpe3par/ss_3par_cpg.py b/plugins/modules/storage/hpe3par/ss_3par_cpg.py index e8a88fc4f4..f692ff3ecb 100644 --- a/plugins/modules/storage/hpe3par/ss_3par_cpg.py +++ b/plugins/modules/storage/hpe3par/ss_3par_cpg.py @@ -85,7 +85,7 @@ options: description: - Specifies whether the certificate needs to be validated while communicating. type: bool - default: no + default: false extends_documentation_fragment: - community.general.hpe3par @@ -108,7 +108,7 @@ EXAMPLES = r''' set_size: 8 high_availability: MAG disk_type: FC - secure: no + secure: false - name: Delete CPG sample_cpg community.general.ss_3par_cpg: @@ -117,7 +117,7 @@ EXAMPLES = r''' storage_system_password: password state: absent cpg_name: sample_cpg - secure: no + secure: false ''' RETURN = r''' diff --git a/plugins/modules/storage/zfs/zfs_delegate_admin.py b/plugins/modules/storage/zfs/zfs_delegate_admin.py index df95d0db3d..36a213a0fe 100644 --- a/plugins/modules/storage/zfs/zfs_delegate_admin.py +++ b/plugins/modules/storage/zfs/zfs_delegate_admin.py @@ -48,7 +48,7 @@ options: description: - Apply permissions to everyone. type: bool - default: no + default: false permissions: description: - The list of permission(s) to delegate (required if C(state) is C(present)). @@ -68,7 +68,7 @@ options: description: - Unallow permissions recursively (ignored when C(state) is C(present)). type: bool - default: no + default: false author: - Nate Coraor (@natefoo) ''' @@ -84,7 +84,7 @@ EXAMPLES = r''' community.general.zfs_delegate_admin: name: rpool/myvol groups: backup - everyone: yes + everyone: true permissions: send - name: Grant `zfs send,receive` to users `foo` and `bar` with local scope only @@ -92,12 +92,12 @@ EXAMPLES = r''' name: rpool/myfs users: foo,bar permissions: send,receive - local: yes + local: true - name: Revoke all permissions from everyone (permissions specifically assigned to users and groups remain) community.general.zfs_delegate_admin: name: rpool/myfs - everyone: yes + everyone: true state: absent ''' diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index 41342472c0..2b11f8a090 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -20,7 +20,7 @@ options: name: description: - ZFS dataset name. - required: yes + required: true aliases: [ "ds", "dataset" ] type: str recurse: @@ -28,13 +28,13 @@ options: - Specifies if properties for any children should be recursively displayed. type: bool - default: 'no' + default: false parsable: description: - Specifies if property values should be displayed in machine friendly format. type: bool - default: 'no' + default: false properties: description: - Specifies which dataset properties should be queried in comma-separated format. @@ -62,7 +62,7 @@ EXAMPLES = ''' - name: Report space usage on ZFS filesystems under data/home community.general.zfs_facts: name: data/home - recurse: yes + recurse: true type: filesystem - ansible.builtin.debug: From 19ce50f6b9a5275e782d7b0ba64f5c5ca199007d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 20:00:39 +0200 Subject: [PATCH 0188/2104] Adjust booleans in misc plugins. (#5161) --- plugins/callback/diy.py | 4 ++-- plugins/inventory/cobbler.py | 10 +++++----- plugins/inventory/gitlab_runners.py | 2 +- plugins/inventory/proxmox.py | 10 +++++----- plugins/inventory/xen_orchestra.py | 6 +++--- plugins/lookup/filetree.py | 2 +- plugins/lookup/passwordstore.py | 10 +++++----- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/plugins/callback/diy.py b/plugins/callback/diy.py index ed194b5cb8..f62bc15440 100644 --- a/plugins/callback/diy.py +++ b/plugins/callback/diy.py @@ -627,7 +627,7 @@ playbook.yml: > --- - name: "Default plugin output: play example" hosts: localhost - gather_facts: no + gather_facts: false tasks: - name: Default plugin output ansible.builtin.debug: @@ -635,7 +635,7 @@ playbook.yml: > - name: Override from play vars hosts: localhost - gather_facts: no + gather_facts: false vars: ansible_connection: local green: "\e[0m\e[38;5;82m" diff --git a/plugins/inventory/cobbler.py b/plugins/inventory/cobbler.py index b3288b27d4..936a409aeb 100644 --- a/plugins/inventory/cobbler.py +++ b/plugins/inventory/cobbler.py @@ -19,7 +19,7 @@ DOCUMENTATION = ''' options: plugin: description: The name of this plugin, it should always be set to C(community.general.cobbler) for this plugin to recognize it as it's own. - required: yes + required: true choices: [ 'cobbler', 'community.general.cobbler' ] url: description: URL to cobbler. @@ -28,18 +28,18 @@ DOCUMENTATION = ''' - name: COBBLER_SERVER user: description: Cobbler authentication user. - required: no + required: false env: - name: COBBLER_USER password: description: Cobbler authentication password - required: no + required: false env: - name: COBBLER_PASSWORD cache_fallback: description: Fallback to cached results if connection to cobbler fails type: boolean - default: no + default: false exclude_profiles: description: - Profiles to exclude from inventory. @@ -70,7 +70,7 @@ DOCUMENTATION = ''' want_facts: description: Toggle, if C(true) the plugin will retrieve host facts from the server type: boolean - default: yes + default: true ''' EXAMPLES = ''' diff --git a/plugins/inventory/gitlab_runners.py b/plugins/inventory/gitlab_runners.py index 8279d8e781..0b7dff079c 100644 --- a/plugins/inventory/gitlab_runners.py +++ b/plugins/inventory/gitlab_runners.py @@ -55,7 +55,7 @@ DOCUMENTATION = ''' verbose_output: description: Toggle to (not) include all available nodes metadata type: bool - default: yes + default: true ''' EXAMPLES = ''' diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index e13a08a55c..e4474e6e6e 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -26,7 +26,7 @@ DOCUMENTATION = ''' options: plugin: description: The name of this plugin, it should always be set to C(community.general.proxmox) for this plugin to recognize it as it's own. - required: yes + required: true choices: ['community.general.proxmox'] type: str url: @@ -44,7 +44,7 @@ DOCUMENTATION = ''' - Proxmox authentication user. - If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_USER) will be used instead. - Since community.general 4.7.0 you can also use templating to specify the value of the I(user). - required: yes + required: true type: str env: - name: PROXMOX_USER @@ -83,7 +83,7 @@ DOCUMENTATION = ''' validate_certs: description: Verify SSL certificate if using HTTPS. type: boolean - default: yes + default: true group_prefix: description: Prefix to apply to Proxmox groups. default: proxmox_ @@ -98,14 +98,14 @@ DOCUMENTATION = ''' - When I(want_facts) is set to C(true) more details about QEMU VM status are possible, besides the running and stopped states. Currently if the VM is running and it is suspended, the status will be running and the machine will be in C(running) group, but its actual state will be paused. See I(qemu_extended_statuses) for how to retrieve the real status. - default: no + default: false type: bool qemu_extended_statuses: description: - Requires I(want_facts) to be set to C(true) to function. This will allow you to differentiate betweend C(paused) and C(prelaunch) statuses of the QEMU VMs. - This introduces multiple groups [prefixed with I(group_prefix)] C(prelaunch) and C(paused). - default: no + default: false type: bool version_added: 5.1.0 want_proxmox_nodes_ansible_host: diff --git a/plugins/inventory/xen_orchestra.py b/plugins/inventory/xen_orchestra.py index 0b064b14db..5a466a6ab0 100644 --- a/plugins/inventory/xen_orchestra.py +++ b/plugins/inventory/xen_orchestra.py @@ -24,7 +24,7 @@ DOCUMENTATION = ''' options: plugin: description: The name of this plugin, it should always be set to C(community.general.xen_orchestra) for this plugin to recognize it as its own. - required: yes + required: true choices: ['community.general.xen_orchestra'] type: str api_host: @@ -38,7 +38,7 @@ DOCUMENTATION = ''' description: - Xen Orchestra user. - If the value is not specified in the inventory configuration, the value of environment variable C(ANSIBLE_XO_USER) will be used instead. - required: yes + required: true type: str env: - name: ANSIBLE_XO_USER @@ -46,7 +46,7 @@ DOCUMENTATION = ''' description: - Xen Orchestra password. - If the value is not specified in the inventory configuration, the value of environment variable C(ANSIBLE_XO_PASSWORD) will be used instead. - required: yes + required: true type: str env: - name: ANSIBLE_XO_PASSWORD diff --git a/plugins/lookup/filetree.py b/plugins/lookup/filetree.py index 2979257640..024b031a1d 100644 --- a/plugins/lookup/filetree.py +++ b/plugins/lookup/filetree.py @@ -46,7 +46,7 @@ EXAMPLES = r""" dest: /web/{{ item.path }} state: link follow: false # avoid corrupting target files if the link already exists - force: yes + force: true mode: '{{ item.mode }}' with_community.general.filetree: web/ when: item.state == 'link' diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 6330671f58..7cdc72de23 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -41,7 +41,7 @@ DOCUMENTATION = ''' overwrite: description: Overwrite the password if it does already exist. type: bool - default: 'no' + default: false umask: description: - Sets the umask for the created .gpg files. The first octed must be greater than 3 (user readable). @@ -52,7 +52,7 @@ DOCUMENTATION = ''' returnall: description: Return all the content of the password, not only the first line. type: bool - default: 'no' + default: false subkey: description: Return a specific subkey of the password. When set to C(password), always returns the first line. default: password @@ -63,13 +63,13 @@ DOCUMENTATION = ''' type: integer default: 16 backup: - description: Used with C(overwrite=yes). Backup the previous password in a subkey. + description: Used with C(overwrite=true). Backup the previous password in a subkey. type: bool - default: 'no' + default: false nosymbols: description: use alphanumeric characters. type: bool - default: 'no' + default: false missing: description: - List of preference about what to do if the password file is missing. From 3a08903e1cf7672ac1f1e702fd4ccdd9535b3171 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 20:16:25 +0200 Subject: [PATCH 0189/2104] Adjust booleans in cloud modules. (#5155) --- plugins/modules/cloud/atomic/atomic_image.py | 2 +- .../cloud/centurylink/clc_modify_server.py | 2 +- .../modules/cloud/centurylink/clc_publicip.py | 2 +- .../modules/cloud/centurylink/clc_server.py | 8 ++-- .../cloud/dimensiondata/dimensiondata_vlan.py | 8 ++-- .../cloud/heroku/heroku_collaborator.py | 2 +- plugins/modules/cloud/linode/linode.py | 12 ++--- plugins/modules/cloud/lxc/lxc_container.py | 6 +-- plugins/modules/cloud/misc/proxmox.py | 10 ++--- plugins/modules/cloud/misc/proxmox_kvm.py | 32 +++++++------- plugins/modules/cloud/misc/proxmox_snap.py | 8 ++-- .../modules/cloud/misc/proxmox_template.py | 4 +- plugins/modules/cloud/misc/rhevm.py | 8 ++-- plugins/modules/cloud/misc/serverless.py | 6 +-- .../oneandone/oneandone_firewall_policy.py | 2 +- .../oneandone/oneandone_load_balancer.py | 2 +- .../oneandone/oneandone_monitoring_policy.py | 2 +- .../oneandone/oneandone_private_network.py | 2 +- .../cloud/oneandone/oneandone_public_ip.py | 2 +- .../cloud/oneandone/oneandone_server.py | 6 +-- plugins/modules/cloud/opennebula/one_image.py | 4 +- .../modules/cloud/opennebula/one_service.py | 14 +++--- plugins/modules/cloud/opennebula/one_vm.py | 8 ++-- .../cloud/profitbricks/profitbricks.py | 8 ++-- .../profitbricks/profitbricks_datacenter.py | 2 +- .../cloud/profitbricks/profitbricks_nic.py | 2 +- .../cloud/profitbricks/profitbricks_volume.py | 6 +-- .../profitbricks_volume_attachments.py | 2 +- plugins/modules/cloud/rackspace/rax.py | 22 +++++----- plugins/modules/cloud/rackspace/rax_cbs.py | 4 +- .../cloud/rackspace/rax_cbs_attachments.py | 4 +- plugins/modules/cloud/rackspace/rax_cdb.py | 6 +-- .../cloud/rackspace/rax_cdb_database.py | 4 +- .../modules/cloud/rackspace/rax_cdb_user.py | 6 +-- plugins/modules/cloud/rackspace/rax_clb.py | 6 +-- .../modules/cloud/rackspace/rax_clb_nodes.py | 8 ++-- plugins/modules/cloud/rackspace/rax_files.py | 12 ++--- .../cloud/rackspace/rax_files_objects.py | 6 +-- .../modules/cloud/rackspace/rax_mon_check.py | 2 +- .../modules/cloud/rackspace/rax_network.py | 2 +- .../cloud/rackspace/rax_scaling_group.py | 4 +- .../cloud/scaleway/scaleway_compute.py | 2 +- plugins/modules/cloud/scaleway/scaleway_lb.py | 2 +- plugins/modules/cloud/smartos/nictagadm.py | 4 +- plugins/modules/cloud/smartos/vmadm.py | 4 +- plugins/modules/cloud/softlayer/sl_vm.py | 44 +++++++++---------- plugins/modules/cloud/univention/udm_user.py | 4 +- .../cloud/webfaction/webfaction_app.py | 4 +- .../cloud/webfaction/webfaction_site.py | 4 +- .../cloud/xenserver/xenserver_guest.py | 24 +++++----- .../xenserver/xenserver_guest_powerstate.py | 4 +- 51 files changed, 177 insertions(+), 177 deletions(-) diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/cloud/atomic/atomic_image.py index f6ea19f90f..4016387c64 100644 --- a/plugins/modules/cloud/atomic/atomic_image.py +++ b/plugins/modules/cloud/atomic/atomic_image.py @@ -44,7 +44,7 @@ options: description: - Start or Stop the container. type: bool - default: 'yes' + default: true ''' EXAMPLES = r''' diff --git a/plugins/modules/cloud/centurylink/clc_modify_server.py b/plugins/modules/cloud/centurylink/clc_modify_server.py index 0567076d38..1c133dbc6f 100644 --- a/plugins/modules/cloud/centurylink/clc_modify_server.py +++ b/plugins/modules/cloud/centurylink/clc_modify_server.py @@ -59,7 +59,7 @@ options: description: - Whether to wait for the provisioning tasks to finish before returning. type: bool - default: 'yes' + default: true requirements: - python = 2.7 - requests >= 2.5.0 diff --git a/plugins/modules/cloud/centurylink/clc_publicip.py b/plugins/modules/cloud/centurylink/clc_publicip.py index 7184ca10c3..7fc4b7468b 100644 --- a/plugins/modules/cloud/centurylink/clc_publicip.py +++ b/plugins/modules/cloud/centurylink/clc_publicip.py @@ -43,7 +43,7 @@ options: description: - Whether to wait for the tasks to finish before returning. type: bool - default: 'yes' + default: true requirements: - python = 2.7 - requests >= 2.5.0 diff --git a/plugins/modules/cloud/centurylink/clc_server.py b/plugins/modules/cloud/centurylink/clc_server.py index f7329894c0..062c5ea411 100644 --- a/plugins/modules/cloud/centurylink/clc_server.py +++ b/plugins/modules/cloud/centurylink/clc_server.py @@ -25,7 +25,7 @@ options: description: - Whether to add a public ip to the server type: bool - default: 'no' + default: false alias: description: - The account alias to provision the servers under. @@ -96,8 +96,8 @@ options: description: - Whether to create the server as 'Managed' or not. type: bool - default: 'no' - required: False + default: false + required: false memory: description: - Memory in GB. @@ -194,7 +194,7 @@ options: description: - Whether to wait for the provisioning tasks to finish before returning. type: bool - default: 'yes' + default: true requirements: - python = 2.7 - requests >= 2.5.0 diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py index c7cacdccf5..b06566b8e6 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py @@ -58,7 +58,7 @@ options: - If C(False), the module will fail under these conditions. - This is intended to prevent accidental expansion of a VLAN's network (since this operation is not reversible). type: bool - default: 'no' + default: false ''' EXAMPLES = ''' @@ -72,7 +72,7 @@ EXAMPLES = ''' private_ipv4_base_address: 192.168.23.0 private_ipv4_prefix_size: 24 state: present - wait: yes + wait: true - name: Read / get VLAN details community.general.dimensiondata_vlan: @@ -81,7 +81,7 @@ EXAMPLES = ''' network_domain: test_network name: my_vlan1 state: readonly - wait: yes + wait: true - name: Delete a VLAN community.general.dimensiondata_vlan: @@ -90,7 +90,7 @@ EXAMPLES = ''' network_domain: test_network name: my_vlan_1 state: absent - wait: yes + wait: true ''' RETURN = ''' diff --git a/plugins/modules/cloud/heroku/heroku_collaborator.py b/plugins/modules/cloud/heroku/heroku_collaborator.py index 67619cc833..e29439ca2f 100644 --- a/plugins/modules/cloud/heroku/heroku_collaborator.py +++ b/plugins/modules/cloud/heroku/heroku_collaborator.py @@ -36,7 +36,7 @@ options: description: - Suppress email invitation when creating collaborator type: bool - default: "no" + default: false user: type: str description: diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index 40ec1e84d9..8de8c07f69 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -26,7 +26,7 @@ options: - Linode API key. - C(LINODE_API_KEY) env variable can be used instead. type: str - required: yes + required: true name: description: - Name to give the instance (alphanumeric, dashes, underscore). @@ -185,10 +185,10 @@ EXAMPLES = ''' datacenter: 2 distribution: 99 password: 'superSecureRootPassword' - private_ip: yes + private_ip: true ssh_pub_key: 'ssh-rsa qwerty' swap: 768 - wait: yes + wait: true wait_timeout: 600 state: present delegate_to: localhost @@ -203,10 +203,10 @@ EXAMPLES = ''' distribution: 99 kernel_id: 138 password: 'superSecureRootPassword' - private_ip: yes + private_ip: true ssh_pub_key: 'ssh-rsa qwerty' swap: 768 - wait: yes + wait: true wait_timeout: 600 state: present alert_bwquota_enabled: True @@ -239,7 +239,7 @@ EXAMPLES = ''' password: 'superSecureRootPassword' ssh_pub_key: 'ssh-rsa qwerty' swap: 768 - wait: yes + wait: true wait_timeout: 600 state: present delegate_to: localhost diff --git a/plugins/modules/cloud/lxc/lxc_container.py b/plugins/modules/cloud/lxc/lxc_container.py index 656fe9f524..7c6d01fb2f 100644 --- a/plugins/modules/cloud/lxc/lxc_container.py +++ b/plugins/modules/cloud/lxc/lxc_container.py @@ -91,7 +91,7 @@ options: description: - Enable a container log for host actions to the container. type: bool - default: 'no' + default: false container_log_level: choices: - Info @@ -119,13 +119,13 @@ options: - This is not supported by all container storage backends. - Enabling this may fail if the backing store does not support snapshots. type: bool - default: 'no' + default: false archive: description: - Create an archive of a container. - This will create a tarball of the running container. type: bool - default: 'no' + default: false archive_path: description: - Path the save the archived container. diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index dd7a0133e7..63e31d7a43 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -86,7 +86,7 @@ options: onboot: description: - specifies whether a VM will be started during system bootup - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(false). type: bool storage: description: @@ -118,7 +118,7 @@ options: - with C(state=present) force option allow to overwrite existing container - with states C(stopped) , C(restarted) allow to force stop instance type: bool - default: 'no' + default: false purge: description: - Remove container from all related configurations. @@ -142,7 +142,7 @@ options: description: - Indicate if the container should be unprivileged type: bool - default: 'no' + default: false description: description: - Specify the description for the container. Only used on the configuration web interface. @@ -239,7 +239,7 @@ EXAMPLES = r''' password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' - force: yes + force: true - name: Create new container with minimal options use environment PROXMOX_PASSWORD variable(you should export it before) community.general.proxmox: @@ -369,7 +369,7 @@ EXAMPLES = r''' api_user: root@pam api_password: 1q2w3e api_host: node1 - force: yes + force: true state: stopped - name: Restart container(stopped or mounted container you can't restart) diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 1e9c840493..0f0d6df11d 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -20,7 +20,7 @@ options: acpi: description: - Specify if ACPI should be enabled/disabled. - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(yes). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(true). type: bool agent: description: @@ -38,7 +38,7 @@ options: autostart: description: - Specify if the VM should be automatically restarted after crash (currently ignored in PVE API). - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(false). type: bool balloon: description: @@ -160,7 +160,7 @@ options: description: - Allow to force stop VM. - Can be used with states C(stopped), C(restarted) and C(absent). - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(false). type: bool format: description: @@ -184,7 +184,7 @@ options: - For VM templates, we try to create a linked clone by default. - Used only with clone type: bool - default: 'yes' + default: true hostpci: description: - Specify a hash/dictionary of map host pci devices into guest. C(hostpci='{"key":"value", "key":"value"}'). @@ -238,7 +238,7 @@ options: kvm: description: - Enable/disable KVM hardware virtualization. - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(yes). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(true). type: bool localtime: description: @@ -314,7 +314,7 @@ options: onboot: description: - Specifies whether a VM will be started during system bootup. - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(yes). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(true). type: bool ostype: description: @@ -335,7 +335,7 @@ options: type: bool reboot: description: - - Allow reboot. If set to C(yes), the VM exit on reboot. + - Allow reboot. If set to C(true), the VM exit on reboot. type: bool revert: description: @@ -437,7 +437,7 @@ options: tablet: description: - Enables/disables the USB tablet device. - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(false). type: bool tags: description: @@ -459,7 +459,7 @@ options: template: description: - Enables/disables the template. - - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no). + - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(false). type: bool timeout: description: @@ -468,12 +468,12 @@ options: default: 30 update: description: - - If C(yes), the VM will be updated with new value. + - If C(true), the VM will be updated with new value. - Cause of the operations of the API and security reasons, I have disabled the update of the following parameters - C(net, virtio, ide, sata, scsi). Per example updating C(net) update the MAC address and C(virtio) create always new disk... - Update of C(pool) is disabled. It needs an additional API endpoint not covered by this module. type: bool - default: 'no' + default: false vcpus: description: - Sets number of hotplugged vcpus. @@ -625,7 +625,7 @@ EXAMPLES = ''' name: zavala node: sabrewulf storage: VMs - full: no + full: false format: unspecified timeout: 500 @@ -659,7 +659,7 @@ EXAMPLES = ''' api_host: helldorado name: spynal node: sabrewulf - protection: yes + protection: true - name: Create new VM using cloud-init with a username and password community.general.proxmox_kvm: @@ -724,7 +724,7 @@ EXAMPLES = ''' name: spynal node: sabrewulf state: stopped - force: yes + force: true - name: Restart VM community.general.proxmox_kvm: @@ -762,7 +762,7 @@ EXAMPLES = ''' node: sabrewulf cores: 8 memory: 16384 - update: yes + update: true - name: Delete QEMU parameters community.general.proxmox_kvm: @@ -1394,7 +1394,7 @@ def main(): if module.params['force']: proxmox.stop_vm(vm, True) else: - module.exit_json(changed=False, vmid=vmid, msg="VM %s is running. Stop it before deletion or use force=yes." % vmid) + module.exit_json(changed=False, vmid=vmid, msg="VM %s is running. Stop it before deletion or use force=true." % vmid) taskid = proxmox_node.qemu.delete(vmid) if not proxmox.wait_for_task(vm['node'], taskid): module.fail_json(msg='Reached timeout while waiting for removing VM. Last line in task before timeout: %s' % diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/cloud/misc/proxmox_snap.py index d75f448bd0..b90b51b34c 100644 --- a/plugins/modules/cloud/misc/proxmox_snap.py +++ b/plugins/modules/cloud/misc/proxmox_snap.py @@ -36,12 +36,12 @@ options: force: description: - For removal from config file, even if removing disk snapshot fails. - default: no + default: false type: bool vmstate: description: - Snapshot includes RAM. - default: no + default: false type: bool description: description: @@ -175,8 +175,8 @@ def main(): state=dict(default='present', choices=['present', 'absent', 'rollback']), description=dict(type='str'), snapname=dict(type='str', default='ansible_snap'), - force=dict(type='bool', default='no'), - vmstate=dict(type='bool', default='no'), + force=dict(type='bool', default=False), + vmstate=dict(type='bool', default=False), ) module_args.update(snap_args) diff --git a/plugins/modules/cloud/misc/proxmox_template.py b/plugins/modules/cloud/misc/proxmox_template.py index f916ea917d..051a70f564 100644 --- a/plugins/modules/cloud/misc/proxmox_template.py +++ b/plugins/modules/cloud/misc/proxmox_template.py @@ -52,7 +52,7 @@ options: description: - can be used only with C(state=present), exists template will be overwritten type: bool - default: 'no' + default: false state: description: - Indicate desired state of the template @@ -92,7 +92,7 @@ EXAMPLES = ''' storage: local content_type: vztmpl src: ~/ubuntu-14.04-x86_64.tar.gz - force: yes + force: true - name: Delete template with minimal options community.general.proxmox_template: diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index fbc332c2b1..2542511bea 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -45,7 +45,7 @@ options: description: - A boolean switch to make a secure or insecure connection to the server. type: bool - default: no + default: false name: description: - The name of the VM. @@ -108,7 +108,7 @@ options: description: - To make your VM High Available. type: bool - default: yes + default: true disks: description: - This option uses complex arguments and is a list of disks with the options name, size and domain. @@ -130,7 +130,7 @@ options: description: - This option sets the delete protection checkbox. type: bool - default: yes + default: true cd_drive: description: - The CD you wish to have mounted on the VM when I(state = 'CD'). @@ -309,7 +309,7 @@ EXAMPLES = r''' network: rhevm ip: 172.31.222.200 netmask: 255.255.255.0 - management: yes + management: true - name: bond0.36 network: vlan36 ip: 10.2.36.200 diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index 133539ee32..2819adae59 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -46,17 +46,17 @@ options: - When this option is C(false) all the functions will be built, but no stack update will be run to send them out. - This is mostly useful for generating artifacts to be stored/deployed elsewhere. type: bool - default: yes + default: true force: description: - Whether or not to force full deployment, equivalent to serverless C(--force) option. type: bool - default: no + default: false verbose: description: - Shows all stack events during deployment, and display any Stack Output. type: bool - default: no + default: false notes: - Currently, the C(serverless) command must be in the path of the node executing the task. In the future this may be a flag. diff --git a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py index e891954a61..9d9f042f2b 100644 --- a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py @@ -83,7 +83,7 @@ options: description: - wait for the instance to be in state 'running' before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py index d5147bc9d7..3407e264ad 100644 --- a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py +++ b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py @@ -121,7 +121,7 @@ options: description: - wait for the instance to be in state 'running' before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py index a283d9c49b..cd9ee40ca2 100644 --- a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py @@ -174,7 +174,7 @@ options: description: - wait for the instance to be in state 'running' before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/oneandone/oneandone_private_network.py b/plugins/modules/cloud/oneandone/oneandone_private_network.py index 9a80f0075c..36633716f7 100644 --- a/plugins/modules/cloud/oneandone/oneandone_private_network.py +++ b/plugins/modules/cloud/oneandone/oneandone_private_network.py @@ -71,7 +71,7 @@ options: description: - wait for the instance to be in state 'running' before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/oneandone/oneandone_public_ip.py b/plugins/modules/cloud/oneandone/oneandone_public_ip.py index b46bcae8ba..a5970735ce 100644 --- a/plugins/modules/cloud/oneandone/oneandone_public_ip.py +++ b/plugins/modules/cloud/oneandone/oneandone_public_ip.py @@ -59,7 +59,7 @@ options: description: - wait for the instance to be in state 'running' before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/oneandone/oneandone_server.py b/plugins/modules/cloud/oneandone/oneandone_server.py index 8275162d1a..22b4b9dd69 100644 --- a/plugins/modules/cloud/oneandone/oneandone_server.py +++ b/plugins/modules/cloud/oneandone/oneandone_server.py @@ -120,7 +120,7 @@ options: for each individual server to be deleted before moving on with other tasks.) type: bool - default: 'yes' + default: true wait_timeout: description: - how long before wait gives up, in seconds @@ -137,7 +137,7 @@ options: hostnames by appending a count after them or substituting the count where there is a %02d or %03d in the hostname string. type: bool - default: 'yes' + default: true requirements: - "1and1" @@ -173,7 +173,7 @@ EXAMPLES = ''' datacenter: ES appliance: C5A349786169F140BCBC335675014C08 count: 3 - wait: yes + wait: true wait_timeout: 600 wait_interval: 10 ssh_key: SSH_PUBLIC_KEY diff --git a/plugins/modules/cloud/opennebula/one_image.py b/plugins/modules/cloud/opennebula/one_image.py index 693a13f927..04a6b57083 100644 --- a/plugins/modules/cloud/opennebula/one_image.py +++ b/plugins/modules/cloud/opennebula/one_image.py @@ -102,12 +102,12 @@ EXAMPLES = ''' - name: Disable the IMAGE by id community.general.one_image: id: 37 - enabled: no + enabled: false - name: Enable the IMAGE by name community.general.one_image: name: bar-image - enabled: yes + enabled: true - name: Clone the IMAGE by name community.general.one_image: diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index 2985a28a0e..44390c5f3d 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -66,10 +66,10 @@ options: type: str unique: description: - - Setting C(unique=yes) will make sure that there is only one service instance running with a name set with C(service_name) when + - Setting C(unique=true) will make sure that there is only one service instance running with a name set with C(service_name) when - instantiating a service from a template specified with C(template_id)/C(template_name). Check examples below. type: bool - default: no + default: false state: description: - C(present) - instantiate a service from a template specified with C(template_id)/C(template_name). @@ -93,7 +93,7 @@ options: description: - Wait for the instance to reach RUNNING state after DEPLOYING or COOLDOWN state after SCALING type: bool - default: no + default: false wait_timeout: description: - How long before wait gives up, in seconds @@ -116,7 +116,7 @@ options: description: - Force the new cardinality even if it is outside the limits type: bool - default: no + default: false author: - "Milan Ilic (@ilicmilan)" ''' @@ -149,7 +149,7 @@ EXAMPLES = ''' community.general.one_service: template_id: 53 service_name: 'foo' - unique: yes + unique: true - name: Delete a service by ID community.general.one_service: @@ -176,7 +176,7 @@ EXAMPLES = ''' - name: Wait service to become RUNNING community.general.one_service: service_id: 112 - wait: yes + wait: true - name: Change role cardinality community.general.one_service: @@ -189,7 +189,7 @@ EXAMPLES = ''' service_id: 112 role: foo cardinality: 7 - wait: yes + wait: true ''' RETURN = ''' diff --git a/plugins/modules/cloud/opennebula/one_vm.py b/plugins/modules/cloud/opennebula/one_vm.py index e0140f3350..39ae2e0d46 100644 --- a/plugins/modules/cloud/opennebula/one_vm.py +++ b/plugins/modules/cloud/opennebula/one_vm.py @@ -89,7 +89,7 @@ options: hard: description: - Reboot, power-off or terminate instances C(hard) - default: no + default: false type: bool wait: description: @@ -98,7 +98,7 @@ options: - doesn't mean that you will be able to SSH on that machine only that - boot process have started on that instance, see 'wait_for' example for - details. - default: yes + default: true type: bool wait_timeout: description: @@ -202,7 +202,7 @@ options: persistent: description: - Create a private persistent copy of the template plus any image defined in DISK, and instantiate that copy. - default: NO + default: false type: bool version_added: '0.2.0' datastore_id: @@ -251,7 +251,7 @@ EXAMPLES = ''' - name: Deploy a new VM as persistent community.general.one_vm: template_id: 90 - persistent: yes + persistent: true - name: Change VM's permissions to 640 community.general.one_vm: diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index c5feda831b..42e6a1314b 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -20,7 +20,7 @@ options: description: - Whether or not to increment a single number in the name for created virtual machines. type: bool - default: 'yes' + default: true name: description: - The name of the virtual machine. @@ -89,7 +89,7 @@ options: description: - This will assign the machine to the public LAN. If no LAN exists with public Internet access it is created. type: bool - default: 'no' + default: false lan: description: - The ID of the LAN you wish to add the servers to. @@ -107,7 +107,7 @@ options: description: - wait for the instance to be in state 'running' before returning type: bool - default: 'yes' + default: true wait_timeout: description: - how long before wait gives up, in seconds @@ -117,7 +117,7 @@ options: description: - remove the bootVolume of the virtual machine you're destroying. type: bool - default: 'yes' + default: true state: description: - create or terminate instances diff --git a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py index cda5360018..cc3184320d 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py @@ -46,7 +46,7 @@ options: description: - wait for the datacenter to be created before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/profitbricks/profitbricks_nic.py b/plugins/modules/cloud/profitbricks/profitbricks_nic.py index 5a0b0b7c34..facb146b60 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_nic.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_nic.py @@ -48,7 +48,7 @@ options: description: - wait for the operation to complete before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index 40264bc294..a49948b4bf 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -74,7 +74,7 @@ options: auto_increment: description: - Whether or not to increment a single number in the name for created virtual machines. - default: yes + default: true type: bool instance_ids: description: @@ -96,7 +96,7 @@ options: description: - wait for the datacenter to be created before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: @@ -125,7 +125,7 @@ EXAMPLES = ''' datacenter: Tardis One name: vol%02d count: 5 - auto_increment: yes + auto_increment: true wait_timeout: 500 state: present diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py b/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py index ab965677ea..5637aca67f 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py @@ -41,7 +41,7 @@ options: description: - wait for the operation to complete before returning required: false - default: "yes" + default: true type: bool wait_timeout: description: diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index 57329c9821..57397b7dc2 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -22,15 +22,15 @@ options: created servers. Only applicable when used with the I(group) attribute or meta key. type: bool - default: 'yes' + default: true boot_from_volume: description: - Whether or not to boot the instance from a Cloud Block Storage volume. - If C(yes) and I(image) is specified a new volume will be created at + If C(true) and I(image) is specified a new volume will be created at boot time. I(boot_volume_size) is required with I(image) to create a new volume at boot time. type: bool - default: 'no' + default: false boot_volume: type: str description: @@ -47,12 +47,12 @@ options: - Whether the I(boot_volume) or newly created volume from I(image) will be terminated when the server is terminated type: bool - default: 'no' + default: false config_drive: description: - Attach read-only configuration drive to server as label config-2 type: bool - default: 'no' + default: false count: type: int description: @@ -74,12 +74,12 @@ options: exact_count: description: - Explicitly ensure an exact count of instances, used with - state=active/present. If specified as C(yes) and I(count) is less than + state=active/present. If specified as C(true) and I(count) is less than the servers matched, servers will be deleted to match the count. If the number of matched servers is fewer than specified in I(count) additional servers will be added. type: bool - default: 'no' + default: false extra_client_args: type: dict description: @@ -157,7 +157,7 @@ options: description: - wait for the instance to be in state 'running' before returning type: bool - default: 'no' + default: false wait_timeout: type: int description: @@ -191,7 +191,7 @@ EXAMPLES = ''' key_name: my_rackspace_key files: /root/test.txt: /home/localuser/test.txt - wait: yes + wait: true state: present networks: - private @@ -212,9 +212,9 @@ EXAMPLES = ''' state: present count: 10 count_offset: 10 - exact_count: yes + exact_count: true group: test - wait: yes + wait: true register: rax ''' diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index e6b31623d5..cf3e901a9b 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -62,7 +62,7 @@ options: description: - wait for the volume to be in state 'available' before returning type: bool - default: 'no' + default: false wait_timeout: type: int description: @@ -91,7 +91,7 @@ EXAMPLES = ''' volume_type: SSD size: 150 region: DFW - wait: yes + wait: true state: present meta: app: my-cool-app diff --git a/plugins/modules/cloud/rackspace/rax_cbs_attachments.py b/plugins/modules/cloud/rackspace/rax_cbs_attachments.py index 6b18624885..ac85593a26 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs_attachments.py +++ b/plugins/modules/cloud/rackspace/rax_cbs_attachments.py @@ -42,7 +42,7 @@ options: description: - wait for the volume to be in 'in-use'/'available' state before returning type: bool - default: 'no' + default: false wait_timeout: type: int description: @@ -70,7 +70,7 @@ EXAMPLES = ''' server: my-server device: /dev/xvdd region: DFW - wait: yes + wait: true state: present register: my_volume ''' diff --git a/plugins/modules/cloud/rackspace/rax_cdb.py b/plugins/modules/cloud/rackspace/rax_cdb.py index 5cf926b664..3051bcdcb2 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb.py +++ b/plugins/modules/cloud/rackspace/rax_cdb.py @@ -21,7 +21,7 @@ options: type: str description: - Name of the databases server instance - required: yes + required: true flavor: type: int description: @@ -55,7 +55,7 @@ options: description: - wait for the instance to be in state 'running' before returning type: bool - default: 'no' + default: false wait_timeout: type: int description: @@ -82,7 +82,7 @@ EXAMPLES = ''' volume: 2 cdb_type: MySQL cdb_version: 5.6 - wait: yes + wait: true state: present register: rax_db_server ''' diff --git a/plugins/modules/cloud/rackspace/rax_cdb_database.py b/plugins/modules/cloud/rackspace/rax_cdb_database.py index 3e263e6593..5b5ebc6e29 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb_database.py +++ b/plugins/modules/cloud/rackspace/rax_cdb_database.py @@ -18,12 +18,12 @@ options: type: str description: - The databases server UUID - required: yes + required: true name: type: str description: - Name to give to the database - required: yes + required: true character_set: type: str description: diff --git a/plugins/modules/cloud/rackspace/rax_cdb_user.py b/plugins/modules/cloud/rackspace/rax_cdb_user.py index 1150def230..ccc3e677a5 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb_user.py +++ b/plugins/modules/cloud/rackspace/rax_cdb_user.py @@ -19,17 +19,17 @@ options: type: str description: - The databases server UUID - required: yes + required: true db_username: type: str description: - Name of the database user - required: yes + required: true db_password: type: str description: - Database user password - required: yes + required: true databases: type: list elements: str diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/cloud/rackspace/rax_clb.py index ced9539973..fa7f7c7377 100644 --- a/plugins/modules/cloud/rackspace/rax_clb.py +++ b/plugins/modules/cloud/rackspace/rax_clb.py @@ -34,7 +34,7 @@ options: type: str description: - Name to give the load balancer - required: yes + required: true port: type: int description: @@ -94,7 +94,7 @@ options: description: - wait for the balancer to be in state 'running' before returning type: bool - default: 'no' + default: false wait_timeout: type: int description: @@ -125,7 +125,7 @@ EXAMPLES = ''' type: SERVICENET timeout: 30 region: DFW - wait: yes + wait: true state: present meta: app: my-cool-app diff --git a/plugins/modules/cloud/rackspace/rax_clb_nodes.py b/plugins/modules/cloud/rackspace/rax_clb_nodes.py index 07bb081f82..04341f7ceb 100644 --- a/plugins/modules/cloud/rackspace/rax_clb_nodes.py +++ b/plugins/modules/cloud/rackspace/rax_clb_nodes.py @@ -64,7 +64,7 @@ options: - Type of node wait: required: false - default: "no" + default: false type: bool description: - Wait for the load balancer to become active before returning @@ -99,7 +99,7 @@ EXAMPLES = ''' port: 80 condition: enabled type: primary - wait: yes + wait: true credentials: /path/to/credentials - name: Drain connections from a node @@ -108,7 +108,7 @@ EXAMPLES = ''' load_balancer_id: 71 node_id: 410 condition: draining - wait: yes + wait: true credentials: /path/to/credentials - name: Remove a node from the load balancer @@ -117,7 +117,7 @@ EXAMPLES = ''' load_balancer_id: 71 node_id: 410 state: absent - wait: yes + wait: true credentials: /path/to/credentials ''' diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/cloud/rackspace/rax_files.py index 4c1b7ab4ea..6599c88d16 100644 --- a/plugins/modules/cloud/rackspace/rax_files.py +++ b/plugins/modules/cloud/rackspace/rax_files.py @@ -20,7 +20,7 @@ options: - Optionally clear existing metadata when applying metadata to existing containers. Selecting this option is only appropriate when setting type=meta type: bool - default: "no" + default: false container: type: str description: @@ -82,7 +82,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: "Test Cloud Files Containers" hosts: local - gather_facts: no + gather_facts: false tasks: - name: "List all containers" community.general.rax_files: @@ -112,22 +112,22 @@ EXAMPLES = ''' - name: "Make container public" community.general.rax_files: container: mycontainer - public: yes + public: true - name: "Make container public with a 24 hour TTL" community.general.rax_files: container: mycontainer - public: yes + public: true ttl: 86400 - name: "Make container private" community.general.rax_files: container: mycontainer - private: yes + private: true - name: "Test Cloud Files Containers Metadata Storage" hosts: local - gather_facts: no + gather_facts: false tasks: - name: "Get mycontainer2 metadata" community.general.rax_files: diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index dcaacf7946..c287d9bf7e 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -63,7 +63,7 @@ options: from Cloud Files. Setting to false downloads the contents of a container to a single, flat directory type: bool - default: 'yes' + default: true type: type: str description: @@ -153,14 +153,14 @@ EXAMPLES = ''' method: get src: FileThatDoesNotExist.jpg dest: ~/Downloads/testcont - ignore_errors: yes + ignore_errors: true - name: "Attempt to delete remote object that does not exist" community.general.rax_files_objects: container: testcont method: delete dest: FileThatDoesNotExist.jpg - ignore_errors: yes + ignore_errors: true - name: "Test Cloud Files Objects Metadata" hosts: local diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index 68d41a339f..2075b2cea0 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -93,7 +93,7 @@ options: 256 items. disabled: description: - - If "yes", ensure the check is created, but don't actually use it yet. + - If C(true), ensure the check is created, but don't actually use it yet. type: bool default: false metadata: diff --git a/plugins/modules/cloud/rackspace/rax_network.py b/plugins/modules/cloud/rackspace/rax_network.py index db6458d743..604111cc5d 100644 --- a/plugins/modules/cloud/rackspace/rax_network.py +++ b/plugins/modules/cloud/rackspace/rax_network.py @@ -27,7 +27,7 @@ options: type: str description: - Label (name) to give the network - required: yes + required: true cidr: type: str description: diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/cloud/rackspace/rax_scaling_group.py index ad461f53e2..6389f91a26 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_group.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_group.py @@ -19,7 +19,7 @@ options: description: - Attach read-only configuration drive to server as label config-2 type: bool - default: 'no' + default: false cooldown: type: int description: @@ -112,7 +112,7 @@ options: - wait for the scaling group to finish provisioning the minimum amount of servers type: bool - default: 'no' + default: false wait_timeout: type: int description: diff --git a/plugins/modules/cloud/scaleway/scaleway_compute.py b/plugins/modules/cloud/scaleway/scaleway_compute.py index 7c6a01a606..3acdc8bd77 100644 --- a/plugins/modules/cloud/scaleway/scaleway_compute.py +++ b/plugins/modules/cloud/scaleway/scaleway_compute.py @@ -110,7 +110,7 @@ options: description: - Wait for the instance to reach its desired state before returning. type: bool - default: 'no' + default: false wait_timeout: type: int diff --git a/plugins/modules/cloud/scaleway/scaleway_lb.py b/plugins/modules/cloud/scaleway/scaleway_lb.py index e33f339f55..b323064012 100644 --- a/plugins/modules/cloud/scaleway/scaleway_lb.py +++ b/plugins/modules/cloud/scaleway/scaleway_lb.py @@ -73,7 +73,7 @@ options: description: - Wait for the load-balancer to reach its desired state before returning. type: bool - default: 'no' + default: false wait_timeout: type: int diff --git a/plugins/modules/cloud/smartos/nictagadm.py b/plugins/modules/cloud/smartos/nictagadm.py index d52e0c921d..555bb92fb5 100644 --- a/plugins/modules/cloud/smartos/nictagadm.py +++ b/plugins/modules/cloud/smartos/nictagadm.py @@ -32,7 +32,7 @@ options: - Specifies that the nic tag will be attached to a created I(etherstub). - Parameter I(etherstub) is mutually exclusive with both I(mtu), and I(mac). type: bool - default: no + default: false mtu: description: - Specifies the size of the I(mtu) of the desired nic tag. @@ -42,7 +42,7 @@ options: description: - When I(state) is absent set this switch will use the C(-f) parameter and delete the nic tag regardless of existing VMs. type: bool - default: no + default: false state: description: - Create or delete a SmartOS nic tag. diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/cloud/smartos/vmadm.py index 6850474fca..c352de90f7 100644 --- a/plugins/modules/cloud/smartos/vmadm.py +++ b/plugins/modules/cloud/smartos/vmadm.py @@ -358,8 +358,8 @@ EXAMPLES = ''' state: present alias: fw_zone image_uuid: 95f265b8-96b2-11e6-9597-972f3af4b6d5 - firewall_enabled: yes - indestructible_zoneroot: yes + firewall_enabled: true + indestructible_zoneroot: true nics: - nic_tag: admin ip: dhcp diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/cloud/softlayer/sl_vm.py index c1f5fde611..37292cb1c1 100644 --- a/plugins/modules/cloud/softlayer/sl_vm.py +++ b/plugins/modules/cloud/softlayer/sl_vm.py @@ -80,22 +80,22 @@ options: description: - Flag to determine if the instance should be hourly billed. type: bool - default: 'yes' + default: true private: description: - Flag to determine if the instance should be private only. type: bool - default: 'no' + default: false dedicated: description: - Flag to determine if the instance should be deployed in dedicated space. type: bool - default: 'no' + default: false local_disk: description: - Flag to determine if local disk should be used for the new instance. type: bool - default: 'yes' + default: true cpus: description: - Count of cpus to be assigned to new virtual instance. @@ -158,7 +158,7 @@ options: description: - Flag used to wait for active status before returning. type: bool - default: 'yes' + default: true wait_time: description: - Time in seconds before wait returns. @@ -174,7 +174,7 @@ author: EXAMPLES = ''' - name: Build instance hosts: localhost - gather_facts: no + gather_facts: false tasks: - name: Build instance request community.general.sl_vm: @@ -182,19 +182,19 @@ EXAMPLES = ''' domain: anydomain.com datacenter: dal09 tags: ansible-module-test - hourly: yes - private: no - dedicated: no - local_disk: yes + hourly: true + private: false + dedicated: false + local_disk: true cpus: 1 memory: 1024 disks: [25] os_code: UBUNTU_LATEST - wait: no + wait: false - name: Build additional instances hosts: localhost - gather_facts: no + gather_facts: false tasks: - name: Build instances request community.general.sl_vm: @@ -219,10 +219,10 @@ EXAMPLES = ''' tags: - ansible-module-test - ansible-module-test-replicas - hourly: yes - private: no - dedicated: no - local_disk: yes + hourly: true + private: false + dedicated: false + local_disk: true cpus: 1 memory: 1024 disks: @@ -237,10 +237,10 @@ EXAMPLES = ''' tags: - ansible-module-test - ansible-module-test-replicas - hourly: yes - private: no - dedicated: no - local_disk: yes + hourly: true + private: false + dedicated: false + local_disk: true cpus: 1 memory: 1024 disks: @@ -248,11 +248,11 @@ EXAMPLES = ''' - 100 os_code: UBUNTU_LATEST ssh_keys: [] - wait: yes + wait: true - name: Cancel instances hosts: localhost - gather_facts: no + gather_facts: false tasks: - name: Cancel by tag community.general.sl_vm: diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index 090e874189..de7e474d8a 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -149,13 +149,13 @@ options: type: str overridePWHistory: type: bool - default: 'no' + default: false description: - Override password history aliases: [ override_pw_history ] overridePWLength: type: bool - default: 'no' + default: false description: - Override password check aliases: [ override_pw_length ] diff --git a/plugins/modules/cloud/webfaction/webfaction_app.py b/plugins/modules/cloud/webfaction/webfaction_app.py index 8fca90a8de..b2fe7f892d 100644 --- a/plugins/modules/cloud/webfaction/webfaction_app.py +++ b/plugins/modules/cloud/webfaction/webfaction_app.py @@ -55,7 +55,7 @@ options: description: - Whether the app should restart with an C(autostart.cgi) script type: bool - default: 'no' + default: false extra_info: description: @@ -67,7 +67,7 @@ options: description: - IF the port should be opened type: bool - default: 'no' + default: false login_name: description: diff --git a/plugins/modules/cloud/webfaction/webfaction_site.py b/plugins/modules/cloud/webfaction/webfaction_site.py index dd9afc7636..4e6f317e87 100644 --- a/plugins/modules/cloud/webfaction/webfaction_site.py +++ b/plugins/modules/cloud/webfaction/webfaction_site.py @@ -53,7 +53,7 @@ options: description: - Whether or not to use HTTPS type: bool - default: 'no' + default: false site_apps: description: @@ -92,7 +92,7 @@ EXAMPLES = ''' - 'testsite1.my_domain.org' site_apps: - ['testapp1', '/'] - https: no + https: false login_name: "{{webfaction_user}}" login_password: "{{webfaction_passwd}}" ''' diff --git a/plugins/modules/cloud/xenserver/xenserver_guest.py b/plugins/modules/cloud/xenserver/xenserver_guest.py index ed0a989a4c..95b25174cf 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest.py @@ -27,7 +27,7 @@ notes: U(https://raw.githubusercontent.com/xapi-project/xen-api/master/scripts/examples/python/XenAPI/XenAPI.py)' - 'If no scheme is specified in I(hostname), module defaults to C(http://) because C(https://) is problematic in most setups. Make sure you are accessing XenServer host in trusted environment or use C(https://) scheme explicitly.' -- 'To use C(https://) scheme for I(hostname) you have to either import host certificate to your OS certificate store or use I(validate_certs): C(no) +- 'To use C(https://) scheme for I(hostname) you have to either import host certificate to your OS certificate store or use I(validate_certs): C(false) which requires XenAPI library from XenServer 7.2 SDK or newer and Python 2.7.9 or newer.' - 'Network configuration inside a guest OS, by using I(networks.type), I(networks.ip), I(networks.gateway) etc. parameters, is supported on XenServer 7.0 or newer for Windows guests by using official XenServer Guest agent support for network configuration. The module will try to @@ -93,7 +93,7 @@ options: description: - Convert VM to template. type: bool - default: no + default: false folder: description: - Destination folder for VM. @@ -253,21 +253,21 @@ options: description: - VM param name. type: str - required: yes + required: true value: description: - VM param value. type: raw - required: yes + required: true wait_for_ip_address: description: - Wait until XenServer detects an IP address for the VM. If I(state) is set to C(absent), this parameter is ignored. - This requires XenServer Tools to be preinstalled on the VM to work properly. type: bool - default: no + default: false state_change_timeout: description: - - 'By default, module will wait indefinitely for VM to accquire an IP address if I(wait_for_ip_address): C(yes).' + - 'By default, module will wait indefinitely for VM to accquire an IP address if I(wait_for_ip_address): C(true).' - If this parameter is set to positive value, the module will instead wait specified number of seconds for the state change. - In case of timeout, module will generate an error message. type: int @@ -277,13 +277,13 @@ options: - Whether to create a Linked Clone from the template, existing VM or snapshot. If no, will create a full copy. - This is equivalent to C(Use storage-level fast disk clone) option in XenCenter. type: bool - default: no + default: false force: description: - Ignore warnings and complete the actions. - This parameter is useful for removing VM in running state or reconfiguring VM params that require VM to be shut down. type: bool - default: no + default: false extends_documentation_fragment: - community.general.xenserver.documentation @@ -295,7 +295,7 @@ EXAMPLES = r''' hostname: "{{ xenserver_hostname }}" username: "{{ xenserver_username }}" password: "{{ xenserver_password }}" - validate_certs: no + validate_certs: false folder: /testvms name: testvm_2 state: poweredon @@ -313,7 +313,7 @@ EXAMPLES = r''' networks: - name: VM Network mac: aa:bb:dd:aa:00:14 - wait_for_ip_address: yes + wait_for_ip_address: true delegate_to: localhost register: deploy @@ -322,10 +322,10 @@ EXAMPLES = r''' hostname: "{{ xenserver_hostname }}" username: "{{ xenserver_username }}" password: "{{ xenserver_password }}" - validate_certs: no + validate_certs: false folder: /testvms name: testvm_6 - is_template: yes + is_template: true disk: - size_gb: 10 sr: my_sr diff --git a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py index c543b2324d..d2f0a10329 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py @@ -57,10 +57,10 @@ options: - Wait until XenServer detects an IP address for the VM. - This requires XenServer Tools to be preinstalled on the VM to work properly. type: bool - default: no + default: false state_change_timeout: description: - - 'By default, module will wait indefinitely for VM to change state or acquire an IP address if C(wait_for_ip_address: yes).' + - 'By default, module will wait indefinitely for VM to change state or acquire an IP address if C(wait_for_ip_address: true).' - If this parameter is set to positive value, the module will instead wait specified number of seconds for the state change. - In case of timeout, module will generate an error message. type: int From 57e1e2bd8e2c3a37ff0bb679d0cef0e53b232076 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 20:47:06 +0200 Subject: [PATCH 0190/2104] Fix indent. (#5177) --- plugins/modules/packaging/os/xbps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/packaging/os/xbps.py b/plugins/modules/packaging/os/xbps.py index 5c533c135b..aad496238b 100644 --- a/plugins/modules/packaging/os/xbps.py +++ b/plugins/modules/packaging/os/xbps.py @@ -77,8 +77,8 @@ EXAMPLES = ''' - name: Remove packages foo and bar community.general.xbps: name: - - foo - - bar + - foo + - bar state: absent - name: Recursively remove package foo From 766c109d470fdaeaa04e5b16143c4b34904f1511 Mon Sep 17 00:00:00 2001 From: jixj5 <66418293+jixj5@users.noreply.github.com> Date: Thu, 25 Aug 2022 03:36:35 +0800 Subject: [PATCH 0191/2104] Update redfish module for compatibility with VirtualMedia resource location (#5124) * Update redfish module for compatibility with VirtualMedia resource location from Manager to Systems * Add changelogs fragments for PR 5124 * Update some issue according to the suggestions * update changelogs fragment to list new features in the minor_changes catagory Co-authored-by: Tami YY3 Pan --- ...bility-virtualmedia-resource-location.yaml | 2 + plugins/module_utils/redfish_utils.py | 55 ++++++++++++++----- .../redfish/redfish_command.py | 35 +++++++++++- .../remote_management/redfish/redfish_info.py | 19 ++++++- 4 files changed, 93 insertions(+), 18 deletions(-) create mode 100644 changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml diff --git a/changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml b/changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml new file mode 100644 index 0000000000..8aacacaed4 --- /dev/null +++ b/changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml @@ -0,0 +1,2 @@ +minor_changes: + - redfish - added new command GetVirtualMedia, VirtualMediaInsert and VirtualMediaEject to Systems category due to Redfish spec changes the virtualMedia resource location from Manager to System (https://github.com/ansible-collections/community.general/pull/5124). \ No newline at end of file diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 9068f9b92a..464d1110d7 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -202,6 +202,16 @@ class RedfishUtils(object): def _init_session(self): pass + def _get_vendor(self): + response = self.get_request(self.root_uri + self.service_root) + if response['ret'] is False: + return {'ret': False, 'Vendor': ''} + data = response['data'] + if 'Vendor' in data: + return {'ret': True, 'Vendor': data["Vendor"]} + else: + return {'ret': True, 'Vendor': ''} + def _find_accountservice_resource(self): response = self.get_request(self.root_uri + self.service_root) if response['ret'] is False: @@ -2162,11 +2172,15 @@ class RedfishUtils(object): result["entries"] = virtualmedia_results return result - def get_multi_virtualmedia(self): + def get_multi_virtualmedia(self, resource_type='Manager'): ret = True entries = [] - resource_uris = self.manager_uris + # Given resource_type, use the proper URI + if resource_type == 'Systems': + resource_uris = self.systems_uris + elif resource_type == 'Manager': + resource_uris = self.manager_uris for resource_uri in resource_uris: virtualmedia = self.get_virtualmedia(resource_uri) @@ -2178,7 +2192,7 @@ class RedfishUtils(object): @staticmethod def _find_empty_virt_media_slot(resources, media_types, - media_match_strict=True): + media_match_strict=True, vendor=''): for uri, data in resources.items(): # check MediaTypes if 'MediaTypes' in data and media_types: @@ -2187,8 +2201,12 @@ class RedfishUtils(object): else: if media_match_strict: continue - # if ejected, 'Inserted' should be False - if (not data.get('Inserted', False)): + # Base on current Lenovo server capability, filter out slot RDOC1/2 and Remote1/2/3/4 which are not supported to Insert/Eject. + if vendor == 'Lenovo' and ('RDOC' in uri or 'Remote' in uri): + continue + # if ejected, 'Inserted' should be False and 'ImageName' cleared + if (not data.get('Inserted', False) and + not data.get('ImageName')): return uri, data return None, None @@ -2262,7 +2280,7 @@ class RedfishUtils(object): return response return {'ret': True, 'changed': True, 'msg': "VirtualMedia inserted"} - def virtual_media_insert(self, options): + def virtual_media_insert(self, options, resource_type='Manager'): param_map = { 'Inserted': 'inserted', 'WriteProtected': 'write_protected', @@ -2279,7 +2297,12 @@ class RedfishUtils(object): media_types = options.get('media_types') # locate and read the VirtualMedia resources - response = self.get_request(self.root_uri + self.manager_uri) + # Given resource_type, use the proper URI + if resource_type == 'Systems': + resource_uri = self.systems_uri + elif resource_type == 'Manager': + resource_uri = self.manager_uri + response = self.get_request(self.root_uri + resource_uri) if response['ret'] is False: return response data = response['data'] @@ -2288,7 +2311,7 @@ class RedfishUtils(object): # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation # Inserted and WriteProtected are not writable - if data["FirmwareVersion"].startswith("iLO 4"): + if "FirmwareVersion" in data and data["FirmwareVersion"].startswith("iLO 4"): image_only = True # Supermicro does also not support Inserted and WriteProtected @@ -2315,12 +2338,13 @@ class RedfishUtils(object): # find an empty slot to insert the media # try first with strict media_type matching + vendor = self._get_vendor()['Vendor'] uri, data = self._find_empty_virt_media_slot( - resources, media_types, media_match_strict=True) + resources, media_types, media_match_strict=True, vendor=vendor) if not uri: # if not found, try without strict media_type matching uri, data = self._find_empty_virt_media_slot( - resources, media_types, media_match_strict=False) + resources, media_types, media_match_strict=False, vendor=vendor) if not uri: return {'ret': False, 'msg': "Unable to find an available VirtualMedia resource " @@ -2378,14 +2402,19 @@ class RedfishUtils(object): return {'ret': True, 'changed': True, 'msg': "VirtualMedia ejected"} - def virtual_media_eject(self, options): + def virtual_media_eject(self, options, resource_type='Manager'): image_url = options.get('image_url') if not image_url: return {'ret': False, 'msg': "image_url option required for VirtualMediaEject"} # locate and read the VirtualMedia resources - response = self.get_request(self.root_uri + self.manager_uri) + # Given resource_type, use the proper URI + if resource_type == 'Systems': + resource_uri = self.systems_uri + elif resource_type == 'Manager': + resource_uri = self.manager_uri + response = self.get_request(self.root_uri + resource_uri) if response['ret'] is False: return response data = response['data'] @@ -2395,7 +2424,7 @@ class RedfishUtils(object): # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation # Inserted is not writable image_only = False - if data["FirmwareVersion"].startswith("iLO 4"): + if "FirmwareVersion" in data and data["FirmwareVersion"].startswith("iLO 4"): image_only = True if 'Supermicro' in data['Oem']: diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 448f763ab1..35a12eb8c1 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -505,6 +505,20 @@ EXAMPLES = ''' username: operator password: supersecretpwd + - name: Insert Virtual Media + community.general.redfish_command: + category: Systems + command: VirtualMediaInsert + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + virtual_media: + image_url: 'http://example.com/images/SomeLinux-current.iso' + media_types: + - CD + - DVD + resource_id: 1 + - name: Insert Virtual Media community.general.redfish_command: category: Manager @@ -519,6 +533,17 @@ EXAMPLES = ''' - DVD resource_id: BMC + - name: Eject Virtual Media + community.general.redfish_command: + category: Systems + command: VirtualMediaEject + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + virtual_media: + image_url: 'http://example.com/images/SomeLinux-current.iso' + resource_id: 1 + - name: Eject Virtual Media community.general.redfish_command: category: Manager @@ -593,7 +618,7 @@ from ansible.module_utils.common.text.converters import to_native CATEGORY_COMMANDS_ALL = { "Systems": ["PowerOn", "PowerForceOff", "PowerForceRestart", "PowerGracefulRestart", "PowerGracefulShutdown", "PowerReboot", "SetOneTimeBoot", "EnableContinuousBootOverride", "DisableBootOverride", - "IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink"], + "IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink", "VirtualMediaInsert", "VirtualMediaEject"], "Chassis": ["IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink"], "Accounts": ["AddUser", "EnableUser", "DeleteUser", "DisableUser", "UpdateUserRole", "UpdateUserPassword", "UpdateUserName", @@ -766,6 +791,10 @@ def main(): result = rf_utils.set_boot_override(boot_opts) elif command.startswith('IndicatorLed'): result = rf_utils.manage_system_indicator_led(command) + elif command == 'VirtualMediaInsert': + result = rf_utils.virtual_media_insert(virtual_media, category) + elif command == 'VirtualMediaEject': + result = rf_utils.virtual_media_eject(virtual_media, category) elif category == "Chassis": result = rf_utils._find_chassis_resource() @@ -814,9 +843,9 @@ def main(): elif command == 'ClearLogs': result = rf_utils.clear_logs() elif command == 'VirtualMediaInsert': - result = rf_utils.virtual_media_insert(virtual_media) + result = rf_utils.virtual_media_insert(virtual_media, category) elif command == 'VirtualMediaEject': - result = rf_utils.virtual_media_eject(virtual_media) + result = rf_utils.virtual_media_eject(virtual_media, category) elif category == "Update": # execute only if we find UpdateService resources diff --git a/plugins/modules/remote_management/redfish/redfish_info.py b/plugins/modules/remote_management/redfish/redfish_info.py index 76fbb3fe35..4cb42711ad 100644 --- a/plugins/modules/remote_management/redfish/redfish_info.py +++ b/plugins/modules/remote_management/redfish/redfish_info.py @@ -118,6 +118,19 @@ EXAMPLES = ''' ansible.builtin.debug: msg: "{{ result.redfish_facts.virtual_media.entries | to_nice_json }}" + - name: Get Virtual Media information from Systems + community.general.redfish_info: + category: Systems + command: GetVirtualMedia + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + register: result + + - name: Print fetched information + ansible.builtin.debug: + msg: "{{ result.redfish_facts.virtual_media.entries | to_nice_json }}" + - name: Get Volume Inventory community.general.redfish_info: category: Systems @@ -303,7 +316,7 @@ CATEGORY_COMMANDS_ALL = { "Systems": ["GetSystemInventory", "GetPsuInventory", "GetCpuInventory", "GetMemoryInventory", "GetNicInventory", "GetHealthReport", "GetStorageControllerInventory", "GetDiskInventory", "GetVolumeInventory", - "GetBiosAttributes", "GetBootOrder", "GetBootOverride"], + "GetBiosAttributes", "GetBootOrder", "GetBootOverride", "GetVirtualMedia"], "Chassis": ["GetFanInventory", "GetPsuInventory", "GetChassisPower", "GetChassisThermals", "GetChassisInventory", "GetHealthReport"], "Accounts": ["ListUsers"], @@ -420,6 +433,8 @@ def main(): result["boot_override"] = rf_utils.get_multi_boot_override() elif command == "GetHealthReport": result["health_report"] = rf_utils.get_multi_system_health_report() + elif command == "GetVirtualMedia": + result["virtual_media"] = rf_utils.get_multi_virtualmedia(category) elif category == "Chassis": # execute only if we find Chassis resource @@ -485,7 +500,7 @@ def main(): if command == "GetManagerNicInventory": result["manager_nics"] = rf_utils.get_multi_nic_inventory(category) elif command == "GetVirtualMedia": - result["virtual_media"] = rf_utils.get_multi_virtualmedia() + result["virtual_media"] = rf_utils.get_multi_virtualmedia(category) elif command == "GetLogs": result["log"] = rf_utils.get_logs() elif command == "GetNetworkProtocols": From 8027bc53359e8006b94802468f7b60d89c73b61b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 25 Aug 2022 06:43:07 +0200 Subject: [PATCH 0192/2104] filesystem: create temp directory outside /tmp to avoid problems with tmpfs. (#5182) --- .../targets/filesystem/meta/main.yml | 2 +- .../handlers/main.yml | 10 +++++++++ .../tasks/default-cleanup.yml | 10 +++++++++ .../tasks/default.yml | 22 +++++++++++++++++++ .../tasks/main.yml | 20 +++++++++++++++++ 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 tests/integration/targets/setup_remote_tmp_dir_outside_tmp/handlers/main.yml create mode 100644 tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml create mode 100644 tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default.yml create mode 100644 tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/main.yml diff --git a/tests/integration/targets/filesystem/meta/main.yml b/tests/integration/targets/filesystem/meta/main.yml index ca1915e05c..d3facee4f2 100644 --- a/tests/integration/targets/filesystem/meta/main.yml +++ b/tests/integration/targets/filesystem/meta/main.yml @@ -5,4 +5,4 @@ dependencies: - setup_pkg_mgr - - setup_remote_tmp_dir + - setup_remote_tmp_dir_outside_tmp diff --git a/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/handlers/main.yml b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/handlers/main.yml new file mode 100644 index 0000000000..f1c55b04f3 --- /dev/null +++ b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/handlers/main.yml @@ -0,0 +1,10 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: delete temporary directory + include_tasks: default-cleanup.yml + +- name: delete temporary directory (windows) + include_tasks: windows-cleanup.yml diff --git a/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml new file mode 100644 index 0000000000..e19d903e6b --- /dev/null +++ b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml @@ -0,0 +1,10 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: delete temporary directory + file: + path: "{{ remote_tmp_dir }}" + state: absent + no_log: yes diff --git a/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default.yml b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default.yml new file mode 100644 index 0000000000..0aef57f99c --- /dev/null +++ b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default.yml @@ -0,0 +1,22 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: create ~/tmp + file: + path: '~/tmp' + state: directory + +- name: create temporary directory + tempfile: + state: directory + suffix: .test + path: ~/tmp + register: remote_tmp_dir + notify: + - delete temporary directory + +- name: record temporary directory + set_fact: + remote_tmp_dir: "{{ remote_tmp_dir.path }}" diff --git a/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/main.yml b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/main.yml new file mode 100644 index 0000000000..6632cc8489 --- /dev/null +++ b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/main.yml @@ -0,0 +1,20 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: make sure we have the ansible_os_family and ansible_distribution_version facts + setup: + gather_subset: distribution + when: ansible_facts == {} + +- include_tasks: "{{ lookup('first_found', files)}}" + vars: + files: + - "{{ ansible_os_family | lower }}.yml" + - "default.yml" From 8e59e5252506aeeccb6ca5cfe38662df2f66fb23 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 25 Aug 2022 07:30:28 +0200 Subject: [PATCH 0193/2104] [TEMP] Fix RHEL 8 issues by restricting bcrypt to < 4.0.0 (#5183) --- tests/utils/constraints.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index b72b0fe838..af2b326ddd 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -55,6 +55,7 @@ redis < 4.0.0 ; python_version >= '2.7' and python_version < '3.6' redis ; python_version >= '3.6' pycdlib < 1.13.0 ; python_version < '3' # 1.13.0 does not work with Python 2, while not declaring that python-daemon <= 2.3.0 ; python_version < '3' +bcrypt < 4.0.0 # TEMP: restrict to < 4.0.0 since installing 4.0.0 fails on RHEL 8 # freeze pylint and its requirements for consistent test results astroid == 2.2.5 From 82d69bb871c9b8b61423090af54783f0ae78a189 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 28 Aug 2022 12:03:27 +0200 Subject: [PATCH 0194/2104] Fix exception when `agent` argument is not specified. (#5194) --- .../fragments/5194-fix-proxmox-agent-exception.yaml | 2 ++ plugins/modules/cloud/misc/proxmox_kvm.py | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5194-fix-proxmox-agent-exception.yaml diff --git a/changelogs/fragments/5194-fix-proxmox-agent-exception.yaml b/changelogs/fragments/5194-fix-proxmox-agent-exception.yaml new file mode 100644 index 0000000000..53a96ce89a --- /dev/null +++ b/changelogs/fragments/5194-fix-proxmox-agent-exception.yaml @@ -0,0 +1,2 @@ +bugfixes: + - "proxmox_kvm - fix exception when no ``agent`` argument is specified (https://github.com/ansible-collections/community.general/pull/5194)." diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 0f0d6df11d..063fda697a 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -963,12 +963,13 @@ class ProxmoxKvmAnsible(ProxmoxAnsible): kwargs.update(kwargs[k]) del kwargs[k] - try: - # The API also allows booleans instead of e.g. `enabled=1` for backward-compatibility. - kwargs['agent'] = boolean(kwargs['agent'], strict=True) - except TypeError: - # Not something that Ansible would parse as a boolean. - pass + if 'agent' in kwargs: + try: + # The API also allows booleans instead of e.g. `enabled=1` for backward-compatibility. + kwargs['agent'] = boolean(kwargs['agent'], strict=True) + except TypeError: + # Not something that Ansible would parse as a boolean. + pass # Rename numa_enabled to numa, according the API documentation if 'numa_enabled' in kwargs: From fa490519128c9e15896560365fa13f4745e080dc Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 3 Sep 2022 11:25:41 +0200 Subject: [PATCH 0195/2104] Catch more broader error messages. (#5212) --- tests/integration/targets/lookup_dependent/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/targets/lookup_dependent/tasks/main.yml b/tests/integration/targets/lookup_dependent/tasks/main.yml index c70ce5b6a4..b2f2097294 100644 --- a/tests/integration/targets/lookup_dependent/tasks/main.yml +++ b/tests/integration/targets/lookup_dependent/tasks/main.yml @@ -136,7 +136,7 @@ assert: that: - eval_error is failed - - eval_error.msg.startswith("Caught \"'foo' is undefined\" while evaluating ") + - eval_error.msg.startswith("Caught \"'foo' is undefined") - name: "Test 5: same variable name reused" debug: @@ -151,7 +151,7 @@ assert: that: - eval_error is failed - - eval_error.msg.startswith("Caught \"'x' is undefined\" while evaluating ") + - eval_error.msg.startswith("Caught \"'x' is undefined") - name: "Test 6: multi-value dict" debug: From 86f4d798a9c0a4ec809d3a5180400481d8a34f99 Mon Sep 17 00:00:00 2001 From: tylerezimmerman <100804646+tylerezimmerman@users.noreply.github.com> Date: Sat, 3 Sep 2022 04:34:06 -0500 Subject: [PATCH 0196/2104] Update BOTMETA.yml (#5165) * Update BOTMETA.yml Removing Endlesstrax and Amigus as maintainers. * Update .github/BOTMETA.yml Co-authored-by: Felix Fontein * Update BOTMETA.yml Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 5ae2935209..b448836f44 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -223,7 +223,8 @@ files: $lookups/dnstxt.py: maintainers: jpmens $lookups/dsv.py: - maintainers: amigus endlesstrax delineaKrehl tylerezimmerman + maintainers: delineaKrehl tylerezimmerman + ignore: amigus $lookups/etcd3.py: maintainers: eric-belhomme $lookups/etcd.py: @@ -260,7 +261,8 @@ files: maintainers: RevBits $lookups/shelvefile.py: {} $lookups/tss.py: - maintainers: amigus endlesstrax delineaKrehl tylerezimmerman + maintainers: delineaKrehl tylerezimmerman + ignore: amigus $module_utils/: labels: module_utils $module_utils/gconftool2.py: From 4c52fdb9d91bc4b6293fcf6273d38f24e3b886aa Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Sat, 3 Sep 2022 11:53:57 +0200 Subject: [PATCH 0197/2104] seport: add `local` argument (#5203) Using `local: true` users can enforce to work only with local policy modifications. i.e. # Without `local`, no new modification is added when port already exists $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp' localhost localhost | SUCCESS => { "changed": false, "ports": [ "22" ], "proto": "tcp", "setype": "ssh_port_t", "state": "present" } $ sudo semanage port -l -C # With `local`, a port is always added/changed in local modification list $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp local=true' localhost localhost | CHANGED => { "changed": true, "ports": [ "22" ], "proto": "tcp", "setype": "ssh_port_t", "state": "present" } $ sudo semanage port -l -C SELinux Port Type Proto Port Number ssh_port_t tcp 22 # With `local`, seport removes the port only from local modifications $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost localhost | CHANGED => { "changed": true, "ports": [ "22" ], "proto": "tcp", "setype": "ssh_port_t", "state": "absent" } $ sudo semanage port -l -C # Even though the port is still defined in system policy, the module # result is success as there's no port local modification $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost localhost | SUCCESS => { "changed": false, "ports": [ "22" ], "proto": "tcp", "setype": "ssh_port_t", "state": "absent" } # But it fails without `local` as it tries to remove port defined in # system policy $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp' localhost An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Port tcp/22 is defined in policy, cannot be deleted localhost | FAILED! => { "changed": false, "msg": "ValueError: Port tcp/22 is defined in policy, cannot be deleted\n" } Signed-off-by: Petr Lautrbach Signed-off-by: Petr Lautrbach --- .../5203-seport-add-local-argument.yaml | 2 ++ plugins/modules/system/seport.py | 32 ++++++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/5203-seport-add-local-argument.yaml diff --git a/changelogs/fragments/5203-seport-add-local-argument.yaml b/changelogs/fragments/5203-seport-add-local-argument.yaml new file mode 100644 index 0000000000..63ef32a7f4 --- /dev/null +++ b/changelogs/fragments/5203-seport-add-local-argument.yaml @@ -0,0 +1,2 @@ +minor_changes: + - seport - added new argument ``local`` (https://github.com/ansible-collections/community.general/pull/5203) diff --git a/plugins/modules/system/seport.py b/plugins/modules/system/seport.py index 65cf09e22d..b43b501058 100644 --- a/plugins/modules/system/seport.py +++ b/plugins/modules/system/seport.py @@ -49,6 +49,12 @@ options: - Run independent of selinux runtime state type: bool default: false + local: + description: + - Work with local modifications only. + type: bool + default: false + version_added: 5.6.0 notes: - The changes are persistent across reboots. - Not tested on any debian based system. @@ -89,6 +95,14 @@ EXAMPLES = r''' proto: tcp setype: memcache_port_t state: present + +- name: Remove tcp port 22 local modification if exists + community.general.seport: + ports: 22 + protocol: tcp + setype: ssh_port_t + state: absent + local: true ''' import traceback @@ -117,7 +131,7 @@ def get_runtime_status(ignore_selinux_state=False): return ignore_selinux_state or selinux.is_selinux_enabled() -def semanage_port_get_ports(seport, setype, proto): +def semanage_port_get_ports(seport, setype, proto, local): """ Get the list of ports that have the specified type definition. :param community.general.seport: Instance of seobject.portRecords @@ -131,7 +145,7 @@ def semanage_port_get_ports(seport, setype, proto): :rtype: list :return: List of ports that have the specified SELinux type. """ - records = seport.get_all_by_type() + records = seport.get_all_by_type(locallist=local) if (setype, proto) in records: return records[(setype, proto)] else: @@ -165,7 +179,7 @@ def semanage_port_get_type(seport, port, proto): return records.get(key) -def semanage_port_add(module, ports, proto, setype, do_reload, serange='s0', sestore=''): +def semanage_port_add(module, ports, proto, setype, do_reload, serange='s0', sestore='', local=False): """ Add SELinux port type definition to the policy. :type module: AnsibleModule @@ -196,7 +210,7 @@ def semanage_port_add(module, ports, proto, setype, do_reload, serange='s0', ses try: seport = seobject.portRecords(sestore) seport.set_reload(do_reload) - ports_by_type = semanage_port_get_ports(seport, setype, proto) + ports_by_type = semanage_port_get_ports(seport, setype, proto, local) for port in ports: if port in ports_by_type: continue @@ -216,7 +230,7 @@ def semanage_port_add(module, ports, proto, setype, do_reload, serange='s0', ses return change -def semanage_port_del(module, ports, proto, setype, do_reload, sestore=''): +def semanage_port_del(module, ports, proto, setype, do_reload, sestore='', local=False): """ Delete SELinux port type definition from the policy. :type module: AnsibleModule @@ -244,7 +258,7 @@ def semanage_port_del(module, ports, proto, setype, do_reload, sestore=''): try: seport = seobject.portRecords(sestore) seport.set_reload(do_reload) - ports_by_type = semanage_port_get_ports(seport, setype, proto) + ports_by_type = semanage_port_get_ports(seport, setype, proto, local) for port in ports: if port in ports_by_type: change = True @@ -266,6 +280,7 @@ def main(): setype=dict(type='str', required=True), state=dict(type='str', default='present', choices=['absent', 'present']), reload=dict(type='bool', default=True), + local=dict(type='bool', default=False) ), supports_check_mode=True, ) @@ -286,6 +301,7 @@ def main(): setype = module.params['setype'] state = module.params['state'] do_reload = module.params['reload'] + local = module.params['local'] result = { 'ports': ports, @@ -295,9 +311,9 @@ def main(): } if state == 'present': - result['changed'] = semanage_port_add(module, ports, proto, setype, do_reload) + result['changed'] = semanage_port_add(module, ports, proto, setype, do_reload, local=local) elif state == 'absent': - result['changed'] = semanage_port_del(module, ports, proto, setype, do_reload) + result['changed'] = semanage_port_del(module, ports, proto, setype, do_reload, local=local) else: module.fail_json(msg='Invalid value of argument "state": {0}'.format(state)) From 7ffe6539c0ba3a3c43c49ae8bfbb37213c9e95a1 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 3 Sep 2022 22:00:04 +1200 Subject: [PATCH 0198/2104] New module: pipx_info (#5196) * pipx_info: new module * pipx_info: add integration tests * ensure apps are uninstalled after tests * Update plugins/modules/packaging/language/pipx_info.py Co-authored-by: Felix Fontein * rework module output, add docs Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 + meta/runtime.yml | 2 + .../modules/packaging/language/pipx_info.py | 205 ++++++++++++++++++ tests/integration/targets/pipx_info/aliases | 8 + .../targets/pipx_info/tasks/main.yml | 139 ++++++++++++ 5 files changed, 356 insertions(+) create mode 100644 plugins/modules/packaging/language/pipx_info.py create mode 100644 tests/integration/targets/pipx_info/aliases create mode 100644 tests/integration/targets/pipx_info/tasks/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index b448836f44..a75397852f 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -810,6 +810,8 @@ files: maintainers: bcoca matburt maxamillion $modules/packaging/language/pipx.py: maintainers: russoz + $modules/packaging/language/pipx_info.py: + maintainers: russoz $modules/packaging/language/yarn.py: maintainers: chrishoffman verkaufer $modules/packaging/os/apk.py: diff --git a/meta/runtime.yml b/meta/runtime.yml index cbb131346d..a7578eea22 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1131,6 +1131,8 @@ plugin_routing: redirect: community.general.packaging.language.pip_package_info pipx: redirect: community.general.packaging.language.pipx + pipx_info: + redirect: community.general.packaging.language.pipx_info pkg5: redirect: community.general.packaging.os.pkg5 pkg5_publisher: diff --git a/plugins/modules/packaging/language/pipx_info.py b/plugins/modules/packaging/language/pipx_info.py new file mode 100644 index 0000000000..05b9db1b2d --- /dev/null +++ b/plugins/modules/packaging/language/pipx_info.py @@ -0,0 +1,205 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2021, Alexei Znamensky +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = ''' +--- +module: pipx_info +short_description: Rretrieves information about applications installed with pipx +version_added: 5.6.0 +description: + - Retrieve details about Python applications installed in isolated virtualenvs using pipx. +options: + name: + description: + - Name of an application installed with C(pipx). + type: str + include_deps: + description: + - Include dependent packages in the output. + type: bool + default: false + include_injected: + description: + - Include injected packages in the output. + type: bool + default: false + include_raw: + description: + - Returns the raw output of C(pipx list --json). + - The raw output is not affected by I(include_deps) or I(include_injected). + type: bool + default: false + executable: + description: + - Path to the C(pipx) installed in the system. + - > + If not specified, the module will use C(python -m pipx) to run the tool, + using the same Python interpreter as ansible itself. + type: path +notes: + - This module does not install the C(pipx) python package, however that can be easily done with the module M(ansible.builtin.pip). + - This module does not require C(pipx) to be in the shell C(PATH), but it must be loadable by Python as a module. + - Please note that C(pipx) requires Python 3.6 or above. + - See also the C(pipx) documentation at U(https://pypa.github.io/pipx/). +author: + - "Alexei Znamensky (@russoz)" +''' + +EXAMPLES = ''' +- name: retrieve all installed applications + community.general.pipx_info: {} + +- name: retrieve all installed applications, include dependencies and injected packages + community.general.pipx_info: + include_deps: true + include_injected: true + +- name: retrieve application tox + community.general.pipx_info: + name: tox + include_deps: true + +- name: retrieve application ansible-lint, include dependencies + community.general.pipx_info: + name: ansible-lint + include_deps: true +''' + +RETURN = ''' +application: + description: The list of installed applications + returned: success + type: list + elements: dict + contains: + name: + description: The name of the installed application. + returned: success + type: str + sample: "tox" + version: + description: The version of the installed application. + returned: success + type: str + sample: "3.24.0" + dependencies: + description: The dependencies of the installed application, when I(include_deps=true). + returned: success + type: list + elements: str + sample: ["virtualenv"] + injected: + description: The injected packages for the installed application, when I(include_injected=true). + returned: success + type: dict + sample: + licenses: "0.6.1" + +raw_output: + description: The raw output of the C(pipx list) command, when I(include_raw=true). Used for debugging. + returned: success + type: dict + +cmd: + description: Command executed to obtain the list of installed applications. + returned: success + type: list + elements: str + sample: [ + "/usr/bin/python3.10", + "-m", + "pipx", + "list", + "--include-injected", + "--json" + ] +''' + +import json + +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper +from ansible_collections.community.general.plugins.module_utils.pipx import pipx_runner + +from ansible.module_utils.facts.compat import ansible_facts + + +class PipXInfo(ModuleHelper): + output_params = ['name'] + module = dict( + argument_spec=dict( + name=dict(type='str'), + include_deps=dict(type='bool', default=False), + include_injected=dict(type='bool', default=False), + include_raw=dict(type='bool', default=False), + executable=dict(type='path'), + ), + supports_check_mode=True, + ) + + def __init_module__(self): + if self.vars.executable: + self.command = [self.vars.executable] + else: + facts = ansible_facts(self.module, gather_subset=['python']) + self.command = [facts['python']['executable'], '-m', 'pipx'] + self.runner = pipx_runner(self.module, self.command) + + # self.vars.set('application', self._retrieve_installed(), change=True, diff=True) + + def __run__(self): + def process_list(rc, out, err): + if not out: + return [] + + results = [] + raw_data = json.loads(out) + if self.vars.include_raw: + self.vars.raw_output = raw_data + + if self.vars.name: + if self.vars.name in raw_data['venvs']: + data = {self.vars.name: raw_data['venvs'][self.vars.name]} + else: + data = {} + else: + data = raw_data['venvs'] + + for venv_name, venv in data.items(): + entry = { + 'name': venv_name, + 'version': venv['metadata']['main_package']['package_version'] + } + if self.vars.include_injected: + entry['injected'] = dict( + (k, v['package_version']) for k, v in venv['metadata']['injected_packages'].items() + ) + if self.vars.include_deps: + entry['dependencies'] = list(venv['metadata']['main_package']['app_paths_of_dependencies']) + results.append(entry) + + return results + + with self.runner('_list', output_process=process_list) as ctx: + self.vars.application = ctx.run(_list=1) + self._capture_results(ctx) + + def _capture_results(self, ctx): + self.vars.cmd = ctx.cmd + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info + + +def main(): + PipXInfo.execute() + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/pipx_info/aliases b/tests/integration/targets/pipx_info/aliases new file mode 100644 index 0000000000..c42790aedf --- /dev/null +++ b/tests/integration/targets/pipx_info/aliases @@ -0,0 +1,8 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +destructive +shippable/posix/group3 +skip/python2 +skip/python3.5 diff --git a/tests/integration/targets/pipx_info/tasks/main.yml b/tests/integration/targets/pipx_info/tasks/main.yml new file mode 100644 index 0000000000..61163afd08 --- /dev/null +++ b/tests/integration/targets/pipx_info/tasks/main.yml @@ -0,0 +1,139 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: install pipx + pip: + name: pipx + extra_args: --user + +############################################################################## +- name: ensure application tox is uninstalled + community.general.pipx: + state: absent + name: tox + +- name: retrieve applications (empty) + community.general.pipx_info: {} + register: info_empty + +- name: install application tox + community.general.pipx: + name: tox + +- name: retrieve applications + community.general.pipx_info: {} + register: info_all + +- name: retrieve applications (include_deps=true) + community.general.pipx_info: + include_deps: true + register: info_all_deps + +- name: retrieve application tox + community.general.pipx_info: + name: tox + include_deps: true + register: info_tox + +- name: uninstall application tox + community.general.pipx: + state: absent + name: tox + +- name: check assertions tox + assert: + that: + - info_empty.application|length == 0 + + - info_all.application|length == 1 + - info_all.application[0].name == "tox" + - "'version' in info_all.application[0]" + - "'dependencies' not in info_all.application[0]" + - "'injected' not in info_all.application[0]" + + - info_all_deps.application|length == 1 + - info_all_deps.application[0].name == "tox" + - "'version' in info_all_deps.application[0]" + - info_all_deps.application[0].dependencies == ["virtualenv"] + - "'injected' not in info_all.application[0]" + + - info_tox.application == info_all_deps.application + +############################################################################## +- name: set test applications + set_fact: + apps: + - name: tox + source: tox==3.24.0 + - name: ansible-lint + inject_packages: + - licenses + +- name: ensure applications are uninstalled + community.general.pipx: + name: "{{ item.name }}" + state: absent + loop: "{{ apps }}" + +- name: install applications + community.general.pipx: + name: "{{ item.name }}" + source: "{{ item.source|default(omit) }}" + loop: "{{ apps }}" + +- name: inject packages + community.general.pipx: + state: inject + name: "{{ item.name }}" + inject_packages: "{{ item.inject_packages }}" + when: "'inject_packages' in item" + loop: "{{ apps }}" + +- name: retrieve applications + community.general.pipx_info: {} + register: info2_all + +- name: retrieve applications (include_deps=true) + community.general.pipx_info: + include_deps: true + include_injected: true + register: info2_all_deps + +- name: retrieve application ansible-lint + community.general.pipx_info: + name: ansible-lint + include_deps: true + include_injected: true + register: info2_lint + +- name: ensure applications are uninstalled + community.general.pipx: + name: "{{ item.name }}" + state: absent + loop: "{{ apps }}" + +- name: check assertions multiple apps + assert: + that: + - all_apps|length == 2 + - all_apps[1].name == "tox" + - all_apps[1].version == "3.24.0" + - "'dependencies' not in all_apps[1]" + - "'injected' not in all_apps[1]" + + - all_apps_deps|length == 2 + - all_apps_deps[1].name == "tox" + - all_apps_deps[1].version == "3.24.0" + - all_apps_deps[1].dependencies == ["virtualenv"] + - "'injected' in all_apps_deps[0]" + - "'licenses' in all_apps_deps[0].injected" + + - lint|length == 1 + - all_apps_deps|length == 2 + - lint[0] == all_apps_deps[0] + vars: + all_apps: "{{ info2_all.application|sort(attribute='name') }}" + all_apps_deps: "{{ info2_all_deps.application|sort(attribute='name') }}" + lint: "{{ info2_lint.application|sort(attribute='name') }}" From 6ff594b524a9180a66a5d98b465f2de1d75086a8 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Sat, 3 Sep 2022 18:02:03 +0800 Subject: [PATCH 0199/2104] nmcli: avoid changed status for most cases with VPN connections (#5126) * nmcli: avoid changed status for most cases with VPN connections Follow-up https://github.com/ansible-collections/community.general/pull/4746 * `nmcli connection show` includes vpn.service-type but not vpn-type. Switching to vpn.service-type removes unneeded diffs while keeping the same functionality, as vpn-type is an alias of vpn.service-type per nm-settings-nmcli(1). NetworkManager also adds `org.freedesktop.NetworkManager.` prefix for known VPN types [1]. The logic is non-trivial so I didn't implement it in this commit. If a user specifies `service-type: l2tp`, changed will be always be True: - "vpn.service-type": "org.freedesktop.NetworkManager.l2tp" + "vpn.service-type": "l2tp" * The vpn.data field from `nmcli connection show` is sorted by keys and there are spaces around equal signs. I added codes for parsing such data. Tests are also updated to match outputs of nmcli commands. [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.38.4/src/libnm-core-impl/nm-vpn-plugin-info.c#L619 * Add changelog * Some suggested changes * Make space stripping more flexible - works for cases without equal signs. * Keep vpn.data in a test case with no spaces * nmcli: allow any string for vpn service-type --- changelogs/fragments/5126-nmcli-remove-diffs.yml | 2 ++ plugins/modules/net_tools/nmcli.py | 11 +++++------ tests/unit/plugins/modules/net_tools/test_nmcli.py | 14 ++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 changelogs/fragments/5126-nmcli-remove-diffs.yml diff --git a/changelogs/fragments/5126-nmcli-remove-diffs.yml b/changelogs/fragments/5126-nmcli-remove-diffs.yml new file mode 100644 index 0000000000..d857b146e8 --- /dev/null +++ b/changelogs/fragments/5126-nmcli-remove-diffs.yml @@ -0,0 +1,2 @@ +bugfixes: + - "nmcli - avoid changed status for most cases with VPN connections (https://github.com/ansible-collections/community.general/pull/5126)." diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 83bd984437..da7796894a 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -923,7 +923,6 @@ options: description: This defines the service type of connection. type: str required: true - choices: [ pptp, l2tp ] gateway: description: The gateway to connection. It can be an IP address (for example C(192.0.2.1)) or a FQDN address (for example C(vpn.example.com)). @@ -949,7 +948,7 @@ options: ipsec-enabled: description: - Enable or disable IPSec tunnel to L2TP host. - - This option is need when C(service-type) is C(l2tp). + - This option is need when C(service-type) is C(org.freedesktop.NetworkManager.l2tp). type: bool choices: [ yes, no ] ipsec-psk: @@ -1350,7 +1349,7 @@ EXAMPLES = r''' conn_name: my-vpn-connection vpn: permissions: "{{ ansible_user }}" - service-type: l2tp + service-type: org.freedesktop.NetworkManager.l2tp gateway: vpn.example.com password-flags: 2 user: brittany @@ -1670,7 +1669,7 @@ class Nmcli(object): for name, value in self.vpn.items(): if name == 'service-type': options.update({ - 'vpn-type': value, + 'vpn.service-type': value, }) elif name == 'permissions': options.update({ @@ -2100,8 +2099,8 @@ class Nmcli(object): if key == self.mtu_setting and self.mtu is None: self.mtu = 0 if key == 'vpn.data': - current_value = list(map(str.strip, current_value.split(','))) - value = list(map(str.strip, value.split(','))) + current_value = sorted(re.sub(r'\s*=\s*', '=', part.strip(), count=1) for part in current_value.split(',')) + value = sorted(part.strip() for part in value.split(',')) else: # parameter does not exist current_value = None diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index b59ee57aea..b10f4b2c00 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -1201,7 +1201,7 @@ TESTCASE_VPN_L2TP = [ 'conn_name': 'vpn_l2tp', 'vpn': { 'permissions': 'brittany', - 'service-type': 'l2tp', + 'service-type': 'org.freedesktop.NetworkManager.l2tp', 'gateway': 'vpn.example.com', 'password-flags': '2', 'user': 'brittany', @@ -1221,9 +1221,8 @@ connection.autoconnect: no connection.permissions: brittany ipv4.method: auto ipv6.method: auto -vpn-type: l2tp vpn.service-type: org.freedesktop.NetworkManager.l2tp -vpn.data: gateway=vpn.example.com, password-flags=2, user=brittany, ipsec-enabled=true, ipsec-psk=QnJpdHRhbnkxMjM= +vpn.data: gateway = vpn.example.com, ipsec-enabled = true, ipsec-psk = QnJpdHRhbnkxMjM=, password-flags = 2, user = brittany vpn.secrets: ipsec-psk = QnJpdHRhbnkxMjM= vpn.persistent: no vpn.timeout: 0 @@ -1235,7 +1234,7 @@ TESTCASE_VPN_PPTP = [ 'conn_name': 'vpn_pptp', 'vpn': { 'permissions': 'brittany', - 'service-type': 'pptp', + 'service-type': 'org.freedesktop.NetworkManager.pptp', 'gateway': 'vpn.example.com', 'password-flags': '2', 'user': 'brittany', @@ -1253,9 +1252,8 @@ connection.autoconnect: no connection.permissions: brittany ipv4.method: auto ipv6.method: auto -vpn-type: pptp vpn.service-type: org.freedesktop.NetworkManager.pptp -vpn.data: password-flags=2, gateway=vpn.example.com, user=brittany +vpn.data: gateway=vpn.example.com, password-flags=2, user=brittany """ @@ -3630,7 +3628,7 @@ def test_create_vpn_l2tp(mocked_generic_connection_create, capfd): for param in ['connection.autoconnect', 'no', 'connection.permissions', 'brittany', - 'vpn.data', 'vpn-type', 'l2tp', + 'vpn.data', 'vpn.service-type', 'org.freedesktop.NetworkManager.l2tp', ]: assert param in add_args_text @@ -3670,7 +3668,7 @@ def test_create_vpn_pptp(mocked_generic_connection_create, capfd): for param in ['connection.autoconnect', 'no', 'connection.permissions', 'brittany', - 'vpn.data', 'vpn-type', 'pptp', + 'vpn.data', 'vpn.service-type', 'org.freedesktop.NetworkManager.pptp', ]: assert param in add_args_text From 36a7939962cffd3abc6c0725ef66bf7d865f7683 Mon Sep 17 00:00:00 2001 From: PKehnel Date: Sat, 3 Sep 2022 12:04:42 +0200 Subject: [PATCH 0200/2104] Bugfix - EnvironmentError with wrong indentation (#5202) * The EnvironmentError is now handled in the splid_pid_name function. The error also had a wrong indentation. See previous setup with correct setup: https://github.com/ansible-collections/community.general/blob/6a7811f6963ad1f5f92342b786e70a809e1c9e08/plugins/modules/system/listen_ports_facts.py * Add changelog fragment * Sanity Check failed before * Update changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml Co-authored-by: Paul-Kehnel Co-authored-by: Felix Fontein --- .../5202-bugfix-environmentError-wrong-indentation.yaml | 2 ++ plugins/modules/system/listen_ports_facts.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml diff --git a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml new file mode 100644 index 0000000000..d9001169b0 --- /dev/null +++ b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml @@ -0,0 +1,2 @@ +bugfixes: + - listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` clause had a wrong indentation. The check is now handled in the ``split_pid_name`` function (https://github.com//pull/5202). \ No newline at end of file diff --git a/plugins/modules/system/listen_ports_facts.py b/plugins/modules/system/listen_ports_facts.py index c137a33e42..fc4afa6d7b 100644 --- a/plugins/modules/system/listen_ports_facts.py +++ b/plugins/modules/system/listen_ports_facts.py @@ -257,8 +257,6 @@ def netStatParse(raw): } if result not in results: results.append(result) - else: - raise EnvironmentError('Could not get process information for the listening ports.') return results From feabe20c63b8845290baad674d55e439c4bf5445 Mon Sep 17 00:00:00 2001 From: wilfriedroset Date: Sat, 3 Sep 2022 12:17:54 +0200 Subject: [PATCH 0201/2104] consul: add support for session token (#5193) Signed-off-by: Wilfried Roset Signed-off-by: Wilfried Roset --- changelogs/fragments/5193-consul-session-token.yaml | 2 ++ plugins/modules/clustering/consul/consul_kv.py | 2 +- plugins/modules/clustering/consul/consul_session.py | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5193-consul-session-token.yaml diff --git a/changelogs/fragments/5193-consul-session-token.yaml b/changelogs/fragments/5193-consul-session-token.yaml new file mode 100644 index 0000000000..f58ded12f0 --- /dev/null +++ b/changelogs/fragments/5193-consul-session-token.yaml @@ -0,0 +1,2 @@ +minor_changes: + - consul_session - adds ``token`` parameter for session (https://github.com/ansible-collections/community.general/pull/5193). diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/clustering/consul/consul_kv.py index 2b0391389a..ed64a86d18 100644 --- a/plugins/modules/clustering/consul/consul_kv.py +++ b/plugins/modules/clustering/consul/consul_kv.py @@ -279,7 +279,7 @@ def remove_value(module): data=existing) -def get_consul_api(module, token=None): +def get_consul_api(module): return consul.Consul(host=module.params.get('host'), port=module.params.get('port'), scheme=module.params.get('scheme'), diff --git a/plugins/modules/clustering/consul/consul_session.py b/plugins/modules/clustering/consul/consul_session.py index 7c664a0e55..6c06f9a139 100644 --- a/plugins/modules/clustering/consul/consul_session.py +++ b/plugins/modules/clustering/consul/consul_session.py @@ -101,6 +101,12 @@ options: - Specifies the duration of a session in seconds (between 10 and 86400). type: int version_added: 5.4.0 + token: + description: + - The token key identifying an ACL rule set that controls access to + the key value pair. + type: str + version_added: 5.6.0 ''' EXAMPLES = ''' @@ -241,7 +247,8 @@ def get_consul_api(module): return consul.Consul(host=module.params.get('host'), port=module.params.get('port'), scheme=module.params.get('scheme'), - verify=module.params.get('validate_certs')) + verify=module.params.get('validate_certs'), + token=module.params.get('token')) def test_dependencies(module): @@ -265,6 +272,7 @@ def main(): node=dict(type='str'), state=dict(type='str', default='present', choices=['absent', 'info', 'list', 'node', 'present']), datacenter=dict(type='str'), + token=dict(type='str', no_log=True), ) module = AnsibleModule( From 2a449eb16329b180555042473e751995b7d29c96 Mon Sep 17 00:00:00 2001 From: Mike Moerk Date: Sat, 3 Sep 2022 04:45:03 -0600 Subject: [PATCH 0202/2104] WDC Redfish support for setting the power mode. (#5145) * WDC Redfish support for setting the power mode. * Apply suggestions from code review Co-authored-by: Felix Fontein * Add change fragment. * Add extension to changelog fragment. Co-authored-by: Felix Fontein --- ...5145-wdc-redfish-enclosure-power-state.yml | 2 + plugins/module_utils/wdc_redfish_utils.py | 78 ++++++++++++++++-- .../redfish/wdc_redfish_command.py | 18 ++++- .../wdc/test_wdc_redfish_command.py | 79 +++++++++++++++++-- 4 files changed, 164 insertions(+), 13 deletions(-) create mode 100644 changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml diff --git a/changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml b/changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml new file mode 100644 index 0000000000..738590c194 --- /dev/null +++ b/changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml @@ -0,0 +1,2 @@ +minor_changes: + - wdc_redfish_command - add ``PowerModeLow`` and ``PowerModeNormal`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5145). diff --git a/plugins/module_utils/wdc_redfish_utils.py b/plugins/module_utils/wdc_redfish_utils.py index 0ae22de64a..d27e02d7b7 100644 --- a/plugins/module_utils/wdc_redfish_utils.py +++ b/plugins/module_utils/wdc_redfish_utils.py @@ -32,6 +32,17 @@ class WdcRedfishUtils(RedfishUtils): UPDATE_STATUS_MESSAGE_FW_UPDATE_COMPLETED_WAITING_FOR_ACTIVATION = "FW update completed. Waiting for activation." UPDATE_STATUS_MESSAGE_FW_UPDATE_FAILED = "FW update failed." + # Dict keys for resource bodies + # Standard keys + ACTIONS = "Actions" + OEM = "Oem" + WDC = "WDC" + TARGET = "target" + + # Keys for specific operations + CHASSIS_LOCATE = "#Chassis.Locate" + CHASSIS_POWER_MODE = "#Chassis.PowerMode" + def __init__(self, creds, root_uris, @@ -409,17 +420,32 @@ class WdcRedfishUtils(RedfishUtils): @staticmethod def _get_led_locate_uri(data): """Get the LED locate URI given a resource body.""" - if "Actions" not in data: + if WdcRedfishUtils.ACTIONS not in data: return None - if "Oem" not in data["Actions"]: + if WdcRedfishUtils.OEM not in data[WdcRedfishUtils.ACTIONS]: return None - if "WDC" not in data["Actions"]["Oem"]: + if WdcRedfishUtils.WDC not in data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM]: return None - if "#Chassis.Locate" not in data["Actions"]["Oem"]["WDC"]: + if WdcRedfishUtils.CHASSIS_LOCATE not in data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM][WdcRedfishUtils.WDC]: return None - if "target" not in data["Actions"]["Oem"]["WDC"]["#Chassis.Locate"]: + if WdcRedfishUtils.TARGET not in data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM][WdcRedfishUtils.WDC][WdcRedfishUtils.CHASSIS_LOCATE]: return None - return data["Actions"]["Oem"]["WDC"]["#Chassis.Locate"]["target"] + return data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM][WdcRedfishUtils.WDC][WdcRedfishUtils.CHASSIS_LOCATE][WdcRedfishUtils.TARGET] + + @staticmethod + def _get_power_mode_uri(data): + """Get the Power Mode URI given a resource body.""" + if WdcRedfishUtils.ACTIONS not in data: + return None + if WdcRedfishUtils.OEM not in data[WdcRedfishUtils.ACTIONS]: + return None + if WdcRedfishUtils.WDC not in data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM]: + return None + if WdcRedfishUtils.CHASSIS_POWER_MODE not in data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM][WdcRedfishUtils.WDC]: + return None + if WdcRedfishUtils.TARGET not in data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM][WdcRedfishUtils.WDC][WdcRedfishUtils.CHASSIS_POWER_MODE]: + return None + return data[WdcRedfishUtils.ACTIONS][WdcRedfishUtils.OEM][WdcRedfishUtils.WDC][WdcRedfishUtils.CHASSIS_POWER_MODE][WdcRedfishUtils.TARGET] def manage_indicator_led(self, command, resource_uri): key = 'IndicatorLED' @@ -452,3 +478,43 @@ class WdcRedfishUtils(RedfishUtils): return {'ret': False, 'msg': 'Invalid command'} return result + + def manage_chassis_power_mode(self, command): + return self.manage_power_mode(command, self.chassis_uri) + + def manage_power_mode(self, command, resource_uri=None): + if resource_uri is None: + resource_uri = self.chassis_uri + + payloads = {'PowerModeNormal': 'Normal', 'PowerModeLow': 'Low'} + requested_power_mode = payloads[command] + + result = {} + response = self.get_request(self.root_uri + resource_uri) + if response['ret'] is False: + return response + result['ret'] = True + data = response['data'] + + # Make sure the response includes Oem.WDC.PowerMode, and get current power mode + power_mode = 'PowerMode' + if WdcRedfishUtils.OEM not in data or WdcRedfishUtils.WDC not in data[WdcRedfishUtils.OEM] or\ + power_mode not in data[WdcRedfishUtils.OEM][WdcRedfishUtils.WDC]: + return {'ret': False, 'msg': 'Resource does not support Oem.WDC.PowerMode'} + current_power_mode = data[WdcRedfishUtils.OEM][WdcRedfishUtils.WDC][power_mode] + if current_power_mode == requested_power_mode: + return {'ret': True, 'changed': False} + + power_mode_uri = self._get_power_mode_uri(data) + if power_mode_uri is None: + return {'ret': False, 'msg': 'Power Mode URI not found.'} + + if command in payloads.keys(): + payload = {'PowerMode': payloads[command]} + response = self.post_request(self.root_uri + power_mode_uri, payload) + if response['ret'] is False: + return response + else: + return {'ret': False, 'msg': 'Invalid command'} + + return result diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_command.py b/plugins/modules/remote_management/redfish/wdc_redfish_command.py index 29d6f304ef..0b89a1ff15 100644 --- a/plugins/modules/remote_management/redfish/wdc_redfish_command.py +++ b/plugins/modules/remote_management/redfish/wdc_redfish_command.py @@ -170,6 +170,18 @@ EXAMPLES = ''' username: "{{ username }}" password: "{{ password }}" +- name: Set chassis to Low Power Mode + community.general.wdc_redfish_command: + category: Chassis + resource_id: Enclosure + command: PowerModeLow + +- name: Set chassis to Normal Power Mode + community.general.wdc_redfish_command: + category: Chassis + resource_id: Enclosure + command: PowerModeNormal + ''' RETURN = ''' @@ -191,7 +203,9 @@ CATEGORY_COMMANDS_ALL = { ], "Chassis": [ "IndicatorLedOn", - "IndicatorLedOff" + "IndicatorLedOff", + "PowerModeLow", + "PowerModeNormal", ] } @@ -304,6 +318,8 @@ def main(): for command in command_list: if command.startswith("IndicatorLed"): result = rf_utils.manage_chassis_indicator_led(command) + elif command.startswith("PowerMode"): + result = rf_utils.manage_chassis_power_mode(command) if result['ret'] is False: module.fail_json(msg=to_native(result['msg'])) diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py index e33db12bf2..1b2d3d3420 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py @@ -78,9 +78,17 @@ MOCK_SUCCESSFUL_RESPONSE_CHASSIS_ENCLOSURE = { "WDC": { "#Chassis.Locate": { "target": "/Chassis.Locate" + }, + "#Chassis.PowerMode": { + "target": "/redfish/v1/Chassis/Enclosure/Actions/Chassis.PowerMode", } } } + }, + "Oem": { + "WDC": { + "PowerMode": "Normal" + } } } } @@ -237,8 +245,8 @@ def mock_get_request_enclosure_multi_tenant(*args, **kwargs): raise RuntimeError("Illegal call to get_request in test: " + args[1]) -def mock_get_request_led_indicator(*args, **kwargs): - """Mock for get_request for LED indicator tests.""" +def mock_get_request(*args, **kwargs): + """Mock for get_request for simple resource tests.""" if args[1].endswith("/redfish/v1") or args[1].endswith("/redfish/v1/"): return MOCK_SUCCESSFUL_RESPONSE_WITH_UPDATE_SERVICE_RESOURCE elif args[1].endswith("/Chassis"): @@ -253,7 +261,8 @@ def mock_post_request(*args, **kwargs): """Mock post_request with successful response.""" valid_endpoints = [ "/UpdateService.FWActivate", - "/Chassis.Locate" + "/Chassis.Locate", + "/Chassis.PowerMode", ] for endpoint in valid_endpoints: if args[1].endswith(endpoint): @@ -325,6 +334,64 @@ class TestWdcRedfishCommand(unittest.TestCase): }) module.main() + def test_module_chassis_power_mode_low(self): + """Test setting chassis power mode to low (happy path).""" + module_args = { + 'category': 'Chassis', + 'command': 'PowerModeLow', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'resource_id': 'Enclosure', + 'baseuri': 'example.com' + } + set_module_args(module_args) + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + get_request=mock_get_request, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, + get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_module_chassis_power_mode_normal_when_already_normal(self): + """Test setting chassis power mode to normal when it already is. Verify we get changed=False.""" + module_args = { + 'category': 'Chassis', + 'command': 'PowerModeNormal', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'resource_id': 'Enclosure', + 'baseuri': 'example.com' + } + set_module_args(module_args) + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + get_request=mock_get_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, + get_exception_message(ansible_exit_json)) + self.assertFalse(is_changed(ansible_exit_json)) + + def test_module_chassis_power_mode_invalid_command(self): + """Test that we get an error when issuing an invalid PowerMode command.""" + module_args = { + 'category': 'Chassis', + 'command': 'PowerModeExtraHigh', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'resource_id': 'Enclosure', + 'baseuri': 'example.com' + } + set_module_args(module_args) + with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", + get_request=mock_get_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + module.main() + expected_error_message = "Invalid Command 'PowerModeExtraHigh'" + self.assertIn(expected_error_message, + get_exception_message(ansible_fail_json)) + def test_module_enclosure_led_indicator_on(self): """Test turning on a valid LED indicator (in this case we use the Enclosure resource).""" module_args = { @@ -338,7 +405,7 @@ class TestWdcRedfishCommand(unittest.TestCase): set_module_args(module_args) with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", - get_request=mock_get_request_led_indicator, + get_request=mock_get_request, post_request=mock_post_request): with self.assertRaises(AnsibleExitJson) as ansible_exit_json: module.main() @@ -359,7 +426,7 @@ class TestWdcRedfishCommand(unittest.TestCase): set_module_args(module_args) with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", - get_request=mock_get_request_led_indicator, + get_request=mock_get_request, post_request=mock_post_request): with self.assertRaises(AnsibleFailJson) as ansible_fail_json: module.main() @@ -380,7 +447,7 @@ class TestWdcRedfishCommand(unittest.TestCase): set_module_args(module_args) with patch.multiple("ansible_collections.community.general.plugins.module_utils.wdc_redfish_utils.WdcRedfishUtils", - get_request=mock_get_request_led_indicator): + get_request=mock_get_request): with self.assertRaises(AnsibleExitJson) as ansible_exit_json: module.main() self.assertEqual(ACTION_WAS_SUCCESSFUL_MESSAGE, From a481f8356e8aa5f288402df505dd83414b7394a8 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 5 Sep 2022 01:21:44 +1200 Subject: [PATCH 0203/2104] ipwcli_dns: fixed markups in doc (#5225) * ipwcli_dns: fixed markups in doc * added punctuation --- plugins/modules/net_tools/ipwcli_dns.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/modules/net_tools/ipwcli_dns.py b/plugins/modules/net_tools/ipwcli_dns.py index 53451f9b63..8f3b0d1664 100644 --- a/plugins/modules/net_tools/ipwcli_dns.py +++ b/plugins/modules/net_tools/ipwcli_dns.py @@ -45,7 +45,7 @@ options: address: description: - The IP address for the A or AAAA record. - - Required for C(type=A) or C(type=AAAA) + - Required for I(type=A) or I(type=AAAA). type: str ttl: description: @@ -71,38 +71,38 @@ options: port: description: - Sets the port of the SRV record. - - Required for C(type=SRV) + - Required for I(type=SRV). type: int target: description: - Sets the target of the SRV record. - - Required for C(type=SRV) + - Required for I(type=SRV). type: str order: description: - Sets the order of the NAPTR record. - - Required for C(type=NAPTR) + - Required for I(type=NAPTR). type: int preference: description: - Sets the preference of the NAPTR record. - - Required for C(type=NAPTR) + - Required for I(type=NAPTR). type: int flags: description: - Sets one of the possible flags of NAPTR record. - - Required for C(type=NAPTR) + - Required for I(type=NAPTR). type: str choices: ['S', 'A', 'U', 'P'] service: description: - Sets the service of the NAPTR record. - - Required for C(type=NAPTR) + - Required for I(type=NAPTR). type: str replacement: description: - Sets the replacement of the NAPTR record. - - Required for C(type=NAPTR) + - Required for I(type=NAPTR). type: str username: description: From ac8b0340610c692a193e51dea45aafca08f57d17 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 5 Sep 2022 01:23:02 +1200 Subject: [PATCH 0204/2104] ali_instance: fixed markups in doc (#5226) * ali_instance: fixed markups in doc * Update plugins/modules/cloud/alicloud/ali_instance.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/alicloud/ali_instance.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/alicloud/ali_instance.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/alicloud/ali_instance.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../modules/cloud/alicloud/ali_instance.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/modules/cloud/alicloud/ali_instance.py b/plugins/modules/cloud/alicloud/ali_instance.py index 4a5ec24fd0..f36e67d551 100644 --- a/plugins/modules/cloud/alicloud/ali_instance.py +++ b/plugins/modules/cloud/alicloud/ali_instance.py @@ -46,12 +46,12 @@ options: type: str image_id: description: - - Image ID used to launch instances. Required when C(state=present) and creating new ECS instances. + - Image ID used to launch instances. Required when I(state=present) and creating new ECS instances. aliases: ['image'] type: str instance_type: description: - - Instance type used to launch instances. Required when C(state=present) and creating new ECS instances. + - Instance type used to launch instances. Required when I(state=present) and creating new ECS instances. aliases: ['type'] type: str security_groups: @@ -90,7 +90,7 @@ options: max_bandwidth_out: description: - Maximum outgoing bandwidth to the public network, measured in Mbps (Megabits per second). - Required when C(allocate_public_ip=True). Ignored when C(allocate_public_ip=False). + Required when I(allocate_public_ip=true). Ignored when I(allocate_public_ip=false). default: 0 type: int host_name: @@ -154,7 +154,7 @@ options: type: str period: description: - - The charge duration of the instance, in month. Required when C(instance_charge_type=PrePaid). + - The charge duration of the instance, in months. Required when I(instance_charge_type=PrePaid). - The valid value are [1-9, 12, 24, 36]. default: 1 type: int @@ -165,7 +165,7 @@ options: default: False auto_renew_period: description: - - The duration of the automatic renew the charge of the instance. Required when C(auto_renew=True). + - The duration of the automatic renew the charge of the instance. Required when I(auto_renew=true). choices: [1, 2, 3, 6, 12] type: int instance_ids: @@ -217,31 +217,31 @@ options: version_added: '0.2.0' spot_strategy: description: - - The bidding mode of the pay-as-you-go instance. This parameter is valid when InstanceChargeType is set to PostPaid. + - The bidding mode of the pay-as-you-go instance. This parameter is valid when InstanceChargeType is set to PostPaid. choices: ['NoSpot', 'SpotWithPriceLimit', 'SpotAsPriceGo'] default: 'NoSpot' type: str version_added: '0.2.0' period_unit: description: - - The duration unit that you will buy the resource. It is valid when C(instance_charge_type=PrePaid) + - The duration unit that you will buy the resource. It is valid when I(instance_charge_type=PrePaid). choices: ['Month', 'Week'] default: 'Month' type: str version_added: '0.2.0' dry_run: description: - - Specifies whether to send a dry-run request. - - If I(dry_run=True), Only a dry-run request is sent and no instance is created. The system checks whether the - required parameters are set, and validates the request format, service permissions, and available ECS instances. - If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned. - - If I(dry_run=False), A request is sent. If the validation succeeds, the instance is created. + - Specifies whether to send a dry-run request. + - If I(dry_run=true), Only a dry-run request is sent and no instance is created. The system checks whether the + required parameters are set, and validates the request format, service permissions, and available ECS instances. + If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned. + - If I(dry_run=false), A request is sent. If the validation succeeds, the instance is created. default: False type: bool version_added: '0.2.0' include_data_disks: description: - - Whether to change instance disks charge type when changing instance charge type. + - Whether to change instance disks charge type when changing instance charge type. default: True type: bool version_added: '0.2.0' From 6e011f00f4e3cfa8f7bb11530ae7f7442f1d2549 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 5 Sep 2022 01:25:34 +1200 Subject: [PATCH 0205/2104] multiple modules: fixed markups in doc (#5227) --- plugins/modules/packaging/language/composer.py | 2 +- plugins/modules/packaging/os/layman.py | 2 +- plugins/modules/packaging/os/pacman.py | 6 +++--- plugins/modules/packaging/os/pkgng.py | 4 ++-- plugins/modules/packaging/os/pkgutil.py | 2 +- plugins/modules/packaging/os/sorcery.py | 2 +- plugins/modules/packaging/os/svr4pkg.py | 4 ++-- plugins/modules/packaging/os/zypper.py | 2 +- plugins/modules/remote_management/cobbler/cobbler_system.py | 4 ++-- plugins/modules/source_control/github/github_key.py | 4 ++-- plugins/modules/system/dconf.py | 2 +- plugins/modules/system/open_iscsi.py | 2 +- plugins/modules/system/osx_defaults.py | 2 +- plugins/modules/web_infrastructure/htpasswd.py | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index fbc5ba3f01..64310c760e 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -41,7 +41,7 @@ options: description: - Directory of your project (see --working-dir). This is required when the command is not run globally. - - Will be ignored if C(global_command=true). + - Will be ignored if I(global_command=true). global_command: description: - Runs the specified command globally. diff --git a/plugins/modules/packaging/os/layman.py b/plugins/modules/packaging/os/layman.py index 1b50ae48cd..b860385969 100644 --- a/plugins/modules/packaging/os/layman.py +++ b/plugins/modules/packaging/os/layman.py @@ -25,7 +25,7 @@ options: name: description: - The overlay id to install, synchronize, or uninstall. - Use 'ALL' to sync all of the installed overlays (can be used only when C(state=updated)). + Use 'ALL' to sync all of the installed overlays (can be used only when I(state=updated)). required: true type: str list_url: diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index a1e0daf455..c8d6caebe5 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -45,9 +45,9 @@ options: force: description: - When removing packages, forcefully remove them, without any checks. - Same as C(extra_args="--nodeps --nodeps"). + Same as I(extra_args="--nodeps --nodeps"). When combined with I(update_cache), force a refresh of all package databases. - Same as C(update_cache_extra_args="--refresh --refresh"). + Same as I(update_cache_extra_args="--refresh --refresh"). default: false type: bool @@ -115,7 +115,7 @@ options: reason_for: description: - Set the install reason for C(all) packages or only for C(new) packages. - - In case of C(state=latest) already installed packages which will be updated to a newer version are not counted as C(new). + - In case of I(state=latest) already installed packages which will be updated to a newer version are not counted as C(new). default: new choices: [ all, new ] type: str diff --git a/plugins/modules/packaging/os/pkgng.py b/plugins/modules/packaging/os/pkgng.py index 2160c80e48..5f4a2a5f27 100644 --- a/plugins/modules/packaging/os/pkgng.py +++ b/plugins/modules/packaging/os/pkgng.py @@ -24,10 +24,10 @@ options: name: description: - Name or list of names of packages to install/remove. - - "With I(name=*), I(state: latest) will operate, but I(state: present) and I(state: absent) will be noops." + - "With I(name=*), I(state=latest) will operate, but I(state=present) and I(state=absent) will be noops." - > Warning: In Ansible 2.9 and earlier this module had a misfeature - where I(name=*) with I(state: latest) or I(state: present) would + where I(name=*) with I(state=latest) or I(state=present) would install every package from every package repository, filling up the machines disk. Avoid using them unless you are certain that your role will only be used with newer versions. diff --git a/plugins/modules/packaging/os/pkgutil.py b/plugins/modules/packaging/os/pkgutil.py index e81f176b4a..d15c9d2726 100644 --- a/plugins/modules/packaging/os/pkgutil.py +++ b/plugins/modules/packaging/os/pkgutil.py @@ -27,7 +27,7 @@ options: name: description: - The name of the package. - - When using C(state=latest), this can be C('*'), which updates all installed packages managed by pkgutil. + - When using I(state=latest), this can be C('*'), which updates all installed packages managed by pkgutil. type: list required: true elements: str diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index e1d353dbce..23070ad3b3 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -39,7 +39,7 @@ options: description: - Whether to cast, dispel or rebuild a package - state C(cast) is an equivalent of C(present), not C(latest) - - state C(latest) always triggers C(update_cache=true) + - state C(latest) always triggers I(update_cache=true) - state C(rebuild) implies cast of all specified spells, not only those existed before choices: ["present", "latest", "absent", "cast", "dispelled", "rebuild"] diff --git a/plugins/modules/packaging/os/svr4pkg.py b/plugins/modules/packaging/os/svr4pkg.py index 6501d36bb4..51e43b079f 100644 --- a/plugins/modules/packaging/os/svr4pkg.py +++ b/plugins/modules/packaging/os/svr4pkg.py @@ -39,13 +39,13 @@ options: src: description: - - Specifies the location to install the package from. Required when C(state=present). + - Specifies the location to install the package from. Required when I(state=present). - "Can be any path acceptable to the C(pkgadd) command's C(-d) option. e.g.: C(somefile.pkg), C(/dir/with/pkgs), C(http:/server/mypkgs.pkg)." - If using a file or directory, they must already be accessible by the host. See the M(ansible.builtin.copy) module for a way to get them there. type: str proxy: description: - - HTTP[s] proxy to be used if C(src) is a URL. + - HTTP[s] proxy to be used if I(src) is a URL. type: str response_file: description: diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/packaging/os/zypper.py index d75a8c593b..c5404975e8 100644 --- a/plugins/modules/packaging/os/zypper.py +++ b/plugins/modules/packaging/os/zypper.py @@ -38,7 +38,7 @@ options: - Can include a version like C(name=1.0), C(name>3.4) or C(name<=2.7). If a version is given, C(oldpackage) is implied and zypper is allowed to update the package within the version range given. - You can also pass a url or a local path to a rpm file. - - When using state=latest, this can be '*', which updates all installed packages. + - When using I(state=latest), this can be '*', which updates all installed packages. required: true aliases: [ 'pkg' ] type: list diff --git a/plugins/modules/remote_management/cobbler/cobbler_system.py b/plugins/modules/remote_management/cobbler/cobbler_system.py index 7b70ccac34..34ef8c5701 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_system.py +++ b/plugins/modules/remote_management/cobbler/cobbler_system.py @@ -137,11 +137,11 @@ EXAMPLES = r''' RETURN = r''' systems: description: List of systems - returned: C(state=query) and C(name) is not provided + returned: I(state=query) and I(name) is not provided type: list system: description: (Resulting) information about the system we are working with - returned: when C(name) is provided + returned: when I(name) is provided type: dict ''' diff --git a/plugins/modules/source_control/github/github_key.py b/plugins/modules/source_control/github/github_key.py index 10dd3f9c00..23b5d53324 100644 --- a/plugins/modules/source_control/github/github_key.py +++ b/plugins/modules/source_control/github/github_key.py @@ -27,7 +27,7 @@ options: type: str pubkey: description: - - SSH public key value. Required when C(state=present). + - SSH public key value. Required when I(state=present). type: str state: description: @@ -39,7 +39,7 @@ options: description: - The default is C(true), which will replace the existing remote key if it's different than C(pubkey). If C(false), the key will only be - set if no key with the given C(name) exists. + set if no key with the given I(name) exists. type: bool default: true diff --git a/plugins/modules/system/dconf.py b/plugins/modules/system/dconf.py index a389179e51..61bf6f0e3f 100644 --- a/plugins/modules/system/dconf.py +++ b/plugins/modules/system/dconf.py @@ -34,7 +34,7 @@ notes: - Keep in mind that the C(dconf) CLI tool, which this module wraps around, utilises an unusual syntax for the values (GVariant). For example, if you wanted to provide a string value, the correct syntax would be - C(value="'myvalue'") - with single quotes as part of the Ansible parameter + I(value="'myvalue'") - with single quotes as part of the Ansible parameter value. - When using loops in combination with a value like :code:`"[('xkb', 'us'), ('xkb', 'se')]"`, you need to be aware of possible diff --git a/plugins/modules/system/open_iscsi.py b/plugins/modules/system/open_iscsi.py index 23157df874..7704fd8b7f 100644 --- a/plugins/modules/system/open_iscsi.py +++ b/plugins/modules/system/open_iscsi.py @@ -78,7 +78,7 @@ options: - Whether the list of target nodes on the portal should be (re)discovered and added to the persistent iSCSI database. - Keep in mind that C(iscsiadm) discovery resets configuration, like C(node.startup) - to manual, hence combined with C(auto_node_startup=true) will always return + to manual, hence combined with I(auto_node_startup=true) will always return a changed state. type: bool default: false diff --git a/plugins/modules/system/osx_defaults.py b/plugins/modules/system/osx_defaults.py index 8f7c2a8cf3..5ad390ca33 100644 --- a/plugins/modules/system/osx_defaults.py +++ b/plugins/modules/system/osx_defaults.py @@ -51,7 +51,7 @@ options: value: description: - The value to write. - - Only required when C(state=present). + - Only required when I(state=present). type: raw state: description: diff --git a/plugins/modules/web_infrastructure/htpasswd.py b/plugins/modules/web_infrastructure/htpasswd.py index 4590607cc7..4f05d21b0d 100644 --- a/plugins/modules/web_infrastructure/htpasswd.py +++ b/plugins/modules/web_infrastructure/htpasswd.py @@ -56,7 +56,7 @@ options: type: bool default: true description: - - Used with C(state=present). If specified, the file will be created + - Used with I(state=present). If specified, the file will be created if it does not already exist. If set to C(false), will fail if the file does not exist notes: From 999fc475a28cd41d78de5a3ff2df693513eab6e0 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 6 Sep 2022 17:31:25 +1200 Subject: [PATCH 0206/2104] multiple modules 2: fixed markups in doc (#5237) * multiple modules 2: fixed markups in doc * Update plugins/modules/cloud/misc/proxmox_template.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../modules/cloud/misc/proxmox_template.py | 24 ++++++------ .../modules/cloud/opennebula/one_service.py | 30 +++++++-------- plugins/modules/cloud/rackspace/rax_cbs.py | 22 +++++------ plugins/modules/net_tools/haproxy.py | 10 ++--- plugins/modules/net_tools/netcup_dns.py | 22 +++++------ plugins/modules/system/cronvar.py | 6 +-- plugins/modules/system/filesystem.py | 12 +++--- .../web_infrastructure/deploy_helper.py | 38 +++++++++---------- .../modules/web_infrastructure/jenkins_job.py | 8 ++-- 9 files changed, 86 insertions(+), 86 deletions(-) diff --git a/plugins/modules/cloud/misc/proxmox_template.py b/plugins/modules/cloud/misc/proxmox_template.py index 051a70f564..975949efe3 100644 --- a/plugins/modules/cloud/misc/proxmox_template.py +++ b/plugins/modules/cloud/misc/proxmox_template.py @@ -22,45 +22,45 @@ options: type: str src: description: - - path to uploaded file - - required only for C(state=present) + - Path to uploaded file. + - Required only for I(state=present). type: path template: description: - - the template name - - Required for state C(absent) to delete a template. - - Required for state C(present) to download an appliance container template (pveam). + - The template name. + - Required for I(state=absent) to delete a template. + - Required for I(state=present) to download an appliance container template (pveam). type: str content_type: description: - - content type - - required only for C(state=present) + - Content type. + - Required only for I(state=present). type: str default: 'vztmpl' choices: ['vztmpl', 'iso'] storage: description: - - target storage + - Target storage. type: str default: 'local' timeout: description: - - timeout for operations + - Timeout for operations. type: int default: 30 force: description: - - can be used only with C(state=present), exists template will be overwritten + - It can only be used with I(state=present), existing template will be overwritten. type: bool default: false state: description: - - Indicate desired state of the template + - Indicate desired state of the template. type: str choices: ['present', 'absent'] default: present notes: - - Requires proxmoxer and requests modules on host. This modules can be installed with pip. + - Requires C(proxmoxer) and C(requests) modules on host. This modules can be installed with M(ansible.builtin.pip). author: Sergei Antipov (@UnderGreen) extends_documentation_fragment: community.general.proxmox.documentation ''' diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index 44390c5f3d..c91708fddd 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -50,30 +50,30 @@ options: type: str template_name: description: - - Name of service template to use to create a new instance of a service + - Name of service template to use to create a new instance of a service. type: str template_id: description: - - ID of a service template to use to create a new instance of a service + - ID of a service template to use to create a new instance of a service. type: int service_id: description: - - ID of a service instance that you would like to manage + - ID of a service instance that you would like to manage. type: int service_name: description: - - Name of a service instance that you would like to manage + - Name of a service instance that you would like to manage. type: str unique: description: - - Setting C(unique=true) will make sure that there is only one service instance running with a name set with C(service_name) when - - instantiating a service from a template specified with C(template_id)/C(template_name). Check examples below. + - Setting I(unique=true) will make sure that there is only one service instance running with a name set with C(service_name) when + instantiating a service from a template specified with I(template_id) or I(template_name). Check examples below. type: bool default: false state: description: - - C(present) - instantiate a service from a template specified with C(template_id)/C(template_name). - - C(absent) - terminate an instance of a service specified with C(service_id)/C(service_name). + - C(present) - instantiate a service from a template specified with I(template_id) or I(template_name). + - C(absent) - terminate an instance of a service specified with I(template_id) or I(template_name). choices: ["present", "absent"] default: present type: str @@ -83,20 +83,20 @@ options: type: str owner_id: description: - - ID of the user which will be set as the owner of the service + - ID of the user which will be set as the owner of the service. type: int group_id: description: - - ID of the group which will be set as the group of the service + - ID of the group which will be set as the group of the service. type: int wait: description: - - Wait for the instance to reach RUNNING state after DEPLOYING or COOLDOWN state after SCALING + - Wait for the instance to reach RUNNING state after DEPLOYING or COOLDOWN state after SCALING. type: bool default: false wait_timeout: description: - - How long before wait gives up, in seconds + - How long before wait gives up, in seconds. default: 300 type: int custom_attrs: @@ -106,15 +106,15 @@ options: type: dict role: description: - - Name of the role whose cardinality should be changed + - Name of the role whose cardinality should be changed. type: str cardinality: description: - - Number of VMs for the specified role + - Number of VMs for the specified role. type: int force: description: - - Force the new cardinality even if it is outside the limits + - Force the new cardinality even if it is outside the limits. type: bool default: false author: diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index cf3e901a9b..5a4cd868b6 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -18,34 +18,34 @@ options: description: type: str description: - - Description to give the volume being created + - Description to give the volume being created. image: type: str description: - - image to use for bootable volumes. Can be an C(id), C(human_id) or - C(name). This option requires C(pyrax>=1.9.3) + - Image to use for bootable volumes. Can be an C(id), C(human_id) or + C(name). This option requires C(pyrax>=1.9.3). meta: type: dict description: - - A hash of metadata to associate with the volume + - A hash of metadata to associate with the volume. name: type: str description: - - Name to give the volume being created + - Name to give the volume being created. required: true size: type: int description: - - Size of the volume to create in Gigabytes + - Size of the volume to create in Gigabytes. default: 100 snapshot_id: type: str description: - - The id of the snapshot to create the volume from + - The id of the snapshot to create the volume from. state: type: str description: - - Indicate desired state of the resource + - Indicate desired state of the resource. choices: - present - absent @@ -53,20 +53,20 @@ options: volume_type: type: str description: - - Type of the volume being created + - Type of the volume being created. choices: - SATA - SSD default: SATA wait: description: - - wait for the volume to be in state 'available' before returning + - Wait for the volume to be in state C(available) before returning. type: bool default: false wait_timeout: type: int description: - - how long before wait gives up, in seconds + - how long before wait gives up, in seconds. default: 300 author: - "Christopher H. Laco (@claco)" diff --git a/plugins/modules/net_tools/haproxy.py b/plugins/modules/net_tools/haproxy.py index 322d2344bc..38033bc81a 100644 --- a/plugins/modules/net_tools/haproxy.py +++ b/plugins/modules/net_tools/haproxy.py @@ -21,7 +21,7 @@ notes: sockets configured for level 'admin'. For example, you can add the line 'stats socket /var/run/haproxy.sock level admin' to the general section of haproxy.cfg. See U(http://haproxy.1wt.eu/download/1.5/doc/configuration.txt). - - Depends on netcat (nc) being available; you need to install the appropriate + - Depends on netcat (C(nc)) being available; you need to install the appropriate package for your operating system before this module can be used. options: backend: @@ -33,7 +33,7 @@ options: description: - Wait until the server has no active connections or until the timeout determined by wait_interval and wait_retries is reached. - - Continue only after the status changes to 'MAINT'. + - Continue only after the status changes to C(MAINT). - This overrides the shutdown_sessions option. type: bool default: false @@ -78,13 +78,13 @@ options: version_added: "1.0.0" fail_on_not_found: description: - - Fail whenever trying to enable/disable a backend host that does not exist + - Fail whenever trying to enable/disable a backend host that does not exist. type: bool default: false wait: description: - - Wait until the server reports a status of 'UP' when C(state=enabled), - status of 'MAINT' when C(state=disabled) or status of 'DRAIN' when C(state=drain) + - Wait until the server reports a status of C(UP) when I(state=enabled), + status of C(MAINT) when I(state=disabled) or status of C(DRAIN) when I(state=drain). type: bool default: false wait_interval: diff --git a/plugins/modules/net_tools/netcup_dns.py b/plugins/modules/net_tools/netcup_dns.py index bf5422ee86..db6bcd61ad 100644 --- a/plugins/modules/net_tools/netcup_dns.py +++ b/plugins/modules/net_tools/netcup_dns.py @@ -15,59 +15,59 @@ module: netcup_dns notes: [] short_description: manage Netcup DNS records description: - - "Manages DNS records via the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php)" + - "Manages DNS records via the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php)." options: api_key: description: - - API key for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net)) + - "API key for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))." required: True type: str api_password: description: - - API password for authentication, must be obtained via the netcup CCP (https://ccp.netcup.net) + - "API password for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))." required: True type: str customer_id: description: - - Netcup customer id + - Netcup customer id. required: True type: int domain: description: - - Domainname the records should be added / removed + - Domainname the records should be added / removed. required: True type: str record: description: - - Record to add or delete, supports wildcard (*). Default is C(@) (e.g. the zone name) + - Record to add or delete, supports wildcard (*). Default is C(@) (e.g. the zone name). default: "@" aliases: [ name ] type: str type: description: - - Record type + - Record type. choices: ['A', 'AAAA', 'MX', 'CNAME', 'CAA', 'SRV', 'TXT', 'TLSA', 'NS', 'DS'] required: True type: str value: description: - - Record value + - Record value. required: true type: str solo: type: bool default: False description: - - Whether the record should be the only one for that record type and record name. Only use with C(state=present) + - Whether the record should be the only one for that record type and record name. Only use with I(state=present). - This will delete all other records with the same record name and type. priority: description: - - Record priority. Required for C(type=MX) + - Record priority. Required for I(type=MX). required: False type: int state: description: - - Whether the record should exist or not + - Whether the record should exist or not. required: False default: present choices: [ 'present', 'absent' ] diff --git a/plugins/modules/system/cronvar.py b/plugins/modules/system/cronvar.py index fd539c1d1f..9299880537 100644 --- a/plugins/modules/system/cronvar.py +++ b/plugins/modules/system/cronvar.py @@ -33,16 +33,16 @@ options: value: description: - The value to set this variable to. - - Required if C(state=present). + - Required if I(state=present). type: str insertafter: description: - If specified, the variable will be inserted after the variable specified. - - Used with C(state=present). + - Used with I(state=present). type: str insertbefore: description: - - Used with C(state=present). If specified, the variable will be inserted + - Used with I(state=present). If specified, the variable will be inserted just before the variable specified. type: str state: diff --git a/plugins/modules/system/filesystem.py b/plugins/modules/system/filesystem.py index d88f104a4a..4dcfddee23 100644 --- a/plugins/modules/system/filesystem.py +++ b/plugins/modules/system/filesystem.py @@ -22,11 +22,11 @@ description: options: state: description: - - If C(state=present), the filesystem is created if it doesn't already + - If I(state=present), the filesystem is created if it doesn't already exist, that is the default behaviour if I(state) is omitted. - - If C(state=absent), filesystem signatures on I(dev) are wiped if it + - If I(state=absent), filesystem signatures on I(dev) are wiped if it contains a filesystem (as known by C(blkid)). - - When C(state=absent), all other options but I(dev) are ignored, and the + - When I(state=absent), all other options but I(dev) are ignored, and the module doesn't fail if the device I(dev) doesn't actually exist. type: str choices: [ present, absent ] @@ -36,7 +36,7 @@ options: choices: [ btrfs, ext2, ext3, ext4, ext4dev, f2fs, lvm, ocfs2, reiserfs, xfs, vfat, swap, ufs ] description: - Filesystem type to be created. This option is required with - C(state=present) (or if I(state) is omitted). + I(state=present) (or if I(state) is omitted). - ufs support has been added in community.general 3.4.0. type: str aliases: [type] @@ -65,12 +65,12 @@ options: - XFS Will only grow if mounted. Currently, the module is based on commands from C(util-linux) package to perform operations, so resizing of XFS is not supported on FreeBSD systems. - - vFAT will likely fail if fatresize < 1.04. + - vFAT will likely fail if C(fatresize < 1.04). type: bool default: false opts: description: - - List of options to be passed to mkfs command. + - List of options to be passed to C(mkfs) command. type: str requirements: - Uses specific tools related to the I(fstype) for creating or resizing a diff --git a/plugins/modules/web_infrastructure/deploy_helper.py b/plugins/modules/web_infrastructure/deploy_helper.py index 721f51f3c7..b30470d38c 100644 --- a/plugins/modules/web_infrastructure/deploy_helper.py +++ b/plugins/modules/web_infrastructure/deploy_helper.py @@ -20,8 +20,8 @@ description: - The Deploy Helper manages some of the steps common in deploying software. It creates a folder structure, manages a symlink for the current release and cleans up old releases. - - "Running it with the C(state=query) or C(state=present) will return the C(deploy_helper) fact. - C(project_path), whatever you set in the path parameter, + - "Running it with the I(state=query) or I(state=present) will return the C(deploy_helper) fact. + C(project_path), whatever you set in the I(path) parameter, C(current_path), the path to the symlink that points to the active release, C(releases_path), the path to the folder to keep releases in, C(shared_path), the path to the folder to keep shared resources in, @@ -37,40 +37,40 @@ options: required: True aliases: ['dest'] description: - - the root path of the project. Alias I(dest). + - The root path of the project. Returned in the C(deploy_helper.project_path) fact. state: type: str description: - - the state of the project. + - The state of the project. C(query) will only gather facts, C(present) will create the project I(root) folder, and in it the I(releases) and I(shared) folders, C(finalize) will remove the unfinished_filename file, create a symlink to the newly deployed release and optionally clean old releases, C(clean) will remove failed & old releases, - C(absent) will remove the project folder (synonymous to the M(ansible.builtin.file) module with C(state=absent)) + C(absent) will remove the project folder (synonymous to the M(ansible.builtin.file) module with I(state=absent)). choices: [ present, finalize, absent, clean, query ] default: present release: type: str description: - - the release version that is being deployed. Defaults to a timestamp format %Y%m%d%H%M%S (i.e. '20141119223359'). - This parameter is optional during C(state=present), but needs to be set explicitly for C(state=finalize). - You can use the generated fact C(release={{ deploy_helper.new_release }}). + - The release version that is being deployed. Defaults to a timestamp format %Y%m%d%H%M%S (i.e. '20141119223359'). + This parameter is optional during I(state=present), but needs to be set explicitly for I(state=finalize). + You can use the generated fact I(release={{ deploy_helper.new_release }}). releases_path: type: str description: - - the name of the folder that will hold the releases. This can be relative to C(path) or absolute. + - The name of the folder that will hold the releases. This can be relative to I(path) or absolute. Returned in the C(deploy_helper.releases_path) fact. default: releases shared_path: type: path description: - - the name of the folder that will hold the shared resources. This can be relative to C(path) or absolute. + - The name of the folder that will hold the shared resources. This can be relative to I(path) or absolute. If this is set to an empty string, no shared folder will be created. Returned in the C(deploy_helper.shared_path) fact. default: shared @@ -78,38 +78,38 @@ options: current_path: type: path description: - - the name of the symlink that is created when the deploy is finalized. Used in C(finalize) and C(clean). + - The name of the symlink that is created when the deploy is finalized. Used in I(finalize) and I(clean). Returned in the C(deploy_helper.current_path) fact. default: current unfinished_filename: type: str description: - - the name of the file that indicates a deploy has not finished. All folders in the releases_path that - contain this file will be deleted on C(state=finalize) with clean=True, or C(state=clean). This file is - automatically deleted from the I(new_release_path) during C(state=finalize). + - The name of the file that indicates a deploy has not finished. All folders in the I(releases_path) that + contain this file will be deleted on I(state=finalize) with I(clean=True), or I(state=clean). This file is + automatically deleted from the I(new_release_path) during I(state=finalize). default: DEPLOY_UNFINISHED clean: description: - - Whether to run the clean procedure in case of C(state=finalize). + - Whether to run the clean procedure in case of I(state=finalize). type: bool default: true keep_releases: type: int description: - - the number of old releases to keep when cleaning. Used in C(finalize) and C(clean). Any unfinished builds + - The number of old releases to keep when cleaning. Used in I(finalize) and I(clean). Any unfinished builds will be deleted first, so only correct releases will count. The current version will not count. default: 5 notes: - - Facts are only returned for C(state=query) and C(state=present). If you use both, you should pass any overridden + - Facts are only returned for I(state=query) and I(state=present). If you use both, you should pass any overridden parameters to both calls, otherwise the second call will overwrite the facts of the first one. - - When using C(state=clean), the releases are ordered by I(creation date). You should be able to switch to a + - When using I(state=clean), the releases are ordered by I(creation date). You should be able to switch to a new naming strategy without problems. - Because of the default behaviour of generating the I(new_release) fact, this module will not be idempotent - unless you pass your own release name with C(release). Due to the nature of deploying software, this should not + unless you pass your own release name with I(release). Due to the nature of deploying software, this should not be much of a problem. extends_documentation_fragment: files ''' diff --git a/plugins/modules/web_infrastructure/jenkins_job.py b/plugins/modules/web_infrastructure/jenkins_job.py index 7930766b8e..063409510d 100644 --- a/plugins/modules/web_infrastructure/jenkins_job.py +++ b/plugins/modules/web_infrastructure/jenkins_job.py @@ -23,14 +23,14 @@ options: description: - config in XML format. - Required if job does not yet exist. - - Mutually exclusive with C(enabled). - - Considered if C(state=present). + - Mutually exclusive with I(enabled). + - Considered if I(state=present). required: false enabled: description: - Whether the job should be enabled or disabled. - - Mutually exclusive with C(config). - - Considered if C(state=present). + - Mutually exclusive with I(config). + - Considered if I(state=present). type: bool required: false name: From 88c3865cdb2b14c16cd81522eaada0a7919448d3 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 6 Sep 2022 17:32:35 +1200 Subject: [PATCH 0207/2104] Multiple doc fix 3 (#5238) * multiple modules 2: fixed markups in doc * multiple modules 3: fixed markups in doc * fixed yaml * Update plugins/modules/cloud/misc/proxmox_template.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../cloud/univention/udm_dns_record.py | 2 +- .../modules/cloud/univention/udm_dns_zone.py | 4 +- plugins/modules/cloud/univention/udm_share.py | 6 +-- plugins/modules/cloud/univention/udm_user.py | 6 +-- .../cloud/webfaction/webfaction_domain.py | 2 +- plugins/modules/files/ini_file.py | 8 ++-- plugins/modules/files/iso_extract.py | 4 +- plugins/modules/files/xml.py | 40 +++++++++---------- plugins/modules/monitoring/nagios.py | 19 ++++----- plugins/modules/monitoring/spectrum_device.py | 12 ++---- plugins/modules/net_tools/cloudflare_dns.py | 28 ++++++------- 11 files changed, 64 insertions(+), 67 deletions(-) diff --git a/plugins/modules/cloud/univention/udm_dns_record.py b/plugins/modules/cloud/univention/udm_dns_record.py index 42cc8a5cef..13eb4feed4 100644 --- a/plugins/modules/cloud/univention/udm_dns_record.py +++ b/plugins/modules/cloud/univention/udm_dns_record.py @@ -56,7 +56,7 @@ options: default: {} description: - "Additional data for this record, e.g. ['a': '192.0.2.1']. - Required if C(state=present)." + Required if I(state=present)." ''' diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/cloud/univention/udm_dns_zone.py index 831ef3474a..9b80368536 100644 --- a/plugins/modules/cloud/univention/udm_dns_zone.py +++ b/plugins/modules/cloud/univention/udm_dns_zone.py @@ -44,13 +44,13 @@ options: type: list elements: str description: - - List of appropriate name servers. Required if C(state=present). + - List of appropriate name servers. Required if I(state=present). interfaces: type: list elements: str description: - List of interface IP addresses, on which the server should - response this zone. Required if C(state=present). + response this zone. Required if I(state=present). refresh: type: int diff --git a/plugins/modules/cloud/univention/udm_share.py b/plugins/modules/cloud/univention/udm_share.py index 9438f338cb..c0077bdc1c 100644 --- a/plugins/modules/cloud/univention/udm_share.py +++ b/plugins/modules/cloud/univention/udm_share.py @@ -38,17 +38,17 @@ options: required: false description: - Host FQDN (server which provides the share), e.g. C({{ - ansible_fqdn }}). Required if C(state=present). + ansible_fqdn }}). Required if I(state=present). type: str path: required: false description: - - Directory on the providing server, e.g. C(/home). Required if C(state=present). + - Directory on the providing server, e.g. C(/home). Required if I(state=present). type: path sambaName: required: false description: - - Windows name. Required if C(state=present). + - Windows name. Required if I(state=present). type: str aliases: [ samba_name ] ou: diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index de7e474d8a..5fef1a337a 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -37,15 +37,15 @@ options: type: str firstname: description: - - First name. Required if C(state=present). + - First name. Required if I(state=present). type: str lastname: description: - - Last name. Required if C(state=present). + - Last name. Required if I(state=present). type: str password: description: - - Password. Required if C(state=present). + - Password. Required if I(state=present). type: str birthday: description: diff --git a/plugins/modules/cloud/webfaction/webfaction_domain.py b/plugins/modules/cloud/webfaction/webfaction_domain.py index c10baf83a2..79485d629c 100644 --- a/plugins/modules/cloud/webfaction/webfaction_domain.py +++ b/plugins/modules/cloud/webfaction/webfaction_domain.py @@ -19,7 +19,7 @@ description: - Add or remove domains or subdomains on a Webfaction host. Further documentation at https://github.com/quentinsf/ansible-webfaction. author: Quentin Stafford-Fraser (@quentinsf) notes: - - If you are I(deleting) domains by using C(state=absent), then note that if you specify subdomains, just those particular subdomains will be deleted. + - If you are I(deleting) domains by using I(state=absent), then note that if you specify subdomains, just those particular subdomains will be deleted. If you don't specify subdomains, the domain will be deleted. - > You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API. diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/files/ini_file.py index 1ad82a5180..aaef3bb3db 100644 --- a/plugins/modules/files/ini_file.py +++ b/plugins/modules/files/ini_file.py @@ -33,7 +33,7 @@ options: aliases: [ dest ] section: description: - - Section name in INI file. This is added if C(state=present) automatically when + - Section name in INI file. This is added if I(state=present) automatically when a single value is being set. - If left empty or set to C(null), the I(option) will be placed before the first I(section). - Using C(null) is also required if the config format does not support sections. @@ -69,11 +69,11 @@ options: state: description: - If set to C(absent) and I(exclusive) set to C(true) all matching I(option) lines are removed. - - If set to C(absent) and I(exclusive) set to C(false) the specified C(option=value) lines are removed, + - If set to C(absent) and I(exclusive) set to C(false) the specified I(option=value) lines are removed, but the other I(option)s with the same name are not touched. - - If set to C(present) and I(exclusive) set to C(false) the specified C(option=values) lines are added, + - If set to C(present) and I(exclusive) set to C(false) the specified I(option=values) lines are added, but the other I(option)s with the same name are not touched. - - If set to C(present) and I(exclusive) set to C(true) all given C(option=values) lines will be + - If set to C(present) and I(exclusive) set to C(true) all given I(option=values) lines will be added and the other I(option)s with the same name are removed. type: str choices: [ absent, present ] diff --git a/plugins/modules/files/iso_extract.py b/plugins/modules/files/iso_extract.py index fb88f09882..6693fc3884 100644 --- a/plugins/modules/files/iso_extract.py +++ b/plugins/modules/files/iso_extract.py @@ -28,7 +28,7 @@ description: mounts the ISO image to a temporary location, and copies files to a given destination, if needed. requirements: -- Either 7z (from I(7zip) or I(p7zip) package) +- Either 7z (from C(7zip) or C(p7zip) package) - Or mount capabilities (root-access, or CAP_SYS_ADMIN capability on Linux) options: image: @@ -62,7 +62,7 @@ options: type: path notes: - Only the file checksum (content) is taken into account when extracting files - from the ISO image. If C(force=false), only checks the presence of the file. + from the ISO image. If I(force=false), only checks the presence of the file. - In Ansible 2.3 this module was using C(mount) and C(umount) commands only, requiring root access. This is no longer needed with the introduction of 7zip for extraction. diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index 1f8f50c4a4..05bbdf00c8 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -22,13 +22,13 @@ options: description: - Path to the file to operate on. - This file must exist ahead of time. - - This parameter is required, unless C(xmlstring) is given. + - This parameter is required, unless I(xmlstring) is given. type: path aliases: [ dest, file ] xmlstring: description: - A string containing XML on which to operate. - - This parameter is required, unless C(path) is given. + - This parameter is required, unless I(path) is given. type: str xpath: description: @@ -49,7 +49,7 @@ options: aliases: [ ensure ] attribute: description: - - The attribute to select when using parameter C(value). + - The attribute to select when using parameter I(value). - This is a string, not prepended with C(@). type: raw value: @@ -61,31 +61,31 @@ options: type: raw add_children: description: - - Add additional child-element(s) to a selected element for a given C(xpath). + - Add additional child-element(s) to a selected element for a given I(xpath). - Child elements must be given in a list and each item may be either a string (eg. C(children=ansible) to add an empty C() child element), or a hash where the key is an element name and the value is the element value. - - This parameter requires C(xpath) to be set. + - This parameter requires I(xpath) to be set. type: list elements: raw set_children: description: - - Set the child-element(s) of a selected element for a given C(xpath). + - Set the child-element(s) of a selected element for a given I(xpath). - Removes any existing children. - - Child elements must be specified as in C(add_children). - - This parameter requires C(xpath) to be set. + - Child elements must be specified as in I(add_children). + - This parameter requires I(xpath) to be set. type: list elements: raw count: description: - - Search for a given C(xpath) and provide the count of any matches. - - This parameter requires C(xpath) to be set. + - Search for a given I(xpath) and provide the count of any matches. + - This parameter requires I(xpath) to be set. type: bool default: false print_match: description: - - Search for a given C(xpath) and print out any matches. - - This parameter requires C(xpath) to be set. + - Search for a given I(xpath) and print out any matches. + - This parameter requires I(xpath) to be set. type: bool default: false pretty_print: @@ -95,13 +95,13 @@ options: default: false content: description: - - Search for a given C(xpath) and get content. - - This parameter requires C(xpath) to be set. + - Search for a given I(xpath) and get content. + - This parameter requires I(xpath) to be set. type: str choices: [ attribute, text ] input_type: description: - - Type of input for C(add_children) and C(set_children). + - Type of input for I(add_children) and I(set_children). type: str choices: [ xml, yaml ] default: yaml @@ -119,20 +119,20 @@ options: default: false insertbefore: description: - - Add additional child-element(s) before the first selected element for a given C(xpath). + - Add additional child-element(s) before the first selected element for a given I(xpath). - Child elements must be given in a list and each item may be either a string (eg. C(children=ansible) to add an empty C() child element), or a hash where the key is an element name and the value is the element value. - - This parameter requires C(xpath) to be set. + - This parameter requires I(xpath) to be set. type: bool default: false insertafter: description: - - Add additional child-element(s) after the last selected element for a given C(xpath). + - Add additional child-element(s) after the last selected element for a given I(xpath). - Child elements must be given in a list and each item may be either a string (eg. C(children=ansible) to add an empty C() child element), or a hash where the key is an element name and the value is the element value. - - This parameter requires C(xpath) to be set. + - This parameter requires I(xpath) to be set. type: bool default: false requirements: @@ -141,7 +141,7 @@ notes: - Use the C(--check) and C(--diff) options when testing your expressions. - The diff output is automatically pretty-printed, so may not reflect the actual file content, only the file structure. - This module does not handle complicated xpath expressions, so limit xpath selectors to simple expressions. -- Beware that in case your XML elements are namespaced, you need to use the C(namespaces) parameter, see the examples. +- Beware that in case your XML elements are namespaced, you need to use the I(namespaces) parameter, see the examples. - Namespaces prefix should be used for all children of an element where namespace is defined, unless another namespace is defined for them. seealso: - name: Xml module development community wiki diff --git a/plugins/modules/monitoring/nagios.py b/plugins/modules/monitoring/nagios.py index b36c6691d2..fe2f66065d 100644 --- a/plugins/modules/monitoring/nagios.py +++ b/plugins/modules/monitoring/nagios.py @@ -23,11 +23,11 @@ description: - The C(nagios) module is not idempotent. - All actions require the I(host) parameter to be given explicitly. In playbooks you can use the C({{inventory_hostname}}) variable to refer to the host the playbook is currently running on. - - You can specify multiple services at once by separating them with commas, .e.g., C(services=httpd,nfs,puppet). + - You can specify multiple services at once by separating them with commas, .e.g. I(services=httpd,nfs,puppet). - When specifying what service to handle there is a special service value, I(host), which will handle alerts/downtime/acknowledge for the I(host itself), - e.g., C(service=host). This keyword may not be given with other services at the same time. + e.g., I(service=host). This keyword may not be given with other services at the same time. I(Setting alerts/downtime/acknowledge for a host does not affect alerts/downtime/acknowledge for any of the services running on it.) - To schedule downtime for all services on particular host use keyword "all", e.g., C(service=all). + To schedule downtime for all services on particular host use keyword "all", e.g., I(service=all). options: action: description: @@ -52,17 +52,17 @@ options: author: description: - Author to leave downtime comments as. - Only usable with the C(downtime) and C(acknowledge) action. + Only used when I(action) is C(downtime) or C(acknowledge). type: str default: Ansible comment: description: - - Comment for C(downtime) and C(acknowledge)action. + - Comment when I(action) is C(downtime) or C(acknowledge). type: str default: Scheduling downtime start: description: - - When downtime should start, in time_t format (epoch seconds). + - When downtime should start, in C(time_t) format (epoch seconds). version_added: '0.2.0' type: str minutes: @@ -73,9 +73,10 @@ options: default: 30 services: description: - - What to manage downtime/alerts for. Separate multiple services with commas. - C(service) is an alias for C(services). - B(Required) option when using the C(downtime), C(acknowledge), C(forced_check), C(enable_alerts), and C(disable_alerts) actions. + - > + What to manage downtime/alerts for. Separate multiple services with commas. + I(service) is an alias for I(services). + B(Required) option when I(action) is one of: C(downtime), C(acknowledge), C(forced_check), C(enable_alerts), C(disable_alerts). aliases: [ "service" ] type: str servicegroup: diff --git a/plugins/modules/monitoring/spectrum_device.py b/plugins/modules/monitoring/spectrum_device.py index a72fd029c8..c2bab55016 100644 --- a/plugins/modules/monitoring/spectrum_device.py +++ b/plugins/modules/monitoring/spectrum_device.py @@ -29,7 +29,7 @@ options: type: str description: - SNMP community used for device discovery. - - Required when C(state=present). + - Required when I(state=present). required: true landscape: type: str @@ -38,7 +38,6 @@ options: - Landscape handle of the SpectroServer to which add or remove the device. state: type: str - required: false description: - On C(present) creates the device when it does not exist. - On C(absent) removes the device when it exists. @@ -49,7 +48,7 @@ options: aliases: [ oneclick_url ] required: true description: - - HTTP, HTTPS URL of the Oneclick server in the form (http|https)://host.domain[:port] + - HTTP, HTTPS URL of the Oneclick server in the form C((http|https)://host.domain[:port]). url_username: type: str aliases: [ oneclick_user ] @@ -63,17 +62,14 @@ options: description: - Oneclick user password. use_proxy: - required: false description: - - if C(false), it will not use a proxy, even if one is defined in an environment - variable on the target hosts. + - if C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. default: true type: bool validate_certs: - required: false description: - If C(false), SSL certificates will not be validated. This should only be used - on personally controlled sites using self-signed certificates. + on personally controlled sites using self-signed certificates. default: true type: bool agentport: diff --git a/plugins/modules/net_tools/cloudflare_dns.py b/plugins/modules/net_tools/cloudflare_dns.py index 12cd484565..dca9a8e176 100644 --- a/plugins/modules/net_tools/cloudflare_dns.py +++ b/plugins/modules/net_tools/cloudflare_dns.py @@ -44,39 +44,39 @@ options: algorithm: description: - Algorithm number. - - Required for C(type=DS) and C(type=SSHFP) when C(state=present). + - Required for I(type=DS) and I(type=SSHFP) when I(state=present). type: int cert_usage: description: - Certificate usage number. - - Required for C(type=TLSA) when C(state=present). + - Required for I(type=TLSA) when I(state=present). type: int choices: [ 0, 1, 2, 3 ] hash_type: description: - Hash type number. - - Required for C(type=DS), C(type=SSHFP) and C(type=TLSA) when C(state=present). + - Required for I(type=DS), I(type=SSHFP) and I(type=TLSA) when I(state=present). type: int choices: [ 1, 2 ] key_tag: description: - DNSSEC key tag. - - Needed for C(type=DS) when C(state=present). + - Needed for I(type=DS) when I(state=present). type: int port: description: - Service port. - - Required for C(type=SRV) and C(type=TLSA). + - Required for I(type=SRV) and I(type=TLSA). type: int priority: description: - Record priority. - - Required for C(type=MX) and C(type=SRV) + - Required for I(type=MX) and I(type=SRV) default: 1 type: int proto: description: - - Service protocol. Required for C(type=SRV) and C(type=TLSA). + - Service protocol. Required for I(type=SRV) and I(type=TLSA). - Common values are TCP and UDP. - Before Ansible 2.6 only TCP and UDP were available. type: str @@ -88,7 +88,7 @@ options: record: description: - Record to add. - - Required if C(state=present). + - Required if I(state=present). - Default is C(@) (e.g. the zone name). type: str default: '@' @@ -96,7 +96,7 @@ options: selector: description: - Selector number. - - Required for C(type=TLSA) when C(state=present). + - Required for I(type=TLSA) when I(state=present). choices: [ 0, 1 ] type: int service: @@ -107,7 +107,7 @@ options: solo: description: - Whether the record should be the only one for that record type and record name. - - Only use with C(state=present). + - Only use with I(state=present). - This will delete all other records with the same record name and type. type: bool state: @@ -129,20 +129,20 @@ options: default: 1 type: description: - - The type of DNS record to create. Required if C(state=present). - - C(type=DS), C(type=SSHFP) and C(type=TLSA) added in Ansible 2.7. + - The type of DNS record to create. Required if I(state=present). + - I(type=DS), I(type=SSHFP) and I(type=TLSA) added in Ansible 2.7. type: str choices: [ A, AAAA, CNAME, DS, MX, NS, SPF, SRV, SSHFP, TLSA, TXT ] value: description: - The record value. - - Required for C(state=present). + - Required for I(state=present). type: str aliases: [ content ] weight: description: - Service weight. - - Required for C(type=SRV). + - Required for I(type=SRV). type: int default: 1 zone: From 570445adc40dedc2e1d62906a67837d676f44e38 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 6 Sep 2022 17:33:55 +1200 Subject: [PATCH 0208/2104] nagios: some refactoring (#5239) * nagios: some refactoring * rollback one change * add changelog fragment * Update changelogs/fragments/5239-nagios-refactor.yaml Co-authored-by: Felix Fontein * Update plugins/modules/monitoring/nagios.py Co-authored-by: Felix Fontein * Update plugins/modules/monitoring/nagios.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/5239-nagios-refactor.yaml | 2 + plugins/modules/monitoring/nagios.py | 114 +++++------------- 2 files changed, 30 insertions(+), 86 deletions(-) create mode 100644 changelogs/fragments/5239-nagios-refactor.yaml diff --git a/changelogs/fragments/5239-nagios-refactor.yaml b/changelogs/fragments/5239-nagios-refactor.yaml new file mode 100644 index 0000000000..e57eef8262 --- /dev/null +++ b/changelogs/fragments/5239-nagios-refactor.yaml @@ -0,0 +1,2 @@ +minor_changes: + - nagios - minor refactoring on parameter validation for different actions (https://github.com//pull/5239). diff --git a/plugins/modules/monitoring/nagios.py b/plugins/modules/monitoring/nagios.py index fe2f66065d..4fb2a9ff45 100644 --- a/plugins/modules/monitoring/nagios.py +++ b/plugins/modules/monitoring/nagios.py @@ -252,8 +252,6 @@ import stat from ansible.module_utils.basic import AnsibleModule -###################################################################### - def which_cmdfile(): locations = [ # rhel @@ -287,8 +285,6 @@ def which_cmdfile(): return None -###################################################################### - def main(): ACTION_CHOICES = [ @@ -309,95 +305,42 @@ def main(): module = AnsibleModule( argument_spec=dict( - action=dict(required=True, choices=ACTION_CHOICES), - author=dict(default='Ansible'), - comment=dict(default='Scheduling downtime'), - host=dict(required=False, default=None), - servicegroup=dict(required=False, default=None), - start=dict(required=False, default=None), - minutes=dict(default=30, type='int'), - cmdfile=dict(default=which_cmdfile()), - services=dict(default=None, aliases=['service']), - command=dict(required=False, default=None), - ) + action=dict(type='str', required=True, choices=ACTION_CHOICES), + author=dict(type='str', default='Ansible'), + comment=dict(type='str', default='Scheduling downtime'), + host=dict(type='str'), + servicegroup=dict(type='str'), + start=dict(type='str'), + minutes=dict(type='int', default=30), + cmdfile=dict(type='str', default=which_cmdfile()), + services=dict(type='str', aliases=['service']), + command=dict(type='str'), + ), + required_if=[ + ('action', 'downtime', ['host', 'services']), + ('action', 'delete_downtime', ['host', 'services']), + ('action', 'silence', ['host']), + ('action', 'unsilence', ['host']), + ('action', 'enable_alerts', ['host', 'services']), + ('action', 'disable_alerts', ['host', 'services']), + ('action', 'command', ['command']), + ('action', 'servicegroup_host_downtime', ['host', 'servicegroup']), + ('action', 'servicegroup_service_downtime', ['host', 'servicegroup']), + ('action', 'acknowledge', ['host', 'services']), + ('action', 'forced_check', ['host', 'services']), + ], ) - action = module.params['action'] - host = module.params['host'] - servicegroup = module.params['servicegroup'] - start = module.params['start'] - services = module.params['services'] - cmdfile = module.params['cmdfile'] - command = module.params['command'] - - ################################################################## - # Required args per action: - # downtime = (minutes, service, host) - # acknowledge = (service, host) - # (un)silence = (host) - # (enable/disable)_alerts = (service, host) - # command = command - # - # AnsibleModule will verify most stuff, we need to verify - # 'service' manually. - - ################################################################## - if action not in ['command', 'silence_nagios', 'unsilence_nagios']: - if not host: - module.fail_json(msg='no host specified for action requiring one') - ###################################################################### - if action == 'downtime': - # Make sure there's an actual service selected - if not services: - module.fail_json(msg='no service selected to set downtime for') - - ###################################################################### - if action == 'delete_downtime': - # Make sure there's an actual service selected - if not services: - module.fail_json(msg='no service selected to set downtime for') - - ###################################################################### - - if action in ['servicegroup_service_downtime', 'servicegroup_host_downtime']: - # Make sure there's an actual servicegroup selected - if not servicegroup: - module.fail_json(msg='no servicegroup selected to set downtime for') - - ################################################################## - if action in ['enable_alerts', 'disable_alerts']: - if not services: - module.fail_json(msg='a service is required when setting alerts') - - if action in ['command']: - if not command: - module.fail_json(msg='no command passed for command action') - ###################################################################### - if action == 'acknowledge': - # Make sure there's an actual service selected - if not services: - module.fail_json(msg='no service selected to acknowledge') - - ################################################################## - if action == 'forced_check': - # Make sure there's an actual service selected - if not services: - module.fail_json(msg='no service selected to check') - - ################################################################## - if not cmdfile: + if not module.params['cmdfile']: module.fail_json(msg='unable to locate nagios.cfg') - ################################################################## ansible_nagios = Nagios(module, **module.params) if module.check_mode: module.exit_json(changed=True) else: ansible_nagios.act() - ################################################################## -###################################################################### class Nagios(object): """ Perform common tasks in Nagios related to downtime and @@ -454,10 +397,9 @@ class Nagios(object): self.module.fail_json(msg='nagios command file is not a fifo file', cmdfile=self.cmdfile) try: - fp = open(self.cmdfile, 'w') - fp.write(cmd) - fp.flush() - fp.close() + with open(self.cmdfile, 'w') as fp: + fp.write(cmd) + fp.flush() self.command_results.append(cmd.strip()) except IOError: self.module.fail_json(msg='unable to write to nagios command file', From 015566fb06628f5799ec2a0d33da0c4599262a28 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 6 Sep 2022 20:42:17 +0200 Subject: [PATCH 0209/2104] Normalize more booleans. (#5247) --- plugins/become/doas.py | 2 +- plugins/become/dzdo.py | 2 +- plugins/become/ksu.py | 4 +- plugins/become/machinectl.py | 2 +- plugins/become/pbrun.py | 4 +- plugins/become/pfexec.py | 4 +- plugins/become/pmrun.py | 2 +- plugins/become/sesu.py | 2 +- plugins/cache/pickle.py | 2 +- plugins/cache/redis.py | 2 +- plugins/cache/yaml.py | 2 +- plugins/callback/cgroup_memory_recap.py | 4 +- plugins/callback/diy.py | 2 +- plugins/callback/hipchat.py | 6 +-- plugins/callback/jabber.py | 8 ++-- plugins/callback/logdna.py | 10 ++-- plugins/callback/logentries.py | 6 +-- plugins/callback/selective.py | 2 +- plugins/callback/slack.py | 4 +- plugins/doc_fragments/ibm_storage.py | 6 +-- .../oracle_creatable_resource.py | 2 +- plugins/inventory/gitlab_runners.py | 2 +- plugins/inventory/nmap.py | 14 +++--- plugins/inventory/online.py | 4 +- plugins/inventory/opennebula.py | 8 ++-- plugins/inventory/scaleway.py | 2 +- plugins/inventory/virtualbox.py | 4 +- plugins/lookup/cartesian.py | 2 +- plugins/lookup/chef_databag.py | 4 +- plugins/lookup/consul_kv.py | 4 +- plugins/lookup/cyberarkpassword.py | 4 +- plugins/lookup/dnstxt.py | 2 +- plugins/lookup/etcd.py | 4 +- plugins/lookup/etcd3.py | 4 +- plugins/lookup/filetree.py | 2 +- plugins/lookup/flattened.py | 2 +- plugins/lookup/hiera.py | 2 +- plugins/lookup/manifold.py | 8 ++-- plugins/lookup/onepassword.py | 2 +- plugins/lookup/onepassword_raw.py | 2 +- plugins/lookup/passwordstore.py | 2 +- plugins/lookup/shelvefile.py | 4 +- .../modules/cloud/alicloud/ali_instance.py | 18 +++---- .../modules/cloud/atomic/atomic_container.py | 6 +-- plugins/modules/cloud/atomic/atomic_image.py | 2 +- .../cloud/centurylink/clc_aa_policy.py | 10 ++-- .../cloud/centurylink/clc_alert_policy.py | 6 +-- .../centurylink/clc_blueprint_package.py | 10 ++-- .../cloud/centurylink/clc_firewall_policy.py | 8 ++-- .../modules/cloud/centurylink/clc_group.py | 16 +++---- .../cloud/centurylink/clc_loadbalancer.py | 6 +-- .../cloud/centurylink/clc_modify_server.py | 2 +- .../modules/cloud/centurylink/clc_publicip.py | 6 +-- .../cloud/centurylink/clc_server_snapshot.py | 14 +++--- plugins/modules/cloud/huawei/hwc_vpc_eip.py | 2 +- plugins/modules/cloud/huawei/hwc_vpc_port.py | 2 +- .../cloud/huawei/hwc_vpc_private_ip.py | 2 +- .../modules/cloud/huawei/hwc_vpc_subnet.py | 2 +- plugins/modules/cloud/linode/linode.py | 12 ++--- plugins/modules/cloud/lxc/lxc_container.py | 2 +- .../modules/cloud/memset/memset_dns_reload.py | 2 +- .../cloud/memset/memset_zone_record.py | 2 +- plugins/modules/cloud/misc/proxmox_kvm.py | 2 +- plugins/modules/cloud/opennebula/one_vm.py | 2 +- plugins/modules/cloud/packet/packet_device.py | 2 +- .../modules/cloud/packet/packet_ip_subnet.py | 14 +++--- .../modules/cloud/packet/packet_project.py | 2 +- plugins/modules/cloud/packet/packet_sshkey.py | 2 +- plugins/modules/cloud/packet/packet_volume.py | 6 +-- plugins/modules/cloud/rackspace/rax.py | 4 +- plugins/modules/cloud/rackspace/rax_cbs.py | 2 +- .../cloud/rackspace/rax_cbs_attachments.py | 2 +- plugins/modules/cloud/rackspace/rax_cdb.py | 2 +- plugins/modules/cloud/rackspace/rax_clb.py | 2 +- plugins/modules/cloud/rackspace/rax_dns.py | 2 +- .../modules/cloud/rackspace/rax_dns_record.py | 6 +-- plugins/modules/cloud/rackspace/rax_facts.py | 2 +- .../cloud/rackspace/rax_files_objects.py | 2 +- .../modules/cloud/rackspace/rax_identity.py | 2 +- .../modules/cloud/rackspace/rax_keypair.py | 4 +- plugins/modules/cloud/rackspace/rax_meta.py | 2 +- .../modules/cloud/rackspace/rax_mon_alarm.py | 2 +- .../modules/cloud/rackspace/rax_mon_check.py | 2 +- .../modules/cloud/rackspace/rax_mon_entity.py | 2 +- .../cloud/rackspace/rax_mon_notification.py | 2 +- .../rackspace/rax_mon_notification_plan.py | 2 +- .../modules/cloud/rackspace/rax_network.py | 2 +- plugins/modules/cloud/rackspace/rax_queue.py | 2 +- plugins/modules/cloud/smartos/nictagadm.py | 4 +- plugins/modules/cloud/softlayer/sl_vm.py | 2 +- .../spotinst/spotinst_aws_elastigroup.py | 16 +++---- plugins/modules/cloud/univention/udm_share.py | 2 +- .../modules/clustering/consul/consul_acl.py | 2 +- .../modules/clustering/consul/consul_kv.py | 2 +- .../clustering/consul/consul_session.py | 2 +- .../modules/clustering/pacemaker_cluster.py | 2 +- .../aerospike/aerospike_migrations.py | 30 ++++++------ .../database/influxdb/influxdb_user.py | 2 +- .../database/misc/elasticsearch_plugin.py | 8 ++-- .../modules/database/misc/kibana_plugin.py | 2 +- .../modules/database/saphana/hana_query.py | 4 +- plugins/modules/files/iso_create.py | 4 +- plugins/modules/identity/ipa/ipa_host.py | 6 +-- plugins/modules/identity/ipa/ipa_vault.py | 4 +- .../identity/keycloak/keycloak_client.py | 40 ++++++++-------- .../identity/keycloak/keycloak_clientscope.py | 6 +-- .../keycloak/keycloak_clienttemplate.py | 8 ++-- plugins/modules/identity/onepassword_info.py | 10 ++-- plugins/modules/monitoring/bigpanda.py | 2 +- plugins/modules/monitoring/icinga2_feature.py | 2 +- plugins/modules/monitoring/logstash_plugin.py | 2 +- .../modules/monitoring/sensu/sensu_handler.py | 2 +- .../monitoring/statusio_maintenance.py | 8 ++-- plugins/modules/net_tools/cloudflare_dns.py | 6 +-- plugins/modules/net_tools/dnsmadeeasy.py | 6 +-- plugins/modules/net_tools/netcup_dns.py | 16 +++---- .../modules/net_tools/pritunl/pritunl_org.py | 6 +-- .../net_tools/pritunl/pritunl_org_info.py | 18 +++---- plugins/modules/notification/catapult.py | 2 +- plugins/modules/notification/mattermost.py | 4 +- plugins/modules/notification/mqtt.py | 2 +- plugins/modules/notification/rocketchat.py | 4 +- plugins/modules/notification/slack.py | 4 +- plugins/modules/notification/syslogger.py | 6 +-- plugins/modules/notification/telegram.py | 6 +-- plugins/modules/packaging/language/cpanm.py | 2 +- .../packaging/language/pip_package_info.py | 2 +- plugins/modules/packaging/os/homebrew_cask.py | 4 +- .../modules/packaging/os/rhsm_repository.py | 2 +- .../modules/packaging/os/rpm_ostree_pkg.py | 2 +- .../manageiq/manageiq_alert_profiles.py | 4 +- .../manageiq/manageiq_alerts.py | 8 ++-- .../manageiq/manageiq_group.py | 6 +-- .../manageiq/manageiq_policies.py | 6 +-- .../manageiq/manageiq_tags.py | 8 ++-- .../manageiq/manageiq_tenant.py | 10 ++-- .../manageiq/manageiq_user.py | 12 ++--- .../redfish/redfish_command.py | 4 +- .../redfish/redfish_config.py | 6 +-- .../remote_management/stacki/stacki_host.py | 8 ++-- .../bitbucket/bitbucket_pipeline_variable.py | 4 +- .../source_control/github/github_key.py | 6 +-- .../source_control/github/github_webhook.py | 2 +- .../source_control/gitlab/gitlab_group.py | 8 ++-- .../source_control/gitlab/gitlab_project.py | 10 ++-- .../gitlab/gitlab_project_members.py | 4 +- .../source_control/gitlab/gitlab_runner.py | 24 +++++----- .../source_control/gitlab/gitlab_user.py | 10 ++-- plugins/modules/storage/pmem/pmem.py | 6 +-- plugins/modules/storage/zfs/zfs_facts.py | 4 +- plugins/modules/storage/zfs/zpool_facts.py | 4 +- plugins/modules/system/beadm.py | 4 +- plugins/modules/system/java_cert.py | 4 +- plugins/modules/system/nosh.py | 6 +-- plugins/modules/system/parted.py | 2 +- plugins/modules/system/solaris_zone.py | 2 +- plugins/modules/system/syspatch.py | 2 +- .../web_infrastructure/apache2_module.py | 10 ++-- .../web_infrastructure/deploy_helper.py | 4 +- .../modules/web_infrastructure/jenkins_job.py | 4 +- .../web_infrastructure/jenkins_job_info.py | 2 +- .../web_infrastructure/rundeck_acl_policy.py | 6 +-- .../web_infrastructure/rundeck_project.py | 6 +-- .../sophos_utm/utm_ca_host_key_cert.py | 2 +- .../sophos_utm/utm_dns_host.py | 4 +- .../sophos_utm/utm_proxy_auth_profile.py | 10 ++-- .../sophos_utm/utm_proxy_exception.py | 48 +++++++++---------- .../sophos_utm/utm_proxy_frontend.py | 16 +++---- .../sophos_utm/utm_proxy_location.py | 8 ++-- .../modules/web_infrastructure/taiga_issue.py | 6 +-- 170 files changed, 465 insertions(+), 465 deletions(-) diff --git a/plugins/become/doas.py b/plugins/become/doas.py index d282e96851..69e730aad4 100644 --- a/plugins/become/doas.py +++ b/plugins/become/doas.py @@ -55,7 +55,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_DOAS_FLAGS become_pass: description: password for doas prompt - required: False + required: false vars: - name: ansible_become_password - name: ansible_become_pass diff --git a/plugins/become/dzdo.py b/plugins/become/dzdo.py index b3c34f377c..a358e84e39 100644 --- a/plugins/become/dzdo.py +++ b/plugins/become/dzdo.py @@ -55,7 +55,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_DZDO_FLAGS become_pass: description: Options to pass to dzdo - required: False + required: false vars: - name: ansible_become_password - name: ansible_become_pass diff --git a/plugins/become/ksu.py b/plugins/become/ksu.py index 29731d95d5..fa2f66864a 100644 --- a/plugins/become/ksu.py +++ b/plugins/become/ksu.py @@ -25,7 +25,7 @@ DOCUMENTATION = ''' env: - name: ANSIBLE_BECOME_USER - name: ANSIBLE_KSU_USER - required: True + required: true become_exe: description: Su executable default: ksu @@ -56,7 +56,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_KSU_FLAGS become_pass: description: ksu password - required: False + required: false vars: - name: ansible_ksu_pass - name: ansible_become_pass diff --git a/plugins/become/machinectl.py b/plugins/become/machinectl.py index 4b533baba0..3e13dfc2a5 100644 --- a/plugins/become/machinectl.py +++ b/plugins/become/machinectl.py @@ -56,7 +56,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_MACHINECTL_FLAGS become_pass: description: Password for machinectl - required: False + required: false vars: - name: ansible_become_password - name: ansible_become_pass diff --git a/plugins/become/pbrun.py b/plugins/become/pbrun.py index 3645e95fec..7d1437191e 100644 --- a/plugins/become/pbrun.py +++ b/plugins/become/pbrun.py @@ -56,7 +56,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_PBRUN_FLAGS become_pass: description: Password for pbrun - required: False + required: false vars: - name: ansible_become_password - name: ansible_become_pass @@ -69,7 +69,7 @@ DOCUMENTATION = ''' key: password wrap_exe: description: Toggle to wrap the command pbrun calls in 'shell -c' or not - default: False + default: false type: bool ini: - section: pbrun_become_plugin diff --git a/plugins/become/pfexec.py b/plugins/become/pfexec.py index f14c22e68f..43237342d4 100644 --- a/plugins/become/pfexec.py +++ b/plugins/become/pfexec.py @@ -59,7 +59,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_PFEXEC_FLAGS become_pass: description: pfexec password - required: False + required: false vars: - name: ansible_become_password - name: ansible_become_pass @@ -72,7 +72,7 @@ DOCUMENTATION = ''' key: password wrap_exe: description: Toggle to wrap the command pfexec calls in 'shell -c' or not - default: False + default: false type: bool ini: - section: pfexec_become_plugin diff --git a/plugins/become/pmrun.py b/plugins/become/pmrun.py index bb384aeedf..74b633f09a 100644 --- a/plugins/become/pmrun.py +++ b/plugins/become/pmrun.py @@ -42,7 +42,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_PMRUN_FLAGS become_pass: description: pmrun password - required: False + required: false vars: - name: ansible_become_password - name: ansible_become_pass diff --git a/plugins/become/sesu.py b/plugins/become/sesu.py index 751163d19e..5958c1bfca 100644 --- a/plugins/become/sesu.py +++ b/plugins/become/sesu.py @@ -56,7 +56,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_SESU_FLAGS become_pass: description: Password to pass to sesu - required: False + required: false vars: - name: ansible_become_password - name: ansible_become_pass diff --git a/plugins/cache/pickle.py b/plugins/cache/pickle.py index 10295bb5d2..06b673921e 100644 --- a/plugins/cache/pickle.py +++ b/plugins/cache/pickle.py @@ -16,7 +16,7 @@ DOCUMENTATION = ''' author: Brian Coca (@bcoca) options: _uri: - required: True + required: true description: - Path in which the cache plugin will save the files env: diff --git a/plugins/cache/redis.py b/plugins/cache/redis.py index 121f9b22f4..81e960cf18 100644 --- a/plugins/cache/redis.py +++ b/plugins/cache/redis.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' - The format is C(host:port:db:password), for example C(localhost:6379:0:changeme). - To use encryption in transit, prefix the connection with C(tls://), as in C(tls://localhost:6379:0:changeme). - To use redis sentinel, use separator C(;), for example C(localhost:26379;localhost:26379;0:changeme). Requires redis>=2.9.0. - required: True + required: true env: - name: ANSIBLE_CACHE_PLUGIN_CONNECTION ini: diff --git a/plugins/cache/yaml.py b/plugins/cache/yaml.py index 08620816b6..3a5ddf3e6f 100644 --- a/plugins/cache/yaml.py +++ b/plugins/cache/yaml.py @@ -16,7 +16,7 @@ DOCUMENTATION = ''' author: Brian Coca (@bcoca) options: _uri: - required: True + required: true description: - Path in which the cache plugin will save the files env: diff --git a/plugins/callback/cgroup_memory_recap.py b/plugins/callback/cgroup_memory_recap.py index a894336c8f..eedacfeecb 100644 --- a/plugins/callback/cgroup_memory_recap.py +++ b/plugins/callback/cgroup_memory_recap.py @@ -23,7 +23,7 @@ DOCUMENTATION = ''' - To create the cgroup, first use a command such as C(sudo cgcreate -a ec2-user:ec2-user -t ec2-user:ec2-user -g memory:ansible_profile) options: max_mem_file: - required: True + required: true description: Path to cgroups C(memory.max_usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes) env: - name: CGROUP_MAX_MEM_FILE @@ -31,7 +31,7 @@ DOCUMENTATION = ''' - section: callback_cgroupmemrecap key: max_mem_file cur_mem_file: - required: True + required: true description: Path to C(memory.usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes) env: - name: CGROUP_CUR_MEM_FILE diff --git a/plugins/callback/diy.py b/plugins/callback/diy.py index f62bc15440..55a07725f2 100644 --- a/plugins/callback/diy.py +++ b/plugins/callback/diy.py @@ -713,7 +713,7 @@ playbook.yml: > - name: Using alias vars (see ansible.cfg) ansible.builtin.debug: msg: - when: False + when: false vars: ansible_callback_diy_playbook_on_task_start_msg: "" on_skipped_msg: "DIY output(via task vars): skipped example:\n\e[0m\e[38;5;4m\u25b6\u25b6 {{ ansible_callback_diy.result.task.name }}\n" diff --git a/plugins/callback/hipchat.py b/plugins/callback/hipchat.py index dc70789dbe..3e10b69e7f 100644 --- a/plugins/callback/hipchat.py +++ b/plugins/callback/hipchat.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' options: token: description: HipChat API token for v1 or v2 API. - required: True + required: true env: - name: HIPCHAT_TOKEN ini: @@ -29,7 +29,7 @@ DOCUMENTATION = ''' key: token api_version: description: HipChat API version, v1 or v2. - required: False + required: false default: v1 env: - name: HIPCHAT_API_VERSION @@ -55,7 +55,7 @@ DOCUMENTATION = ''' notify: description: Add notify flag to important messages type: bool - default: True + default: true env: - name: HIPCHAT_NOTIFY ini: diff --git a/plugins/callback/jabber.py b/plugins/callback/jabber.py index 3fd0b6fb97..823ae20144 100644 --- a/plugins/callback/jabber.py +++ b/plugins/callback/jabber.py @@ -20,22 +20,22 @@ DOCUMENTATION = ''' options: server: description: connection info to jabber server - required: True + required: true env: - name: JABBER_SERV user: description: Jabber user to authenticate as - required: True + required: true env: - name: JABBER_USER password: description: Password for the user to the jabber server - required: True + required: true env: - name: JABBER_PASS to: description: chat identifier that will receive the message - required: True + required: true env: - name: JABBER_TO ''' diff --git a/plugins/callback/logdna.py b/plugins/callback/logdna.py index c84054c592..ee0a1eb022 100644 --- a/plugins/callback/logdna.py +++ b/plugins/callback/logdna.py @@ -18,7 +18,7 @@ DOCUMENTATION = ''' - whitelisting in configuration options: conf_key: - required: True + required: true description: LogDNA Ingestion Key type: string env: @@ -27,7 +27,7 @@ DOCUMENTATION = ''' - section: callback_logdna key: conf_key plugin_ignore_errors: - required: False + required: false description: Whether to ignore errors on failing or not type: boolean env: @@ -35,9 +35,9 @@ DOCUMENTATION = ''' ini: - section: callback_logdna key: plugin_ignore_errors - default: False + default: false conf_hostname: - required: False + required: false description: Alternative Host Name; the current host name by default type: string env: @@ -46,7 +46,7 @@ DOCUMENTATION = ''' - section: callback_logdna key: conf_hostname conf_tags: - required: False + required: false description: Tags type: string env: diff --git a/plugins/callback/logentries.py b/plugins/callback/logentries.py index 945757edd6..d40939b0ab 100644 --- a/plugins/callback/logentries.py +++ b/plugins/callback/logentries.py @@ -48,7 +48,7 @@ DOCUMENTATION = ''' description: The logentries "TCP token" env: - name: LOGENTRIES_ANSIBLE_TOKEN - required: True + required: true ini: - section: callback_logentries key: token @@ -57,7 +57,7 @@ DOCUMENTATION = ''' - Toggle to decide whether to use TLS to encrypt the communications with the API server env: - name: LOGENTRIES_USE_TLS - default: False + default: false type: boolean ini: - section: callback_logentries @@ -65,7 +65,7 @@ DOCUMENTATION = ''' flatten: description: flatten complex data structures into a single dictionary with complex keys type: boolean - default: False + default: false env: - name: LOGENTRIES_FLATTEN ini: diff --git a/plugins/callback/selective.py b/plugins/callback/selective.py index 78c28ec7a5..6476f5ba53 100644 --- a/plugins/callback/selective.py +++ b/plugins/callback/selective.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' - If you increase verbosity all tasks are printed. options: nocolor: - default: False + default: false description: This setting allows suppressing colorizing output env: - name: ANSIBLE_NOCOLOR diff --git a/plugins/callback/slack.py b/plugins/callback/slack.py index 46340ee44c..6ca15b43f5 100644 --- a/plugins/callback/slack.py +++ b/plugins/callback/slack.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' - Before 2.4 only environment variables were available for configuring this plugin options: webhook_url: - required: True + required: true description: Slack Webhook URL env: - name: SLACK_WEBHOOK_URL @@ -51,7 +51,7 @@ DOCUMENTATION = ''' ini: - section: callback_slack key: validate_certs - default: True + default: true type: bool ''' diff --git a/plugins/doc_fragments/ibm_storage.py b/plugins/doc_fragments/ibm_storage.py index ec3b0a0e05..ff38c3fc7c 100644 --- a/plugins/doc_fragments/ibm_storage.py +++ b/plugins/doc_fragments/ibm_storage.py @@ -18,17 +18,17 @@ options: description: - Management user on the spectrum accelerate storage system. type: str - required: True + required: true password: description: - Password for username on the spectrum accelerate storage system. type: str - required: True + required: true endpoints: description: - The hostname or management IP of Spectrum Accelerate storage system. type: str - required: True + required: true notes: - This module requires pyxcli python library. Use 'pip install pyxcli' in order to get pyxcli. diff --git a/plugins/doc_fragments/oracle_creatable_resource.py b/plugins/doc_fragments/oracle_creatable_resource.py index 7c1551ec06..5293819199 100644 --- a/plugins/doc_fragments/oracle_creatable_resource.py +++ b/plugins/doc_fragments/oracle_creatable_resource.py @@ -15,7 +15,7 @@ class ModuleDocFragment(object): idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with I(key_by). - default: False + default: false type: bool key_by: description: The list of comma-separated attributes of this resource which should be used to uniquely diff --git a/plugins/inventory/gitlab_runners.py b/plugins/inventory/gitlab_runners.py index 0b7dff079c..d68b8d4e28 100644 --- a/plugins/inventory/gitlab_runners.py +++ b/plugins/inventory/gitlab_runners.py @@ -66,7 +66,7 @@ host: https://gitlab.com # Example using constructed features to create groups and set ansible_host plugin: community.general.gitlab_runners host: https://gitlab.com -strict: False +strict: false keyed_groups: # add e.g. amd64 hosts to an arch_amd64 group - prefix: arch diff --git a/plugins/inventory/nmap.py b/plugins/inventory/nmap.py index 3c3b3f8e41..01a5fa04ba 100644 --- a/plugins/inventory/nmap.py +++ b/plugins/inventory/nmap.py @@ -20,7 +20,7 @@ DOCUMENTATION = ''' options: plugin: description: token that ensures this is a source file for the 'nmap' plugin. - required: True + required: true choices: ['nmap', 'community.general.nmap'] sudo: description: Set to C(true) to execute a C(sudo nmap) plugin scan. @@ -29,7 +29,7 @@ DOCUMENTATION = ''' type: boolean address: description: Network IP or range of IPs to scan, you can use a simple range (10.2.2.15-25) or CIDR notation. - required: True + required: true exclude: description: list of addresses to exclude type: list @@ -37,15 +37,15 @@ DOCUMENTATION = ''' ports: description: Enable/disable scanning for open ports type: boolean - default: True + default: true ipv4: description: use IPv4 type addresses type: boolean - default: True + default: true ipv6: description: use IPv6 type addresses type: boolean - default: True + default: true notes: - At least one of ipv4 or ipv6 is required to be True, both can be True, but they cannot both be False. - 'TODO: add OS fingerprinting' @@ -53,14 +53,14 @@ DOCUMENTATION = ''' EXAMPLES = ''' # inventory.config file in YAML format plugin: community.general.nmap -strict: False +strict: false address: 192.168.0.0/24 # a sudo nmap scan to fully use nmap scan power. plugin: community.general.nmap sudo: true -strict: False +strict: false address: 192.168.0.0/24 ''' diff --git a/plugins/inventory/online.py b/plugins/inventory/online.py index f0424ea5e8..261548d8a2 100644 --- a/plugins/inventory/online.py +++ b/plugins/inventory/online.py @@ -16,10 +16,10 @@ DOCUMENTATION = r''' options: plugin: description: token that ensures this is a source file for the 'online' plugin. - required: True + required: true choices: ['online', 'community.general.online'] oauth_token: - required: True + required: true description: Online OAuth token. env: # in order of precedence diff --git a/plugins/inventory/opennebula.py b/plugins/inventory/opennebula.py index f46ad73c57..603920edc2 100644 --- a/plugins/inventory/opennebula.py +++ b/plugins/inventory/opennebula.py @@ -34,7 +34,7 @@ DOCUMENTATION = r''' - If not set then the value of the C(ONE_URL) environment variable is used. env: - name: ONE_URL - required: True + required: true type: string api_username: description: @@ -49,7 +49,7 @@ DOCUMENTATION = r''' - If not set, the value of the C(ONE_PASSWORD) environment variable is used. env: - name: ONE_PASSWORD - required: False + required: false type: string api_authfile: description: @@ -58,7 +58,7 @@ DOCUMENTATION = r''' - Set environment variable C(ONE_AUTH) to override this path. env: - name: ONE_AUTH - required: False + required: false type: string hostname: description: Field to match the hostname. Note C(v4_first_ip) corresponds to the first IPv4 found on VM. @@ -74,7 +74,7 @@ DOCUMENTATION = r''' group_by_labels: description: Create host groups by vm labels type: bool - default: True + default: true ''' EXAMPLES = r''' diff --git a/plugins/inventory/scaleway.py b/plugins/inventory/scaleway.py index 4404038270..6aacc9f665 100644 --- a/plugins/inventory/scaleway.py +++ b/plugins/inventory/scaleway.py @@ -19,7 +19,7 @@ DOCUMENTATION = r''' options: plugin: description: Token that ensures this is a source file for the 'scaleway' plugin. - required: True + required: true choices: ['scaleway', 'community.general.scaleway'] regions: description: Filter results on a specific Scaleway region. diff --git a/plugins/inventory/virtualbox.py b/plugins/inventory/virtualbox.py index a8d186bb30..829fc7b971 100644 --- a/plugins/inventory/virtualbox.py +++ b/plugins/inventory/virtualbox.py @@ -20,12 +20,12 @@ DOCUMENTATION = ''' options: plugin: description: token that ensures this is a source file for the 'virtualbox' plugin - required: True + required: true choices: ['virtualbox', 'community.general.virtualbox'] running_only: description: toggles showing all vms vs only those currently running type: boolean - default: False + default: false settings_password_file: description: provide a file containing the settings password (equivalent to --settingspwfile) network_info_path: diff --git a/plugins/lookup/cartesian.py b/plugins/lookup/cartesian.py index 6d98c271ee..516d153389 100644 --- a/plugins/lookup/cartesian.py +++ b/plugins/lookup/cartesian.py @@ -18,7 +18,7 @@ DOCUMENTATION = ''' _raw: description: - a set of lists - required: True + required: true ''' EXAMPLES = """ diff --git a/plugins/lookup/chef_databag.py b/plugins/lookup/chef_databag.py index 04ef7ee41d..b14d924ae8 100644 --- a/plugins/lookup/chef_databag.py +++ b/plugins/lookup/chef_databag.py @@ -22,11 +22,11 @@ DOCUMENTATION = ''' name: description: - Name of the databag - required: True + required: true item: description: - Item to fetch - required: True + required: true ''' EXAMPLES = """ diff --git a/plugins/lookup/consul_kv.py b/plugins/lookup/consul_kv.py index 794df197fc..2d4a202d94 100644 --- a/plugins/lookup/consul_kv.py +++ b/plugins/lookup/consul_kv.py @@ -25,7 +25,7 @@ DOCUMENTATION = ''' recurse: type: boolean description: If true, will retrieve all the values that have the given key as prefix. - default: False + default: false index: description: - If the key has a value with the specified index then this is returned allowing access to historical values. @@ -56,7 +56,7 @@ DOCUMENTATION = ''' - Whether to use http or https. - If you use C(ANSIBLE_CONSUL_URL) this value will be used from there. validate_certs: - default: True + default: true description: Whether to verify the ssl connection or not. env: - name: ANSIBLE_CONSUL_VALIDATE_CERTS diff --git a/plugins/lookup/cyberarkpassword.py b/plugins/lookup/cyberarkpassword.py index a0e36d3efe..00dd81d7f7 100644 --- a/plugins/lookup/cyberarkpassword.py +++ b/plugins/lookup/cyberarkpassword.py @@ -22,10 +22,10 @@ DOCUMENTATION = ''' default: '/opt/CARKaim/sdk/clipasswordsdk' appid: description: Defines the unique ID of the application that is issuing the password request. - required: True + required: true query: description: Describes the filter criteria for the password retrieval. - required: True + required: true output: description: - Specifies the desired output fields separated by commas. diff --git a/plugins/lookup/dnstxt.py b/plugins/lookup/dnstxt.py index 7f4516ce5b..abf3e64b60 100644 --- a/plugins/lookup/dnstxt.py +++ b/plugins/lookup/dnstxt.py @@ -17,7 +17,7 @@ DOCUMENTATION = ''' options: _terms: description: domain or list of domains to query TXT records from - required: True + required: true type: list elements: string ''' diff --git a/plugins/lookup/etcd.py b/plugins/lookup/etcd.py index 8f7c4954d1..d6a12293e3 100644 --- a/plugins/lookup/etcd.py +++ b/plugins/lookup/etcd.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' - the list of keys to lookup on the etcd server type: list elements: string - required: True + required: true url: description: - Environment variable with the url for the etcd server @@ -37,7 +37,7 @@ DOCUMENTATION = ''' validate_certs: description: - toggle checking that the ssl certificates are valid, you normally only want to turn this off with self-signed certs. - default: True + default: true type: boolean ''' diff --git a/plugins/lookup/etcd3.py b/plugins/lookup/etcd3.py index 901d602174..df41d791e8 100644 --- a/plugins/lookup/etcd3.py +++ b/plugins/lookup/etcd3.py @@ -24,12 +24,12 @@ DOCUMENTATION = ''' - The list of keys (or key prefixes) to look up on the etcd3 server. type: list elements: str - required: True + required: true prefix: description: - Look for key or prefix key. type: bool - default: False + default: false endpoints: description: - Counterpart of C(ETCDCTL_ENDPOINTS) environment variable. diff --git a/plugins/lookup/filetree.py b/plugins/lookup/filetree.py index 024b031a1d..13b3d71e43 100644 --- a/plugins/lookup/filetree.py +++ b/plugins/lookup/filetree.py @@ -18,7 +18,7 @@ description: options: _terms: description: path(s) of files to read - required: True + required: true ''' EXAMPLES = r""" diff --git a/plugins/lookup/flattened.py b/plugins/lookup/flattened.py index 0e802d369c..25098fa23a 100644 --- a/plugins/lookup/flattened.py +++ b/plugins/lookup/flattened.py @@ -15,7 +15,7 @@ DOCUMENTATION = ''' options: _terms: description: lists to flatten - required: True + required: true notes: - unlike 'items' which only flattens 1 level, this plugin will continue to flatten until it cannot find lists anymore. - aka highlander plugin, there can only be one (list). diff --git a/plugins/lookup/hiera.py b/plugins/lookup/hiera.py index d3aa8b99b4..055d16133b 100644 --- a/plugins/lookup/hiera.py +++ b/plugins/lookup/hiera.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' - The list of keys to lookup on the Puppetmaster type: list elements: string - required: True + required: true _bin_file: description: - Binary file to execute Hiera diff --git a/plugins/lookup/manifold.py b/plugins/lookup/manifold.py index f83104d93b..9d2913063a 100644 --- a/plugins/lookup/manifold.py +++ b/plugins/lookup/manifold.py @@ -20,24 +20,24 @@ DOCUMENTATION = ''' matched resources will be returned. type: list elements: string - required: False + required: false api_token: description: - manifold API token type: string - required: True + required: true env: - name: MANIFOLD_API_TOKEN project: description: - The project label you want to get the resource for. type: string - required: False + required: false team: description: - The team label you want to get the resource for. type: string - required: False + required: false ''' EXAMPLES = ''' diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index b6b9374eba..42e07e9cbf 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -22,7 +22,7 @@ DOCUMENTATION = ''' options: _terms: description: identifier(s) (UUID, name, or subdomain; case-insensitive) of item(s) to retrieve. - required: True + required: true field: description: field to return from each matching item (case-insensitive). default: 'password' diff --git a/plugins/lookup/onepassword_raw.py b/plugins/lookup/onepassword_raw.py index d9abaf645e..9a1e0741a0 100644 --- a/plugins/lookup/onepassword_raw.py +++ b/plugins/lookup/onepassword_raw.py @@ -22,7 +22,7 @@ DOCUMENTATION = ''' options: _terms: description: identifier(s) (UUID, name, or domain; case-insensitive) of item(s) to retrieve. - required: True + required: true master_password: description: The password used to unlock the specified vault. aliases: ['vault_password'] diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 7cdc72de23..ce1f4ee852 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -20,7 +20,7 @@ DOCUMENTATION = ''' options: _terms: description: query key. - required: True + required: true passwordstore: description: - Location of the password store. diff --git a/plugins/lookup/shelvefile.py b/plugins/lookup/shelvefile.py index ee84a40027..c1aaef83ce 100644 --- a/plugins/lookup/shelvefile.py +++ b/plugins/lookup/shelvefile.py @@ -17,10 +17,10 @@ DOCUMENTATION = ''' description: sets of key value pairs of parameters key: description: key to query - required: True + required: true file: description: path to shelve file - required: True + required: true ''' EXAMPLES = """ diff --git a/plugins/modules/cloud/alicloud/ali_instance.py b/plugins/modules/cloud/alicloud/ali_instance.py index f36e67d551..40fced0866 100644 --- a/plugins/modules/cloud/alicloud/ali_instance.py +++ b/plugins/modules/cloud/alicloud/ali_instance.py @@ -101,7 +101,7 @@ options: description: - Specifies whether to add sequential suffixes to the host_name. The sequential suffix ranges from 001 to 999. - default: False + default: false type: bool version_added: '0.2.0' password: @@ -143,7 +143,7 @@ options: allocate_public_ip: description: - Whether allocate a public ip for the new instance. - default: False + default: false aliases: [ 'assign_public_ip' ] type: bool instance_charge_type: @@ -162,7 +162,7 @@ options: description: - Whether automate renew the charge of the instance. type: bool - default: False + default: false auto_renew_period: description: - The duration of the automatic renew the charge of the instance. Required when I(auto_renew=true). @@ -177,7 +177,7 @@ options: force: description: - Whether the current operation needs to be execute forcibly. - default: False + default: false type: bool tags: description: @@ -189,7 +189,7 @@ options: description: - Delete any tags not specified in the task that are on the instance. If True, it means you have to specify all the desired tags on each task affecting an instance. - default: False + default: false type: bool version_added: '0.2.0' key_name: @@ -236,13 +236,13 @@ options: required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned. - If I(dry_run=false), A request is sent. If the validation succeeds, the instance is created. - default: False + default: false type: bool version_added: '0.2.0' include_data_disks: description: - Whether to change instance disks charge type when changing instance charge type. - default: True + default: true type: bool version_added: '0.2.0' author: @@ -265,7 +265,7 @@ EXAMPLES = ''' image: ubuntu1404_64_40G_cloudinit_20160727.raw instance_type: ecs.n4.small vswitch_id: vsw-abcd1234 - assign_public_ip: True + assign_public_ip: true max_bandwidth_out: 10 host_name: myhost password: mypassword @@ -275,7 +275,7 @@ EXAMPLES = ''' security_groups: ["sg-f2rwnfh23r"] instance_ids: ["i-abcd12346", "i-abcd12345"] - force: True + force: true tasks: - name: Launch ECS instance in VPC network diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index 467dd08767..586b1254c2 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -26,18 +26,18 @@ options: backend: description: - Define the backend to use for the container. - required: True + required: true choices: ["docker", "ostree"] type: str name: description: - Name of the container. - required: True + required: true type: str image: description: - The image to use to install the container. - required: True + required: true type: str rootfs: description: diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/cloud/atomic/atomic_image.py index 4016387c64..2705304f01 100644 --- a/plugins/modules/cloud/atomic/atomic_image.py +++ b/plugins/modules/cloud/atomic/atomic_image.py @@ -31,7 +31,7 @@ options: name: description: - Name of the container image. - required: True + required: true type: str state: description: diff --git a/plugins/modules/cloud/centurylink/clc_aa_policy.py b/plugins/modules/cloud/centurylink/clc_aa_policy.py index 41a1a96663..d5d56b2a65 100644 --- a/plugins/modules/cloud/centurylink/clc_aa_policy.py +++ b/plugins/modules/cloud/centurylink/clc_aa_policy.py @@ -19,17 +19,17 @@ options: description: - The name of the Anti Affinity Policy. type: str - required: True + required: true location: description: - Datacenter in which the policy lives/should live. type: str - required: True + required: true state: description: - Whether to create or delete the policy. type: str - required: False + required: false default: present choices: ['present','absent'] requirements: @@ -55,7 +55,7 @@ EXAMPLES = ''' --- - name: Create AA Policy hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Create an Anti Affinity Policy @@ -71,7 +71,7 @@ EXAMPLES = ''' - name: Delete AA Policy hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Delete an Anti Affinity Policy diff --git a/plugins/modules/cloud/centurylink/clc_alert_policy.py b/plugins/modules/cloud/centurylink/clc_alert_policy.py index 95945703d1..c7f02c2ffa 100644 --- a/plugins/modules/cloud/centurylink/clc_alert_policy.py +++ b/plugins/modules/cloud/centurylink/clc_alert_policy.py @@ -20,7 +20,7 @@ options: description: - The alias of your CLC Account type: str - required: True + required: true name: description: - The name of the alert policy. This is mutually exclusive with id @@ -81,7 +81,7 @@ EXAMPLES = ''' --- - name: Create Alert Policy Example hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Create an Alert Policy for disk above 80% for 5 minutes @@ -102,7 +102,7 @@ EXAMPLES = ''' - name: Delete Alert Policy Example hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Delete an Alert Policy diff --git a/plugins/modules/cloud/centurylink/clc_blueprint_package.py b/plugins/modules/cloud/centurylink/clc_blueprint_package.py index 85f3c890fe..0dc29b0ce0 100644 --- a/plugins/modules/cloud/centurylink/clc_blueprint_package.py +++ b/plugins/modules/cloud/centurylink/clc_blueprint_package.py @@ -19,24 +19,24 @@ options: description: - A list of server Ids to deploy the blue print package. type: list - required: True + required: true elements: str package_id: description: - The package id of the blue print. type: str - required: True + required: true package_params: description: - The dictionary of arguments required to deploy the blue print. type: dict default: {} - required: False + required: false state: description: - Whether to install or uninstall the package. Currently it supports only "present" for install action. type: str - required: False + required: false default: present choices: ['present'] wait: @@ -44,7 +44,7 @@ options: - Whether to wait for the tasks to finish before returning. type: str default: 'True' - required: False + required: false requirements: - python = 2.7 - requests >= 2.5.0 diff --git a/plugins/modules/cloud/centurylink/clc_firewall_policy.py b/plugins/modules/cloud/centurylink/clc_firewall_policy.py index c2bc415a30..cc77238db9 100644 --- a/plugins/modules/cloud/centurylink/clc_firewall_policy.py +++ b/plugins/modules/cloud/centurylink/clc_firewall_policy.py @@ -19,7 +19,7 @@ options: description: - Target datacenter for the firewall policy type: str - required: True + required: true state: description: - Whether to create or delete the firewall policy @@ -53,7 +53,7 @@ options: description: - CLC alias for the source account type: str - required: True + required: true destination_account_alias: description: - CLC alias for the destination account @@ -90,7 +90,7 @@ EXAMPLES = ''' --- - name: Create Firewall Policy hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Create / Verify an Firewall Policy at CenturyLink Cloud @@ -105,7 +105,7 @@ EXAMPLES = ''' - name: Delete Firewall Policy hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Delete an Firewall Policy at CenturyLink Cloud diff --git a/plugins/modules/cloud/centurylink/clc_group.py b/plugins/modules/cloud/centurylink/clc_group.py index 24e29c3e19..21e6d93d28 100644 --- a/plugins/modules/cloud/centurylink/clc_group.py +++ b/plugins/modules/cloud/centurylink/clc_group.py @@ -20,23 +20,23 @@ options: description: - The name of the Server Group type: str - required: True + required: true description: description: - A description of the Server Group type: str - required: False + required: false parent: description: - The parent group of the server group. If parent is not provided, it creates the group at top level. type: str - required: False + required: false location: description: - Datacenter to create the group in. If location is not provided, the group gets created in the default datacenter associated with the account type: str - required: False + required: false state: description: - Whether to create or delete the group @@ -47,8 +47,8 @@ options: description: - Whether to wait for the tasks to finish before returning. type: bool - default: True - required: False + default: true + required: false requirements: - python = 2.7 - requests >= 2.5.0 @@ -73,7 +73,7 @@ EXAMPLES = ''' --- - name: Create Server Group hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Create / Verify a Server Group at CenturyLink Cloud @@ -90,7 +90,7 @@ EXAMPLES = ''' # Delete a Server Group - name: Delete Server Group hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Delete / Verify Absent a Server Group at CenturyLink Cloud diff --git a/plugins/modules/cloud/centurylink/clc_loadbalancer.py b/plugins/modules/cloud/centurylink/clc_loadbalancer.py index bad07d7815..d13c2d76ce 100644 --- a/plugins/modules/cloud/centurylink/clc_loadbalancer.py +++ b/plugins/modules/cloud/centurylink/clc_loadbalancer.py @@ -20,7 +20,7 @@ options: description: - The name of the loadbalancer type: str - required: True + required: true description: description: - A description for the loadbalancer @@ -29,12 +29,12 @@ options: description: - The alias of your CLC Account type: str - required: True + required: true location: description: - The location of the datacenter where the load balancer resides in type: str - required: True + required: true method: description: -The balancing method for the load balancer pool diff --git a/plugins/modules/cloud/centurylink/clc_modify_server.py b/plugins/modules/cloud/centurylink/clc_modify_server.py index 1c133dbc6f..ff0611e3f8 100644 --- a/plugins/modules/cloud/centurylink/clc_modify_server.py +++ b/plugins/modules/cloud/centurylink/clc_modify_server.py @@ -19,7 +19,7 @@ options: description: - A list of server Ids to modify. type: list - required: True + required: true elements: str cpu: description: diff --git a/plugins/modules/cloud/centurylink/clc_publicip.py b/plugins/modules/cloud/centurylink/clc_publicip.py index 7fc4b7468b..98d392adf9 100644 --- a/plugins/modules/cloud/centurylink/clc_publicip.py +++ b/plugins/modules/cloud/centurylink/clc_publicip.py @@ -30,7 +30,7 @@ options: description: - A list of servers to create public ips on. type: list - required: True + required: true elements: str state: description: @@ -66,7 +66,7 @@ EXAMPLES = ''' - name: Add Public IP to Server hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Create Public IP For Servers @@ -86,7 +86,7 @@ EXAMPLES = ''' - name: Delete Public IP from Server hosts: localhost - gather_facts: False + gather_facts: false connection: local tasks: - name: Create Public IP For Servers diff --git a/plugins/modules/cloud/centurylink/clc_server_snapshot.py b/plugins/modules/cloud/centurylink/clc_server_snapshot.py index 471fca2c1e..44f52ece64 100644 --- a/plugins/modules/cloud/centurylink/clc_server_snapshot.py +++ b/plugins/modules/cloud/centurylink/clc_server_snapshot.py @@ -19,26 +19,26 @@ options: description: - The list of CLC server Ids. type: list - required: True + required: true elements: str expiration_days: description: - The number of days to keep the server snapshot before it expires. type: int default: 7 - required: False + required: false state: description: - The state to insure that the provided resources are in. type: str default: 'present' - required: False + required: false choices: ['present', 'absent', 'restore'] wait: description: - Whether to wait for the provisioning tasks to finish before returning. default: 'True' - required: False + required: false type: str requirements: - python = 2.7 @@ -66,7 +66,7 @@ EXAMPLES = ''' - UC1TEST-SVR01 - UC1TEST-SVR02 expiration_days: 10 - wait: True + wait: true state: present - name: Restore server snapshot @@ -74,7 +74,7 @@ EXAMPLES = ''' server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 - wait: True + wait: true state: restore - name: Delete server snapshot @@ -82,7 +82,7 @@ EXAMPLES = ''' server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 - wait: True + wait: true state: absent ''' diff --git a/plugins/modules/cloud/huawei/hwc_vpc_eip.py b/plugins/modules/cloud/huawei/hwc_vpc_eip.py index c9479981fd..a86338052e 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_eip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_eip.py @@ -135,7 +135,7 @@ EXAMPLES = ''' hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet diff --git a/plugins/modules/cloud/huawei/hwc_vpc_port.py b/plugins/modules/cloud/huawei/hwc_vpc_port.py index de2fd38f66..dadc76c064 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_port.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_port.py @@ -119,7 +119,7 @@ EXAMPLES = ''' hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet diff --git a/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py b/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py index bcec7cf0b7..e05c14f74d 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py @@ -63,7 +63,7 @@ EXAMPLES = ''' hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet diff --git a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py index 260635b975..d38150dfc3 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py @@ -110,7 +110,7 @@ EXAMPLES = ''' cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true ''' RETURN = ''' diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index 8de8c07f69..c19770dc41 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -209,15 +209,15 @@ EXAMPLES = ''' wait: true wait_timeout: 600 state: present - alert_bwquota_enabled: True + alert_bwquota_enabled: true alert_bwquota_threshold: 80 - alert_bwin_enabled: True + alert_bwin_enabled: true alert_bwin_threshold: 10 - alert_cpu_enabled: True + alert_cpu_enabled: true alert_cpu_threshold: 210 - alert_bwout_enabled: True + alert_bwout_enabled: true alert_bwout_threshold: 10 - alert_diskio_enabled: True + alert_diskio_enabled: true alert_diskio_threshold: 10000 backupweeklyday: 1 backupwindow: 2 @@ -225,7 +225,7 @@ EXAMPLES = ''' additional_disks: - {Label: 'disk1', Size: 2500, Type: 'raw'} - {Label: 'newdisk', Size: 2000} - watchdog: True + watchdog: true delegate_to: localhost register: linode_creation diff --git a/plugins/modules/cloud/lxc/lxc_container.py b/plugins/modules/cloud/lxc/lxc_container.py index 7c6d01fb2f..ddcee0c8ea 100644 --- a/plugins/modules/cloud/lxc/lxc_container.py +++ b/plugins/modules/cloud/lxc/lxc_container.py @@ -413,7 +413,7 @@ lxc_container: description: if the container was cloned returned: success, when clone_name is specified type: bool - sample: True + sample: true """ import os diff --git a/plugins/modules/cloud/memset/memset_dns_reload.py b/plugins/modules/cloud/memset/memset_dns_reload.py index ab6eecd227..580740d1a3 100644 --- a/plugins/modules/cloud/memset/memset_dns_reload.py +++ b/plugins/modules/cloud/memset/memset_dns_reload.py @@ -42,7 +42,7 @@ EXAMPLES = ''' - name: Submit DNS reload and poll community.general.memset_dns_reload: api_key: 5eb86c9196ab03919abcf03857163741 - poll: True + poll: true delegate_to: localhost ''' diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/cloud/memset/memset_zone_record.py index a92cd2923f..5082475176 100644 --- a/plugins/modules/cloud/memset/memset_zone_record.py +++ b/plugins/modules/cloud/memset/memset_zone_record.py @@ -142,7 +142,7 @@ memset_api: description: Adds the current domain onto the address field for C(CNAME), C(MX), C(NS) and C(SRV) types. returned: always type: bool - sample: False + sample: false ttl: description: Record TTL. returned: always diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 063fda697a..1180c56173 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -580,7 +580,7 @@ EXAMPLES = ''' storage: VMs_LVM_thin format: raw efitype: 4m - pre_enrolled_keys: False + pre_enrolled_keys: false - name: Create VM with 1 10GB SATA disk and an EFI disk, with Secure Boot enabled by default community.general.proxmox_kvm: diff --git a/plugins/modules/cloud/opennebula/one_vm.py b/plugins/modules/cloud/opennebula/one_vm.py index 39ae2e0d46..dca65d6db3 100644 --- a/plugins/modules/cloud/opennebula/one_vm.py +++ b/plugins/modules/cloud/opennebula/one_vm.py @@ -68,7 +68,7 @@ options: vm_start_on_hold: description: - Set to true to put vm on hold while creating - default: False + default: false type: bool instance_ids: description: diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index 5547999ec4..e8452f99eb 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -255,7 +255,7 @@ RETURN = ''' changed: description: True if a device was altered in any way (created, modified or removed) type: bool - sample: True + sample: true returned: success devices: diff --git a/plugins/modules/cloud/packet/packet_ip_subnet.py b/plugins/modules/cloud/packet/packet_ip_subnet.py index b2441dd9c7..79f93a6413 100644 --- a/plugins/modules/cloud/packet/packet_ip_subnet.py +++ b/plugins/modules/cloud/packet/packet_ip_subnet.py @@ -37,13 +37,13 @@ options: hostname: description: - A hostname of a device to/from which to assign/remove a subnet. - required: False + required: false type: str device_id: description: - UUID of a device to/from which to assign/remove a subnet. - required: False + required: false type: str project_id: @@ -118,7 +118,7 @@ RETURN = ''' changed: description: True if an IP address assignments were altered in any way (created or removed). type: bool - sample: True + sample: true returned: success device_id: @@ -135,15 +135,15 @@ subnet: assigned_to: { href : /devices/61f9aa5e-0530-47f5-97c2-113828e61ed0 } cidr: 31 created_at: '2017-08-07T15:15:30Z' - enabled: True + enabled: true gateway: 147.75.90.240 href: /ips/31eda960-0a16-4c0f-b196-f3dc4928529f id: 1eda960-0a16-4c0f-b196-f3dc4928529f - manageable: True - management: True + manageable: true + management: true netmask: 255.255.255.254 network: 147.75.90.240 - public: True + public: true returned: success ''' diff --git a/plugins/modules/cloud/packet/packet_project.py b/plugins/modules/cloud/packet/packet_project.py index 581e56dd4f..18b6f73f99 100644 --- a/plugins/modules/cloud/packet/packet_project.py +++ b/plugins/modules/cloud/packet/packet_project.py @@ -108,7 +108,7 @@ RETURN = ''' changed: description: True if a project was created or removed. type: bool - sample: True + sample: true returned: success name: diff --git a/plugins/modules/cloud/packet/packet_sshkey.py b/plugins/modules/cloud/packet/packet_sshkey.py index a336723f56..d39e419747 100644 --- a/plugins/modules/cloud/packet/packet_sshkey.py +++ b/plugins/modules/cloud/packet/packet_sshkey.py @@ -84,7 +84,7 @@ RETURN = ''' changed: description: True if a sshkey was created or removed. type: bool - sample: True + sample: true returned: always sshkeys: description: Information about sshkeys that were created/removed. diff --git a/plugins/modules/cloud/packet/packet_volume.py b/plugins/modules/cloud/packet/packet_volume.py index b2c6d116c1..f0508c5891 100644 --- a/plugins/modules/cloud/packet/packet_volume.py +++ b/plugins/modules/cloud/packet/packet_volume.py @@ -84,7 +84,7 @@ options: description: - Create new volume locked. type: bool - default: False + default: false billing_cycle: description: @@ -102,13 +102,13 @@ options: snapshot_count: description: - How many snapshots to keep, a positive integer. - required: True + required: true type: int snapshot_frequency: description: - Frequency of snapshots. - required: True + required: true choices: ["15min", "1hour", "1day", "1week", "1month", "1year"] type: str diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index 57397b7dc2..35f88dde81 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -179,7 +179,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Build a Cloud Server - gather_facts: False + gather_facts: false tasks: - name: Server build request local_action: @@ -200,7 +200,7 @@ EXAMPLES = ''' - name: Build an exact count of cloud servers with incremented names hosts: local - gather_facts: False + gather_facts: false tasks: - name: Server build requests local_action: diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index 5a4cd868b6..cde1d98755 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -78,7 +78,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Build a Block Storage Volume - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_cbs_attachments.py b/plugins/modules/cloud/rackspace/rax_cbs_attachments.py index ac85593a26..82a1f30cfb 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs_attachments.py +++ b/plugins/modules/cloud/rackspace/rax_cbs_attachments.py @@ -58,7 +58,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Attach a Block Storage Volume - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_cdb.py b/plugins/modules/cloud/rackspace/rax_cdb.py index 3051bcdcb2..6703a8dd4b 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb.py +++ b/plugins/modules/cloud/rackspace/rax_cdb.py @@ -70,7 +70,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Build a Cloud Databases - gather_facts: False + gather_facts: false tasks: - name: Server build request local_action: diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/cloud/rackspace/rax_clb.py index fa7f7c7377..8e5db34e50 100644 --- a/plugins/modules/cloud/rackspace/rax_clb.py +++ b/plugins/modules/cloud/rackspace/rax_clb.py @@ -111,7 +111,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Build a Load Balancer - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_dns.py b/plugins/modules/cloud/rackspace/rax_dns.py index d10b178867..a97a4bb175 100644 --- a/plugins/modules/cloud/rackspace/rax_dns.py +++ b/plugins/modules/cloud/rackspace/rax_dns.py @@ -54,7 +54,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Create domain hosts: all - gather_facts: False + gather_facts: false tasks: - name: Domain create request local_action: diff --git a/plugins/modules/cloud/rackspace/rax_dns_record.py b/plugins/modules/cloud/rackspace/rax_dns_record.py index ba4d4b1699..e51424dc04 100644 --- a/plugins/modules/cloud/rackspace/rax_dns_record.py +++ b/plugins/modules/cloud/rackspace/rax_dns_record.py @@ -24,7 +24,7 @@ options: description: - IP address for A/AAAA record, FQDN for CNAME/MX/NS, or text data for SRV/TXT - required: True + required: true domain: type: str description: @@ -38,7 +38,7 @@ options: type: str description: - FQDN record name to create - required: True + required: true overwrite: description: - Add new records if data doesn't match, instead of updating existing @@ -100,7 +100,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Create DNS Records hosts: all - gather_facts: False + gather_facts: false tasks: - name: Create A record local_action: diff --git a/plugins/modules/cloud/rackspace/rax_facts.py b/plugins/modules/cloud/rackspace/rax_facts.py index 7d10d0d6d7..560f05e56a 100644 --- a/plugins/modules/cloud/rackspace/rax_facts.py +++ b/plugins/modules/cloud/rackspace/rax_facts.py @@ -37,7 +37,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Gather info about servers hosts: all - gather_facts: False + gather_facts: false tasks: - name: Get facts about servers local_action: diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index c287d9bf7e..a7c36e6920 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -83,7 +83,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: "Test Cloud Files Objects" hosts: local - gather_facts: False + gather_facts: false tasks: - name: "Get objects from test container" community.general.rax_files_objects: diff --git a/plugins/modules/cloud/rackspace/rax_identity.py b/plugins/modules/cloud/rackspace/rax_identity.py index 8e30c2971b..6f7472bcf4 100644 --- a/plugins/modules/cloud/rackspace/rax_identity.py +++ b/plugins/modules/cloud/rackspace/rax_identity.py @@ -32,7 +32,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Load Rackspace Cloud Identity - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_keypair.py b/plugins/modules/cloud/rackspace/rax_keypair.py index 5a881ad052..6664ac8bd0 100644 --- a/plugins/modules/cloud/rackspace/rax_keypair.py +++ b/plugins/modules/cloud/rackspace/rax_keypair.py @@ -45,7 +45,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Create a keypair hosts: localhost - gather_facts: False + gather_facts: false tasks: - name: Keypair request local_action: @@ -67,7 +67,7 @@ EXAMPLES = ''' - name: Create a keypair hosts: localhost - gather_facts: False + gather_facts: false tasks: - name: Keypair request local_action: diff --git a/plugins/modules/cloud/rackspace/rax_meta.py b/plugins/modules/cloud/rackspace/rax_meta.py index 17dc780cf8..7937696f88 100644 --- a/plugins/modules/cloud/rackspace/rax_meta.py +++ b/plugins/modules/cloud/rackspace/rax_meta.py @@ -41,7 +41,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Set metadata for a server hosts: all - gather_facts: False + gather_facts: false tasks: - name: Set metadata local_action: diff --git a/plugins/modules/cloud/rackspace/rax_mon_alarm.py b/plugins/modules/cloud/rackspace/rax_mon_alarm.py index 9083c91394..dd971f7243 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_alarm.py +++ b/plugins/modules/cloud/rackspace/rax_mon_alarm.py @@ -77,7 +77,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Alarm example - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index 2075b2cea0..adbd7e7600 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -119,7 +119,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Create a monitoring check - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_mon_entity.py b/plugins/modules/cloud/rackspace/rax_mon_entity.py index 0cfeb7ab2c..e8dabef69e 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_entity.py +++ b/plugins/modules/cloud/rackspace/rax_mon_entity.py @@ -57,7 +57,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Entity example - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_mon_notification.py b/plugins/modules/cloud/rackspace/rax_mon_notification.py index cb519e43cf..c26b0315db 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_notification.py +++ b/plugins/modules/cloud/rackspace/rax_mon_notification.py @@ -52,7 +52,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Monitoring notification example - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py b/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py index 1721aac09e..7800ea0fe9 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py +++ b/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py @@ -58,7 +58,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Example notification plan - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/rackspace/rax_network.py b/plugins/modules/cloud/rackspace/rax_network.py index 604111cc5d..02de3ce011 100644 --- a/plugins/modules/cloud/rackspace/rax_network.py +++ b/plugins/modules/cloud/rackspace/rax_network.py @@ -42,7 +42,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Build an Isolated Network - gather_facts: False + gather_facts: false tasks: - name: Network create request diff --git a/plugins/modules/cloud/rackspace/rax_queue.py b/plugins/modules/cloud/rackspace/rax_queue.py index b28099f786..366c1c77e3 100644 --- a/plugins/modules/cloud/rackspace/rax_queue.py +++ b/plugins/modules/cloud/rackspace/rax_queue.py @@ -38,7 +38,7 @@ extends_documentation_fragment: EXAMPLES = ''' - name: Build a Queue - gather_facts: False + gather_facts: false hosts: local connection: local tasks: diff --git a/plugins/modules/cloud/smartos/nictagadm.py b/plugins/modules/cloud/smartos/nictagadm.py index 555bb92fb5..e70d93c8a1 100644 --- a/plugins/modules/cloud/smartos/nictagadm.py +++ b/plugins/modules/cloud/smartos/nictagadm.py @@ -80,7 +80,7 @@ etherstub: description: specifies if the nic tag will create and attach to an etherstub. returned: always type: bool - sample: False + sample: false mtu: description: specifies which MTU size was passed during the nictagadm add command. mtu and etherstub are mutually exclusive. returned: always @@ -90,7 +90,7 @@ force: description: Shows if -f was used during the deletion of a nic tag returned: always type: bool - sample: False + sample: false state: description: state of the target returned: always diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/cloud/softlayer/sl_vm.py index 37292cb1c1..851f7a7f53 100644 --- a/plugins/modules/cloud/softlayer/sl_vm.py +++ b/plugins/modules/cloud/softlayer/sl_vm.py @@ -230,7 +230,7 @@ EXAMPLES = ''' - 100 os_code: UBUNTU_LATEST ssh_keys: [] - wait: True + wait: true - hostname: instance-3 domain: anydomain.com datacenter: dal09 diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py index 0d555abfeb..40d0270800 100644 --- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py +++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py @@ -523,7 +523,7 @@ EXAMPLES = ''' min_size: 0 target: 0 unit: instance - monitoring: True + monitoring: true name: ansible-group on_demand_instance_type: c3.large product: Linux/UNIX @@ -561,7 +561,7 @@ EXAMPLES = ''' min_size: 0 target: 0 unit: instance - monitoring: True + monitoring: true name: ansible-group-tal on_demand_instance_type: c3.large product: Linux/UNIX @@ -576,7 +576,7 @@ EXAMPLES = ''' - c3.large do_not_update: - image_id - wait_for_instances: True + wait_for_instances: true wait_timeout: 600 register: result @@ -608,7 +608,7 @@ EXAMPLES = ''' min_size: 0 target: 0 unit: instance - monitoring: True + monitoring: true name: ansible-group-tal on_demand_instance_type: c3.large product: Linux/UNIX @@ -627,7 +627,7 @@ EXAMPLES = ''' - c3.large do_not_update: - image_id - wait_for_instances: True + wait_for_instances: true wait_timeout: 600 register: result @@ -659,7 +659,7 @@ EXAMPLES = ''' virtual_name: ephemeral0 - device_name: '/dev/xvdb/' virtual_name: ephemeral1 - monitoring: True + monitoring: true name: ansible-group on_demand_instance_type: c3.large product: Linux/UNIX @@ -697,7 +697,7 @@ EXAMPLES = ''' min_size: 0 target: 0 unit: instance - monitoring: True + monitoring: true name: ansible-group on_demand_instance_type: c3.large product: Linux/UNIX @@ -737,7 +737,7 @@ EXAMPLES = ''' min_size: 0 target: 2 unit: instance - monitoring: True + monitoring: true name: ansible-group-1 on_demand_instance_type: c3.large product: Linux/UNIX diff --git a/plugins/modules/cloud/univention/udm_share.py b/plugins/modules/cloud/univention/udm_share.py index c0077bdc1c..b1d7e13287 100644 --- a/plugins/modules/cloud/univention/udm_share.py +++ b/plugins/modules/cloud/univention/udm_share.py @@ -106,7 +106,7 @@ options: description: - Show in Windows network environment. type: bool - default: True + default: true aliases: [ samba_browsable ] sambaCreateMode: default: '0744' diff --git a/plugins/modules/clustering/consul/consul_acl.py b/plugins/modules/clustering/consul/consul_acl.py index 23a6431cd7..b9f14db164 100644 --- a/plugins/modules/clustering/consul/consul_acl.py +++ b/plugins/modules/clustering/consul/consul_acl.py @@ -79,7 +79,7 @@ options: description: - whether to verify the tls certificate of the consul agent required: false - default: True + default: true requirements: - python-consul - pyhcl diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/clustering/consul/consul_kv.py index ed64a86d18..3419e3322b 100644 --- a/plugins/modules/clustering/consul/consul_kv.py +++ b/plugins/modules/clustering/consul/consul_kv.py @@ -61,7 +61,7 @@ options: description: - If the I(state) is C(present) and I(value) is set, perform a read after setting the value and return this value. - default: True + default: true type: bool session: description: diff --git a/plugins/modules/clustering/consul/consul_session.py b/plugins/modules/clustering/consul/consul_session.py index 6c06f9a139..062eb3befe 100644 --- a/plugins/modules/clustering/consul/consul_session.py +++ b/plugins/modules/clustering/consul/consul_session.py @@ -88,7 +88,7 @@ options: description: - Whether to verify the TLS certificate of the consul agent. type: bool - default: True + default: true behavior: description: - The optional behavior that can be attached to the session when it diff --git a/plugins/modules/clustering/pacemaker_cluster.py b/plugins/modules/clustering/pacemaker_cluster.py index 823bb76257..a71c1b0044 100644 --- a/plugins/modules/clustering/pacemaker_cluster.py +++ b/plugins/modules/clustering/pacemaker_cluster.py @@ -52,7 +52,7 @@ EXAMPLES = ''' RETURN = ''' changed: - description: True if the cluster state has changed + description: true if the cluster state has changed type: bool returned: always out: diff --git a/plugins/modules/database/aerospike/aerospike_migrations.py b/plugins/modules/database/aerospike/aerospike_migrations.py index 32d51a6b1f..32ab06a853 100644 --- a/plugins/modules/database/aerospike/aerospike_migrations.py +++ b/plugins/modules/database/aerospike/aerospike_migrations.py @@ -23,73 +23,73 @@ options: host: description: - Which host do we use as seed for info connection - required: False + required: false type: str default: localhost port: description: - Which port to connect to Aerospike on (service port) - required: False + required: false type: int default: 3000 connect_timeout: description: - How long to try to connect before giving up (milliseconds) - required: False + required: false type: int default: 1000 consecutive_good_checks: description: - How many times should the cluster report "no migrations" consecutively before returning OK back to ansible? - required: False + required: false type: int default: 3 sleep_between_checks: description: - How long to sleep between each check (seconds). - required: False + required: false type: int default: 60 tries_limit: description: - How many times do we poll before giving up and failing? default: 300 - required: False + required: false type: int local_only: description: - Do you wish to only check for migrations on the local node before returning, or do you want all nodes in the cluster to finish before returning? - required: True + required: true type: bool min_cluster_size: description: - Check will return bad until cluster size is met or until tries is exhausted - required: False + required: false type: int default: 1 fail_on_cluster_change: description: - Fail if the cluster key changes if something else is changing the cluster, we may want to fail - required: False + required: false type: bool - default: True + default: true migrate_tx_key: description: - The metric key used to determine if we have tx migrations remaining. Changeable due to backwards compatibility. - required: False + required: false type: str default: migrate_tx_partitions_remaining migrate_rx_key: description: - The metric key used to determine if we have rx migrations remaining. Changeable due to backwards compatibility. - required: False + required: false type: str default: migrate_rx_partitions_remaining target_cluster_size: @@ -102,7 +102,7 @@ options: - If this option is specified on a cluster that has at least 1 host <4.3 then it will be ignored until the min version reaches 4.3. - required: False + required: false type: int ''' EXAMPLES = ''' @@ -114,7 +114,7 @@ EXAMPLES = ''' consecutive_good_checks: 5 sleep_between_checks: 15 tries_limit: 600 - local_only: False + local_only: false # example playbook: - name: Upgrade aerospike @@ -140,7 +140,7 @@ EXAMPLES = ''' # Tries Limit * Sleep Between Checks * delay * retries - name: Wait for aerospike migrations community.general.aerospike_migrations: - local_only: True + local_only: true sleep_between_checks: 1 tries_limit: 5 consecutive_good_checks: 3 diff --git a/plugins/modules/database/influxdb/influxdb_user.py b/plugins/modules/database/influxdb/influxdb_user.py index 06ef13e2b3..25bc2a95ce 100644 --- a/plugins/modules/database/influxdb/influxdb_user.py +++ b/plugins/modules/database/influxdb/influxdb_user.py @@ -24,7 +24,7 @@ options: user_name: description: - Name of the user. - required: True + required: true type: str user_password: description: diff --git a/plugins/modules/database/misc/elasticsearch_plugin.py b/plugins/modules/database/misc/elasticsearch_plugin.py index 12aedc182f..a68ff086c3 100644 --- a/plugins/modules/database/misc/elasticsearch_plugin.py +++ b/plugins/modules/database/misc/elasticsearch_plugin.py @@ -22,7 +22,7 @@ options: name: description: - Name of the plugin to install. - required: True + required: true type: str state: description: @@ -40,13 +40,13 @@ options: parameter. If, for example, the plugin is already installed, changing this has no effect. - For ES 1.x use url. - required: False + required: false type: str url: description: - Set exact URL to download the plugin from (Only works for ES 1.x). - For ES 2.x and higher, use src. - required: False + required: false type: str timeout: description: @@ -57,7 +57,7 @@ options: force: description: - "Force batch mode when installing plugins. This is only necessary if a plugin requires additional permissions and console detection fails." - default: False + default: false type: bool plugin_bin: description: diff --git a/plugins/modules/database/misc/kibana_plugin.py b/plugins/modules/database/misc/kibana_plugin.py index 5522340156..94838e22b6 100644 --- a/plugins/modules/database/misc/kibana_plugin.py +++ b/plugins/modules/database/misc/kibana_plugin.py @@ -22,7 +22,7 @@ options: name: description: - Name of the plugin to install. - required: True + required: true type: str state: description: diff --git a/plugins/modules/database/saphana/hana_query.py b/plugins/modules/database/saphana/hana_query.py index 2ea0ce2510..746b2a3f44 100644 --- a/plugins/modules/database/saphana/hana_query.py +++ b/plugins/modules/database/saphana/hana_query.py @@ -88,7 +88,7 @@ EXAMPLES = r''' - "select user_name from users;" - select * from SYSTEM; host: "localhost" - autocommit: False + autocommit: false - name: Run several queries from file community.general.hana_query: @@ -109,7 +109,7 @@ EXAMPLES = r''' query: - "select user_name from users;" - select * from users; - autocommit: False + autocommit: false ''' RETURN = r''' diff --git a/plugins/modules/files/iso_create.py b/plugins/modules/files/iso_create.py index 1340ab9ce4..d729f222a2 100644 --- a/plugins/modules/files/iso_create.py +++ b/plugins/modules/files/iso_create.py @@ -73,7 +73,7 @@ options: - If set to C(True), then version 2.60 of the UDF spec is used. - If not specified or set to C(False), then no UDF support is added. type: bool - default: False + default: false ''' EXAMPLES = r''' @@ -139,7 +139,7 @@ udf: description: Configured UDF support. returned: on success type: bool - sample: False + sample: false ''' import os diff --git a/plugins/modules/identity/ipa/ipa_host.py b/plugins/modules/identity/ipa/ipa_host.py index 5fb3f1679c..ad3c37877c 100644 --- a/plugins/modules/identity/ipa/ipa_host.py +++ b/plugins/modules/identity/ipa/ipa_host.py @@ -112,8 +112,8 @@ EXAMPLES = r''' ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - validate_certs: False - random_password: True + validate_certs: false + random_password: true - name: Ensure host is disabled community.general.ipa_host: @@ -146,7 +146,7 @@ EXAMPLES = r''' ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - update_dns: True + update_dns: true ''' RETURN = r''' diff --git a/plugins/modules/identity/ipa/ipa_vault.py b/plugins/modules/identity/ipa/ipa_vault.py index bfefc7a94c..40f5844cd9 100644 --- a/plugins/modules/identity/ipa/ipa_vault.py +++ b/plugins/modules/identity/ipa/ipa_vault.py @@ -66,7 +66,7 @@ options: description: - Force replace the existent vault on IPA server. type: bool - default: False + default: false choices: ["True", "False"] validate_certs: description: @@ -115,7 +115,7 @@ EXAMPLES = r''' ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret - replace: True + replace: true - name: Get vault info if already exists community.general.ipa_vault: diff --git a/plugins/modules/identity/keycloak/keycloak_client.py b/plugins/modules/identity/keycloak/keycloak_client.py index 4fffeb2955..22ba6a810a 100644 --- a/plugins/modules/identity/keycloak/keycloak_client.py +++ b/plugins/modules/identity/keycloak/keycloak_client.py @@ -596,7 +596,7 @@ EXAMPLES = ''' root_url: https://www.example.com/ admin_url: https://www.example.com/admin_url base_url: basepath - enabled: True + enabled: true client_authenticator_type: client-secret secret: REALLYWELLKEPTSECRET redirect_uris: @@ -605,20 +605,20 @@ EXAMPLES = ''' web_origins: - https://www.example.com/* not_before: 1507825725 - bearer_only: False - consent_required: False - standard_flow_enabled: True - implicit_flow_enabled: False - direct_access_grants_enabled: False - service_accounts_enabled: False - authorization_services_enabled: False - public_client: False - frontchannel_logout: False + bearer_only: false + consent_required: false + standard_flow_enabled: true + implicit_flow_enabled: false + direct_access_grants_enabled: false + service_accounts_enabled: false + authorization_services_enabled: false + public_client: false + frontchannel_logout: false protocol: openid-connect full_scope_allowed: false node_re_registration_timeout: -1 client_template: test - use_template_config: False + use_template_config: false use_template_scope: false use_template_mappers: false always_display_in_console: true @@ -633,13 +633,13 @@ EXAMPLES = ''' browser: 4c90336b-bf1d-4b87-916d-3677ba4e5fbb protocol_mappers: - config: - access.token.claim: True + access.token.claim: true claim.name: "family_name" - id.token.claim: True + id.token.claim: true jsonType.label: String user.attribute: lastName - userinfo.token.claim: True - consentRequired: True + userinfo.token.claim: true + consentRequired: true consentText: "${familyName}" name: family name protocol: openid-connect @@ -653,14 +653,14 @@ EXAMPLES = ''' protocol: saml protocolMapper: saml-role-list-mapper attributes: - saml.authnstatement: True - saml.client.signature: True - saml.force.post.binding: True - saml.server.signature: True + saml.authnstatement: true + saml.client.signature: true + saml.force.post.binding: true + saml.server.signature: true saml.signature.algorithm: RSA_SHA256 saml.signing.certificate: CERTIFICATEHERE saml.signing.private.key: PRIVATEKEYHERE - saml_force_name_id_format: False + saml_force_name_id_format: false saml_name_id_format: username saml_signature_canonicalization_method: "http://www.w3.org/2001/10/xml-exc-c14n#" user.info.response.signature.alg: RS256 diff --git a/plugins/modules/identity/keycloak/keycloak_clientscope.py b/plugins/modules/identity/keycloak/keycloak_clientscope.py index b690cf4802..0ac6836f7b 100644 --- a/plugins/modules/identity/keycloak/keycloak_clientscope.py +++ b/plugins/modules/identity/keycloak/keycloak_clientscope.py @@ -228,12 +228,12 @@ EXAMPLES = ''' protocol: openid-connect protocol_mappers: - config: - access.token.claim: True + access.token.claim: true claim.name: "family_name" - id.token.claim: True + id.token.claim: true jsonType.label: String user.attribute: lastName - userinfo.token.claim: True + userinfo.token.claim: true name: family name protocol: openid-connect protocolMapper: oidc-usermodel-property-mapper diff --git a/plugins/modules/identity/keycloak/keycloak_clienttemplate.py b/plugins/modules/identity/keycloak/keycloak_clienttemplate.py index b35827372e..4b75bad919 100644 --- a/plugins/modules/identity/keycloak/keycloak_clienttemplate.py +++ b/plugins/modules/identity/keycloak/keycloak_clienttemplate.py @@ -213,13 +213,13 @@ EXAMPLES = ''' name: this_is_a_test protocol_mappers: - config: - access.token.claim: True + access.token.claim: true claim.name: "family_name" - id.token.claim: True + id.token.claim: true jsonType.label: String user.attribute: lastName - userinfo.token.claim: True - consentRequired: True + userinfo.token.claim: true + consentRequired: true consentText: "${familyName}" name: family name protocol: openid-connect diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index 316b1f1d90..8118709b17 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -55,7 +55,7 @@ options: type: str description: - The name of the particular 1Password vault to search, useful if your 1Password user has access to multiple vaults (optional). - required: True + required: true auto_login: type: dict description: @@ -80,18 +80,18 @@ options: description: - The master password for your subdomain. - This is always required when specifying C(auto_login). - required: True + required: true secret_key: type: str description: - The secret key for your subdomain. - Only required for initial sign in. default: {} - required: False + required: false cli_path: type: path description: Used to specify the exact path to the C(op) command line interface - required: False + required: false default: 'op' ''' @@ -114,7 +114,7 @@ EXAMPLES = ''' vault: Name of the vault # optional, only necessary if there is more than 1 Vault available delegate_to: localhost register: my_1password_item - no_log: True # Don't want to log the secrets to the console! + no_log: true # Don't want to log the secrets to the console! # Gather secrets combining simple and advanced search terms to retrieve two items, one of which we fetch two # fields. In the first 'password' is fetched, as a field name is not specified (default behaviour) and in the diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/monitoring/bigpanda.py index 8c2a858877..4e653aadb7 100644 --- a/plugins/modules/monitoring/bigpanda.py +++ b/plugins/modules/monitoring/bigpanda.py @@ -64,7 +64,7 @@ options: type: str description: - Base URL of the API server. - required: False + required: false default: https://api.bigpanda.io validate_certs: description: diff --git a/plugins/modules/monitoring/icinga2_feature.py b/plugins/modules/monitoring/icinga2_feature.py index 395003e65f..2f1d5629d5 100644 --- a/plugins/modules/monitoring/icinga2_feature.py +++ b/plugins/modules/monitoring/icinga2_feature.py @@ -26,7 +26,7 @@ options: type: str description: - This is the feature name to enable or disable. - required: True + required: true state: type: str description: diff --git a/plugins/modules/monitoring/logstash_plugin.py b/plugins/modules/monitoring/logstash_plugin.py index b174515643..a4979646dd 100644 --- a/plugins/modules/monitoring/logstash_plugin.py +++ b/plugins/modules/monitoring/logstash_plugin.py @@ -20,7 +20,7 @@ options: type: str description: - Install plugin with that name. - required: True + required: true state: type: str description: diff --git a/plugins/modules/monitoring/sensu/sensu_handler.py b/plugins/modules/monitoring/sensu/sensu_handler.py index cd56f38f70..15e63e57d3 100644 --- a/plugins/modules/monitoring/sensu/sensu_handler.py +++ b/plugins/modules/monitoring/sensu/sensu_handler.py @@ -27,7 +27,7 @@ options: type: str description: - A unique name for the handler. The name cannot contain special characters or spaces. - required: True + required: true type: type: str description: diff --git a/plugins/modules/monitoring/statusio_maintenance.py b/plugins/modules/monitoring/statusio_maintenance.py index 711e8917d0..b884a943aa 100644 --- a/plugins/modules/monitoring/statusio_maintenance.py +++ b/plugins/modules/monitoring/statusio_maintenance.py @@ -131,8 +131,8 @@ EXAMPLES = ''' api_id: api_id api_key: api_key statuspage: statuspage_id - maintenance_notify_1_hr: True - automation: True + maintenance_notify_1_hr: true + automation: true - name: Create a maintenance window for 60 minutes on server1 and server2 community.general.statusio_maintenance: @@ -145,8 +145,8 @@ EXAMPLES = ''' api_id: api_id api_key: api_key statuspage: statuspage_id - maintenance_notify_1_hr: True - automation: True + maintenance_notify_1_hr: true + automation: true delegate_to: localhost - name: Create a future maintenance window for 24 hours to all hosts inside the Primary Data Center diff --git a/plugins/modules/net_tools/cloudflare_dns.py b/plugins/modules/net_tools/cloudflare_dns.py index dca9a8e176..92132c0f6f 100644 --- a/plugins/modules/net_tools/cloudflare_dns.py +++ b/plugins/modules/net_tools/cloudflare_dns.py @@ -304,7 +304,7 @@ record: description: No documentation available. returned: success type: bool - sample: False + sample: false meta: description: No documentation available. returned: success @@ -329,12 +329,12 @@ record: description: Whether this record can be proxied through Cloudflare. returned: success type: bool - sample: False + sample: false proxied: description: Whether the record is proxied through Cloudflare. returned: success type: bool - sample: False + sample: false ttl: description: The time-to-live for the record. returned: success diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/net_tools/dnsmadeeasy.py index 0efbe5b6e0..ec9e9951cd 100644 --- a/plugins/modules/net_tools/dnsmadeeasy.py +++ b/plugins/modules/net_tools/dnsmadeeasy.py @@ -254,7 +254,7 @@ EXAMPLES = ''' record_name: test record_type: A record_value: 127.0.0.1 - failover: True + failover: true ip1: 127.0.0.2 ip2: 127.0.0.3 @@ -267,7 +267,7 @@ EXAMPLES = ''' record_name: test record_type: A record_value: 127.0.0.1 - failover: True + failover: true ip1: 127.0.0.2 ip2: 127.0.0.3 ip3: 127.0.0.4 @@ -320,7 +320,7 @@ EXAMPLES = ''' record_name: test record_type: A record_value: 127.0.0.1 - failover: True + failover: true ip1: 127.0.0.2 ip2: 127.0.0.3 monitor: true diff --git a/plugins/modules/net_tools/netcup_dns.py b/plugins/modules/net_tools/netcup_dns.py index db6bcd61ad..e6bf3de0c3 100644 --- a/plugins/modules/net_tools/netcup_dns.py +++ b/plugins/modules/net_tools/netcup_dns.py @@ -20,22 +20,22 @@ options: api_key: description: - "API key for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))." - required: True + required: true type: str api_password: description: - "API password for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))." - required: True + required: true type: str customer_id: description: - Netcup customer id. - required: True + required: true type: int domain: description: - Domainname the records should be added / removed. - required: True + required: true type: str record: description: @@ -47,7 +47,7 @@ options: description: - Record type. choices: ['A', 'AAAA', 'MX', 'CNAME', 'CAA', 'SRV', 'TXT', 'TLSA', 'NS', 'DS'] - required: True + required: true type: str value: description: @@ -56,19 +56,19 @@ options: type: str solo: type: bool - default: False + default: false description: - Whether the record should be the only one for that record type and record name. Only use with I(state=present). - This will delete all other records with the same record name and type. priority: description: - Record priority. Required for I(type=MX). - required: False + required: false type: int state: description: - Whether the record should exist or not. - required: False + required: false default: present choices: [ 'present', 'absent' ] type: str diff --git a/plugins/modules/net_tools/pritunl/pritunl_org.py b/plugins/modules/net_tools/pritunl/pritunl_org.py index 0900ccf3be..75c3564f24 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_org.py +++ b/plugins/modules/net_tools/pritunl/pritunl_org.py @@ -68,11 +68,11 @@ response: type: dict sample: { - "auth_api": False, + "auth_api": false, "name": "Foo", - "auth_token": None, + "auth_token": null, "user_count": 0, - "auth_secret": None, + "auth_secret": null, "id": "csftwlu6uhralzi2dpmhekz3", } """ diff --git a/plugins/modules/net_tools/pritunl/pritunl_org_info.py b/plugins/modules/net_tools/pritunl/pritunl_org_info.py index 65e8c93c56..1529239ad9 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_org_info.py +++ b/plugins/modules/net_tools/pritunl/pritunl_org_info.py @@ -49,27 +49,27 @@ organizations: sample: [ { - "auth_api": False, + "auth_api": false, "name": "FooOrg", - "auth_token": None, + "auth_token": null, "user_count": 0, - "auth_secret": None, + "auth_secret": null, "id": "csftwlu6uhralzi2dpmhekz3", }, { - "auth_api": False, + "auth_api": false, "name": "MyOrg", - "auth_token": None, + "auth_token": null, "user_count": 3, - "auth_secret": None, + "auth_secret": null, "id": "58070daee63f3b2e6e472c36", }, { - "auth_api": False, + "auth_api": false, "name": "BarOrg", - "auth_token": None, + "auth_token": null, "user_count": 0, - "auth_secret": None, + "auth_secret": null, "id": "v1sncsxxybnsylc8gpqg85pg", } ] diff --git a/plugins/modules/notification/catapult.py b/plugins/modules/notification/catapult.py index 64853849fc..8b8c72974d 100644 --- a/plugins/modules/notification/catapult.py +++ b/plugins/modules/notification/catapult.py @@ -90,7 +90,7 @@ changed: description: Whether the api accepted the message. returned: always type: bool - sample: True + sample: true ''' diff --git a/plugins/modules/notification/mattermost.py b/plugins/modules/notification/mattermost.py index 8f2f0b608f..af6666b3cd 100644 --- a/plugins/modules/notification/mattermost.py +++ b/plugins/modules/notification/mattermost.py @@ -97,10 +97,10 @@ EXAMPLES = """ fields: - title: System A value: "load average: 0,74, 0,66, 0,63" - short: True + short: true - title: System B value: 'load average: 5,16, 4,64, 2,43' - short: True + short: true """ RETURN = ''' diff --git a/plugins/modules/notification/mqtt.py b/plugins/modules/notification/mqtt.py index 81d2bf6a4f..fe6e7347fc 100644 --- a/plugins/modules/notification/mqtt.py +++ b/plugins/modules/notification/mqtt.py @@ -112,7 +112,7 @@ EXAMPLES = ''' topic: 'service/ansible/{{ ansible_hostname }}' payload: 'Hello at {{ ansible_date_time.iso8601 }}' qos: 0 - retain: False + retain: false client_id: ans001 delegate_to: localhost ''' diff --git a/plugins/modules/notification/rocketchat.py b/plugins/modules/notification/rocketchat.py index affbb625e1..153567e22a 100644 --- a/plugins/modules/notification/rocketchat.py +++ b/plugins/modules/notification/rocketchat.py @@ -135,10 +135,10 @@ EXAMPLES = """ fields: - title: System A value: 'load average: 0,74, 0,66, 0,63' - short: True + short: true - title: System B value: 'load average: 5,16, 4,64, 2,43' - short: True + short: true delegate_to: localhost """ diff --git a/plugins/modules/notification/slack.py b/plugins/modules/notification/slack.py index d985412932..154a8ccffd 100644 --- a/plugins/modules/notification/slack.py +++ b/plugins/modules/notification/slack.py @@ -175,10 +175,10 @@ EXAMPLES = """ fields: - title: System A value: "load average: 0,74, 0,66, 0,63" - short: True + short: true - title: System B value: 'load average: 5,16, 4,64, 2,43' - short: True + short: true - name: Use the blocks API community.general.slack: diff --git a/plugins/modules/notification/syslogger.py b/plugins/modules/notification/syslogger.py index 07cdb87227..5fc21a9dc1 100644 --- a/plugins/modules/notification/syslogger.py +++ b/plugins/modules/notification/syslogger.py @@ -18,7 +18,7 @@ options: type: str description: - This is the message to place in syslog. - required: True + required: true priority: type: str description: @@ -37,7 +37,7 @@ options: description: - Log the PID in brackets. type: bool - default: False + default: false ident: description: - Specify the name of application name which is sending the log to syslog. @@ -88,7 +88,7 @@ log_pid: description: Log PID status returned: always type: bool - sample: True + sample: true msg: description: Message sent to syslog returned: always diff --git a/plugins/modules/notification/telegram.py b/plugins/modules/notification/telegram.py index c647565fd4..499af4ef1a 100644 --- a/plugins/modules/notification/telegram.py +++ b/plugins/modules/notification/telegram.py @@ -54,8 +54,8 @@ EXAMPLES = """ chat_id: 000000 parse_mode: "markdown" text: "Your precious application has been deployed: https://example.com" - disable_web_page_preview: True - disable_notification: True + disable_web_page_preview: true + disable_notification: true - name: Forward message to someone community.general.telegram: @@ -64,7 +64,7 @@ EXAMPLES = """ api_args: chat_id: 000000 from_chat_id: 111111 - disable_notification: True + disable_notification: true message_id: '{{ saved_msg_id }}' """ diff --git a/plugins/modules/packaging/language/cpanm.py b/plugins/modules/packaging/language/cpanm.py index 1e85ac04c3..aba4e9d56e 100644 --- a/plugins/modules/packaging/language/cpanm.py +++ b/plugins/modules/packaging/language/cpanm.py @@ -113,7 +113,7 @@ EXAMPLES = ''' - name: Install Dancer perl package without running the unit tests in indicated locallib community.general.cpanm: name: Dancer - notest: True + notest: true locallib: /srv/webapps/my_app/extlib - name: Install Dancer perl package from a specific mirror diff --git a/plugins/modules/packaging/language/pip_package_info.py b/plugins/modules/packaging/language/pip_package_info.py index e5d3acae6f..6931366c87 100644 --- a/plugins/modules/packaging/language/pip_package_info.py +++ b/plugins/modules/packaging/language/pip_package_info.py @@ -20,7 +20,7 @@ options: - A list of the pip executables that will be used to get the packages. They can be supplied with the full path or just the executable name, for example C(pip3.7). default: ['pip'] - required: False + required: false type: list elements: path requirements: diff --git a/plugins/modules/packaging/os/homebrew_cask.py b/plugins/modules/packaging/os/homebrew_cask.py index 8198c22b16..5937831962 100644 --- a/plugins/modules/packaging/os/homebrew_cask.py +++ b/plugins/modules/packaging/os/homebrew_cask.py @@ -111,7 +111,7 @@ EXAMPLES = ''' community.general.homebrew_cask: name: alfred state: present - accept_external_apps: True + accept_external_apps: true - name: Remove cask with force option community.general.homebrew_cask: @@ -133,7 +133,7 @@ EXAMPLES = ''' community.general.homebrew_cask: name: 1password state: upgraded - greedy: True + greedy: true - name: Using sudo password for installing cask community.general.homebrew_cask: diff --git a/plugins/modules/packaging/os/rhsm_repository.py b/plugins/modules/packaging/os/rhsm_repository.py index 5a42f95b86..2ff0cd4c96 100644 --- a/plugins/modules/packaging/os/rhsm_repository.py +++ b/plugins/modules/packaging/os/rhsm_repository.py @@ -65,7 +65,7 @@ EXAMPLES = ''' - name: Disable all repositories except rhel-7-server-rpms community.general.rhsm_repository: name: rhel-7-server-rpms - purge: True + purge: true ''' RETURN = ''' diff --git a/plugins/modules/packaging/os/rpm_ostree_pkg.py b/plugins/modules/packaging/os/rpm_ostree_pkg.py index 61d8c9b057..5f7632b1e1 100644 --- a/plugins/modules/packaging/os/rpm_ostree_pkg.py +++ b/plugins/modules/packaging/os/rpm_ostree_pkg.py @@ -62,7 +62,7 @@ changed: description: State changes. returned: always type: bool - sample: True + sample: true action: description: Action performed. returned: always diff --git a/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py b/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py index e5b5944d1e..1ea5c57b09 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py +++ b/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py @@ -65,7 +65,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Delete an alert profile from ManageIQ community.general.manageiq_alert_profiles: @@ -75,7 +75,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false ''' RETURN = ''' diff --git a/plugins/modules/remote_management/manageiq/manageiq_alerts.py b/plugins/modules/remote_management/manageiq/manageiq_alerts.py index a500653282..d12ebd6ea6 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_alerts.py +++ b/plugins/modules/remote_management/manageiq/manageiq_alerts.py @@ -26,7 +26,7 @@ options: description: - absent - alert should not exist, - present - alert should exist, - required: False + required: false choices: ['absent', 'present'] default: 'present' description: @@ -84,7 +84,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Add an alert with a "miq expression" to ManageIQ community.general.manageiq_alerts: @@ -111,7 +111,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Delete an alert from ManageIQ community.general.manageiq_alerts: @@ -121,7 +121,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false ''' RETURN = ''' diff --git a/plugins/modules/remote_management/manageiq/manageiq_group.py b/plugins/modules/remote_management/manageiq/manageiq_group.py index a1fbc758b6..509de77e21 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_group.py +++ b/plugins/modules/remote_management/manageiq/manageiq_group.py @@ -99,7 +99,7 @@ EXAMPLES = ''' url: 'https://manageiq_server' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Create a group in ManageIQ with the role EvmRole-user and tenant with tenant_id 4 community.general.manageiq_group: @@ -110,7 +110,7 @@ EXAMPLES = ''' url: 'https://manageiq_server' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: - Create or update a group in ManageIQ with the role EvmRole-user and tenant my_tenant. @@ -136,7 +136,7 @@ EXAMPLES = ''' url: 'https://manageiq_server' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Delete a group in ManageIQ community.general.manageiq_group: diff --git a/plugins/modules/remote_management/manageiq/manageiq_policies.py b/plugins/modules/remote_management/manageiq/manageiq_policies.py index 38018771fc..3d54a7b5aa 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_policies.py +++ b/plugins/modules/remote_management/manageiq/manageiq_policies.py @@ -68,7 +68,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Unassign a policy_profile for a provider in ManageIQ community.general.manageiq_policies: @@ -81,7 +81,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: List current policy_profile and policies for a provider in ManageIQ community.general.manageiq_policies: @@ -92,7 +92,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false ''' RETURN = ''' diff --git a/plugins/modules/remote_management/manageiq/manageiq_tags.py b/plugins/modules/remote_management/manageiq/manageiq_tags.py index cb85796455..d8db5960ff 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tags.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tags.py @@ -71,7 +71,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Create new tags for a provider in ManageIQ community.general.manageiq_tags: @@ -86,7 +86,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Remove tags for a provider in ManageIQ community.general.manageiq_tags: @@ -102,7 +102,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: List current tags for a provider in ManageIQ community.general.manageiq_tags: @@ -113,7 +113,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false ''' RETURN = ''' diff --git a/plugins/modules/remote_management/manageiq/manageiq_tenant.py b/plugins/modules/remote_management/manageiq/manageiq_tenant.py index 2cd8deea64..f696934b2f 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tenant.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tenant.py @@ -77,7 +77,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Create a tenant in ManageIQ community.general.manageiq_tenant: @@ -88,7 +88,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Delete a tenant in ManageIQ community.general.manageiq_tenant: @@ -99,7 +99,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Set tenant quota for cpu_allocated, mem_allocated, remove quota for vms_allocated community.general.manageiq_tenant: @@ -113,7 +113,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Delete a tenant in ManageIQ using a token @@ -124,7 +124,7 @@ EXAMPLES = ''' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' - validate_certs: False + validate_certs: false ''' RETURN = ''' diff --git a/plugins/modules/remote_management/manageiq/manageiq_user.py b/plugins/modules/remote_management/manageiq/manageiq_user.py index 42a507924f..b9b69182cb 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_user.py +++ b/plugins/modules/remote_management/manageiq/manageiq_user.py @@ -68,7 +68,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Create a new user in ManageIQ using a token community.general.manageiq_user: @@ -80,7 +80,7 @@ EXAMPLES = ''' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' - validate_certs: False + validate_certs: false - name: Delete a user in ManageIQ community.general.manageiq_user: @@ -90,7 +90,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Delete a user in ManageIQ using a token community.general.manageiq_user: @@ -99,7 +99,7 @@ EXAMPLES = ''' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' - validate_certs: False + validate_certs: false - name: Update email of user in ManageIQ community.general.manageiq_user: @@ -109,7 +109,7 @@ EXAMPLES = ''' url: 'http://127.0.0.1:3000' username: 'admin' password: 'smartvm' - validate_certs: False + validate_certs: false - name: Update email of user in ManageIQ using a token community.general.manageiq_user: @@ -118,7 +118,7 @@ EXAMPLES = ''' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken' - validate_certs: False + validate_certs: false ''' RETURN = ''' diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 35a12eb8c1..4ab519f5a4 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -182,13 +182,13 @@ options: description: - Indicates that the image is treated as inserted on command completion. type: bool - default: True + default: true write_protected: required: false description: - Indicates that the media is treated as write-protected. type: bool - default: True + default: true username: required: false description: diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 448f2d573f..c583fb6cb2 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -191,10 +191,10 @@ EXAMPLES = ''' command: SetNetworkProtocols network_protocols: SNMP: - ProtocolEnabled: True + ProtocolEnabled: true Port: 161 HTTP: - ProtocolEnabled: False + ProtocolEnabled: false Port: 8080 baseuri: "{{ baseuri }}" username: "{{ username }}" @@ -206,7 +206,7 @@ EXAMPLES = ''' command: SetManagerNic nic_config: DHCPv4: - DHCPEnabled: False + DHCPEnabled: false IPv4StaticAddresses: Address: 192.168.1.3 Gateway: 192.168.1.1 diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/remote_management/stacki/stacki_host.py index 9b46698a02..2e339bf280 100644 --- a/plugins/modules/remote_management/stacki/stacki_host.py +++ b/plugins/modules/remote_management/stacki/stacki_host.py @@ -19,23 +19,23 @@ options: name: description: - Name of the host to be added to Stacki. - required: True + required: true type: str stacki_user: description: - Username for authenticating with Stacki API, but if not specified, the environment variable C(stacki_user) is used instead. - required: True + required: true type: str stacki_password: description: - Password for authenticating with Stacki API, but if not specified, the environment variable C(stacki_password) is used instead. - required: True + required: true type: str stacki_endpoint: description: - URL for the Stacki API Endpoint. - required: True + required: true type: str prim_intf_mac: description: diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py index 4c465482d0..daf65d0b4d 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py @@ -66,8 +66,8 @@ EXAMPLES = r''' secured: '{{ item.secured }}' state: present with_items: - - { name: AWS_ACCESS_KEY, value: ABCD1234, secured: False } - - { name: AWS_SECRET, value: qwe789poi123vbn0, secured: True } + - { name: AWS_ACCESS_KEY, value: ABCD1234, secured: false } + - { name: AWS_SECRET, value: qwe789poi123vbn0, secured: true } - name: Remove pipeline variable community.general.bitbucket_pipeline_variable: diff --git a/plugins/modules/source_control/github/github_key.py b/plugins/modules/source_control/github/github_key.py index 23b5d53324..5dfd694275 100644 --- a/plugins/modules/source_control/github/github_key.py +++ b/plugins/modules/source_control/github/github_key.py @@ -51,17 +51,17 @@ deleted_keys: description: An array of key objects that were deleted. Only present on state=absent type: list returned: When state=absent - sample: [{'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ', 'read_only': False}] + sample: [{'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ', 'read_only': false}] matching_keys: description: An array of keys matching the specified name. Only present on state=present type: list returned: When state=present - sample: [{'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ', 'read_only': False}] + sample: [{'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ', 'read_only': false}] key: description: Metadata about the key just created. Only present on state=present type: dict returned: success - sample: {'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ', 'read_only': False} + sample: {'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ', 'read_only': false} ''' EXAMPLES = ''' diff --git a/plugins/modules/source_control/github/github_webhook.py b/plugins/modules/source_control/github/github_webhook.py index 007d2fadc2..b97087d221 100644 --- a/plugins/modules/source_control/github/github_webhook.py +++ b/plugins/modules/source_control/github/github_webhook.py @@ -113,7 +113,7 @@ EXAMPLES = ''' url: https://jenkins.example.com/ghprbhook/ content_type: json secret: "{{ github_shared_secret }}" - insecure_ssl: True + insecure_ssl: true events: - issue_comment - pull_request diff --git a/plugins/modules/source_control/gitlab/gitlab_group.py b/plugins/modules/source_control/gitlab/gitlab_group.py index 5585ea2bc9..8dbe33e6f4 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group.py +++ b/plugins/modules/source_control/gitlab/gitlab_group.py @@ -94,14 +94,14 @@ EXAMPLES = ''' community.general.gitlab_group: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" - validate_certs: False + validate_certs: false name: my_first_group state: absent - name: "Create GitLab Group" community.general.gitlab_group: api_url: https://gitlab.example.com/ - validate_certs: True + validate_certs: true api_username: dj-wasabi api_password: "MySecretPassword" name: my_first_group @@ -112,7 +112,7 @@ EXAMPLES = ''' - name: "Create GitLab SubGroup" community.general.gitlab_group: api_url: https://gitlab.example.com/ - validate_certs: True + validate_certs: true api_username: dj-wasabi api_password: "MySecretPassword" name: my_first_group @@ -124,7 +124,7 @@ EXAMPLES = ''' - name: "Create GitLab Group for SubGroups only" community.general.gitlab_group: api_url: https://gitlab.example.com/ - validate_certs: True + validate_certs: true api_username: dj-wasabi api_password: "MySecretPassword" name: my_main_group diff --git a/plugins/modules/source_control/gitlab/gitlab_project.py b/plugins/modules/source_control/gitlab/gitlab_project.py index 63a94bd444..2f3fc39a0c 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project.py +++ b/plugins/modules/source_control/gitlab/gitlab_project.py @@ -186,7 +186,7 @@ EXAMPLES = r''' community.general.gitlab_project: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" - validate_certs: False + validate_certs: false name: my_first_project state: absent delegate_to: localhost @@ -194,15 +194,15 @@ EXAMPLES = r''' - name: Create GitLab Project in group Ansible community.general.gitlab_project: api_url: https://gitlab.example.com/ - validate_certs: True + validate_certs: true api_username: dj-wasabi api_password: "MySecretPassword" name: my_first_project group: ansible - issues_enabled: False + issues_enabled: false merge_method: rebase_merge - wiki_enabled: True - snippets_enabled: True + wiki_enabled: true + snippets_enabled: true import_url: http://git.example.com/example/lab.git initialize_with_readme: true state: present diff --git a/plugins/modules/source_control/gitlab/gitlab_project_members.py b/plugins/modules/source_control/gitlab/gitlab_project_members.py index 1fe0c818de..f1144680bb 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_members.py @@ -91,7 +91,7 @@ EXAMPLES = r''' community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' - validate_certs: True + validate_certs: true project: projectname gitlab_user: username access_level: developer @@ -101,7 +101,7 @@ EXAMPLES = r''' community.general.gitlab_project_members: api_url: 'https://gitlab.example.com' api_token: 'Your-Private-Token' - validate_certs: False + validate_certs: false project: projectname gitlab_user: username state: absent diff --git a/plugins/modules/source_control/gitlab/gitlab_runner.py b/plugins/modules/source_control/gitlab/gitlab_runner.py index f79bbc2628..14548c2c72 100644 --- a/plugins/modules/source_control/gitlab/gitlab_runner.py +++ b/plugins/modules/source_control/gitlab/gitlab_runner.py @@ -46,14 +46,14 @@ options: description: description: - The unique name of the runner. - required: True + required: true type: str aliases: - name state: description: - Make sure that the runner with the same name exists with the same configuration or delete the runner with the same name. - required: False + required: false default: present choices: ["present", "absent"] type: str @@ -72,39 +72,39 @@ options: active: description: - Define if the runners is immediately active after creation. - required: False + required: false default: true type: bool locked: description: - Determines if the runner is locked or not. - required: False - default: False + required: false + default: false type: bool access_level: description: - Determines if a runner can pick up jobs only from protected branches. - If set to C(ref_protected), runner can pick up jobs only from protected branches. - If set to C(not_protected), runner can pick up jobs from both protected and unprotected branches. - required: False + required: false default: ref_protected choices: ["ref_protected", "not_protected"] type: str maximum_timeout: description: - The maximum time that a runner has to complete a specific job. - required: False + required: false default: 3600 type: int run_untagged: description: - Run untagged jobs or not. - required: False + required: false default: true type: bool tag_list: description: The tags that apply to the runner. - required: False + required: false default: [] type: list elements: str @@ -118,10 +118,10 @@ EXAMPLES = ''' registration_token: 4gfdsg345 description: Docker Machine t1 state: present - active: True + active: true tag_list: ['docker'] - run_untagged: False - locked: False + run_untagged: false + locked: false - name: "Delete runner" community.general.gitlab_runner: diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/source_control/gitlab/gitlab_user.py index 14be4bd177..35bda030fc 100644 --- a/plugins/modules/source_control/gitlab/gitlab_user.py +++ b/plugins/modules/source_control/gitlab/gitlab_user.py @@ -144,14 +144,14 @@ EXAMPLES = ''' community.general.gitlab_user: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" - validate_certs: False + validate_certs: false username: myusername state: absent - name: "Create GitLab User" community.general.gitlab_user: api_url: https://gitlab.example.com/ - validate_certs: True + validate_certs: true api_username: dj-wasabi api_password: "MySecretPassword" name: My Name @@ -167,7 +167,7 @@ EXAMPLES = ''' - name: "Create GitLab User using external identity provider" community.general.gitlab_user: api_url: https://gitlab.example.com/ - validate_certs: True + validate_certs: true api_token: "{{ access_token }}" name: My Name username: myusername @@ -184,7 +184,7 @@ EXAMPLES = ''' community.general.gitlab_user: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" - validate_certs: False + validate_certs: false username: myusername state: blocked @@ -192,7 +192,7 @@ EXAMPLES = ''' community.general.gitlab_user: api_url: https://gitlab.example.com/ api_token: "{{ access_token }}" - validate_certs: False + validate_certs: false username: myusername state: unblocked ''' diff --git a/plugins/modules/storage/pmem/pmem.py b/plugins/modules/storage/pmem/pmem.py index b2027642b3..8cc14c4693 100644 --- a/plugins/modules/storage/pmem/pmem.py +++ b/plugins/modules/storage/pmem/pmem.py @@ -117,7 +117,7 @@ reboot_required: description: Indicates that the system reboot is required to complete the PMem configuration. returned: success type: bool - sample: True + sample: true result: description: - Shows the value of AppDirect, Memory Mode and Reserved size in bytes. @@ -173,7 +173,7 @@ EXAMPLES = r''' - name: Configure the Pmem as AppDirect with not interleaved 10, Memory Mode 70, and the Reserved 20 percent. community.general.pmem: appdirect: 10 - appdirect_interleaved: False + appdirect_interleaved: false memorymode: 70 - name: Configure the Pmem each socket. @@ -181,7 +181,7 @@ EXAMPLES = r''' socket: - id: 0 appdirect: 10 - appdirect_interleaved: False + appdirect_interleaved: false memorymode: 70 reserved: 20 - id: 1 diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index 2b11f8a090..ee0884f995 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -80,12 +80,12 @@ parsable: description: if parsable output should be provided in machine friendly format. returned: if 'parsable' is set to True type: bool - sample: True + sample: true recurse: description: if we should recurse over ZFS dataset returned: if 'recurse' is set to True type: bool - sample: True + sample: true zfs_datasets: description: ZFS dataset facts returned: always diff --git a/plugins/modules/storage/zfs/zpool_facts.py b/plugins/modules/storage/zfs/zpool_facts.py index 3aa953fcae..a749438659 100644 --- a/plugins/modules/storage/zfs/zpool_facts.py +++ b/plugins/modules/storage/zfs/zpool_facts.py @@ -28,7 +28,7 @@ options: - Specifies if property values should be displayed in machine friendly format. type: bool - default: False + default: false required: false properties: description: @@ -113,7 +113,7 @@ parsable: description: if parsable output should be provided in machine friendly format. returned: if 'parsable' is set to True type: bool - sample: True + sample: true ''' from collections import defaultdict diff --git a/plugins/modules/system/beadm.py b/plugins/modules/system/beadm.py index a55aa23b3d..8f1726882b 100644 --- a/plugins/modules/system/beadm.py +++ b/plugins/modules/system/beadm.py @@ -22,7 +22,7 @@ options: description: - ZFS boot environment name. type: str - required: True + required: true aliases: [ "be" ] snapshot: description: @@ -133,7 +133,7 @@ force: description: If forced action is wanted returned: always type: bool - sample: False + sample: false ''' import os diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index 6d1df19093..89daddfcda 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -42,7 +42,7 @@ options: description: - Trust imported cert as CAcert. type: bool - default: False + default: false version_added: '0.2.0' pkcs12_path: description: @@ -122,7 +122,7 @@ EXAMPLES = r''' keystore_create: true state: present cert_alias: LE_RootCA - trust_cacert: True + trust_cacert: true - name: Import SSL certificate from google.com to a keystore, create it if it doesn't exist community.general.java_cert: diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index 190a26a55b..756f5fed42 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -132,7 +132,7 @@ enabled: description: whether the service is enabled at system bootstrap returned: success type: bool - sample: True + sample: true preset: description: whether the enabled status reflects the one set in the relevant C(*.preset) file returned: success @@ -177,7 +177,7 @@ status: description: [] # FIXME returned: success type: bool - sample: True + sample: true LogService: description: [] # FIXME returned: success @@ -322,7 +322,7 @@ user: description: whether the user-level service manager is called returned: success type: bool - sample: False + sample: false ''' diff --git a/plugins/modules/system/parted.py b/plugins/modules/system/parted.py index b2c76df6c4..ae5e7584d1 100644 --- a/plugins/modules/system/parted.py +++ b/plugins/modules/system/parted.py @@ -28,7 +28,7 @@ options: device: description: The block device (disk) where to operate. type: str - required: True + required: true align: description: Set alignment for newly created partitions. Use 'undefined' for parted default aligment. type: str diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/system/solaris_zone.py index 972d9cf2db..5d07dbfc60 100644 --- a/plugins/modules/system/solaris_zone.py +++ b/plugins/modules/system/solaris_zone.py @@ -97,7 +97,7 @@ EXAMPLES = ''' name: zone1 state: present path: /zones/zone1 - sparse: True + sparse: true root_password: Be9oX7OSwWoU. config: 'set autoboot=true; add net; set physical=bge0; set address=10.1.1.1; end' diff --git a/plugins/modules/system/syspatch.py b/plugins/modules/system/syspatch.py index a184f3c66b..36b934f299 100644 --- a/plugins/modules/system/syspatch.py +++ b/plugins/modules/system/syspatch.py @@ -70,7 +70,7 @@ reboot_needed: description: Whether or not a reboot is required after an update. returned: always type: bool - sample: True + sample: true ''' from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/web_infrastructure/apache2_module.py b/plugins/modules/web_infrastructure/apache2_module.py index e887a628c8..65d2f689bf 100644 --- a/plugins/modules/web_infrastructure/apache2_module.py +++ b/plugins/modules/web_infrastructure/apache2_module.py @@ -31,13 +31,13 @@ options: - Identifier of the module as listed by C(apache2ctl -M). This is optional and usually determined automatically by the common convention of appending C(_module) to I(name) as well as custom exception for popular modules. - required: False + required: false force: description: - Force disabling of default modules and override Debian warnings. required: false type: bool - default: False + default: false state: type: str description: @@ -48,7 +48,7 @@ options: description: - Ignore configuration checks about inconsistent module configuration. Especially for mpm_* modules. type: bool - default: False + default: false requirements: ["a2enmod","a2dismod"] notes: - This does not work on RedHat-based distributions. It does work on Debian- and SuSE-based distributions. @@ -70,13 +70,13 @@ EXAMPLES = ''' community.general.apache2_module: state: absent name: autoindex - force: True + force: true - name: Disable mpm_worker and ignore warnings about missing mpm module community.general.apache2_module: state: absent name: mpm_worker - ignore_configcheck: True + ignore_configcheck: true - name: Enable dump_io module, which is identified as dumpio_module inside apache2 community.general.apache2_module: diff --git a/plugins/modules/web_infrastructure/deploy_helper.py b/plugins/modules/web_infrastructure/deploy_helper.py index b30470d38c..3d3fe08f28 100644 --- a/plugins/modules/web_infrastructure/deploy_helper.py +++ b/plugins/modules/web_infrastructure/deploy_helper.py @@ -34,7 +34,7 @@ description: options: path: type: path - required: True + required: true aliases: ['dest'] description: - The root path of the project. @@ -234,7 +234,7 @@ EXAMPLES = ''' path: /path/to/root release: '{{ deploy_helper.new_release }}' state: finalize - clean: False + clean: false - community.general.deploy_helper: path: /path/to/root state: clean diff --git a/plugins/modules/web_infrastructure/jenkins_job.py b/plugins/modules/web_infrastructure/jenkins_job.py index 063409510d..0ea52ab36b 100644 --- a/plugins/modules/web_infrastructure/jenkins_job.py +++ b/plugins/modules/web_infrastructure/jenkins_job.py @@ -114,7 +114,7 @@ EXAMPLES = ''' community.general.jenkins_job: name: test password: admin - enabled: False + enabled: false url: http://localhost:8080 user: admin @@ -122,7 +122,7 @@ EXAMPLES = ''' community.general.jenkins_job: name: test token: asdfasfasfasdfasdfadfasfasdfasdfc - enabled: False + enabled: false url: http://localhost:8080 user: admin ''' diff --git a/plugins/modules/web_infrastructure/jenkins_job_info.py b/plugins/modules/web_infrastructure/jenkins_job_info.py index f9909a9308..1195a3e03d 100644 --- a/plugins/modules/web_infrastructure/jenkins_job_info.py +++ b/plugins/modules/web_infrastructure/jenkins_job_info.py @@ -119,7 +119,7 @@ EXAMPLES = ''' user: admin token: 126df5c60d66c66e3b75b11104a16a8a url: https://jenkins.example.com - validate_certs: False + validate_certs: false register: my_jenkins_job_info ''' diff --git a/plugins/modules/web_infrastructure/rundeck_acl_policy.py b/plugins/modules/web_infrastructure/rundeck_acl_policy.py index e76b25e792..6168cb5b64 100644 --- a/plugins/modules/web_infrastructure/rundeck_acl_policy.py +++ b/plugins/modules/web_infrastructure/rundeck_acl_policy.py @@ -30,12 +30,12 @@ options: type: str description: - Sets the project name. - required: True + required: true url: type: str description: - Sets the rundeck instance URL. - required: True + required: true api_version: type: int description: @@ -46,7 +46,7 @@ options: type: str description: - Sets the token to authenticate against Rundeck API. - required: True + required: true project: type: str description: diff --git a/plugins/modules/web_infrastructure/rundeck_project.py b/plugins/modules/web_infrastructure/rundeck_project.py index 0c2fb8686e..88f4a78100 100644 --- a/plugins/modules/web_infrastructure/rundeck_project.py +++ b/plugins/modules/web_infrastructure/rundeck_project.py @@ -32,12 +32,12 @@ options: type: str description: - Sets the project name. - required: True + required: true url: type: str description: - Sets the rundeck instance URL. - required: True + required: true api_version: type: int description: @@ -48,7 +48,7 @@ options: type: str description: - Sets the token to authenticate against Rundeck API. - required: True + required: true client_cert: version_added: '0.2.0' client_key: diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py index 2dd066ec66..693f25964a 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py @@ -51,7 +51,7 @@ options: encrypted: description: - Optionally enable encryption. - default: False + default: false type: bool key: description: diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py index 19eef74b52..387b8301a0 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py @@ -53,12 +53,12 @@ options: resolved: description: - whether the hostname's ipv4 address is already resolved or not - default: False + default: false type: bool resolved6: description: - whether the hostname's ipv6 address is already resolved or not - default: False + default: false type: bool timeout: type: int diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py index 8ebdd7f32a..aab426cc03 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py @@ -52,7 +52,7 @@ options: description: - Should the login data be stripped when proxying the request to the backend host type: bool - default: True + default: true choices: - True - False @@ -112,7 +112,7 @@ options: description: - Allow session persistency type: bool - default: False + default: false choices: - True - False @@ -125,7 +125,7 @@ options: description: - Specifies if limitation of session lifetime is active type: bool - default: True + default: true choices: - True - False @@ -147,7 +147,7 @@ options: description: - Specifies if session timeout is active type: bool - default: True + default: true choices: - True - False @@ -178,7 +178,7 @@ options: description: - Should a redirect to the requested URL be made type: bool - default: False + default: false choices: - True - False diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py index 29d35579b9..f322bc8216 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py @@ -27,7 +27,7 @@ options: name: description: - The name of the object. Will be used to identify the entry - required: True + required: true type: str op: description: @@ -36,7 +36,7 @@ options: choices: - 'AND' - 'OR' - required: False + required: false type: str path: description: @@ -44,82 +44,82 @@ options: type: list elements: str default: [] - required: False + required: false skip_custom_threats_filters: description: - A list of threats to be skipped type: list elements: str default: [] - required: False + required: false skip_threats_filter_categories: description: - Define which categories of threats are skipped type: list elements: str default: [] - required: False + required: false skipav: description: - Skip the Antivirus Scanning - default: False + default: false type: bool - required: False + required: false skipbadclients: description: - Block clients with bad reputation - default: False + default: false type: bool - required: False + required: false skipcookie: description: - Skip the Cookie Signing check - default: False + default: false type: bool - required: False + required: false skipform: description: - Enable form hardening - default: False + default: false type: bool - required: False + required: false skipform_missingtoken: description: - Enable form hardening with missing tokens - default: False + default: false type: bool - required: False + required: false skiphtmlrewrite: description: - Protection against SQL - default: False + default: false type: bool - required: False + required: false skiptft: description: - Enable true file type control - default: False + default: false type: bool - required: False + required: false skipurl: description: - Enable static URL hardening - default: False + default: false type: bool - required: False + required: false source: description: - Define which categories of threats are skipped type: list elements: str default: [] - required: False + required: false status: description: - Status of the exception rule set - default: True + default: true type: bool - required: False + required: false extends_documentation_fragment: - community.general.utm diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py index 004b23d3e7..8f5a1e8686 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py @@ -33,7 +33,7 @@ options: description: - Whether to add the content type header or not type: bool - default: False + default: false address: type: str description: @@ -59,7 +59,7 @@ options: description: - Whether to enable the compression type: bool - default: False + default: false domain: type: list elements: str @@ -75,17 +75,17 @@ options: description: - Whether to enable html rewrite or not type: bool - default: False + default: false htmlrewrite_cookies: description: - Whether to enable html rewrite cookie or not type: bool - default: False + default: false implicitredirect: description: - Whether to enable implicit redirection or not type: bool - default: False + default: false lbmethod: type: str description: @@ -111,7 +111,7 @@ options: description: - Whether to preserve host header type: bool - default: False + default: false profile: type: str description: @@ -121,7 +121,7 @@ options: description: - Whether to activate the frontend entry or not type: bool - default: True + default: true type: type: str description: @@ -134,7 +134,7 @@ options: description: - Whether to pass the host header or not type: bool - default: False + default: false extends_documentation_fragment: - community.general.utm diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 11b3929e2b..5864cf1924 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -72,7 +72,7 @@ options: description: - Activate hot standby mode type: bool - default: False + default: false path: type: str description: @@ -82,7 +82,7 @@ options: description: - Whether the location is active or not type: bool - default: True + default: true stickysession_id: type: str description: @@ -92,12 +92,12 @@ options: description: - Enable the stickysession type: bool - default: False + default: false websocket_passthrough: description: - Enable the websocket passthrough type: bool - default: False + default: false extends_documentation_fragment: - community.general.utm diff --git a/plugins/modules/web_infrastructure/taiga_issue.py b/plugins/modules/web_infrastructure/taiga_issue.py index 78505afb76..25f6557ea2 100644 --- a/plugins/modules/web_infrastructure/taiga_issue.py +++ b/plugins/modules/web_infrastructure/taiga_issue.py @@ -27,17 +27,17 @@ options: type: str description: - Name of the project containing the issue. Must exist previously. - required: True + required: true subject: type: str description: - The issue subject. - required: True + required: true issue_type: type: str description: - The issue type. Must exist previously. - required: True + required: true priority: type: str description: From 946c48d14874f92cff38afb17ad276af2e05294d Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Thu, 8 Sep 2022 13:44:54 +0800 Subject: [PATCH 0210/2104] nmcli: honor IP options for VPNs (#5228) * nmcli: honor IP options for VPNs This can be used for split tunneling - I extended a test as an example. * Add changelog --- changelogs/fragments/5228-nmcli-ip-options.yaml | 2 ++ plugins/modules/net_tools/nmcli.py | 1 + .../unit/plugins/modules/net_tools/test_nmcli.py | 15 +++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 changelogs/fragments/5228-nmcli-ip-options.yaml diff --git a/changelogs/fragments/5228-nmcli-ip-options.yaml b/changelogs/fragments/5228-nmcli-ip-options.yaml new file mode 100644 index 0000000000..03901795d7 --- /dev/null +++ b/changelogs/fragments/5228-nmcli-ip-options.yaml @@ -0,0 +1,2 @@ +minor_changes: + - "nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228)." diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index da7796894a..10299972e5 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -1730,6 +1730,7 @@ class Nmcli(object): '802-11-wireless', 'gsm', 'wireguard', + 'vpn', ) @property diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index b10f4b2c00..cfc1282c83 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -1208,6 +1208,8 @@ TESTCASE_VPN_L2TP = [ 'ipsec-enabled': 'true', 'ipsec-psk': 'QnJpdHRhbnkxMjM=', }, + 'gw4_ignore_auto': True, + 'routes4': ['192.168.200.0/24'], 'autoconnect': 'false', 'state': 'present', '_ansible_check_mode': False, @@ -1220,7 +1222,14 @@ connection.type: vpn connection.autoconnect: no connection.permissions: brittany ipv4.method: auto +ipv4.routes: { ip = 192.168.200.0/24 } +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.ignore-auto-dns: no +ipv4.ignore-auto-routes: yes ipv6.method: auto +ipv6.ignore-auto-dns: no +ipv6.ignore-auto-routes: no vpn.service-type: org.freedesktop.NetworkManager.l2tp vpn.data: gateway = vpn.example.com, ipsec-enabled = true, ipsec-psk = QnJpdHRhbnkxMjM=, password-flags = 2, user = brittany vpn.secrets: ipsec-psk = QnJpdHRhbnkxMjM= @@ -1251,7 +1260,13 @@ connection.type: vpn connection.autoconnect: no connection.permissions: brittany ipv4.method: auto +ipv4.never-default: no +ipv4.may-fail: yes +ipv4.ignore-auto-dns: no +ipv4.ignore-auto-routes: no ipv6.method: auto +ipv6.ignore-auto-dns: no +ipv6.ignore-auto-routes: no vpn.service-type: org.freedesktop.NetworkManager.pptp vpn.data: gateway=vpn.example.com, password-flags=2, user=brittany """ From b4f89b78dd43f75f434db3086d5302d104af070d Mon Sep 17 00:00:00 2001 From: betuxy <72452886+betuxy@users.noreply.github.com> Date: Thu, 8 Sep 2022 07:45:23 +0200 Subject: [PATCH 0211/2104] nmcli: Add xmit_hash_policy to bond options. (#5149) * Add xmit_hash_policy to nmcli bond-options. * #5149 - Add changelog fragment. * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update changelogs/fragments/5149-nmcli-bond-option.yml Co-authored-by: Felix Fontein Co-authored-by: Ole Pannbacker Co-authored-by: Felix Fontein --- changelogs/fragments/5149-nmcli-bond-option.yml | 2 ++ plugins/modules/net_tools/nmcli.py | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 changelogs/fragments/5149-nmcli-bond-option.yml diff --git a/changelogs/fragments/5149-nmcli-bond-option.yml b/changelogs/fragments/5149-nmcli-bond-option.yml new file mode 100644 index 0000000000..2d168f8544 --- /dev/null +++ b/changelogs/fragments/5149-nmcli-bond-option.yml @@ -0,0 +1,2 @@ +minor_changes: + - nmcli - add bond option ``xmit_hash_policy`` to bond options (https://github.com/ansible-collections/community.general/issues/5148). diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 10299972e5..f5a45b2f5b 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -319,6 +319,11 @@ options: description: - This is only used with bond - updelay. type: int + xmit_hash_policy: + description: + - This is only used with bond - xmit_hash_policy type. + type: str + version_added: 5.6.0 arp_interval: description: - This is only used with bond - ARP interval. @@ -1440,6 +1445,7 @@ class Nmcli(object): self.primary = module.params['primary'] self.downdelay = module.params['downdelay'] self.updelay = module.params['updelay'] + self.xmit_hash_policy = module.params['xmit_hash_policy'] self.arp_interval = module.params['arp_interval'] self.arp_ip_target = module.params['arp_ip_target'] self.slavepriority = module.params['slavepriority'] @@ -1580,6 +1586,7 @@ class Nmcli(object): 'mode': self.mode, 'primary': self.primary, 'updelay': self.updelay, + 'xmit_hash_policy': self.xmit_hash_policy, }) elif self.type == 'bond-slave': options.update({ @@ -2228,6 +2235,7 @@ def main(): miimon=dict(type='int'), downdelay=dict(type='int'), updelay=dict(type='int'), + xmit_hash_policy=dict(type='str'), arp_interval=dict(type='int'), arp_ip_target=dict(type='str'), primary=dict(type='str'), From be9acc7fbaba5dbc8be5c9019382891126d409ad Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 8 Sep 2022 07:46:10 +0200 Subject: [PATCH 0212/2104] homebrew: add Linux brew path to defaults (#5241) * homebrew: add Linux brew path to defaults * changelogs: add 5241 fragment * homebrew_tap: add Linux brew path to defaults * changelogs: update 5241 entry * homebrew_tap: format path separator in desc Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5241-homebrew-add-linux-path.yaml | 2 ++ plugins/modules/packaging/os/homebrew.py | 4 ++-- plugins/modules/packaging/os/homebrew_tap.py | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5241-homebrew-add-linux-path.yaml diff --git a/changelogs/fragments/5241-homebrew-add-linux-path.yaml b/changelogs/fragments/5241-homebrew-add-linux-path.yaml new file mode 100644 index 0000000000..3a954c6a4f --- /dev/null +++ b/changelogs/fragments/5241-homebrew-add-linux-path.yaml @@ -0,0 +1,2 @@ +minor_changes: + - homebrew, homebrew_tap - added Homebrew on Linux path to defaults (https://github.com/ansible-collections/community.general/pull/5241). diff --git a/plugins/modules/packaging/os/homebrew.py b/plugins/modules/packaging/os/homebrew.py index b5c6dbdc34..a72d929a81 100644 --- a/plugins/modules/packaging/os/homebrew.py +++ b/plugins/modules/packaging/os/homebrew.py @@ -39,7 +39,7 @@ options: - "A C(:) separated list of paths to search for C(brew) executable. Since a package (I(formula) in homebrew parlance) location is prefixed relative to the actual path of I(brew) command, providing an alternative I(brew) path enables managing different set of packages in an alternative location in the system." - default: '/usr/local/bin:/opt/homebrew/bin' + default: '/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin' type: path state: description: @@ -876,7 +876,7 @@ def main(): elements='str', ), path=dict( - default="/usr/local/bin:/opt/homebrew/bin", + default="/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin", required=False, type='path', ), diff --git a/plugins/modules/packaging/os/homebrew_tap.py b/plugins/modules/packaging/os/homebrew_tap.py index bbba2d9f6d..0cc5b23ce8 100644 --- a/plugins/modules/packaging/os/homebrew_tap.py +++ b/plugins/modules/packaging/os/homebrew_tap.py @@ -48,8 +48,8 @@ options: type: str path: description: - - "A ':' separated list of paths to search for C(brew) executable." - default: '/usr/local/bin:/opt/homebrew/bin' + - "A C(:) separated list of paths to search for C(brew) executable." + default: '/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin' type: path version_added: '2.1.0' requirements: [ homebrew ] @@ -219,7 +219,7 @@ def main(): url=dict(default=None, required=False), state=dict(default='present', choices=['present', 'absent']), path=dict( - default="/usr/local/bin:/opt/homebrew/bin", + default="/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin", required=False, type='path', ), From 775be1d3f3edb1b53049b625f2115f1b1f75179b Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 10 Sep 2022 08:23:48 +1200 Subject: [PATCH 0213/2104] multiple modules: removed unused imports (#5240) * multiple modules: removed unused imports * fixed ali_instance(_info) import check * add changelog fragment * Update changelogs/fragments/5240-unused-imports.yaml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5240-unused-imports.yaml | 3 +++ plugins/module_utils/alicloud_ecs.py | 4 ++++ plugins/modules/cloud/alicloud/ali_instance.py | 14 +++----------- .../modules/cloud/alicloud/ali_instance_info.py | 14 +++----------- plugins/modules/cloud/misc/proxmox.py | 3 +-- plugins/modules/cloud/misc/proxmox_domain_info.py | 2 +- plugins/modules/cloud/misc/proxmox_group_info.py | 2 +- plugins/modules/cloud/misc/proxmox_kvm.py | 4 +--- plugins/modules/cloud/misc/proxmox_nic.py | 2 +- plugins/modules/cloud/misc/proxmox_snap.py | 4 ++-- plugins/modules/cloud/misc/proxmox_storage_info.py | 2 +- plugins/modules/cloud/misc/proxmox_tasks_info.py | 2 +- plugins/modules/cloud/misc/proxmox_template.py | 2 +- plugins/modules/cloud/misc/proxmox_user_info.py | 2 +- plugins/modules/database/misc/redis.py | 2 +- plugins/modules/monitoring/airbrake_deployment.py | 1 - .../modules/monitoring/datadog/datadog_downtime.py | 1 - plugins/modules/remote_management/imc/imc_rest.py | 1 - .../remote_management/redfish/ilo_redfish_info.py | 1 - plugins/modules/system/sap_task_list_execute.py | 1 - .../rundeck_job_executions_info.py | 1 - .../modules/web_infrastructure/rundeck_job_run.py | 2 -- 22 files changed, 25 insertions(+), 45 deletions(-) create mode 100644 changelogs/fragments/5240-unused-imports.yaml diff --git a/changelogs/fragments/5240-unused-imports.yaml b/changelogs/fragments/5240-unused-imports.yaml new file mode 100644 index 0000000000..b615b0c6a3 --- /dev/null +++ b/changelogs/fragments/5240-unused-imports.yaml @@ -0,0 +1,3 @@ +minor_changes: + - ali_instance - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). + - ali_instance_info - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). diff --git a/plugins/module_utils/alicloud_ecs.py b/plugins/module_utils/alicloud_ecs.py index 8532d25c1c..8210793c76 100644 --- a/plugins/module_utils/alicloud_ecs.py +++ b/plugins/module_utils/alicloud_ecs.py @@ -15,6 +15,7 @@ __metaclass__ = type import os import json +import traceback from ansible.module_utils.basic import env_fallback try: @@ -28,8 +29,11 @@ try: import footmark.dns import footmark.ram import footmark.market + + FOOTMARK_IMP_ERR = None HAS_FOOTMARK = True except ImportError: + FOOTMARK_IMP_ERR = traceback.format_exc() HAS_FOOTMARK = False diff --git a/plugins/modules/cloud/alicloud/ali_instance.py b/plugins/modules/cloud/alicloud/ali_instance.py index 40fced0866..4acec0a109 100644 --- a/plugins/modules/cloud/alicloud/ali_instance.py +++ b/plugins/modules/cloud/alicloud/ali_instance.py @@ -617,18 +617,10 @@ ids: import re import time -import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible_collections.community.general.plugins.module_utils.alicloud_ecs import ecs_argument_spec, ecs_connect - -HAS_FOOTMARK = False -FOOTMARK_IMP_ERR = None -try: - from footmark.exception import ECSResponseError - HAS_FOOTMARK = True -except ImportError: - FOOTMARK_IMP_ERR = traceback.format_exc() - HAS_FOOTMARK = False +from ansible_collections.community.general.plugins.module_utils.alicloud_ecs import ( + ecs_argument_spec, ecs_connect, FOOTMARK_IMP_ERR, HAS_FOOTMARK +) def get_instances_info(connection, ids): diff --git a/plugins/modules/cloud/alicloud/ali_instance_info.py b/plugins/modules/cloud/alicloud/ali_instance_info.py index e40605fe06..4b758477a3 100644 --- a/plugins/modules/cloud/alicloud/ali_instance_info.py +++ b/plugins/modules/cloud/alicloud/ali_instance_info.py @@ -341,18 +341,10 @@ ids: sample: [i-12345er, i-3245fs] ''' -import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible_collections.community.general.plugins.module_utils.alicloud_ecs import ecs_argument_spec, ecs_connect - -HAS_FOOTMARK = False -FOOTMARK_IMP_ERR = None -try: - from footmark.exception import ECSResponseError - HAS_FOOTMARK = True -except ImportError: - FOOTMARK_IMP_ERR = traceback.format_exc() - HAS_FOOTMARK = False +from ansible_collections.community.general.plugins.module_utils.alicloud_ecs import ( + ecs_argument_spec, ecs_connect, FOOTMARK_IMP_ERR, HAS_FOOTMARK +) def main(): diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index 63e31d7a43..c6fbf24f9b 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -390,11 +390,10 @@ EXAMPLES = r''' ''' import time -import traceback from ansible_collections.community.general.plugins.module_utils.version import LooseVersion -from ansible.module_utils.basic import AnsibleModule, env_fallback +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.proxmox import ( diff --git a/plugins/modules/cloud/misc/proxmox_domain_info.py b/plugins/modules/cloud/misc/proxmox_domain_info.py index 4249a8010d..2cabf5b3c7 100644 --- a/plugins/modules/cloud/misc/proxmox_domain_info.py +++ b/plugins/modules/cloud/misc/proxmox_domain_info.py @@ -75,7 +75,7 @@ proxmox_domains: ''' -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.proxmox import ( proxmox_auth_argument_spec, ProxmoxAnsible) diff --git a/plugins/modules/cloud/misc/proxmox_group_info.py b/plugins/modules/cloud/misc/proxmox_group_info.py index 48a411f3ad..d2d4491ce2 100644 --- a/plugins/modules/cloud/misc/proxmox_group_info.py +++ b/plugins/modules/cloud/misc/proxmox_group_info.py @@ -72,7 +72,7 @@ proxmox_groups: ''' -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.proxmox import ( proxmox_auth_argument_spec, ProxmoxAnsible) diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 1180c56173..15a59be815 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -803,14 +803,12 @@ msg: import re import time -import traceback from ansible.module_utils.six.moves.urllib.parse import quote from ansible_collections.community.general.plugins.module_utils.version import LooseVersion from ansible_collections.community.general.plugins.module_utils.proxmox import (proxmox_auth_argument_spec, ProxmoxAnsible) -from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.parsing.convert_bool import boolean diff --git a/plugins/modules/cloud/misc/proxmox_nic.py b/plugins/modules/cloud/misc/proxmox_nic.py index eec32bee3c..49f7f91bcd 100644 --- a/plugins/modules/cloud/misc/proxmox_nic.py +++ b/plugins/modules/cloud/misc/proxmox_nic.py @@ -137,7 +137,7 @@ msg: sample: "Nic net0 unchanged on VM with vmid 103" ''' -from ansible.module_utils.basic import AnsibleModule, env_fallback +from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.proxmox import (proxmox_auth_argument_spec, ProxmoxAnsible) diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/cloud/misc/proxmox_snap.py index b90b51b34c..93fa8d346f 100644 --- a/plugins/modules/cloud/misc/proxmox_snap.py +++ b/plugins/modules/cloud/misc/proxmox_snap.py @@ -102,9 +102,9 @@ RETURN = r'''#''' import time import traceback -from ansible.module_utils.basic import AnsibleModule, missing_required_lib, env_fallback +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native -from ansible_collections.community.general.plugins.module_utils.proxmox import (proxmox_auth_argument_spec, ProxmoxAnsible, HAS_PROXMOXER, PROXMOXER_IMP_ERR) +from ansible_collections.community.general.plugins.module_utils.proxmox import (proxmox_auth_argument_spec, ProxmoxAnsible) class ProxmoxSnapAnsible(ProxmoxAnsible): diff --git a/plugins/modules/cloud/misc/proxmox_storage_info.py b/plugins/modules/cloud/misc/proxmox_storage_info.py index bbc25529a9..a98d3794a9 100644 --- a/plugins/modules/cloud/misc/proxmox_storage_info.py +++ b/plugins/modules/cloud/misc/proxmox_storage_info.py @@ -110,7 +110,7 @@ proxmox_storages: ''' -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.proxmox import ( proxmox_auth_argument_spec, ProxmoxAnsible, proxmox_to_ansible_bool) diff --git a/plugins/modules/cloud/misc/proxmox_tasks_info.py b/plugins/modules/cloud/misc/proxmox_tasks_info.py index 252d3411d0..c0a3dc6886 100644 --- a/plugins/modules/cloud/misc/proxmox_tasks_info.py +++ b/plugins/modules/cloud/misc/proxmox_tasks_info.py @@ -115,7 +115,7 @@ msg: sample: 'Task: UPID:xyz:xyz does not exist on node: proxmoxnode' ''' -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.proxmox import ( proxmox_auth_argument_spec, ProxmoxAnsible) diff --git a/plugins/modules/cloud/misc/proxmox_template.py b/plugins/modules/cloud/misc/proxmox_template.py index 975949efe3..ab6e2d88e8 100644 --- a/plugins/modules/cloud/misc/proxmox_template.py +++ b/plugins/modules/cloud/misc/proxmox_template.py @@ -117,7 +117,7 @@ EXAMPLES = ''' import os import time -from ansible.module_utils.basic import AnsibleModule, env_fallback +from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.proxmox import (proxmox_auth_argument_spec, ProxmoxAnsible) diff --git a/plugins/modules/cloud/misc/proxmox_user_info.py b/plugins/modules/cloud/misc/proxmox_user_info.py index 134fdc1e09..f1b3b881c9 100644 --- a/plugins/modules/cloud/misc/proxmox_user_info.py +++ b/plugins/modules/cloud/misc/proxmox_user_info.py @@ -155,7 +155,7 @@ proxmox_users: ''' -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.proxmox import ( proxmox_auth_argument_spec, ProxmoxAnsible, proxmox_to_ansible_bool) diff --git a/plugins/modules/database/misc/redis.py b/plugins/modules/database/misc/redis.py index 36e7df3883..298b3aaf8c 100644 --- a/plugins/modules/database/misc/redis.py +++ b/plugins/modules/database/misc/redis.py @@ -139,7 +139,7 @@ except ImportError: else: redis_found = True -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.formatters import human_to_bytes from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.redis import ( diff --git a/plugins/modules/monitoring/airbrake_deployment.py b/plugins/modules/monitoring/airbrake_deployment.py index 2b3b1832f3..2fb5b58737 100644 --- a/plugins/modules/monitoring/airbrake_deployment.py +++ b/plugins/modules/monitoring/airbrake_deployment.py @@ -95,7 +95,6 @@ EXAMPLES = ''' from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url -from ansible.module_utils.six.moves.urllib.parse import urlencode # =========================================== diff --git a/plugins/modules/monitoring/datadog/datadog_downtime.py b/plugins/modules/monitoring/datadog/datadog_downtime.py index 2226d0c678..8a1acf7e83 100644 --- a/plugins/modules/monitoring/datadog/datadog_downtime.py +++ b/plugins/modules/monitoring/datadog/datadog_downtime.py @@ -151,7 +151,6 @@ import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib # Import Datadog -from ansible.module_utils.common.text.converters import to_native DATADOG_IMP_ERR = None HAS_DATADOG = True diff --git a/plugins/modules/remote_management/imc/imc_rest.py b/plugins/modules/remote_management/imc/imc_rest.py index 4259558053..4d90bcc54d 100644 --- a/plugins/modules/remote_management/imc/imc_rest.py +++ b/plugins/modules/remote_management/imc/imc_rest.py @@ -264,7 +264,6 @@ output: import datetime import os import traceback -from functools import partial LXML_ETREE_IMP_ERR = None try: diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/remote_management/redfish/ilo_redfish_info.py index d5ff123564..4611e620d5 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_info.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_info.py @@ -106,7 +106,6 @@ CATEGORY_COMMANDS_DEFAULT = { } from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.ilo_redfish_utils import iLORedfishUtils diff --git a/plugins/modules/system/sap_task_list_execute.py b/plugins/modules/system/sap_task_list_execute.py index 52c2361414..29936b8483 100644 --- a/plugins/modules/system/sap_task_list_execute.py +++ b/plugins/modules/system/sap_task_list_execute.py @@ -179,7 +179,6 @@ out: ''' from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils.json_utils import json import traceback try: from pyrfc import Connection diff --git a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py index bafb8f78e5..e6c9239d75 100644 --- a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py +++ b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py @@ -131,7 +131,6 @@ executions: import json from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.six.moves.urllib.parse import quote from ansible_collections.community.general.plugins.module_utils.rundeck import ( api_argument_spec, diff --git a/plugins/modules/web_infrastructure/rundeck_job_run.py b/plugins/modules/web_infrastructure/rundeck_job_run.py index 936d490349..0416d86fa7 100644 --- a/plugins/modules/web_infrastructure/rundeck_job_run.py +++ b/plugins/modules/web_infrastructure/rundeck_job_run.py @@ -174,12 +174,10 @@ execution_info: ''' # Modules import -import json from datetime import datetime, timedelta from time import sleep from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.six.moves.urllib.parse import quote from ansible_collections.community.general.plugins.module_utils.rundeck import ( api_argument_spec, From f929422dacbd0f69f42fe43b26fbc4470984d09a Mon Sep 17 00:00:00 2001 From: Pavel Zwerschke Date: Sat, 10 Sep 2022 10:52:14 +0200 Subject: [PATCH 0214/2104] osx_defaults: add expand_user_and_vars flag to write (#5243) * Add expand_user_and_vars flag to write Closes #5234 * Add changelog * Update changelogs/fragments/5243-osx-defaults-expand-user-flags.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5243-osx-defaults-expand-user-flags.yml | 2 ++ plugins/modules/system/osx_defaults.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5243-osx-defaults-expand-user-flags.yml diff --git a/changelogs/fragments/5243-osx-defaults-expand-user-flags.yml b/changelogs/fragments/5243-osx-defaults-expand-user-flags.yml new file mode 100644 index 0000000000..c7e17fb8ca --- /dev/null +++ b/changelogs/fragments/5243-osx-defaults-expand-user-flags.yml @@ -0,0 +1,2 @@ +bugfixes: + - osx_defaults - no longer expand ``~`` in ``value`` to the user's home directory, or expand environment variables (https://github.com/ansible-collections/community.general/issues/5234, https://github.com/ansible-collections/community.general/pull/5243). \ No newline at end of file diff --git a/plugins/modules/system/osx_defaults.py b/plugins/modules/system/osx_defaults.py index 5ad390ca33..f905493a31 100644 --- a/plugins/modules/system/osx_defaults.py +++ b/plugins/modules/system/osx_defaults.py @@ -304,7 +304,8 @@ class OSXDefaults(object): if not isinstance(value, list): value = [value] - rc, out, err = self.module.run_command(self._base_command() + ['write', self.domain, self.key, '-' + self.type] + value) + rc, out, err = self.module.run_command(self._base_command() + ['write', self.domain, self.key, '-' + self.type] + value, + expand_user_and_vars=False) if rc != 0: raise OSXDefaultsException('An error occurred while writing value to defaults: %s' % out) From 33059a807c925c7a1792e1617d00f7236a47d7d8 Mon Sep 17 00:00:00 2001 From: Shaul Shnaidman Date: Sat, 10 Sep 2022 11:53:08 +0300 Subject: [PATCH 0215/2104] changed the default proxmox container unprivileged flag (#5224) * changed the default proxmox container to unprivileged * Reverted the default value with a deprecation. * use true/false instead of yes/no * Update plugins/modules/cloud/misc/proxmox.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * param -> parameter * Apply suggestions from code review Co-authored-by: Felix Fontein * fix * review * Update changelogs/fragments/5224-proxmox-unprivileged-default.yaml Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein --- .../5224-proxmox-unprivileged-default.yaml | 2 ++ plugins/modules/cloud/misc/proxmox.py | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5224-proxmox-unprivileged-default.yaml diff --git a/changelogs/fragments/5224-proxmox-unprivileged-default.yaml b/changelogs/fragments/5224-proxmox-unprivileged-default.yaml new file mode 100644 index 0000000000..d716ff285f --- /dev/null +++ b/changelogs/fragments/5224-proxmox-unprivileged-default.yaml @@ -0,0 +1,2 @@ +deprecated_features: + - proxmox - deprecated the current ``unprivileged`` default value, will be changed to ``true`` in community.general 7.0.0 (https://github.com/pull/5224). diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index c6fbf24f9b..406666f57b 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -140,9 +140,11 @@ options: type: str unprivileged: description: - - Indicate if the container should be unprivileged + - Indicate if the container should be unprivileged. + - > + The default value for this parameter is C(false) but that is deprecated + and it will be replaced with C(true) in community.general 7.0.0. type: bool - default: false description: description: - Specify the description for the container. Only used on the configuration web interface. @@ -565,7 +567,7 @@ def main(): purge=dict(type='bool', default=False), state=dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']), pubkey=dict(type='str'), - unprivileged=dict(type='bool', default=False), + unprivileged=dict(type='bool'), description=dict(type='str'), hookscript=dict(type='str'), proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']), @@ -607,6 +609,14 @@ def main(): timeout = module.params['timeout'] clone = module.params['clone'] + if module.params['unprivileged'] is None: + module.params['unprivileged'] = False + module.deprecate( + 'The default value `false` for the parameter "unprivileged" is deprecated and it will be replaced with `true`', + version='7.0.0', + collection_name='community.general' + ) + if module.params['proxmox_default_behavior'] == 'compatibility': old_default_values = dict( disk="3", From dde0b55f1ae50d5d9dc6b23fb90eb6aa07a6dbf4 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 10 Sep 2022 11:08:13 +0200 Subject: [PATCH 0216/2104] Restrict Python packages for nomad tests. (#5262) --- tests/integration/targets/nomad/meta/main.yml | 1 + tests/integration/targets/nomad/tasks/main.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/integration/targets/nomad/meta/main.yml b/tests/integration/targets/nomad/meta/main.yml index bda682bf7d..0909be2064 100644 --- a/tests/integration/targets/nomad/meta/main.yml +++ b/tests/integration/targets/nomad/meta/main.yml @@ -7,3 +7,4 @@ dependencies: - setup_pkg_mgr - setup_openssl - setup_remote_tmp_dir + - setup_remote_constraints diff --git a/tests/integration/targets/nomad/tasks/main.yml b/tests/integration/targets/nomad/tasks/main.yml index f04b905ce5..1a143be059 100644 --- a/tests/integration/targets/nomad/tasks/main.yml +++ b/tests/integration/targets/nomad/tasks/main.yml @@ -20,6 +20,7 @@ - name: Install requests<2.20 (CentOS/RHEL 6) pip: name: requests<2.20 + extra_args: "-c {{ remote_constraints }}" register: result until: result is success when: ansible_distribution_file_variety|default() == 'RedHat' and ansible_distribution_major_version is version('6', '<=') @@ -27,12 +28,14 @@ - name: Install python-nomad pip: name: python-nomad + extra_args: "-c {{ remote_constraints }}" register: result until: result is success - name: Install jmespath pip: name: jmespath + extra_args: "-c {{ remote_constraints }}" register: result until: result is success From 0a85bb7d23fd1267ea37d18c78adc5803fba26e1 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 10 Sep 2022 21:19:14 +1200 Subject: [PATCH 0217/2104] multiple modules: removed unused imports (#5258) --- plugins/modules/cloud/misc/proxmox_snap.py | 1 - plugins/modules/cloud/opennebula/one_service.py | 1 - plugins/modules/cloud/ovh/ovh_monthly_billing.py | 2 -- plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py | 2 -- plugins/modules/clustering/nomad/nomad_job_info.py | 4 ---- plugins/modules/monitoring/icinga2_host.py | 1 - plugins/modules/net_tools/dnsimple_info.py | 1 - plugins/modules/net_tools/ipwcli_dns.py | 1 - plugins/modules/packaging/language/yarn.py | 1 - plugins/modules/packaging/os/apt_rpm.py | 3 --- plugins/modules/packaging/os/portinstall.py | 2 -- plugins/modules/packaging/os/urpmi.py | 4 ---- plugins/modules/remote_management/cobbler/cobbler_system.py | 1 - plugins/modules/source_control/git_config.py | 1 - plugins/modules/source_control/github/github_repo.py | 1 - plugins/modules/system/alternatives.py | 1 - plugins/modules/system/beadm.py | 1 - plugins/modules/system/java_cert.py | 2 -- plugins/modules/web_infrastructure/jboss.py | 1 - plugins/modules/web_infrastructure/jenkins_plugin.py | 1 - .../modules/web_infrastructure/rundeck_job_executions_info.py | 3 --- 21 files changed, 35 deletions(-) diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/cloud/misc/proxmox_snap.py index 93fa8d346f..9a9be8dc4d 100644 --- a/plugins/modules/cloud/misc/proxmox_snap.py +++ b/plugins/modules/cloud/misc/proxmox_snap.py @@ -100,7 +100,6 @@ EXAMPLES = r''' RETURN = r'''#''' import time -import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index c91708fddd..96f200a39e 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -243,7 +243,6 @@ roles: ''' import os -import sys from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import open_url diff --git a/plugins/modules/cloud/ovh/ovh_monthly_billing.py b/plugins/modules/cloud/ovh/ovh_monthly_billing.py index 2d8091c802..445041a23b 100644 --- a/plugins/modules/cloud/ovh/ovh_monthly_billing.py +++ b/plugins/modules/cloud/ovh/ovh_monthly_billing.py @@ -73,8 +73,6 @@ EXAMPLES = ''' RETURN = ''' ''' -import os -import sys import traceback try: diff --git a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py index d2f0a10329..7903ad8b9f 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py @@ -171,8 +171,6 @@ instance: } ''' -import re - HAS_XENAPI = False try: import XenAPI diff --git a/plugins/modules/clustering/nomad/nomad_job_info.py b/plugins/modules/clustering/nomad/nomad_job_info.py index 9e293a59d3..5130fd1b60 100644 --- a/plugins/modules/clustering/nomad/nomad_job_info.py +++ b/plugins/modules/clustering/nomad/nomad_job_info.py @@ -266,10 +266,6 @@ result: ''' - -import os -import json - from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common.text.converters import to_native diff --git a/plugins/modules/monitoring/icinga2_host.py b/plugins/modules/monitoring/icinga2_host.py index a846c74f4c..0f4e2b26a0 100644 --- a/plugins/modules/monitoring/icinga2_host.py +++ b/plugins/modules/monitoring/icinga2_host.py @@ -136,7 +136,6 @@ data: ''' import json -import os from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url, url_argument_spec diff --git a/plugins/modules/net_tools/dnsimple_info.py b/plugins/modules/net_tools/dnsimple_info.py index b7f5be1a6d..f4a68f509d 100644 --- a/plugins/modules/net_tools/dnsimple_info.py +++ b/plugins/modules/net_tools/dnsimple_info.py @@ -229,7 +229,6 @@ dnsimple_record_info: import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import missing_required_lib -import json try: from requests import Request, Session diff --git a/plugins/modules/net_tools/ipwcli_dns.py b/plugins/modules/net_tools/ipwcli_dns.py index 8f3b0d1664..9436decc8c 100644 --- a/plugins/modules/net_tools/ipwcli_dns.py +++ b/plugins/modules/net_tools/ipwcli_dns.py @@ -158,7 +158,6 @@ record: ''' from ansible.module_utils.basic import AnsibleModule -import os class ResourceRecord(object): diff --git a/plugins/modules/packaging/language/yarn.py b/plugins/modules/packaging/language/yarn.py index 5c533aadcc..2e96cb799d 100644 --- a/plugins/modules/packaging/language/yarn.py +++ b/plugins/modules/packaging/language/yarn.py @@ -156,7 +156,6 @@ out: ''' import os -import re import json from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/packaging/os/apt_rpm.py b/plugins/modules/packaging/os/apt_rpm.py index 35e3ba5d45..2b6bf3e8a2 100644 --- a/plugins/modules/packaging/os/apt_rpm.py +++ b/plugins/modules/packaging/os/apt_rpm.py @@ -71,10 +71,7 @@ EXAMPLES = ''' update_cache: true ''' -import json import os -import shlex -import sys from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/packaging/os/portinstall.py b/plugins/modules/packaging/os/portinstall.py index 50e4e18646..d044756d9e 100644 --- a/plugins/modules/packaging/os/portinstall.py +++ b/plugins/modules/packaging/os/portinstall.py @@ -58,9 +58,7 @@ EXAMPLES = ''' state: absent ''' -import os import re -import sys from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import shlex_quote diff --git a/plugins/modules/packaging/os/urpmi.py b/plugins/modules/packaging/os/urpmi.py index 5f715f572f..7b1db9c415 100644 --- a/plugins/modules/packaging/os/urpmi.py +++ b/plugins/modules/packaging/os/urpmi.py @@ -81,10 +81,6 @@ EXAMPLES = ''' ''' -import os -import shlex -import sys - from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/remote_management/cobbler/cobbler_system.py b/plugins/modules/remote_management/cobbler/cobbler_system.py index 34ef8c5701..973478b627 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_system.py +++ b/plugins/modules/remote_management/cobbler/cobbler_system.py @@ -145,7 +145,6 @@ system: type: dict ''' -import copy import datetime import ssl diff --git a/plugins/modules/source_control/git_config.py b/plugins/modules/source_control/git_config.py index 464e39040c..9191de0e87 100644 --- a/plugins/modules/source_control/git_config.py +++ b/plugins/modules/source_control/git_config.py @@ -160,7 +160,6 @@ config_values: alias.diffc: "diff --cached" alias.remotev: "remote -v" ''' -import os from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/source_control/github/github_repo.py b/plugins/modules/source_control/github/github_repo.py index 0549a5ad46..d01312fcfa 100644 --- a/plugins/modules/source_control/github/github_repo.py +++ b/plugins/modules/source_control/github/github_repo.py @@ -125,7 +125,6 @@ repo: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -import sys GITHUB_IMP_ERR = None try: diff --git a/plugins/modules/system/alternatives.py b/plugins/modules/system/alternatives.py index 45184187b1..4566144493 100644 --- a/plugins/modules/system/alternatives.py +++ b/plugins/modules/system/alternatives.py @@ -128,7 +128,6 @@ EXAMPLES = r''' import os import re -import subprocess from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/system/beadm.py b/plugins/modules/system/beadm.py index 8f1726882b..8cb43c6cbb 100644 --- a/plugins/modules/system/beadm.py +++ b/plugins/modules/system/beadm.py @@ -137,7 +137,6 @@ force: ''' import os -import re from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index 89daddfcda..a78d71155a 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -176,8 +176,6 @@ cmd: import os import tempfile -import random -import string import re diff --git a/plugins/modules/web_infrastructure/jboss.py b/plugins/modules/web_infrastructure/jboss.py index 1ddd161d78..2dc82f5594 100644 --- a/plugins/modules/web_infrastructure/jboss.py +++ b/plugins/modules/web_infrastructure/jboss.py @@ -73,7 +73,6 @@ EXAMPLES = r""" RETURN = r""" # """ import os -import shutil import time from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py index 3142e1672d..27261bf815 100644 --- a/plugins/modules/web_infrastructure/jenkins_plugin.py +++ b/plugins/modules/web_infrastructure/jenkins_plugin.py @@ -296,7 +296,6 @@ from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.module_utils.urls import fetch_url, url_argument_spec from ansible.module_utils.six import text_type, binary_type from ansible.module_utils.common.text.converters import to_native -import base64 import hashlib import io import json diff --git a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py index e6c9239d75..2af6eb1d5f 100644 --- a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py +++ b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py @@ -127,9 +127,6 @@ executions: ] ''' -# Modules import -import json - from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves.urllib.parse import quote from ansible_collections.community.general.plugins.module_utils.rundeck import ( From b371bd6a5b3015dae44f194b37f7bd44884f69ec Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 10 Sep 2022 11:29:19 +0200 Subject: [PATCH 0218/2104] Fix pkgng tests (#5266) * Now there are problems with 13.0 as well. But maybe 13.1 works again? * 13.1 still does not work, maybe 13.2 will (not yet available in CI)... --- tests/integration/targets/pkgng/tasks/freebsd.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/pkgng/tasks/freebsd.yml b/tests/integration/targets/pkgng/tasks/freebsd.yml index a864daa130..d17a3083d3 100644 --- a/tests/integration/targets/pkgng/tasks/freebsd.yml +++ b/tests/integration/targets/pkgng/tasks/freebsd.yml @@ -465,10 +465,15 @@ # NOTE: FreeBSD 12.0 test runner receives a "connection reset by peer" after ~20% downloaded so we are # only running this on 12.1 or higher # + # NOTE: FreeBSD 13.0 fails to update the package catalogue for unknown reasons (someone with FreeBSD + # knowledge has to take a look) + # # NOTE: FreeBSD 13.1 fails to update the package catalogue for unknown reasons (someone with FreeBSD # knowledge has to take a look) # - when: ansible_distribution_version is version('12.01', '>=') and ansible_distribution_version is version('13.1', '<') + when: >- + (ansible_distribution_version is version('12.01', '>=') and ansible_distribution_version is version('13.0', '<')) + or ansible_distribution_version is version('13.2', '>=') block: - name: Setup testjail include: setup-testjail.yml From 5470ea30dce806dc6c9d766baa57a9ea57aabcd2 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 10 Sep 2022 12:24:14 +0200 Subject: [PATCH 0219/2104] Fix changelogs killed by GitHub. (#5272) --- .../5202-bugfix-environmentError-wrong-indentation.yaml | 2 +- changelogs/fragments/5239-nagios-refactor.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml index d9001169b0..1553983144 100644 --- a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml +++ b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml @@ -1,2 +1,2 @@ bugfixes: - - listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` clause had a wrong indentation. The check is now handled in the ``split_pid_name`` function (https://github.com//pull/5202). \ No newline at end of file + - listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` clause had a wrong indentation. The check is now handled in the ``split_pid_name`` function (https://github.com/ansible-collections/community.general/pull/5202). \ No newline at end of file diff --git a/changelogs/fragments/5239-nagios-refactor.yaml b/changelogs/fragments/5239-nagios-refactor.yaml index e57eef8262..3f61642083 100644 --- a/changelogs/fragments/5239-nagios-refactor.yaml +++ b/changelogs/fragments/5239-nagios-refactor.yaml @@ -1,2 +1,2 @@ minor_changes: - - nagios - minor refactoring on parameter validation for different actions (https://github.com//pull/5239). + - nagios - minor refactoring on parameter validation for different actions (https://github.com/ansible-collections/community.general/pull/5239). From 6b463e6fa69019211653447405a9e61d580d9477 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 13 Sep 2022 06:30:02 +1200 Subject: [PATCH 0220/2104] gitlab modules: improved imports (#5259) * gitlab modules: improved imports * add changelog fragment * refactored the import check to its sole function --- changelogs/fragments/5259-gitlab-imports.yaml | 14 ++++++++++++ plugins/module_utils/gitlab.py | 15 +++++++++---- .../source_control/gitlab/gitlab_branch.py | 19 +++++----------- .../gitlab/gitlab_deploy_key.py | 21 +++++------------- .../source_control/gitlab/gitlab_group.py | 20 +++++------------ .../gitlab/gitlab_group_members.py | 20 +++++------------ .../gitlab/gitlab_group_variable.py | 19 +++++----------- .../source_control/gitlab/gitlab_hook.py | 22 +++++-------------- .../source_control/gitlab/gitlab_project.py | 19 +++++----------- .../gitlab/gitlab_project_members.py | 20 +++++------------ .../gitlab/gitlab_project_variable.py | 6 +++-- .../gitlab/gitlab_protected_branch.py | 20 +++++------------ .../source_control/gitlab/gitlab_runner.py | 21 +++++------------- .../source_control/gitlab/gitlab_user.py | 19 +++++----------- 14 files changed, 85 insertions(+), 170 deletions(-) create mode 100644 changelogs/fragments/5259-gitlab-imports.yaml diff --git a/changelogs/fragments/5259-gitlab-imports.yaml b/changelogs/fragments/5259-gitlab-imports.yaml new file mode 100644 index 0000000000..b927036a17 --- /dev/null +++ b/changelogs/fragments/5259-gitlab-imports.yaml @@ -0,0 +1,14 @@ +minor_changes: + - gitlab module util - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_deploy_key - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_group - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_group_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_group_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_hook - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_project - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_project_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_project_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_protected_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_runner - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_user - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). diff --git a/plugins/module_utils/gitlab.py b/plugins/module_utils/gitlab.py index d3c74f5c3b..3ed338b401 100644 --- a/plugins/module_utils/gitlab.py +++ b/plugins/module_utils/gitlab.py @@ -14,10 +14,9 @@ from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.version import LooseVersion try: - from urllib import quote_plus # Python 2.X from urlparse import urljoin except ImportError: - from urllib.parse import quote_plus, urljoin # Python 3+ + from urllib.parse import urljoin # Python 3+ import traceback @@ -27,6 +26,7 @@ try: import requests HAS_GITLAB_PACKAGE = True except Exception: + gitlab = None GITLAB_IMP_ERR = traceback.format_exc() HAS_GITLAB_PACKAGE = False @@ -64,6 +64,14 @@ def find_group(gitlab_instance, identifier): return project +def ensure_gitlab_package(module): + if not HAS_GITLAB_PACKAGE: + module.fail_json( + msg=missing_required_lib("python-gitlab", url='https://python-gitlab.readthedocs.io/en/stable/'), + exception=GITLAB_IMP_ERR + ) + + def gitlab_authentication(module): gitlab_url = module.params['api_url'] validate_certs = module.params['validate_certs'] @@ -73,8 +81,7 @@ def gitlab_authentication(module): gitlab_oauth_token = module.params['api_oauth_token'] gitlab_job_token = module.params['api_job_token'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) + ensure_gitlab_package(module) try: # python-gitlab library remove support for username/password authentication since 1.13.0 diff --git a/plugins/modules/source_control/gitlab/gitlab_branch.py b/plugins/modules/source_control/gitlab/gitlab_branch.py index 8f0535abc8..e57ca4922f 100644 --- a/plugins/modules/source_control/gitlab/gitlab_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_branch.py @@ -72,20 +72,13 @@ RETURN = ''' import traceback -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.api import basic_auth_argument_spec from ansible_collections.community.general.plugins.module_utils.version import LooseVersion - -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False - -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitlabBranch(object): @@ -144,15 +137,13 @@ def main(): ], supports_check_mode=False ) + ensure_gitlab_package(module) project = module.params['project'] branch = module.params['branch'] ref_branch = module.params['ref_branch'] state = module.params['state'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_version = gitlab.__version__ if LooseVersion(gitlab_version) < LooseVersion('2.3.0'): module.fail_json(msg="community.general.gitlab_proteched_branch requires python-gitlab Python module >= 2.3.0 (installed version: [%s])." diff --git a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py index e1449a83ee..1b77801ec4 100644 --- a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py +++ b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py @@ -109,22 +109,13 @@ deploy_key: type: dict ''' -import re -import traceback - -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False - from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, find_project, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, find_project, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitLabDeployKey(object): @@ -262,6 +253,7 @@ def main(): ], supports_check_mode=True, ) + ensure_gitlab_package(module) state = module.params['state'] project_identifier = module.params['project'] @@ -269,9 +261,6 @@ def main(): key_keyfile = module.params['key'] key_can_push = module.params['can_push'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_instance = gitlab_authentication(module) gitlab_deploy_key = GitLabDeployKey(module, gitlab_instance) diff --git a/plugins/modules/source_control/gitlab/gitlab_group.py b/plugins/modules/source_control/gitlab/gitlab_group.py index 8dbe33e6f4..d099a0c274 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group.py +++ b/plugins/modules/source_control/gitlab/gitlab_group.py @@ -159,21 +159,13 @@ group: type: dict ''' -import traceback - -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False - from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, find_group, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, find_group, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitLabGroup(object): @@ -339,6 +331,7 @@ def main(): ], supports_check_mode=True, ) + ensure_gitlab_package(module) group_name = module.params['name'] group_path = module.params['path'] @@ -352,9 +345,6 @@ def main(): require_two_factor_authentication = module.params['require_two_factor_authentication'] avatar_path = module.params['avatar_path'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_instance = gitlab_authentication(module) # Define default group_path based on group_name diff --git a/plugins/modules/source_control/gitlab/gitlab_group_members.py b/plugins/modules/source_control/gitlab/gitlab_group_members.py index 231d275350..50cb35367f 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_members.py @@ -152,19 +152,11 @@ EXAMPLES = r''' RETURN = r''' # ''' from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication - -import traceback - -try: - import gitlab - HAS_PY_GITLAB = True - GITLAB_IMP_ERR = None -except ImportError: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_PY_GITLAB = False +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitLabGroup(object): @@ -282,9 +274,7 @@ def main(): ], supports_check_mode=True, ) - - if not HAS_PY_GITLAB: - module.fail_json(msg=missing_required_lib('python-gitlab', url='https://python-gitlab.readthedocs.io/en/stable/'), exception=GITLAB_IMP_ERR) + ensure_gitlab_package(module) access_level_int = { 'guest': gitlab.GUEST_ACCESS, diff --git a/plugins/modules/source_control/gitlab/gitlab_group_variable.py b/plugins/modules/source_control/gitlab/gitlab_group_variable.py index f0f6b61065..c273777ca3 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_variable.py @@ -159,21 +159,14 @@ group_variable: sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] ''' -import traceback -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.six import string_types from ansible.module_utils.six import integer_types -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False - -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, ensure_gitlab_package +) def vars_to_variables(vars, module): @@ -416,9 +409,7 @@ def main(): ], supports_check_mode=True ) - - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) + ensure_gitlab_package(module) purge = module.params['purge'] var_list = module.params['vars'] diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index f0824a96c7..218bad9fce 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -159,22 +159,12 @@ hook: type: dict ''' -import re -import traceback - -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False - from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, find_project, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, find_project, gitlab_authentication, ensure_gitlab_package +) class GitLabHook(object): @@ -330,6 +320,7 @@ def main(): ], supports_check_mode=True, ) + ensure_gitlab_package(module) state = module.params['state'] project_identifier = module.params['project'] @@ -346,9 +337,6 @@ def main(): enable_ssl_verification = module.params['hook_validate_certs'] hook_token = module.params['token'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_instance = gitlab_authentication(module) gitlab_hook = GitLabHook(module, gitlab_instance) diff --git a/plugins/modules/source_control/gitlab/gitlab_project.py b/plugins/modules/source_control/gitlab/gitlab_project.py index 2f3fc39a0c..ca1f8a6c64 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project.py +++ b/plugins/modules/source_control/gitlab/gitlab_project.py @@ -246,21 +246,14 @@ project: type: dict ''' -import traceback - -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, find_group, find_project, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, find_group, find_project, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitLabProject(object): @@ -444,6 +437,7 @@ def main(): ], supports_check_mode=True, ) + ensure_gitlab_package(module) group_identifier = module.params['group'] project_name = module.params['name'] @@ -474,9 +468,6 @@ def main(): if default_branch and not initialize_with_readme: module.fail_json(msg="Param default_branch need param initialize_with_readme set to true") - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_instance = gitlab_authentication(module) # Set project_path to project_name if it is empty. diff --git a/plugins/modules/source_control/gitlab/gitlab_project_members.py b/plugins/modules/source_control/gitlab/gitlab_project_members.py index f1144680bb..811033f312 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_members.py @@ -155,19 +155,11 @@ EXAMPLES = r''' RETURN = r''' # ''' from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication - -import traceback - -try: - import gitlab - HAS_PY_GITLAB = True - GITLAB_IMP_ERR = None -except ImportError: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_PY_GITLAB = False +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitLabProjectMembers(object): @@ -282,9 +274,7 @@ def main(): ], supports_check_mode=True, ) - - if not HAS_PY_GITLAB: - module.fail_json(msg=missing_required_lib('python-gitlab', url='https://python-gitlab.readthedocs.io/en/stable/'), exception=GITLAB_IMP_ERR) + ensure_gitlab_package(module) access_level_int = { 'guest': gitlab.GUEST_ACCESS, diff --git a/plugins/modules/source_control/gitlab/gitlab_project_variable.py b/plugins/modules/source_control/gitlab/gitlab_project_variable.py index 3e71bfa347..cdd6402ae8 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_variable.py @@ -176,7 +176,6 @@ project_variable: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.six import string_types from ansible.module_utils.six import integer_types @@ -189,7 +188,9 @@ except Exception: GITLAB_IMP_ERR = traceback.format_exc() HAS_GITLAB_PACKAGE = False -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, ensure_gitlab_package +) def vars_to_variables(vars, module): @@ -431,6 +432,7 @@ def main(): ], supports_check_mode=True ) + ensure_gitlab_package(module) if not HAS_GITLAB_PACKAGE: module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) diff --git a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py index 191add9f57..bddf175f0f 100644 --- a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py @@ -70,22 +70,14 @@ EXAMPLES = ''' RETURN = ''' ''' -import traceback - -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.api import basic_auth_argument_spec from ansible_collections.community.general.plugins.module_utils.version import LooseVersion -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False - -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitlabProtectedBranch(object): @@ -165,6 +157,7 @@ def main(): ], supports_check_mode=True ) + ensure_gitlab_package(module) project = module.params['project'] name = module.params['name'] @@ -172,9 +165,6 @@ def main(): push_access_level = module.params['push_access_level'] state = module.params['state'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_version = gitlab.__version__ if LooseVersion(gitlab_version) < LooseVersion('2.3.0'): module.fail_json(msg="community.general.gitlab_proteched_branch requires python-gitlab Python module >= 2.3.0 (installed version: [%s])." diff --git a/plugins/modules/source_control/gitlab/gitlab_runner.py b/plugins/modules/source_control/gitlab/gitlab_runner.py index 14548c2c72..67d998f12f 100644 --- a/plugins/modules/source_control/gitlab/gitlab_runner.py +++ b/plugins/modules/source_control/gitlab/gitlab_runner.py @@ -172,21 +172,14 @@ runner: type: dict ''' -import traceback - -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False - from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, gitlab, ensure_gitlab_package +) + try: cmp # pylint: disable=used-before-assignment @@ -362,6 +355,7 @@ def main(): ], supports_check_mode=True, ) + ensure_gitlab_package(module) state = module.params['state'] runner_description = module.params['description'] @@ -374,9 +368,6 @@ def main(): registration_token = module.params['registration_token'] project = module.params['project'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_instance = gitlab_authentication(module) gitlab_project = None if project: diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/source_control/gitlab/gitlab_user.py index 35bda030fc..4824f7301f 100644 --- a/plugins/modules/source_control/gitlab/gitlab_user.py +++ b/plugins/modules/source_control/gitlab/gitlab_user.py @@ -221,21 +221,14 @@ user: type: dict ''' -import traceback - -GITLAB_IMP_ERR = None -try: - import gitlab - HAS_GITLAB_PACKAGE = True -except Exception: - GITLAB_IMP_ERR = traceback.format_exc() - HAS_GITLAB_PACKAGE = False from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native -from ansible_collections.community.general.plugins.module_utils.gitlab import auth_argument_spec, find_group, gitlab_authentication +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, find_group, gitlab_authentication, gitlab, ensure_gitlab_package +) class GitLabUser(object): @@ -616,6 +609,7 @@ def main(): ('state', 'present', ['name', 'email']), ) ) + ensure_gitlab_package(module) user_name = module.params['name'] state = module.params['state'] @@ -634,9 +628,6 @@ def main(): user_identities = module.params['identities'] overwrite_identities = module.params['overwrite_identities'] - if not HAS_GITLAB_PACKAGE: - module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR) - gitlab_instance = gitlab_authentication(module) gitlab_user = GitLabUser(module, gitlab_instance) From fbb6ceea1da2a424a72ee7b1461b3263e1c369c6 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 13 Sep 2022 06:30:49 +1200 Subject: [PATCH 0221/2104] gitlab_hook: minor refactoring (#5271) * gitlab_hook: minor refactoring * add changelog fragment --- .../fragments/5271-gitlab_hook-refactor.yaml | 2 ++ .../source_control/gitlab/gitlab_hook.py | 17 +++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5271-gitlab_hook-refactor.yaml diff --git a/changelogs/fragments/5271-gitlab_hook-refactor.yaml b/changelogs/fragments/5271-gitlab_hook-refactor.yaml new file mode 100644 index 0000000000..c846e1b04f --- /dev/null +++ b/changelogs/fragments/5271-gitlab_hook-refactor.yaml @@ -0,0 +1,2 @@ +minor_changes: + - gitlab_hook - minor refactoring (https://github.com/ansible-collections/community.general/pull/5271). diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index 218bad9fce..f69ed8f4e1 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -223,9 +223,8 @@ class GitLabHook(object): hook.save() except Exception as e: self._module.fail_json(msg="Failed to update hook: %s " % e) - return True - else: - return False + + return changed ''' @param project Project Object @@ -247,9 +246,9 @@ class GitLabHook(object): changed = False for arg_key, arg_value in arguments.items(): - if arguments[arg_key] is not None: - if getattr(hook, arg_key, None) != arguments[arg_key]: - setattr(hook, arg_key, arguments[arg_key]) + if arg_value is not None: + if getattr(hook, arg_key, None) != arg_value: + setattr(hook, arg_key, arg_value) changed = True return (changed, hook) @@ -277,10 +276,8 @@ class GitLabHook(object): return False def delete_hook(self): - if self._module.check_mode: - return True - - return self.hook_object.delete() + if not self._module.check_mode: + self.hook_object.delete() def main(): From 19e4b7d3abdd91326917f79a3937d1b3c7dd88c6 Mon Sep 17 00:00:00 2001 From: Yvan Watchman Date: Mon, 12 Sep 2022 20:31:30 +0200 Subject: [PATCH 0222/2104] =?UTF-8?q?add=20a=20couple=20conditionals=20to?= =?UTF-8?q?=20make=20sure=20updating=20can=20be=20done=20with=20vmid?= =?UTF-8?q?=E2=80=A6=20(#5206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add a couple conditionals to make sure updating can be done with vmid only * add changelog to PR * replace conditional with any * any takes list * fix next conditional * Update changelogs/fragments/5206-proxmox-conditional-vmid.yml Co-authored-by: Felix Fontein * capitalize VM and remove conditional for name requirement upon creation * Fix URL destroyed by GitHub. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Yvan E. Watchman Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- changelogs/fragments/5206-proxmox-conditional-vmid.yml | 3 +++ plugins/modules/cloud/misc/proxmox_kvm.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5206-proxmox-conditional-vmid.yml diff --git a/changelogs/fragments/5206-proxmox-conditional-vmid.yml b/changelogs/fragments/5206-proxmox-conditional-vmid.yml new file mode 100644 index 0000000000..b558d137c3 --- /dev/null +++ b/changelogs/fragments/5206-proxmox-conditional-vmid.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - proxmox_kvm - replace new condition with proper condition to allow for using ``vmid`` on update (https://github.com/ansible-collections/community.general/pull/5206). diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 15a59be815..dc2d6e5aae 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -1243,8 +1243,10 @@ def main(): module.exit_json(changed=False, vmid=vmid, msg="VM with vmid <%s> already exists" % vmid) elif proxmox.get_vmid(name, ignore_missing=True) and not (update or clone): module.exit_json(changed=False, vmid=proxmox.get_vmid(name), msg="VM with name <%s> already exists" % name) - elif (not node) or (not name): - module.fail_json(msg='node, name is mandatory for creating/updating vm') + elif not node: + module.fail.json(msg='node is mandatory for creating/updating VM') + elif update and not any([vmid, name]): + module.fail_json(msg='vmid or name is mandatory for updating VM') elif not proxmox.get_node(node): module.fail_json(msg="node '%s' does not exist in cluster" % node) From b5d311a171334187e8b0292342517da93d1aa5f0 Mon Sep 17 00:00:00 2001 From: sprnza Date: Mon, 12 Sep 2022 21:32:14 +0300 Subject: [PATCH 0223/2104] slack: add CP channel prefix (#5249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add CP channel prefix * changelog added * altered docs * added description for docs change * fix line length * Update plugins/modules/notification/slack.py Co-authored-by: Felix Fontein * Update plugins/modules/notification/slack.py Co-authored-by: Felix Fontein * Update plugins/modules/notification/slack.py Co-authored-by: Felix Fontein * Update plugins/modules/notification/slack.py Co-authored-by: Felix Fontein * Update changelogs/fragments/5249-add-new-channel-prefix.yml Co-authored-by: Felix Fontein Co-authored-by: Денис Сперанский Co-authored-by: Felix Fontein --- changelogs/fragments/5249-add-new-channel-prefix.yml | 2 ++ plugins/modules/notification/slack.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5249-add-new-channel-prefix.yml diff --git a/changelogs/fragments/5249-add-new-channel-prefix.yml b/changelogs/fragments/5249-add-new-channel-prefix.yml new file mode 100644 index 0000000000..9740e3a186 --- /dev/null +++ b/changelogs/fragments/5249-add-new-channel-prefix.yml @@ -0,0 +1,2 @@ +bugfixes: + - slack - fix message update for channels which start with ``CP``. When ``message-id`` was passed it failed for channels which started with ``CP`` because the ``#`` symbol was added before the ``channel_id`` (https://github.com/ansible-collections/community.general/pull/5249). diff --git a/plugins/modules/notification/slack.py b/plugins/modules/notification/slack.py index 154a8ccffd..46602a5d16 100644 --- a/plugins/modules/notification/slack.py +++ b/plugins/modules/notification/slack.py @@ -69,7 +69,8 @@ options: message_id: description: - Optional. Message ID to edit, instead of posting a new message. - Corresponds to C(ts) in the Slack API (U(https://api.slack.com/messaging/modifying)). + - If supplied I(channel_id) must be in form of C(C0xxxxxxx). use C({{ slack_response.channel_id }}) to get I(channel_id) from previous task run. + - Corresponds to C(ts) in the Slack API (U(https://api.slack.com/messaging/modifying)). type: str version_added: 1.2.0 username: @@ -234,6 +235,8 @@ EXAMPLES = """ - name: Edit message community.general.slack: token: thetoken/generatedby/slack + # The 'channel' option does not accept the channel name. It must use the 'channel_id', + # which can be retrieved for example from 'slack_response' from the previous task. channel: "{{ slack_response.channel }}" msg: Deployment complete! message_id: "{{ slack_response.ts }}" @@ -294,7 +297,7 @@ def build_payload_for_slack(text, channel, thread_id, username, icon_url, icon_e # With a custom color we have to set the message as attachment, and explicitly turn markdown parsing on for it. payload = dict(attachments=[dict(text=escape_quotes(text), color=color, mrkdwn_in=["text"])]) if channel is not None: - if channel.startswith(('#', '@', 'C0', 'GF', 'G0')): + if channel.startswith(('#', '@', 'C0', 'GF', 'G0', 'CP')): payload['channel'] = channel else: payload['channel'] = '#' + channel From 59d43becef75bdd23cff528429456818441a96bb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 13 Sep 2022 13:10:41 +0200 Subject: [PATCH 0224/2104] Next expected release is 5.7.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 410e4b40c1..e0e4144e58 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 5.6.0 +version: 5.7.0 readme: README.md authors: - Ansible (https://github.com/ansible) From 35e3a9615a8d344b64bdf4faaf11daeab657dde8 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 18 Sep 2022 21:52:15 +1200 Subject: [PATCH 0225/2104] pipx module utils: removed unused import (#5288) --- plugins/module_utils/pipx.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/module_utils/pipx.py b/plugins/module_utils/pipx.py index 5dd02c0422..35804c329a 100644 --- a/plugins/module_utils/pipx.py +++ b/plugins/module_utils/pipx.py @@ -6,7 +6,6 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible.module_utils.parsing.convert_bool import boolean from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt From 7777b48c99c1a5ef5645fd42b8b50ab6182eef5d Mon Sep 17 00:00:00 2001 From: castorsky Date: Mon, 19 Sep 2022 04:06:21 +0800 Subject: [PATCH 0226/2104] New module: Proxmox disk management (#5101) * New module: Proxmox disk management * Remove misplaced option * Type missed * Fixed docs, quotes, 2.7 syntax * Forgotten comma * Version added 5.5.0 Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Italic options Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Missed dot Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Pythonify python Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Shorten command Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Action parameter drop. General improvements. * Add proxmox_disk integration testing * Shorten getting vmid Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Code tag for value Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Italic tag for option Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Definite ID of the VM Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Docs edit and loop condition * Simplify conditions Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Dropped bps options, added idempotency checks * Documentaion edit * Rewrite create/import condition * Trainling comma Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Added type field to all choosable arguments * Description of disk bus ranges * Fix imports * Update version Co-authored-by: Felix Fontein * Lowercase YAML boolean * Rename grown to resized and update documentation * Documentation updated before actual changes * Added 'update' flag for 'present' state * Traling space * YAML indentation * Merged 'updated' option into 'present'. * Doc update. * Exclude 'import_from' on update * Version bump * yaml boolean lowercase Co-authored-by: Felix Fontein * yaml boolean lowercase Co-authored-by: Felix Fontein * More detailed description Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 + meta/runtime.yml | 2 + plugins/modules/cloud/misc/proxmox_disk.py | 744 ++++++++++++++++++ .../targets/proxmox/tasks/main.yml | 196 +++++ 4 files changed, 944 insertions(+) create mode 100644 plugins/modules/cloud/misc/proxmox_disk.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index a75397852f..1e2fc66a19 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -378,6 +378,8 @@ files: $modules/cloud/misc/proxmox_template.py: maintainers: UnderGreen ignore: skvidal + $modules/cloud/misc/proxmox_disk.py: + maintainers: castorsky $modules/cloud/misc/rhevm.py: maintainers: $team_virt TimothyVandenbrande labels: rhevm virt diff --git a/meta/runtime.yml b/meta/runtime.yml index a7578eea22..c93f00d760 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1213,6 +1213,8 @@ plugin_routing: redirect: community.general.cloud.profitbricks.profitbricks_volume_attachments proxmox: redirect: community.general.cloud.misc.proxmox + proxmox_disk: + redirect: community.general.cloud.misc.proxmox_disk proxmox_domain_info: redirect: community.general.cloud.misc.proxmox_domain_info proxmox_group_info: diff --git a/plugins/modules/cloud/misc/proxmox_disk.py b/plugins/modules/cloud/misc/proxmox_disk.py new file mode 100644 index 0000000000..182a0d25f2 --- /dev/null +++ b/plugins/modules/cloud/misc/proxmox_disk.py @@ -0,0 +1,744 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Copyright (c) 2022, Castor Sky (@castorsky) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = r''' +--- +module: proxmox_disk +short_description: Management of a disk of a Qemu(KVM) VM in a Proxmox VE cluster. +version_added: 5.7.0 +description: + - Allows you to perform some supported operations on a disk in Qemu(KVM) Virtual Machines in a Proxmox VE cluster. +author: "Castor Sky (@castorsky) " +options: + name: + description: + - The unique name of the VM. + - You can specify either I(name) or I(vmid) or both of them. + type: str + vmid: + description: + - The unique ID of the VM. + - You can specify either I(vmid) or I(name) or both of them. + type: int + disk: + description: + - The disk key (C(unused[n]), C(ide[n]), C(sata[n]), C(scsi[n]) or C(virtio[n])) you want to operate on. + - Disk buses (IDE, SATA and so on) have fixed ranges of C(n) that accepted by Proxmox API. + - > + For IDE: 0-3; + for SCSI: 0-30; + for SATA: 0-5; + for VirtIO: 0-15; + for Unused: 0-255. + type: str + required: true + state: + description: + - Indicates desired state of the disk. + - > + I(state=present) can be used to create, replace disk or update options in existing disk. It will create missing + disk or update options in existing one by default. See the I(create) parameter description to control behavior + of this option. + - Some updates on options (like I(cache)) are not being applied instantly and require VM restart. + - > + Use I(state=detached) to detach existing disk from VM but do not remove it entirely. + When I(state=detached) and disk is C(unused[n]) it will be left in same state (not removed). + - > + I(state=moved) may be used to change backing storage for the disk in bounds of the same VM + or to send the disk to another VM (using the same backing storage). + - > + I(state=resized) intended to change the disk size. As of Proxmox 7.2 you can only increase the disk size + because shrinking disks is not supported by the PVE API and has to be done manually. + - To entirely remove the disk from backing storage use I(state=absent). + type: str + choices: ['present', 'resized', 'detached', 'moved', 'absent'] + default: present + create: + description: + - With I(create) flag you can control behavior of I(state=present). + - When I(create=disabled) it will not create new disk (if not exists) but will update options in existing disk. + - When I(create=regular) it will either create new disk (if not exists) or update options in existing disk. + - When I(create=forced) it will always create new disk (if disk exists it will be detached and left unused). + type: str + choices: ['disabled', 'regular', 'forced'] + default: regular + storage: + description: + - The drive's backing storage. + - Used only when I(state) is C(present). + type: str + size: + description: + - Desired volume size in GB to allocate when I(state=present) (specify I(size) without suffix). + - > + New (or additional) size of volume when I(state=resized). With the C(+) sign + the value is added to the actual size of the volume + and without it, the value is taken as an absolute one. + type: str + bwlimit: + description: + - Override I/O bandwidth limit (in KB/s). + - Used only when I(state=moved). + type: int + delete_moved: + description: + - Delete the original disk after successful copy. + - By default the original disk is kept as unused disk. + - Used only when I(state=moved). + type: bool + target_disk: + description: + - The config key the disk will be moved to on the target VM (for example, C(ide0) or C(scsi1)). + - Default is the source disk key. + - Used only when I(state=moved). + type: str + target_storage: + description: + - Move the disk to this storage when I(state=moved). + - You can move between storages only in scope of one VM. + - Mutually exclusive with I(target_vmid). + type: str + target_vmid: + description: + - The (unique) ID of the VM where disk will be placed when I(state=moved). + - You can move disk between VMs only when the same storage is used. + - Mutually exclusive with I(target_vmid). + type: int + timeout: + description: + - Timeout in seconds to wait when moving disk. + - Used only when I(state=moved). + type: int + default: 600 + aio: + description: + - AIO type to use. + type: str + choices: ['native', 'threads', 'io_uring'] + backup: + description: + - Whether the drive should be included when making backups. + type: bool + bps_max_length: + description: + - Maximum length of total r/w I/O bursts in seconds. + type: int + bps_rd_max_length: + description: + - Maximum length of read I/O bursts in seconds. + type: int + bps_wr_max_length: + description: + - Maximum length of write I/O bursts in seconds. + type: int + cache: + description: + - The drive's cache mode. + type: str + choices: ['none', 'writethrough', 'writeback', 'unsafe', 'directsync'] + cyls: + description: + - Force the drive's physical geometry to have a specific cylinder count. + type: int + detect_zeroes: + description: + - Control whether to detect and try to optimize writes of zeroes. + type: bool + discard: + description: + - Control whether to pass discard/trim requests to the underlying storage. + type: str + choices: ['ignore', 'on'] + format: + description: + - The drive's backing file's data format. + type: str + choices: ['raw', 'cow', 'qcow', 'qed', 'qcow2', 'vmdk', 'cloop'] + heads: + description: + - Force the drive's physical geometry to have a specific head count. + type: int + import_from: + description: + - Import volume from this existing one. + - Volume string format + - C(:/) or C(/) + - Attention! Only root can use absolute paths. + - This parameter is mutually exclusive with I(size). + type: str + iops: + description: + - Maximum total r/w I/O in operations per second. + - You can specify either total limit or per operation (mutually exclusive with I(iops_rd) and I(iops_wr)). + type: int + iops_max: + description: + - Maximum unthrottled total r/w I/O pool in operations per second. + type: int + iops_max_length: + description: + - Maximum length of total r/w I/O bursts in seconds. + type: int + iops_rd: + description: + - Maximum read I/O in operations per second. + - You can specify either read or total limit (mutually exclusive with I(iops)). + type: int + iops_rd_max: + description: + - Maximum unthrottled read I/O pool in operations per second. + type: int + iops_rd_max_length: + description: + - Maximum length of read I/O bursts in seconds. + type: int + iops_wr: + description: + - Maximum write I/O in operations per second. + - You can specify either write or total limit (mutually exclusive with I(iops)). + type: int + iops_wr_max: + description: + - Maximum unthrottled write I/O pool in operations per second. + type: int + iops_wr_max_length: + description: + - Maximum length of write I/O bursts in seconds. + type: int + iothread: + description: + - Whether to use iothreads for this drive (only for SCSI and VirtIO) + type: bool + mbps: + description: + - Maximum total r/w speed in megabytes per second. + - Can be fractional but use with caution - fractionals less than 1 are not supported officially. + - You can specify either total limit or per operation (mutually exclusive with I(mbps_rd) and I(mbps_wr)). + type: float + mbps_max: + description: + - Maximum unthrottled total r/w pool in megabytes per second. + type: float + mbps_rd: + description: + - Maximum read speed in megabytes per second. + - You can specify either read or total limit (mutually exclusive with I(mbps)). + type: float + mbps_rd_max: + description: + - Maximum unthrottled read pool in megabytes per second. + type: float + mbps_wr: + description: + - Maximum write speed in megabytes per second. + - You can specify either write or total limit (mutually exclusive with I(mbps)). + type: float + mbps_wr_max: + description: + - Maximum unthrottled write pool in megabytes per second. + type: float + media: + description: + - The drive's media type. + type: str + choices: ['cdrom', 'disk'] + queues: + description: + - Number of queues (SCSI only). + type: int + replicate: + description: + - Whether the drive should considered for replication jobs. + type: bool + rerror: + description: + - Read error action. + type: str + choices: ['ignore', 'report', 'stop'] + ro: + description: + - Whether the drive is read-only. + type: bool + scsiblock: + description: + - Whether to use scsi-block for full passthrough of host block device. + - Can lead to I/O errors in combination with low memory or high memory fragmentation on host. + type: bool + secs: + description: + - Force the drive's physical geometry to have a specific sector count. + type: int + serial: + description: + - The drive's reported serial number, url-encoded, up to 20 bytes long. + type: str + shared: + description: + - Mark this locally-managed volume as available on all nodes. + - This option does not share the volume automatically, it assumes it is shared already! + type: bool + snapshot: + description: + - Control qemu's snapshot mode feature. + - If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown. + type: bool + ssd: + description: + - Whether to expose this drive as an SSD, rather than a rotational hard disk. + type: bool + trans: + description: + - Force disk geometry bios translation mode. + type: str + choices: ['auto', 'lba', 'none'] + werror: + description: + - Write error action. + type: str + choices: ['enospc', 'ignore', 'report', 'stop'] + wwn: + description: + - The drive's worldwide name, encoded as 16 bytes hex string, prefixed by C(0x). + type: str +extends_documentation_fragment: + - community.general.proxmox.documentation +''' + +EXAMPLES = ''' +- name: Create new disk in VM (do not rewrite in case it exists already) + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_token_id: token1 + api_token_secret: some-token-data + name: vm-name + disk: scsi3 + backup: true + cache: none + storage: local-zfs + size: 5 + state: present + +- name: Create new disk in VM (force rewrite in case it exists already) + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_token_id: token1 + api_token_secret: some-token-data + vmid: 101 + disk: scsi3 + format: qcow2 + storage: local + size: 16 + create: forced + state: present + +- name: Update existing disk + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_token_id: token1 + api_token_secret: some-token-data + vmid: 101 + disk: ide0 + backup: false + ro: true + aio: native + state: present + +- name: Grow existing disk + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_token_id: token1 + api_token_secret: some-token-data + vmid: 101 + disk: sata4 + size: +5G + state: resized + +- name: Detach disk (leave it unused) + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_token_id: token1 + api_token_secret: some-token-data + name: vm-name + disk: virtio0 + state: detached + +- name: Move disk to another storage + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_password: secret + vmid: 101 + disk: scsi7 + target_storage: local + format: qcow2 + state: moved + +- name: Move disk from one VM to another + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_token_id: token1 + api_token_secret: some-token-data + vmid: 101 + disk: scsi7 + target_vmid: 201 + state: moved + +- name: Remove disk permanently + community.general.proxmox_disk: + api_host: node1 + api_user: root@pam + api_password: secret + vmid: 101 + disk: scsi4 + state: absent +''' + +RETURN = ''' +vmid: + description: The VM vmid. + returned: success + type: int + sample: 101 +msg: + description: A short message on what the module did. + returned: always + type: str + sample: "Disk scsi3 created in VM 101" +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.proxmox import (proxmox_auth_argument_spec, + ProxmoxAnsible) +from re import compile, match, sub +from time import sleep + + +def disk_conf_str_to_dict(config_string): + config = config_string.split(',') + storage_volume = config.pop(0).split(':') + config.sort() + storage_name = storage_volume[0] + volume_name = storage_volume[1] + config_current = dict( + volume='%s:%s' % (storage_name, volume_name), + storage_name=storage_name, + volume_name=volume_name + ) + + for option in config: + k, v = option.split('=') + config_current[k] = v + + return config_current + + +class ProxmoxDiskAnsible(ProxmoxAnsible): + create_update_fields = [ + 'aio', 'backup', 'bps_max_length', 'bps_rd_max_length', 'bps_wr_max_length', + 'cache', 'cyls', 'detect_zeroes', 'discard', 'format', 'heads', 'import_from', 'iops', 'iops_max', + 'iops_max_length', 'iops_rd', 'iops_rd_max', 'iops_rd_max_length', 'iops_wr', 'iops_wr_max', + 'iops_wr_max_length', 'iothread', 'mbps', 'mbps_max', 'mbps_rd', 'mbps_rd_max', 'mbps_wr', 'mbps_wr_max', + 'media', 'queues', 'replicate', 'rerror', 'ro', 'scsiblock', 'secs', 'serial', 'shared', 'snapshot', + 'ssd', 'trans', 'werror', 'wwn' + ] + supported_bus_num_ranges = dict( + ide=range(0, 4), + scsi=range(0, 31), + sata=range(0, 6), + virtio=range(0, 16), + unused=range(0, 256) + ) + + def get_create_attributes(self): + # Sanitize parameters dictionary: + # - Remove not defined args + # - Ensure True and False converted to int. + # - Remove unnecessary parameters + params = dict((k, v) for k, v in self.module.params.items() if v is not None and k in self.create_update_fields) + params.update(dict((k, int(v)) for k, v in params.items() if isinstance(v, bool))) + return params + + def create_disk(self, disk, vmid, vm, vm_config): + create = self.module.params['create'] + if create == 'disabled' and disk not in vm_config: + # NOOP + return False, "Disk %s not found in VM %s and creation was disabled in parameters." % (disk, vmid) + + if (create == 'regular' and disk not in vm_config) or (create == 'forced'): + # CREATE + attributes = self.get_create_attributes() + import_string = attributes.pop('import_from', None) + + if import_string: + config_str = "%s:%s,import-from=%s" % (self.module.params["storage"], "0", import_string) + else: + config_str = "%s:%s" % (self.module.params["storage"], self.module.params["size"]) + + for k, v in attributes.items(): + config_str += ',%s=%s' % (k, v) + + create_disk = {self.module.params["disk"]: config_str} + self.proxmox_api.nodes(vm['node']).qemu(vmid).config.set(**create_disk) + return True, "Disk %s created in VM %s" % (disk, vmid) + + if create in ['disabled', 'regular'] and disk in vm_config: + # UPDATE + disk_config = disk_conf_str_to_dict(vm_config[disk]) + config_str = disk_config["volume"] + attributes = self.get_create_attributes() + # 'import_from' fails on disk updates + attributes.pop('import_from', None) + + for k, v in attributes.items(): + config_str += ',%s=%s' % (k, v) + + # Now compare old and new config to detect if changes are needed + for option in ['size', 'storage_name', 'volume', 'volume_name']: + attributes.update({option: disk_config[option]}) + # Values in params are numbers, but strings are needed to compare with disk_config + attributes = dict((k, str(v)) for k, v in attributes.items()) + if disk_config == attributes: + return False, "Disk %s is up to date in VM %s" % (disk, vmid) + + update_disk = {self.module.params["disk"]: config_str} + self.proxmox_api.nodes(vm['node']).qemu(vmid).config.set(**update_disk) + return True, "Disk %s updated in VM %s" % (disk, vmid) + + def move_disk(self, disk, vmid, vm, vm_config): + params = dict() + params['disk'] = disk + params['vmid'] = vmid + params['bwlimit'] = self.module.params['bwlimit'] + params['storage'] = self.module.params['target_storage'] + params['target-disk'] = self.module.params['target_disk'] + params['target-vmid'] = self.module.params['target_vmid'] + params['format'] = self.module.params['format'] + params['delete'] = 1 if self.module.params.get('delete_moved', False) else 0 + # Remove not defined args + params = dict((k, v) for k, v in params.items() if v is not None) + + if params.get('storage', False): + disk_config = disk_conf_str_to_dict(vm_config[disk]) + if params['storage'] == disk_config['storage_name']: + return False + + taskid = self.proxmox_api.nodes(vm['node']).qemu(vmid).move_disk.post(**params) + timeout = self.module.params['timeout'] + while timeout: + status_data = self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get() + if status_data['status'] == 'stopped' and status_data['exitstatus'] == 'OK': + return True + if timeout <= 0: + self.module.fail_json( + msg='Reached timeout while waiting for moving VM disk. Last line in task before timeout: %s' % + self.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1]) + + sleep(1) + timeout -= 1 + return True + + +def main(): + module_args = proxmox_auth_argument_spec() + disk_args = dict( + # Proxmox native parameters + aio=dict(type='str', choices=['native', 'threads', 'io_uring']), + backup=dict(type='bool'), + bps_max_length=dict(type='int'), + bps_rd_max_length=dict(type='int'), + bps_wr_max_length=dict(type='int'), + cache=dict(type='str', choices=['none', 'writethrough', 'writeback', 'unsafe', 'directsync']), + cyls=dict(type='int'), + detect_zeroes=dict(type='bool'), + discard=dict(type='str', choices=['ignore', 'on']), + format=dict(type='str', choices=['raw', 'cow', 'qcow', 'qed', 'qcow2', 'vmdk', 'cloop']), + heads=dict(type='int'), + import_from=dict(type='str'), + iops=dict(type='int'), + iops_max=dict(type='int'), + iops_max_length=dict(type='int'), + iops_rd=dict(type='int'), + iops_rd_max=dict(type='int'), + iops_rd_max_length=dict(type='int'), + iops_wr=dict(type='int'), + iops_wr_max=dict(type='int'), + iops_wr_max_length=dict(type='int'), + iothread=dict(type='bool'), + mbps=dict(type='float'), + mbps_max=dict(type='float'), + mbps_rd=dict(type='float'), + mbps_rd_max=dict(type='float'), + mbps_wr=dict(type='float'), + mbps_wr_max=dict(type='float'), + media=dict(type='str', choices=['cdrom', 'disk']), + queues=dict(type='int'), + replicate=dict(type='bool'), + rerror=dict(type='str', choices=['ignore', 'report', 'stop']), + ro=dict(type='bool'), + scsiblock=dict(type='bool'), + secs=dict(type='int'), + serial=dict(type='str'), + shared=dict(type='bool'), + snapshot=dict(type='bool'), + ssd=dict(type='bool'), + trans=dict(type='str', choices=['auto', 'lba', 'none']), + werror=dict(type='str', choices=['enospc', 'ignore', 'report', 'stop']), + wwn=dict(type='str'), + + # Disk moving relates parameters + bwlimit=dict(type='int'), + target_storage=dict(type='str'), + target_disk=dict(type='str'), + target_vmid=dict(type='int'), + delete_moved=dict(type='bool'), + timeout=dict(type='int', default='600'), + + # Module related parameters + name=dict(type='str'), + vmid=dict(type='int'), + disk=dict(type='str', required=True), + storage=dict(type='str'), + size=dict(type='str'), + state=dict(type='str', choices=['present', 'resized', 'detached', 'moved', 'absent'], + default='present'), + create=dict(type='str', choices=['disabled', 'regular', 'forced'], default='regular'), + ) + + module_args.update(disk_args) + + module = AnsibleModule( + argument_spec=module_args, + required_together=[('api_token_id', 'api_token_secret')], + required_one_of=[('name', 'vmid'), ('api_password', 'api_token_id')], + required_if=[ + ('create', 'forced', ['storage']), + ('state', 'resized', ['size']), + ], + required_by={ + 'target_disk': 'target_vmid', + 'mbps_max': 'mbps', + 'mbps_rd_max': 'mbps_rd', + 'mbps_wr_max': 'mbps_wr', + 'bps_max_length': 'mbps_max', + 'bps_rd_max_length': 'mbps_rd_max', + 'bps_wr_max_length': 'mbps_wr_max', + 'iops_max': 'iops', + 'iops_rd_max': 'iops_rd', + 'iops_wr_max': 'iops_wr', + 'iops_max_length': 'iops_max', + 'iops_rd_max_length': 'iops_rd_max', + 'iops_wr_max_length': 'iops_wr_max', + }, + supports_check_mode=False, + mutually_exclusive=[ + ('target_vmid', 'target_storage'), + ('mbps', 'mbps_rd'), + ('mbps', 'mbps_wr'), + ('iops', 'iops_rd'), + ('iops', 'iops_wr'), + ('import_from', 'size'), + ] + ) + + proxmox = ProxmoxDiskAnsible(module) + + disk = module.params['disk'] + # Verify disk name has appropriate name + disk_regex = compile(r'^([a-z]+)([0-9]+)$') + disk_bus = sub(disk_regex, r'\1', disk) + disk_number = int(sub(disk_regex, r'\2', disk)) + if disk_bus not in proxmox.supported_bus_num_ranges: + proxmox.module.fail_json(msg='Unsupported disk bus: %s' % disk_bus) + elif disk_number not in proxmox.supported_bus_num_ranges[disk_bus]: + bus_range = proxmox.supported_bus_num_ranges[disk_bus] + proxmox.module.fail_json(msg='Disk %s number not in range %s..%s ' % (disk, bus_range[0], bus_range[-1])) + + name = module.params['name'] + state = module.params['state'] + vmid = module.params['vmid'] or proxmox.get_vmid(name) + + # Ensure VM id exists and retrieve its config + vm = None + vm_config = None + try: + vm = proxmox.get_vm(vmid) + vm_config = proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).config.get() + except Exception as e: + proxmox.module.fail_json(msg='Getting information for VM %s failed with exception: %s' % (vmid, str(e))) + + # Do not try to perform actions on missing disk + if disk not in vm_config and state in ['resized', 'moved']: + module.fail_json(vmid=vmid, msg='Unable to process missing disk %s in VM %s' % (disk, vmid)) + + if state == 'present': + try: + success, message = proxmox.create_disk(disk, vmid, vm, vm_config) + if success: + module.exit_json(changed=True, vmid=vmid, msg=message) + else: + module.exit_json(changed=False, vmid=vmid, msg=message) + except Exception as e: + module.fail_json(vmid=vmid, msg='Unable to create/update disk %s in VM %s: %s' % (disk, vmid, str(e))) + + elif state == 'detached': + try: + if disk_bus == 'unused': + module.exit_json(changed=False, vmid=vmid, msg='Disk %s already detached in VM %s' % (disk, vmid)) + if disk not in vm_config: + module.exit_json(changed=False, vmid=vmid, msg="Disk %s not present in VM %s config" % (disk, vmid)) + proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).unlink.put(vmid=vmid, idlist=disk, force=0) + module.exit_json(changed=True, vmid=vmid, msg="Disk %s detached from VM %s" % (disk, vmid)) + except Exception as e: + module.fail_json(msg="Failed to detach disk %s from VM %s with exception: %s" % (disk, vmid, str(e))) + + elif state == 'moved': + try: + disk_config = disk_conf_str_to_dict(vm_config[disk]) + disk_storage = disk_config["storage_name"] + if proxmox.move_disk(disk, vmid, vm, vm_config): + module.exit_json(changed=True, vmid=vmid, + msg="Disk %s moved from VM %s storage %s" % (disk, vmid, disk_storage)) + else: + module.exit_json(changed=False, vmid=vmid, msg="Disk %s already at %s storage" % (disk, disk_storage)) + except Exception as e: + module.fail_json(msg="Failed to move disk %s in VM %s with exception: %s" % (disk, vmid, str(e))) + + elif state == 'resized': + try: + size = module.params['size'] + if not match(r'^\+?\d+(\.\d+)?[KMGT]?$', size): + module.fail_json(msg="Unrecognized size pattern for disk %s: %s" % (disk, size)) + disk_config = disk_conf_str_to_dict(vm_config[disk]) + actual_size = disk_config['size'] + if size == actual_size: + module.exit_json(changed=False, vmid=vmid, msg="Disk %s is already %s size" % (disk, size)) + proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(vmid=vmid, disk=disk, size=size) + module.exit_json(changed=True, vmid=vmid, msg="Disk %s resized in VM %s" % (disk, vmid)) + except Exception as e: + module.fail_json(msg="Failed to resize disk %s in VM %s with exception: %s" % (disk, vmid, str(e))) + + elif state == 'absent': + try: + if disk not in vm_config: + module.exit_json(changed=False, vmid=vmid, msg="Disk %s is already absent in VM %s" % (disk, vmid)) + proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).unlink.put(vmid=vmid, idlist=disk, force=1) + module.exit_json(changed=True, vmid=vmid, msg="Disk %s removed from VM %s" % (disk, vmid)) + except Exception as e: + module.fail_json(vmid=vmid, msg='Unable to remove disk %s from VM %s: %s' % (disk, vmid, str(e))) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/proxmox/tasks/main.yml b/tests/integration/targets/proxmox/tasks/main.yml index fc7e084e90..437ccad60e 100644 --- a/tests/integration/targets/proxmox/tasks/main.yml +++ b/tests/integration/targets/proxmox/tasks/main.yml @@ -313,6 +313,202 @@ - results.vmid == {{ vmid }} - results.msg == "Nic net5 deleted on VM with vmid {{ vmid }}" +- name: Create new disk in VM + tags: ['create_disk'] + block: + - name: Add new disk (without force) to VM + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + storage: "{{ storage }}" + size: 1 + state: present + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} created in VM {{ vmid }}" + + - name: Try add disk again with same options (expect no-op) + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + storage: "{{ storage }}" + size: 1 + state: present + register: results + + - assert: + that: + - results is not changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} is up to date in VM {{ vmid }}" + + - name: Add new disk replacing existing disk (detach old and leave unused) + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + storage: "{{ storage }}" + size: 2 + create: forced + state: present + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} created in VM {{ vmid }}" + +- name: Update existing disk in VM + tags: ['update_disk'] + block: + - name: Update disk configuration + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + backup: false + ro: true + aio: native + state: present + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} updated in VM {{ vmid }}" + +- name: Grow existing disk in VM + tags: ['grow_disk'] + block: + - name: Increase disk size + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + size: +1G + state: resized + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} resized in VM {{ vmid }}" + +- name: Detach disk and leave it unused + tags: ['detach_disk'] + block: + - name: Detach disk + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + state: detached + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} detached from VM {{ vmid }}" + +- name: Move disk to another storage or another VM + tags: ['move_disk'] + block: + - name: Move disk to another storage inside same VM + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + target_storage: "{{ target_storage }}" + format: "{{ target_format }}" + state: moved + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} moved from VM {{ vmid }} storage {{ results.storage }}" + + - name: Move disk to another VM (same storage) + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ vmid }}" + disk: "{{ disk }}" + target_vmid: "{{ target_vm }}" + target_disk: "{{ target_disk }}" + state: moved + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ vmid }} + - results.msg == "Disk {{ disk }} moved from VM {{ vmid }} storage {{ results.storage }}" + + +- name: Remove disk permanently + tags: ['remove_disk'] + block: + - name: Remove disk + proxmox_disk: + api_host: "{{ api_host }}" + api_user: "{{ user }}@{{ domain }}" + api_password: "{{ api_password | default(omit) }}" + api_token_id: "{{ api_token_id | default(omit) }}" + api_token_secret: "{{ api_token_secret | default(omit) }}" + vmid: "{{ target_vm }}" + disk: "{{ target_disk }}" + state: absent + register: results + + - assert: + that: + - results is changed + - results.vmid == {{ target_vm }} + - results.msg == "Disk {{ target_disk }} removed from VM {{ target_vm }}" + - name: VM stop tags: [ 'stop' ] block: From 44e85c3a60b24d385c43e51c89b4d1008f151fca Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 19 Sep 2022 21:07:04 +0200 Subject: [PATCH 0227/2104] Try to run reuse workflow without explicitly allowing it for new contributors. (#5296) --- .github/workflows/reuse.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index a63b325f6c..8467668f10 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -8,7 +8,8 @@ name: Verify REUSE on: push: branches: [main] - pull_request: + pull_request_target: + types: [opened, synchronize, reopened] branches: [main] # Run CI once per day (at 07:30 UTC) schedule: @@ -21,7 +22,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || '' }} - name: Install dependencies run: | From a938c9de655823cac39328c1ecfb4a2651212d37 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 21 Sep 2022 07:58:52 +0200 Subject: [PATCH 0228/2104] Add stable-2.14 to CI, adjust to devel version bump (#5298) * Add stable-2.14 to CI, adjust to devel version bump. * Thin out matrix a bit. --- .azure-pipelines/azure-pipelines.yml | 78 +++++++++++++++++++++++++--- .github/workflows/docs-pr.yml | 5 +- README.md | 2 +- tests/sanity/ignore-2.15.txt | 38 ++++++++++++++ tests/sanity/ignore-2.15.txt.license | 3 ++ 5 files changed, 113 insertions(+), 13 deletions(-) create mode 100644 tests/sanity/ignore-2.15.txt create mode 100644 tests/sanity/ignore-2.15.txt.license diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 60b9e31023..7daed5cb12 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -73,6 +73,19 @@ stages: - test: 3 - test: 4 - test: extra + - stage: Sanity_2_14 + displayName: Sanity 2.14 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + nameFormat: Test {0} + testFormat: 2.14/sanity/{0} + targets: + - test: 1 + - test: 2 + - test: 3 + - test: 4 - stage: Sanity_2_13 displayName: Sanity 2.13 dependsOn: [] @@ -129,6 +142,18 @@ stages: - test: 3.8 - test: 3.9 - test: '3.10' + - test: '3.11' + - stage: Units_2_14 + displayName: Units 2.14 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + nameFormat: Python {0} + testFormat: 2.14/units/{0}/1 + targets: + - test: 2.7 + - test: 3.9 - stage: Units_2_13 displayName: Units 2.13 dependsOn: [] @@ -139,9 +164,7 @@ stages: testFormat: 2.13/units/{0}/1 targets: - test: 2.7 - - test: 3.6 - test: 3.8 - - test: 3.9 - stage: Units_2_12 displayName: Units 2.12 dependsOn: [] @@ -152,7 +175,6 @@ stages: testFormat: 2.12/units/{0}/1 targets: - test: 2.6 - - test: 3.5 - test: 3.8 - stage: Units_2_11 displayName: Units 2.11 @@ -163,11 +185,8 @@ stages: nameFormat: Python {0} testFormat: 2.11/units/{0}/1 targets: - - test: 2.6 - test: 2.7 - test: 3.5 - - test: 3.6 - - test: 3.9 ## Remote - stage: Remote_devel @@ -192,6 +211,22 @@ stages: - 1 - 2 - 3 + - stage: Remote_2_14 + displayName: Remote 2.14 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.14/{0} + targets: + - name: RHEL 9.0 + test: rhel/9.0 + - name: FreeBSD 13.1 + test: freebsd/13.1 + groups: + - 1 + - 2 + - 3 - stage: Remote_2_13 displayName: Remote 2.13 dependsOn: [] @@ -238,8 +273,6 @@ stages: test: rhel/7.9 - name: RHEL 8.3 test: rhel/8.3 - #- name: FreeBSD 12.2 - # test: freebsd/12.2 groups: - 1 - 2 @@ -270,6 +303,20 @@ stages: - 1 - 2 - 3 + - stage: Docker_2_14 + displayName: Docker 2.14 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.14/linux/{0} + targets: + - name: Ubuntu 20.04 + test: ubuntu2004 + groups: + - 1 + - 2 + - 3 - stage: Docker_2_13 displayName: Docker 2.13 dependsOn: [] @@ -356,6 +403,16 @@ stages: testFormat: devel/cloud/{0}/1 targets: - test: 2.7 + - test: '3.11' + - stage: Cloud_2_14 + displayName: Cloud 2.14 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + nameFormat: Python {0} + testFormat: 2.14/cloud/{0}/1 + targets: - test: '3.10' - stage: Cloud_2_13 displayName: Cloud 2.13 @@ -396,22 +453,27 @@ stages: - Sanity_2_11 - Sanity_2_12 - Sanity_2_13 + - Sanity_2_14 - Units_devel - Units_2_11 - Units_2_12 - Units_2_13 + - Units_2_14 - Remote_devel - Remote_2_11 - Remote_2_12 - Remote_2_13 + - Remote_2_14 - Docker_devel - Docker_2_11 - Docker_2_12 - Docker_2_13 + - Docker_2_14 - Docker_community_devel - Cloud_devel - Cloud_2_11 - Cloud_2_12 - Cloud_2_13 + - Cloud_2_14 jobs: - template: templates/coverage.yml diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index a3d5636ba5..0c2a70133a 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -24,10 +24,7 @@ jobs: uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main with: init-fail-on-error: true - # We need to use devel instead of stable-2.13 since stable-2.13's ansible-doc does not list - # modules. devel's ansible-doc does (thanks to the sidecar docs PR). - ansible-ref: devel - # ansible-ref: stable-2.13 + ansible-ref: stable-2.14 provide-link-targets: | ansible_collections.ansible.builtin.dict2items_filter ansible_collections.ansible.builtin.path_join_filter diff --git a/README.md b/README.md index d38a5653ec..94d5b506ba 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ If you encounter abusive behavior violating the [Ansible Code of Conduct](https: ## Tested with Ansible -Tested with the current ansible-core 2.11, ansible-core 2.12, ansible-core 2.13 releases and the current development version of ansible-core. Ansible-core versions before 2.11.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases. +Tested with the current ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14 releases and the current development version of ansible-core. Ansible-core versions before 2.11.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases. Parts of this collection will not work with ansible-core 2.11 on Python 3.12+. diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt new file mode 100644 index 0000000000..a2ccf20db3 --- /dev/null +++ b/tests/sanity/ignore-2.15.txt @@ -0,0 +1,38 @@ +.azure-pipelines/scripts/publish-codecov.py replace-urlopen +plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path +plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants +plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed +plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path +plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 +plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter +plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type +plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter +plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/packaging/language/yarn.py use-argspec-type-path +plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions +plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions +plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions +plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions +plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/system/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice +plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice +plugins/modules/system/puppet.py use-argspec-type-path +plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/system/xfconf.py validate-modules:return-syntax-error +plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt.license b/tests/sanity/ignore-2.15.txt.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/sanity/ignore-2.15.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project From cfecbd6763f73e9e7a5f5018a9740a383f1e8c4c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 22 Sep 2022 06:40:15 +0200 Subject: [PATCH 0229/2104] stable-2.14 is now default. --- .github/workflows/docs-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 0c2a70133a..26213d705d 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -24,7 +24,6 @@ jobs: uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main with: init-fail-on-error: true - ansible-ref: stable-2.14 provide-link-targets: | ansible_collections.ansible.builtin.dict2items_filter ansible_collections.ansible.builtin.path_join_filter From a6c8078ccf4578fe2a15e2d97eca716ba6fc9a1d Mon Sep 17 00:00:00 2001 From: Marc Leuser Date: Thu, 22 Sep 2022 07:17:45 +0200 Subject: [PATCH 0230/2104] netcup_dnsapi: Add timeout paramter (#5301) * netcup_dnsapi: Add timeout paramter * add changelog fragment * Apply suggestions from code review Co-authored-by: Felix Fontein * remove unnecessary newline Co-authored-by: Felix Fontein --- .../fragments/5301-netcup_dnsapi-timeout.yml | 2 ++ plugins/modules/net_tools/netcup_dns.py | 22 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5301-netcup_dnsapi-timeout.yml diff --git a/changelogs/fragments/5301-netcup_dnsapi-timeout.yml b/changelogs/fragments/5301-netcup_dnsapi-timeout.yml new file mode 100644 index 0000000000..e7afd5b283 --- /dev/null +++ b/changelogs/fragments/5301-netcup_dnsapi-timeout.yml @@ -0,0 +1,2 @@ +minor_changes: + - netcup_dnsapi - add ``timeout`` parameter (https://github.com/ansible-collections/community.general/pull/5301). diff --git a/plugins/modules/net_tools/netcup_dns.py b/plugins/modules/net_tools/netcup_dns.py index e6bf3de0c3..5d082c2980 100644 --- a/plugins/modules/net_tools/netcup_dns.py +++ b/plugins/modules/net_tools/netcup_dns.py @@ -72,6 +72,12 @@ options: default: present choices: [ 'present', 'absent' ] type: str + timeout: + description: + - HTTP(S) connection timeout in seconds. + default: 5 + type: int + version_added: 5.7.0 requirements: - "nc-dnsapi >= 0.1.3" author: "Nicolai Buchwitz (@nbuchwitz)" @@ -129,6 +135,18 @@ EXAMPLES = ''' type: "AAAA" value: "::1" solo: true + +- name: Increase the connection timeout to avoid problems with an unstable connection + community.general.netcup_dns: + api_key: "..." + api_password: "..." + customer_id: "..." + domain: "example.com" + name: "mail" + type: "A" + value: "127.0.0.1" + timeout: 30 + ''' RETURN = ''' @@ -193,6 +211,7 @@ def main(): priority=dict(required=False, type='int'), solo=dict(required=False, type='bool', default=False), state=dict(required=False, choices=['present', 'absent'], default='present'), + timeout=dict(required=False, type='int', default=5), ), supports_check_mode=True @@ -211,6 +230,7 @@ def main(): priority = module.params.get('priority') solo = module.params.get('solo') state = module.params.get('state') + timeout = module.params.get('timeout') if record_type == 'MX' and not priority: module.fail_json(msg="record type MX required the 'priority' argument") @@ -218,7 +238,7 @@ def main(): has_changed = False all_records = [] try: - with nc_dnsapi.Client(customer_id, api_key, api_password) as api: + with nc_dnsapi.Client(customer_id, api_key, api_password, timeout) as api: all_records = api.dns_records(domain) record = DNSRecord(record, record_type, value, priority=priority) From f0ee21b8b2fa3b4ca97db7b243750ae55251db1d Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 26 Sep 2022 03:28:06 +1300 Subject: [PATCH 0231/2104] ini_file: fix lint error (#5307) * ini_file: fix lint error * add changelog fragment * remove line from sanity test ignore files --- changelogs/fragments/5307-ini_file-lint.yaml | 2 ++ plugins/modules/files/ini_file.py | 2 +- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - 5 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/5307-ini_file-lint.yaml diff --git a/changelogs/fragments/5307-ini_file-lint.yaml b/changelogs/fragments/5307-ini_file-lint.yaml new file mode 100644 index 0000000000..a1eb642356 --- /dev/null +++ b/changelogs/fragments/5307-ini_file-lint.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ini_file - minor refactor fixing a python lint error (https://github.com/ansible-collections/community.general/pull/5307). diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/files/ini_file.py index aaef3bb3db..ee4ad62b72 100644 --- a/plugins/modules/files/ini_file.py +++ b/plugins/modules/files/ini_file.py @@ -310,7 +310,7 @@ def do_ini(module, filename, section=None, option=None, values=None, # override option with no value to option with value if not allow_no_value if len(values) > 0: for index, line in enumerate(section_lines): - if not changed_lines[index] and match_active_opt(option, section_lines[index]): # pylint: disable=unnecessary-list-index-lookup + if not changed_lines[index] and match_active_opt(option, line): newline = assignment_format % (option, values.pop(0)) (changed, msg) = update_section_line(changed, section_lines, index, changed_lines, newline, msg) if len(values) == 0: diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index e6919b17b7..855883d64a 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -22,7 +22,6 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no- plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/files/ini_file.py pylint:bad-option-value plugins/modules/packaging/language/yarn.py use-argspec-type-path plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index ae52113f15..39c97f6bf8 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -17,7 +17,6 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no- plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/files/ini_file.py pylint:bad-option-value plugins/modules/packaging/language/yarn.py use-argspec-type-path plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index ae52113f15..39c97f6bf8 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -17,7 +17,6 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no- plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/files/ini_file.py pylint:bad-option-value plugins/modules/packaging/language/yarn.py use-argspec-type-path plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice From fb1cf91ebd896c783a6863ae616f58d37fb07aa0 Mon Sep 17 00:00:00 2001 From: Bartosz-lab <73119351+Bartosz-lab@users.noreply.github.com> Date: Sun, 25 Sep 2022 16:31:32 +0200 Subject: [PATCH 0232/2104] locale_gen: fix UbuntuMode (#5282) * Fix UbuntuMode * Fix indentation * Create 5281-locale_gen.yaml * Update and rename 5281-locale_gen.yaml to 5282-locale_gen.yaml * apply suggested changes * apply suggested change --- changelogs/fragments/5282-locale_gen.yaml | 2 ++ plugins/modules/system/locale_gen.py | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5282-locale_gen.yaml diff --git a/changelogs/fragments/5282-locale_gen.yaml b/changelogs/fragments/5282-locale_gen.yaml new file mode 100644 index 0000000000..07cc13a72f --- /dev/null +++ b/changelogs/fragments/5282-locale_gen.yaml @@ -0,0 +1,2 @@ +bugfixes: + - "locale_gen - fix support for Ubuntu (https://github.com/ansible-collections/community.general/issues/5281)." diff --git a/plugins/modules/system/locale_gen.py b/plugins/modules/system/locale_gen.py index 814a82c72a..743570b7ab 100644 --- a/plugins/modules/system/locale_gen.py +++ b/plugins/modules/system/locale_gen.py @@ -197,15 +197,15 @@ def main(): name = module.params['name'] state = module.params['state'] - if not os.path.exists("/etc/locale.gen"): - if os.path.exists("/var/lib/locales/supported.d/"): - # Ubuntu created its own system to manage locales. - ubuntuMode = True + if not os.path.exists("/var/lib/locales/supported.d/"): + if os.path.exists("/etc/locale.gen"): + # We found the common way to manage locales. + ubuntuMode = False else: module.fail_json(msg="/etc/locale.gen and /var/lib/locales/supported.d/local are missing. Is the package \"locales\" installed?") else: - # We found the common way to manage locales. - ubuntuMode = False + # Ubuntu created its own system to manage locales. + ubuntuMode = True if not is_available(name, ubuntuMode): module.fail_json(msg="The locale you've entered is not available " From d9d830a1680f7dec4601b41200323a9e1534a4bb Mon Sep 17 00:00:00 2001 From: tejabailey <33755314+tejabailey@users.noreply.github.com> Date: Sun, 25 Sep 2022 11:07:45 -0400 Subject: [PATCH 0233/2104] Add SetSessionService to redfish_config (#5009) * Add SetSessionService to redfish_config adding SetSessionService command to redfish_config to set BMC default session timeout policy. Fixes #5008 * fix white space issues * Making Requested changes: - changed category from SessionService to Sessions - changed set_sessionservice() to set_session_service() - other misc. changes for cleanup * Apply suggestions from code review Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Fix issues with checks * Fix issues with checks part 2 * Fix issues with checks part 3 * Update plugins/modules/remote_management/redfish/redfish_config.py Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein --- .../fragments/5008-addSetSessionService.yml | 2 + plugins/module_utils/redfish_utils.py | 58 +++++++++++++++++++ .../redfish/redfish_config.py | 33 ++++++++++- 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5008-addSetSessionService.yml diff --git a/changelogs/fragments/5008-addSetSessionService.yml b/changelogs/fragments/5008-addSetSessionService.yml new file mode 100644 index 0000000000..b2b124c48b --- /dev/null +++ b/changelogs/fragments/5008-addSetSessionService.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_config - add ``SetSessionService`` to set default session timeout policy (https://github.com/ansible-collections/community.general/issues/5008). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 464d1110d7..0c1422b23b 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -240,6 +240,7 @@ class RedfishUtils(object): return {'ret': False, 'msg': "SessionService resource not found"} else: session_service = data["SessionService"]["@odata.id"] + self.session_service_uri = session_service response = self.get_request(self.root_uri + session_service) if response['ret'] is False: return response @@ -3081,3 +3082,60 @@ class RedfishUtils(object): def get_multi_manager_inventory(self): return self.aggregate_managers(self.get_manager_inventory) + + def set_session_service(self, sessions_config): + result = {} + response = self.get_request(self.root_uri + self.session_service_uri) + if response['ret'] is False: + return response + current_sessions_config = response['data'] + payload = {} + for property, value in sessions_config.items(): + value = sessions_config[property] + if property not in current_sessions_config: + return {'ret': False, 'msg': "Property %s in sessions_config is invalid" % property} + if isinstance(value, dict): + if isinstance(current_sessions_config[property], dict): + payload[property] = value + elif isinstance(current_sessions_config[property], list): + payload[property] = [value] + else: + return {'ret': False, 'msg': "Value of property %s in sessions_config is invalid" % property} + else: + payload[property] = value + + need_change = False + for property, set_value in payload.items(): + cur_value = current_sessions_config[property] + if not isinstance(set_value, (dict, list)): + if set_value != cur_value: + need_change = True + if isinstance(set_value, dict): + for subprop in set_value.keys(): + if subprop not in current_sessions_config[property]: + need_change = True + break + sub_set_value = set_value[subprop] + sub_cur_value = current_sessions_config[property][subprop] + if sub_set_value != sub_cur_value: + need_change = True + if isinstance(set_value, list): + if len(set_value) != len(cur_value): + need_change = True + continue + for i in range(len(set_value)): + for subprop in set_value[i].keys(): + if subprop not in current_sessions_config[property][i]: + need_change = True + break + sub_set_value = set_value[i][subprop] + sub_cur_value = current_sessions_config[property][i][subprop] + if sub_set_value != sub_cur_value: + need_change = True + if not need_change: + return {'ret': True, 'changed': False, 'msg': "SessionService already configured"} + + response = self.patch_request(self.root_uri + self.session_service_uri, payload) + if response['ret'] is False: + return response + return {'ret': True, 'changed': True, 'msg': "Modified SessionService"} diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index c583fb6cb2..0e7d1537bf 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -113,6 +113,12 @@ options: - Redfish HostInterface instance ID if multiple HostInterfaces are present. type: str version_added: '4.1.0' + sessions_config: + required: false + description: + - Setting dict of Sessions. + type: dict + version_added: '5.7.0' author: "Jose Delarosa (@jose-delarosa)" ''' @@ -235,6 +241,16 @@ EXAMPLES = ''' baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" + + - name: Set SessionService Session Timeout to 30 minutes + community.general.redfish_config: + category: Sessions + command: SetSessionService + sessions_config: + SessionTimeout: 1800 + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" ''' RETURN = ''' @@ -254,7 +270,8 @@ from ansible.module_utils.common.text.converters import to_native CATEGORY_COMMANDS_ALL = { "Systems": ["SetBiosDefaultSettings", "SetBiosAttributes", "SetBootOrder", "SetDefaultBootOrder"], - "Manager": ["SetNetworkProtocols", "SetManagerNic", "SetHostInterface"] + "Manager": ["SetNetworkProtocols", "SetManagerNic", "SetHostInterface"], + "Sessions": ["SetSessionService"], } @@ -284,6 +301,7 @@ def main(): strip_etag_quotes=dict(type='bool', default=False), hostinterface_config=dict(type='dict', default={}), hostinterface_id=dict(), + sessions_config=dict(type='dict', default={}), ), required_together=[ ('username', 'password'), @@ -330,6 +348,9 @@ def main(): # HostInterface instance ID hostinterface_id = module.params['hostinterface_id'] + # Sessions config options + sessions_config = module.params['sessions_config'] + # Build root URI root_uri = "https://" + module.params['baseuri'] rf_utils = RedfishUtils(creds, root_uri, timeout, module, @@ -376,6 +397,16 @@ def main(): elif command == "SetHostInterface": result = rf_utils.set_hostinterface_attributes(hostinterface_config, hostinterface_id) + elif category == "Sessions": + # execute only if we find a Sessions resource + result = rf_utils._find_sessionservice_resource() + if result['ret'] is False: + module.fail_json(msg=to_native(result['msg'])) + + for command in command_list: + if command == "SetSessionService": + result = rf_utils.set_session_service(sessions_config) + # Return data back or fail with proper message if result['ret'] is True: if result.get('warning'): From f3bcfa5a75ef93bb36e3e050d62261ff74a66cd9 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Sun, 25 Sep 2022 20:09:08 +0100 Subject: [PATCH 0234/2104] machinectl: include the success command (#5287) Combines the success command when building the become command. This is consistent with other become plugins. --- changelogs/fragments/5287-machinectl-become-success.yml | 2 ++ plugins/become/machinectl.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5287-machinectl-become-success.yml diff --git a/changelogs/fragments/5287-machinectl-become-success.yml b/changelogs/fragments/5287-machinectl-become-success.yml new file mode 100644 index 0000000000..3f71831e29 --- /dev/null +++ b/changelogs/fragments/5287-machinectl-become-success.yml @@ -0,0 +1,2 @@ +minor_changes: + - machinectl become plugin - combine the success command when building the become command to be consistent with other become plugins (https://github.com/ansible-collections/community.general/pull/5287). diff --git a/plugins/become/machinectl.py b/plugins/become/machinectl.py index 3e13dfc2a5..461a3f635d 100644 --- a/plugins/become/machinectl.py +++ b/plugins/become/machinectl.py @@ -117,7 +117,7 @@ class BecomeModule(BecomeBase): flags = self.get_option('become_flags') user = self.get_option('become_user') - return '%s -q shell %s %s@ %s' % (become, flags, user, cmd) + return '%s -q shell %s %s@ %s' % (become, flags, user, self._build_success_command(cmd, shell)) def check_success(self, b_output): b_output = self.remove_ansi_codes(b_output) From 25e3031c2f1a8e306b50dd5cbb38025722830586 Mon Sep 17 00:00:00 2001 From: nxet Date: Wed, 28 Sep 2022 22:48:11 +0200 Subject: [PATCH 0235/2104] [feat] proxmox_snap: snapshot containers with configured mountpoints (#5274) * module_utils.proxmox: new `api_task_ok` helper + integrated with existing modules * proxmox_snap: add `unbind` param to snapshot containers with mountpoints * [fix] errors reported by 'test sanity pep8' at https://github.com/ansible-collections/community.general/pull/5274#issuecomment-1242932079 * module_utils.proxmox.api_task_ok: small improvement * proxmox_snap.unbind: version_added, formatting errors, changelog fragment * Apply suggestions from code review Co-authored-by: Felix Fontein * proxmox_snap.unbind: update version_added tag Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...roxmox-snap-container-with-mountpoints.yml | 3 + plugins/module_utils/proxmox.py | 4 + plugins/modules/cloud/misc/proxmox.py | 15 +-- plugins/modules/cloud/misc/proxmox_kvm.py | 3 +- plugins/modules/cloud/misc/proxmox_snap.py | 111 ++++++++++++++++-- .../modules/cloud/misc/proxmox_template.py | 3 +- 6 files changed, 117 insertions(+), 22 deletions(-) create mode 100644 changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml diff --git a/changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml b/changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml new file mode 100644 index 0000000000..9e64e37663 --- /dev/null +++ b/changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml @@ -0,0 +1,3 @@ +minor_changes: + - proxmox_snap - add ``unbind`` param to support snapshotting containers with configured mountpoints (https://github.com/ansible-collections/community.general/pull/5274). + - proxmox module utils, the proxmox* modules - add ``api_task_ok`` helper to standardize API task status checks across all proxmox modules (https://github.com/ansible-collections/community.general/pull/5274). diff --git a/plugins/module_utils/proxmox.py b/plugins/module_utils/proxmox.py index 65e8eb4723..96a96c8b3c 100644 --- a/plugins/module_utils/proxmox.py +++ b/plugins/module_utils/proxmox.py @@ -137,3 +137,7 @@ class ProxmoxAnsible(object): return None self.module.fail_json(msg='VM with vmid %s does not exist in cluster' % vmid) + + def api_task_ok(self, node, taskid): + status = self.proxmox_api.nodes(node).tasks(taskid).status.get() + return status['status'] == 'stopped' and status['exitstatus'] == 'OK' diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index 406666f57b..5a89ee7796 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -482,8 +482,7 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): taskid = getattr(proxmox_node, VZ_TYPE).create(vmid=vmid, storage=storage, memory=memory, swap=swap, **kwargs) while timeout: - if (proxmox_node.tasks(taskid).status.get()['status'] == 'stopped' and - proxmox_node.tasks(taskid).status.get()['exitstatus'] == 'OK'): + if self.api_task_ok(node, taskid): return True timeout -= 1 if timeout == 0: @@ -496,8 +495,7 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): def start_instance(self, vm, vmid, timeout): taskid = getattr(self.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.start.post() while timeout: - if (self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get()['status'] == 'stopped' and - self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get()['exitstatus'] == 'OK'): + if self.api_task_ok(vm['node'], taskid): return True timeout -= 1 if timeout == 0: @@ -513,8 +511,7 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): else: taskid = getattr(self.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.shutdown.post() while timeout: - if (self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get()['status'] == 'stopped' and - self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get()['exitstatus'] == 'OK'): + if self.api_task_ok(vm['node'], taskid): return True timeout -= 1 if timeout == 0: @@ -527,8 +524,7 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): def umount_instance(self, vm, vmid, timeout): taskid = getattr(self.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.umount.post() while timeout: - if (self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get()['status'] == 'stopped' and - self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get()['exitstatus'] == 'OK'): + if self.api_task_ok(vm['node'], taskid): return True timeout -= 1 if timeout == 0: @@ -775,8 +771,7 @@ def main(): taskid = getattr(proxmox.proxmox_api.nodes(vm['node']), VZ_TYPE).delete(vmid, **delete_params) while timeout: - task_status = proxmox.proxmox_api.nodes(vm['node']).tasks(taskid).status.get() - if (task_status['status'] == 'stopped' and task_status['exitstatus'] == 'OK'): + if proxmox.api_task_ok(vm['node'], taskid): module.exit_json(changed=True, msg="VM %s removed" % vmid) timeout -= 1 if timeout == 0: diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index dc2d6e5aae..ba5b0d4ff3 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -866,8 +866,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible): timeout = self.module.params['timeout'] while timeout: - task = self.proxmox_api.nodes(node).tasks(taskid).status.get() - if task['status'] == 'stopped' and task['exitstatus'] == 'OK': + if self.api_task_ok(node, taskid): # Wait an extra second as the API can be a ahead of the hypervisor time.sleep(1) return True diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/cloud/misc/proxmox_snap.py index 9a9be8dc4d..3bd7c4ee32 100644 --- a/plugins/modules/cloud/misc/proxmox_snap.py +++ b/plugins/modules/cloud/misc/proxmox_snap.py @@ -38,6 +38,17 @@ options: - For removal from config file, even if removing disk snapshot fails. default: false type: bool + unbind: + description: + - This option only applies to LXC containers. + - Allows to snapshot a container even if it has configured mountpoints. + - Temporarily disables all configured mountpoints, takes snapshot, and finally restores original configuration. + - If running, the container will be stopped and restarted to apply config changes. + - Due to restrictions in the Proxmox API this option can only be used authenticating as C(root@pam) with I(api_password), API tokens do not work either. + - See U(https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/lxc/{vmid}/config) (PUT tab) for more details. + default: false + type: bool + version_added: 5.7.0 vmstate: description: - Snapshot includes RAM. @@ -78,6 +89,16 @@ EXAMPLES = r''' state: present snapname: pre-updates +- name: Create new snapshot for a container with configured mountpoints + community.general.proxmox_snap: + api_user: root@pam + api_password: 1q2w3e + api_host: node1 + vmid: 100 + state: present + unbind: true # requires root@pam+password auth, API tokens are not supported + snapname: pre-updates + - name: Remove container snapshot community.general.proxmox_snap: api_user: root@pam @@ -110,17 +131,89 @@ class ProxmoxSnapAnsible(ProxmoxAnsible): def snapshot(self, vm, vmid): return getattr(self.proxmox_api.nodes(vm['node']), vm['type'])(vmid).snapshot - def snapshot_create(self, vm, vmid, timeout, snapname, description, vmstate): + def vmconfig(self, vm, vmid): + return getattr(self.proxmox_api.nodes(vm['node']), vm['type'])(vmid).config + + def vmstatus(self, vm, vmid): + return getattr(self.proxmox_api.nodes(vm['node']), vm['type'])(vmid).status + + def _container_mp_get(self, vm, vmid): + cfg = self.vmconfig(vm, vmid).get() + mountpoints = {} + for key, value in cfg.items(): + if key.startswith('mp'): + mountpoints[key] = value + return mountpoints + + def _container_mp_disable(self, vm, vmid, timeout, unbind, mountpoints, vmstatus): + # shutdown container if running + if vmstatus == 'running': + self.shutdown_instance(vm, vmid, timeout) + # delete all mountpoints configs + self.vmconfig(vm, vmid).put(delete=' '.join(mountpoints)) + + def _container_mp_restore(self, vm, vmid, timeout, unbind, mountpoints, vmstatus): + # NOTE: requires auth as `root@pam`, API tokens are not supported + # see https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/lxc/{vmid}/config + # restore original config + self.vmconfig(vm, vmid).put(**mountpoints) + # start container (if was running before snap) + if vmstatus == 'running': + self.start_instance(vm, vmid, timeout) + + def start_instance(self, vm, vmid, timeout): + taskid = self.vmstatus(vm, vmid).start.post() + while timeout: + if self.api_task_ok(vm['node'], taskid): + return True + timeout -= 1 + if timeout == 0: + self.module.fail_json(msg='Reached timeout while waiting for VM to start. Last line in task before timeout: %s' % + self.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1]) + time.sleep(1) + return False + + def shutdown_instance(self, vm, vmid, timeout): + taskid = self.vmstatus(vm, vmid).shutdown.post() + while timeout: + if self.api_task_ok(vm['node'], taskid): + return True + timeout -= 1 + if timeout == 0: + self.module.fail_json(msg='Reached timeout while waiting for VM to stop. Last line in task before timeout: %s' % + self.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1]) + time.sleep(1) + return False + + def snapshot_create(self, vm, vmid, timeout, snapname, description, vmstate, unbind): if self.module.check_mode: return True if vm['type'] == 'lxc': + if unbind is True: + # check if credentials will work + # WARN: it is crucial this check runs here! + # The correct permissions are required only to reconfig mounts. + # Not checking now would allow to remove the configuration BUT + # fail later, leaving the container in a misconfigured state. + if ( + self.module.params['api_user'] != 'root@pam' + or not self.module.params['api_password'] + ): + self.module.fail_json(msg='`unbind=True` requires authentication as `root@pam` with `api_password`, API tokens are not supported.') + return False + mountpoints = self._container_mp_get(vm, vmid) + vmstatus = self.vmstatus(vm, vmid).current().get()['status'] + if mountpoints: + self._container_mp_disable(vm, vmid, timeout, unbind, mountpoints, vmstatus) taskid = self.snapshot(vm, vmid).post(snapname=snapname, description=description) else: taskid = self.snapshot(vm, vmid).post(snapname=snapname, description=description, vmstate=int(vmstate)) + while timeout: - status_data = self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get() - if status_data['status'] == 'stopped' and status_data['exitstatus'] == 'OK': + if self.api_task_ok(vm['node'], taskid): + if vm['type'] == 'lxc' and unbind is True and mountpoints: + self._container_mp_restore(vm, vmid, timeout, unbind, mountpoints, vmstatus) return True if timeout == 0: self.module.fail_json(msg='Reached timeout while waiting for creating VM snapshot. Last line in task before timeout: %s' % @@ -128,6 +221,8 @@ class ProxmoxSnapAnsible(ProxmoxAnsible): time.sleep(1) timeout -= 1 + if vm['type'] == 'lxc' and unbind is True and mountpoints: + self._container_mp_restore(vm, vmid, timeout, unbind, mountpoints, vmstatus) return False def snapshot_remove(self, vm, vmid, timeout, snapname, force): @@ -136,8 +231,7 @@ class ProxmoxSnapAnsible(ProxmoxAnsible): taskid = self.snapshot(vm, vmid).delete(snapname, force=int(force)) while timeout: - status_data = self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get() - if status_data['status'] == 'stopped' and status_data['exitstatus'] == 'OK': + if self.api_task_ok(vm['node'], taskid): return True if timeout == 0: self.module.fail_json(msg='Reached timeout while waiting for removing VM snapshot. Last line in task before timeout: %s' % @@ -153,8 +247,7 @@ class ProxmoxSnapAnsible(ProxmoxAnsible): taskid = self.snapshot(vm, vmid)(snapname).post("rollback") while timeout: - status_data = self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get() - if status_data['status'] == 'stopped' and status_data['exitstatus'] == 'OK': + if self.api_task_ok(vm['node'], taskid): return True if timeout == 0: self.module.fail_json(msg='Reached timeout while waiting for rolling back VM snapshot. Last line in task before timeout: %s' % @@ -175,6 +268,7 @@ def main(): description=dict(type='str'), snapname=dict(type='str', default='ansible_snap'), force=dict(type='bool', default=False), + unbind=dict(type='bool', default=False), vmstate=dict(type='bool', default=False), ) module_args.update(snap_args) @@ -193,6 +287,7 @@ def main(): snapname = module.params['snapname'] timeout = module.params['timeout'] force = module.params['force'] + unbind = module.params['unbind'] vmstate = module.params['vmstate'] # If hostname is set get the VM id from ProxmoxAPI @@ -209,7 +304,7 @@ def main(): if i['name'] == snapname: module.exit_json(changed=False, msg="Snapshot %s is already present" % snapname) - if proxmox.snapshot_create(vm, vmid, timeout, snapname, description, vmstate): + if proxmox.snapshot_create(vm, vmid, timeout, snapname, description, vmstate, unbind): if module.check_mode: module.exit_json(changed=False, msg="Snapshot %s would be created" % snapname) else: diff --git a/plugins/modules/cloud/misc/proxmox_template.py b/plugins/modules/cloud/misc/proxmox_template.py index ab6e2d88e8..24a6c87d31 100644 --- a/plugins/modules/cloud/misc/proxmox_template.py +++ b/plugins/modules/cloud/misc/proxmox_template.py @@ -131,8 +131,7 @@ class ProxmoxTemplateAnsible(ProxmoxAnsible): Check the task status and wait until the task is completed or the timeout is reached. """ while timeout: - task_status = self.proxmox_api.nodes(node).tasks(taskid).status.get() - if task_status['status'] == 'stopped' and task_status['exitstatus'] == 'OK': + if self.api_task_ok(node, taskid): return True timeout = timeout - 1 if timeout == 0: From ec9e10d6d1dc83cb47bf30fb7fd14af65eccc6a9 Mon Sep 17 00:00:00 2001 From: Giorgio Gallo Date: Wed, 28 Sep 2022 22:49:07 +0200 Subject: [PATCH 0236/2104] nmcli: fix error when setting previously unset mac address (#5291) * fix #5290 * add changelog fragment * remove unnecessary braces * Update changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...1-fix-nmcli-error-when-setting-unset-mac-address.yaml | 2 ++ plugins/modules/net_tools/nmcli.py | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml diff --git a/changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml b/changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml new file mode 100644 index 0000000000..b58db74bcf --- /dev/null +++ b/changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml @@ -0,0 +1,2 @@ +bugfixes: + - "nmcli - fix error when setting previously unset MAC address, ``gsm.apn`` or ``vpn.data``: current values were being normalized without checking if they might be ``None`` (https://github.com/ansible-collections/community.general/pull/5291)." diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index f5a45b2f5b..13adc8bbd2 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -2099,15 +2099,18 @@ class Nmcli(object): # MAC addresses are case insensitive, nmcli always reports them in uppercase value = value.upper() # ensure current_value is also converted to uppercase in case nmcli changes behaviour - current_value = current_value.upper() + if current_value: + current_value = current_value.upper() if key == 'gsm.apn': # Depending on version nmcli adds double-qoutes to gsm.apn # Need to strip them in order to compare both - current_value = current_value.strip('"') + if current_value: + current_value = current_value.strip('"') if key == self.mtu_setting and self.mtu is None: self.mtu = 0 if key == 'vpn.data': - current_value = sorted(re.sub(r'\s*=\s*', '=', part.strip(), count=1) for part in current_value.split(',')) + if current_value: + current_value = sorted(re.sub(r'\s*=\s*', '=', part.strip(), count=1) for part in current_value.split(',')) value = sorted(part.strip() for part in value.split(',')) else: # parameter does not exist From 202cabc7691a92cd29d41aefc513ded1af0762d5 Mon Sep 17 00:00:00 2001 From: azrdev Date: Sat, 1 Oct 2022 10:25:12 +0200 Subject: [PATCH 0237/2104] terraform: run `init` with no-color, too (#5147) * terraform: run `init` with no-color, too When running `terraform init` fails, it would output ansi color sequences, making the output hard to read. Maybe setting TF_IN_AUTOMATION would also be beneficial: https://www.terraform.io/cli/config/environment-variables#tf_in_automation * add changelog fragment for `terraform init -no-color` * move changelog into correct directory; add PR link --- changelogs/fragments/5147-terraform-init-no-color.yml | 2 ++ plugins/modules/cloud/misc/terraform.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5147-terraform-init-no-color.yml diff --git a/changelogs/fragments/5147-terraform-init-no-color.yml b/changelogs/fragments/5147-terraform-init-no-color.yml new file mode 100644 index 0000000000..6f0e805ea3 --- /dev/null +++ b/changelogs/fragments/5147-terraform-init-no-color.yml @@ -0,0 +1,2 @@ +minor_changes: + - terraform - run ``terraform init`` with ``-no-color`` not to mess up the stdout of the task (https://github.com/ansible-collections/community.general/pull/5147). diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index c8b654eb12..e4da9cbbf0 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -273,7 +273,7 @@ def _state_args(state_file): def init_plugins(bin_path, project_path, backend_config, backend_config_files, init_reconfigure, provider_upgrade, plugin_paths): - command = [bin_path, 'init', '-input=false'] + command = [bin_path, 'init', '-input=false', '-no-color'] if backend_config: for key, val in backend_config.items(): command.extend([ From 2eba5dc4e7f4a474e1f75d37902ca6f16df19f59 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Sat, 1 Oct 2022 11:02:48 -0500 Subject: [PATCH 0238/2104] chore: Update lxc_container to support py3 (#5304) * chore: Update lxc_container to support py3 This change is mostly just a documentation change which will report the requirements correctly for python3-lxc. I've also removed the use of six which results in us changing `xrange` to `range`. Resolves: https://github.com/ansible-collections/community.general/issues/5294 Signed-off-by: Kevin Carter Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update changelogs/fragments/5280-lxc_container-py3.yaml Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update changelogs/fragments/5280-lxc_container-py3.yaml Co-authored-by: Felix Fontein * Update 5280-lxc_container-py3.yaml * Update 5280-lxc_container-py3.yaml Signed-off-by: Kevin Carter Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein --- .../fragments/5280-lxc_container-py3.yaml | 5 +++++ plugins/modules/cloud/lxc/lxc_container.py | 19 +++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5280-lxc_container-py3.yaml diff --git a/changelogs/fragments/5280-lxc_container-py3.yaml b/changelogs/fragments/5280-lxc_container-py3.yaml new file mode 100644 index 0000000000..0a37738122 --- /dev/null +++ b/changelogs/fragments/5280-lxc_container-py3.yaml @@ -0,0 +1,5 @@ +bugfixes: + - lxc_container - the module has been updated to support Python 3 (https://github.com/ansible-collections/community.general/pull/5304). + +deprecated_features: + - lxc_container - the module will no longer make any effort to support Python 2 (https://github.com/ansible-collections/community.general/pull/5304). diff --git a/plugins/modules/cloud/lxc/lxc_container.py b/plugins/modules/cloud/lxc/lxc_container.py index ddcee0c8ea..9eeb0b65d5 100644 --- a/plugins/modules/cloud/lxc/lxc_container.py +++ b/plugins/modules/cloud/lxc/lxc_container.py @@ -164,9 +164,9 @@ options: type: list elements: str requirements: - - 'lxc >= 1.0 # OS package' - - 'python >= 2.6 # OS Package' - - 'lxc-python2 >= 0.1 # PIP Package from https://github.com/lxc/python2-lxc' + - 'lxc >= 2.0 # OS package' + - 'python3 >= 3.5 # OS Package' + - 'python3-lxc # OS Package' notes: - Containers must have a unique name. If you attempt to create a container with a name that already exists in the users namespace the module will @@ -184,10 +184,10 @@ notes: tarball of the running container. The "archive" option supports LVM backed containers and will create a snapshot of the running container when creating the archive. - - If your distro does not have a package for "python2-lxc", which is a + - If your distro does not have a package for C(python3-lxc), which is a requirement for this module, it can be installed from source at - "https://github.com/lxc/python2-lxc" or installed via pip using the package - name lxc-python2. + U(https://github.com/lxc/python3-lxc) or installed via pip using the + package name C(lxc). ''' EXAMPLES = r""" @@ -434,7 +434,6 @@ else: from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE -from ansible.module_utils.six.moves import xrange from ansible.module_utils.common.text.converters import to_text, to_bytes @@ -559,7 +558,7 @@ popd def create_script(command): """Write out a script onto a target. - This method should be backward compatible with Python 2.4+ when executing + This method should be backward compatible with Python when executing from within the container. :param command: command to run, this can be a script and can use spacing @@ -939,7 +938,7 @@ class LxcContainerManagement(object): """ self.container = self.get_container_bind() - for dummy in xrange(timeout): + for dummy in range(timeout): if self._get_state() != 'running': self.container.start() self.state_change = True @@ -992,7 +991,7 @@ class LxcContainerManagement(object): :type timeout: ``int`` """ - for dummy in xrange(timeout): + for dummy in range(timeout): if not self._container_exists(container_name=self.container_name, lxc_path=self.lxc_path): break From 2cac3ae879172c59149637a80c4597b1a2e156de Mon Sep 17 00:00:00 2001 From: bratwurzt Date: Sat, 1 Oct 2022 18:16:47 +0200 Subject: [PATCH 0239/2104] New Module: Keycloak User Rolemapping (#4898) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * keycloak_user_rolemapping: implement user role mapping * keycloak_user_rolemapping: additional logging * keycloak_user_rolemapping: move to getters, use names parameters * keycloak_user_rolemapping: add service account user example * Add keyring and keyring_info modules (#4764) * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: address felixfontein concerns no.1 * keycloak_user_rolemapping: remove rebase mistakes * keycloak_user_rolemapping: address felixfontein concerns no.2 * keycloak_user_rolemapping: refactor duplicate username usage example * keycloak_user_rolemapping: fix sanity check errors no.1 * keycloak_user_rolemapping: fix sanity check errors no.2 * keycloak_user_rolemapping: fix sanity check errors no.3 * keycloak_user_rolemapping: fix sanity check errors no.4 * keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1 * keycloak_user_rolemapping: resolve rebase conflicts with origin/main branch # Conflicts: # plugins/module_utils/identity/keycloak/keycloak.py * keycloak_user_rolemapping: remove keycloak_role_composites from BOTMETA.yml * keycloak_user_rolemapping: fix sanity check errors no.5 * keycloak_user_rolemapping: address felixfontein reviews concerns no.1 * keycloak_user_rolemapping: address felixfontein reviews concerns no.2 Co-authored-by: Dušan Markovič Co-authored-by: ahussey-redhat <93101976+ahussey-redhat@users.noreply.github.com> --- .github/BOTMETA.yml | 2 + meta/runtime.yml | 2 + .../identity/keycloak/keycloak.py | 290 ++++++++++++- .../keycloak/keycloak_client_rolemapping.py | 12 +- .../keycloak/keycloak_user_rolemapping.py | 401 ++++++++++++++++++ .../targets/keycloak_user_rolemapping/aliases | 4 + .../keycloak_user_rolemapping/tasks/main.yml | 143 +++++++ .../keycloak_user_rolemapping/vars/main.yml | 14 + .../test_keycloak_client_rolemapping.py | 138 +++--- 9 files changed, 916 insertions(+), 90 deletions(-) create mode 100644 plugins/modules/identity/keycloak/keycloak_user_rolemapping.py create mode 100644 tests/integration/targets/keycloak_user_rolemapping/aliases create mode 100644 tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml create mode 100644 tests/integration/targets/keycloak_user_rolemapping/vars/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 1e2fc66a19..0d35e1b5fd 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -589,6 +589,8 @@ files: maintainers: Gaetan2907 $modules/identity/keycloak/keycloak_client_rolemapping.py: maintainers: Gaetan2907 + $modules/identity/keycloak/keycloak_user_rolemapping.py: + maintainers: bratwurzt $modules/identity/keycloak/keycloak_group.py: maintainers: adamgoossens $modules/identity/keycloak/keycloak_identity_provider.py: diff --git a/meta/runtime.yml b/meta/runtime.yml index c93f00d760..2685df53a7 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -612,6 +612,8 @@ plugin_routing: redirect: community.general.identity.keycloak.keycloak_role keycloak_user_federation: redirect: community.general.identity.keycloak.keycloak_user_federation + keycloak_user_rolemapping: + redirect: community.general.identity.keycloak.keycloak_user_rolemapping keyring: redirect: community.general.system.keyring keyring_info: diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 1769d6c48f..078925ef71 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -29,8 +29,15 @@ URL_CLIENT_ROLE_COMPOSITES = "{url}/admin/realms/{realm}/clients/{id}/roles/{nam URL_REALM_ROLES = "{url}/admin/realms/{realm}/roles" URL_REALM_ROLE = "{url}/admin/realms/{realm}/roles/{name}" +URL_REALM_ROLEMAPPINGS = "{url}/admin/realms/{realm}/users/{id}/role-mappings/realm" +URL_REALM_ROLEMAPPINGS_AVAILABLE = "{url}/admin/realms/{realm}/users/{id}/role-mappings/realm/available" +URL_REALM_ROLEMAPPINGS_COMPOSITE = "{url}/admin/realms/{realm}/users/{id}/role-mappings/realm/composite" URL_REALM_ROLE_COMPOSITES = "{url}/admin/realms/{realm}/roles/{name}/composites" +URL_ROLES_BY_ID = "{url}/admin/realms/{realm}/roles-by-id/{id}" +URL_ROLES_BY_ID_COMPOSITES_CLIENTS = "{url}/admin/realms/{realm}/roles-by-id/{id}/composites/clients/{cid}" +URL_ROLES_BY_ID_COMPOSITES = "{url}/admin/realms/{realm}/roles-by-id/{id}/composites" + URL_CLIENTTEMPLATE = "{url}/admin/realms/{realm}/client-templates/{id}" URL_CLIENTTEMPLATES = "{url}/admin/realms/{realm}/client-templates" URL_GROUPS = "{url}/admin/realms/{realm}/groups" @@ -41,9 +48,15 @@ URL_CLIENTSCOPE = "{url}/admin/realms/{realm}/client-scopes/{id}" URL_CLIENTSCOPE_PROTOCOLMAPPERS = "{url}/admin/realms/{realm}/client-scopes/{id}/protocol-mappers/models" URL_CLIENTSCOPE_PROTOCOLMAPPER = "{url}/admin/realms/{realm}/client-scopes/{id}/protocol-mappers/models/{mapper_id}" -URL_CLIENT_ROLEMAPPINGS = "{url}/admin/realms/{realm}/groups/{id}/role-mappings/clients/{client}" -URL_CLIENT_ROLEMAPPINGS_AVAILABLE = "{url}/admin/realms/{realm}/groups/{id}/role-mappings/clients/{client}/available" -URL_CLIENT_ROLEMAPPINGS_COMPOSITE = "{url}/admin/realms/{realm}/groups/{id}/role-mappings/clients/{client}/composite" +URL_CLIENT_GROUP_ROLEMAPPINGS = "{url}/admin/realms/{realm}/groups/{id}/role-mappings/clients/{client}" +URL_CLIENT_GROUP_ROLEMAPPINGS_AVAILABLE = "{url}/admin/realms/{realm}/groups/{id}/role-mappings/clients/{client}/available" +URL_CLIENT_GROUP_ROLEMAPPINGS_COMPOSITE = "{url}/admin/realms/{realm}/groups/{id}/role-mappings/clients/{client}/composite" + +URL_USERS = "{url}/admin/realms/{realm}/users" +URL_CLIENT_SERVICE_ACCOUNT_USER = "{url}/admin/realms/{realm}/clients/{id}/service-account-user" +URL_CLIENT_USER_ROLEMAPPINGS = "{url}/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}" +URL_CLIENT_USER_ROLEMAPPINGS_AVAILABLE = "{url}/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}/available" +URL_CLIENT_USER_ROLEMAPPINGS_COMPOSITE = "{url}/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}/composite" URL_AUTHENTICATION_FLOWS = "{url}/admin/realms/{realm}/authentication/flows" URL_AUTHENTICATION_FLOW = "{url}/admin/realms/{realm}/authentication/flows/{id}" @@ -446,10 +459,9 @@ class KeycloakAPI(object): self.module.fail_json(msg="Could not fetch rolemappings for client %s in realm %s: %s" % (cid, realm, str(e))) - def get_client_role_by_name(self, gid, cid, name, realm="master"): + def get_client_role_id_by_name(self, cid, name, realm="master"): """ Get the role ID of a client. - :param gid: ID of the group from which to obtain the rolemappings. :param cid: ID of the client from which to obtain the rolemappings. :param name: Name of the role. :param realm: Realm from which to obtain the rolemappings. @@ -461,7 +473,7 @@ class KeycloakAPI(object): return role['id'] return None - def get_client_rolemapping_by_id(self, gid, cid, rid, realm='master'): + def get_client_group_rolemapping_by_id(self, gid, cid, rid, realm='master'): """ Obtain client representation by id :param gid: ID of the group from which to obtain the rolemappings. @@ -470,7 +482,7 @@ class KeycloakAPI(object): :param realm: client from this realm :return: dict of rolemapping representation or None if none matching exist """ - rolemappings_url = URL_CLIENT_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) + rolemappings_url = URL_CLIENT_GROUP_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: rolemappings = json.loads(to_native(open_url(rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, @@ -483,7 +495,7 @@ class KeycloakAPI(object): % (cid, gid, realm, str(e))) return None - def get_client_available_rolemappings(self, gid, cid, realm="master"): + def get_client_group_available_rolemappings(self, gid, cid, realm="master"): """ Fetch the available role of a client in a specified goup on the Keycloak server. :param gid: ID of the group from which to obtain the rolemappings. @@ -491,7 +503,7 @@ class KeycloakAPI(object): :param realm: Realm from which to obtain the rolemappings. :return: The rollemappings of specified group and client of the realm (default "master"). """ - available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS_AVAILABLE.format(url=self.baseurl, realm=realm, id=gid, client=cid) + available_rolemappings_url = URL_CLIENT_GROUP_ROLEMAPPINGS_AVAILABLE.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: return json.loads(to_native(open_url(available_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, @@ -500,7 +512,7 @@ class KeycloakAPI(object): self.module.fail_json(msg="Could not fetch available rolemappings for client %s in group %s, realm %s: %s" % (cid, gid, realm, str(e))) - def get_client_composite_rolemappings(self, gid, cid, realm="master"): + def get_client_group_composite_rolemappings(self, gid, cid, realm="master"): """ Fetch the composite role of a client in a specified group on the Keycloak server. :param gid: ID of the group from which to obtain the rolemappings. @@ -508,15 +520,64 @@ class KeycloakAPI(object): :param realm: Realm from which to obtain the rolemappings. :return: The rollemappings of specified group and client of the realm (default "master"). """ - available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS_COMPOSITE.format(url=self.baseurl, realm=realm, id=gid, client=cid) + composite_rolemappings_url = URL_CLIENT_GROUP_ROLEMAPPINGS_COMPOSITE.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: - return json.loads(to_native(open_url(available_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + return json.loads(to_native(open_url(composite_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) except Exception as e: self.module.fail_json(msg="Could not fetch available rolemappings for client %s in group %s, realm %s: %s" % (cid, gid, realm, str(e))) + def get_role_by_id(self, rid, realm="master"): + """ Fetch a role by its id on the Keycloak server. + + :param rid: ID of the role. + :param realm: Realm from which to obtain the rolemappings. + :return: The role. + """ + client_roles_url = URL_ROLES_BY_ID.format(url=self.baseurl, realm=realm, id=rid) + try: + return json.loads(to_native(open_url(client_roles_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except Exception as e: + self.module.fail_json(msg="Could not fetch role for id %s in realm %s: %s" + % (rid, realm, str(e))) + + def get_client_roles_by_id_composite_rolemappings(self, rid, cid, realm="master"): + """ Fetch a role by its id on the Keycloak server. + + :param rid: ID of the composite role. + :param cid: ID of the client from which to obtain the rolemappings. + :param realm: Realm from which to obtain the rolemappings. + :return: The role. + """ + client_roles_url = URL_ROLES_BY_ID_COMPOSITES_CLIENTS.format(url=self.baseurl, realm=realm, id=rid, cid=cid) + try: + return json.loads(to_native(open_url(client_roles_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except Exception as e: + self.module.fail_json(msg="Could not fetch role for id %s and cid %s in realm %s: %s" + % (rid, cid, realm, str(e))) + + def add_client_roles_by_id_composite_rolemapping(self, rid, roles_rep, realm="master"): + """ Assign roles to composite role + + :param rid: ID of the composite role. + :param roles_rep: Representation of the roles to assign. + :param realm: Realm from which to obtain the rolemappings. + :return: None. + """ + available_rolemappings_url = URL_ROLES_BY_ID_COMPOSITES.format(url=self.baseurl, realm=realm, id=rid) + try: + open_url(available_rolemappings_url, method="POST", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(roles_rep), + validate_certs=self.validate_certs, timeout=self.connection_timeout) + except Exception as e: + self.module.fail_json(msg="Could not assign roles to composite role %s and realm %s: %s" + % (rid, realm, str(e))) + def add_group_rolemapping(self, gid, cid, role_rep, realm="master"): """ Fetch the composite role of a client in a specified goup on the Keycloak server. @@ -526,7 +587,7 @@ class KeycloakAPI(object): :param realm: Realm from which to obtain the rolemappings. :return: None. """ - available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) + available_rolemappings_url = URL_CLIENT_GROUP_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: open_url(available_rolemappings_url, method="POST", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(role_rep), validate_certs=self.validate_certs, timeout=self.connection_timeout) @@ -543,7 +604,7 @@ class KeycloakAPI(object): :param realm: Realm from which to obtain the rolemappings. :return: None. """ - available_rolemappings_url = URL_CLIENT_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) + available_rolemappings_url = URL_CLIENT_GROUP_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: open_url(available_rolemappings_url, method="DELETE", http_agent=self.http_agent, headers=self.restheaders, validate_certs=self.validate_certs, timeout=self.connection_timeout) @@ -551,6 +612,206 @@ class KeycloakAPI(object): self.module.fail_json(msg="Could not delete available rolemappings for client %s in group %s, realm %s: %s" % (cid, gid, realm, str(e))) + def get_client_user_rolemapping_by_id(self, uid, cid, rid, realm='master'): + """ Obtain client representation by id + + :param uid: ID of the user from which to obtain the rolemappings. + :param cid: ID of the client from which to obtain the rolemappings. + :param rid: ID of the role. + :param realm: client from this realm + :return: dict of rolemapping representation or None if none matching exist + """ + rolemappings_url = URL_CLIENT_USER_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=uid, client=cid) + try: + rolemappings = json.loads(to_native(open_url(rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + for role in rolemappings: + if rid == role['id']: + return role + except Exception as e: + self.module.fail_json(msg="Could not fetch rolemappings for client %s and user %s, realm %s: %s" + % (cid, uid, realm, str(e))) + return None + + def get_client_user_available_rolemappings(self, uid, cid, realm="master"): + """ Fetch the available role of a client for a specified user on the Keycloak server. + + :param uid: ID of the user from which to obtain the rolemappings. + :param cid: ID of the client from which to obtain the rolemappings. + :param realm: Realm from which to obtain the rolemappings. + :return: The effective rollemappings of specified client and user of the realm (default "master"). + """ + available_rolemappings_url = URL_CLIENT_USER_ROLEMAPPINGS_AVAILABLE.format(url=self.baseurl, realm=realm, id=uid, client=cid) + try: + return json.loads(to_native(open_url(available_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except Exception as e: + self.module.fail_json(msg="Could not fetch effective rolemappings for client %s and user %s, realm %s: %s" + % (cid, uid, realm, str(e))) + + def get_client_user_composite_rolemappings(self, uid, cid, realm="master"): + """ Fetch the composite role of a client for a specified user on the Keycloak server. + + :param uid: ID of the user from which to obtain the rolemappings. + :param cid: ID of the client from which to obtain the rolemappings. + :param realm: Realm from which to obtain the rolemappings. + :return: The rollemappings of specified group and client of the realm (default "master"). + """ + composite_rolemappings_url = URL_CLIENT_USER_ROLEMAPPINGS_COMPOSITE.format(url=self.baseurl, realm=realm, id=uid, client=cid) + try: + return json.loads(to_native(open_url(composite_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except Exception as e: + self.module.fail_json(msg="Could not fetch available rolemappings for user %s of realm %s: %s" + % (uid, realm, str(e))) + + def get_realm_user_rolemapping_by_id(self, uid, rid, realm='master'): + """ Obtain role representation by id + + :param uid: ID of the user from which to obtain the rolemappings. + :param rid: ID of the role. + :param realm: client from this realm + :return: dict of rolemapping representation or None if none matching exist + """ + rolemappings_url = URL_REALM_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=uid) + try: + rolemappings = json.loads(to_native(open_url(rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + for role in rolemappings: + if rid == role['id']: + return role + except Exception as e: + self.module.fail_json(msg="Could not fetch rolemappings for user %s, realm %s: %s" + % (uid, realm, str(e))) + return None + + def get_realm_user_available_rolemappings(self, uid, realm="master"): + """ Fetch the available role of a realm for a specified user on the Keycloak server. + + :param uid: ID of the user from which to obtain the rolemappings. + :param realm: Realm from which to obtain the rolemappings. + :return: The rollemappings of specified group and client of the realm (default "master"). + """ + available_rolemappings_url = URL_REALM_ROLEMAPPINGS_AVAILABLE.format(url=self.baseurl, realm=realm, id=uid) + try: + return json.loads(to_native(open_url(available_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except Exception as e: + self.module.fail_json(msg="Could not fetch available rolemappings for user %s of realm %s: %s" + % (uid, realm, str(e))) + + def get_realm_user_composite_rolemappings(self, uid, realm="master"): + """ Fetch the composite role of a realm for a specified user on the Keycloak server. + + :param uid: ID of the user from which to obtain the rolemappings. + :param realm: Realm from which to obtain the rolemappings. + :return: The effective rollemappings of specified client and user of the realm (default "master"). + """ + composite_rolemappings_url = URL_REALM_ROLEMAPPINGS_COMPOSITE.format(url=self.baseurl, realm=realm, id=uid) + try: + return json.loads(to_native(open_url(composite_rolemappings_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, + timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except Exception as e: + self.module.fail_json(msg="Could not fetch effective rolemappings for user %s, realm %s: %s" + % (uid, realm, str(e))) + + def get_user_by_username(self, username, realm="master"): + """ Fetch a keycloak user within a realm based on its username. + + If the user does not exist, None is returned. + :param username: Username of the user to fetch. + :param realm: Realm in which the user resides; default 'master' + """ + users_url = URL_USERS.format(url=self.baseurl, realm=realm) + users_url += '?username=%s&exact=true' % username + try: + return json.loads(to_native(open_url(users_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except ValueError as e: + self.module.fail_json(msg='API returned incorrect JSON when trying to obtain the user for realm %s and username %s: %s' + % (realm, username, str(e))) + except Exception as e: + self.module.fail_json(msg='Could not obtain the user for realm %s and username %s: %s' + % (realm, username, str(e))) + + def get_service_account_user_by_client_id(self, client_id, realm="master"): + """ Fetch a keycloak service account user within a realm based on its client_id. + + If the user does not exist, None is returned. + :param client_id: clientId of the service account user to fetch. + :param realm: Realm in which the user resides; default 'master' + """ + cid = self.get_client_id(client_id, realm=realm) + + service_account_user_url = URL_CLIENT_SERVICE_ACCOUNT_USER.format(url=self.baseurl, realm=realm, id=cid) + try: + return json.loads(to_native(open_url(service_account_user_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + except ValueError as e: + self.module.fail_json(msg='API returned incorrect JSON when trying to obtain the service-account-user for realm %s and client_id %s: %s' + % (realm, client_id, str(e))) + except Exception as e: + self.module.fail_json(msg='Could not obtain the service-account-user for realm %s and client_id %s: %s' + % (realm, client_id, str(e))) + + def add_user_rolemapping(self, uid, cid, role_rep, realm="master"): + """ Assign a realm or client role to a specified user on the Keycloak server. + + :param uid: ID of the user roles are assigned to. + :param cid: ID of the client from which to obtain the rolemappings. If empty, roles are from the realm + :param role_rep: Representation of the role to assign. + :param realm: Realm from which to obtain the rolemappings. + :return: None. + """ + if cid is None: + user_realm_rolemappings_url = URL_REALM_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=uid) + try: + open_url(user_realm_rolemappings_url, method="POST", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(role_rep), + validate_certs=self.validate_certs, timeout=self.connection_timeout) + except Exception as e: + self.module.fail_json(msg="Could not map roles to userId %s for realm %s and roles %s: %s" + % (uid, realm, json.dumps(role_rep), str(e))) + else: + user_client_rolemappings_url = URL_CLIENT_USER_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=uid, client=cid) + try: + open_url(user_client_rolemappings_url, method="POST", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(role_rep), + validate_certs=self.validate_certs, timeout=self.connection_timeout) + except Exception as e: + self.module.fail_json(msg="Could not map roles to userId %s for client %s, realm %s and roles %s: %s" + % (cid, uid, realm, json.dumps(role_rep), str(e))) + + def delete_user_rolemapping(self, uid, cid, role_rep, realm="master"): + """ Delete the rolemapping of a client in a specified user on the Keycloak server. + + :param uid: ID of the user from which to remove the rolemappings. + :param cid: ID of the client from which to remove the rolemappings. + :param role_rep: Representation of the role to remove from rolemappings. + :param realm: Realm from which to remove the rolemappings. + :return: None. + """ + if cid is None: + user_realm_rolemappings_url = URL_REALM_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=uid) + try: + open_url(user_realm_rolemappings_url, method="DELETE", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(role_rep), + validate_certs=self.validate_certs, timeout=self.connection_timeout) + except Exception as e: + self.module.fail_json(msg="Could not remove roles %s from userId %s, realm %s: %s" + % (json.dumps(role_rep), uid, realm, str(e))) + else: + user_client_rolemappings_url = URL_CLIENT_USER_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=uid, client=cid) + try: + open_url(user_client_rolemappings_url, method="DELETE", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(role_rep), + validate_certs=self.validate_certs, timeout=self.connection_timeout) + except Exception as e: + self.module.fail_json(msg="Could not remove roles %s for client %s from userId %s, realm %s: %s" + % (json.dumps(role_rep), cid, uid, realm, str(e))) + def get_client_templates(self, realm='master'): """ Obtains client template representations for client templates in a realm @@ -930,7 +1191,6 @@ class KeycloakAPI(object): return json.loads(to_native(open_url(groups_url, method="GET", http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, validate_certs=self.validate_certs).read())) - except HTTPError as e: if e.code == 404: return None diff --git a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py index c4dde9bee1..4f1f9b0d0f 100644 --- a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py +++ b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py @@ -279,20 +279,20 @@ def main(): module.fail_json(msg='Either the `name` or `id` has to be specified on each role.') # Fetch missing role_id if role['id'] is None: - role_id = kc.get_client_role_by_name(gid, cid, role['name'], realm=realm) + role_id = kc.get_client_role_id_by_name(cid, role['name'], realm=realm) if role_id is not None: role['id'] = role_id else: module.fail_json(msg='Could not fetch role %s:' % (role['name'])) # Fetch missing role_name else: - role['name'] = kc.get_client_rolemapping_by_id(gid, cid, role['id'], realm=realm)['name'] + role['name'] = kc.get_client_group_rolemapping_by_id(gid, cid, role['id'], realm=realm)['name'] if role['name'] is None: module.fail_json(msg='Could not fetch role %s' % (role['id'])) # Get effective client-level role mappings - available_roles_before = kc.get_client_available_rolemappings(gid, cid, realm=realm) - assigned_roles_before = kc.get_client_composite_rolemappings(gid, cid, realm=realm) + available_roles_before = kc.get_client_group_available_rolemappings(gid, cid, realm=realm) + assigned_roles_before = kc.get_client_group_composite_rolemappings(gid, cid, realm=realm) result['existing'] = assigned_roles_before result['proposed'] = roles @@ -326,7 +326,7 @@ def main(): module.exit_json(**result) kc.add_group_rolemapping(gid, cid, update_roles, realm=realm) result['msg'] = 'Roles %s assigned to group %s.' % (update_roles, group_name) - assigned_roles_after = kc.get_client_composite_rolemappings(gid, cid, realm=realm) + assigned_roles_after = kc.get_client_group_composite_rolemappings(gid, cid, realm=realm) result['end_state'] = assigned_roles_after module.exit_json(**result) else: @@ -338,7 +338,7 @@ def main(): module.exit_json(**result) kc.delete_group_rolemapping(gid, cid, update_roles, realm=realm) result['msg'] = 'Roles %s removed from group %s.' % (update_roles, group_name) - assigned_roles_after = kc.get_client_composite_rolemappings(gid, cid, realm=realm) + assigned_roles_after = kc.get_client_group_composite_rolemappings(gid, cid, realm=realm) result['end_state'] = assigned_roles_after module.exit_json(**result) # Do nothing diff --git a/plugins/modules/identity/keycloak/keycloak_user_rolemapping.py b/plugins/modules/identity/keycloak/keycloak_user_rolemapping.py new file mode 100644 index 0000000000..72d403c637 --- /dev/null +++ b/plugins/modules/identity/keycloak/keycloak_user_rolemapping.py @@ -0,0 +1,401 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022, Dušan Marković (@bratwurzt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: keycloak_user_rolemapping + +short_description: Allows administration of Keycloak user_rolemapping with the Keycloak API + +version_added: 5.7.0 + +description: + - This module allows you to add, remove or modify Keycloak user_rolemapping with the Keycloak REST API. + It requires access to the REST API via OpenID Connect; the user connecting and the client being + used must have the requisite access rights. In a default Keycloak installation, admin-cli + and an admin user would work, as would a separate client definition with the scope tailored + to your needs and a user having the expected roles. + + - The names of module options are snake_cased versions of the camelCase ones found in the + Keycloak API and its documentation at U(https://www.keycloak.org/docs-api/8.0/rest-api/index.html). + + - Attributes are multi-valued in the Keycloak API. All attributes are lists of individual values and will + be returned that way by this module. You may pass single values for attributes when calling the module, + and this will be translated into a list suitable for the API. + + - When updating a user_rolemapping, where possible provide the role ID to the module. This removes a lookup + to the API to translate the name into the role ID. + + +options: + state: + description: + - State of the user_rolemapping. + - On C(present), the user_rolemapping will be created if it does not yet exist, or updated with the parameters you provide. + - On C(absent), the user_rolemapping will be removed if it exists. + default: 'present' + type: str + choices: + - present + - absent + + realm: + type: str + description: + - They Keycloak realm under which this role_representation resides. + default: 'master' + + target_username: + type: str + description: + - Username of the user roles are mapped to. + - This parameter is not required (can be replaced by uid for less API call). + + uid: + type: str + description: + - ID of the user to be mapped. + - This parameter is not required for updating or deleting the rolemapping but + providing it will reduce the number of API calls required. + + service_account_user_client_id: + type: str + description: + - Client ID of the service-account-user to be mapped. + - This parameter is not required for updating or deleting the rolemapping but + providing it will reduce the number of API calls required. + + client_id: + type: str + description: + - Name of the client to be mapped (different than I(cid)). + - This parameter is required if I(cid) is not provided (can be replaced by I(cid) + to reduce the number of API calls that must be made). + + cid: + type: str + description: + - ID of the client to be mapped. + - This parameter is not required for updating or deleting the rolemapping but + providing it will reduce the number of API calls required. + + roles: + description: + - Roles to be mapped to the user. + type: list + elements: dict + suboptions: + name: + type: str + description: + - Name of the role representation. + - This parameter is required only when creating or updating the role_representation. + id: + type: str + description: + - The unique identifier for this role_representation. + - This parameter is not required for updating or deleting a role_representation but + providing it will reduce the number of API calls required. + +extends_documentation_fragment: +- community.general.keycloak + + +author: + - Dušan Marković (@bratwurzt) +''' + +EXAMPLES = ''' +- name: Map a client role to a user, authentication with credentials + community.general.keycloak_user_rolemapping: + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + state: present + client_id: client1 + user_id: user1Id + roles: + - name: role_name1 + id: role_id1 + - name: role_name2 + id: role_id2 + delegate_to: localhost + +- name: Map a client role to a service account user for a client, authentication with credentials + community.general.keycloak_user_rolemapping: + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + state: present + client_id: client1 + service_account_user_client_id: clientIdOfServiceAccount + roles: + - name: role_name1 + id: role_id1 + - name: role_name2 + id: role_id2 + delegate_to: localhost + +- name: Map a client role to a user, authentication with token + community.general.keycloak_user_rolemapping: + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + token: TOKEN + state: present + client_id: client1 + target_username: user1 + roles: + - name: role_name1 + id: role_id1 + - name: role_name2 + id: role_id2 + delegate_to: localhost + +- name: Unmap client role from a user + community.general.keycloak_user_rolemapping: + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + state: absent + client_id: client1 + uid: 70e3ae72-96b6-11e6-9056-9737fd4d0764 + roles: + - name: role_name1 + id: role_id1 + - name: role_name2 + id: role_id2 + delegate_to: localhost +''' + +RETURN = ''' +msg: + description: Message as to what action was taken. + returned: always + type: str + sample: "Role role1 assigned to user user1." + +proposed: + description: Representation of proposed client role mapping. + returned: always + type: dict + sample: { + clientId: "test" + } + +existing: + description: + - Representation of existing client role mapping. + - The sample is truncated. + returned: always + type: dict + sample: { + "adminUrl": "http://www.example.com/admin_url", + "attributes": { + "request.object.signature.alg": "RS256", + } + } + +end_state: + description: + - Representation of client role mapping after module execution. + - The sample is truncated. + returned: on success + type: dict + sample: { + "adminUrl": "http://www.example.com/admin_url", + "attributes": { + "request.object.signature.alg": "RS256", + } + } +''' + +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ + keycloak_argument_spec, get_token, KeycloakError, is_struct_included +from ansible.module_utils.basic import AnsibleModule + + +def main(): + """ + Module execution + + :return: + """ + argument_spec = keycloak_argument_spec() + + roles_spec = dict( + name=dict(type='str'), + id=dict(type='str'), + ) + + meta_args = dict( + state=dict(default='present', choices=['present', 'absent']), + realm=dict(default='master'), + uid=dict(type='str'), + target_username=dict(type='str'), + service_account_user_client_id=dict(type='str'), + cid=dict(type='str'), + client_id=dict(type='str'), + roles=dict(type='list', elements='dict', options=roles_spec), + ) + + argument_spec.update(meta_args) + + module = AnsibleModule(argument_spec=argument_spec, + supports_check_mode=True, + required_one_of=([['token', 'auth_realm', 'auth_username', 'auth_password'], + ['uid', 'target_username', 'service_account_user_client_id']]), + required_together=([['auth_realm', 'auth_username', 'auth_password']])) + + result = dict(changed=False, msg='', diff={}, proposed={}, existing={}, end_state={}) + + # Obtain access token, initialize API + try: + connection_header = get_token(module.params) + except KeycloakError as e: + module.fail_json(msg=str(e)) + + kc = KeycloakAPI(module, connection_header) + + realm = module.params.get('realm') + state = module.params.get('state') + cid = module.params.get('cid') + client_id = module.params.get('client_id') + uid = module.params.get('uid') + target_username = module.params.get('target_username') + service_account_user_client_id = module.params.get('service_account_user_client_id') + roles = module.params.get('roles') + + # Check the parameters + if uid is None and target_username is None and service_account_user_client_id is None: + module.fail_json(msg='Either the `target_username`, `uid` or `service_account_user_client_id` has to be specified.') + + # Get the potential missing parameters + if uid is None and service_account_user_client_id is None: + user_rep = kc.get_user_by_username(username=target_username, realm=realm) + if user_rep is not None: + uid = user_rep.get('id') + else: + module.fail_json(msg='Could not fetch user for username %s:' % target_username) + else: + if uid is None and target_username is None: + user_rep = kc.get_service_account_user_by_client_id(client_id=service_account_user_client_id, realm=realm) + if user_rep is not None: + uid = user_rep['id'] + else: + module.fail_json(msg='Could not fetch service-account-user for client_id %s:' % target_username) + + if cid is None and client_id is not None: + cid = kc.get_client_id(client_id=client_id, realm=realm) + if cid is None: + module.fail_json(msg='Could not fetch client %s:' % client_id) + if roles is None: + module.exit_json(msg="Nothing to do (no roles specified).") + else: + for role_index, role in enumerate(roles, start=0): + if role.get('name') is None and role.get('id') is None: + module.fail_json(msg='Either the `name` or `id` has to be specified on each role.') + # Fetch missing role_id + if role.get('id') is None: + if cid is None: + role_id = kc.get_realm_role(name=role.get('name'), realm=realm)['id'] + else: + role_id = kc.get_client_role_id_by_name(cid=cid, name=role.get('name'), realm=realm) + if role_id is not None: + role['id'] = role_id + else: + module.fail_json(msg='Could not fetch role %s for client_id %s or realm %s' % (role.get('name'), client_id, realm)) + # Fetch missing role_name + else: + if cid is None: + role['name'] = kc.get_realm_user_rolemapping_by_id(uid=uid, rid=role.get('id'), realm=realm)['name'] + else: + role['name'] = kc.get_client_user_rolemapping_by_id(uid=uid, cid=cid, rid=role.get('id'), realm=realm)['name'] + if role.get('name') is None: + module.fail_json(msg='Could not fetch role %s for client_id %s or realm %s' % (role.get('id'), client_id, realm)) + + # Get effective role mappings + if cid is None: + available_roles_before = kc.get_realm_user_available_rolemappings(uid=uid, realm=realm) + assigned_roles_before = kc.get_realm_user_composite_rolemappings(uid=uid, realm=realm) + else: + available_roles_before = kc.get_client_user_available_rolemappings(uid=uid, cid=cid, realm=realm) + assigned_roles_before = kc.get_client_user_composite_rolemappings(uid=uid, cid=cid, realm=realm) + + result['existing'] = assigned_roles_before + result['proposed'] = roles + + update_roles = [] + for role_index, role in enumerate(roles, start=0): + # Fetch roles to assign if state present + if state == 'present': + for available_role in available_roles_before: + if role.get('name') == available_role.get('name'): + update_roles.append({ + 'id': role.get('id'), + 'name': role.get('name'), + }) + # Fetch roles to remove if state absent + else: + for assigned_role in assigned_roles_before: + if role.get('name') == assigned_role.get('name'): + update_roles.append({ + 'id': role.get('id'), + 'name': role.get('name'), + }) + + if len(update_roles): + if state == 'present': + # Assign roles + result['changed'] = True + if module._diff: + result['diff'] = dict(before=assigned_roles_before, after=update_roles) + if module.check_mode: + module.exit_json(**result) + kc.add_user_rolemapping(uid=uid, cid=cid, role_rep=update_roles, realm=realm) + result['msg'] = 'Roles %s assigned to userId %s.' % (update_roles, uid) + if cid is None: + assigned_roles_after = kc.get_realm_user_composite_rolemappings(uid=uid, realm=realm) + else: + assigned_roles_after = kc.get_client_user_composite_rolemappings(uid=uid, cid=cid, realm=realm) + result['end_state'] = assigned_roles_after + module.exit_json(**result) + else: + # Remove mapping of role + result['changed'] = True + if module._diff: + result['diff'] = dict(before=assigned_roles_before, after=update_roles) + if module.check_mode: + module.exit_json(**result) + kc.delete_user_rolemapping(uid=uid, cid=cid, role_rep=update_roles, realm=realm) + result['msg'] = 'Roles %s removed from userId %s.' % (update_roles, uid) + if cid is None: + assigned_roles_after = kc.get_realm_user_composite_rolemappings(uid=uid, realm=realm) + else: + assigned_roles_after = kc.get_client_user_composite_rolemappings(uid=uid, cid=cid, realm=realm) + result['end_state'] = assigned_roles_after + module.exit_json(**result) + # Do nothing + else: + result['changed'] = False + result['msg'] = 'Nothing to do, roles %s are correctly mapped to user for username %s.' % (roles, target_username) + module.exit_json(**result) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/keycloak_user_rolemapping/aliases b/tests/integration/targets/keycloak_user_rolemapping/aliases new file mode 100644 index 0000000000..cdeae1417a --- /dev/null +++ b/tests/integration/targets/keycloak_user_rolemapping/aliases @@ -0,0 +1,4 @@ +# Copyright (c) 2022, Dušan Marković (@bratwurzt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +unsupported diff --git a/tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml b/tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml new file mode 100644 index 0000000000..e4625cb06e --- /dev/null +++ b/tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml @@ -0,0 +1,143 @@ +# Copyright (c) 2022, Dušan Marković (@bratwurzt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create realm + community.general.keycloak_realm: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + id: "{{ realm }}" + realm: "{{ realm }}" + state: present + +- name: Create client + community.general.keycloak_client: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + service_accounts_enabled: True + state: present + register: client + +- name: Create new realm role + community.general.keycloak_role: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: "{{ role }}" + description: "{{ description_1 }}" + state: present + +- name: Map a realm role to client service account + vars: + - roles: [ {'name': '{{ role }}'} ] + community.general.keycloak_user_rolemapping: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + service_account_user_client_id: "{{ client_id }}" + roles: "{{ roles }}" + state: present + register: result + +- name: Assert realm role is assigned + assert: + that: + - result is changed + - result.end_state | selectattr("clientRole", "eq", false) | selectattr("name", "eq", "{{role}}") | list | count > 0 + +- name: Unmap a realm role from client service account + vars: + - roles: [ {'name': '{{ role }}'} ] + community.general.keycloak_user_rolemapping: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + service_account_user_client_id: "{{ client_id }}" + roles: "{{ roles }}" + state: absent + register: result + +- name: Assert realm role is unassigned + assert: + that: + - result is changed + - (result.end_state | length) == (result.existing | length) - 1 + - result.existing | selectattr("clientRole", "eq", false) | selectattr("name", "eq", "{{role}}") | list | count > 0 + - result.end_state | selectattr("clientRole", "eq", false) | selectattr("name", "eq", "{{role}}") | list | count == 0 + +- name: Delete existing realm role + community.general.keycloak_role: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: "{{ role }}" + state: absent + +- name: Create new client role + community.general.keycloak_role: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + name: "{{ role }}" + description: "{{ description_1 }}" + state: present + +- name: Map a client role to client service account + vars: + - roles: [ {'name': '{{ role }}'} ] + community.general.keycloak_user_rolemapping: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + service_account_user_client_id: "{{ client_id }}" + roles: "{{ roles }}" + state: present + register: result + +- name: Assert client role is assigned + assert: + that: + - result is changed + - result.end_state | selectattr("clientRole", "eq", true) | selectattr("name", "eq", "{{role}}") | list | count > 0 + +- name: Unmap a client role from client service account + vars: + - roles: [ {'name': '{{ role }}'} ] + community.general.keycloak_user_rolemapping: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + service_account_user_client_id: "{{ client_id }}" + roles: "{{ roles }}" + state: absent + register: result + +- name: Assert client role is unassigned + assert: + that: + - result is changed + - result.end_state == [] + - result.existing | selectattr("clientRole", "eq", true) | selectattr("name", "eq", "{{role}}") | list | count > 0 diff --git a/tests/integration/targets/keycloak_user_rolemapping/vars/main.yml b/tests/integration/targets/keycloak_user_rolemapping/vars/main.yml new file mode 100644 index 0000000000..385dbea44a --- /dev/null +++ b/tests/integration/targets/keycloak_user_rolemapping/vars/main.yml @@ -0,0 +1,14 @@ +--- +# Copyright (c) 2022, Dušan Marković (@bratwurzt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +url: http://localhost:8080/auth +admin_realm: master +admin_user: admin +admin_password: password +realm: myrealm +client_id: myclient +role: myrole +description_1: desc 1 +description_2: desc 2 diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py index d3a3516660..72fc7850d5 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py +++ b/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py @@ -21,9 +21,9 @@ from ansible.module_utils.six import StringIO @contextmanager -def patch_keycloak_api(get_group_by_name=None, get_client_id=None, get_client_role_by_name=None, - get_client_rolemapping_by_id=None, get_client_available_rolemappings=None, - get_client_composite_rolemappings=None, add_group_rolemapping=None, +def patch_keycloak_api(get_group_by_name=None, get_client_id=None, get_client_role_id_by_name=None, + get_client_group_rolemapping_by_id=None, get_client_group_available_rolemappings=None, + get_client_group_composite_rolemappings=None, add_group_rolemapping=None, delete_group_rolemapping=None): """Mock context manager for patching the methods in PwPolicyIPAClient that contact the IPA server @@ -44,21 +44,21 @@ def patch_keycloak_api(get_group_by_name=None, get_client_id=None, get_client_ro side_effect=get_group_by_name) as mock_get_group_by_name: with patch.object(obj, 'get_client_id', side_effect=get_client_id) as mock_get_client_id: - with patch.object(obj, 'get_client_role_by_name', - side_effect=get_client_role_by_name) as mock_get_client_role_by_name: - with patch.object(obj, 'get_client_rolemapping_by_id', - side_effect=get_client_rolemapping_by_id) as mock_get_client_rolemapping_by_id: - with patch.object(obj, 'get_client_available_rolemappings', - side_effect=get_client_available_rolemappings) as mock_get_client_available_rolemappings: - with patch.object(obj, 'get_client_composite_rolemappings', - side_effect=get_client_composite_rolemappings) as mock_get_client_composite_rolemappings: + with patch.object(obj, 'get_client_role_id_by_name', + side_effect=get_client_role_id_by_name) as mock_get_client_role_id_by_name: + with patch.object(obj, 'get_client_group_rolemapping_by_id', + side_effect=get_client_group_rolemapping_by_id) as mock_get_client_group_rolemapping_by_id: + with patch.object(obj, 'get_client_group_available_rolemappings', + side_effect=get_client_group_available_rolemappings) as mock_get_client_group_available_rolemappings: + with patch.object(obj, 'get_client_group_composite_rolemappings', + side_effect=get_client_group_composite_rolemappings) as mock_get_client_group_composite_rolemappings: with patch.object(obj, 'add_group_rolemapping', side_effect=add_group_rolemapping) as mock_add_group_rolemapping: with patch.object(obj, 'delete_group_rolemapping', side_effect=delete_group_rolemapping) as mock_delete_group_rolemapping: - yield mock_get_group_by_name, mock_get_client_id, mock_get_client_role_by_name, mock_add_group_rolemapping, \ - mock_get_client_rolemapping_by_id, mock_get_client_available_rolemappings, mock_get_client_composite_rolemappings, \ - mock_delete_group_rolemapping + yield mock_get_group_by_name, mock_get_client_id, mock_get_client_role_id_by_name, mock_add_group_rolemapping, \ + mock_get_client_group_rolemapping_by_id, mock_get_client_group_available_rolemappings, \ + mock_get_client_group_composite_rolemappings, mock_delete_group_rolemapping def get_response(object_with_future_response, method, get_id_call_count): @@ -144,8 +144,8 @@ class TestKeycloakRealm(ModuleTestCase): "subGroups": "[]" }] return_value_get_client_id = "c0f8490c-b224-4737-a567-20223e4c1727" - return_value_get_client_role_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" - return_value_get_client_available_rolemappings = [[ + return_value_get_client_role_id_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" + return_value_get_client_group_available_rolemappings = [[ { "clientRole": "true", "composite": "false", @@ -161,7 +161,7 @@ class TestKeycloakRealm(ModuleTestCase): "name": "test_role1" } ]] - return_value_get_client_composite_rolemappings = [ + return_value_get_client_group_composite_rolemappings = [ None, [ { @@ -189,11 +189,11 @@ class TestKeycloakRealm(ModuleTestCase): with mock_good_connection(): with patch_keycloak_api(get_group_by_name=return_value_get_group_by_name, get_client_id=return_value_get_client_id, - get_client_role_by_name=return_value_get_client_role_by_name, - get_client_available_rolemappings=return_value_get_client_available_rolemappings, - get_client_composite_rolemappings=return_value_get_client_composite_rolemappings) \ - as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_by_name, mock_add_group_rolemapping, - mock_get_client_rolemapping_by_id, mock_get_client_available_rolemappings, mock_get_client_composite_rolemappings, + get_client_role_id_by_name=return_value_get_client_role_id_by_name, + get_client_group_available_rolemappings=return_value_get_client_group_available_rolemappings, + get_client_group_composite_rolemappings=return_value_get_client_group_composite_rolemappings) \ + as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_id_by_name, mock_add_group_rolemapping, + mock_get_client_group_rolemapping_by_id, mock_get_client_group_available_rolemappings, mock_get_client_group_composite_rolemappings, mock_delete_group_rolemapping): with self.assertRaises(AnsibleExitJson) as exec_info: self.module.main() @@ -201,9 +201,9 @@ class TestKeycloakRealm(ModuleTestCase): self.assertEqual(mock_get_group_by_name.call_count, 1) self.assertEqual(mock_get_client_id.call_count, 1) self.assertEqual(mock_add_group_rolemapping.call_count, 1) - self.assertEqual(mock_get_client_rolemapping_by_id.call_count, 0) - self.assertEqual(mock_get_client_available_rolemappings.call_count, 1) - self.assertEqual(mock_get_client_composite_rolemappings.call_count, 2) + self.assertEqual(mock_get_client_group_rolemapping_by_id.call_count, 0) + self.assertEqual(mock_get_client_group_available_rolemappings.call_count, 1) + self.assertEqual(mock_get_client_group_composite_rolemappings.call_count, 2) self.assertEqual(mock_delete_group_rolemapping.call_count, 0) # Verify that the module's changed status matches what is expected @@ -246,9 +246,9 @@ class TestKeycloakRealm(ModuleTestCase): "subGroups": "[]" }] return_value_get_client_id = "c0f8490c-b224-4737-a567-20223e4c1727" - return_value_get_client_role_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" - return_value_get_client_available_rolemappings = [[]] - return_value_get_client_composite_rolemappings = [[ + return_value_get_client_role_id_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" + return_value_get_client_group_available_rolemappings = [[]] + return_value_get_client_group_composite_rolemappings = [[ { "clientRole": "true", "composite": "false", @@ -273,11 +273,11 @@ class TestKeycloakRealm(ModuleTestCase): with mock_good_connection(): with patch_keycloak_api(get_group_by_name=return_value_get_group_by_name, get_client_id=return_value_get_client_id, - get_client_role_by_name=return_value_get_client_role_by_name, - get_client_available_rolemappings=return_value_get_client_available_rolemappings, - get_client_composite_rolemappings=return_value_get_client_composite_rolemappings) \ - as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_by_name, mock_add_group_rolemapping, - mock_get_client_rolemapping_by_id, mock_get_client_available_rolemappings, mock_get_client_composite_rolemappings, + get_client_role_id_by_name=return_value_get_client_role_id_by_name, + get_client_group_available_rolemappings=return_value_get_client_group_available_rolemappings, + get_client_group_composite_rolemappings=return_value_get_client_group_composite_rolemappings) \ + as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_id_by_name, mock_add_group_rolemapping, + mock_get_client_group_rolemapping_by_id, mock_get_client_group_available_rolemappings, mock_get_client_group_composite_rolemappings, mock_delete_group_rolemapping): with self.assertRaises(AnsibleExitJson) as exec_info: self.module.main() @@ -285,9 +285,9 @@ class TestKeycloakRealm(ModuleTestCase): self.assertEqual(mock_get_group_by_name.call_count, 1) self.assertEqual(mock_get_client_id.call_count, 1) self.assertEqual(mock_add_group_rolemapping.call_count, 0) - self.assertEqual(mock_get_client_rolemapping_by_id.call_count, 0) - self.assertEqual(mock_get_client_available_rolemappings.call_count, 1) - self.assertEqual(mock_get_client_composite_rolemappings.call_count, 1) + self.assertEqual(mock_get_client_group_rolemapping_by_id.call_count, 0) + self.assertEqual(mock_get_client_group_available_rolemappings.call_count, 1) + self.assertEqual(mock_get_client_group_composite_rolemappings.call_count, 1) self.assertEqual(mock_delete_group_rolemapping.call_count, 0) # Verify that the module's changed status matches what is expected @@ -330,8 +330,8 @@ class TestKeycloakRealm(ModuleTestCase): "subGroups": "[]" }] return_value_get_client_id = "c0f8490c-b224-4737-a567-20223e4c1727" - return_value_get_client_role_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" - return_value_get_client_available_rolemappings = [[ + return_value_get_client_role_id_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" + return_value_get_client_group_available_rolemappings = [[ { "clientRole": "true", "composite": "false", @@ -347,7 +347,7 @@ class TestKeycloakRealm(ModuleTestCase): "name": "test_role1" } ]] - return_value_get_client_composite_rolemappings = [ + return_value_get_client_group_composite_rolemappings = [ None, [ { @@ -375,11 +375,11 @@ class TestKeycloakRealm(ModuleTestCase): with mock_good_connection(): with patch_keycloak_api(get_group_by_name=return_value_get_group_by_name, get_client_id=return_value_get_client_id, - get_client_role_by_name=return_value_get_client_role_by_name, - get_client_available_rolemappings=return_value_get_client_available_rolemappings, - get_client_composite_rolemappings=return_value_get_client_composite_rolemappings) \ - as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_by_name, mock_add_group_rolemapping, - mock_get_client_rolemapping_by_id, mock_get_client_available_rolemappings, mock_get_client_composite_rolemappings, + get_client_role_id_by_name=return_value_get_client_role_id_by_name, + get_client_group_available_rolemappings=return_value_get_client_group_available_rolemappings, + get_client_group_composite_rolemappings=return_value_get_client_group_composite_rolemappings) \ + as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_id_by_name, mock_add_group_rolemapping, + mock_get_client_group_rolemapping_by_id, mock_get_client_group_available_rolemappings, mock_get_client_group_composite_rolemappings, mock_delete_group_rolemapping): with self.assertRaises(AnsibleExitJson) as exec_info: self.module.main() @@ -387,9 +387,9 @@ class TestKeycloakRealm(ModuleTestCase): self.assertEqual(mock_get_group_by_name.call_count, 0) self.assertEqual(mock_get_client_id.call_count, 0) self.assertEqual(mock_add_group_rolemapping.call_count, 1) - self.assertEqual(mock_get_client_rolemapping_by_id.call_count, 0) - self.assertEqual(mock_get_client_available_rolemappings.call_count, 1) - self.assertEqual(mock_get_client_composite_rolemappings.call_count, 2) + self.assertEqual(mock_get_client_group_rolemapping_by_id.call_count, 0) + self.assertEqual(mock_get_client_group_available_rolemappings.call_count, 1) + self.assertEqual(mock_get_client_group_composite_rolemappings.call_count, 2) self.assertEqual(mock_delete_group_rolemapping.call_count, 0) # Verify that the module's changed status matches what is expected @@ -432,9 +432,9 @@ class TestKeycloakRealm(ModuleTestCase): "subGroups": "[]" }] return_value_get_client_id = "c0f8490c-b224-4737-a567-20223e4c1727" - return_value_get_client_role_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" - return_value_get_client_available_rolemappings = [[]] - return_value_get_client_composite_rolemappings = [ + return_value_get_client_role_id_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" + return_value_get_client_group_available_rolemappings = [[]] + return_value_get_client_group_composite_rolemappings = [ [ { "clientRole": "true", @@ -462,11 +462,11 @@ class TestKeycloakRealm(ModuleTestCase): with mock_good_connection(): with patch_keycloak_api(get_group_by_name=return_value_get_group_by_name, get_client_id=return_value_get_client_id, - get_client_role_by_name=return_value_get_client_role_by_name, - get_client_available_rolemappings=return_value_get_client_available_rolemappings, - get_client_composite_rolemappings=return_value_get_client_composite_rolemappings) \ - as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_by_name, mock_add_group_rolemapping, - mock_get_client_rolemapping_by_id, mock_get_client_available_rolemappings, mock_get_client_composite_rolemappings, + get_client_role_id_by_name=return_value_get_client_role_id_by_name, + get_client_group_available_rolemappings=return_value_get_client_group_available_rolemappings, + get_client_group_composite_rolemappings=return_value_get_client_group_composite_rolemappings) \ + as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_id_by_name, mock_add_group_rolemapping, + mock_get_client_group_rolemapping_by_id, mock_get_client_group_available_rolemappings, mock_get_client_group_composite_rolemappings, mock_delete_group_rolemapping): with self.assertRaises(AnsibleExitJson) as exec_info: self.module.main() @@ -474,9 +474,9 @@ class TestKeycloakRealm(ModuleTestCase): self.assertEqual(mock_get_group_by_name.call_count, 1) self.assertEqual(mock_get_client_id.call_count, 1) self.assertEqual(mock_add_group_rolemapping.call_count, 0) - self.assertEqual(mock_get_client_rolemapping_by_id.call_count, 0) - self.assertEqual(mock_get_client_available_rolemappings.call_count, 1) - self.assertEqual(mock_get_client_composite_rolemappings.call_count, 2) + self.assertEqual(mock_get_client_group_rolemapping_by_id.call_count, 0) + self.assertEqual(mock_get_client_group_available_rolemappings.call_count, 1) + self.assertEqual(mock_get_client_group_composite_rolemappings.call_count, 2) self.assertEqual(mock_delete_group_rolemapping.call_count, 1) # Verify that the module's changed status matches what is expected @@ -519,8 +519,8 @@ class TestKeycloakRealm(ModuleTestCase): "subGroups": "[]" }] return_value_get_client_id = "c0f8490c-b224-4737-a567-20223e4c1727" - return_value_get_client_role_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" - return_value_get_client_available_rolemappings = [ + return_value_get_client_role_id_by_name = "e91af074-cfd5-40ee-8ef5-ae0ae1ce69fe" + return_value_get_client_group_available_rolemappings = [ [ { "clientRole": "true", @@ -538,7 +538,7 @@ class TestKeycloakRealm(ModuleTestCase): } ] ] - return_value_get_client_composite_rolemappings = [[]] + return_value_get_client_group_composite_rolemappings = [[]] changed = False @@ -548,11 +548,11 @@ class TestKeycloakRealm(ModuleTestCase): with mock_good_connection(): with patch_keycloak_api(get_group_by_name=return_value_get_group_by_name, get_client_id=return_value_get_client_id, - get_client_role_by_name=return_value_get_client_role_by_name, - get_client_available_rolemappings=return_value_get_client_available_rolemappings, - get_client_composite_rolemappings=return_value_get_client_composite_rolemappings) \ - as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_by_name, mock_add_group_rolemapping, - mock_get_client_rolemapping_by_id, mock_get_client_available_rolemappings, mock_get_client_composite_rolemappings, + get_client_role_id_by_name=return_value_get_client_role_id_by_name, + get_client_group_available_rolemappings=return_value_get_client_group_available_rolemappings, + get_client_group_composite_rolemappings=return_value_get_client_group_composite_rolemappings) \ + as (mock_get_group_by_name, mock_get_client_id, mock_get_client_role_id_by_name, mock_add_group_rolemapping, + mock_get_client_group_rolemapping_by_id, mock_get_client_group_available_rolemappings, mock_get_client_group_composite_rolemappings, mock_delete_group_rolemapping): with self.assertRaises(AnsibleExitJson) as exec_info: self.module.main() @@ -560,9 +560,9 @@ class TestKeycloakRealm(ModuleTestCase): self.assertEqual(mock_get_group_by_name.call_count, 1) self.assertEqual(mock_get_client_id.call_count, 1) self.assertEqual(mock_add_group_rolemapping.call_count, 0) - self.assertEqual(mock_get_client_rolemapping_by_id.call_count, 0) - self.assertEqual(mock_get_client_available_rolemappings.call_count, 1) - self.assertEqual(mock_get_client_composite_rolemappings.call_count, 1) + self.assertEqual(mock_get_client_group_rolemapping_by_id.call_count, 0) + self.assertEqual(mock_get_client_group_available_rolemappings.call_count, 1) + self.assertEqual(mock_get_client_group_composite_rolemappings.call_count, 1) self.assertEqual(mock_delete_group_rolemapping.call_count, 0) # Verify that the module's changed status matches what is expected From 394647df84dd50e6893fc63249e8b01ce67863eb Mon Sep 17 00:00:00 2001 From: betuxy <72452886+betuxy@users.noreply.github.com> Date: Sat, 1 Oct 2022 18:19:39 +0200 Subject: [PATCH 0240/2104] =?UTF-8?q?bitwarden:=20Add=20field=20to=20searc?= =?UTF-8?q?h=20for=20all=20item=20attributes,=20instead=20of=20on=E2=80=A6?= =?UTF-8?q?=20(#5297)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bitwarden: Add field to search for all item attributes, instead of only name. * bitwarden: Add change to changelog. * bitwarden: Update changelog entry. * Update changelogs/fragments/5297-bitwarden-add-search-field.yml Co-authored-by: Felix Fontein * Update plugins/lookup/bitwarden.py Co-authored-by: Felix Fontein * Update plugins/lookup/bitwarden.py Co-authored-by: Felix Fontein Co-authored-by: Ole Pannbacker Co-authored-by: Felix Fontein --- .../5297-bitwarden-add-search-field.yml | 2 ++ plugins/lookup/bitwarden.py | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5297-bitwarden-add-search-field.yml diff --git a/changelogs/fragments/5297-bitwarden-add-search-field.yml b/changelogs/fragments/5297-bitwarden-add-search-field.yml new file mode 100644 index 0000000000..9b5d147b02 --- /dev/null +++ b/changelogs/fragments/5297-bitwarden-add-search-field.yml @@ -0,0 +1,2 @@ +minor_changes: + - bitwarden lookup plugin - add option ``search`` to search for other attributes than name (https://github.com/ansible-collections/community.general/pull/5297). diff --git a/plugins/lookup/bitwarden.py b/plugins/lookup/bitwarden.py index 124c139c78..1cc2e44c74 100644 --- a/plugins/lookup/bitwarden.py +++ b/plugins/lookup/bitwarden.py @@ -22,6 +22,11 @@ DOCUMENTATION = """ required: true type: list elements: str + search: + description: Field to retrieve, for example C(name) or C(id). + type: str + default: name + version_added: 5.7.0 field: description: Field to fetch; leave unset to fetch whole response. type: str @@ -33,6 +38,11 @@ EXAMPLES = """ msg: >- {{ lookup('community.general.bitwarden', 'a_test', field='password') }} +- name: "Get 'password' from Bitwarden record with id 'bafba515-af11-47e6-abe3-af1200cd18b2'" + ansible.builtin.debug: + msg: >- + {{ lookup('community.general.bitwarden', 'bafba515-af11-47e6-abe3-af1200cd18b2', search='id', field='password') }} + - name: "Get full Bitwarden record named 'a_test'" ansible.builtin.debug: msg: >- @@ -81,7 +91,7 @@ class Bitwarden(object): raise BitwardenException(err) return to_text(out, errors='surrogate_or_strict'), to_text(err, errors='surrogate_or_strict') - def _get_matches(self, search_value, search_field="name"): + def _get_matches(self, search_value, search_field): """Return matching records whose search_field is equal to key. """ out, err = self._run(['list', 'items', '--search', search_value]) @@ -97,7 +107,7 @@ class Bitwarden(object): If field is None, return the whole record for each match. """ - matches = self._get_matches(search_value) + matches = self._get_matches(search_value, search_field) if field: return [match['login'][field] for match in matches] @@ -110,10 +120,11 @@ class LookupModule(LookupBase): def run(self, terms, variables=None, **kwargs): self.set_options(var_options=variables, direct=kwargs) field = self.get_option('field') + search_field = self.get_option('search') if not _bitwarden.logged_in: raise AnsibleError("Not logged into Bitwarden. Run 'bw login'.") - return [_bitwarden.get_field(field, term) for term in terms] + return [_bitwarden.get_field(field, term, search_field) for term in terms] _bitwarden = Bitwarden() From 6fe2a84e8733c4f27d6aca7b77dbdb9bb6e173be Mon Sep 17 00:00:00 2001 From: cfiehe Date: Mon, 3 Oct 2022 20:24:53 +0200 Subject: [PATCH 0241/2104] Fix #5313: redhat_subscription module is not idempotent when pool_ids (#5319) This fix ensures the idempotency of the redhat_subscription module when pool_ids are used. The main problem was, that a 'None' quantity was not properly handled and that the quantity check compared a string with an integer. Signed-off-by: Christoph Fiehe Signed-off-by: Christoph Fiehe Co-authored-by: Christoph Fiehe --- ...-redhat_subscription-idempotency-pool_ids.yml | 2 ++ .../modules/packaging/os/redhat_subscription.py | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml diff --git a/changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml b/changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml new file mode 100644 index 0000000000..1432dd95bd --- /dev/null +++ b/changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml @@ -0,0 +1,2 @@ +bugfixes: + - redhat_subscription - make module idempotent when ``pool_ids`` are used (https://github.com/ansible-collections/community.general/issues/5313). diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index da156c22ba..26b7d9df2a 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -593,15 +593,22 @@ class Rhsm(RegistrationBase): consumed_pools = RhsmPools(self.module, consumed=True) existing_pools = {} + serials_to_remove = [] for p in consumed_pools: - existing_pools[p.get_pool_id()] = p.QuantityUsed + pool_id = p.get_pool_id() + quantity_used = p.get_quantity_used() + existing_pools[pool_id] = quantity_used + + quantity = pool_ids.get(pool_id, 0) + if quantity is not None and quantity != quantity_used: + serials_to_remove.append(p.Serial) - serials_to_remove = [p.Serial for p in consumed_pools if pool_ids.get(p.get_pool_id(), 0) != p.QuantityUsed] serials = self.unsubscribe(serials=serials_to_remove) missing_pools = {} for pool_id, quantity in sorted(pool_ids.items()): - if existing_pools.get(pool_id, 0) != quantity: + quantity_used = existing_pools.get(pool_id, 0) + if quantity is None and quantity_used == 0 or quantity not in (None, 0, quantity_used): missing_pools[pool_id] = quantity self.subscribe_by_pool_ids(missing_pools) @@ -635,6 +642,9 @@ class RhsmPool(object): def get_pool_id(self): return getattr(self, 'PoolId', getattr(self, 'PoolID')) + def get_quantity_used(self): + return int(getattr(self, 'QuantityUsed')) + def subscribe(self): args = "subscription-manager attach --pool %s" % self.get_pool_id() rc, stdout, stderr = self.module.run_command(args, check_rc=True) From beef93f687b9255ec675f078b9e93e78b938a81e Mon Sep 17 00:00:00 2001 From: Kosala Atapattu Date: Tue, 4 Oct 2022 09:10:16 +1300 Subject: [PATCH 0242/2104] Allow terraform module to specify complex variable structures (#4797) * Adding capability to specify complex variables type to terraform * Terrform variable types are mapped to ansible veriable types * Currently handles Dict, List, Str, Int, Bool types * Updated the documentation accordingly * Updated with an example. * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Wonder how that missed the PEP8 checks :). Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Adding the changelog fragment * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Adding ``integer_types`` from ``module_utils`` Simplified the ``integer_types``, ``str`` and ``float`` value population through ``json.dumps()``. Now the strings can have special characters which can break the module execution. * Update changelogs/fragments/4797-terraform-complex-variables.yml Co-authored-by: Felix Fontein * * Changed to approach to make the code more readble and simple to understand. * Maintaining the original for loop for the top_level variables. Therefore the rocess_conplex_args() now only handle second level variables when the type() is either Dict or List. * Json dumps are used only for the low level variables. Terraform CLI had issues interpreting escape sequecences from json.dumps() * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * adding boolean explicitly, although boolean is a subclass of integer, adding this for self documentation pupose and the clarity of the code. * fixing the doc strings * Update terraform.py Fixing docstrings * * Introducing format_args funtion to simplify formatting each argument type for top_level and lower level. * Terraform Lists of strings, numbers, objects and lists are supported. * Adding COMMAND: to the fail_json msg, for plan failures to help troubleshoot command line arguments. * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * * Adding full terraform command to fail_json() when the terrafor plan fails * Fixing a spelling mistake. * plan_command if a list, stringifying the list * * Fixing the new line for the change fragments * Removed CR (\r) from the output messages. Now output lines carry only LF (\n), not CRLF (\r\n). * Added integration testing for complex variables. * Restructured integration testing code to be more expandable. * Update changelogs/fragments/4797-terraform-complex-variables.yml Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * double-quotes are not properly escaped in shell, and python string escaping are nullified the way terraform handle second tier string variables (within terraform). * changing all the task actions to FQCN format. * integration testing now includes: 1. Top level strings containing, special shell characters, spaces, double-quotes. 2. Second level strings containing, special shell characters, spaces, double-quotes repeating double-quotes to ensure proper regex substitution. * Adding colon ':' to string test casses. * Added complex_vars to switch between the old and the new variable interpretations. Updated the documentations to reflect the changes. Updated the examples. Handling '\' as well with the escape sequence. * Added tests for the new escape sequences. Added multilines tests. * Restructuring the documente strings to a shorter string. Argument_spec changed to 'bool' * Update changelogs/fragments/4797-terraform-complex-variables.yml Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein * Update plugins/modules/cloud/misc/terraform.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .../4797-terraform-complex-variables.yml | 3 + plugins/modules/cloud/misc/terraform.py | 137 ++++++++++++++++-- .../terraform/files/complex_variables/main.tf | 35 +++++ .../files/complex_variables/variables.tf | 62 ++++++++ .../terraform/tasks/complex_variables.yml | 60 ++++++++ .../targets/terraform/tasks/main.yml | 26 ++-- .../terraform/tasks/test_provider_upgrade.yml | 9 ++ 7 files changed, 306 insertions(+), 26 deletions(-) create mode 100644 changelogs/fragments/4797-terraform-complex-variables.yml create mode 100644 tests/integration/targets/terraform/files/complex_variables/main.tf create mode 100644 tests/integration/targets/terraform/files/complex_variables/variables.tf create mode 100644 tests/integration/targets/terraform/tasks/complex_variables.yml diff --git a/changelogs/fragments/4797-terraform-complex-variables.yml b/changelogs/fragments/4797-terraform-complex-variables.yml new file mode 100644 index 0000000000..f872210a4d --- /dev/null +++ b/changelogs/fragments/4797-terraform-complex-variables.yml @@ -0,0 +1,3 @@ +minor_changes: + - terraform - adds capability to handle complex variable structures for ``variables`` parameter in the module. + This must be enabled with the new ``complex_vars`` parameter (https://github.com/ansible-collections/community.general/pull/4797). diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index e4da9cbbf0..7b6fbc5126 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -80,9 +80,25 @@ options: aliases: [ 'variables_file' ] variables: description: - - A group of key-values to override template variables or those in - variables files. + - A group of key-values pairs to override template variables or those in variables files. + By default, only string and number values are allowed, which are passed on unquoted. + - Support complex variable structures (lists, dictionaries, numbers, and booleans) to reflect terraform variable syntax when I(complex_vars=true). + - Ansible integers or floats are mapped to terraform numbers. + - Ansible strings are mapped to terraform strings. + - Ansible dictionaries are mapped to terraform objects. + - Ansible lists are mapped to terraform lists. + - Ansible booleans are mapped to terraform booleans. + - "B(Note) passwords passed as variables will be visible in the log output. Make sure to use I(no_log=true) in production!" type: dict + complex_vars: + description: + - Enable/disable capability to handle complex variable structures for C(terraform). + - If C(true) the I(variables) also accepts dictionaries, lists, and booleans to be passed to C(terraform). + Strings that are passed are correctly quoted. + - When disabled, supports only simple variables (strings, integers, and floats), and passes them on unquoted. + type: bool + default: false + version_added: 5.7.0 targets: description: - A list of specific resources to target in this plan/application. The @@ -188,6 +204,26 @@ EXAMPLES = """ - /path/to/plugins_dir_1 - /path/to/plugins_dir_2 +- name: Complex variables example + community.general.terraform: + project_path: '{{ project_dir }}' + state: present + camplex_vars: true + variables: + vm_name: "{{ inventory_hostname }}" + vm_vcpus: 2 + vm_mem: 2048 + vm_additional_disks: + - label: "Third Disk" + size: 40 + thin_provisioned: true + unit_number: 2 + - label: "Fourth Disk" + size: 22 + thin_provisioned: true + unit_number: 3 + force_init: true + ### Example directory structure for plugin_paths example # $ tree /path/to/plugins_dir_1 # /path/to/plugins_dir_1/ @@ -237,6 +273,7 @@ import os import json import tempfile from ansible.module_utils.six.moves import shlex_quote +from ansible.module_utils.six import integer_types from ansible.module_utils.basic import AnsibleModule @@ -298,7 +335,7 @@ def get_workspace_context(bin_path, project_path): command = [bin_path, 'workspace', 'list', '-no-color'] rc, out, err = module.run_command(command, cwd=project_path) if rc != 0: - module.warn("Failed to list Terraform workspaces:\r\n{0}".format(err)) + module.warn("Failed to list Terraform workspaces:\n{0}".format(err)) for item in out.split('\n'): stripped_item = item.strip() if not stripped_item: @@ -360,12 +397,25 @@ def build_plan(command, project_path, variables_args, state_file, targets, state return plan_path, False, out, err, plan_command if state == 'planned' else command elif rc == 1: # failure to plan - module.fail_json(msg='Terraform plan could not be created\r\nSTDOUT: {0}\r\n\r\nSTDERR: {1}'.format(out, err)) + module.fail_json( + msg='Terraform plan could not be created\nSTDOUT: {out}\nSTDERR: {err}\nCOMMAND: {cmd} {args}'.format( + out=out, + err=err, + cmd=' '.join(plan_command), + args=' '.join([shlex_quote(arg) for arg in variables_args]) + ) + ) elif rc == 2: # changes, but successful return plan_path, True, out, err, plan_command if state == 'planned' else command - module.fail_json(msg='Terraform plan failed with unexpected exit code {0}. \r\nSTDOUT: {1}\r\n\r\nSTDERR: {2}'.format(rc, out, err)) + module.fail_json(msg='Terraform plan failed with unexpected exit code {rc}.\nSTDOUT: {out}\nSTDERR: {err}\nCOMMAND: {cmd} {args}'.format( + rc=rc, + out=out, + err=err, + cmd=' '.join(plan_command), + args=' '.join([shlex_quote(arg) for arg in variables_args]) + )) def main(): @@ -379,6 +429,7 @@ def main(): purge_workspace=dict(type='bool', default=False), state=dict(default='present', choices=['present', 'absent', 'planned']), variables=dict(type='dict'), + complex_vars=dict(type='bool', default=False), variables_files=dict(aliases=['variables_file'], type='list', elements='path'), plan_file=dict(type='path'), state_file=dict(type='path'), @@ -405,6 +456,7 @@ def main(): purge_workspace = module.params.get('purge_workspace') state = module.params.get('state') variables = module.params.get('variables') or {} + complex_vars = module.params.get('complex_vars') variables_files = module.params.get('variables_files') plan_file = module.params.get('plan_file') state_file = module.params.get('state_file') @@ -449,12 +501,77 @@ def main(): if state == 'present' and module.params.get('parallelism') is not None: command.append('-parallelism=%d' % module.params.get('parallelism')) + def format_args(vars): + if isinstance(vars, str): + return '"{string}"'.format(string=vars.replace('\\', '\\\\').replace('"', '\\"')) + elif isinstance(vars, bool): + if vars: + return 'true' + else: + return 'false' + return str(vars) + + def process_complex_args(vars): + ret_out = [] + if isinstance(vars, dict): + for k, v in vars.items(): + if isinstance(v, dict): + ret_out.append('{0}={{{1}}}'.format(k, process_complex_args(v))) + elif isinstance(v, list): + ret_out.append("{0}={1}".format(k, process_complex_args(v))) + elif isinstance(v, (integer_types, float, str, bool)): + ret_out.append('{0}={1}'.format(k, format_args(v))) + else: + # only to handle anything unforeseen + module.fail_json(msg="Supported types are, dictionaries, lists, strings, integer_types, boolean and float.") + if isinstance(vars, list): + l_out = [] + for item in vars: + if isinstance(item, dict): + l_out.append("{{{0}}}".format(process_complex_args(item))) + elif isinstance(item, list): + l_out.append("{0}".format(process_complex_args(item))) + elif isinstance(item, (str, integer_types, float, bool)): + l_out.append(format_args(item)) + else: + # only to handle anything unforeseen + module.fail_json(msg="Supported types are, dictionaries, lists, strings, integer_types, boolean and float.") + + ret_out.append("[{0}]".format(",".join(l_out))) + return ",".join(ret_out) + variables_args = [] - for k, v in variables.items(): - variables_args.extend([ - '-var', - '{0}={1}'.format(k, v) - ]) + if complex_vars: + for k, v in variables.items(): + if isinstance(v, dict): + variables_args.extend([ + '-var', + '{0}={{{1}}}'.format(k, process_complex_args(v)) + ]) + elif isinstance(v, list): + variables_args.extend([ + '-var', + '{0}={1}'.format(k, process_complex_args(v)) + ]) + # on the top-level we need to pass just the python string with necessary + # terraform string escape sequences + elif isinstance(v, str): + variables_args.extend([ + '-var', + "{0}={1}".format(k, v) + ]) + else: + variables_args.extend([ + '-var', + '{0}={1}'.format(k, format_args(v)) + ]) + else: + for k, v in variables.items(): + variables_args.extend([ + '-var', + '{0}={1}'.format(k, v) + ]) + if variables_files: for f in variables_files: variables_args.extend(['-var-file', f]) diff --git a/tests/integration/targets/terraform/files/complex_variables/main.tf b/tests/integration/targets/terraform/files/complex_variables/main.tf new file mode 100644 index 0000000000..8b7956ec0a --- /dev/null +++ b/tests/integration/targets/terraform/files/complex_variables/main.tf @@ -0,0 +1,35 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +resource "null_resource" "mynullresource" { + triggers = { + # plain dictionaries + dict_name = var.dictionaries.name + dict_age = var.dictionaries.age + + # list of dicrs + join_dic_name = join(",", var.list_of_objects.*.name) + + # list-of-strings + join_list = join(",", var.list_of_strings.*) + + # testing boolean + name = var.boolean ? var.dictionaries.name : var.list_of_objects[0].name + + # top level string + sample_string_1 = var.string_type + + # nested lists + num_from_matrix = var.list_of_lists[1][2] + } + +} + +output "string_type" { + value = var.string_type +} + +output "multiline_string" { + value = var.multiline_string +} diff --git a/tests/integration/targets/terraform/files/complex_variables/variables.tf b/tests/integration/targets/terraform/files/complex_variables/variables.tf new file mode 100644 index 0000000000..34b050747b --- /dev/null +++ b/tests/integration/targets/terraform/files/complex_variables/variables.tf @@ -0,0 +1,62 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +variable "dictionaries" { + type = object({ + name = string + age = number + }) + description = "Same as ansible Dict" + default = { + age = 1 + name = "value" + } +} + +variable "list_of_strings" { + type = list(string) + description = "list of strings" + validation { + condition = (var.list_of_strings[1] == "cli specials\"&$%@#*!(){}[]:\"\" \\\\") + error_message = "Strings do not match." + } +} + +variable "list_of_objects" { + type = list(object({ + name = string + age = number + })) + validation { + condition = (var.list_of_objects[1].name == "cli specials\"&$%@#*!(){}[]:\"\" \\\\") + error_message = "Strings do not match." + } +} + +variable "boolean" { + type = bool + description = "boolean" + +} + +variable "string_type" { + type = string + validation { + condition = (var.string_type == "cli specials\"&$%@#*!(){}[]:\"\" \\\\") + error_message = "Strings do not match." + } +} + +variable "multiline_string" { + type = string + validation { + condition = (var.multiline_string == "one\ntwo\n") + error_message = "Strings do not match." + } +} + +variable "list_of_lists" { + type = list(list(any)) + default = [ [ 1 ], [1, 2, 3], [3] ] +} diff --git a/tests/integration/targets/terraform/tasks/complex_variables.yml b/tests/integration/targets/terraform/tasks/complex_variables.yml new file mode 100644 index 0000000000..180a1fb98c --- /dev/null +++ b/tests/integration/targets/terraform/tasks/complex_variables.yml @@ -0,0 +1,60 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create terraform project directory (complex variables) + ansible.builtin.file: + path: "{{ terraform_project_dir }}/complex_vars" + state: directory + mode: 0755 + +- name: copy terraform files to work space + ansible.builtin.copy: + src: "complex_variables/{{ item }}" + dest: "{{ terraform_project_dir }}/complex_vars/{{ item }}" + with_items: + - main.tf + - variables.tf + +# This task would test the various complex variable structures of the with the +# terraform null_resource +- name: test complex variables + community.general.terraform: + project_path: "{{ terraform_project_dir }}/complex_vars" + binary_path: "{{ terraform_binary_path }}" + force_init: yes + complex_vars: true + variables: + dictionaries: + name: "kosala" + age: 99 + list_of_strings: + - "kosala" + - 'cli specials"&$%@#*!(){}[]:"" \\' + - "xxx" + - "zzz" + list_of_objects: + - name: "kosala" + age: 99 + - name: 'cli specials"&$%@#*!(){}[]:"" \\' + age: 0.1 + - name: "zzz" + age: 9.789 + - name: "lll" + age: 1000 + boolean: true + string_type: 'cli specials"&$%@#*!(){}[]:"" \\' + multiline_string: | + one + two + list_of_lists: + - [ 1 ] + - [ 11, 12, 13 ] + - [ 2 ] + - [ 3 ] + state: present + register: terraform_init_result + +- assert: + that: terraform_init_result is not failed diff --git a/tests/integration/targets/terraform/tasks/main.yml b/tests/integration/targets/terraform/tasks/main.yml index 75c096bade..db9fc3fc5b 100644 --- a/tests/integration/targets/terraform/tasks/main.yml +++ b/tests/integration/targets/terraform/tasks/main.yml @@ -9,17 +9,17 @@ - name: Check for existing Terraform in path block: - name: Check if terraform is present in path - command: "command -v terraform" + ansible.builtin.command: "command -v terraform" register: terraform_binary_path ignore_errors: true - name: Check Terraform version - command: terraform version + ansible.builtin.command: terraform version register: terraform_version_output when: terraform_binary_path.rc == 0 - name: Set terraform version - set_fact: + ansible.builtin.set_fact: terraform_version_installed: "{{ terraform_version_output.stdout | regex_search('(?!Terraform.*v)([0-9]+\\.[0-9]+\\.[0-9]+)') }}" when: terraform_version_output.changed @@ -30,7 +30,7 @@ block: - name: Install Terraform - debug: + ansible.builtin.debug: msg: "Installing terraform {{ terraform_version }}, found: {{ terraform_version_installed | default('no terraform binary found') }}." - name: Ensure unzip is present @@ -39,7 +39,7 @@ state: present - name: Install Terraform binary - unarchive: + ansible.builtin.unarchive: src: "{{ terraform_url }}" dest: "{{ remote_tmp_dir }}" mode: 0755 @@ -52,22 +52,16 @@ # path from the 'Check if terraform is present in path' task, and lastly, the fallback path. - name: Set path to terraform binary - set_fact: + ansible.builtin.set_fact: terraform_binary_path: "{{ terraform_binary_path.stdout or remote_tmp_dir ~ '/terraform' }}" -- name: Create terraform project directory - file: - path: "{{ terraform_project_dir }}/{{ item['name'] }}" - state: directory - mode: 0755 - loop: "{{ terraform_provider_versions }}" - loop_control: - index_var: provider_index - - name: Loop over provider upgrade test tasks - include_tasks: test_provider_upgrade.yml + ansible.builtin.include_tasks: test_provider_upgrade.yml vars: tf_provider: "{{ terraform_provider_versions[provider_index] }}" loop: "{{ terraform_provider_versions }}" loop_control: index_var: provider_index + +- name: Test Complex Varibles + ansible.builtin.include_tasks: complex_variables.yml diff --git a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml index ac76c38837..711dfc1a33 100644 --- a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml +++ b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml @@ -3,6 +3,15 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +- name: Create terraform project directory (provider upgrade) + file: + path: "{{ terraform_project_dir }}/{{ item['name'] }}" + state: directory + mode: 0755 + loop: "{{ terraform_provider_versions }}" + loop_control: + index_var: provider_index + - name: Output terraform provider test project ansible.builtin.template: src: templates/provider_test/main.tf.j2 From 9a44cc55aa47a9e5a208e3f47ba036153b5c006f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 4 Oct 2022 07:35:50 +0200 Subject: [PATCH 0243/2104] Next expected release is 5.8.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index e0e4144e58..6742288ccd 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 5.7.0 +version: 5.8.0 readme: README.md authors: - Ansible (https://github.com/ansible) From 7b86fa6a7dcf76f0211317513631fe24797a06c1 Mon Sep 17 00:00:00 2001 From: clovis-monmousseau <58973012+clovis-monmousseau@users.noreply.github.com> Date: Wed, 5 Oct 2022 07:57:01 +0200 Subject: [PATCH 0244/2104] keycloak_user_federation: add explanation and example to vendor option (#4893) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add explanation and example to vendor option ##### SUMMARY ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr * Update plugins/modules/identity/keycloak/keycloak_user_federation.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/modules/identity/keycloak/keycloak_user_federation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/identity/keycloak/keycloak_user_federation.py b/plugins/modules/identity/keycloak/keycloak_user_federation.py index 55915d08c4..3e66c577ec 100644 --- a/plugins/modules/identity/keycloak/keycloak_user_federation.py +++ b/plugins/modules/identity/keycloak/keycloak_user_federation.py @@ -131,6 +131,7 @@ options: vendor: description: - LDAP vendor (provider). + - Use short name. For instance, write C(rhds) for "Red Hat Directory Server". type: str usernameLDAPAttribute: From 96b6ef5765ae967dfd9fa95a9bc67bc46c11de14 Mon Sep 17 00:00:00 2001 From: henkwiedig Date: Wed, 5 Oct 2022 08:23:15 +0200 Subject: [PATCH 0245/2104] znode: add options for authentication (#5306) * add options for authentication * Update changelogs/fragments/5306-add-options-for-authentication.yml Co-authored-by: Felix Fontein * Update plugins/modules/clustering/znode.py Co-authored-by: Felix Fontein * Update plugins/modules/clustering/znode.py Co-authored-by: Felix Fontein * Update plugins/modules/clustering/znode.py Co-authored-by: Felix Fontein * Update plugins/modules/clustering/znode.py Co-authored-by: Felix Fontein * rename scheme to auth_scheme, credential to auth_credential * make pycodestyle happy * Update plugins/modules/clustering/znode.py Co-authored-by: Felix Fontein * Update plugins/modules/clustering/znode.py Co-authored-by: Felix Fontein * remove unneeded quotes * Update changelogs/fragments/5306-add-options-for-authentication.yml Co-authored-by: Felix Fontein * Update version_added. Co-authored-by: Felix Fontein --- .../5306-add-options-for-authentication.yml | 2 ++ plugins/modules/clustering/znode.py | 29 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5306-add-options-for-authentication.yml diff --git a/changelogs/fragments/5306-add-options-for-authentication.yml b/changelogs/fragments/5306-add-options-for-authentication.yml new file mode 100644 index 0000000000..ba179a72b7 --- /dev/null +++ b/changelogs/fragments/5306-add-options-for-authentication.yml @@ -0,0 +1,2 @@ +minor_changes: + - znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306). \ No newline at end of file diff --git a/plugins/modules/clustering/znode.py b/plugins/modules/clustering/znode.py index 07be85c145..d9d05c3170 100644 --- a/plugins/modules/clustering/znode.py +++ b/plugins/modules/clustering/znode.py @@ -49,6 +49,22 @@ options: - Recursively delete node and all its children. type: bool default: false + auth_scheme: + description: + - 'Authentication scheme.' + choices: [ digest, sasl ] + type: str + default: "digest" + required: false + version_added: 5.8.0 + auth_credential: + description: + - The authentication credential value. Depends on I(auth_scheme). + - The format for I(auth_scheme=digest) is C(user:password), + and the format for I(auth_scheme=sasl) is C(user:password). + type: str + required: false + version_added: 5.8.0 requirements: - kazoo >= 2.1 - python >= 2.6 @@ -69,6 +85,13 @@ EXAMPLES = """ name: /mypath op: get +- name: Getting the value and stat structure for a znode using digest authentication + community.general.znode: + hosts: 'localhost:2181' + auth_credential: 'user1:s3cr3t' + name: /secretmypath + op: get + - name: Listing a particular znode's children community.general.znode: hosts: 'localhost:2181' @@ -122,7 +145,9 @@ def main(): op=dict(choices=['get', 'wait', 'list']), state=dict(choices=['present', 'absent']), timeout=dict(default=300, type='int'), - recursive=dict(default=False, type='bool') + recursive=dict(default=False, type='bool'), + auth_scheme=dict(default='digest', choices=['digest', 'sasl']), + auth_credential=dict(type='str', no_log=True), ), supports_check_mode=False ) @@ -201,6 +226,8 @@ class KazooCommandProxy(): def start(self): self.zk.start() + if self.module.params['auth_credential']: + self.zk.add_auth(self.module.params['auth_scheme'], self.module.params['auth_credential']) def wait(self): return self._wait(self.module.params['name'], self.module.params['timeout']) From dc2d3c24fa0e1e148c626b5cd0e3eff3231c2074 Mon Sep 17 00:00:00 2001 From: manschwetusCS <30724946+manschwetusCS@users.noreply.github.com> Date: Wed, 5 Oct 2022 08:26:40 +0200 Subject: [PATCH 0246/2104] Make pfexec become usable for illumos (#3889) * Experimental change from OpenIndiana * resolve pfexec problem, by removing superfluous quotes * reimplement "wrap_exe" * remove spaces arround keyword argument assignment * adapted pfexec unit test * Try to fix quoting of test expression * Fix quoting of test expression by replacing ' with " * Add changelog fragment --- changelogs/fragments/3671-illumos-pfexec.yml | 2 ++ plugins/become/pfexec.py | 2 +- tests/unit/plugins/become/test_pfexec.py | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/3671-illumos-pfexec.yml diff --git a/changelogs/fragments/3671-illumos-pfexec.yml b/changelogs/fragments/3671-illumos-pfexec.yml new file mode 100644 index 0000000000..b1fcdb31ea --- /dev/null +++ b/changelogs/fragments/3671-illumos-pfexec.yml @@ -0,0 +1,2 @@ +minor_changes: + - "become_pfexec - remove superflous quotes preventing exe wrap from working as expected, fixes #3671, see https://github.com/ansible-collections/community.general/issues/3671#issuecomment-1174906473" diff --git a/plugins/become/pfexec.py b/plugins/become/pfexec.py index 43237342d4..392ee961f5 100644 --- a/plugins/become/pfexec.py +++ b/plugins/become/pfexec.py @@ -102,4 +102,4 @@ class BecomeModule(BecomeBase): flags = self.get_option('become_flags') noexe = not self.get_option('wrap_exe') - return '%s %s "%s"' % (exe, flags, self._build_success_command(cmd, shell, noexe=noexe)) + return '%s %s %s' % (exe, flags, self._build_success_command(cmd, shell, noexe=noexe)) diff --git a/tests/unit/plugins/become/test_pfexec.py b/tests/unit/plugins/become/test_pfexec.py index 445185c197..350cd5ad27 100644 --- a/tests/unit/plugins/become/test_pfexec.py +++ b/tests/unit/plugins/become/test_pfexec.py @@ -32,7 +32,7 @@ def test_pfexec_basic(mocker, parser, reset_cli_args): var_options = {} cmd = call_become_plugin(task, var_options, cmd=default_cmd, executable=default_exe) print(cmd) - assert re.match('''%s %s "'echo %s; %s'"''' % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None + assert re.match("""%s %s 'echo %s; %s'""" % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None def test_pfexec(mocker, parser, reset_cli_args): @@ -54,7 +54,7 @@ def test_pfexec(mocker, parser, reset_cli_args): var_options = {} cmd = call_become_plugin(task, var_options, cmd=default_cmd, executable=default_exe) print(cmd) - assert re.match('''%s %s "'echo %s; %s'"''' % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None + assert re.match("""%s %s 'echo %s; %s'""" % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None def test_pfexec_varoptions(mocker, parser, reset_cli_args): @@ -79,4 +79,4 @@ def test_pfexec_varoptions(mocker, parser, reset_cli_args): } cmd = call_become_plugin(task, var_options, cmd=default_cmd, executable=default_exe) print(cmd) - assert re.match('''%s %s "'echo %s; %s'"''' % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None + assert re.match("""%s %s 'echo %s; %s'""" % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None From 8c04133284000a95a9853040b1d18117153f51d3 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 10 Oct 2022 19:54:52 +0100 Subject: [PATCH 0247/2104] opentelemetry: send logs (#4175) * opentelemetry: logs property * opentelemetry: support for span events with the Task dump output * opentelemetry: support property to disable the logs * bump the version when supported * add section ini * test: fix change of signature * [opentelemetry][callback] changelog fragment * Apply suggestions from code review Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/4175-opentelemetry_logs.yml | 2 + plugins/callback/opentelemetry.py | 42 +++++++++++++++---- .../plugins/callback/test_opentelemetry.py | 9 ++-- 3 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 changelogs/fragments/4175-opentelemetry_logs.yml diff --git a/changelogs/fragments/4175-opentelemetry_logs.yml b/changelogs/fragments/4175-opentelemetry_logs.yml new file mode 100644 index 0000000000..8f18f83178 --- /dev/null +++ b/changelogs/fragments/4175-opentelemetry_logs.yml @@ -0,0 +1,2 @@ +minor_changes: + - opentelemetry callback plugin - send logs. This can be disabled by setting ``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175). diff --git a/plugins/callback/opentelemetry.py b/plugins/callback/opentelemetry.py index d9faa4d729..e3584a7ae2 100644 --- a/plugins/callback/opentelemetry.py +++ b/plugins/callback/opentelemetry.py @@ -62,6 +62,17 @@ DOCUMENTATION = ''' - The L(W3C Trace Context header traceparent,https://www.w3.org/TR/trace-context-1/#traceparent-header). env: - name: TRACEPARENT + disable_logs: + default: false + type: bool + description: + - Disable sending logs. + env: + - name: ANSIBLE_OPENTELEMETRY_DISABLE_LOGS + ini: + - section: callback_opentelemetry + key: disable_logs + version_added: 5.8.0 requirements: - opentelemetry-api (Python library) - opentelemetry-exporter-otlp (Python library) @@ -134,6 +145,7 @@ class TaskData: self.start = _time_ns() self.action = action self.args = args + self.dump = None def add_host(self, host): if host.uuid in self.host_data: @@ -199,7 +211,7 @@ class OpenTelemetrySource(object): tasks_data[uuid] = TaskData(uuid, name, path, play_name, action, args) - def finish_task(self, tasks_data, status, result): + def finish_task(self, tasks_data, status, result, dump): """ record the results of a task for a single host """ task_uuid = result._task._uuid @@ -216,9 +228,10 @@ class OpenTelemetrySource(object): if self.ansible_version is None and hasattr(result, '_task_fields') and result._task_fields['args'].get('_ansible_version'): self.ansible_version = result._task_fields['args'].get('_ansible_version') + task.dump = dump task.add_host(HostData(host_uuid, host_name, status, result)) - def generate_distributed_traces(self, otel_service_name, ansible_playbook, tasks_data, status, traceparent): + def generate_distributed_traces(self, otel_service_name, ansible_playbook, tasks_data, status, traceparent, disable_logs): """ generate distributed traces from the collected TaskData and HostData """ tasks = [] @@ -254,9 +267,9 @@ class OpenTelemetrySource(object): for task in tasks: for host_uuid, host_data in task.host_data.items(): with tracer.start_as_current_span(task.name, start_time=task.start, end_on_exit=False) as span: - self.update_span_data(task, host_data, span) + self.update_span_data(task, host_data, span, disable_logs) - def update_span_data(self, task_data, host_data, span): + def update_span_data(self, task_data, host_data, span, disable_logs): """ update the span with the given TaskData and HostData """ name = '[%s] %s: %s' % (host_data.name, task_data.play, task_data.name) @@ -302,6 +315,9 @@ class OpenTelemetrySource(object): self.set_span_attribute(span, "ansible.task.host.status", host_data.status) # This will allow to enrich the service map self.add_attributes_for_service_map_if_possible(span, task_data) + # Send logs + if not disable_logs: + span.add_event(task_data.dump) span.end(end_time=host_data.finish) def set_span_attribute(self, span, attributeName, attributeValue): @@ -405,6 +421,7 @@ class CallbackModule(CallbackBase): def __init__(self, display=None): super(CallbackModule, self).__init__(display=display) self.hide_task_arguments = None + self.disable_logs = None self.otel_service_name = None self.ansible_playbook = None self.play_name = None @@ -435,6 +452,8 @@ class CallbackModule(CallbackBase): self.hide_task_arguments = self.get_option('hide_task_arguments') + self.disable_logs = self.get_option('disable_logs') + self.otel_service_name = self.get_option('otel_service_name') if not self.otel_service_name: @@ -491,28 +510,32 @@ class CallbackModule(CallbackBase): self.opentelemetry.finish_task( self.tasks_data, status, - result + result, + self._dump_results(result._result) ) def v2_runner_on_ok(self, result): self.opentelemetry.finish_task( self.tasks_data, 'ok', - result + result, + self._dump_results(result._result) ) def v2_runner_on_skipped(self, result): self.opentelemetry.finish_task( self.tasks_data, 'skipped', - result + result, + self._dump_results(result._result) ) def v2_playbook_on_include(self, included_file): self.opentelemetry.finish_task( self.tasks_data, 'included', - included_file + included_file, + "" ) def v2_playbook_on_stats(self, stats): @@ -525,7 +548,8 @@ class CallbackModule(CallbackBase): self.ansible_playbook, self.tasks_data, status, - self.traceparent + self.traceparent, + self.disable_logs ) def v2_runner_on_async_failed(self, result, **kwargs): diff --git a/tests/unit/plugins/callback/test_opentelemetry.py b/tests/unit/plugins/callback/test_opentelemetry.py index 1865e0b153..c6532bc2e5 100644 --- a/tests/unit/plugins/callback/test_opentelemetry.py +++ b/tests/unit/plugins/callback/test_opentelemetry.py @@ -68,7 +68,8 @@ class TestOpentelemetry(unittest.TestCase): self.opentelemetry.finish_task( tasks_data, 'ok', - self.my_task_result + self.my_task_result, + "" ) task_data = tasks_data['myuuid'] @@ -85,7 +86,8 @@ class TestOpentelemetry(unittest.TestCase): self.opentelemetry.finish_task( tasks_data, 'ok', - result + result, + "" ) task_data = tasks_data['myuuid'] @@ -104,7 +106,8 @@ class TestOpentelemetry(unittest.TestCase): self.opentelemetry.finish_task( tasks_data, 'ok', - result + result, + "" ) self.assertEqual(self.opentelemetry.ansible_version, '1.2.3') From d76392ed2a1b5b08097e1f5ae780d031f9d1adf3 Mon Sep 17 00:00:00 2001 From: Yuhua Zou <41054978+ZouYuhua@users.noreply.github.com> Date: Tue, 11 Oct 2022 04:41:04 +0800 Subject: [PATCH 0248/2104] New module: iso_customize (#5190) * add ansible module iso_customize.py * rerun CI testing due to "Failed to send request to https://api.github.com/repos/ansible/ansible/issues/23642: HTTP Error 403: rate limit exceeded" * Rerun CI testing due to "Failed to send request to https://api.github....." * rerun CI testing due to failure "Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/v2/collections/netbox/netbox/versions/3.1.0/': The read operation timed out" * change document part as felixfontein's careful review * modify test file as russoz's comments * modify comment part of module * add comment for the example * add more tests: check the files are deleted / added in customized ISO * fix it: failed to run ansible.posix.mount in ubuntu * fix it: ansible.posix.mount is not working well in some OS. * change DOCUMENTATION part * change files according to the comment from code review * fix issue: E231: missing whitespace after ':' * modify the description of Document * modify code for code review * delete extra blank line in yml file * Try to fix CI testing issue: "Caught \"'foo' is undefined. 'foo' is undefined\" while evaluating 'b' with item == {'a': 1}" * delete extra blank line in the end of file * change code as the comment from code review * change code from code review * change type: str to type: path * change type:str to type:path * delete unused variable * fix CI testing error: return-syntax-error: RETURN.dest_iso.type: not a valid value for dictionary value @ data['dest_iso']['type']. Got 'path' * add testcase: test add files / delete files separately * add more testcases: test if we can catch exception from error input of users * change code from code review * fix issue: E231: missing whitespace after ',' * change code from code review * add notes to document * modify notes in document part * /rebuild_failed /rebuild_failed * Try to support running testcases not only in MAC but also in other OS. * modify document * change mount to ansible.posix.mount * skip the test platform which report "Error mounting" * fix mount failed: Operation not permitted * change code from code review * change document from code review * fix CI testing issue in some platforms * Update plugins/modules/files/iso_customize.py * change code from code review 1) change testcase 2) try to fix "mount: not permitted" * modify aliases file * change document and rerun CI testing * add skip/docker as suggested * add debug task * fix issue in redhat 7.9: occurred while running the lookup plugin 'file'. ..could not locate file in lookup.. * change code from the code review * modify function "iso_rr_check_file_exist" to "iso_check_file_exists" to make it works in all types of ISO 1. modify function "iso_rr_check_file_exist" to "iso_check_file_exists" to make it works in all types of ISO 2. run main.yml with newer python 3.10.6 ansible [core 2.13.4] config file = None configured module search path = ['/Users/zouy/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/6.4.0/libexec/lib/python3.10/site-packages/ansible ansible collection location = /Users/zouy/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.10.6 (main, Aug 30 2022, 05:12:36) [Clang 13.1.6 (clang-1316.0.21.2.5)] jinja version = 3.1.2 libyaml = True * delete blank * simply the code as suggested. * Two small docs updates. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 + meta/runtime.yml | 2 + plugins/modules/files/iso_customize.py | 343 ++++++++++++++++++ .../integration/targets/iso_customize/aliases | 14 + .../targets/iso_customize/meta/main.yml | 7 + .../iso_customize/tasks/iso_customize.yml | 75 ++++ .../tasks/iso_customize_add_files.yml | 34 ++ .../tasks/iso_customize_delete_files.yml | 34 ++ .../tasks/iso_customize_exception.yml | 81 +++++ .../targets/iso_customize/tasks/iso_mount.yml | 39 ++ .../targets/iso_customize/tasks/main.yml | 94 +++++ .../targets/iso_customize/tasks/prepare.yml | 39 ++ 12 files changed, 764 insertions(+) create mode 100644 plugins/modules/files/iso_customize.py create mode 100644 tests/integration/targets/iso_customize/aliases create mode 100644 tests/integration/targets/iso_customize/meta/main.yml create mode 100644 tests/integration/targets/iso_customize/tasks/iso_customize.yml create mode 100644 tests/integration/targets/iso_customize/tasks/iso_customize_add_files.yml create mode 100644 tests/integration/targets/iso_customize/tasks/iso_customize_delete_files.yml create mode 100644 tests/integration/targets/iso_customize/tasks/iso_customize_exception.yml create mode 100644 tests/integration/targets/iso_customize/tasks/iso_mount.yml create mode 100644 tests/integration/targets/iso_customize/tasks/main.yml create mode 100644 tests/integration/targets/iso_customize/tasks/prepare.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 0d35e1b5fd..408ec38e03 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -560,6 +560,8 @@ files: maintainers: jpmens noseka1 $modules/files/iso_create.py: maintainers: Tomorrow9 + $modules/files/iso_customize.py: + maintainers: ZouYuhua $modules/files/iso_extract.py: maintainers: dagwieers jhoekx ribbons $modules/files/read_csv.py: diff --git a/meta/runtime.yml b/meta/runtime.yml index 2685df53a7..eb6d226fec 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -560,6 +560,8 @@ plugin_routing: redirect: community.general.files.iso_create iso_extract: redirect: community.general.files.iso_extract + iso_customize: + redirect: community.general.files.iso_customize jabber: redirect: community.general.notification.jabber java_cert: diff --git a/plugins/modules/files/iso_customize.py b/plugins/modules/files/iso_customize.py new file mode 100644 index 0000000000..a6136cdd8f --- /dev/null +++ b/plugins/modules/files/iso_customize.py @@ -0,0 +1,343 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = r''' +--- +module: iso_customize +short_description: Add/remove/change files in ISO file +description: + - This module is used to add/remove/change files in ISO file. + - The file inside ISO will be overwritten if it exists by option I(add_files). +author: + - Yuhua Zou (@ZouYuhua) +requirements: + - "pycdlib" + - "python >= 2.7" +version_added: '5.8.0' + +options: + src_iso: + description: + - This is the path of source ISO file. + type: path + required: true + dest_iso: + description: + - The path of the customized ISO file. + type: path + required: true + delete_files: + description: + - Absolute paths for files inside the ISO file that should be removed. + type: list + required: false + elements: str + add_files: + description: + - Allows to add and replace files in the ISO file. + - Will create intermediate folders inside the ISO file when they do not exist. + type: list + required: false + elements: dict + suboptions: + src_file: + description: + - The path with file name on the machine the module is executed on. + type: path + required: true + dest_file: + description: + - The absolute path of the file inside the ISO file. + type: str + required: true +notes: +- The C(pycdlib) library states it supports Python 2.7 and 3.4 only. +- > + The function I(add_file) in pycdlib will overwrite the existing file in ISO with type ISO9660 / Rock Ridge 1.12 / Joliet / UDF. + But it will not overwrite the existing file in ISO with Rock Ridge 1.09 / 1.10. + So we take workaround "delete the existing file and then add file for ISO with Rock Ridge". +''' + +EXAMPLES = r''' +- name: "Customize ISO file" + community.general.iso_customize: + src_iso: "/path/to/ubuntu-22.04-desktop-amd64.iso" + dest_iso: "/path/to/ubuntu-22.04-desktop-amd64-customized.iso" + delete_files: + - "/boot.catalog" + add_files: + - src_file: "/path/to/grub.cfg" + dest_file: "/boot/grub/grub.cfg" + - src_file: "/path/to/ubuntu.seed" + dest_file: "/preseed/ubuntu.seed" + register: customize_iso_result +''' + +RETURN = r''' +src_iso: + description: Path of source ISO file. + returned: on success + type: str + sample: "/path/to/file.iso" +dest_iso: + description: Path of the customized ISO file. + returned: on success + type: str + sample: "/path/to/customized.iso" +''' + +import os +import traceback + +PYCDLIB_IMP_ERR = None +try: + import pycdlib + HAS_PYCDLIB = True +except ImportError: + PYCDLIB_IMP_ERR = traceback.format_exc() + HAS_PYCDLIB = False + +from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.common.text.converters import to_native + + +# The upper dir exist, we only add subdirectoy +def iso_add_dir(module, opened_iso, iso_type, dir_path): + parent_dir, check_dirname = dir_path.rsplit("/", 1) + if not parent_dir.strip(): + parent_dir = "/" + check_dirname = check_dirname.strip() + + for dirname, dirlist, dummy_filelist in opened_iso.walk(iso_path=parent_dir.upper()): + if dirname == parent_dir.upper(): + if check_dirname.upper() in dirlist: + return + + if parent_dir == "/": + current_dirpath = "/%s" % check_dirname + else: + current_dirpath = "%s/%s" % (parent_dir, check_dirname) + + current_dirpath_upper = current_dirpath.upper() + try: + if iso_type == "iso9660": + opened_iso.add_directory(current_dirpath_upper) + elif iso_type == "rr": + opened_iso.add_directory(current_dirpath_upper, rr_name=check_dirname) + elif iso_type == "joliet": + opened_iso.add_directory(current_dirpath_upper, joliet_path=current_dirpath) + elif iso_type == "udf": + opened_iso.add_directory(current_dirpath_upper, udf_path=current_dirpath) + except Exception as err: + msg = "Failed to create dir %s with error: %s" % (current_dirpath, to_native(err)) + module.fail_json(msg=msg) + + +def iso_add_dirs(module, opened_iso, iso_type, dir_path): + dirnames = dir_path.strip().split("/") + + current_dirpath = "/" + for item in dirnames: + if not item.strip(): + continue + if current_dirpath == "/": + current_dirpath = "/%s" % item + else: + current_dirpath = "%s/%s" % (current_dirpath, item) + + iso_add_dir(module, opened_iso, iso_type, current_dirpath) + + +def iso_check_file_exists(opened_iso, dest_file): + file_dir = os.path.dirname(dest_file).strip() + file_name = os.path.basename(dest_file) + dirnames = file_dir.strip().split("/") + + parent_dir = "/" + for item in dirnames: + if not item.strip(): + continue + + for dirname, dirlist, dummy_filelist in opened_iso.walk(iso_path=parent_dir.upper()): + if dirname != parent_dir.upper(): + break + + if item.upper() not in dirlist: + return False + + if parent_dir == "/": + parent_dir = "/%s" % item + else: + parent_dir = "%s/%s" % (parent_dir, item) + + if '.' not in file_name: + file_in_iso_path = file_name.upper() + '.;1' + else: + file_in_iso_path = file_name.upper() + ';1' + + for dirname, dummy_dirlist, filelist in opened_iso.walk(iso_path=parent_dir.upper()): + if dirname != parent_dir.upper(): + return False + + return file_name.upper() in filelist or file_in_iso_path in filelist + + +def iso_add_file(module, opened_iso, iso_type, src_file, dest_file): + dest_file = dest_file.strip() + if dest_file[0] != "/": + dest_file = "/%s" % dest_file + + file_local = src_file.strip() + + file_dir = os.path.dirname(dest_file).strip() + file_name = os.path.basename(dest_file) + if '.' not in file_name: + file_in_iso_path = dest_file.upper() + '.;1' + else: + file_in_iso_path = dest_file.upper() + ';1' + + if file_dir and file_dir != "/": + iso_add_dirs(module, opened_iso, iso_type, file_dir) + + try: + if iso_type == "iso9660": + opened_iso.add_file(file_local, iso_path=file_in_iso_path) + elif iso_type == "rr": + # For ISO with Rock Ridge 1.09 / 1.10, it won't overwrite the existing file + # So we take workaround here: delete the existing file and then add file + if iso_check_file_exists(opened_iso, dest_file): + opened_iso.rm_file(iso_path=file_in_iso_path) + opened_iso.add_file(file_local, iso_path=file_in_iso_path, rr_name=file_name) + elif iso_type == "joliet": + opened_iso.add_file(file_local, iso_path=file_in_iso_path, joliet_path=dest_file) + elif iso_type == "udf": + # For ISO with UDF, it won't always succeed to overwrite the existing file + # So we take workaround here: delete the existing file and then add file + if iso_check_file_exists(opened_iso, dest_file): + opened_iso.rm_file(udf_path=dest_file) + opened_iso.add_file(file_local, iso_path=file_in_iso_path, udf_path=dest_file) + except Exception as err: + msg = "Failed to add local file %s to ISO with error: %s" % (file_local, to_native(err)) + module.fail_json(msg=msg) + + +def iso_delete_file(module, opened_iso, iso_type, dest_file): + dest_file = dest_file.strip() + if dest_file[0] != "/": + dest_file = "/%s" % dest_file + file_name = os.path.basename(dest_file) + + if not iso_check_file_exists(opened_iso, dest_file): + module.fail_json(msg="The file %s does not exist." % dest_file) + + if '.' not in file_name: + file_in_iso_path = dest_file.upper() + '.;1' + else: + file_in_iso_path = dest_file.upper() + ';1' + + try: + if iso_type == "iso9660": + opened_iso.rm_file(iso_path=file_in_iso_path) + elif iso_type == "rr": + opened_iso.rm_file(iso_path=file_in_iso_path) + elif iso_type == "joliet": + opened_iso.rm_file(joliet_path=dest_file) + elif iso_type == "udf": + opened_iso.rm_file(udf_path=dest_file) + except Exception as err: + msg = "Failed to delete iso file %s with error: %s" % (dest_file, to_native(err)) + module.fail_json(msg=msg) + + +def iso_rebuild(module, src_iso, dest_iso, delete_files_list, add_files_list): + iso = None + iso_type = "iso9660" + + try: + iso = pycdlib.PyCdlib(always_consistent=True) + iso.open(src_iso) + if iso.has_rock_ridge(): + iso_type = "rr" + elif iso.has_joliet(): + iso_type = "joliet" + elif iso.has_udf(): + iso_type = "udf" + + for item in delete_files_list: + iso_delete_file(module, iso, iso_type, item) + + for item in add_files_list: + iso_add_file(module, iso, iso_type, item['src_file'], item['dest_file']) + + iso.write(dest_iso) + except Exception as err: + msg = "Failed to rebuild ISO %s with error: %s" % (src_iso, to_native(err)) + module.fail_json(msg=msg) + finally: + if iso: + iso.close() + + +def main(): + argument_spec = dict( + src_iso=dict(type='path', required=True), + dest_iso=dict(type='path', required=True), + delete_files=dict(type='list', elements='str', default=[]), + add_files=dict( + type='list', elements='dict', default=[], + options=dict( + src_file=dict(type='path', required=True), + dest_file=dict(type='str', required=True), + ), + ), + ) + module = AnsibleModule( + argument_spec=argument_spec, + required_one_of=[('delete_files', 'add_files'), ], + supports_check_mode=True, + ) + if not HAS_PYCDLIB: + module.fail_json( + missing_required_lib('pycdlib'), exception=PYCDLIB_IMP_ERR) + + src_iso = module.params['src_iso'] + if not os.path.exists(src_iso): + module.fail_json(msg="ISO file %s does not exist." % src_iso) + + dest_iso = module.params['dest_iso'] + dest_iso_dir = os.path.dirname(dest_iso) + if dest_iso_dir and not os.path.exists(dest_iso_dir): + module.fail_json(msg="The dest directory %s does not exist" % dest_iso_dir) + + delete_files_list = [s.strip() for s in module.params['delete_files']] + add_files_list = module.params['add_files'] + if add_files_list: + for item in add_files_list: + if not os.path.exists(item['src_file']): + module.fail_json(msg="The file %s does not exist." % item['src_file']) + + result = dict( + src_iso=src_iso, + customized_iso=dest_iso, + delete_files=delete_files_list, + add_files=add_files_list, + changed=True, + ) + + if not module.check_mode: + iso_rebuild(module, src_iso, dest_iso, delete_files_list, add_files_list) + + result['changed'] = True + module.exit_json(**result) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/iso_customize/aliases b/tests/integration/targets/iso_customize/aliases new file mode 100644 index 0000000000..bc011eaf8d --- /dev/null +++ b/tests/integration/targets/iso_customize/aliases @@ -0,0 +1,14 @@ +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +shippable/posix/group1 +destructive +skip/aix +skip/freebsd +skip/alpine +skip/python2.6 +skip/docker +needs/root + diff --git a/tests/integration/targets/iso_customize/meta/main.yml b/tests/integration/targets/iso_customize/meta/main.yml new file mode 100644 index 0000000000..982de6eb03 --- /dev/null +++ b/tests/integration/targets/iso_customize/meta/main.yml @@ -0,0 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +dependencies: + - setup_remote_tmp_dir diff --git a/tests/integration/targets/iso_customize/tasks/iso_customize.yml b/tests/integration/targets/iso_customize/tasks/iso_customize.yml new file mode 100644 index 0000000000..f7d7bffd10 --- /dev/null +++ b/tests/integration/targets/iso_customize/tasks/iso_customize.yml @@ -0,0 +1,75 @@ +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Add a line to the file test02.cfg and make sure it succeed + ansible.builtin.lineinfile: + path: "{{ test_dir }}/test02.cfg" + regexp: "^test" + line: "test" + +- name: "Customize ISO file: add file, delete file and change file" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test.iso" + dest_iso: "{{ test_dir }}/{{ dest_iso_name }}" + delete_files: + - "/test01.cfg" + add_files: + - src_file: "{{ test_dir }}/test01.cfg" + dest_file: "/preseed/ubuntu.seed" + - src_file: "{{ test_dir }}/test02.cfg" + dest_file: "/test02.cfg" + +- include_tasks: iso_mount.yml + vars: + iso_name: "{{ dest_iso_name }}" + +- debug: var=mount_root_dir + +- name: Check the file test01.cfg is deleted + stat: + path: "{{ mount_root_dir }}/test01.cfg" + register: check_file + +- assert: + that: + - check_file.stat.exists == False + +- name: Check the file /preseed/ubuntu.seed is added + stat: + path: "{{ mount_root_dir }}/preseed/ubuntu.seed" + register: check_file + +- assert: + that: + - check_file.stat.exists == True + +- block: + - name: Get the content of file test02.cfg + command: "cat {{ mount_root_dir }}/test02.cfg" + register: get_file_content + + - set_fact: + file_contents: "{{ get_file_content.stdout }}" + when: ansible_distribution == 'RedHat' and ansible_distribution_version is version('7.9', '==') + +- name: Get the content of file test02.cfg + set_fact: + file_contents: "{{ lookup('file', mount_root_dir + '/test02.cfg') }}" + when: not (ansible_distribution == 'RedHat' and ansible_distribution_version is version('7.9', '==')) + +- fail: msg="Failed to replace the file test02.cfg" + when: file_contents != "test" + +- name: Umount ISO + mount: + path: "{{ mount_root_dir }}" + fstab: "{{ test_dir }}/temp.fstab" + state: unmounted + +- name: Delete line of file test02.cfg + ansible.builtin.lineinfile: + path: "{{ test_dir }}/test02.cfg" + regexp: "test" + state: absent diff --git a/tests/integration/targets/iso_customize/tasks/iso_customize_add_files.yml b/tests/integration/targets/iso_customize/tasks/iso_customize_add_files.yml new file mode 100644 index 0000000000..210767707b --- /dev/null +++ b/tests/integration/targets/iso_customize/tasks/iso_customize_add_files.yml @@ -0,0 +1,34 @@ +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: "Customize ISO file: add file" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test1.iso" + dest_iso: "{{ test_dir }}/{{ dest_iso_name }}" + add_files: + - src_file: "{{ test_dir }}/test01.cfg" + dest_file: "preseed/ubuntu.seed" + + +- include_tasks: iso_mount.yml + vars: + iso_name: "{{ dest_iso_name }}" + +- debug: var=mount_root_dir + +- name: Check the file /preseed/ubuntu.seed is added + stat: + path: "{{ mount_root_dir }}/preseed/ubuntu.seed" + register: check_file + +- assert: + that: + - check_file.stat.exists == True + +- name: Umount ISO + mount: + path: "{{ mount_root_dir }}" + fstab: "{{ test_dir }}/temp.fstab" + state: unmounted diff --git a/tests/integration/targets/iso_customize/tasks/iso_customize_delete_files.yml b/tests/integration/targets/iso_customize/tasks/iso_customize_delete_files.yml new file mode 100644 index 0000000000..bceeeb53a9 --- /dev/null +++ b/tests/integration/targets/iso_customize/tasks/iso_customize_delete_files.yml @@ -0,0 +1,34 @@ +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: "Customize ISO file: delete file" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test1.iso" + dest_iso: "{{ test_dir }}/{{ dest_iso_name }}" + delete_files: + - "test01.cfg" + +- debug: var=ansible_distribution + +- include_tasks: iso_mount.yml + vars: + iso_name: "{{ dest_iso_name }}" + +- debug: var=mount_root_dir + +- name: Check the file test01.cfg is deleted + stat: + path: "{{ mount_root_dir }}/test01.cfg" + register: check_file + +- assert: + that: + - check_file.stat.exists == False + +- name: Umount ISO + mount: + path: "{{ mount_root_dir }}" + fstab: "{{ test_dir }}/temp.fstab" + state: unmounted diff --git a/tests/integration/targets/iso_customize/tasks/iso_customize_exception.yml b/tests/integration/targets/iso_customize/tasks/iso_customize_exception.yml new file mode 100644 index 0000000000..6716f9e1b4 --- /dev/null +++ b/tests/integration/targets/iso_customize/tasks/iso_customize_exception.yml @@ -0,0 +1,81 @@ +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: "Testcase: local resource ISO does not exists" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test11.iso" + dest_iso: "{{ test_dir }}/{{ dest_iso_name }}" + register: customized_result + failed_when: customized_result.msg.find('does not exist') == -1 + +- name: "Testcase:: dest dir does not exists" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test1.iso" + dest_iso: "/aaa/{{ dest_iso_name }}" + register: customized_result + failed_when: customized_result.msg.find('does not exist') == -1 + +# Test: Get MODULE FAILURE when no add files data and no delete files data +- name: "Testcase:: no add files data and no delete files data" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test1.iso" + dest_iso: "{{ test_dir }}/iso_customize_nodata.iso" + delete_files: + add_files: + register: customized_result + failed_when: customized_result.msg.find("MODULE FAILURE") == -1 + +# Test: nothing is changed when no options "add files" and "delete files" +- block: + - name: "Testcase: no options 'add files' and 'delete files'" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test1.iso" + dest_iso: "{{ test_dir }}/iso_customize_nochanged.iso" + + - name: Get stats of a file test1.iso + ansible.builtin.stat: + path: "{{ test_dir }}/test1.iso" + register: iso_orginal + + - name: Get stats of a file iso_customize_nochanged.iso + ansible.builtin.stat: + path: "{{ test_dir }}/iso_customize_nochanged.iso" + register: iso_customized + + - name: compare size + fail: msg="Check we have nothing changed for customized ISO" + when: iso_orginal.stat.size != iso_customized.stat.size + +- name: "Testcase: delete the non-existing file in ISO" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test1.iso" + dest_iso: "{{ test_dir }}/{{ dest_iso_name }}" + delete_files: + - "/test03.cfg" + register: customized_result + failed_when: customized_result.msg.find("does not exist") == -1 + +# Test: failed when local src file does not exists +- name: "Testcase: local src file does not exists" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test.iso" + dest_iso: "{{ test_dir }}/{{ dest_iso_name }}" + add_files: + - src_file: "{{ test_dir }}/test03.cfg" + dest_file: "/preseed/ubuntu.seed" + register: customized_result + failed_when: customized_result.msg.find("does not exist") == -1 + +# Test: filenames with whitespaces +# We report error: the user should be reponsible for the it +- name: "Testcase: filenames with whitespaces" + community.general.iso_customize: + src_iso: "{{ test_dir }}/test.iso" + dest_iso: "{{ test_dir }}/{{ dest_iso_name }}" + add_files: + - src_file: " {{ test_dir }}/test01.cfg " + dest_file: "/preseed/ubuntu.seed" + register: customized_result + failed_when: customized_result.msg.find("does not exist") == -1 diff --git a/tests/integration/targets/iso_customize/tasks/iso_mount.yml b/tests/integration/targets/iso_customize/tasks/iso_mount.yml new file mode 100644 index 0000000000..cf4ab81996 --- /dev/null +++ b/tests/integration/targets/iso_customize/tasks/iso_mount.yml @@ -0,0 +1,39 @@ +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- debug: var=ansible_distribution + +- block: + - name: "Mount customized ISO on MAC" + command: "hdiutil attach {{ test_dir }}/{{ iso_name }} -mountroot {{ test_dir }}/iso_mount" + + # For MAC, we have different root directory for different type of ISO + - set_fact: + mount_root_dir: "{{ test_dir }}/iso_mount/disk_image" + + - set_fact: + mount_root_dir: "{{ test_dir }}/iso_mount/AUTOINSTALL" + when: iso_name.find('joliet') != -1 + + - set_fact: + mount_root_dir: "{{ test_dir }}/iso_mount/CDROM" + when: iso_name.find('udf') != -1 + when: ansible_distribution == "MacOSX" + +- block: + - name: "Mount {{ iso_name }} to {{ test_dir }}/iso_mount on localhost" + become: true + ansible.posix.mount: + path: "{{ test_dir }}/iso_mount" + src: "{{ test_dir }}/{{ iso_name }}" + opts: "ro,noauto" + fstab: "{{ test_dir }}/temp.fstab" + fstype: "iso9660" + state: mounted + + - set_fact: + mount_root_dir: "{{ test_dir }}/iso_mount" + when: + - ansible_distribution != "MacOSX" diff --git a/tests/integration/targets/iso_customize/tasks/main.yml b/tests/integration/targets/iso_customize/tasks/main.yml new file mode 100644 index 0000000000..5745b1a8ad --- /dev/null +++ b/tests/integration/targets/iso_customize/tasks/main.yml @@ -0,0 +1,94 @@ +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Skip some platforms which does not support ansible.posix.mount + meta: end_play + when: ansible_distribution in ['Alpine'] + +- set_fact: + test_dir: '{{ remote_tmp_dir }}/test_iso_customize' + +- include_tasks: prepare.yml + +- name: Create iso file with a specified file and directory + community.general.iso_create: + src_files: + - "{{ test_dir }}/test01.cfg" + - "{{ test_dir }}/test02.cfg" + dest_iso: "{{ test_dir }}/test.iso" + interchange_level: 3 + +- include_tasks: iso_customize.yml + vars: + dest_iso_name: "iso_customize.iso" + +- name: Create an ISO file with Rock Ridge extension + community.general.iso_create: + src_files: + - "{{ test_dir }}/test01.cfg" + - "{{ test_dir }}/test02.cfg" + dest_iso: "{{ test_dir }}/test.iso" + rock_ridge: "1.09" + +- include_tasks: iso_customize.yml + vars: + dest_iso_name: "iso_customize_rr.iso" + +- name: Create an ISO file with Joliet support + community.general.iso_create: + src_files: + - "{{ test_dir }}/test01.cfg" + - "{{ test_dir }}/test02.cfg" + dest_iso: "{{ test_dir }}/test.iso" + interchange_level: 3 + joliet: 3 + vol_ident: AUTOINSTALL + +- include_tasks: iso_customize.yml + vars: + dest_iso_name: "iso_customize_joliet.iso" + +- name: Create iso file with UDF enabled + community.general.iso_create: + src_files: + - "{{ test_dir }}/test01.cfg" + - "{{ test_dir }}/test02.cfg" + dest_iso: "{{ test_dir }}/test.iso" + udf: True + +- include_tasks: iso_customize.yml + vars: + dest_iso_name: "iso_customize_udf.iso" + +# Create initial iso for customzing with only option add_files/delete_files +- name: Create iso file with a specified file and directory + community.general.iso_create: + src_files: + - "{{ test_dir }}/test01.cfg" + dest_iso: "{{ test_dir }}/test1.iso" + interchange_level: 3 + +- include_tasks: iso_customize_add_files.yml + vars: + dest_iso_name: "iso_customize_add.iso" + +- include_tasks: iso_customize_delete_files.yml + vars: + dest_iso_name: "iso_customize_delete.iso" + +# Test: misc exception +- include_tasks: iso_customize_exception.yml + vars: + dest_iso_name: "iso_customize_exception.iso" + +- name: Delete testing sub-directory + ansible.builtin.file: + path: '{{ test_dir }}' + state: absent diff --git a/tests/integration/targets/iso_customize/tasks/prepare.yml b/tests/integration/targets/iso_customize/tasks/prepare.yml new file mode 100644 index 0000000000..0db78553d0 --- /dev/null +++ b/tests/integration/targets/iso_customize/tasks/prepare.yml @@ -0,0 +1,39 @@ +# Copyright (c) 2022, Ansible Project +# Copyright (c) 2022, VMware, Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: install pycdlib + ansible.builtin.pip: + name: pycdlib + +- name: Make sure the previous testing sub-directory is deleted + ansible.builtin.file: + path: '{{ test_dir }}' + state: absent + +- name: Create our testing sub-directory + ansible.builtin.file: + path: '{{ test_dir }}' + state: directory + +- name: Create sub directory to mount customized ISO + ansible.builtin.file: + path: '{{ test_dir }}/iso_mount' + state: directory + +- name: Create temporary file test01.cfg for testing + ansible.builtin.file: + path: "{{ test_dir }}/test01.cfg" + state: touch + +- name: Add a line to the file test01.cfg and make sure it succeed + ansible.builtin.lineinfile: + path: "{{ test_dir }}/test01.cfg" + regexp: "^aaa" + line: "aaa" + +- name: Create temporary file test02.cfg for testing + ansible.builtin.file: + path: "{{ test_dir }}/test02.cfg" + state: touch From e47845ab3a85ae1747c484cd3b9004be244942c3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 11 Oct 2022 07:34:36 +0200 Subject: [PATCH 0249/2104] Change CI group identifiers. (#5344) --- .azure-pipelines/azure-pipelines.yml | 42 +++++++++---------- .../targets/alerta_customer/aliases | 2 +- .../integration/targets/alternatives/aliases | 2 +- .../targets/ansible_galaxy_install/aliases | 2 +- .../targets/apache2_module/aliases | 2 +- tests/integration/targets/archive/aliases | 2 +- .../integration/targets/callback_diy/aliases | 2 +- .../targets/callback_log_plays/aliases | 2 +- .../integration/targets/callback_yaml/aliases | 2 +- tests/integration/targets/cargo/aliases | 2 +- .../targets/cloud_init_data_facts/aliases | 2 +- tests/integration/targets/cmd_runner/aliases | 2 +- .../targets/connection_chroot/aliases | 2 +- tests/integration/targets/consul/aliases | 2 +- tests/integration/targets/copr/aliases | 2 +- tests/integration/targets/cpanm/aliases | 2 +- tests/integration/targets/cronvar/aliases | 2 +- .../integration/targets/deploy_helper/aliases | 2 +- .../integration/targets/django_manage/aliases | 2 +- .../targets/dnf_versionlock/aliases | 2 +- tests/integration/targets/dpkg_divert/aliases | 2 +- tests/integration/targets/etcd3/aliases | 2 +- tests/integration/targets/filesize/aliases | 2 +- tests/integration/targets/filesystem/aliases | 2 +- .../targets/filter_counter/aliases | 2 +- tests/integration/targets/filter_dict/aliases | 2 +- .../targets/filter_dict_kv/aliases | 2 +- .../targets/filter_from_csv/aliases | 2 +- .../targets/filter_groupby_as_dict/aliases | 2 +- .../targets/filter_hashids/aliases | 2 +- tests/integration/targets/filter_jc/aliases | 2 +- .../targets/filter_json_query/aliases | 2 +- .../targets/filter_lists_mergeby/aliases | 2 +- .../targets/filter_path_join_shim/aliases | 2 +- .../targets/filter_random_mac/aliases | 2 +- tests/integration/targets/filter_time/aliases | 2 +- .../targets/filter_unicode_normalize/aliases | 2 +- .../targets/filter_version_sort/aliases | 2 +- tests/integration/targets/flatpak/aliases | 2 +- .../targets/flatpak_remote/aliases | 2 +- tests/integration/targets/gem/aliases | 2 +- tests/integration/targets/git_config/aliases | 2 +- .../integration/targets/github_issue/aliases | 2 +- .../integration/targets/gitlab_branch/aliases | 2 +- .../targets/gitlab_deploy_key/aliases | 2 +- .../integration/targets/gitlab_group/aliases | 2 +- tests/integration/targets/gitlab_hook/aliases | 2 +- .../targets/gitlab_project/aliases | 2 +- .../integration/targets/gitlab_runner/aliases | 2 +- tests/integration/targets/gitlab_user/aliases | 2 +- tests/integration/targets/hg/aliases | 2 +- tests/integration/targets/homebrew/aliases | 2 +- .../integration/targets/homebrew_cask/aliases | 2 +- tests/integration/targets/homectl/aliases | 2 +- .../integration/targets/influxdb_user/aliases | 2 +- tests/integration/targets/ini_file/aliases | 2 +- .../targets/interfaces_file/aliases | 2 +- tests/integration/targets/ipify_facts/aliases | 2 +- .../targets/iptables_state/aliases | 2 +- tests/integration/targets/iso_create/aliases | 2 +- .../integration/targets/iso_customize/aliases | 3 +- tests/integration/targets/iso_extract/aliases | 2 +- tests/integration/targets/java_cert/aliases | 2 +- .../integration/targets/java_keystore/aliases | 2 +- tests/integration/targets/jboss/aliases | 2 +- tests/integration/targets/jira/aliases | 2 +- .../targets/kernel_blacklist/aliases | 2 +- tests/integration/targets/launchd/aliases | 2 +- tests/integration/targets/ldap_search/aliases | 2 +- .../targets/listen_ports_facts/aliases | 2 +- tests/integration/targets/locale_gen/aliases | 2 +- .../targets/lookup_cartesian/aliases | 2 +- .../targets/lookup_collection_version/aliases | 2 +- .../targets/lookup_dependent/aliases | 2 +- tests/integration/targets/lookup_dig/aliases | 2 +- .../integration/targets/lookup_etcd3/aliases | 2 +- .../targets/lookup_flattened/aliases | 2 +- .../targets/lookup_lmdb_kv/aliases | 2 +- .../targets/lookup_passwordstore/aliases | 2 +- .../targets/lookup_random_pet/aliases | 2 +- .../targets/lookup_random_string/aliases | 2 +- .../targets/lookup_random_words/aliases | 2 +- tests/integration/targets/lvg/aliases | 2 +- tests/integration/targets/mail/aliases | 2 +- .../integration/targets/module_helper/aliases | 2 +- tests/integration/targets/monit/aliases | 2 +- tests/integration/targets/mqtt/aliases | 2 +- tests/integration/targets/nomad/aliases | 2 +- tests/integration/targets/npm/aliases | 2 +- tests/integration/targets/odbc/aliases | 2 +- tests/integration/targets/one_host/aliases | 2 +- .../integration/targets/one_template/aliases | 2 +- .../integration/targets/osx_defaults/aliases | 2 +- tests/integration/targets/pacman/aliases | 2 +- tests/integration/targets/pam_limits/aliases | 2 +- tests/integration/targets/pamd/aliases | 2 +- tests/integration/targets/pids/aliases | 2 +- tests/integration/targets/pipx/aliases | 2 +- tests/integration/targets/pipx_info/aliases | 2 +- tests/integration/targets/pkgng/aliases | 2 +- .../targets/python_requirements_info/aliases | 2 +- tests/integration/targets/read_csv/aliases | 2 +- tests/integration/targets/redis_info/aliases | 2 +- tests/integration/targets/rundeck/aliases | 2 +- tests/integration/targets/sefcontext/aliases | 2 +- .../integration/targets/sensu_client/aliases | 2 +- .../integration/targets/sensu_handler/aliases | 2 +- tests/integration/targets/shutdown/aliases | 2 +- tests/integration/targets/snap/aliases | 2 +- tests/integration/targets/snap_alias/aliases | 2 +- tests/integration/targets/ssh_config/aliases | 2 +- tests/integration/targets/sudoers/aliases | 2 +- .../integration/targets/supervisorctl/aliases | 2 +- tests/integration/targets/sysrc/aliases | 2 +- tests/integration/targets/terraform/aliases | 2 +- .../integration/targets/test_a_module/aliases | 2 +- tests/integration/targets/timezone/aliases | 2 +- tests/integration/targets/ufw/aliases | 2 +- tests/integration/targets/wakeonlan/aliases | 2 +- tests/integration/targets/xattr/aliases | 2 +- tests/integration/targets/xfs_quota/aliases | 2 +- tests/integration/targets/xml/aliases | 2 +- tests/integration/targets/yarn/aliases | 2 +- .../targets/yum_versionlock/aliases | 2 +- tests/integration/targets/zypper/aliases | 2 +- .../targets/zypper_repository/aliases | 2 +- tests/sanity/extra/aliases.py | 6 +-- .../utils/shippable/{cloud.sh => generic.sh} | 3 +- tests/utils/shippable/linux-community.sh | 4 +- tests/utils/shippable/linux.sh | 4 +- tests/utils/shippable/remote.sh | 4 +- 131 files changed, 156 insertions(+), 158 deletions(-) rename tests/utils/shippable/{cloud.sh => generic.sh} (90%) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 7daed5cb12..e590812264 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -392,56 +392,56 @@ stages: - 2 - 3 -### Cloud - - stage: Cloud_devel - displayName: Cloud devel +### Generic + - stage: Generic_devel + displayName: Generic devel dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: devel/cloud/{0}/1 + testFormat: devel/generic/{0}/1 targets: - test: 2.7 - test: '3.11' - - stage: Cloud_2_14 - displayName: Cloud 2.14 + - stage: Generic_2_14 + displayName: Generic 2.14 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.14/cloud/{0}/1 + testFormat: 2.14/generic/{0}/1 targets: - test: '3.10' - - stage: Cloud_2_13 - displayName: Cloud 2.13 + - stage: Generic_2_13 + displayName: Generic 2.13 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.13/cloud/{0}/1 + testFormat: 2.13/generic/{0}/1 targets: - test: 3.9 - - stage: Cloud_2_12 - displayName: Cloud 2.12 + - stage: Generic_2_12 + displayName: Generic 2.12 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.12/cloud/{0}/1 + testFormat: 2.12/generic/{0}/1 targets: - test: 3.8 - - stage: Cloud_2_11 - displayName: Cloud 2.11 + - stage: Generic_2_11 + displayName: Generic 2.11 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.11/cloud/{0}/1 + testFormat: 2.11/generic/{0}/1 targets: - test: 2.7 - test: 3.5 @@ -470,10 +470,10 @@ stages: - Docker_2_13 - Docker_2_14 - Docker_community_devel - - Cloud_devel - - Cloud_2_11 - - Cloud_2_12 - - Cloud_2_13 - - Cloud_2_14 + - Generic_devel + - Generic_2_11 + - Generic_2_12 + - Generic_2_13 + - Generic_2_14 jobs: - template: templates/coverage.yml diff --git a/tests/integration/targets/alerta_customer/aliases b/tests/integration/targets/alerta_customer/aliases index 1a0d20b0b2..d163e8d9ca 100644 --- a/tests/integration/targets/alerta_customer/aliases +++ b/tests/integration/targets/alerta_customer/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 disabled diff --git a/tests/integration/targets/alternatives/aliases b/tests/integration/targets/alternatives/aliases index d281365a46..f360ac626a 100644 --- a/tests/integration/targets/alternatives/aliases +++ b/tests/integration/targets/alternatives/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 destructive needs/root skip/aix diff --git a/tests/integration/targets/ansible_galaxy_install/aliases b/tests/integration/targets/ansible_galaxy_install/aliases index de4a0e413a..13655b1945 100644 --- a/tests/integration/targets/ansible_galaxy_install/aliases +++ b/tests/integration/targets/ansible_galaxy_install/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive -shippable/posix/group3 skip/python2.6 context/controller # While this is not really true, this module mainly is run on the controller, *and* needs access to the ansible-galaxy CLI tool diff --git a/tests/integration/targets/apache2_module/aliases b/tests/integration/targets/apache2_module/aliases index 64596c2b12..0d1324b22a 100644 --- a/tests/integration/targets/apache2_module/aliases +++ b/tests/integration/targets/apache2_module/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive -shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/archive/aliases b/tests/integration/targets/archive/aliases index 421f918a39..88b15a24f3 100644 --- a/tests/integration/targets/archive/aliases +++ b/tests/integration/targets/archive/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/2 needs/root -shippable/posix/group2 destructive skip/aix skip/osx # FIXME diff --git a/tests/integration/targets/callback_diy/aliases b/tests/integration/targets/callback_diy/aliases index c0ba6c5230..3e2dd244c1 100644 --- a/tests/integration/targets/callback_diy/aliases +++ b/tests/integration/targets/callback_diy/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 needs/target/callback diff --git a/tests/integration/targets/callback_log_plays/aliases b/tests/integration/targets/callback_log_plays/aliases index 7a0fc5c1ea..343f119da8 100644 --- a/tests/integration/targets/callback_log_plays/aliases +++ b/tests/integration/targets/callback_log_plays/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 diff --git a/tests/integration/targets/callback_yaml/aliases b/tests/integration/targets/callback_yaml/aliases index 56b63416e2..a27cf0e26f 100644 --- a/tests/integration/targets/callback_yaml/aliases +++ b/tests/integration/targets/callback_yaml/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 needs/target/callback diff --git a/tests/integration/targets/cargo/aliases b/tests/integration/targets/cargo/aliases index 190289e117..9c7febe241 100644 --- a/tests/integration/targets/cargo/aliases +++ b/tests/integration/targets/cargo/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/2 destructive -shippable/posix/group2 skip/aix diff --git a/tests/integration/targets/cloud_init_data_facts/aliases b/tests/integration/targets/cloud_init_data_facts/aliases index ce552edd9c..bec4d21af6 100644 --- a/tests/integration/targets/cloud_init_data_facts/aliases +++ b/tests/integration/targets/cloud_init_data_facts/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/cmd_runner/aliases b/tests/integration/targets/cmd_runner/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/cmd_runner/aliases +++ b/tests/integration/targets/cmd_runner/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/connection_chroot/aliases b/tests/integration/targets/connection_chroot/aliases index 847f93469a..38138ee4d8 100644 --- a/tests/integration/targets/connection_chroot/aliases +++ b/tests/integration/targets/connection_chroot/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 needs/root -shippable/posix/group3 skip/macos # Skipped due to limitation of macOS 10.15 SIP, please read https://github.com/ansible-collections/community.general/issues/1017#issuecomment-755088895 diff --git a/tests/integration/targets/consul/aliases b/tests/integration/targets/consul/aliases index 3b6b148f7e..d9cf1eb9ce 100644 --- a/tests/integration/targets/consul/aliases +++ b/tests/integration/targets/consul/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 destructive skip/aix skip/macos # cannot simply create binaries in system locations on newer macOS versions diff --git a/tests/integration/targets/copr/aliases b/tests/integration/targets/copr/aliases index 836e186b55..ed3c1af00d 100644 --- a/tests/integration/targets/copr/aliases +++ b/tests/integration/targets/copr/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 needs/root skip/macos skip/osx diff --git a/tests/integration/targets/cpanm/aliases b/tests/integration/targets/cpanm/aliases index 73181a8621..d30ba06b69 100644 --- a/tests/integration/targets/cpanm/aliases +++ b/tests/integration/targets/cpanm/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 destructive skip/macos skip/osx diff --git a/tests/integration/targets/cronvar/aliases b/tests/integration/targets/cronvar/aliases index 77e5c4afa2..e9ef7265dc 100644 --- a/tests/integration/targets/cronvar/aliases +++ b/tests/integration/targets/cronvar/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive -shippable/posix/group3 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/deploy_helper/aliases b/tests/integration/targets/deploy_helper/aliases index abc0d5476d..afda346c4e 100644 --- a/tests/integration/targets/deploy_helper/aliases +++ b/tests/integration/targets/deploy_helper/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 diff --git a/tests/integration/targets/django_manage/aliases b/tests/integration/targets/django_manage/aliases index 0e2bbfeb8e..025fe0ec48 100644 --- a/tests/integration/targets/django_manage/aliases +++ b/tests/integration/targets/django_manage/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2 skip/freebsd skip/macos diff --git a/tests/integration/targets/dnf_versionlock/aliases b/tests/integration/targets/dnf_versionlock/aliases index 3cde3b1715..b85ae64190 100644 --- a/tests/integration/targets/dnf_versionlock/aliases +++ b/tests/integration/targets/dnf_versionlock/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/dpkg_divert/aliases b/tests/integration/targets/dpkg_divert/aliases index 39a9de2b1b..050bf89b4a 100644 --- a/tests/integration/targets/dpkg_divert/aliases +++ b/tests/integration/targets/dpkg_divert/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/etcd3/aliases b/tests/integration/targets/etcd3/aliases index b8da295be8..264446580b 100644 --- a/tests/integration/targets/etcd3/aliases +++ b/tests/integration/targets/etcd3/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 destructive skip/aix skip/osx diff --git a/tests/integration/targets/filesize/aliases b/tests/integration/targets/filesize/aliases index abc0d5476d..afda346c4e 100644 --- a/tests/integration/targets/filesize/aliases +++ b/tests/integration/targets/filesize/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 diff --git a/tests/integration/targets/filesystem/aliases b/tests/integration/targets/filesystem/aliases index 86d2291bb5..007bed5386 100644 --- a/tests/integration/targets/filesystem/aliases +++ b/tests/integration/targets/filesystem/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/filter_counter/aliases b/tests/integration/targets/filter_counter/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_counter/aliases +++ b/tests/integration/targets/filter_counter/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_dict/aliases b/tests/integration/targets/filter_dict/aliases index 2ae66ec51c..e8051e0427 100644 --- a/tests/integration/targets/filter_dict/aliases +++ b/tests/integration/targets/filter_dict/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_dict_kv/aliases b/tests/integration/targets/filter_dict_kv/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_dict_kv/aliases +++ b/tests/integration/targets/filter_dict_kv/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_from_csv/aliases b/tests/integration/targets/filter_from_csv/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_from_csv/aliases +++ b/tests/integration/targets/filter_from_csv/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_groupby_as_dict/aliases b/tests/integration/targets/filter_groupby_as_dict/aliases index 2ae66ec51c..e8051e0427 100644 --- a/tests/integration/targets/filter_groupby_as_dict/aliases +++ b/tests/integration/targets/filter_groupby_as_dict/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_hashids/aliases b/tests/integration/targets/filter_hashids/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_hashids/aliases +++ b/tests/integration/targets/filter_hashids/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_jc/aliases b/tests/integration/targets/filter_jc/aliases index 49b40f054d..0e799090e8 100644 --- a/tests/integration/targets/filter_jc/aliases +++ b/tests/integration/targets/filter_jc/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller skip/python2.7 # jc only supports python3.x diff --git a/tests/integration/targets/filter_json_query/aliases b/tests/integration/targets/filter_json_query/aliases index 08d571c495..cee9abd2ce 100644 --- a/tests/integration/targets/filter_json_query/aliases +++ b/tests/integration/targets/filter_json_query/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller skip/aix diff --git a/tests/integration/targets/filter_lists_mergeby/aliases b/tests/integration/targets/filter_lists_mergeby/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_lists_mergeby/aliases +++ b/tests/integration/targets/filter_lists_mergeby/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_path_join_shim/aliases b/tests/integration/targets/filter_path_join_shim/aliases index b7419a24dd..51baa3d7ad 100644 --- a/tests/integration/targets/filter_path_join_shim/aliases +++ b/tests/integration/targets/filter_path_join_shim/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_random_mac/aliases b/tests/integration/targets/filter_random_mac/aliases index 08d571c495..cee9abd2ce 100644 --- a/tests/integration/targets/filter_random_mac/aliases +++ b/tests/integration/targets/filter_random_mac/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller skip/aix diff --git a/tests/integration/targets/filter_time/aliases b/tests/integration/targets/filter_time/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_time/aliases +++ b/tests/integration/targets/filter_time/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_unicode_normalize/aliases b/tests/integration/targets/filter_unicode_normalize/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_unicode_normalize/aliases +++ b/tests/integration/targets/filter_unicode_normalize/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/filter_version_sort/aliases b/tests/integration/targets/filter_version_sort/aliases index d3b8ee2b84..bc9b4bc99b 100644 --- a/tests/integration/targets/filter_version_sort/aliases +++ b/tests/integration/targets/filter_version_sort/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/flatpak/aliases b/tests/integration/targets/flatpak/aliases index 3ac0267953..e462ed8cb6 100644 --- a/tests/integration/targets/flatpak/aliases +++ b/tests/integration/targets/flatpak/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 destructive skip/aix skip/freebsd diff --git a/tests/integration/targets/flatpak_remote/aliases b/tests/integration/targets/flatpak_remote/aliases index 3ac0267953..e462ed8cb6 100644 --- a/tests/integration/targets/flatpak_remote/aliases +++ b/tests/integration/targets/flatpak_remote/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 destructive skip/aix skip/freebsd diff --git a/tests/integration/targets/gem/aliases b/tests/integration/targets/gem/aliases index 86d2291bb5..007bed5386 100644 --- a/tests/integration/targets/gem/aliases +++ b/tests/integration/targets/gem/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/git_config/aliases b/tests/integration/targets/git_config/aliases index 806c0598a4..7b8c653de6 100644 --- a/tests/integration/targets/git_config/aliases +++ b/tests/integration/targets/git_config/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 skip/aix destructive diff --git a/tests/integration/targets/github_issue/aliases b/tests/integration/targets/github_issue/aliases index abaeb52e6d..428e8289dc 100644 --- a/tests/integration/targets/github_issue/aliases +++ b/tests/integration/targets/github_issue/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 diff --git a/tests/integration/targets/gitlab_branch/aliases b/tests/integration/targets/gitlab_branch/aliases index 1a0d20b0b2..d163e8d9ca 100644 --- a/tests/integration/targets/gitlab_branch/aliases +++ b/tests/integration/targets/gitlab_branch/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 disabled diff --git a/tests/integration/targets/gitlab_deploy_key/aliases b/tests/integration/targets/gitlab_deploy_key/aliases index 0d1cc45a85..fc0e157c90 100644 --- a/tests/integration/targets/gitlab_deploy_key/aliases +++ b/tests/integration/targets/gitlab_deploy_key/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_group/aliases b/tests/integration/targets/gitlab_group/aliases index 0d1cc45a85..fc0e157c90 100644 --- a/tests/integration/targets/gitlab_group/aliases +++ b/tests/integration/targets/gitlab_group/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_hook/aliases b/tests/integration/targets/gitlab_hook/aliases index 0d1cc45a85..fc0e157c90 100644 --- a/tests/integration/targets/gitlab_hook/aliases +++ b/tests/integration/targets/gitlab_hook/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_project/aliases b/tests/integration/targets/gitlab_project/aliases index 0d1cc45a85..fc0e157c90 100644 --- a/tests/integration/targets/gitlab_project/aliases +++ b/tests/integration/targets/gitlab_project/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_runner/aliases b/tests/integration/targets/gitlab_runner/aliases index 0d1cc45a85..fc0e157c90 100644 --- a/tests/integration/targets/gitlab_runner/aliases +++ b/tests/integration/targets/gitlab_runner/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 gitlab/ci disabled diff --git a/tests/integration/targets/gitlab_user/aliases b/tests/integration/targets/gitlab_user/aliases index 0d1cc45a85..fc0e157c90 100644 --- a/tests/integration/targets/gitlab_user/aliases +++ b/tests/integration/targets/gitlab_user/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 gitlab/ci disabled diff --git a/tests/integration/targets/hg/aliases b/tests/integration/targets/hg/aliases index 8bda40608c..e1d7ab2a2d 100644 --- a/tests/integration/targets/hg/aliases +++ b/tests/integration/targets/hg/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python3 skip/aix diff --git a/tests/integration/targets/homebrew/aliases b/tests/integration/targets/homebrew/aliases index 8f34f67cb8..11bb9a0860 100644 --- a/tests/integration/targets/homebrew/aliases +++ b/tests/integration/targets/homebrew/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/rhel diff --git a/tests/integration/targets/homebrew_cask/aliases b/tests/integration/targets/homebrew_cask/aliases index 8f34f67cb8..11bb9a0860 100644 --- a/tests/integration/targets/homebrew_cask/aliases +++ b/tests/integration/targets/homebrew_cask/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/rhel diff --git a/tests/integration/targets/homectl/aliases b/tests/integration/targets/homectl/aliases index 8cee099853..8d80bf12c3 100644 --- a/tests/integration/targets/homectl/aliases +++ b/tests/integration/targets/homectl/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/influxdb_user/aliases b/tests/integration/targets/influxdb_user/aliases index 14d23a4da1..8c1a7b3298 100644 --- a/tests/integration/targets/influxdb_user/aliases +++ b/tests/integration/targets/influxdb_user/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 disabled skip/osx skip/macos diff --git a/tests/integration/targets/ini_file/aliases b/tests/integration/targets/ini_file/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/ini_file/aliases +++ b/tests/integration/targets/ini_file/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/interfaces_file/aliases b/tests/integration/targets/interfaces_file/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/interfaces_file/aliases +++ b/tests/integration/targets/interfaces_file/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/ipify_facts/aliases b/tests/integration/targets/ipify_facts/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/ipify_facts/aliases +++ b/tests/integration/targets/ipify_facts/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/iptables_state/aliases b/tests/integration/targets/iptables_state/aliases index 9f4768782b..80f7c7e32f 100644 --- a/tests/integration/targets/iptables_state/aliases +++ b/tests/integration/targets/iptables_state/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/docker # kernel modules not loadable skip/freebsd # no iptables/netfilter (Linux specific) skip/osx # no iptables/netfilter (Linux specific) diff --git a/tests/integration/targets/iso_create/aliases b/tests/integration/targets/iso_create/aliases index f6ee7272f0..4fb0bec810 100644 --- a/tests/integration/targets/iso_create/aliases +++ b/tests/integration/targets/iso_create/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 destructive skip/aix skip/python2.6 diff --git a/tests/integration/targets/iso_customize/aliases b/tests/integration/targets/iso_customize/aliases index bc011eaf8d..54a0f1a04d 100644 --- a/tests/integration/targets/iso_customize/aliases +++ b/tests/integration/targets/iso_customize/aliases @@ -3,7 +3,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 destructive skip/aix skip/freebsd @@ -11,4 +11,3 @@ skip/alpine skip/python2.6 skip/docker needs/root - diff --git a/tests/integration/targets/iso_extract/aliases b/tests/integration/targets/iso_extract/aliases index b0d05577af..5b0ab153c8 100644 --- a/tests/integration/targets/iso_extract/aliases +++ b/tests/integration/targets/iso_extract/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 needs/target/setup_epel destructive skip/aix diff --git a/tests/integration/targets/java_cert/aliases b/tests/integration/targets/java_cert/aliases index b9305b0928..573cb189bf 100644 --- a/tests/integration/targets/java_cert/aliases +++ b/tests/integration/targets/java_cert/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive -shippable/posix/group3 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/java_keystore/aliases b/tests/integration/targets/java_keystore/aliases index b9305b0928..573cb189bf 100644 --- a/tests/integration/targets/java_keystore/aliases +++ b/tests/integration/targets/java_keystore/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive -shippable/posix/group3 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/jboss/aliases b/tests/integration/targets/jboss/aliases index 23525810c4..38b6706fe1 100644 --- a/tests/integration/targets/jboss/aliases +++ b/tests/integration/targets/jboss/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/jira/aliases b/tests/integration/targets/jira/aliases index a58c201a4c..9c3dc5670a 100644 --- a/tests/integration/targets/jira/aliases +++ b/tests/integration/targets/jira/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 unsupported -shippable/posix/group3 diff --git a/tests/integration/targets/kernel_blacklist/aliases b/tests/integration/targets/kernel_blacklist/aliases index abc0d5476d..afda346c4e 100644 --- a/tests/integration/targets/kernel_blacklist/aliases +++ b/tests/integration/targets/kernel_blacklist/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 diff --git a/tests/integration/targets/launchd/aliases b/tests/integration/targets/launchd/aliases index 4507815d09..a350886969 100644 --- a/tests/integration/targets/launchd/aliases +++ b/tests/integration/targets/launchd/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/freebsd skip/rhel diff --git a/tests/integration/targets/ldap_search/aliases b/tests/integration/targets/ldap_search/aliases index 76ff20c90e..7958445488 100644 --- a/tests/integration/targets/ldap_search/aliases +++ b/tests/integration/targets/ldap_search/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/listen_ports_facts/aliases b/tests/integration/targets/listen_ports_facts/aliases index 5e86d2a3f4..620afe071d 100644 --- a/tests/integration/targets/listen_ports_facts/aliases +++ b/tests/integration/targets/listen_ports_facts/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 destructive skip/aix skip/osx diff --git a/tests/integration/targets/locale_gen/aliases b/tests/integration/targets/locale_gen/aliases index 5cbd0a392b..f7f4063f6c 100644 --- a/tests/integration/targets/locale_gen/aliases +++ b/tests/integration/targets/locale_gen/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive needs/root -shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/lookup_cartesian/aliases b/tests/integration/targets/lookup_cartesian/aliases index 1ad3384c7e..2bdcc01132 100644 --- a/tests/integration/targets/lookup_cartesian/aliases +++ b/tests/integration/targets/lookup_cartesian/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_collection_version/aliases b/tests/integration/targets/lookup_collection_version/aliases index 7a0fc5c1ea..343f119da8 100644 --- a/tests/integration/targets/lookup_collection_version/aliases +++ b/tests/integration/targets/lookup_collection_version/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 diff --git a/tests/integration/targets/lookup_dependent/aliases b/tests/integration/targets/lookup_dependent/aliases index fcbe73470c..26ad5c2449 100644 --- a/tests/integration/targets/lookup_dependent/aliases +++ b/tests/integration/targets/lookup_dependent/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_dig/aliases b/tests/integration/targets/lookup_dig/aliases index 1def1a1485..eb449a9cfe 100644 --- a/tests/integration/targets/lookup_dig/aliases +++ b/tests/integration/targets/lookup_dig/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_etcd3/aliases b/tests/integration/targets/lookup_etcd3/aliases index 9ec6614633..b9f3395f79 100644 --- a/tests/integration/targets/lookup_etcd3/aliases +++ b/tests/integration/targets/lookup_etcd3/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 destructive needs/file/tests/utils/constraints.txt needs/target/setup_etcd3 diff --git a/tests/integration/targets/lookup_flattened/aliases b/tests/integration/targets/lookup_flattened/aliases index 708d3bcd12..0ac9bad98a 100644 --- a/tests/integration/targets/lookup_flattened/aliases +++ b/tests/integration/targets/lookup_flattened/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_lmdb_kv/aliases b/tests/integration/targets/lookup_lmdb_kv/aliases index 7c50594f42..66632fb4a9 100644 --- a/tests/integration/targets/lookup_lmdb_kv/aliases +++ b/tests/integration/targets/lookup_lmdb_kv/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 destructive skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_passwordstore/aliases b/tests/integration/targets/lookup_passwordstore/aliases index c9fb7e80db..0d4c5af3b2 100644 --- a/tests/integration/targets/lookup_passwordstore/aliases +++ b/tests/integration/targets/lookup_passwordstore/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 destructive skip/aix skip/rhel diff --git a/tests/integration/targets/lookup_random_pet/aliases b/tests/integration/targets/lookup_random_pet/aliases index 708d3bcd12..0ac9bad98a 100644 --- a/tests/integration/targets/lookup_random_pet/aliases +++ b/tests/integration/targets/lookup_random_pet/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_random_string/aliases b/tests/integration/targets/lookup_random_string/aliases index 708d3bcd12..0ac9bad98a 100644 --- a/tests/integration/targets/lookup_random_string/aliases +++ b/tests/integration/targets/lookup_random_string/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_random_words/aliases b/tests/integration/targets/lookup_random_words/aliases index 708d3bcd12..0ac9bad98a 100644 --- a/tests/integration/targets/lookup_random_words/aliases +++ b/tests/integration/targets/lookup_random_words/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lvg/aliases b/tests/integration/targets/lvg/aliases index 01205a3972..f4617b3377 100644 --- a/tests/integration/targets/lvg/aliases +++ b/tests/integration/targets/lvg/aliases @@ -2,9 +2,9 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive needs/privileged -shippable/posix/group1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/mail/aliases b/tests/integration/targets/mail/aliases index abc0d5476d..afda346c4e 100644 --- a/tests/integration/targets/mail/aliases +++ b/tests/integration/targets/mail/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 diff --git a/tests/integration/targets/module_helper/aliases b/tests/integration/targets/module_helper/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/module_helper/aliases +++ b/tests/integration/targets/module_helper/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/monit/aliases b/tests/integration/targets/monit/aliases index e60be5e504..2c2add2075 100644 --- a/tests/integration/targets/monit/aliases +++ b/tests/integration/targets/monit/aliases @@ -2,9 +2,9 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/2 destructive needs/target/setup_epel -shippable/posix/group2 skip/osx skip/macos skip/freebsd diff --git a/tests/integration/targets/mqtt/aliases b/tests/integration/targets/mqtt/aliases index 471b8e86f5..c25e0b6d55 100644 --- a/tests/integration/targets/mqtt/aliases +++ b/tests/integration/targets/mqtt/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/nomad/aliases b/tests/integration/targets/nomad/aliases index f9f52d7b84..ad2435c82c 100644 --- a/tests/integration/targets/nomad/aliases +++ b/tests/integration/targets/nomad/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 nomad_job_info destructive skip/aix diff --git a/tests/integration/targets/npm/aliases b/tests/integration/targets/npm/aliases index b1c4f2872e..6e2c65f386 100644 --- a/tests/integration/targets/npm/aliases +++ b/tests/integration/targets/npm/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 destructive skip/aix skip/freebsd diff --git a/tests/integration/targets/odbc/aliases b/tests/integration/targets/odbc/aliases index 75f18e362c..2dbf0eac3e 100644 --- a/tests/integration/targets/odbc/aliases +++ b/tests/integration/targets/odbc/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/osx skip/macos skip/rhel8.0 diff --git a/tests/integration/targets/one_host/aliases b/tests/integration/targets/one_host/aliases index 7fba83598a..02a31bcd55 100644 --- a/tests/integration/targets/one_host/aliases +++ b/tests/integration/targets/one_host/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/generic/1 cloud/opennebula -shippable/cloud/group1 disabled # FIXME diff --git a/tests/integration/targets/one_template/aliases b/tests/integration/targets/one_template/aliases index 7fba83598a..02a31bcd55 100644 --- a/tests/integration/targets/one_template/aliases +++ b/tests/integration/targets/one_template/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/generic/1 cloud/opennebula -shippable/cloud/group1 disabled # FIXME diff --git a/tests/integration/targets/osx_defaults/aliases b/tests/integration/targets/osx_defaults/aliases index ee063facf6..bd478505d9 100644 --- a/tests/integration/targets/osx_defaults/aliases +++ b/tests/integration/targets/osx_defaults/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/rhel diff --git a/tests/integration/targets/pacman/aliases b/tests/integration/targets/pacman/aliases index 0262a240bb..1d25c01932 100644 --- a/tests/integration/targets/pacman/aliases +++ b/tests/integration/targets/pacman/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/pam_limits/aliases b/tests/integration/targets/pam_limits/aliases index 3cde3b1715..b85ae64190 100644 --- a/tests/integration/targets/pam_limits/aliases +++ b/tests/integration/targets/pam_limits/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/pamd/aliases b/tests/integration/targets/pamd/aliases index 3cde3b1715..b85ae64190 100644 --- a/tests/integration/targets/pamd/aliases +++ b/tests/integration/targets/pamd/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/pids/aliases b/tests/integration/targets/pids/aliases index 7a0fc5c1ea..343f119da8 100644 --- a/tests/integration/targets/pids/aliases +++ b/tests/integration/targets/pids/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 diff --git a/tests/integration/targets/pipx/aliases b/tests/integration/targets/pipx/aliases index 0f370b3776..9f87ec3480 100644 --- a/tests/integration/targets/pipx/aliases +++ b/tests/integration/targets/pipx/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/2 destructive -shippable/posix/group2 skip/python2 skip/python3.5 diff --git a/tests/integration/targets/pipx_info/aliases b/tests/integration/targets/pipx_info/aliases index c42790aedf..a28278bbc1 100644 --- a/tests/integration/targets/pipx_info/aliases +++ b/tests/integration/targets/pipx_info/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive -shippable/posix/group3 skip/python2 skip/python3.5 diff --git a/tests/integration/targets/pkgng/aliases b/tests/integration/targets/pkgng/aliases index 6972c2b6c8..e13fde32ce 100644 --- a/tests/integration/targets/pkgng/aliases +++ b/tests/integration/targets/pkgng/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 needs/root skip/docker skip/osx diff --git a/tests/integration/targets/python_requirements_info/aliases b/tests/integration/targets/python_requirements_info/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/python_requirements_info/aliases +++ b/tests/integration/targets/python_requirements_info/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/read_csv/aliases b/tests/integration/targets/read_csv/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/read_csv/aliases +++ b/tests/integration/targets/read_csv/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/redis_info/aliases b/tests/integration/targets/redis_info/aliases index 8573c40daa..1f1c4baf77 100644 --- a/tests/integration/targets/redis_info/aliases +++ b/tests/integration/targets/redis_info/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/rundeck/aliases b/tests/integration/targets/rundeck/aliases index 0da9ab1822..3cf494c4c7 100644 --- a/tests/integration/targets/rundeck/aliases +++ b/tests/integration/targets/rundeck/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/sefcontext/aliases b/tests/integration/targets/sefcontext/aliases index 3a1d1f7e34..d318128f82 100644 --- a/tests/integration/targets/sefcontext/aliases +++ b/tests/integration/targets/sefcontext/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/2 needs/root -shippable/posix/group2 skip/aix diff --git a/tests/integration/targets/sensu_client/aliases b/tests/integration/targets/sensu_client/aliases index 225cabc08b..bca9905ba6 100644 --- a/tests/integration/targets/sensu_client/aliases +++ b/tests/integration/targets/sensu_client/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 needs/root diff --git a/tests/integration/targets/sensu_handler/aliases b/tests/integration/targets/sensu_handler/aliases index 225cabc08b..bca9905ba6 100644 --- a/tests/integration/targets/sensu_handler/aliases +++ b/tests/integration/targets/sensu_handler/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 needs/root diff --git a/tests/integration/targets/shutdown/aliases b/tests/integration/targets/shutdown/aliases index abc0d5476d..afda346c4e 100644 --- a/tests/integration/targets/shutdown/aliases +++ b/tests/integration/targets/shutdown/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 diff --git a/tests/integration/targets/snap/aliases b/tests/integration/targets/snap/aliases index b8fcb9ee4a..dcb4aa199e 100644 --- a/tests/integration/targets/snap/aliases +++ b/tests/integration/targets/snap/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/snap_alias/aliases b/tests/integration/targets/snap_alias/aliases index b8fcb9ee4a..dcb4aa199e 100644 --- a/tests/integration/targets/snap_alias/aliases +++ b/tests/integration/targets/snap_alias/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/ssh_config/aliases b/tests/integration/targets/ssh_config/aliases index 6803185a41..6011128daa 100644 --- a/tests/integration/targets/ssh_config/aliases +++ b/tests/integration/targets/ssh_config/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/2 destructive -shippable/posix/group2 skip/python2.6 # stromssh only supports python3 skip/python2.7 # stromssh only supports python3 skip/freebsd # stromssh installation fails on freebsd diff --git a/tests/integration/targets/sudoers/aliases b/tests/integration/targets/sudoers/aliases index be75e3ddab..12d1d6617e 100644 --- a/tests/integration/targets/sudoers/aliases +++ b/tests/integration/targets/sudoers/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 diff --git a/tests/integration/targets/supervisorctl/aliases b/tests/integration/targets/supervisorctl/aliases index 453d04cb3b..58524f1fb1 100644 --- a/tests/integration/targets/supervisorctl/aliases +++ b/tests/integration/targets/supervisorctl/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/2 destructive -shippable/posix/group2 skip/python3 skip/aix diff --git a/tests/integration/targets/sysrc/aliases b/tests/integration/targets/sysrc/aliases index 6972c2b6c8..e13fde32ce 100644 --- a/tests/integration/targets/sysrc/aliases +++ b/tests/integration/targets/sysrc/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 needs/root skip/docker skip/osx diff --git a/tests/integration/targets/terraform/aliases b/tests/integration/targets/terraform/aliases index 1f9abfc0a2..1b6e4a26df 100644 --- a/tests/integration/targets/terraform/aliases +++ b/tests/integration/targets/terraform/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/windows skip/aix skip/osx diff --git a/tests/integration/targets/test_a_module/aliases b/tests/integration/targets/test_a_module/aliases index 7a0fc5c1ea..343f119da8 100644 --- a/tests/integration/targets/test_a_module/aliases +++ b/tests/integration/targets/test_a_module/aliases @@ -2,4 +2,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group3 +azp/posix/3 diff --git a/tests/integration/targets/timezone/aliases b/tests/integration/targets/timezone/aliases index 86d2291bb5..007bed5386 100644 --- a/tests/integration/targets/timezone/aliases +++ b/tests/integration/targets/timezone/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/ufw/aliases b/tests/integration/targets/ufw/aliases index ba9e581292..fa4f2a6cd3 100644 --- a/tests/integration/targets/ufw/aliases +++ b/tests/integration/targets/ufw/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/wakeonlan/aliases b/tests/integration/targets/wakeonlan/aliases index 4ed7114b08..dadd9f37a2 100644 --- a/tests/integration/targets/wakeonlan/aliases +++ b/tests/integration/targets/wakeonlan/aliases @@ -2,5 +2,5 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/aix diff --git a/tests/integration/targets/xattr/aliases b/tests/integration/targets/xattr/aliases index 093fe91e51..db3751be49 100644 --- a/tests/integration/targets/xattr/aliases +++ b/tests/integration/targets/xattr/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group2 +azp/posix/2 skip/aix skip/docker skip/freebsd diff --git a/tests/integration/targets/xfs_quota/aliases b/tests/integration/targets/xfs_quota/aliases index 41006522bc..56dffecaa4 100644 --- a/tests/integration/targets/xfs_quota/aliases +++ b/tests/integration/targets/xfs_quota/aliases @@ -2,9 +2,9 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 needs/privileged needs/root -shippable/posix/group1 skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/xml/aliases b/tests/integration/targets/xml/aliases index 64596c2b12..0d1324b22a 100644 --- a/tests/integration/targets/xml/aliases +++ b/tests/integration/targets/xml/aliases @@ -2,6 +2,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/3 destructive -shippable/posix/group3 skip/aix diff --git a/tests/integration/targets/yarn/aliases b/tests/integration/targets/yarn/aliases index 323adc00f3..cb1bc115a0 100644 --- a/tests/integration/targets/yarn/aliases +++ b/tests/integration/targets/yarn/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 destructive skip/aix skip/freebsd diff --git a/tests/integration/targets/yum_versionlock/aliases b/tests/integration/targets/yum_versionlock/aliases index 6bbff0fe26..ca3f7e796e 100644 --- a/tests/integration/targets/yum_versionlock/aliases +++ b/tests/integration/targets/yum_versionlock/aliases @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -shippable/posix/group1 +azp/posix/1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/zypper/aliases b/tests/integration/targets/zypper/aliases index 58cfb98d53..e0a62a673c 100644 --- a/tests/integration/targets/zypper/aliases +++ b/tests/integration/targets/zypper/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/freebsd skip/osx diff --git a/tests/integration/targets/zypper_repository/aliases b/tests/integration/targets/zypper_repository/aliases index 58cfb98d53..e0a62a673c 100644 --- a/tests/integration/targets/zypper_repository/aliases +++ b/tests/integration/targets/zypper_repository/aliases @@ -2,8 +2,8 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +azp/posix/1 destructive -shippable/posix/group1 skip/aix skip/freebsd skip/osx diff --git a/tests/sanity/extra/aliases.py b/tests/sanity/extra/aliases.py index b5b6fe0538..8779fec513 100755 --- a/tests/sanity/extra/aliases.py +++ b/tests/sanity/extra/aliases.py @@ -20,13 +20,13 @@ def main(): with open('.azure-pipelines/azure-pipelines.yml', 'rb') as f: azp = yaml.safe_load(f) - allowed_targets = set(['shippable/cloud/group1']) + allowed_targets = set(['azp/generic/1']) for stage in azp['stages']: - if stage['stage'].startswith(('Sanity', 'Unit', 'Cloud', 'Summary')): + if stage['stage'].startswith(('Sanity', 'Unit', 'Generic', 'Summary')): continue for job in stage['jobs']: for group in job['parameters']['groups']: - allowed_targets.add('shippable/posix/group{0}'.format(group)) + allowed_targets.add('azp/posix/{0}'.format(group)) for path in paths: targets = [] diff --git a/tests/utils/shippable/cloud.sh b/tests/utils/shippable/generic.sh similarity index 90% rename from tests/utils/shippable/cloud.sh rename to tests/utils/shippable/generic.sh index a2e6ebf2be..5fd1fb55aa 100755 --- a/tests/utils/shippable/cloud.sh +++ b/tests/utils/shippable/generic.sh @@ -8,11 +8,10 @@ set -o pipefail -eux declare -a args IFS='/:' read -ra args <<< "$1" -cloud="${args[0]}" python="${args[1]}" group="${args[2]}" -target="shippable/${cloud}/group${group}/" +target="azp/generic/${group}/" stage="${S:-prod}" diff --git a/tests/utils/shippable/linux-community.sh b/tests/utils/shippable/linux-community.sh index 5adafa0cff..48d0d8687d 100755 --- a/tests/utils/shippable/linux-community.sh +++ b/tests/utils/shippable/linux-community.sh @@ -12,9 +12,9 @@ image="${args[1]}" python="${args[2]}" if [ "${#args[@]}" -gt 3 ]; then - target="shippable/posix/group${args[3]}/" + target="azp/posix/${args[3]}/" else - target="shippable/posix/" + target="azp/posix/" fi # shellcheck disable=SC2086 diff --git a/tests/utils/shippable/linux.sh b/tests/utils/shippable/linux.sh index ce3ac34df3..6e1e2350b9 100755 --- a/tests/utils/shippable/linux.sh +++ b/tests/utils/shippable/linux.sh @@ -11,9 +11,9 @@ IFS='/:' read -ra args <<< "$1" image="${args[1]}" if [ "${#args[@]}" -gt 2 ]; then - target="shippable/posix/group${args[2]}/" + target="azp/posix/${args[2]}/" else - target="shippable/posix/" + target="azp/posix/" fi # shellcheck disable=SC2086 diff --git a/tests/utils/shippable/remote.sh b/tests/utils/shippable/remote.sh index 725c199b90..84c1ebbe0e 100755 --- a/tests/utils/shippable/remote.sh +++ b/tests/utils/shippable/remote.sh @@ -12,9 +12,9 @@ platform="${args[0]}" version="${args[1]}" if [ "${#args[@]}" -gt 2 ]; then - target="shippable/posix/group${args[2]}/" + target="azp/posix/${args[2]}/" else - target="shippable/posix/" + target="azp/posix/" fi stage="${S:-prod}" From 32f9d78fa38255f4007b2aa8b3c3a9597a6803ca Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 12 Oct 2022 21:27:21 +1300 Subject: [PATCH 0250/2104] manageiq_policies_info: new module (#5321) * manageiq_provider_info: new module * fix reference to manageiq.module * add missing alias in suboption * fix filename in botmeta * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein * fix description of parameters * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein * remove change applied on the wrong branch * fix the module name in metadata files * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein * adjust RETURN documentation * adjust RETURN documentation indentation * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein * Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 + meta/runtime.yml | 2 + plugins/module_utils/manageiq.py | 176 ++++++++++++++++ .../manageiq/manageiq_policies.py | 188 +----------------- .../manageiq/manageiq_policies_info.py | 119 +++++++++++ 5 files changed, 307 insertions(+), 180 deletions(-) create mode 100644 plugins/modules/remote_management/manageiq/manageiq_policies_info.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 408ec38e03..45b86fdcbe 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -980,6 +980,8 @@ files: maintainers: elad661 $modules/remote_management/manageiq/manageiq_group.py: maintainers: evertmulder + $modules/remote_management/manageiq/manageiq_policies_info.py: + maintainers: russoz $team_manageiq $modules/remote_management/manageiq/manageiq_tenant.py: maintainers: evertmulder $modules/remote_management/oneview/: diff --git a/meta/runtime.yml b/meta/runtime.yml index eb6d226fec..85c6a5454a 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -710,6 +710,8 @@ plugin_routing: redirect: community.general.remote_management.manageiq.manageiq_group manageiq_policies: redirect: community.general.remote_management.manageiq.manageiq_policies + manageiq_policies_info: + redirect: community.general.remote_management.manageiq.manageiq_policies_info manageiq_provider: redirect: community.general.remote_management.manageiq.manageiq_provider manageiq_tags: diff --git a/plugins/module_utils/manageiq.py b/plugins/module_utils/manageiq.py index fd2652e3b4..83d44c1110 100644 --- a/plugins/module_utils/manageiq.py +++ b/plugins/module_utils/manageiq.py @@ -156,3 +156,179 @@ class ManageIQ(object): msg = "{collection_name} where {params} does not exist in manageiq".format( collection_name=collection_name, params=str(params)) self.module.fail_json(msg=msg) + + def policies(self, resource_id, resource_type, resource_name): + manageiq = ManageIQ(self.module) + + # query resource id, fail if resource does not exist + if resource_id is None: + resource_id = manageiq.find_collection_resource_or_fail(resource_type, name=resource_name)['id'] + + return ManageIQPolicies(manageiq, resource_type, resource_id) + + +class ManageIQPolicies(object): + """ + Object to execute policies management operations of manageiq resources. + """ + + def __init__(self, manageiq, resource_type, resource_id): + self.manageiq = manageiq + + self.module = self.manageiq.module + self.api_url = self.manageiq.api_url + self.client = self.manageiq.client + + self.resource_type = resource_type + self.resource_id = resource_id + self.resource_url = '{api_url}/{resource_type}/{resource_id}'.format( + api_url=self.api_url, + resource_type=resource_type, + resource_id=resource_id) + + def query_profile_href(self, profile): + """ Add or Update the policy_profile href field + + Example: + {name: STR, ...} => {name: STR, href: STR} + """ + resource = self.manageiq.find_collection_resource_or_fail( + "policy_profiles", **profile) + return dict(name=profile['name'], href=resource['href']) + + def query_resource_profiles(self): + """ Returns a set of the profile objects objects assigned to the resource + """ + url = '{resource_url}/policy_profiles?expand=resources' + try: + response = self.client.get(url.format(resource_url=self.resource_url)) + except Exception as e: + msg = "Failed to query {resource_type} policies: {error}".format( + resource_type=self.resource_type, + error=e) + self.module.fail_json(msg=msg) + + resources = response.get('resources', []) + + # clean the returned rest api profile object to look like: + # {profile_name: STR, profile_description: STR, policies: ARR} + profiles = [self.clean_profile_object(profile) for profile in resources] + + return profiles + + def query_profile_policies(self, profile_id): + """ Returns a set of the policy objects assigned to the resource + """ + url = '{api_url}/policy_profiles/{profile_id}?expand=policies' + try: + response = self.client.get(url.format(api_url=self.api_url, profile_id=profile_id)) + except Exception as e: + msg = "Failed to query {resource_type} policies: {error}".format( + resource_type=self.resource_type, + error=e) + self.module.fail_json(msg=msg) + + resources = response.get('policies', []) + + # clean the returned rest api policy object to look like: + # {name: STR, description: STR, active: BOOL} + policies = [self.clean_policy_object(policy) for policy in resources] + + return policies + + def clean_policy_object(self, policy): + """ Clean a policy object to have human readable form of: + { + name: STR, + description: STR, + active: BOOL + } + """ + name = policy.get('name') + description = policy.get('description') + active = policy.get('active') + + return dict( + name=name, + description=description, + active=active) + + def clean_profile_object(self, profile): + """ Clean a profile object to have human readable form of: + { + profile_name: STR, + profile_description: STR, + policies: ARR + } + """ + profile_id = profile['id'] + name = profile.get('name') + description = profile.get('description') + policies = self.query_profile_policies(profile_id) + + return dict( + profile_name=name, + profile_description=description, + policies=policies) + + def profiles_to_update(self, profiles, action): + """ Create a list of policies we need to update in ManageIQ. + + Returns: + Whether or not a change took place and a message describing the + operation executed. + """ + profiles_to_post = [] + assigned_profiles = self.query_resource_profiles() + + # make a list of assigned full profile names strings + # e.g. ['openscap profile', ...] + assigned_profiles_set = set([profile['profile_name'] for profile in assigned_profiles]) + + for profile in profiles: + assigned = profile.get('name') in assigned_profiles_set + + if (action == 'unassign' and assigned) or (action == 'assign' and not assigned): + # add/update the policy profile href field + # {name: STR, ...} => {name: STR, href: STR} + profile = self.query_profile_href(profile) + profiles_to_post.append(profile) + + return profiles_to_post + + def assign_or_unassign_profiles(self, profiles, action): + """ Perform assign/unassign action + """ + # get a list of profiles needed to be changed + profiles_to_post = self.profiles_to_update(profiles, action) + if not profiles_to_post: + return dict( + changed=False, + msg="Profiles {profiles} already {action}ed, nothing to do".format( + action=action, + profiles=profiles)) + + # try to assign or unassign profiles to resource + url = '{resource_url}/policy_profiles'.format(resource_url=self.resource_url) + try: + response = self.client.post(url, action=action, resources=profiles_to_post) + except Exception as e: + msg = "Failed to {action} profile: {error}".format( + action=action, + error=e) + self.module.fail_json(msg=msg) + + # check all entities in result to be successful + for result in response['results']: + if not result['success']: + msg = "Failed to {action}: {message}".format( + action=action, + message=result['message']) + self.module.fail_json(msg=msg) + + # successfully changed all needed profiles + return dict( + changed=True, + msg="Successfully {action}ed profiles: {profiles}".format( + action=action, + profiles=profiles)) diff --git a/plugins/modules/remote_management/manageiq/manageiq_policies.py b/plugins/modules/remote_management/manageiq/manageiq_policies.py index 3d54a7b5aa..ae36094768 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_policies.py +++ b/plugins/modules/remote_management/manageiq/manageiq_policies.py @@ -25,17 +25,17 @@ options: state: type: str description: - - absent - policy_profiles should not exist, - - present - policy_profiles should exist, - - list - list current policy_profiles and policies. + - C(absent) - policy_profiles should not exist, + - C(present) - policy_profiles should exist, + - C(list) - list current policy_profiles and policies. choices: ['absent', 'present', 'list'] default: 'present' policy_profiles: type: list elements: dict description: - - list of dictionaries, each includes the policy_profile 'name' key. - - required if state is present or absent. + - List of dictionaries, each includes the policy_profile C(name) key. + - Required if I(state) is C(present) or C(absent). resource_type: type: str description: @@ -133,179 +133,12 @@ from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec, manageiq_entities -class ManageIQPolicies(object): - """ - Object to execute policies management operations of manageiq resources. - """ - - def __init__(self, manageiq, resource_type, resource_id): - self.manageiq = manageiq - - self.module = self.manageiq.module - self.api_url = self.manageiq.api_url - self.client = self.manageiq.client - - self.resource_type = resource_type - self.resource_id = resource_id - self.resource_url = '{api_url}/{resource_type}/{resource_id}'.format( - api_url=self.api_url, - resource_type=resource_type, - resource_id=resource_id) - - def query_profile_href(self, profile): - """ Add or Update the policy_profile href field - - Example: - {name: STR, ...} => {name: STR, href: STR} - """ - resource = self.manageiq.find_collection_resource_or_fail( - "policy_profiles", **profile) - return dict(name=profile['name'], href=resource['href']) - - def query_resource_profiles(self): - """ Returns a set of the profile objects objects assigned to the resource - """ - url = '{resource_url}/policy_profiles?expand=resources' - try: - response = self.client.get(url.format(resource_url=self.resource_url)) - except Exception as e: - msg = "Failed to query {resource_type} policies: {error}".format( - resource_type=self.resource_type, - error=e) - self.module.fail_json(msg=msg) - - resources = response.get('resources', []) - - # clean the returned rest api profile object to look like: - # {profile_name: STR, profile_description: STR, policies: ARR} - profiles = [self.clean_profile_object(profile) for profile in resources] - - return profiles - - def query_profile_policies(self, profile_id): - """ Returns a set of the policy objects assigned to the resource - """ - url = '{api_url}/policy_profiles/{profile_id}?expand=policies' - try: - response = self.client.get(url.format(api_url=self.api_url, profile_id=profile_id)) - except Exception as e: - msg = "Failed to query {resource_type} policies: {error}".format( - resource_type=self.resource_type, - error=e) - self.module.fail_json(msg=msg) - - resources = response.get('policies', []) - - # clean the returned rest api policy object to look like: - # {name: STR, description: STR, active: BOOL} - policies = [self.clean_policy_object(policy) for policy in resources] - - return policies - - def clean_policy_object(self, policy): - """ Clean a policy object to have human readable form of: - { - name: STR, - description: STR, - active: BOOL - } - """ - name = policy.get('name') - description = policy.get('description') - active = policy.get('active') - - return dict( - name=name, - description=description, - active=active) - - def clean_profile_object(self, profile): - """ Clean a profile object to have human readable form of: - { - profile_name: STR, - profile_description: STR, - policies: ARR - } - """ - profile_id = profile['id'] - name = profile.get('name') - description = profile.get('description') - policies = self.query_profile_policies(profile_id) - - return dict( - profile_name=name, - profile_description=description, - policies=policies) - - def profiles_to_update(self, profiles, action): - """ Create a list of policies we need to update in ManageIQ. - - Returns: - Whether or not a change took place and a message describing the - operation executed. - """ - profiles_to_post = [] - assigned_profiles = self.query_resource_profiles() - - # make a list of assigned full profile names strings - # e.g. ['openscap profile', ...] - assigned_profiles_set = set([profile['profile_name'] for profile in assigned_profiles]) - - for profile in profiles: - assigned = profile.get('name') in assigned_profiles_set - - if (action == 'unassign' and assigned) or (action == 'assign' and not assigned): - # add/update the policy profile href field - # {name: STR, ...} => {name: STR, href: STR} - profile = self.query_profile_href(profile) - profiles_to_post.append(profile) - - return profiles_to_post - - def assign_or_unassign_profiles(self, profiles, action): - """ Perform assign/unassign action - """ - # get a list of profiles needed to be changed - profiles_to_post = self.profiles_to_update(profiles, action) - if not profiles_to_post: - return dict( - changed=False, - msg="Profiles {profiles} already {action}ed, nothing to do".format( - action=action, - profiles=profiles)) - - # try to assign or unassign profiles to resource - url = '{resource_url}/policy_profiles'.format(resource_url=self.resource_url) - try: - response = self.client.post(url, action=action, resources=profiles_to_post) - except Exception as e: - msg = "Failed to {action} profile: {error}".format( - action=action, - error=e) - self.module.fail_json(msg=msg) - - # check all entities in result to be successful - for result in response['results']: - if not result['success']: - msg = "Failed to {action}: {message}".format( - action=action, - message=result['message']) - self.module.fail_json(msg=msg) - - # successfully changed all needed profiles - return dict( - changed=True, - msg="Successfully {action}ed profiles: {profiles}".format( - action=action, - profiles=profiles)) - - def main(): actions = {'present': 'assign', 'absent': 'unassign', 'list': 'list'} argument_spec = dict( policy_profiles=dict(type='list', elements='dict'), - resource_id=dict(required=False, type='int'), - resource_name=dict(required=False, type='str'), + resource_id=dict(type='int'), + resource_name=dict(type='str'), resource_type=dict(required=True, type='str', choices=list(manageiq_entities().keys())), state=dict(required=False, type='str', @@ -335,12 +168,7 @@ def main(): resource_type = manageiq_entities()[resource_type_key] manageiq = ManageIQ(module) - - # query resource id, fail if resource does not exist - if resource_id is None: - resource_id = manageiq.find_collection_resource_or_fail(resource_type, name=resource_name)['id'] - - manageiq_policies = ManageIQPolicies(manageiq, resource_type, resource_id) + manageiq_policies = manageiq.policies(resource_id, resource_type, resource_name) if action == 'list': # return a list of current profiles for this object diff --git a/plugins/modules/remote_management/manageiq/manageiq_policies_info.py b/plugins/modules/remote_management/manageiq/manageiq_policies_info.py new file mode 100644 index 0000000000..cdf4cafdaf --- /dev/null +++ b/plugins/modules/remote_management/manageiq/manageiq_policies_info.py @@ -0,0 +1,119 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2022, Alexei Znamensky +# Copyright (c) 2017, Daniel Korn +# Copyright (c) 2017, Yaacov Zamir +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = ''' + +module: manageiq_policies_info +version_added: 5.8.0 + +short_description: Listing of resource policy_profiles in ManageIQ +extends_documentation_fragment: + - community.general.manageiq + +author: Alexei Znamensky (@russoz) +description: + - The manageiq_policies module supports listing policy_profiles in ManageIQ. + +options: + resource_type: + type: str + description: + - The type of the resource to obtain the profile for. + required: true + choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', + 'data store', 'group', 'resource pool', 'service', 'service template', + 'template', 'tenant', 'user'] + resource_name: + type: str + description: + - The name of the resource to obtain the profile for. + - Must be specified if I(resource_id) is not set. Both options are mutually exclusive. + resource_id: + type: int + description: + - The ID of the resource to obtain the profile for. + - Must be specified if I(resource_name) is not set. Both options are mutually exclusive. +''' + +EXAMPLES = ''' +- name: List current policy_profile and policies for a provider in ManageIQ + community.general.manageiq_policies_info: + resource_name: 'EngLab' + resource_type: 'provider' + manageiq_connection: + url: 'http://127.0.0.1:3000' + username: 'admin' + password: 'smartvm' + register: result +''' + +RETURN = ''' +profiles: + description: + - List current policy_profile and policies for a provider in ManageIQ. + returned: always + type: list + elements: dict + sample: + - policies: + - active: true + description: OpenSCAP + name: openscap policy + - active: true, + description: Analyse incoming container images + name: analyse incoming container images + - active: true + description: Schedule compliance after smart state analysis + name: schedule compliance after smart state analysis + profile_description: OpenSCAP profile + profile_name: openscap profile +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, ManageIQPolicies, manageiq_argument_spec, manageiq_entities + + +def main(): + argument_spec = dict( + resource_id=dict(required=False, type='int'), + resource_name=dict(required=False, type='str'), + resource_type=dict(required=True, type='str', + choices=list(manageiq_entities().keys())), + ) + # add the manageiq connection arguments to the arguments + argument_spec.update(manageiq_argument_spec()) + + module = AnsibleModule( + argument_spec=argument_spec, + mutually_exclusive=[["resource_id", "resource_name"]], + required_one_of=[["resource_id", "resource_name"]], + supports_check_mode=True, + ) + + resource_id = module.params['resource_id'] + resource_type_key = module.params['resource_type'] + resource_name = module.params['resource_name'] + + # get the resource type + resource_type = manageiq_entities()[resource_type_key] + + manageiq_policies = ManageIQ(module).policies(resource_id, resource_type, resource_name) + + # return a list of current profiles for this object + current_profiles = manageiq_policies.query_resource_profiles() + res_args = dict(changed=False, profiles=current_profiles) + + module.exit_json(**res_args) + + +if __name__ == "__main__": + main() From 4941a25c40b5b7b290c79b08f830a52199c13612 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 12 Oct 2022 21:40:06 +1300 Subject: [PATCH 0251/2104] added missing aliases to documentation (#5351) --- .../modules/remote_management/manageiq/manageiq_provider.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/modules/remote_management/manageiq/manageiq_provider.py b/plugins/modules/remote_management/manageiq/manageiq_provider.py index 50565936f4..951e9bb07c 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_provider.py +++ b/plugins/modules/remote_management/manageiq/manageiq_provider.py @@ -89,6 +89,7 @@ options: description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. type: bool default: true + aliases: [ verify_ssl ] security_protocol: type: str description: How SSL certificates should be used for HTTPS requests. defaults to None. @@ -120,6 +121,7 @@ options: description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. type: bool default: true + aliases: [ verify_ssl ] security_protocol: type: str choices: ['ssl-with-validation','ssl-with-validation-custom-ca','ssl-without-validation','non-ssl'] @@ -154,6 +156,7 @@ options: type: bool description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True. default: true + aliases: [ verify_ssl ] security_protocol: type: str choices: ['ssl-with-validation','ssl-with-validation-custom-ca','ssl-without-validation', 'non-ssl'] From 7e2a6cf1984781c523e62c31084f028226ef200d Mon Sep 17 00:00:00 2001 From: Wei Liao Date: Wed, 12 Oct 2022 04:42:17 -0400 Subject: [PATCH 0252/2104] Updated to use the new newrelic v2 api (#5341) * updated to use the new newrelic v2 api * check that application_id is set * indenting issue * added back app_name * fix import ordering * resolving various spellings & wordings * fixed wordings * validate_certs * fixed unreachable code --- .../5341-newrelic-v2-api-changes.yml | 6 ++ .../modules/monitoring/newrelic_deployment.py | 76 +++++++++++++------ 2 files changed, 58 insertions(+), 24 deletions(-) create mode 100644 changelogs/fragments/5341-newrelic-v2-api-changes.yml diff --git a/changelogs/fragments/5341-newrelic-v2-api-changes.yml b/changelogs/fragments/5341-newrelic-v2-api-changes.yml new file mode 100644 index 0000000000..af47cc8cf3 --- /dev/null +++ b/changelogs/fragments/5341-newrelic-v2-api-changes.yml @@ -0,0 +1,6 @@ +major_changes: + - newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341). +breaking_changes: + - newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341). +deprecated_features: + - newrelic_deployment - ``appname`` and ``environment`` are no longer valid options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341). diff --git a/plugins/modules/monitoring/newrelic_deployment.py b/plugins/modules/monitoring/newrelic_deployment.py index 2fd4faf8e3..91f49fbe65 100644 --- a/plugins/modules/monitoring/newrelic_deployment.py +++ b/plugins/modules/monitoring/newrelic_deployment.py @@ -13,24 +13,26 @@ DOCUMENTATION = ''' --- module: newrelic_deployment author: "Matt Coddington (@mcodd)" -short_description: Notify newrelic about app deployments +short_description: Notify New Relic about app deployments description: - - Notify newrelic about app deployments (see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/deployment-notifications#api) + - Notify New Relic about app deployments (see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments/) options: token: type: str description: - - API token, to place in the x-api-key header. + - API token to place in the Api-Key header. required: true app_name: type: str description: - - (one of app_name or application_id are required) The value of app_name in the newrelic.yml file used by the application + - The value of app_name in the newrelic.yml file used by the application. + - One of I(app_name) or I(application_id) is required. required: false application_id: type: str description: - - (one of app_name or application_id are required) The application id, found in the URL when viewing the application in RPM + - The application ID found in the metadata of the application in APM. + - One of I(app_name) or I(application_id) is required. required: false changelog: type: str @@ -46,7 +48,7 @@ options: type: str description: - A revision number (e.g., git commit SHA) - required: false + required: true user: type: str description: @@ -55,12 +57,14 @@ options: appname: type: str description: - - Name of the application + - Name of the application. + - This option has been deprecated and will be removed in community.general 7.0.0. Please do not use. required: false environment: type: str description: - - The environment for this deployment + - The environment for this deployment. + - This option has been deprecated and will be removed community.general 7.0.0. Please do not use. required: false validate_certs: description: @@ -69,12 +73,11 @@ options: required: false default: true type: bool - requirements: [] ''' EXAMPLES = ''' -- name: Notify newrelic about an app deployment +- name: Notify New Relic about an app deployment community.general.newrelic_deployment: token: AAAAAA app_name: myapp @@ -84,7 +87,8 @@ EXAMPLES = ''' from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url -from ansible.module_utils.six.moves.urllib.parse import urlencode +from ansible.module_utils.six.moves.urllib.parse import quote +import json # =========================================== # Module execution. @@ -100,10 +104,10 @@ def main(): application_id=dict(required=False), changelog=dict(required=False), description=dict(required=False), - revision=dict(required=False), + revision=dict(required=True), user=dict(required=False), - appname=dict(required=False), - environment=dict(required=False), + appname=dict(required=False, removed_in_version='7.0.0', removed_from_collection='community.general'), + environment=dict(required=False, removed_in_version='7.0.0', removed_from_collection='community.general'), validate_certs=dict(default=True, type='bool'), ), required_one_of=[['app_name', 'application_id']], @@ -115,14 +119,18 @@ def main(): if module.params["app_name"] and module.params["application_id"]: module.fail_json(msg="only one of 'app_name' or 'application_id' can be set") + app_id = None if module.params["app_name"]: - params["app_name"] = module.params["app_name"] + app_id = get_application_id(module) elif module.params["application_id"]: - params["application_id"] = module.params["application_id"] + app_id = module.params["application_id"] else: module.fail_json(msg="you must set one of 'app_name' or 'application_id'") - for item in ["changelog", "description", "revision", "user", "appname", "environment"]: + if app_id is None: + module.fail_json(msg="No application with name %s is found in NewRelic" % module.params["app_name"]) + + for item in ["changelog", "description", "revision", "user"]: if module.params[item]: params[item] = module.params[item] @@ -130,17 +138,37 @@ def main(): if module.check_mode: module.exit_json(changed=True) - # Send the data to NewRelic - url = "https://rpm.newrelic.com/deployments.xml" - data = urlencode(params) - headers = { - 'x-api-key': module.params["token"], + # Send the data to New Relic + url = "https://api.newrelic.com/v2/applications/%s/deployments.json" % quote(str(app_id), safe='') + data = { + 'deployment': params } - response, info = fetch_url(module, url, data=data, headers=headers) + headers = { + 'Api-Key': module.params["token"], + 'Content-Type': 'application/json', + } + response, info = fetch_url(module, url, data=module.jsonify(data), headers=headers, method="POST") if info['status'] in (200, 201): module.exit_json(changed=True) else: - module.fail_json(msg="unable to update newrelic: %s" % info['msg']) + module.fail_json(msg="Unable to insert deployment marker: %s" % info['msg']) + + +def get_application_id(module): + url = "https://api.newrelic.com/v2/applications.json" + data = "filter[name]=%s" % module.params["app_name"] + headers = { + 'Api-Key': module.params["token"], + } + response, info = fetch_url(module, url, data=data, headers=headers) + if info['status'] not in (200, 201): + module.fail_json(msg="Unable to get application: %s" % info['msg']) + + result = json.loads(response.read()) + if result is None or len(result.get("applications", "")) == 0: + module.fail_json(msg='No application found with name "%s"' % module.params["app_name"]) + + return result["applications"][0]["id"] if __name__ == '__main__': From 6f88426cf1dc7f3a84fb6750bef1bf56b772f5d1 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 15 Oct 2022 09:28:20 +1300 Subject: [PATCH 0253/2104] lxc_container: minor refactor (#5358) * lxc_container: minor refactor * add changelog fragment --- .../fragments/5358-lxc-container-refactor.yml | 2 + plugins/modules/cloud/lxc/lxc_container.py | 92 +++++++++---------- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 3 +- tests/sanity/ignore-2.15.txt | 3 +- 7 files changed, 46 insertions(+), 57 deletions(-) create mode 100644 changelogs/fragments/5358-lxc-container-refactor.yml diff --git a/changelogs/fragments/5358-lxc-container-refactor.yml b/changelogs/fragments/5358-lxc-container-refactor.yml new file mode 100644 index 0000000000..46beee907d --- /dev/null +++ b/changelogs/fragments/5358-lxc-container-refactor.yml @@ -0,0 +1,2 @@ +minor_changes: + - lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358). diff --git a/plugins/modules/cloud/lxc/lxc_container.py b/plugins/modules/cloud/lxc/lxc_container.py index 9eeb0b65d5..7871f13972 100644 --- a/plugins/modules/cloud/lxc/lxc_container.py +++ b/plugins/modules/cloud/lxc/lxc_container.py @@ -85,7 +85,7 @@ options: type: str lxc_path: description: - - Place container under PATH. + - Place container under C(PATH). type: path container_log: description: @@ -104,7 +104,7 @@ options: - debug - DEBUG description: - - Set the log level for a container where *container_log* was set. + - Set the log level for a container where I(container_log) was set. type: str required: false default: INFO @@ -171,17 +171,17 @@ notes: - Containers must have a unique name. If you attempt to create a container with a name that already exists in the users namespace the module will simply return as "unchanged". - - The "container_command" can be used with any state except "absent". If - used with state "stopped" the container will be "started", the command - executed, and then the container "stopped" again. Likewise if the state - is "stopped" and the container does not exist it will be first created, - "started", the command executed, and then "stopped". If you use a "|" + - The I(container_command) can be used with any state except C(absent). If + used with state C(stopped) the container will be C(started), the command + executed, and then the container C(stopped) again. Likewise if I(state=stopped) + and the container does not exist it will be first created, + C(started), the command executed, and then C(stopped). If you use a "|" in the variable you can use common script formatting within the variable - itself The "container_command" option will always execute as BASH. - When using "container_command" a log file is created in the /tmp/ directory - which contains both stdout and stderr of any command executed. - - If "archive" is **true** the system will attempt to create a compressed - tarball of the running container. The "archive" option supports LVM backed + itself. The I(container_command) option will always execute as BASH. + When using I(container_command), a log file is created in the C(/tmp/) directory + which contains both C(stdout) and C(stderr) of any command executed. + - If I(archive=true) the system will attempt to create a compressed + tarball of the running container. The I(archive) option supports LVM backed containers and will create a snapshot of the running container when creating the archive. - If your distro does not have a package for C(python3-lxc), which is a @@ -433,7 +433,7 @@ else: HAS_LXC = True from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE +from ansible.module_utils.parsing.convert_bool import boolean, BOOLEANS_FALSE from ansible.module_utils.common.text.converters import to_text, to_bytes @@ -607,10 +607,10 @@ class LxcContainerManagement(object): :type module: ``object`` """ self.module = module - self.state = self.module.params.get('state', None) + self.state = self.module.params['state'] self.state_change = False self.lxc_vg = None - self.lxc_path = self.module.params.get('lxc_path', None) + self.lxc_path = self.module.params['lxc_path'] self.container_name = self.module.params['name'] self.container = self.get_container_bind() self.archive_info = None @@ -643,10 +643,7 @@ class LxcContainerManagement(object): :returns: True or False if the container is found. :rtype: ``bol`` """ - if [i for i in lxc.list_containers(config_path=lxc_path) if i == container_name]: - return True - else: - return False + return any(c == container_name for c in lxc.list_containers(config_path=lxc_path)) @staticmethod def _add_variables(variables_dict, build_command): @@ -678,13 +675,13 @@ class LxcContainerManagement(object): for v in LXC_BACKING_STORE[self.module.params['backing_store']]: variables.pop(v, None) - return_dict = dict() false_values = BOOLEANS_FALSE.union([None, '']) - for k, v in variables.items(): - _var = self.module.params.get(k) - if _var not in false_values: - return_dict[v] = _var - return return_dict + result = dict( + (k, v) + for k, v in variables.items() + if self.module.params[k] not in false_values + ) + return result def _config(self): """Configure an LXC container. @@ -694,7 +691,7 @@ class LxcContainerManagement(object): restart the container upon completion. """ - _container_config = self.module.params.get('container_config') + _container_config = self.module.params['container_config'] if not _container_config: return False @@ -784,12 +781,12 @@ class LxcContainerManagement(object): ) # Load logging for the instance when creating it. - if self.module.params.get('clone_snapshot') in BOOLEANS_TRUE: + if self.module.params['clone_snapshot']: build_command.append('--snapshot') # Check for backing_store == overlayfs if so force the use of snapshot # If overlay fs is used and snapshot is unset the clone command will # fail with an unsupported type. - elif self.module.params.get('backing_store') == 'overlayfs': + elif self.module.params['backing_store'] == 'overlayfs': build_command.append('--snapshot') rc, return_data, err = self.module.run_command(build_command) @@ -837,7 +834,7 @@ class LxcContainerManagement(object): ) # Load logging for the instance when creating it. - if self.module.params.get('container_log') in BOOLEANS_TRUE: + if self.module.params['container_log']: # Set the logging path to the /var/log/lxc if uid is root. else # set it to the home folder of the user executing. try: @@ -862,7 +859,7 @@ class LxcContainerManagement(object): ]) # Add the template commands to the end of the command if there are any - template_options = self.module.params.get('template_options', None) + template_options = self.module.params['template_options'] if template_options: build_command.append('--') build_command += shlex.split(template_options) @@ -919,7 +916,7 @@ class LxcContainerManagement(object): def _execute_command(self): """Execute a shell command.""" - container_command = self.module.params.get('container_command') + container_command = self.module.params['container_command'] if container_command: container_state = self._get_state() if container_state == 'frozen': @@ -939,17 +936,16 @@ class LxcContainerManagement(object): self.container = self.get_container_bind() for dummy in range(timeout): - if self._get_state() != 'running': - self.container.start() - self.state_change = True - # post startup sleep for 1 second. - time.sleep(1) - else: + if self._get_state() == 'running': return True + + self.container.start() + self.state_change = True + # post startup sleep for 1 second. + time.sleep(1) self.failure( lxc_container=self._container_data(), - error='Failed to start container' - ' [ %s ]' % self.container_name, + error='Failed to start container [ %s ]' % self.container_name, rc=1, msg='The container [ %s ] failed to start. Check to lxc is' ' available and that the container is in a functional' @@ -962,7 +958,7 @@ class LxcContainerManagement(object): This will store archive_info in as self.archive_info """ - if self.module.params.get('archive') in BOOLEANS_TRUE: + if self.module.params['archive']: self.archive_info = { 'archive': self._container_create_tar() } @@ -973,7 +969,7 @@ class LxcContainerManagement(object): This will store archive_info in as self.archive_info """ - clone_name = self.module.params.get('clone_name') + clone_name = self.module.params['clone_name'] if clone_name: if not self._container_exists(container_name=clone_name, lxc_path=self.lxc_path): self.clone_info = { @@ -1339,11 +1335,11 @@ class LxcContainerManagement(object): old_umask = os.umask(int('0077', 8)) - archive_path = self.module.params.get('archive_path') + archive_path = self.module.params['archive_path'] if not os.path.isdir(archive_path): os.makedirs(archive_path) - archive_compression = self.module.params.get('archive_compression') + archive_compression = self.module.params['archive_compression'] compression_type = LXC_COMPRESSION_MAP[archive_compression] # remove trailing / if present. @@ -1357,9 +1353,7 @@ class LxcContainerManagement(object): build_command = [ self.module.get_bin_path('tar', True), - '--directory=%s' % os.path.realpath( - os.path.expanduser(source_dir) - ), + '--directory=%s' % os.path.realpath(source_dir), compression_type['argument'], archive_name, '.' @@ -1702,7 +1696,6 @@ def main(): ), clone_name=dict( type='str', - required=False ), clone_snapshot=dict( type='bool', @@ -1731,9 +1724,8 @@ def main(): msg='The `lxc` module is not importable. Check the requirements.' ) - lv_name = module.params.get('lv_name') - if not lv_name: - module.params['lv_name'] = module.params.get('name') + if not module.params['lv_name']: + module.params['lv_name'] = module.params['name'] lxc_manage = LxcContainerManagement(module=module) lxc_manage.run() diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 855883d64a..924e4f863b 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -4,7 +4,6 @@ .azure-pipelines/scripts/publish-codecov.py compile-3.5!skip # Uses Python 3.6+ syntax .azure-pipelines/scripts/publish-codecov.py future-import-boilerplate .azure-pipelines/scripts/publish-codecov.py metaclass-boilerplate -plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 39c97f6bf8..65cd74872a 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -1,5 +1,4 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 39c97f6bf8..65cd74872a 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -1,5 +1,4 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index a2ccf20db3..4e5d3334b0 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -1,6 +1,4 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice @@ -15,6 +13,7 @@ plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:para plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index a2ccf20db3..4e5d3334b0 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -1,6 +1,4 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice @@ -15,6 +13,7 @@ plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:para plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice From 2a54644cfa904d994ddf4fcc19bee7d603bff7ec Mon Sep 17 00:00:00 2001 From: ajakk Date: Fri, 14 Oct 2022 20:31:02 +0000 Subject: [PATCH 0254/2104] portage: drop usage of gentoolkit, add knobs for --with-bdeps, --backtrack (#5349) * portage: drop dependency on gentoolkit (provides equery) Portage installs a Python module, which is available anywhere that Portage itself is available. We can use that instead of calling a shell command. Signed-off-by: John Helmert III * portage: add knob for emerge's --backtrack flag Signed-off-by: John Helmert III * portage: add knob for portage's --with-bdeps option Also, this option does not accept "True" like other options. Instead, it only uses 'y' and 'n', so parse booleans properly into these chars. Signed-off-by: John Helmert III * Add changelog entry for #5349 Signed-off-by: John Helmert III Signed-off-by: John Helmert III --- .../5349-drop-gentoolkit-more-knobs.yml | 3 ++ plugins/modules/packaging/os/portage.py | 54 ++++++++++++++++--- 2 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml diff --git a/changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml b/changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml new file mode 100644 index 0000000000..bc2d79e7eb --- /dev/null +++ b/changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml @@ -0,0 +1,3 @@ +minor_changes: + - portage - use Portage's python module instead of calling gentoolkit-provided program in shell (https://github.com/ansible-collections/community.general/pull/5349). + - portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options (https://github.com/ansible-collections/community.general/pull/5349). diff --git a/plugins/modules/packaging/os/portage.py b/plugins/modules/packaging/os/portage.py index 22f258cf1a..4c91c9d0b6 100644 --- a/plugins/modules/packaging/os/portage.py +++ b/plugins/modules/packaging/os/portage.py @@ -42,6 +42,12 @@ options: type: bool default: false + backtrack: + description: + - Set backtrack value (C(--backtrack)). + type: int + version_added: 5.8.0 + deep: description: - Consider the entire dependency tree of packages (--deep) @@ -160,6 +166,12 @@ options: - --load-average setting values type: float + withbdeps: + description: + - Specifies that build time dependencies should be installed. + type: bool + version_added: 5.8.0 + quietbuild: description: - Redirect all build output to logs alone, and do not display it @@ -228,11 +240,24 @@ EXAMPLES = ''' import os import re +import sys +import traceback -from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.common.respawn import has_respawned, respawn_module from ansible.module_utils.common.text.converters import to_native +try: + from portage.dbapi import vartree + from portage.exception import InvalidAtom + HAS_PORTAGE = True + PORTAGE_IMPORT_ERROR = None +except ImportError: + HAS_PORTAGE = False + PORTAGE_IMPORT_ERROR = traceback.format_exc() + + def query_package(module, package, action): if package.startswith('@'): return query_set(module, package, action) @@ -240,10 +265,12 @@ def query_package(module, package, action): def query_atom(module, atom, action): - cmd = '%s list %s' % (module.equery_path, atom) - - rc, out, err = module.run_command(cmd) - return rc == 0 + vdb = vartree.vardbapi() + try: + exists = vdb.match(atom) + except InvalidAtom: + return False + return bool(exists) def query_set(module, set, action): @@ -336,6 +363,8 @@ def emerge_packages(module, packages): emerge_flags = { 'jobs': '--jobs', 'loadavg': '--load-average', + 'backtrack': '--backtrack', + 'withbdeps': '--with-bdeps', } for flag, arg in emerge_flags.items(): @@ -351,7 +380,10 @@ def emerge_packages(module, packages): continue """Add the --flag=value pair.""" - args.extend((arg, to_native(flag_val))) + if isinstance(p[flag], bool): + args.extend((arg, to_native('y' if flag_val else 'n'))) + else: + args.extend((arg, to_native(flag_val))) cmd, (rc, out, err) = run_emerge(module, packages, *args) if rc != 0: @@ -475,6 +507,7 @@ def main(): choices=portage_present_states + portage_absent_states, ), update=dict(default=False, type='bool'), + backtrack=dict(default=None, type='int'), deep=dict(default=False, type='bool'), newuse=dict(default=False, type='bool'), changed_use=dict(default=False, type='bool'), @@ -493,6 +526,7 @@ def main(): keepgoing=dict(default=False, type='bool'), jobs=dict(default=None, type='int'), loadavg=dict(default=None, type='float'), + withbdeps=dict(default=None, type='bool'), quietbuild=dict(default=False, type='bool'), quietfail=dict(default=False, type='bool'), ), @@ -506,8 +540,14 @@ def main(): supports_check_mode=True, ) + if not HAS_PORTAGE: + if sys.executable != '/usr/bin/python' and not has_respawned(): + respawn_module('/usr/bin/python') + else: + module.fail_json(msg=missing_required_lib('portage'), + exception=PORTAGE_IMPORT_ERROR) + module.emerge_path = module.get_bin_path('emerge', required=True) - module.equery_path = module.get_bin_path('equery', required=True) p = module.params From 5732023aa2935bf483a62542dc6725527edec0fa Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 18 Oct 2022 08:16:11 +0100 Subject: [PATCH 0255/2104] [opentelemetry][callback] support opentelemetry-api 1.13 (#5342) * [opentelemetry][callback] support opentelemetry-api 1.13 * [opentelemetry][callback] changelog fragment * Update changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml Co-authored-by: Felix Fontein * [opentelemetry-callback] refactor time_ns in a function * fix linting * change branch outside of the function Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * [opentelemetry]: remove options from suggestion * Apply suggestions from code review Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- ...lemetry_bug_fix_opentelemetry-api-1.13.yml | 2 ++ plugins/callback/opentelemetry.py | 31 +++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml diff --git a/changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml b/changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml new file mode 100644 index 0000000000..e5fa7958ac --- /dev/null +++ b/changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml @@ -0,0 +1,2 @@ +bugfixes: + - opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342). diff --git a/plugins/callback/opentelemetry.py b/plugins/callback/opentelemetry.py index e3584a7ae2..e00e1d71ad 100644 --- a/plugins/callback/opentelemetry.py +++ b/plugins/callback/opentelemetry.py @@ -121,13 +121,32 @@ try: from opentelemetry.sdk.trace.export import ( BatchSpanProcessor ) - from opentelemetry.util._time import _time_ns + + # Support for opentelemetry-api <= 1.12 + try: + from opentelemetry.util._time import _time_ns + except ImportError as imp_exc: + OTEL_LIBRARY_TIME_NS_ERROR = imp_exc + else: + OTEL_LIBRARY_TIME_NS_ERROR = None + except ImportError as imp_exc: OTEL_LIBRARY_IMPORT_ERROR = imp_exc + OTEL_LIBRARY_TIME_NS_ERROR = imp_exc else: OTEL_LIBRARY_IMPORT_ERROR = None +if sys.version_info >= (3, 7): + time_ns = time.time_ns +elif not OTEL_LIBRARY_TIME_NS_ERROR: + time_ns = _time_ns +else: + def time_ns(): + # Support versions older than 3.7 with opentelemetry-api > 1.12 + return int(time.time() * 1e9) + + class TaskData: """ Data about an individual task. @@ -139,10 +158,7 @@ class TaskData: self.path = path self.play = play self.host_data = OrderedDict() - if sys.version_info >= (3, 7): - self.start = time.time_ns() - else: - self.start = _time_ns() + self.start = time_ns() self.action = action self.args = args self.dump = None @@ -168,10 +184,7 @@ class HostData: self.name = name self.status = status self.result = result - if sys.version_info >= (3, 7): - self.finish = time.time_ns() - else: - self.finish = _time_ns() + self.finish = time_ns() class OpenTelemetrySource(object): From dfe1f9a29eedd05648e77fcc4877194d069bca5a Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 18 Oct 2022 20:17:13 +1300 Subject: [PATCH 0256/2104] consul: pythonisms + a couple of required_if clauses (#5367) * consul: pythonisms + a couple of required_if clauses * adjust condition of if * adjust condition of if (again) * Update plugins/modules/clustering/consul/consul.py Co-authored-by: Felix Fontein * simplify parse_check logic * fix condition of if * remove test made redundant by required_if * add changelog fragment Co-authored-by: Felix Fontein --- .../fragments/5367-consul-refactor.yaml | 2 + plugins/modules/clustering/consul/consul.py | 84 +++++++++---------- 2 files changed, 44 insertions(+), 42 deletions(-) create mode 100644 changelogs/fragments/5367-consul-refactor.yaml diff --git a/changelogs/fragments/5367-consul-refactor.yaml b/changelogs/fragments/5367-consul-refactor.yaml new file mode 100644 index 0000000000..2012d69cc5 --- /dev/null +++ b/changelogs/fragments/5367-consul-refactor.yaml @@ -0,0 +1,2 @@ +minor_changes: + - consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367). diff --git a/plugins/modules/clustering/consul/consul.py b/plugins/modules/clustering/consul/consul.py index 152d4577a1..0d75bde2eb 100644 --- a/plugins/modules/clustering/consul/consul.py +++ b/plugins/modules/clustering/consul/consul.py @@ -241,7 +241,7 @@ from ansible.module_utils.basic import AnsibleModule def register_with_consul(module): - state = module.params.get('state') + state = module.params['state'] if state == 'present': add(module) @@ -267,10 +267,8 @@ def add(module): def remove(module): ''' removes a service or a check ''' - service_id = module.params.get('service_id') or module.params.get('service_name') - check_id = module.params.get('check_id') or module.params.get('check_name') - if not (service_id or check_id): - module.fail_json(msg='services and checks are removed by id or name. please supply a service id/name or a check id/name') + service_id = module.params['service_id'] or module.params['service_name'] + check_id = module.params['check_id'] or module.params['check_name'] if service_id: remove_service(module, service_id) else: @@ -343,63 +341,61 @@ def remove_service(module, service_id): consul_api = get_consul_api(module) service = get_service_by_id_or_name(consul_api, service_id) if service: - consul_api.agent.service.deregister(service_id, token=module.params.get('token')) + consul_api.agent.service.deregister(service_id, token=module.params['token']) module.exit_json(changed=True, id=service_id) module.exit_json(changed=False, id=service_id) def get_consul_api(module): - consulClient = consul.Consul(host=module.params.get('host'), - port=module.params.get('port'), - scheme=module.params.get('scheme'), - verify=module.params.get('validate_certs'), - token=module.params.get('token')) + consulClient = consul.Consul(host=module.params['host'], + port=module.params['port'], + scheme=module.params['scheme'], + verify=module.params['validate_certs'], + token=module.params['token']) consulClient.agent.service = PatchedConsulAgentService(consulClient) return consulClient def get_service_by_id_or_name(consul_api, service_id_or_name): ''' iterate the registered services and find one with the given id ''' - for name, service in consul_api.agent.services().items(): - if service['ID'] == service_id_or_name or service['Service'] == service_id_or_name: + for dummy, service in consul_api.agent.services().items(): + if service_id_or_name in (service['ID'], service['Service']): return ConsulService(loaded=service) def parse_check(module): - if len([p for p in (module.params.get('script'), module.params.get('ttl'), module.params.get('tcp'), module.params.get('http')) if p]) > 1: + _checks = [module.params[p] for p in ('script', 'ttl', 'tcp', 'http') if module.params[p]] + + if len(_checks) > 1: module.fail_json( msg='checks are either script, tcp, http or ttl driven, supplying more than one does not make sense') - if module.params.get('check_id') or module.params.get('script') or module.params.get('ttl') or module.params.get('tcp') or module.params.get('http'): - + if module.params['check_id'] or _checks: return ConsulCheck( - module.params.get('check_id'), - module.params.get('check_name'), - module.params.get('check_node'), - module.params.get('check_host'), - module.params.get('script'), - module.params.get('interval'), - module.params.get('ttl'), - module.params.get('notes'), - module.params.get('tcp'), - module.params.get('http'), - module.params.get('timeout'), - module.params.get('service_id'), + module.params['check_id'], + module.params['check_name'], + module.params['check_node'], + module.params['check_host'], + module.params['script'], + module.params['interval'], + module.params['ttl'], + module.params['notes'], + module.params['tcp'], + module.params['http'], + module.params['timeout'], + module.params['service_id'], ) def parse_service(module): - if module.params.get('service_name'): - return ConsulService( - module.params.get('service_id'), - module.params.get('service_name'), - module.params.get('service_address'), - module.params.get('service_port'), - module.params.get('tags'), - ) - elif not module.params.get('service_name'): - module.fail_json(msg="service_name is required to configure a service.") + return ConsulService( + module.params['service_id'], + module.params['service_name'], + module.params['service_address'], + module.params['service_port'], + module.params['tags'], + ) class ConsulService(object): @@ -502,10 +498,10 @@ class ConsulCheck(object): if interval is None: raise Exception('tcp check must specify interval') - regex = r"(?P.*)(?::)(?P(?:[0-9]+))$" + regex = r"(?P.*):(?P(?:[0-9]+))$" match = re.match(regex, tcp) - if match is None: + if not match: raise Exception('tcp check must be in host:port format') self.check = consul.Check.tcp(match.group('host').strip('[]'), int(match.group('port')), self.interval) @@ -513,7 +509,7 @@ class ConsulCheck(object): def validate_duration(self, name, duration): if duration: duration_units = ['ns', 'us', 'ms', 's', 'm', 'h'] - if not any((duration.endswith(suffix) for suffix in duration_units)): + if not any(duration.endswith(suffix) for suffix in duration_units): duration = "{0}s".format(duration) return duration @@ -589,6 +585,10 @@ def main(): tags=dict(type='list', elements='str'), token=dict(no_log=True) ), + required_if=[ + ('state', 'present', ['service_name']), + ('state', 'absent', ['service_id', 'service_name', 'check_id', 'check_name'], True), + ], supports_check_mode=False, ) @@ -598,7 +598,7 @@ def main(): register_with_consul(module) except ConnectionError as e: module.fail_json(msg='Could not connect to consul agent at %s:%s, error was %s' % ( - module.params.get('host'), module.params.get('port'), str(e))) + module.params['host'], module.params['port'], str(e))) except Exception as e: module.fail_json(msg=str(e)) From b0bb994c3e965381a7ce1f3b2dae6280d7e8b741 Mon Sep 17 00:00:00 2001 From: Paul Sanchez <124954+basicdays@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:17:49 -0500 Subject: [PATCH 0257/2104] virtualbox: Fix crash when handling deeply nested hostvars (#5348) * virtualbox: Fix nested data parsing - Skip parsing values with keys that have both a value and nested data. - Skip parsing values that are nested more than two keys deep. * Update changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/5348-fix-vbox-deeply-nested-hostvars.yml | 2 ++ plugins/inventory/virtualbox.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml diff --git a/changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml b/changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml new file mode 100644 index 0000000000..f8084d6345 --- /dev/null +++ b/changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml @@ -0,0 +1,2 @@ +bugfixes: + - virtualbox inventory plugin - skip parsing values with keys that have both a value and nested data. Skip parsing values that are nested more than two keys deep (https://github.com/ansible-collections/community.general/issues/5332, https://github.com/ansible-collections/community.general/pull/5348). diff --git a/plugins/inventory/virtualbox.py b/plugins/inventory/virtualbox.py index 829fc7b971..c926d8b449 100644 --- a/plugins/inventory/virtualbox.py +++ b/plugins/inventory/virtualbox.py @@ -186,10 +186,13 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): else: # found vars, accumulate in hostvars for clean inventory set pref_k = 'vbox_' + k.strip().replace(' ', '_') - if k.startswith(' '): - if prevkey not in hostvars[current_host]: + leading_spaces = len(k) - len(k.lstrip(' ')) + if 0 < leading_spaces <= 2: + if prevkey not in hostvars[current_host] or not isinstance(hostvars[current_host][prevkey], dict): hostvars[current_host][prevkey] = {} hostvars[current_host][prevkey][pref_k] = v + elif leading_spaces > 2: + continue else: if v != '': hostvars[current_host][pref_k] = v From c3bdc4b39483a8937981df8512536592cdc9e4b6 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 19 Oct 2022 10:13:04 +0200 Subject: [PATCH 0258/2104] Fix module. (#5383) --- changelogs/fragments/5383-xenserver_facts.yml | 2 ++ plugins/modules/cloud/misc/xenserver_facts.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5383-xenserver_facts.yml diff --git a/changelogs/fragments/5383-xenserver_facts.yml b/changelogs/fragments/5383-xenserver_facts.yml new file mode 100644 index 0000000000..2fee2c8751 --- /dev/null +++ b/changelogs/fragments/5383-xenserver_facts.yml @@ -0,0 +1,2 @@ +bugfixes: + - "xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module from working at all (https://github.com/ansible-collections/community.general/pull/5383)." diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/cloud/misc/xenserver_facts.py index 201b59ec4f..567aa07adb 100644 --- a/plugins/modules/cloud/misc/xenserver_facts.py +++ b/plugins/modules/cloud/misc/xenserver_facts.py @@ -162,9 +162,7 @@ def get_srs(session): def main(): - module = AnsibleModule( - supports_check_mode=True, - ) + module = AnsibleModule({}, supports_check_mode=True) if not HAVE_XENAPI: module.fail_json(changed=False, msg="python xen api required for this module") From 5aa1e587496c906f5985d8c294ab23c2d9a4c818 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 20 Oct 2022 20:32:18 +0200 Subject: [PATCH 0259/2104] Do not crash when lzma is not around. (#5393) --- changelogs/fragments/5393-archive.yml | 2 + plugins/modules/files/archive.py | 7 +++- .../targets/archive/tasks/main.yml | 40 ++++++++++++++----- 3 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5393-archive.yml diff --git a/changelogs/fragments/5393-archive.yml b/changelogs/fragments/5393-archive.yml new file mode 100644 index 0000000000..a589c935ec --- /dev/null +++ b/changelogs/fragments/5393-archive.yml @@ -0,0 +1,2 @@ +bugfixes: + - "archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz`` (https://github.com/ansible-collections/community.general/pull/5393)." diff --git a/plugins/modules/files/archive.py b/plugins/modules/files/archive.py index 9d82017b3c..36e00487c7 100644 --- a/plugins/modules/files/archive.py +++ b/plugins/modules/files/archive.py @@ -575,6 +575,11 @@ class TarArchive(Archive): self.file.add(path, archive_name, recursive=False, exclude=py26_filter) def _get_checksums(self, path): + if HAS_LZMA: + LZMAError = lzma.LZMAError + else: + # Just picking another exception that's also listed below + LZMAError = tarfile.ReadError try: if self.format == 'xz': with lzma.open(_to_native_ascii(path), 'r') as f: @@ -585,7 +590,7 @@ class TarArchive(Archive): archive = tarfile.open(_to_native_ascii(path), 'r|' + self.format) checksums = set((info.name, info.chksum) for info in archive.getmembers()) archive.close() - except (lzma.LZMAError, tarfile.ReadError, tarfile.CompressionError): + except (LZMAError, tarfile.ReadError, tarfile.CompressionError): try: # The python implementations of gzip, bz2, and lzma do not support restoring compressed files # to their original names so only file checksum is returned diff --git a/tests/integration/targets/archive/tasks/main.yml b/tests/integration/targets/archive/tasks/main.yml index 29742ccf9c..4043f95b62 100644 --- a/tests/integration/targets/archive/tasks/main.yml +++ b/tests/integration/targets/archive/tasks/main.yml @@ -12,6 +12,37 @@ # Make sure we start fresh # Test setup +- name: prep our files + copy: src={{ item }} dest={{remote_tmp_dir}}/{{ item }} + with_items: + - foo.txt + - bar.txt + - empty.txt + - sub + - sub/subfile.txt + +# Run twice without lzma backport installed, to make sure it does not crash +- name: Archive - pre-test - first run + archive: + path: "{{ remote_tmp_dir }}/*.txt" + dest: "{{ remote_tmp_dir }}/archive_pretest_1.tar" + format: "tar" + register: pretest_1 + +- name: Archive - pre-test - second run + archive: + path: "{{ remote_tmp_dir }}/*.txt" + dest: "{{ remote_tmp_dir }}/archive_pretest_1.tar" + format: "tar" + register: pretest_2 + +- name: Archive - validate pre-test + assert: + that: + - pretest_1 is changed + - pretest_2 is not changed + +# Install dependencies - name: Ensure zip is present to create test archive (yum) yum: name=zip state=latest when: ansible_facts.pkg_mgr == 'yum' @@ -63,15 +94,6 @@ when: ansible_python_version.split('.')[0] == '2' register: backports_lzma_pip -- name: prep our files - copy: src={{ item }} dest={{remote_tmp_dir}}/{{ item }} - with_items: - - foo.txt - - bar.txt - - empty.txt - - sub - - sub/subfile.txt - - name: Define formats to test set_fact: formats: From a023f2a344aae28d4441e0f6923b8144fe65c1ac Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 21 Oct 2022 07:08:39 +0200 Subject: [PATCH 0260/2104] archive: better expose requirements (#5392) * Better expose requirements. * Move sentence back to notes. * Update plugins/modules/files/archive.py Co-authored-by: Maxwell G * Break line. Co-authored-by: Maxwell G --- plugins/modules/files/archive.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/modules/files/archive.py b/plugins/modules/files/archive.py index 36e00487c7..83eae34f56 100644 --- a/plugins/modules/files/archive.py +++ b/plugins/modules/files/archive.py @@ -66,13 +66,15 @@ options: type: bool default: false notes: - - Requires tarfile, zipfile, gzip and bzip2 packages on target host. - - Requires lzma or backports.lzma if using xz format. - - Can produce I(gzip), I(bzip2), I(lzma) and I(zip) compressed files or archives. + - Can produce I(gzip), I(bzip2), I(lzma), and I(zip) compressed files or archives. + - This module uses C(tarfile), C(zipfile), C(gzip), and C(bz2) packages on the target host to create archives. + These are part of the Python standard library for Python 2 and 3. +requirements: + - Requires C(lzma) (standard library of Python 3) or L(backports.lzma, https://pypi.org/project/backports.lzma/) (Python 2) if using C(xz) format. seealso: -- module: ansible.builtin.unarchive + - module: ansible.builtin.unarchive author: -- Ben Doherty (@bendoh) + - Ben Doherty (@bendoh) ''' EXAMPLES = r''' From 7857d0669e49d45fdf67e7b48946fc4dcf76e5f6 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 22 Oct 2022 19:42:52 +1300 Subject: [PATCH 0261/2104] django_manage: deprecate old commands (#5400) * deprecate old commands * add changelog fragment * fix django version in docs * fix wording on the deprecations * Update changelogs/fragments/5400-django-manage-deprecations.yml Co-authored-by: Felix Fontein * update chglog fragment Co-authored-by: Felix Fontein --- .../5400-django-manage-deprecations.yml | 3 + .../web_infrastructure/django_manage.py | 79 +++++++++++++++---- 2 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 changelogs/fragments/5400-django-manage-deprecations.yml diff --git a/changelogs/fragments/5400-django-manage-deprecations.yml b/changelogs/fragments/5400-django-manage-deprecations.yml new file mode 100644 index 0000000000..c2d7639da6 --- /dev/null +++ b/changelogs/fragments/5400-django-manage-deprecations.yml @@ -0,0 +1,3 @@ +deprecated_features: + - django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate`` that have been deprecated in Django long time ago will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). + - django_manage - support for Django releases older than 4.1 has been deprecated and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). diff --git a/plugins/modules/web_infrastructure/django_manage.py b/plugins/modules/web_infrastructure/django_manage.py index 0d68e926eb..9aec0f832d 100644 --- a/plugins/modules/web_infrastructure/django_manage.py +++ b/plugins/modules/web_infrastructure/django_manage.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright (c) 2022, Alexei Znamensky # Copyright (c) 2013, Scott Anderson # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -12,24 +13,36 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: django_manage -short_description: Manages a Django application. +short_description: Manages a Django application description: - - Manages a Django application using the C(manage.py) application frontend to C(django-admin). With the - C(virtualenv) parameter, all management commands will be executed by the given C(virtualenv) installation. + - Manages a Django application using the C(manage.py) application frontend to C(django-admin). With the + I(virtualenv) parameter, all management commands will be executed by the given C(virtualenv) installation. options: command: description: - - The name of the Django management command to run. Built in commands are C(cleanup), C(collectstatic), - C(flush), C(loaddata), C(migrate), C(syncdb), C(test), and C(validate). - - Other commands can be entered, but will fail if they're unknown to Django. Other commands that may + - The name of the Django management command to run. The commands listed below are built in this module and have some basic parameter validation. + - > + C(cleanup) - clean up old data from the database (deprecated in Django 1.5). This parameter will be + removed in community.general 9.0.0. Use C(clearsessions) instead. + - C(collectstatic) - Collects the static files into C(STATIC_ROOT). + - C(createcachetable) - Creates the cache tables for use with the database cache backend. + - C(flush) - Removes all data from the database. + - C(loaddata) - Searches for and loads the contents of the named I(fixtures) into the database. + - C(migrate) - Synchronizes the database state with models and migrations. + - > + C(syncdb) - Synchronizes the database state with models and migrations (deprecated in Django 1.7). + This parameter will be removed in community.general 9.0.0. Use C(migrate) instead. + - C(test) - Runs tests for all installed apps. + - > + C(validate) - Validates all installed models (deprecated in Django 1.7). This parameter will be + removed in community.general 9.0.0. Use C(check) instead. + - Other commands can be entered, but will fail if they are unknown to Django. Other commands that may prompt for user input should be run with the C(--noinput) flag. - - The module will perform some basic parameter validation (when applicable) to the commands C(cleanup), - C(collectstatic), C(createcachetable), C(flush), C(loaddata), C(migrate), C(syncdb), C(test), and C(validate). type: str required: true project_path: description: - - The path to the root of the Django application where B(manage.py) lives. + - The path to the root of the Django application where C(manage.py) lives. type: path required: true aliases: [app_path, chdir] @@ -42,12 +55,13 @@ options: description: - A directory to add to the Python path. Typically used to include the settings module if it is located external to the application directory. + - This would be equivalent to adding I(pythonpath)'s value to the C(PYTHONPATH) environment variable. type: path required: false aliases: [python_path] virtualenv: description: - - An optional path to a I(virtualenv) installation to use while running the manage application. + - An optional path to a C(virtualenv) installation to use while running the manage application. type: path aliases: [virtual_env] apps: @@ -87,29 +101,33 @@ options: required: false skip: description: - - Will skip over out-of-order missing migrations, you can only use this parameter with C(migrate) command. + - Will skip over out-of-order missing migrations, you can only use this parameter with C(migrate) command. required: false type: bool merge: description: - - Will run out-of-order or missing migrations as they are not rollback migrations, you can only use this - parameter with C(migrate) command. + - Will run out-of-order or missing migrations as they are not rollback migrations, you can only use this + parameter with C(migrate) command. required: false type: bool link: description: - - Will create links to the files instead of copying them, you can only use this parameter with - C(collectstatic) command. + - Will create links to the files instead of copying them, you can only use this parameter with + C(collectstatic) command. required: false type: bool testrunner: description: - - "From the Django docs: Controls the test runner class that is used to execute tests." + - Controls the test runner class that is used to execute tests. - This parameter is passed as-is to C(manage.py). type: str required: false aliases: [test_runner] notes: + - > + B(ATTENTION - DEPRECATION): Support for Django releases older than 4.1 will be removed in + community.general version 9.0.0 (estimated to be released in May 2024). + Please notice that Django 4.1 requires Python 3.8 or greater. - C(virtualenv) (U(http://www.virtualenv.org)) must be installed on the remote host if the I(virtualenv) parameter is specified. - This module will create a virtualenv if the I(virtualenv) parameter is specified and a virtual environment does not already @@ -121,8 +139,20 @@ notes: - To be able to use the C(collectstatic) command, you must have enabled staticfiles in your settings. - Your C(manage.py) application must be executable (rwxr-xr-x), and must have a valid shebang, i.e. C(#!/usr/bin/env python), for invoking the appropriate Python interpreter. +seealso: + - name: django-admin and manage.py Reference + description: Reference for C(django-admin) or C(manage.py) commands. + link: https://docs.djangoproject.com/en/4.1/ref/django-admin/ + - name: Django Download page + description: The page showing how to get Django and the timeline of supported releases. + link: https://www.djangoproject.com/download/ + - name: What Python version can I use with Django? + description: From the Django FAQ, the response to Python requirements for the framework. + link: https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django requirements: [ "virtualenv", "django" ] -author: "Scott Anderson (@tastychutney)" +author: + - Alexei Znamensky (@russoz) + - Scott Anderson (@tastychutney) ''' EXAMPLES = """ @@ -280,6 +310,21 @@ def main(): project_path = module.params['project_path'] virtualenv = module.params['virtualenv'] + try: + _deprecation = dict( + cleanup="clearsessions", + syncdb="migrate", + validate="check", + ) + module.deprecate( + 'The command {0} has been deprecated as it is no longer supported in recent Django versions.' + 'Please use the command {1} instead that provide similar capability.'.format(command_bin, _deprecation[command_bin]), + version='9.0.0', + collection_name='community.general' + ) + except KeyError: + pass + for param in specific_params: value = module.params[param] if value and param not in command_allowed_param_map[command_bin]: From 8072d11d06f85236413378ace38a7cbcf3feff31 Mon Sep 17 00:00:00 2001 From: ajakk Date: Sat, 22 Oct 2022 21:30:05 +0000 Subject: [PATCH 0262/2104] portage: update comment, drop gentoolkit requirement (#5406) This reflects the changes made in 9189f7a6bfea32b6465517edeb8fca975cb5a061. Signed-off-by: John Helmert III Signed-off-by: John Helmert III --- plugins/modules/packaging/os/portage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/packaging/os/portage.py b/plugins/modules/packaging/os/portage.py index 4c91c9d0b6..98791f8477 100644 --- a/plugins/modules/packaging/os/portage.py +++ b/plugins/modules/packaging/os/portage.py @@ -187,7 +187,6 @@ options: type: bool default: false -requirements: [ gentoolkit ] author: - "William L Thomson Jr (@wltjr)" - "Yap Sok Ann (@sayap)" @@ -315,9 +314,10 @@ def sync_repositories(module, webrsync=False): module.fail_json(msg='could not sync package repositories') -# Note: In the 3 functions below, equery is done one-by-one, but emerge is done -# in one go. If that is not desirable, split the packages into multiple tasks -# instead of joining them together with comma. +# Note: In the 3 functions below, package querying is done one-by-one, +# but emerge is done in one go. If that is not desirable, split the +# packages into multiple tasks instead of joining them together with +# comma. def emerge_packages(module, packages): From b54483b52eecaa2c6c5446f1d13f73f6d95d409e Mon Sep 17 00:00:00 2001 From: ThomasGebert <44234595+ThomasGebert@users.noreply.github.com> Date: Sun, 23 Oct 2022 11:30:48 +0200 Subject: [PATCH 0263/2104] nmcli: add transport_mode configuration for Infiniband devices (#5361) * Adds transport_mode configuration for Infiniband devices Adds transport_mode configuration for Infiniband based ipoib devices, which is one of: - datagram (default) - connected * Remove trailing whitespace * Add changelog fragment * Update changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Remove default for transport_mode * Add test for changing Infiniband transport_mode * remove blank line at end of file Co-authored-by: Thomas Gebert Co-authored-by: Felix Fontein --- ...1-nmcli-add-infiniband-transport-mode.yaml | 2 + plugins/modules/net_tools/nmcli.py | 13 ++ .../plugins/modules/net_tools/test_nmcli.py | 114 ++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml diff --git a/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml b/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml new file mode 100644 index 0000000000..370d124663 --- /dev/null +++ b/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml @@ -0,0 +1,2 @@ +minor_changes: + - "nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361)." diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 13adc8bbd2..49565b9122 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -67,6 +67,12 @@ options: type: str choices: [ 802.3ad, active-backup, balance-alb, balance-rr, balance-tlb, balance-xor, broadcast ] default: balance-rr + transport_mode: + description: + - This option sets the connection type of Infiniband IPoIB devices. + type: str + choices: [ datagram, connected ] + version_added: 5.8.0 master: description: - Master Date: Sun, 23 Oct 2022 22:33:07 +1300 Subject: [PATCH 0264/2104] manageiq_tags_info: new module (#5368) * manageiq_tags: refactor ManageIQTags class out to utils * add manageiq_tags_info module * refactor query_resource_id as a method in ManageIQ * minor adjustments * fix comments from PR * rollback register result in examples * add basic docs for return value --- .github/BOTMETA.yml | 2 + meta/runtime.yml | 2 + plugins/module_utils/manageiq.py | 136 +++++++++++++++ .../manageiq/manageiq_tags.py | 165 ++---------------- .../manageiq/manageiq_tags_info.py | 111 ++++++++++++ 5 files changed, 266 insertions(+), 150 deletions(-) create mode 100644 plugins/modules/remote_management/manageiq/manageiq_tags_info.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 45b86fdcbe..fa9a5f355f 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -982,6 +982,8 @@ files: maintainers: evertmulder $modules/remote_management/manageiq/manageiq_policies_info.py: maintainers: russoz $team_manageiq + $modules/remote_management/manageiq/manageiq_tags_info.py: + maintainers: russoz $team_manageiq $modules/remote_management/manageiq/manageiq_tenant.py: maintainers: evertmulder $modules/remote_management/oneview/: diff --git a/meta/runtime.yml b/meta/runtime.yml index 85c6a5454a..8444d0b6f8 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -716,6 +716,8 @@ plugin_routing: redirect: community.general.remote_management.manageiq.manageiq_provider manageiq_tags: redirect: community.general.remote_management.manageiq.manageiq_tags + manageiq_tags_info: + redirect: community.general.remote_management.manageiq.manageiq_tags_info manageiq_tenant: redirect: community.general.remote_management.manageiq.manageiq_tenant manageiq_user: diff --git a/plugins/module_utils/manageiq.py b/plugins/module_utils/manageiq.py index 83d44c1110..cbce05b8ec 100644 --- a/plugins/module_utils/manageiq.py +++ b/plugins/module_utils/manageiq.py @@ -166,6 +166,20 @@ class ManageIQ(object): return ManageIQPolicies(manageiq, resource_type, resource_id) + def query_resource_id(self, resource_type, resource_name): + """ Query the resource name in ManageIQ. + + Returns: + the resource ID if it exists in ManageIQ, Fail otherwise. + """ + resource = self.find_collection_resource_by(resource_type, name=resource_name) + if resource: + return resource["id"] + else: + msg = "{resource_name} {resource_type} does not exist in manageiq".format( + resource_name=resource_name, resource_type=resource_type) + self.module.fail_json(msg=msg) + class ManageIQPolicies(object): """ @@ -332,3 +346,125 @@ class ManageIQPolicies(object): msg="Successfully {action}ed profiles: {profiles}".format( action=action, profiles=profiles)) + + +class ManageIQTags(object): + """ + Object to execute tags management operations of manageiq resources. + """ + + def __init__(self, manageiq, resource_type, resource_id): + self.manageiq = manageiq + + self.module = self.manageiq.module + self.api_url = self.manageiq.api_url + self.client = self.manageiq.client + + self.resource_type = resource_type + self.resource_id = resource_id + self.resource_url = '{api_url}/{resource_type}/{resource_id}'.format( + api_url=self.api_url, + resource_type=resource_type, + resource_id=resource_id) + + def full_tag_name(self, tag): + """ Returns the full tag name in manageiq + """ + return '/managed/{tag_category}/{tag_name}'.format( + tag_category=tag['category'], + tag_name=tag['name']) + + def clean_tag_object(self, tag): + """ Clean a tag object to have human readable form of: + { + full_name: STR, + name: STR, + display_name: STR, + category: STR + } + """ + full_name = tag.get('name') + categorization = tag.get('categorization', {}) + + return dict( + full_name=full_name, + name=categorization.get('name'), + display_name=categorization.get('display_name'), + category=categorization.get('category', {}).get('name')) + + def query_resource_tags(self): + """ Returns a set of the tag objects assigned to the resource + """ + url = '{resource_url}/tags?expand=resources&attributes=categorization' + try: + response = self.client.get(url.format(resource_url=self.resource_url)) + except Exception as e: + msg = "Failed to query {resource_type} tags: {error}".format( + resource_type=self.resource_type, + error=e) + self.module.fail_json(msg=msg) + + resources = response.get('resources', []) + + # clean the returned rest api tag object to look like: + # {full_name: STR, name: STR, display_name: STR, category: STR} + tags = [self.clean_tag_object(tag) for tag in resources] + + return tags + + def tags_to_update(self, tags, action): + """ Create a list of tags we need to update in ManageIQ. + + Returns: + Whether or not a change took place and a message describing the + operation executed. + """ + tags_to_post = [] + assigned_tags = self.query_resource_tags() + + # make a list of assigned full tag names strings + # e.g. ['/managed/environment/prod', ...] + assigned_tags_set = set([tag['full_name'] for tag in assigned_tags]) + + for tag in tags: + assigned = self.full_tag_name(tag) in assigned_tags_set + + if assigned and action == 'unassign': + tags_to_post.append(tag) + elif (not assigned) and action == 'assign': + tags_to_post.append(tag) + + return tags_to_post + + def assign_or_unassign_tags(self, tags, action): + """ Perform assign/unassign action + """ + # get a list of tags needed to be changed + tags_to_post = self.tags_to_update(tags, action) + if not tags_to_post: + return dict( + changed=False, + msg="Tags already {action}ed, nothing to do".format(action=action)) + + # try to assign or unassign tags to resource + url = '{resource_url}/tags'.format(resource_url=self.resource_url) + try: + response = self.client.post(url, action=action, resources=tags) + except Exception as e: + msg = "Failed to {action} tag: {error}".format( + action=action, + error=e) + self.module.fail_json(msg=msg) + + # check all entities in result to be successful + for result in response['results']: + if not result['success']: + msg = "Failed to {action}: {message}".format( + action=action, + message=result['message']) + self.module.fail_json(msg=msg) + + # successfully changed all needed tags + return dict( + changed=True, + msg="Successfully {action}ed tags".format(action=action)) diff --git a/plugins/modules/remote_management/manageiq/manageiq_tags.py b/plugins/modules/remote_management/manageiq/manageiq_tags.py index d8db5960ff..209fb5ea9d 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tags.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tags.py @@ -25,17 +25,17 @@ options: state: type: str description: - - absent - tags should not exist, - - present - tags should exist, - - list - list current tags. + - C(absent) - tags should not exist. + - C(present) - tags should exist. + - C(list) - list current tags. choices: ['absent', 'present', 'list'] default: 'present' tags: type: list elements: dict description: - - tags - list of dictionaries, each includes 'name' and 'category' keys. - - required if state is present or absent. + - C(tags) - list of dictionaries, each includes C(name) and c(category) keys. + - Required if I(state) is C(present) or C(absent). resource_type: type: str description: @@ -58,7 +58,7 @@ options: ''' EXAMPLES = ''' -- name: Create new tags for a provider in ManageIQ +- name: Create new tags for a provider in ManageIQ. community.general.manageiq_tags: resource_name: 'EngLab' resource_type: 'provider' @@ -73,7 +73,7 @@ EXAMPLES = ''' password: 'smartvm' validate_certs: false -- name: Create new tags for a provider in ManageIQ +- name: Create new tags for a provider in ManageIQ. community.general.manageiq_tags: resource_id: 23000000790497 resource_type: 'provider' @@ -88,7 +88,7 @@ EXAMPLES = ''' password: 'smartvm' validate_certs: false -- name: Remove tags for a provider in ManageIQ +- name: Remove tags for a provider in ManageIQ. community.general.manageiq_tags: state: absent resource_name: 'EngLab' @@ -104,7 +104,7 @@ EXAMPLES = ''' password: 'smartvm' validate_certs: false -- name: List current tags for a provider in ManageIQ +- name: List current tags for a provider in ManageIQ. community.general.manageiq_tags: state: list resource_name: 'EngLab' @@ -120,152 +120,17 @@ RETURN = ''' ''' from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec, manageiq_entities - - -def query_resource_id(manageiq, resource_type, resource_name): - """ Query the resource name in ManageIQ. - - Returns: - the resource id if it exists in manageiq, Fail otherwise. - """ - resource = manageiq.find_collection_resource_by(resource_type, name=resource_name) - if resource: - return resource["id"] - else: - msg = "{resource_name} {resource_type} does not exist in manageiq".format( - resource_name=resource_name, resource_type=resource_type) - manageiq.module.fail_json(msg=msg) - - -class ManageIQTags(object): - """ - Object to execute tags management operations of manageiq resources. - """ - - def __init__(self, manageiq, resource_type, resource_id): - self.manageiq = manageiq - - self.module = self.manageiq.module - self.api_url = self.manageiq.api_url - self.client = self.manageiq.client - - self.resource_type = resource_type - self.resource_id = resource_id - self.resource_url = '{api_url}/{resource_type}/{resource_id}'.format( - api_url=self.api_url, - resource_type=resource_type, - resource_id=resource_id) - - def full_tag_name(self, tag): - """ Returns the full tag name in manageiq - """ - return '/managed/{tag_category}/{tag_name}'.format( - tag_category=tag['category'], - tag_name=tag['name']) - - def clean_tag_object(self, tag): - """ Clean a tag object to have human readable form of: - { - full_name: STR, - name: STR, - display_name: STR, - category: STR - } - """ - full_name = tag.get('name') - categorization = tag.get('categorization', {}) - - return dict( - full_name=full_name, - name=categorization.get('name'), - display_name=categorization.get('display_name'), - category=categorization.get('category', {}).get('name')) - - def query_resource_tags(self): - """ Returns a set of the tag objects assigned to the resource - """ - url = '{resource_url}/tags?expand=resources&attributes=categorization' - try: - response = self.client.get(url.format(resource_url=self.resource_url)) - except Exception as e: - msg = "Failed to query {resource_type} tags: {error}".format( - resource_type=self.resource_type, - error=e) - self.module.fail_json(msg=msg) - - resources = response.get('resources', []) - - # clean the returned rest api tag object to look like: - # {full_name: STR, name: STR, display_name: STR, category: STR} - tags = [self.clean_tag_object(tag) for tag in resources] - - return tags - - def tags_to_update(self, tags, action): - """ Create a list of tags we need to update in ManageIQ. - - Returns: - Whether or not a change took place and a message describing the - operation executed. - """ - tags_to_post = [] - assigned_tags = self.query_resource_tags() - - # make a list of assigned full tag names strings - # e.g. ['/managed/environment/prod', ...] - assigned_tags_set = set([tag['full_name'] for tag in assigned_tags]) - - for tag in tags: - assigned = self.full_tag_name(tag) in assigned_tags_set - - if assigned and action == 'unassign': - tags_to_post.append(tag) - elif (not assigned) and action == 'assign': - tags_to_post.append(tag) - - return tags_to_post - - def assign_or_unassign_tags(self, tags, action): - """ Perform assign/unassign action - """ - # get a list of tags needed to be changed - tags_to_post = self.tags_to_update(tags, action) - if not tags_to_post: - return dict( - changed=False, - msg="Tags already {action}ed, nothing to do".format(action=action)) - - # try to assign or unassign tags to resource - url = '{resource_url}/tags'.format(resource_url=self.resource_url) - try: - response = self.client.post(url, action=action, resources=tags) - except Exception as e: - msg = "Failed to {action} tag: {error}".format( - action=action, - error=e) - self.module.fail_json(msg=msg) - - # check all entities in result to be successful - for result in response['results']: - if not result['success']: - msg = "Failed to {action}: {message}".format( - action=action, - message=result['message']) - self.module.fail_json(msg=msg) - - # successfully changed all needed tags - return dict( - changed=True, - msg="Successfully {action}ed tags".format(action=action)) +from ansible_collections.community.general.plugins.module_utils.manageiq import ( + ManageIQ, ManageIQTags, manageiq_argument_spec, manageiq_entities +) def main(): actions = {'present': 'assign', 'absent': 'unassign', 'list': 'list'} argument_spec = dict( tags=dict(type='list', elements='dict'), - resource_id=dict(required=False, type='int'), - resource_name=dict(required=False, type='str'), + resource_id=dict(type='int'), + resource_name=dict(type='str'), resource_type=dict(required=True, type='str', choices=list(manageiq_entities().keys())), state=dict(required=False, type='str', @@ -298,7 +163,7 @@ def main(): # query resource id, fail if resource does not exist if resource_id is None: - resource_id = query_resource_id(manageiq, resource_type, resource_name) + resource_id = manageiq.query_resource_id(resource_type, resource_name) manageiq_tags = ManageIQTags(manageiq, resource_type, resource_id) diff --git a/plugins/modules/remote_management/manageiq/manageiq_tags_info.py b/plugins/modules/remote_management/manageiq/manageiq_tags_info.py new file mode 100644 index 0000000000..0cdcd5184d --- /dev/null +++ b/plugins/modules/remote_management/manageiq/manageiq_tags_info.py @@ -0,0 +1,111 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2017, Daniel Korn +# Copyright (c) 2017, Yaacov Zamir +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = ''' + +module: manageiq_tags_info +version_added: 5.8.0 +short_description: Retrieve resource tags in ManageIQ +extends_documentation_fragment: +- community.general.manageiq + +author: Alexei Znamensky (@russoz) +description: + - This module supports retrieving resource tags from ManageIQ. + +options: + resource_type: + type: str + description: + - The relevant resource type in ManageIQ. + required: true + choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', + 'data store', 'group', 'resource pool', 'service', 'service template', + 'template', 'tenant', 'user'] + resource_name: + type: str + description: + - The name of the resource at which tags will be controlled. + - Must be specified if I(resource_id) is not set. Both options are mutually exclusive. + resource_id: + description: + - The ID of the resource at which tags will be controlled. + - Must be specified if I(resource_name) is not set. Both options are mutually exclusive. + type: int +''' + +EXAMPLES = ''' +- name: List current tags for a provider in ManageIQ. + community.general.manageiq_tags_info: + resource_name: 'EngLab' + resource_type: 'provider' + manageiq_connection: + url: 'http://127.0.0.1:3000' + username: 'admin' + password: 'smartvm' + register: result +''' + +RETURN = ''' +tags: + description: List of tags associated with the resource. + returned: on success + type: list + elements: dict +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.manageiq import ( + ManageIQ, ManageIQTags, manageiq_argument_spec, manageiq_entities +) + + +def main(): + argument_spec = dict( + resource_id=dict(type='int'), + resource_name=dict(type='str'), + resource_type=dict(required=True, type='str', + choices=list(manageiq_entities().keys())), + ) + # add the manageiq connection arguments to the arguments + argument_spec.update(manageiq_argument_spec()) + + module = AnsibleModule( + argument_spec=argument_spec, + mutually_exclusive=[["resource_id", "resource_name"]], + required_one_of=[["resource_id", "resource_name"]], + supports_check_mode=True, + ) + + resource_id = module.params['resource_id'] + resource_type_key = module.params['resource_type'] + resource_name = module.params['resource_name'] + + # get the action and resource type + resource_type = manageiq_entities()[resource_type_key] + + manageiq = ManageIQ(module) + + # query resource id, fail if resource does not exist + if resource_id is None: + resource_id = manageiq.query_resource_id(resource_type, resource_name) + + manageiq_tags = ManageIQTags(manageiq, resource_type, resource_id) + + # return a list of current tags for this object + current_tags = manageiq_tags.query_resource_tags() + res_args = dict(changed=False, tags=current_tags) + + module.exit_json(**res_args) + + +if __name__ == "__main__": + main() From baa8bd52ab7fd08b3b0b05880a43d8b45e6c7dc6 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 23 Oct 2022 22:42:53 +1300 Subject: [PATCH 0265/2104] pkgng: fix error-handling when upgrading all (#5369) * pkgng: fix error-handling when upgrading all * provide for rc=1 in check_mode + test * fix name of task in test * add changelog fragment --- .../fragments/5369-pkgng-fix-update-all.yaml | 2 ++ plugins/modules/packaging/os/pkgng.py | 14 +++----- .../targets/pkgng/tasks/freebsd.yml | 36 +++++++++++++++++++ 3 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5369-pkgng-fix-update-all.yaml diff --git a/changelogs/fragments/5369-pkgng-fix-update-all.yaml b/changelogs/fragments/5369-pkgng-fix-update-all.yaml new file mode 100644 index 0000000000..783d461a9e --- /dev/null +++ b/changelogs/fragments/5369-pkgng-fix-update-all.yaml @@ -0,0 +1,2 @@ +bugfixes: + - pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363). diff --git a/plugins/modules/packaging/os/pkgng.py b/plugins/modules/packaging/os/pkgng.py index 5f4a2a5f27..6e94dcaee5 100644 --- a/plugins/modules/packaging/os/pkgng.py +++ b/plugins/modules/packaging/os/pkgng.py @@ -38,7 +38,7 @@ options: state: description: - State of the package. - - 'Note: "latest" added in 2.7' + - 'Note: C(latest) added in 2.7.' choices: [ 'present', 'latest', 'absent' ] required: false default: present @@ -149,10 +149,7 @@ def query_package(module, run_pkgng, name): rc, out, err = run_pkgng('info', '-g', '-e', name) - if rc == 0: - return True - - return False + return rc == 0 def query_update(module, run_pkgng, name): @@ -162,10 +159,7 @@ def query_update(module, run_pkgng, name): # rc = 1, updates available rc, out, err = run_pkgng('upgrade', '-g', '-n', name) - if rc == 1: - return True - - return False + return rc == 1 def pkgng_older_than(module, pkgng_path, compare_version): @@ -191,7 +185,7 @@ def upgrade_packages(module, run_pkgng): pkgng_args = ['upgrade'] pkgng_args.append('-n' if module.check_mode else '-y') - rc, out, err = run_pkgng(*pkgng_args) + rc, out, err = run_pkgng(*pkgng_args, check_rc=(not module.check_mode)) matches = re.findall('^Number of packages to be (?:upgraded|reinstalled): ([0-9]+)', out, re.MULTILINE) for match in matches: diff --git a/tests/integration/targets/pkgng/tasks/freebsd.yml b/tests/integration/targets/pkgng/tasks/freebsd.yml index d17a3083d3..a7cb90b11d 100644 --- a/tests/integration/targets/pkgng/tasks/freebsd.yml +++ b/tests/integration/targets/pkgng/tasks/freebsd.yml @@ -140,6 +140,42 @@ - pkgng_example4.changed - not pkgng_example4_idempotent.changed +## +## pkgng - example - state=latest for out-of-date package without privileges +## +- name: Install intentionally out-of-date package and try to upgrade it with unprivileged user + block: + - ansible.builtin.user: + name: powerless + shell: /bin/bash + + - name: Create out-of-date test package + import_tasks: create-outofdate-pkg.yml + + - name: Install out-of-date test package + command: 'pkg add {{ pkgng_test_outofdate_pkg_path }}' + register: pkgng_example4_nopower_prepare + + - name: Check for any available package upgrades with unprivileged user + become: true + become_user: powerless + pkgng: + name: '*' + state: latest + register: pkgng_example4_nopower_wildcard + ignore_errors: true + + - name: Remove test out-of-date package + pkgng: + name: '{{ pkgng_test_pkg_name }}' + state: absent + + - name: Ensure pkgng upgrades package correctly + assert: + that: + - not pkgng_example4_nopower_prepare.failed + - pkgng_example4_nopower_wildcard.failed + ## ## pkgng - example - Install multiple packages in one command ## From f5ca03047d3d22c73fa83e37982d7e4c5c90819d Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 24 Oct 2022 03:33:14 +1300 Subject: [PATCH 0266/2104] django_manage: deprecate venv creation when missing (#5405) * deprecate venv creation when missing * add changelog fragment * fix sanity checks * Update changelogs/fragments/5404-django-manage-venv-deprecation.yml Co-authored-by: Felix Fontein * Update plugins/modules/web_infrastructure/django_manage.py Co-authored-by: Felix Fontein * Update plugins/modules/web_infrastructure/django_manage.py Co-authored-by: Felix Fontein * minor change to help future removal of feature Co-authored-by: Felix Fontein --- .../5404-django-manage-venv-deprecation.yml | 5 ++++ .../web_infrastructure/django_manage.py | 29 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5404-django-manage-venv-deprecation.yml diff --git a/changelogs/fragments/5404-django-manage-venv-deprecation.yml b/changelogs/fragments/5404-django-manage-venv-deprecation.yml new file mode 100644 index 0000000000..f6a8e6e01e --- /dev/null +++ b/changelogs/fragments/5404-django-manage-venv-deprecation.yml @@ -0,0 +1,5 @@ +deprecated_features: + - >- + django_manage - the behavior of "creating the virtual environment when missing" + is being deprecated and will be removed in community.general version 9.0.0 + (https://github.com/ansible-collections/community.general/pull/5405). diff --git a/plugins/modules/web_infrastructure/django_manage.py b/plugins/modules/web_infrastructure/django_manage.py index 9aec0f832d..188ff2d3df 100644 --- a/plugins/modules/web_infrastructure/django_manage.py +++ b/plugins/modules/web_infrastructure/django_manage.py @@ -123,15 +123,28 @@ options: type: str required: false aliases: [test_runner] + ack_venv_creation_deprecation: + description: + - >- + When a I(virtualenv) is set but the virtual environment does not exist, the current behavior is + to create a new virtual environment. That behavior is deprecated and if that case happens it will + generate a deprecation warning. Set this flag to C(true) to suppress the deprecation warning. + - Please note that you will receive no further warning about this being removed until the module + will start failing in such cases from community.general 9.0.0 on. + type: bool + version_added: 5.8.0 + notes: - > B(ATTENTION - DEPRECATION): Support for Django releases older than 4.1 will be removed in community.general version 9.0.0 (estimated to be released in May 2024). Please notice that Django 4.1 requires Python 3.8 or greater. - C(virtualenv) (U(http://www.virtualenv.org)) must be installed on the remote host if the I(virtualenv) parameter - is specified. + is specified. This requirement is deprecated and will be removed in community.general version 9.0.0. - This module will create a virtualenv if the I(virtualenv) parameter is specified and a virtual environment does not already - exist at the given location. + exist at the given location. This behavior is deprecated and will be removed in community.general version 9.0.0. + - The parameter I(virtualenv) will remain in use, but it will require the specified virtualenv to exist. + The recommended way to create one in Ansible is by using M(ansible.builtin.pip). - This module assumes English error messages for the C(createcachetable) command to detect table existence, unfortunately. - To be able to use the C(migrate) command with django versions < 1.7, you must have C(south) installed and added @@ -213,6 +226,17 @@ def _ensure_virtualenv(module): activate = os.path.join(vbin, 'activate') if not os.path.exists(activate): + # In version 9.0.0, if the venv is not found, it should fail_json() here. + if not module.params['ack_venv_creation_deprecation']: + module.deprecate( + 'The behavior of "creating the virtual environment when missing" is being ' + 'deprecated and will be removed in community.general version 9.0.0. ' + 'Set the module parameter `ack_venv_creation_deprecation: true` to ' + 'prevent this message from showing up when creating a virtualenv.', + version='9.0.0', + collection_name='community.general', + ) + virtualenv = module.get_bin_path('virtualenv', True) vcmd = [virtualenv, venv_param] rc, out_venv, err_venv = module.run_command(vcmd) @@ -302,6 +326,7 @@ def main(): skip=dict(type='bool'), merge=dict(type='bool'), link=dict(type='bool'), + ack_venv_creation_deprecation=dict(type='bool'), ), ) From 91cac4c8165b29d590482e2d39522fc2e1630d9d Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 24 Oct 2022 03:34:04 +1300 Subject: [PATCH 0267/2104] MH CmdModuleHelper: deprecation (#5370) * MH CmdModuleHelper: deprecation * add changelog fragment * add deprecation comments in many parts of the code --- .../fragments/5370-mh-cmdmixin-deprecation.yaml | 5 +++++ plugins/module_utils/mh/mixins/cmd.py | 16 ++++++++++++++++ plugins/module_utils/mh/module_helper.py | 8 ++++++++ 3 files changed, 29 insertions(+) create mode 100644 changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml diff --git a/changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml b/changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml new file mode 100644 index 0000000000..4c4273358a --- /dev/null +++ b/changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml @@ -0,0 +1,5 @@ +deprecated_features: + - CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). + - CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). + - CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). + - ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt`` module util (https://github.com/ansible-collections/community.general/pull/5370). diff --git a/plugins/module_utils/mh/mixins/cmd.py b/plugins/module_utils/mh/mixins/cmd.py index da2629f9fe..a7d3793949 100644 --- a/plugins/module_utils/mh/mixins/cmd.py +++ b/plugins/module_utils/mh/mixins/cmd.py @@ -34,6 +34,10 @@ class ArgFormat(object): def __init__(self, name, fmt=None, style=FORMAT, stars=0): """ + THIS CLASS IS BEING DEPRECATED. + It was never meant to be used outside the scope of CmdMixin, and CmdMixin is being deprecated. + See the deprecation notice in ``CmdMixin.__init__()`` below. + Creates a CLI-formatter for one specific argument. The argument may be a module parameter or just a named parameter for the CLI command execution. :param name: Name of the argument to be formatted @@ -88,6 +92,9 @@ class ArgFormat(object): class CmdMixin(object): """ + THIS CLASS IS BEING DEPRECATED. + See the deprecation notice in ``CmdMixin.__init__()`` below. + Mixin for mapping module options to running a CLI command with its arguments. """ command = None @@ -110,6 +117,15 @@ class CmdMixin(object): result[param] = ArgFormat(param, **fmt_spec) return result + def __init__(self, *args, **kwargs): + super(CmdMixin, self).__init__(*args, **kwargs) + self.module.deprecate( + 'The CmdMixin used in classes CmdModuleHelper and CmdStateModuleHelper is being deprecated. ' + 'Modules should use community.general.plugins.module_utils.cmd_runner.CmdRunner instead.', + version='8.0.0', + collection_name='community.general', + ) + def _calculate_args(self, extra_params=None, params=None): def add_arg_formatted_param(_cmd_args, arg_format, _value): args = list(arg_format.to_text(_value)) diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 4251285751..79b6f48752 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -84,8 +84,16 @@ class StateModuleHelper(StateMixin, ModuleHelper): class CmdModuleHelper(CmdMixin, ModuleHelper): + """ + THIS CLASS IS BEING DEPRECATED. + See the deprecation notice in ``CmdMixin.__init__()``. + """ pass class CmdStateModuleHelper(CmdMixin, StateMixin, ModuleHelper): + """ + THIS CLASS IS BEING DEPRECATED. + See the deprecation notice in ``CmdMixin.__init__()``. + """ pass From 268073915349c8975a9ba753b9aa7b022db73abd Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Sun, 23 Oct 2022 17:18:06 +0200 Subject: [PATCH 0268/2104] [Scaleway] Add module to manage container registries (#5399) * [Scaleway] Add module to manage container registries Signed-off-by: Lunik * first review Signed-off-by: Lunik * lint documentation on return value Signed-off-by: Lunik * second review Signed-off-by: Lunik * second review *bis Signed-off-by: Lunik * second review *ter Signed-off-by: Lunik * Fix typo. Signed-off-by: Lunik Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 4 + .gitignore | 3 + meta/runtime.yml | 4 + .../scaleway_waitable_resource.py | 33 +++ plugins/module_utils/scaleway.py | 101 +++++++ .../scaleway/scaleway_container_registry.py | 265 ++++++++++++++++++ .../scaleway_container_registry_info.py | 146 ++++++++++ .../scaleway_container_registry/aliases | 6 + .../defaults/main.yml | 9 + .../tasks/main.yml | 178 ++++++++++++ .../scaleway_container_registry_info/aliases | 6 + .../defaults/main.yml | 9 + .../tasks/main.yml | 41 +++ 13 files changed, 805 insertions(+) create mode 100644 plugins/doc_fragments/scaleway_waitable_resource.py create mode 100644 plugins/modules/cloud/scaleway/scaleway_container_registry.py create mode 100644 plugins/modules/cloud/scaleway/scaleway_container_registry_info.py create mode 100644 tests/integration/targets/scaleway_container_registry/aliases create mode 100644 tests/integration/targets/scaleway_container_registry/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_container_registry/tasks/main.yml create mode 100644 tests/integration/targets/scaleway_container_registry_info/aliases create mode 100644 tests/integration/targets/scaleway_container_registry_info/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_container_registry_info/tasks/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index fa9a5f355f..53fa9ad257 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -461,6 +461,10 @@ files: maintainers: $team_scaleway $modules/cloud/scaleway/scaleway_compute_private_network.py: maintainers: pastral + $modules/cloud/scaleway/scaleway_container_registry.py: + maintainers: Lunik + $modules/cloud/scaleway/scaleway_container_registry_info.py: + maintainers: Lunik $modules/cloud/scaleway/scaleway_database_backup.py: maintainers: guillaume_ro_fr $modules/cloud/scaleway/scaleway_image_info.py: diff --git a/.gitignore b/.gitignore index c39969326d..b7868a9e41 100644 --- a/.gitignore +++ b/.gitignore @@ -509,3 +509,6 @@ $RECYCLE.BIN/ *.lnk # End of https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks + +# Integration tests cloud configs +tests/integration/cloud-config-*.ini diff --git a/meta/runtime.yml b/meta/runtime.yml index 8444d0b6f8..350edaee11 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1379,6 +1379,10 @@ plugin_routing: redirect: community.general.cloud.scaleway.scaleway_compute scaleway_compute_private_network: redirect: community.general.cloud.scaleway.scaleway_compute_private_network + scaleway_container_registry: + redirect: community.general.cloud.scaleway.scaleway_container_registry + scaleway_container_registry_info: + redirect: community.general.cloud.scaleway.scaleway_container_registry_info scaleway_database_backup: redirect: community.general.cloud.scaleway.scaleway_database_backup scaleway_image_facts: diff --git a/plugins/doc_fragments/scaleway_waitable_resource.py b/plugins/doc_fragments/scaleway_waitable_resource.py new file mode 100644 index 0000000000..3ab5c7d6f4 --- /dev/null +++ b/plugins/doc_fragments/scaleway_waitable_resource.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Standard documentation fragment + DOCUMENTATION = r''' +options: + wait: + description: + - Wait for the resource to reach its desired state before returning. + type: bool + default: true + wait_timeout: + type: int + description: + - Time to wait for the resource to reach the expected state. + required: false + default: 300 + wait_sleep_time: + type: int + description: + - Time to wait before every attempt to check the state of the resource. + required: false + default: 3 +''' diff --git a/plugins/module_utils/scaleway.py b/plugins/module_utils/scaleway.py index 4c1a475689..ee22d0f183 100644 --- a/plugins/module_utils/scaleway.py +++ b/plugins/module_utils/scaleway.py @@ -9,6 +9,8 @@ __metaclass__ = type import json import re import sys +import datetime +import time from ansible.module_utils.basic import env_fallback from ansible.module_utils.urls import fetch_url @@ -26,6 +28,14 @@ def scaleway_argument_spec(): ) +def scaleway_waitable_resource_argument_spec(): + return dict( + wait=dict(type="bool", default=True), + wait_timeout=dict(type="int", default=300), + wait_sleep_time=dict(type="int", default=3), + ) + + def payload_from_object(scw_object): return dict( (k, v) @@ -63,6 +73,25 @@ def parse_pagination_link(header): return parsed_relations +def filter_sensitive_attributes(container, attributes): + for attr in attributes: + container[attr] = "SENSITIVE_VALUE" + + return container + + +def resource_attributes_should_be_changed(target, wished, verifiable_mutable_attributes, mutable_attributes): + diff = dict() + for attr in verifiable_mutable_attributes: + if wished[attr] is not None and target[attr] != wished[attr]: + diff[attr] = wished[attr] + + if diff: + return dict((attr, wished[attr]) for attr in mutable_attributes) + else: + return diff + + class Response(object): def __init__(self, resp, info): @@ -169,6 +198,78 @@ class Scaleway(object): def warn(self, x): self.module.warn(str(x)) + def fetch_state(self, resource): + self.module.debug("fetch_state of resource: %s" % resource["id"]) + response = self.get(path=self.api_path + "/%s" % resource["id"]) + + if response.status_code == 404: + return "absent" + + if not response.ok: + msg = 'Error during state fetching: (%s) %s' % (response.status_code, response.json) + self.module.fail_json(msg=msg) + + try: + self.module.debug("Resource %s in state: %s" % (resource["id"], response.json["status"])) + return response.json["status"] + except KeyError: + self.module.fail_json(msg="Could not fetch state in %s" % response.json) + + def fetch_paginated_resources(self, resource_key, **pagination_kwargs): + response = self.get( + path=self.api_path, + params=pagination_kwargs) + + status_code = response.status_code + if not response.ok: + self.module.fail_json(msg='Error getting {0} [{1}: {2}]'.format( + resource_key, + response.status_code, response.json['message'])) + + return response.json[resource_key] + + def fetch_all_resources(self, resource_key, **pagination_kwargs): + resources = [] + + result = [None] + while len(result) != 0: + result = self.fetch_paginated_resources(resource_key, **pagination_kwargs) + resources += result + if 'page' in pagination_kwargs: + pagination_kwargs['page'] += 1 + else: + pagination_kwargs['page'] = 2 + + return resources + + def wait_to_complete_state_transition(self, resource, stable_states, force_wait=False): + wait = self.module.params["wait"] + + if not (wait or force_wait): + return + + wait_timeout = self.module.params["wait_timeout"] + wait_sleep_time = self.module.params["wait_sleep_time"] + + # Prevent requesting the ressource status too soon + time.sleep(wait_sleep_time) + + start = datetime.datetime.utcnow() + end = start + datetime.timedelta(seconds=wait_timeout) + + while datetime.datetime.utcnow() < end: + self.module.debug("We are going to wait for the resource to finish its transition") + + state = self.fetch_state(resource) + if state in stable_states: + self.module.debug("It seems that the resource is not in transition anymore.") + self.module.debug("load-balancer in state: %s" % self.fetch_state(resource)) + break + + time.sleep(wait_sleep_time) + else: + self.module.fail_json(msg="Server takes too long to finish its transition") + SCALEWAY_LOCATION = { 'par1': { diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry.py b/plugins/modules/cloud/scaleway/scaleway_container_registry.py new file mode 100644 index 0000000000..ed10ddf292 --- /dev/null +++ b/plugins/modules/cloud/scaleway/scaleway_container_registry.py @@ -0,0 +1,265 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Container registry management module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_container_registry +short_description: Scaleway Container registry management module +version_added: 5.8.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module manages container registries on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + - community.general.scaleway_waitable_resource + + +options: + state: + type: str + description: + - Indicate desired state of the container regitry. + default: present + choices: + - present + - absent + + project_id: + type: str + description: + - Project identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the container registry. + required: true + + description: + description: + - Description of the container registry. + type: str + + privacy_policy: + type: str + description: + - Default visibility policy. + - Everyone will be able to pull images from a C(public) registry. + choices: + - public + - private + default: private +''' + +EXAMPLES = ''' +- name: Create a container registry + community.general.scaleway_container_registry: + project_id: '{{ scw_project }}' + state: present + region: fr-par + name: my-awesome-container-registry + register: container_registry_creation_task + +- name: Make sure container registry is deleted + community.general.scaleway_container_registry: + project_id: '{{ scw_project }}' + state: absent + region: fr-par + name: my-awesome-container-registry +''' + +RETURN = ''' +container_registry: + description: The container registry information. + returned: when I(state=present) + type: dict + sample: + created_at: "2022-10-14T09:51:07.949716Z" + description: Managed by Ansible + endpoint: rg.fr-par.scw.cloud/my-awesome-registry + id: 0d7d5270-7864-49c2-920b-9fd6731f3589 + image_count: 0 + is_public: false + name: my-awesome-registry + organization_id: 10697b59-5c34-4d24-8d15-9ff2d3b89f58 + project_id: 3da4f0b2-06be-4773-8ec4-5dfa435381be + region: fr-par + size: 0 + status: ready + status_message: "" + updated_at: "2022-10-14T09:51:07.949716Z" +''' + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed +) +from ansible.module_utils.basic import AnsibleModule + +STABLE_STATES = ( + "ready", + "absent" +) + +MUTABLE_ATTRIBUTES = ( + "description", + "is_public" +) + + +def payload_from_wished_cr(wished_cr): + payload = { + "project_id": wished_cr["project_id"], + "name": wished_cr["name"], + "description": wished_cr["description"], + "is_public": wished_cr["privacy_policy"] == "public" + } + + return payload + + +def absent_strategy(api, wished_cr): + changed = False + + cr_list = api.fetch_all_resources("namespaces") + cr_lookup = dict((cr["name"], cr) + for cr in cr_list) + + if wished_cr["name"] not in cr_lookup: + return changed, {} + + target_cr = cr_lookup[wished_cr["name"]] + changed = True + if api.module.check_mode: + return changed, {"status": "Container registry would be destroyed"} + + api.wait_to_complete_state_transition(resource=target_cr, stable_states=STABLE_STATES, force_wait=True) + response = api.delete(path=api.api_path + "/%s" % target_cr["id"]) + if not response.ok: + api.module.fail_json(msg='Error deleting container registry [{0}: {1}]'.format( + response.status_code, response.json)) + + api.wait_to_complete_state_transition(resource=target_cr, stable_states=STABLE_STATES) + return changed, response.json + + +def present_strategy(api, wished_cr): + changed = False + + cr_list = api.fetch_all_resources("namespaces") + cr_lookup = dict((cr["name"], cr) + for cr in cr_list) + + payload_cr = payload_from_wished_cr(wished_cr) + + if wished_cr["name"] not in cr_lookup: + changed = True + if api.module.check_mode: + return changed, {"status": "A container registry would be created."} + + # Create container registry + api.warn(payload_cr) + creation_response = api.post(path=api.api_path, + data=payload_cr) + + if not creation_response.ok: + msg = "Error during container registry creation: %s: '%s' (%s)" % (creation_response.info['msg'], + creation_response.json['message'], + creation_response.json) + api.module.fail_json(msg=msg) + + api.wait_to_complete_state_transition(resource=creation_response.json, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % creation_response.json["id"]) + return changed, response.json + + target_cr = cr_lookup[wished_cr["name"]] + patch_payload = resource_attributes_should_be_changed(target=target_cr, + wished=payload_cr, + verifiable_mutable_attributes=MUTABLE_ATTRIBUTES, + mutable_attributes=MUTABLE_ATTRIBUTES) + + if not patch_payload: + return changed, target_cr + + changed = True + if api.module.check_mode: + return changed, {"status": "Container registry attributes would be changed."} + + cr_patch_response = api.patch(path=api.api_path + "/%s" % target_cr["id"], + data=patch_payload) + + if not cr_patch_response.ok: + api.module.fail_json(msg='Error during container registry attributes update: [{0}: {1}]'.format( + cr_patch_response.status_code, cr_patch_response.json['message'])) + + api.wait_to_complete_state_transition(resource=target_cr, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % target_cr["id"]) + return changed, response.json + + +state_strategy = { + "present": present_strategy, + "absent": absent_strategy +} + + +def core(module): + region = module.params["region"] + wished_container_registry = { + "state": module.params["state"], + "project_id": module.params["project_id"], + "name": module.params["name"], + "description": module.params['description'], + "privacy_policy": module.params['privacy_policy'] + } + + api = Scaleway(module=module) + api.api_path = "registry/v1/regions/%s/namespaces" % region + + changed, summary = state_strategy[wished_container_registry["state"]](api=api, wished_cr=wished_container_registry) + + module.exit_json(changed=changed, container_registry=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(scaleway_waitable_resource_argument_spec()) + argument_spec.update(dict( + state=dict(type='str', default='present', choices=['absent', 'present']), + project_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True), + description=dict(type='str', default=''), + privacy_policy=dict(type='str', default='private', choices=['public', 'private']) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry_info.py b/plugins/modules/cloud/scaleway/scaleway_container_registry_info.py new file mode 100644 index 0000000000..c53e405780 --- /dev/null +++ b/plugins/modules/cloud/scaleway/scaleway_container_registry_info.py @@ -0,0 +1,146 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless container registry info module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_container_registry_info +short_description: Scaleway Container registry info module +version_added: 5.8.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module return information about a container registry on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + + +options: + project_id: + type: str + description: + - Project identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the container registry. + required: true +''' + +EXAMPLES = ''' +- name: Get a container registry info + community.general.scaleway_container_registry_info: + project_id: '{{ scw_project }}' + region: fr-par + name: my-awesome-container-registry + register: container_registry_info_task +''' + +RETURN = ''' +container_registry: + description: The container registry information. + returned: always + type: dict + sample: + created_at: "2022-10-14T09:51:07.949716Z" + description: Managed by Ansible + endpoint: rg.fr-par.scw.cloud/my-awesome-registry + id: 0d7d5270-7864-49c2-920b-9fd6731f3589 + image_count: 0 + is_public: false + name: my-awesome-registry + organization_id: 10697b59-5c34-4d24-8d15-9ff2d3b89f58 + project_id: 3da4f0b2-06be-4773-8ec4-5dfa435381be + region: fr-par + size: 0 + status: ready + status_message: "" + updated_at: "2022-10-14T09:51:07.949716Z" +''' + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + filter_sensitive_attributes +) +from ansible.module_utils.basic import AnsibleModule + +SENSITIVE_ATTRIBUTES = ( + "secret_environment_variables", +) + + +def info_strategy(api, wished_cn): + cn_list = api.fetch_all_resources("namespaces") + cn_lookup = dict((fn["name"], fn) + for fn in cn_list) + + if wished_cn["name"] not in cn_lookup: + msg = "Error during container registries lookup: Unable to find container registry named '%s' in project '%s'" % (wished_cn["name"], + wished_cn["project_id"]) + + api.module.fail_json(msg=msg) + + target_cn = cn_lookup[wished_cn["name"]] + + response = api.get(path=api.api_path + "/%s" % target_cn["id"]) + if not response.ok: + msg = "Error during container registry lookup: %s: '%s' (%s)" % (response.info['msg'], + response.json['message'], + response.json) + api.module.fail_json(msg=msg) + + return response.json + + +def core(module): + region = module.params["region"] + wished_container_namespace = { + "project_id": module.params["project_id"], + "name": module.params["name"] + } + + api = Scaleway(module=module) + api.api_path = "registry/v1/regions/%s/namespaces" % region + + summary = info_strategy(api=api, wished_cn=wished_container_namespace) + + module.exit_json(changed=False, container_registry=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES)) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(dict( + project_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/scaleway_container_registry/aliases b/tests/integration/targets/scaleway_container_registry/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_container_registry/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_container_registry/defaults/main.yml b/tests/integration/targets/scaleway_container_registry/defaults/main.yml new file mode 100644 index 0000000000..73b31423f7 --- /dev/null +++ b/tests/integration/targets/scaleway_container_registry/defaults/main.yml @@ -0,0 +1,9 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +name: cr_ansible_test +description: Container registry used for testing scaleway_container_registry ansible module +updated_description: Container registry used for testing scaleway_container_registry ansible module (Updated description) diff --git a/tests/integration/targets/scaleway_container_registry/tasks/main.yml b/tests/integration/targets/scaleway_container_registry/tasks/main.yml new file mode 100644 index 0000000000..24b1f0cbc9 --- /dev/null +++ b/tests/integration/targets/scaleway_container_registry/tasks/main.yml @@ -0,0 +1,178 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create a container registry (Check) + check_mode: yes + community.general.scaleway_container_registry: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + register: cr_creation_check_task + +- ansible.builtin.debug: + var: cr_creation_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_creation_check_task is success + - cr_creation_check_task is changed + +- name: Create container_registry + community.general.scaleway_container_registry: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + register: cr_creation_task + +- ansible.builtin.debug: + var: cr_creation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_creation_task is success + - cr_creation_task is changed + - cr_creation_task.container_registry.status == "ready" + +- name: Create container registry (Confirmation) + community.general.scaleway_container_registry: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + register: cr_creation_confirmation_task + +- ansible.builtin.debug: + var: cr_creation_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_creation_confirmation_task is success + - cr_creation_confirmation_task is not changed + - cr_creation_confirmation_task.container_registry.status == "ready" + +- name: Update container registry (Check) + check_mode: yes + community.general.scaleway_container_registry: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + register: cr_update_check_task + +- ansible.builtin.debug: + var: cr_update_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_update_check_task is success + - cr_update_check_task is changed + +- name: Update container registry + community.general.scaleway_container_registry: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + register: cr_update_task + +- ansible.builtin.debug: + var: cr_update_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_update_task is success + - cr_update_task is changed + - cr_update_task.container_registry.status == "ready" + +- name: Update container registry (Confirmation) + community.general.scaleway_container_registry: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + register: cr_update_confirmation_task + +- ansible.builtin.debug: + var: cr_update_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_update_confirmation_task is success + - cr_update_confirmation_task is not changed + - cr_update_confirmation_task.container_registry.status == "ready" + +- name: Delete container registry (Check) + check_mode: yes + community.general.scaleway_container_registry: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: cr_deletion_check_task + +- ansible.builtin.debug: + var: cr_deletion_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_deletion_check_task is success + - cr_deletion_check_task is changed + +- name: Delete container registry + community.general.scaleway_container_registry: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: cr_deletion_task + +- ansible.builtin.debug: + var: cr_deletion_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_deletion_task is success + - cr_deletion_task is changed + +- name: Delete container regitry (Confirmation) + community.general.scaleway_container_registry: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: cr_deletion_confirmation_task + +- ansible.builtin.debug: + var: cr_deletion_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_deletion_confirmation_task is success + - cr_deletion_confirmation_task is not changed diff --git a/tests/integration/targets/scaleway_container_registry_info/aliases b/tests/integration/targets/scaleway_container_registry_info/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_container_registry_info/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_container_registry_info/defaults/main.yml b/tests/integration/targets/scaleway_container_registry_info/defaults/main.yml new file mode 100644 index 0000000000..8c53a31e7d --- /dev/null +++ b/tests/integration/targets/scaleway_container_registry_info/defaults/main.yml @@ -0,0 +1,9 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +name: cr_ansible_test +description: Container registry used for testing scaleway_container_registry_info ansible module +updated_description: Container registry used for testing scaleway_container_registry_info ansible module (Updated description) diff --git a/tests/integration/targets/scaleway_container_registry_info/tasks/main.yml b/tests/integration/targets/scaleway_container_registry_info/tasks/main.yml new file mode 100644 index 0000000000..7de4d245ad --- /dev/null +++ b/tests/integration/targets/scaleway_container_registry_info/tasks/main.yml @@ -0,0 +1,41 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create container_registry + community.general.scaleway_container_registry: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + +- name: Get container registry info + community.general.scaleway_container_registry_info: + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + register: cr_info_task + +- ansible.builtin.debug: + var: cr_info_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cr_info_task is success + - cr_info_task is not changed + +- name: Delete container registry + community.general.scaleway_container_registry: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' From b9d08649578e8a5838e532cd5f04e0ee031e13e1 Mon Sep 17 00:00:00 2001 From: Alexander Holzapfel Date: Sun, 23 Oct 2022 18:25:03 +0200 Subject: [PATCH 0269/2104] Send string instead of boolean to proxmox api (#5198) * Send string instead of boolean to proxmox api * Add changelog fragment. * Update plugins/modules/cloud/misc/proxmox_kvm.py Co-authored-by: castorsky Co-authored-by: Felix Fontein Co-authored-by: castorsky --- changelogs/fragments/5198-proxmox.yml | 2 ++ plugins/modules/cloud/misc/proxmox_kvm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5198-proxmox.yml diff --git a/changelogs/fragments/5198-proxmox.yml b/changelogs/fragments/5198-proxmox.yml new file mode 100644 index 0000000000..b5d7c88094 --- /dev/null +++ b/changelogs/fragments/5198-proxmox.yml @@ -0,0 +1,2 @@ +bugfixes: + - "proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198)." diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index ba5b0d4ff3..92aaf6a904 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -963,7 +963,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible): if 'agent' in kwargs: try: # The API also allows booleans instead of e.g. `enabled=1` for backward-compatibility. - kwargs['agent'] = boolean(kwargs['agent'], strict=True) + kwargs['agent'] = int(boolean(kwargs['agent'], strict=True)) except TypeError: # Not something that Ansible would parse as a boolean. pass From 70c57dcb6afb02f48d57f558eb940df1ea6167b3 Mon Sep 17 00:00:00 2001 From: Ron Green <11993626+georgettica@users.noreply.github.com> Date: Mon, 24 Oct 2022 20:25:24 +0300 Subject: [PATCH 0270/2104] clarify jc filter usage in the example (#5396) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update jc.py ##### SUMMARY ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr * Update jc.py * Update plugins/filter/jc.py Co-authored-by: Felix Fontein * Update jc.py * Update plugins/filter/jc.py Co-authored-by: Felix Fontein * Update jc.py * Update jc.py * Update jc.py * Update plugins/filter/jc.py Co-authored-by: Felix Fontein * Update plugins/filter/jc.py Co-authored-by: Felix Fontein * change all of the tags to be FQMN FQMN = fully qualified module name * Update jc.py * Update plugins/filter/jc.py Co-authored-by: Felix Fontein * Update jc.py * Update jc.py * Update plugins/filter/jc.py Co-authored-by: Felix Fontein * Update jc.py * Update plugins/filter/jc.py Co-authored-by: Felix Fontein * Update plugins/filter/jc.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/filter/jc.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index 8f83871407..879647a04d 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -38,10 +38,16 @@ DOCUMENTATION = ''' type: boolean default: false requirements: - - jc (https://github.com/kellyjonbrazil/jc) + - jc installed as a Python library (U(https://pypi.org/project/jc/)) ''' EXAMPLES = ''' +- name: Install the prereqs of the jc filter (jc Python package) on the Ansible controller + delegate_to: localhost + ansible.builtin.pip: + name: jc + state: present + - name: Run command ansible.builtin.command: uname -a register: result @@ -94,15 +100,19 @@ def jc(data, parser, quiet=True, raw=False): dictionary or list of dictionaries Example: - - name: run date command hosts: ubuntu tasks: - - shell: date + - name: install the prereqs of the jc filter (jc Python package) on the Ansible controller + delegate_to: localhost + ansible.builtin.pip: + name: jc + state: present + - ansible.builtin.shell: date register: result - - set_fact: + - ansible.builtin.set_fact: myvar: "{{ result.stdout | community.general.jc('date') }}" - - debug: + - ansible.builtin.debug: msg: "{{ myvar }}" produces: @@ -124,7 +134,7 @@ def jc(data, parser, quiet=True, raw=False): """ if not HAS_LIB: - raise AnsibleError('You need to install "jc" prior to running jc filter') + raise AnsibleError('You need to install "jc" as a Python library on the Ansible controller prior to running jc filter') try: jc_parser = importlib.import_module('jc.parsers.' + parser) From c88f0f4ca03850798b36712bc5a570b3070fe6d9 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 24 Oct 2022 21:02:03 +0200 Subject: [PATCH 0271/2104] Fix broken changelog fragment. --- changelogs/fragments/3671-illumos-pfexec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/3671-illumos-pfexec.yml b/changelogs/fragments/3671-illumos-pfexec.yml index b1fcdb31ea..4c82ebc2e5 100644 --- a/changelogs/fragments/3671-illumos-pfexec.yml +++ b/changelogs/fragments/3671-illumos-pfexec.yml @@ -1,2 +1,2 @@ -minor_changes: - - "become_pfexec - remove superflous quotes preventing exe wrap from working as expected, fixes #3671, see https://github.com/ansible-collections/community.general/issues/3671#issuecomment-1174906473" +bugfixes: + - "pfexec become plugin - remove superflous quotes preventing exe wrap from working as expected (https://github.com/ansible-collections/community.general/issues/3671, https://github.com/ansible-collections/community.general/pull/3889)." From 091bdc77c3513fb8e69cae5df52074add285dcdf Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 25 Oct 2022 08:01:57 +0200 Subject: [PATCH 0272/2104] ldap_attrs: search_s based _is_value_present (#5385) * search_s based _is_value_present * Fix formatted string and ldap import * Add changelog fragment * Remove superfluous import ldap * Improve fragment * Code format {x} prefix * Lower-case fixes * Fix suggestions to changelog * Break with the past and let bools be bools * Let ldap_attrs break on invalid DN's --- .../fragments/5385-search_s-based-_is_value_present.yaml | 2 ++ plugins/modules/net_tools/ldap/ldap_attrs.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5385-search_s-based-_is_value_present.yaml diff --git a/changelogs/fragments/5385-search_s-based-_is_value_present.yaml b/changelogs/fragments/5385-search_s-based-_is_value_present.yaml new file mode 100644 index 0000000000..a3a3ba047c --- /dev/null +++ b/changelogs/fragments/5385-search_s-based-_is_value_present.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute values (https://github.com/ansible-collections/community.general/issues/977, https://github.com/ansible-collections/community.general/pull/5385). diff --git a/plugins/modules/net_tools/ldap/ldap_attrs.py b/plugins/modules/net_tools/ldap/ldap_attrs.py index df61233ab1..97275c45d5 100644 --- a/plugins/modules/net_tools/ldap/ldap_attrs.py +++ b/plugins/modules/net_tools/ldap/ldap_attrs.py @@ -170,6 +170,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common.text.converters import to_native, to_bytes from ansible_collections.community.general.plugins.module_utils.ldap import LdapGeneric, gen_specs + import re LDAP_IMP_ERR = None @@ -263,9 +264,10 @@ class LdapAttrs(LdapGeneric): def _is_value_present(self, name, value): """ True if the target attribute has the given value. """ try: - is_present = bool( - self.connection.compare_s(self.dn, name, value)) - except ldap.NO_SUCH_ATTRIBUTE: + filterstr = "(%s=%s)" % (name, value.decode()) + dns = self.connection.search_s(self.dn, ldap.SCOPE_BASE, filterstr) + is_present = len(dns) == 1 + except ldap.NO_SUCH_OBJECT: is_present = False return is_present From 2830a3452d4eccb86eb78ac653dbc326c8a90a40 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 25 Oct 2022 08:07:21 +0200 Subject: [PATCH 0273/2104] Remove deprecated features, bump version to 6.0.0 (#5326) * Bump version to 6.0.0. * sender option is now required. * Default of want_proxmox_nodes_ansible_host changed from true to false. * username is now an alias of user, and no longer of workspace. * Remove deprecated return values in favor of end_state. * Remove debug option. * Change default of ignore_volatile_options from true to false. * gitlab_group must now always contain the full path. * Change default of norc from false to ture. * Remove deprecated property. * Add PR URL. * Adjust bitbucket unit tests. * Adjust module_helper integration test. --- changelogs/fragments/deprecation-removals.yml | 11 ++++ galaxy.yml | 2 +- plugins/callback/mail.py | 7 +-- plugins/doc_fragments/bitbucket.py | 2 + plugins/inventory/proxmox.py | 13 +---- plugins/module_utils/mh/module_helper.py | 14 +---- .../module_utils/source_control/bitbucket.py | 2 +- plugins/modules/cloud/lxd/lxd_container.py | 15 +---- plugins/modules/cloud/smartos/vmadm.py | 3 +- .../keycloak/keycloak_authentication.py | 36 ------------ .../identity/keycloak/keycloak_group.py | 58 ------------------- plugins/modules/packaging/language/gem.py | 13 +---- .../bitbucket/bitbucket_access_key.py | 6 +- .../bitbucket/bitbucket_pipeline_key_pair.py | 8 +-- .../bitbucket_pipeline_known_host.py | 8 +-- .../bitbucket/bitbucket_pipeline_variable.py | 8 +-- .../gitlab/gitlab_group_members.py | 8 +-- .../targets/module_helper/library/mstate.py | 7 --- .../targets/module_helper/tasks/mstate.yml | 19 ------ tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - .../bitbucket/test_bitbucket_access_key.py | 16 ++--- .../test_bitbucket_pipeline_key_pair.py | 16 ++--- .../test_bitbucket_pipeline_known_host.py | 12 ++-- .../test_bitbucket_pipeline_variable.py | 24 ++++---- 28 files changed, 70 insertions(+), 243 deletions(-) create mode 100644 changelogs/fragments/deprecation-removals.yml diff --git a/changelogs/fragments/deprecation-removals.yml b/changelogs/fragments/deprecation-removals.yml new file mode 100644 index 0000000000..a7744bbc40 --- /dev/null +++ b/changelogs/fragments/deprecation-removals.yml @@ -0,0 +1,11 @@ +removed_features: + - "mail callback plugin - the ``sender`` option is now required (https://github.com/ansible-collections/community.general/pull/5326)." + - "proxmox inventory plugin - the default of the ``want_proxmox_nodes_ansible_host`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326)." + - "bitbucket* modules - ``username`` is no longer an alias of ``workspace``, but of ``user`` (https://github.com/ansible-collections/community.general/pull/5326)." + - "keycloak_group - the return value ``group`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326)." + - "keycloak_authentication - the return value ``flow`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326)." + - "vmadm - the ``debug`` option has been removed. It was not used anyway (https://github.com/ansible-collections/community.general/pull/5326)." + - "lxd_container - the default of the ``ignore_volatile_options`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326)." + - "gitlab_group_members - ``gitlab_group`` must now always contain the full path, and no longer just the name or path (https://github.com/ansible-collections/community.general/pull/5326)." + - "gem - the default of the ``norc`` option changed from ``false`` to ``true`` (https://github.com/ansible-collections/community.general/pull/5326)." + - "module_helper module utils - remove the ``VarDict`` attribute from ``ModuleHelper``. Import ``VarDict`` from ``ansible_collections.community.general.plugins.module_utils.mh.mixins.vars`` instead (https://github.com/ansible-collections/community.general/pull/5326)." diff --git a/galaxy.yml b/galaxy.yml index 6742288ccd..0a3fe09b6e 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 5.8.0 +version: 6.0.0 readme: README.md authors: - Ansible (https://github.com/ansible) diff --git a/plugins/callback/mail.py b/plugins/callback/mail.py index d20600e710..a605d13eac 100644 --- a/plugins/callback/mail.py +++ b/plugins/callback/mail.py @@ -49,8 +49,9 @@ options: sender: description: - Mail sender. - - Note that this will be required from community.general 6.0.0 on. + - This is required since community.general 6.0.0. type: str + required: true ini: - section: callback_mail key: sender @@ -105,10 +106,6 @@ class CallbackModule(CallbackBase): super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct) self.sender = self.get_option('sender') - if self.sender is None: - self._display.deprecated( - 'The sender for the mail callback has not been specified. This will be an error in the future', - version='6.0.0', collection_name='community.general') self.to = self.get_option('to') self.smtphost = self.get_option('mta') self.smtpport = self.get_option('mtaport') diff --git a/plugins/doc_fragments/bitbucket.py b/plugins/doc_fragments/bitbucket.py index 9ab6fe318d..703bb412a1 100644 --- a/plugins/doc_fragments/bitbucket.py +++ b/plugins/doc_fragments/bitbucket.py @@ -27,8 +27,10 @@ options: description: - The username. - If not set the environment variable C(BITBUCKET_USERNAME) will be used. + - I(username) is an alias of I(user) since community.genreal 6.0.0. It was an alias of I(workspace) before. type: str version_added: 4.0.0 + aliases: [ username ] password: description: - The App password. diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index e4474e6e6e..67e0428157 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -113,10 +113,9 @@ DOCUMENTATION = ''' description: - Whether to set C(ansbile_host) for proxmox nodes. - When set to C(true) (default), will use the first available interface. This can be different from what you expect. - - This currently defaults to C(true), but the default is deprecated since community.general 4.8.0. - The default will change to C(false) in community.general 6.0.0. To avoid a deprecation warning, please - set this parameter explicitly. + - The default of this option changed from C(true) to C(false) in community.general 6.0.0. type: bool + default: false filters: version_added: 4.6.0 description: A list of Jinja templates that allow filtering hosts. @@ -567,14 +566,6 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): self.inventory.add_group(nodes_group) want_proxmox_nodes_ansible_host = self.get_option("want_proxmox_nodes_ansible_host") - if want_proxmox_nodes_ansible_host is None: - display.deprecated( - 'The want_proxmox_nodes_ansible_host option of the community.general.proxmox inventory plugin' - ' currently defaults to `true`, but this default has been deprecated and will change to `false`' - ' in community.general 6.0.0. To keep the current behavior and remove this deprecation warning,' - ' explicitly set `want_proxmox_nodes_ansible_host` to `true` in your inventory configuration', - version='6.0.0', collection_name='community.general') - want_proxmox_nodes_ansible_host = True # gather vm's on nodes self._get_auth() diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 79b6f48752..c844acba50 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.plugins.module_utils.mh.base import M from ansible_collections.community.general.plugins.module_utils.mh.mixins.cmd import CmdMixin from ansible_collections.community.general.plugins.module_utils.mh.mixins.state import StateMixin from ansible_collections.community.general.plugins.module_utils.mh.mixins.deps import DependencyMixin -from ansible_collections.community.general.plugins.module_utils.mh.mixins.vars import VarsMixin, VarDict as _VD +from ansible_collections.community.general.plugins.module_utils.mh.mixins.vars import VarsMixin from ansible_collections.community.general.plugins.module_utils.mh.mixins.deprecate_attrs import DeprecateAttrsMixin @@ -25,8 +25,6 @@ class ModuleHelper(DeprecateAttrsMixin, VarsMixin, DependencyMixin, ModuleHelper change_params = () facts_params = () - VarDict = _VD # for backward compatibility, will be deprecated at some point - def __init__(self, module=None): super(ModuleHelper, self).__init__(module) for name, value in self.module.params.items(): @@ -38,16 +36,6 @@ class ModuleHelper(DeprecateAttrsMixin, VarsMixin, DependencyMixin, ModuleHelper fact=name in self.facts_params, ) - self._deprecate_attr( - attr="VarDict", - msg="ModuleHelper.VarDict attribute is deprecated, use VarDict from " - "the ansible_collections.community.general.plugins.module_utils.mh.mixins.vars module instead", - version="6.0.0", - collection_name="community.general", - target=ModuleHelper, - module=self.module, - ) - def update_output(self, **kwargs): self.update_vars(meta={"output": True}, **kwargs) diff --git a/plugins/module_utils/source_control/bitbucket.py b/plugins/module_utils/source_control/bitbucket.py index 592905a65f..9a27361830 100644 --- a/plugins/module_utils/source_control/bitbucket.py +++ b/plugins/module_utils/source_control/bitbucket.py @@ -28,7 +28,7 @@ class BitbucketHelper: # TODO: # - Rename user to username once current usage of username is removed # - Alias user to username and deprecate it - user=dict(type='str', fallback=(env_fallback, ['BITBUCKET_USERNAME'])), + user=dict(type='str', aliases=['username'], fallback=(env_fallback, ['BITBUCKET_USERNAME'])), password=dict(type='str', no_log=True, fallback=(env_fallback, ['BITBUCKET_PASSWORD'])), ) diff --git a/plugins/modules/cloud/lxd/lxd_container.py b/plugins/modules/cloud/lxd/lxd_container.py index c96271bda4..30dc855617 100644 --- a/plugins/modules/cloud/lxd/lxd_container.py +++ b/plugins/modules/cloud/lxd/lxd_container.py @@ -50,10 +50,10 @@ options: - If set to C(true), options starting with C(volatile.) are ignored. As a result, they are reapplied for each execution. - This default behavior can be changed by setting this option to C(false). - - The current default value C(true) is deprecated since community.general 4.0.0, - and will change to C(false) in community.general 6.0.0. + - The default value changed from C(true) to C(false) in community.general 6.0.0. type: bool required: false + default: false version_added: 3.7.0 profiles: description: @@ -769,6 +769,7 @@ def main(): ), ignore_volatile_options=dict( type='bool', + default=False, ), devices=dict( type='dict', @@ -832,16 +833,6 @@ def main(): supports_check_mode=False, ) - if module.params['ignore_volatile_options'] is None: - module.params['ignore_volatile_options'] = True - module.deprecate( - 'If the keyword "volatile" is used in a playbook in the config' - 'section, a "changed" message will appear with every run, even without a change' - 'to the playbook.' - 'This will change in the future. Please test your scripts' - 'by "ignore_volatile_options: false". To keep the old behavior, set that option explicitly to "true"', - version='6.0.0', collection_name='community.general') - lxd_manage = LXDContainerManagement(module=module) lxd_manage.run() diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/cloud/smartos/vmadm.py index c352de90f7..3bc016d679 100644 --- a/plugins/modules/cloud/smartos/vmadm.py +++ b/plugins/modules/cloud/smartos/vmadm.py @@ -552,7 +552,7 @@ def create_payload(module, uuid): # Create the JSON payload (vmdef) and return the filename. # Filter out the few options that are not valid VM properties. - module_options = ['debug', 'force', 'state'] + module_options = ['force', 'state'] # @TODO make this a simple {} comprehension as soon as py2 is ditched # @TODO {k: v for k, v in p.items() if k not in module_options} vmdef = dict([(k, v) for k, v in module.params.items() if k not in module_options and v]) @@ -689,7 +689,6 @@ def main(): nics=dict(type='list', elements='dict'), resolvers=dict(type='list', elements='str'), filesystems=dict(type='list', elements='dict'), - debug=dict(type='bool', removed_in_version='6.0.0', removed_from_collection='community.general'), ) # Add our 'simple' options to options dict. diff --git a/plugins/modules/identity/keycloak/keycloak_authentication.py b/plugins/modules/identity/keycloak/keycloak_authentication.py index e2e680814f..4f56582951 100644 --- a/plugins/modules/identity/keycloak/keycloak_authentication.py +++ b/plugins/modules/identity/keycloak/keycloak_authentication.py @@ -173,39 +173,6 @@ msg: returned: always type: str -flow: - description: - - JSON representation for the authentication. - - Deprecated return value, it will be removed in community.general 6.0.0. Please use the return value I(end_state) instead. - returned: on success - type: dict - sample: { - "alias": "Copy of first broker login", - "authenticationExecutions": [ - { - "alias": "review profile config", - "authenticationConfig": { - "alias": "review profile config", - "config": { "update.profile.on.first.login": "missing" }, - "id": "6f09e4fb-aad4-496a-b873-7fa9779df6d7" - }, - "configurable": true, - "displayName": "Review Profile", - "id": "8f77dab8-2008-416f-989e-88b09ccf0b4c", - "index": 0, - "level": 0, - "providerId": "idp-review-profile", - "requirement": "REQUIRED", - "requirementChoices": [ "REQUIRED", "ALTERNATIVE", "DISABLED" ] - } - ], - "builtIn": false, - "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "id": "bc228863-5887-4297-b898-4d988f8eaa5c", - "providerId": "basic-flow", - "topLevel": true - } - end_state: description: Representation of the authentication after module execution. returned: on success @@ -407,7 +374,6 @@ def main(): result['diff'] = dict(before='', after='') result['changed'] = False result['end_state'] = {} - result['flow'] = result['end_state'] result['msg'] = new_auth_repr["alias"] + ' absent' module.exit_json(**result) @@ -440,7 +406,6 @@ def main(): if exec_repr is not None: auth_repr["authenticationExecutions"] = exec_repr result['end_state'] = auth_repr - result['flow'] = result['end_state'] else: if state == 'present': @@ -478,7 +443,6 @@ def main(): if exec_repr is not None: auth_repr["authenticationExecutions"] = exec_repr result['end_state'] = auth_repr - result['flow'] = result['end_state'] else: # Process a deletion (because state was not 'present') diff --git a/plugins/modules/identity/keycloak/keycloak_group.py b/plugins/modules/identity/keycloak/keycloak_group.py index 1ae3859ef2..3df87c8fe5 100644 --- a/plugins/modules/identity/keycloak/keycloak_group.py +++ b/plugins/modules/identity/keycloak/keycloak_group.py @@ -214,59 +214,6 @@ end_state: manage: true manageMembership: true view: true - -group: - description: - - Representation of the group after module execution. - - Deprecated return value, it will be removed in community.general 6.0.0. Please use the return value I(end_state) instead. - returned: always - type: complex - contains: - id: - description: GUID that identifies the group. - type: str - returned: always - sample: 23f38145-3195-462c-97e7-97041ccea73e - name: - description: Name of the group. - type: str - returned: always - sample: grp-test-123 - attributes: - description: Attributes applied to this group. - type: dict - returned: always - sample: - attr1: ["val1", "val2", "val3"] - path: - description: URI path to the group. - type: str - returned: always - sample: /grp-test-123 - realmRoles: - description: An array of the realm-level roles granted to this group. - type: list - returned: always - sample: [] - subGroups: - description: A list of groups that are children of this group. These groups will have the same parameters as - documented here. - type: list - returned: always - clientRoles: - description: A list of client-level roles granted to this group. - type: list - returned: always - sample: [] - access: - description: A dict describing the accesses you have to this group based on the credentials used. - type: dict - returned: always - sample: - manage: true - manageMembership: true - view: true - ''' from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ @@ -356,7 +303,6 @@ def main(): result['diff'] = dict(before='', after='') result['changed'] = False result['end_state'] = {} - result['group'] = result['end_state'] result['msg'] = 'Group does not exist; doing nothing.' module.exit_json(**result) @@ -377,7 +323,6 @@ def main(): after_group = kc.get_group_by_name(name, realm) result['end_state'] = after_group - result['group'] = result['end_state'] result['msg'] = 'Group {name} has been created with ID {id}'.format(name=after_group['name'], id=after_group['id']) @@ -391,7 +336,6 @@ def main(): if desired_group == before_group: result['changed'] = False result['end_state'] = desired_group - result['group'] = result['end_state'] result['msg'] = "No changes required to group {name}.".format(name=before_group['name']) module.exit_json(**result) @@ -410,7 +354,6 @@ def main(): after_group = kc.get_group_by_groupid(desired_group['id'], realm=realm) result['end_state'] = after_group - result['group'] = result['end_state'] result['msg'] = "Group {id} has been updated".format(id=after_group['id']) module.exit_json(**result) @@ -430,7 +373,6 @@ def main(): kc.delete_group(groupid=gid, realm=realm) result['end_state'] = {} - result['group'] = result['end_state'] result['msg'] = "Group {name} has been deleted".format(name=before_group['name']) diff --git a/plugins/modules/packaging/language/gem.py b/plugins/modules/packaging/language/gem.py index e30bf458d4..8d7f7dade0 100644 --- a/plugins/modules/packaging/language/gem.py +++ b/plugins/modules/packaging/language/gem.py @@ -70,11 +70,10 @@ options: version_added: 3.3.0 norc: type: bool + default: true description: - Avoid loading any C(.gemrc) file. Ignored for RubyGems prior to 2.5.2. - - The current default value C(false) has been deprecated in community.general 5.0.0. - Explicitly specify the value to prevent the deprecation warning to be shown." - - From community.general 6.0.0 on, the default will be changed to C(true). + - The default changed from C(false) to C(true) in community.general 6.0.0. version_added: 3.3.0 env_shebang: description: @@ -298,7 +297,7 @@ def main(): user_install=dict(required=False, default=True, type='bool'), install_dir=dict(required=False, type='path'), bindir=dict(type='path'), - norc=dict(type='bool'), + norc=dict(type='bool', default=True), pre_release=dict(required=False, default=False, type='bool'), include_doc=dict(required=False, default=False, type='bool'), env_shebang=dict(required=False, default=False, type='bool'), @@ -316,12 +315,6 @@ def main(): module.fail_json(msg="Cannot maintain state=latest when installing from local source") if module.params['user_install'] and module.params['install_dir']: module.fail_json(msg="install_dir requires user_install=false") - if module.params['norc'] is None: - module.deprecate( - 'The default of the norc option has been deprecated. It will be changed to `true`' - ' in community.general 6.0.0. Specify an explicit value to get rid of this message', - version='6.0.0', collection_name='community.general') - module.params['norc'] = False if not module.params['gem_source']: module.params['gem_source'] = module.params['name'] diff --git a/plugins/modules/source_control/bitbucket/bitbucket_access_key.py b/plugins/modules/source_control/bitbucket/bitbucket_access_key.py index f084b98027..0708777a0a 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_access_key.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_access_key.py @@ -27,10 +27,9 @@ options: workspace: description: - The repository owner. - - Alias I(username) has been deprecated and will become an alias of I(user) in community.general 6.0.0. + - I(username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of I(user). type: str required: true - aliases: [ username ] key: description: - The SSH public key. @@ -218,8 +217,7 @@ def main(): argument_spec.update( repository=dict(type='str', required=True), workspace=dict( - type='str', aliases=['username'], required=True, - deprecated_aliases=[dict(name='username', version='6.0.0', collection_name='community.general')], + type='str', required=True, ), key=dict(type='str', no_log=False), label=dict(type='str', required=True), diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py index 97e1ee3bbb..db4453d45c 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py @@ -27,10 +27,9 @@ options: workspace: description: - The repository owner. - - Alias I(username) has been deprecated and will become an alias of I(user) in community.general 6.0.0. + - I(username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of I(user). type: str required: true - aliases: [ username ] public_key: description: - The public key. @@ -154,10 +153,7 @@ def main(): argument_spec = BitbucketHelper.bitbucket_argument_spec() argument_spec.update( repository=dict(type='str', required=True), - workspace=dict( - type='str', aliases=['username'], required=True, - deprecated_aliases=[dict(name='username', version='6.0.0', collection_name='community.general')], - ), + workspace=dict(type='str', required=True), public_key=dict(type='str'), private_key=dict(type='str', no_log=True), state=dict(type='str', choices=['present', 'absent'], required=True), diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py index b8ceb8f90f..e573719362 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py @@ -30,10 +30,9 @@ options: workspace: description: - The repository owner. - - Alias I(username) has been deprecated and will become an alias of I(user) in community.general 6.0.0. + - I(username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of I(user). type: str required: true - aliases: [ username ] name: description: - The FQDN of the known host. @@ -255,10 +254,7 @@ def main(): argument_spec = BitbucketHelper.bitbucket_argument_spec() argument_spec.update( repository=dict(type='str', required=True), - workspace=dict( - type='str', aliases=['username'], required=True, - deprecated_aliases=[dict(name='username', version='6.0.0', collection_name='community.general')], - ), + workspace=dict(type='str', required=True), name=dict(type='str', required=True), key=dict(type='str', no_log=False), state=dict(type='str', choices=['present', 'absent'], required=True), diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py index daf65d0b4d..45661d8dee 100644 --- a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py +++ b/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py @@ -27,10 +27,9 @@ options: workspace: description: - The repository owner. - - Alias I(username) has been deprecated and will become an alias of I(user) in community.general 6.0.0. + - I(username) used to be an alias of this option. Since community.general 6.0.0 it is an alias of I(user). type: str required: true - aliases: [ username ] name: description: - The pipeline variable name. @@ -215,10 +214,7 @@ def main(): argument_spec = BitbucketHelper.bitbucket_argument_spec() argument_spec.update( repository=dict(type='str', required=True), - workspace=dict( - type='str', aliases=['username'], required=True, - deprecated_aliases=[dict(name='username', version='6.0.0', collection_name='community.general')], - ), + workspace=dict(type='str', required=True), name=dict(type='str', required=True), value=dict(type='str'), secured=dict(type='bool', default=False), diff --git a/plugins/modules/source_control/gitlab/gitlab_group_members.py b/plugins/modules/source_control/gitlab/gitlab_group_members.py index 50cb35367f..6edc8c983f 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_members.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_members.py @@ -27,7 +27,7 @@ options: gitlab_group: description: - The C(full_path) of the GitLab group the member is added to/removed from. - - Setting this to C(name) or C(path) is deprecated and will be removed in community.general 6.0.0. Use C(full_path) instead. + - Setting this to C(name) or C(path) has been disallowed since community.general 6.0.0. Use C(full_path) instead. required: true type: str gitlab_user: @@ -176,12 +176,6 @@ class GitLabGroup(object): for group in groups: if group.full_path == gitlab_group: return group.id - for group in groups: - if group.path == gitlab_group or group.name == gitlab_group: - self._module.deprecate( - msg="Setting 'gitlab_group' to 'name' or 'path' is deprecated. Use 'full_path' instead", - version="6.0.0", collection_name="community.general") - return group.id # get all members in a group def get_members_in_a_group(self, gitlab_group_id): diff --git a/tests/integration/targets/module_helper/library/mstate.py b/tests/integration/targets/module_helper/library/mstate.py index 6c69f9c720..9e70ed4364 100644 --- a/tests/integration/targets/module_helper/library/mstate.py +++ b/tests/integration/targets/module_helper/library/mstate.py @@ -25,10 +25,6 @@ options: c: description: cccc type: str - trigger_depr_attr: - description: tries to access VarDict - type: bool - default: false state: description: test states type: str @@ -50,15 +46,12 @@ class MState(StateModuleHelper): a=dict(type='int', required=True), b=dict(type='str'), c=dict(type='str'), - trigger_depr_attr=dict(type='bool', default=False), state=dict(type='str', choices=['join', 'b_x_a', 'c_x_a', 'both_x_a', 'nop'], default='join'), ), ) def __init_module__(self): self.vars.set('result', "abc", diff=True) - if self.vars.trigger_depr_attr: - dummy = self.VarDict def state_join(self): self.vars['result'] = "".join([str(self.vars.a), str(self.vars.b), str(self.vars.c)]) diff --git a/tests/integration/targets/module_helper/tasks/mstate.yml b/tests/integration/targets/module_helper/tasks/mstate.yml index 7a4e9ad3e4..40c695f6dc 100644 --- a/tests/integration/targets/module_helper/tasks/mstate.yml +++ b/tests/integration/targets/module_helper/tasks/mstate.yml @@ -70,25 +70,9 @@ a: 5 b: foo c: bar - trigger_depr_attr: true state: both_x_a register: state5 -- ansible.builtin.set_fact: - vardict_gt29: - msg: >- - ModuleHelper.VarDict attribute is deprecated, use VarDict from the - ansible_collections.community.general.plugins.module_utils.mh.mixins.vars - module instead - version: 6.0.0 - collection_name: community.general - vardict_29: - msg: >- - ModuleHelper.VarDict attribute is deprecated, use VarDict from the - ansible_collections.community.general.plugins.module_utils.mh.mixins.vars - module instead - version: 6.0.0 - - name: assert state5 assert: that: @@ -97,6 +81,3 @@ - state5.c == "bar" - state5.result == "foobarfoobarfoobarfoobarfoobar" - state5 is changed - - vardict_depr in state5.deprecations - vars: - vardict_depr: '{{ (ansible_version.major == 2 and ansible_version.minor == 9) | ternary(vardict_29, vardict_gt29) }}' diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 924e4f863b..86db6d3a2c 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -12,7 +12,6 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 65cd74872a..77cfe75bbd 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -7,7 +7,6 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 65cd74872a..77cfe75bbd 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -7,7 +7,6 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 4e5d3334b0..6ca8d9d972 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -7,7 +7,6 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 4e5d3334b0..6ca8d9d972 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -7,7 +7,6 @@ plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-in plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc # unused param - removed in 6.0.0 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py index 4c53cd8246..be926b55df 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py @@ -22,7 +22,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'label': 'key name', 'state': 'present', @@ -57,7 +57,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'key': 'public_key', 'label': 'key name', @@ -108,7 +108,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'key': 'new public key', 'label': 'mykey', @@ -159,7 +159,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'key': 'new public key', 'label': 'mykey', @@ -210,7 +210,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'key': 'new public key', 'label': 'mykey', @@ -261,7 +261,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'label': 'mykey', 'state': 'absent', @@ -279,7 +279,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'label': 'mykey', 'state': 'absent', @@ -327,7 +327,7 @@ class TestBucketAccessKeyModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'label': 'mykey', 'state': 'absent', diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py index 8b370a10ed..050790a426 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py @@ -22,7 +22,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'state': 'present', }) @@ -56,7 +56,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'public_key': 'public', 'private_key': 'PRIVATE', @@ -79,7 +79,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'public_key': 'public', 'private_key': 'PRIVATE', @@ -101,7 +101,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'public_key': 'public', 'private_key': 'PRIVATE', @@ -123,7 +123,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'public_key': 'public', 'private_key': 'PRIVATE', @@ -146,7 +146,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'state': 'absent', }) @@ -163,7 +163,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'state': 'absent', }) @@ -183,7 +183,7 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'state': 'absent', '_ansible_check_mode': True, diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py index faf8ca009a..163cecdf4d 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py @@ -29,7 +29,7 @@ class TestBucketPipelineKnownHostModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'bitbucket.org', 'state': 'present', @@ -78,7 +78,7 @@ class TestBucketPipelineKnownHostModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'bitbucket.org', 'state': 'present', @@ -97,7 +97,7 @@ class TestBucketPipelineKnownHostModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'bitbucket.org', 'state': 'present', @@ -128,7 +128,7 @@ class TestBucketPipelineKnownHostModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'bitbucket.org', 'state': 'absent', @@ -147,7 +147,7 @@ class TestBucketPipelineKnownHostModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'bitbucket.org', 'state': 'absent', @@ -177,7 +177,7 @@ class TestBucketPipelineKnownHostModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'bitbucket.org', 'state': 'absent', diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py index ad9ec58044..99d3af4f92 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py +++ b/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py @@ -20,7 +20,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): def test_without_required_parameters(self): with self.assertRaises(AnsibleFailJson) as exec_info: set_module_args({ - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'state': 'absent', @@ -34,7 +34,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'state': 'present', @@ -52,7 +52,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): def test_oauth_env_vars_params(self, *args): with self.assertRaises(AnsibleExitJson): set_module_args({ - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'state': 'absent', @@ -100,7 +100,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'value': '42', @@ -126,7 +126,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'value': '42', @@ -150,7 +150,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'value': '42', @@ -176,7 +176,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'value': '42', @@ -202,7 +202,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'value': '42', @@ -227,7 +227,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'value': '42', @@ -253,7 +253,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'state': 'absent', @@ -271,7 +271,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'state': 'absent', @@ -295,7 +295,7 @@ class TestBucketPipelineVariableModule(ModuleTestCase): set_module_args({ 'client_id': 'ABC', 'client_secret': 'XXX', - 'username': 'name', + 'workspace': 'name', 'repository': 'repo', 'name': 'PIPELINE_VAR_NAME', 'state': 'absent', From fa924aae31c1675bcf4adb2a9ac56711af71f5eb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 26 Oct 2022 07:32:00 +0200 Subject: [PATCH 0274/2104] Prepare un-flatmapping (#5350) * Add module name into fixtures directory name. * Rename conftest.py to avoid collisions. * Match filenames inside directories. --- .github/BOTMETA.yml | 119 +++++++++++------- .../{conftest.py => linode_conftest.py} | 0 .../modules/cloud/linode/test_linode.py | 2 + .../modules/cloud/linode/test_linode_v4.py | 2 + .../xenserver/test_xenserver_guest_info.py | 3 +- .../test_xenserver_guest_powerstate.py | 3 +- .../{common.py => xenserver_common.py} | 0 .../{conftest.py => xenserver_conftest.py} | 0 .../os/{conftest.py => rhn_conftest.py} | 0 .../modules/packaging/os/test_rhn_channel.py | 2 + .../modules/packaging/os/test_rhn_register.py | 2 + .../oneview/hpe_test_utils.py | 1 + .../{conftest.py => oneview_conftest.py} | 0 .../oneview/oneview_module_loader.py | 5 +- .../oneview/test_oneview_datacenter_info.py | 4 +- .../oneview/test_oneview_enclosure_info.py | 4 +- .../oneview/test_oneview_ethernet_network.py | 1 + .../test_oneview_ethernet_network_info.py | 1 + .../oneview/test_oneview_fc_network.py | 1 + .../oneview/test_oneview_fc_network_info.py | 1 + .../oneview/test_oneview_fcoe_network.py | 1 + .../oneview/test_oneview_fcoe_network_info.py | 2 +- ...test_oneview_logical_interconnect_group.py | 3 +- ...oneview_logical_interconnect_group_info.py | 3 +- .../oneview/test_oneview_network_set.py | 1 + .../oneview/test_oneview_network_set_info.py | 1 + .../oneview/test_oneview_san_manager.py | 1 + .../oneview/test_oneview_san_manager_info.py | 1 + .../{README.md => interfaces_file-README.md} | 4 +- .../address_family.test_no_changes | 0 .../address_family.test_no_changes.json | 0 ...ddress_family.test_no_changes.json.license | 0 .../address_family.test_no_changes.license | 0 .../golden_output/address_family_add_aggi_up | 0 .../address_family_add_aggi_up.exceptions.txt | 0 ..._family_add_aggi_up.exceptions.txt.license | 0 .../address_family_add_aggi_up.json | 0 .../address_family_add_aggi_up.json.license | 0 .../address_family_add_aggi_up.license | 0 .../address_family_add_aggi_up_twice | 0 ...ss_family_add_aggi_up_twice.exceptions.txt | 0 ...y_add_aggi_up_twice.exceptions.txt.license | 0 .../address_family_add_aggi_up_twice.json | 0 ...ress_family_add_aggi_up_twice.json.license | 0 .../address_family_add_aggi_up_twice.license | 0 .../address_family_add_and_delete_aggi_up | 0 ...mily_add_and_delete_aggi_up.exceptions.txt | 0 ..._and_delete_aggi_up.exceptions.txt.license | 0 ...address_family_add_and_delete_aggi_up.json | 0 ...family_add_and_delete_aggi_up.json.license | 0 ...ress_family_add_and_delete_aggi_up.license | 0 .../address_family_aggi_remove_dup | 0 ...ress_family_aggi_remove_dup.exceptions.txt | 0 ...ily_aggi_remove_dup.exceptions.txt.license | 0 .../address_family_aggi_remove_dup.json | 0 ...ddress_family_aggi_remove_dup.json.license | 0 .../address_family_aggi_remove_dup.license | 0 .../golden_output/address_family_change_ipv4 | 0 .../address_family_change_ipv4.exceptions.txt | 0 .../address_family_change_ipv4.json | 0 .../address_family_change_ipv4.json.license | 0 .../address_family_change_ipv4.license | 0 .../address_family_change_ipv4_post_up | 0 ..._family_change_ipv4_post_up.exceptions.txt | 0 .../address_family_change_ipv4_post_up.json | 0 ...ss_family_change_ipv4_post_up.json.license | 0 ...address_family_change_ipv4_post_up.license | 0 .../address_family_change_ipv4_pre_up | 0 ...s_family_change_ipv4_pre_up.exceptions.txt | 0 .../address_family_change_ipv4_pre_up.json | 0 ...ess_family_change_ipv4_pre_up.json.license | 0 .../address_family_change_ipv4_pre_up.license | 0 .../golden_output/address_family_change_ipv6 | 0 .../address_family_change_ipv6.exceptions.txt | 0 .../address_family_change_ipv6.json | 0 .../address_family_change_ipv6.json.license | 0 .../address_family_change_ipv6.license | 0 .../address_family_change_ipv6_post_up | 0 ..._family_change_ipv6_post_up.exceptions.txt | 0 .../address_family_change_ipv6_post_up.json | 0 ...ss_family_change_ipv6_post_up.json.license | 0 ...address_family_change_ipv6_post_up.license | 0 .../address_family_change_ipv6_pre_up | 0 ...s_family_change_ipv6_pre_up.exceptions.txt | 0 .../address_family_change_ipv6_pre_up.json | 0 ...ess_family_change_ipv6_pre_up.json.license | 0 .../address_family_change_ipv6_pre_up.license | 0 .../address_family_change_method | 0 ...ddress_family_change_method.exceptions.txt | 0 ...amily_change_method.exceptions.txt.license | 0 .../address_family_change_method.json | 0 .../address_family_change_method.json.license | 0 .../address_family_change_method.license | 0 .../golden_output/address_family_revert | 0 .../address_family_revert.exceptions.txt | 0 .../golden_output/address_family_revert.json | 0 .../address_family_revert.json.license | 0 .../address_family_revert.license | 0 .../address_family_set_aggi_and_eth0_mtu | 0 ...amily_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../address_family_set_aggi_and_eth0_mtu.json | 0 ..._family_set_aggi_and_eth0_mtu.json.license | 0 ...dress_family_set_aggi_and_eth0_mtu.license | 0 .../address_family_set_aggi_slaves | 0 ...ress_family_set_aggi_slaves.exceptions.txt | 0 ...ily_set_aggi_slaves.exceptions.txt.license | 0 .../address_family_set_aggi_slaves.json | 0 ...ddress_family_set_aggi_slaves.json.license | 0 .../address_family_set_aggi_slaves.license | 0 .../default_dhcp.test_no_changes | 0 .../default_dhcp.test_no_changes.json | 0 .../default_dhcp.test_no_changes.json.license | 0 .../default_dhcp.test_no_changes.license | 0 .../golden_output/default_dhcp_add_aggi_up | 0 .../default_dhcp_add_aggi_up.exceptions.txt | 0 ...lt_dhcp_add_aggi_up.exceptions.txt.license | 0 .../default_dhcp_add_aggi_up.json | 0 .../default_dhcp_add_aggi_up.json.license | 0 .../default_dhcp_add_aggi_up.license | 0 .../default_dhcp_add_aggi_up_twice | 0 ...ault_dhcp_add_aggi_up_twice.exceptions.txt | 0 ...p_add_aggi_up_twice.exceptions.txt.license | 0 .../default_dhcp_add_aggi_up_twice.json | 0 ...efault_dhcp_add_aggi_up_twice.json.license | 0 .../default_dhcp_add_aggi_up_twice.license | 0 .../default_dhcp_add_and_delete_aggi_up | 0 ...dhcp_add_and_delete_aggi_up.exceptions.txt | 0 ..._and_delete_aggi_up.exceptions.txt.license | 0 .../default_dhcp_add_and_delete_aggi_up.json | 0 ...t_dhcp_add_and_delete_aggi_up.json.license | 0 ...efault_dhcp_add_and_delete_aggi_up.license | 0 .../default_dhcp_aggi_remove_dup | 0 ...efault_dhcp_aggi_remove_dup.exceptions.txt | 0 ...hcp_aggi_remove_dup.exceptions.txt.license | 0 .../default_dhcp_aggi_remove_dup.json | 0 .../default_dhcp_aggi_remove_dup.json.license | 0 .../default_dhcp_aggi_remove_dup.license | 0 .../golden_output/default_dhcp_change_ipv4 | 0 .../default_dhcp_change_ipv4.exceptions.txt | 0 .../default_dhcp_change_ipv4.json | 0 .../default_dhcp_change_ipv4.json.license | 0 .../default_dhcp_change_ipv4.license | 0 .../default_dhcp_change_ipv4_post_up | 0 ...lt_dhcp_change_ipv4_post_up.exceptions.txt | 0 .../default_dhcp_change_ipv4_post_up.json | 0 ...ault_dhcp_change_ipv4_post_up.json.license | 0 .../default_dhcp_change_ipv4_post_up.license | 0 .../default_dhcp_change_ipv4_pre_up | 0 ...ult_dhcp_change_ipv4_pre_up.exceptions.txt | 0 .../default_dhcp_change_ipv4_pre_up.json | 0 ...fault_dhcp_change_ipv4_pre_up.json.license | 0 .../default_dhcp_change_ipv4_pre_up.license | 0 .../golden_output/default_dhcp_change_ipv6 | 0 .../default_dhcp_change_ipv6.exceptions.txt | 0 ...lt_dhcp_change_ipv6.exceptions.txt.license | 0 .../default_dhcp_change_ipv6.json | 0 .../default_dhcp_change_ipv6.json.license | 0 .../default_dhcp_change_ipv6.license | 0 .../default_dhcp_change_ipv6_post_up | 0 ...lt_dhcp_change_ipv6_post_up.exceptions.txt | 0 ...change_ipv6_post_up.exceptions.txt.license | 0 .../default_dhcp_change_ipv6_post_up.json | 0 ...ault_dhcp_change_ipv6_post_up.json.license | 0 .../default_dhcp_change_ipv6_post_up.license | 0 .../default_dhcp_change_ipv6_pre_up | 0 ...ult_dhcp_change_ipv6_pre_up.exceptions.txt | 0 ..._change_ipv6_pre_up.exceptions.txt.license | 0 .../default_dhcp_change_ipv6_pre_up.json | 0 ...fault_dhcp_change_ipv6_pre_up.json.license | 0 .../default_dhcp_change_ipv6_pre_up.license | 0 .../golden_output/default_dhcp_change_method | 0 .../default_dhcp_change_method.exceptions.txt | 0 ..._dhcp_change_method.exceptions.txt.license | 0 .../default_dhcp_change_method.json | 0 .../default_dhcp_change_method.json.license | 0 .../default_dhcp_change_method.license | 0 .../golden_output/default_dhcp_revert | 0 .../default_dhcp_revert.exceptions.txt | 0 .../golden_output/default_dhcp_revert.json | 0 .../default_dhcp_revert.json.license | 0 .../golden_output/default_dhcp_revert.license | 0 .../default_dhcp_set_aggi_and_eth0_mtu | 0 ..._dhcp_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../default_dhcp_set_aggi_and_eth0_mtu.json | 0 ...lt_dhcp_set_aggi_and_eth0_mtu.json.license | 0 ...default_dhcp_set_aggi_and_eth0_mtu.license | 0 .../default_dhcp_set_aggi_slaves | 0 ...efault_dhcp_set_aggi_slaves.exceptions.txt | 0 ...hcp_set_aggi_slaves.exceptions.txt.license | 0 .../default_dhcp_set_aggi_slaves.json | 0 .../default_dhcp_set_aggi_slaves.json.license | 0 .../default_dhcp_set_aggi_slaves.license | 0 .../golden_output/servers.com.test_no_changes | 0 .../servers.com.test_no_changes.json | 0 .../servers.com.test_no_changes.json.license | 0 .../servers.com.test_no_changes.license | 0 .../golden_output/servers.com_add_aggi_up | 0 .../servers.com_add_aggi_up.exceptions.txt | 0 .../servers.com_add_aggi_up.json | 0 .../servers.com_add_aggi_up.json.license | 0 .../servers.com_add_aggi_up.license | 0 .../servers.com_add_aggi_up_twice | 0 ...rvers.com_add_aggi_up_twice.exceptions.txt | 0 .../servers.com_add_aggi_up_twice.json | 0 ...servers.com_add_aggi_up_twice.json.license | 0 .../servers.com_add_aggi_up_twice.license | 0 .../servers.com_add_and_delete_aggi_up | 0 ....com_add_and_delete_aggi_up.exceptions.txt | 0 .../servers.com_add_and_delete_aggi_up.json | 0 ...rs.com_add_and_delete_aggi_up.json.license | 0 ...servers.com_add_and_delete_aggi_up.license | 0 .../golden_output/servers.com_aggi_remove_dup | 0 ...servers.com_aggi_remove_dup.exceptions.txt | 0 .../servers.com_aggi_remove_dup.json | 0 .../servers.com_aggi_remove_dup.json.license | 0 .../servers.com_aggi_remove_dup.license | 0 .../golden_output/servers.com_change_ipv4 | 0 .../servers.com_change_ipv4.exceptions.txt | 0 ...ers.com_change_ipv4.exceptions.txt.license | 0 .../servers.com_change_ipv4.json | 0 .../servers.com_change_ipv4.json.license | 0 .../servers.com_change_ipv4.license | 0 .../servers.com_change_ipv4_post_up | 0 ...ers.com_change_ipv4_post_up.exceptions.txt | 0 ...change_ipv4_post_up.exceptions.txt.license | 0 .../servers.com_change_ipv4_post_up.json | 0 ...rvers.com_change_ipv4_post_up.json.license | 0 .../servers.com_change_ipv4_post_up.license | 0 .../servers.com_change_ipv4_pre_up | 0 ...vers.com_change_ipv4_pre_up.exceptions.txt | 0 ..._change_ipv4_pre_up.exceptions.txt.license | 0 .../servers.com_change_ipv4_pre_up.json | 0 ...ervers.com_change_ipv4_pre_up.json.license | 0 .../servers.com_change_ipv4_pre_up.license | 0 .../golden_output/servers.com_change_ipv6 | 0 .../servers.com_change_ipv6.exceptions.txt | 0 ...ers.com_change_ipv6.exceptions.txt.license | 0 .../servers.com_change_ipv6.json | 0 .../servers.com_change_ipv6.json.license | 0 .../servers.com_change_ipv6.license | 0 .../servers.com_change_ipv6_post_up | 0 ...ers.com_change_ipv6_post_up.exceptions.txt | 0 ...change_ipv6_post_up.exceptions.txt.license | 0 .../servers.com_change_ipv6_post_up.json | 0 ...rvers.com_change_ipv6_post_up.json.license | 0 .../servers.com_change_ipv6_post_up.license | 0 .../servers.com_change_ipv6_pre_up | 0 ...vers.com_change_ipv6_pre_up.exceptions.txt | 0 ..._change_ipv6_pre_up.exceptions.txt.license | 0 .../servers.com_change_ipv6_pre_up.json | 0 ...ervers.com_change_ipv6_pre_up.json.license | 0 .../servers.com_change_ipv6_pre_up.license | 0 .../golden_output/servers.com_change_method | 0 .../servers.com_change_method.exceptions.txt | 0 .../servers.com_change_method.json | 0 .../servers.com_change_method.json.license | 0 .../servers.com_change_method.license | 0 .../golden_output/servers.com_revert | 0 .../servers.com_revert.exceptions.txt | 0 .../servers.com_revert.exceptions.txt.license | 0 .../golden_output/servers.com_revert.json | 0 .../servers.com_revert.json.license | 0 .../golden_output/servers.com_revert.license | 0 .../servers.com_set_aggi_and_eth0_mtu | 0 ...s.com_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../servers.com_set_aggi_and_eth0_mtu.json | 0 ...ers.com_set_aggi_and_eth0_mtu.json.license | 0 .../servers.com_set_aggi_and_eth0_mtu.license | 0 .../golden_output/servers.com_set_aggi_slaves | 0 ...servers.com_set_aggi_slaves.exceptions.txt | 0 .../servers.com_set_aggi_slaves.json | 0 .../servers.com_set_aggi_slaves.json.license | 0 .../servers.com_set_aggi_slaves.license | 0 .../golden_output/up_down_dup.test_no_changes | 0 .../up_down_dup.test_no_changes.json | 0 .../up_down_dup.test_no_changes.json.license | 0 .../up_down_dup.test_no_changes.license | 0 .../golden_output/up_down_dup_add_aggi_up | 0 .../up_down_dup_add_aggi_up.exceptions.txt | 0 .../up_down_dup_add_aggi_up.json | 0 .../up_down_dup_add_aggi_up.json.license | 0 .../up_down_dup_add_aggi_up.license | 0 .../up_down_dup_add_aggi_up_twice | 0 ..._down_dup_add_aggi_up_twice.exceptions.txt | 0 .../up_down_dup_add_aggi_up_twice.json | 0 ...up_down_dup_add_aggi_up_twice.json.license | 0 .../up_down_dup_add_aggi_up_twice.license | 0 .../up_down_dup_add_and_delete_aggi_up | 0 ..._dup_add_and_delete_aggi_up.exceptions.txt | 0 .../up_down_dup_add_and_delete_aggi_up.json | 0 ...wn_dup_add_and_delete_aggi_up.json.license | 0 ...up_down_dup_add_and_delete_aggi_up.license | 0 .../golden_output/up_down_dup_aggi_remove_dup | 0 ...up_down_dup_aggi_remove_dup.exceptions.txt | 0 .../up_down_dup_aggi_remove_dup.json | 0 .../up_down_dup_aggi_remove_dup.json.license | 0 .../up_down_dup_aggi_remove_dup.license | 0 .../golden_output/up_down_dup_change_ipv4 | 0 .../up_down_dup_change_ipv4.exceptions.txt | 0 ...own_dup_change_ipv4.exceptions.txt.license | 0 .../up_down_dup_change_ipv4.json | 0 .../up_down_dup_change_ipv4.json.license | 0 .../up_down_dup_change_ipv4.license | 0 .../up_down_dup_change_ipv4_post_up | 0 ...own_dup_change_ipv4_post_up.exceptions.txt | 0 ...change_ipv4_post_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv4_post_up.json | 0 ..._down_dup_change_ipv4_post_up.json.license | 0 .../up_down_dup_change_ipv4_post_up.license | 0 .../up_down_dup_change_ipv4_pre_up | 0 ...down_dup_change_ipv4_pre_up.exceptions.txt | 0 ..._change_ipv4_pre_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv4_pre_up.json | 0 ...p_down_dup_change_ipv4_pre_up.json.license | 0 .../up_down_dup_change_ipv4_pre_up.license | 0 .../golden_output/up_down_dup_change_ipv6 | 0 .../up_down_dup_change_ipv6.exceptions.txt | 0 ...own_dup_change_ipv6.exceptions.txt.license | 0 .../up_down_dup_change_ipv6.json | 0 .../up_down_dup_change_ipv6.json.license | 0 .../up_down_dup_change_ipv6.license | 0 .../up_down_dup_change_ipv6_post_up | 0 ...own_dup_change_ipv6_post_up.exceptions.txt | 0 ...change_ipv6_post_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv6_post_up.json | 0 ..._down_dup_change_ipv6_post_up.json.license | 0 .../up_down_dup_change_ipv6_post_up.license | 0 .../up_down_dup_change_ipv6_pre_up | 0 ...down_dup_change_ipv6_pre_up.exceptions.txt | 0 ..._change_ipv6_pre_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv6_pre_up.json | 0 ...p_down_dup_change_ipv6_pre_up.json.license | 0 .../up_down_dup_change_ipv6_pre_up.license | 0 .../golden_output/up_down_dup_change_method | 0 .../up_down_dup_change_method.exceptions.txt | 0 ...n_dup_change_method.exceptions.txt.license | 0 .../up_down_dup_change_method.json | 0 .../up_down_dup_change_method.json.license | 0 .../up_down_dup_change_method.license | 0 .../golden_output/up_down_dup_revert | 0 .../up_down_dup_revert.exceptions.txt | 0 .../up_down_dup_revert.exceptions.txt.license | 0 .../golden_output/up_down_dup_revert.json | 0 .../up_down_dup_revert.json.license | 0 .../golden_output/up_down_dup_revert.license | 0 .../up_down_dup_set_aggi_and_eth0_mtu | 0 ...n_dup_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../up_down_dup_set_aggi_and_eth0_mtu.json | 0 ...own_dup_set_aggi_and_eth0_mtu.json.license | 0 .../up_down_dup_set_aggi_and_eth0_mtu.license | 0 .../golden_output/up_down_dup_set_aggi_slaves | 0 ...up_down_dup_set_aggi_slaves.exceptions.txt | 0 .../up_down_dup_set_aggi_slaves.json | 0 .../up_down_dup_set_aggi_slaves.json.license | 0 .../up_down_dup_set_aggi_slaves.license | 0 .../input/address_family | 0 .../input/address_family.license | 0 .../input/default_dhcp | 0 .../input/default_dhcp.license | 0 .../input/servers.com | 0 .../input/servers.com.license | 0 .../input/up_down_dup | 0 .../input/up_down_dup.license | 0 .../interfaces_file/test_interfaces_file.py | 4 +- 368 files changed, 113 insertions(+), 59 deletions(-) rename tests/unit/plugins/modules/cloud/linode/{conftest.py => linode_conftest.py} (100%) rename tests/unit/plugins/modules/cloud/xenserver/{common.py => xenserver_common.py} (100%) rename tests/unit/plugins/modules/cloud/xenserver/{conftest.py => xenserver_conftest.py} (100%) rename tests/unit/plugins/modules/packaging/os/{conftest.py => rhn_conftest.py} (100%) rename tests/unit/plugins/modules/remote_management/oneview/{conftest.py => oneview_conftest.py} (100%) rename tests/unit/plugins/modules/system/interfaces_file/{README.md => interfaces_file-README.md} (82%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family.test_no_changes (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family.test_no_changes.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family.test_no_changes.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_aggi_remove_dup (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_aggi_remove_dup.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_method (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_method.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_method.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_method.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_change_method.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_revert (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_revert.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_revert.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_revert.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_slaves (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_slaves.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/address_family_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp.test_no_changes (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp.test_no_changes.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp.test_no_changes.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_aggi_remove_dup (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_method (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_method.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_method.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_method.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_change_method.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_revert (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_revert.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_revert.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_revert.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_slaves (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/default_dhcp_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com.test_no_changes (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com.test_no_changes.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com.test_no_changes.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_aggi_remove_dup (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_method (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_method.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_method.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_change_method.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_revert (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_revert.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_revert.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_revert.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_revert.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_slaves (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/servers.com_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup.test_no_changes (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup.test_no_changes.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup.test_no_changes.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_aggi_remove_dup (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6 (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_method (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_method.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_method.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_method.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_change_method.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_revert (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_revert.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_revert.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_revert.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_revert.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_slaves (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/golden_output/up_down_dup_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/address_family (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/address_family.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/default_dhcp (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/default_dhcp.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/servers.com (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/servers.com.license (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/up_down_dup (100%) rename tests/unit/plugins/modules/system/interfaces_file/{fixtures => interfaces_file_fixtures}/input/up_down_dup.license (100%) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 53fa9ad257..4aaea6b773 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -327,13 +327,13 @@ files: $module_utils/xfconf.py: maintainers: russoz labels: xfconf - $modules/cloud/alicloud/: + $modules/cloud/alicloud/ali_: maintainers: xiaozhu36 $modules/cloud/atomic/atomic_container.py: maintainers: giuseppe krsacme - $modules/cloud/atomic/: + $modules/cloud/atomic/atomic_: maintainers: krsacme - $modules/cloud/centurylink/: + $modules/cloud/centurylink/clc_: maintainers: clc-runner $modules/cloud/dimensiondata/dimensiondata_network.py: maintainers: aimonb tintoy @@ -342,22 +342,22 @@ files: maintainers: tintoy $modules/cloud/heroku/heroku_collaborator.py: maintainers: marns93 - $modules/cloud/huawei/: + $modules/cloud/huawei/hwc_: maintainers: $team_huawei huaweicloud keywords: cloud huawei hwc - $modules/cloud/linode/: + $modules/cloud/linode/linode: maintainers: $team_linode $modules/cloud/linode/linode.py: maintainers: zbal $modules/cloud/lxc/lxc_container.py: maintainers: cloudnull - $modules/cloud/lxd/: + $modules/cloud/lxd/lxd_: ignore: hnakamur $modules/cloud/lxd/lxd_profile.py: maintainers: conloos $modules/cloud/lxd/lxd_project.py: maintainers: we10710aa - $modules/cloud/memset/: + $modules/cloud/memset/memset_: maintainers: glitchcrab $modules/cloud/misc/cloud_init_data_facts.py: maintainers: resmo @@ -385,41 +385,42 @@ files: labels: rhevm virt ignore: skvidal keywords: kvm libvirt proxmox qemu - $modules/cloud/misc/: + $modules/cloud/misc/serverless.py: ignore: ryansb $modules/cloud/misc/terraform.py: maintainers: m-yosefpor rainerleber + ignore: ryansb $modules/cloud/misc/xenserver_facts.py: maintainers: caphrim007 cheese labels: xenserver_facts - ignore: andyhky - $modules/cloud/oneandone/: + ignore: andyhky ryansb + $modules/cloud/oneandone/oneandone_: maintainers: aajdinov edevenport - $modules/cloud/online/: + $modules/cloud/online/online_: maintainers: remyleone - $modules/cloud/opennebula/: + $modules/cloud/opennebula/one_: maintainers: $team_opennebula $modules/cloud/opennebula/one_host.py: maintainers: rvalle $modules/cloud/oracle/oci_vcn.py: maintainers: $team_oracle rohitChaware - $modules/cloud/ovh/: + $modules/cloud/ovh/ovh_: maintainers: pascalheraud $modules/cloud/ovh/ovh_monthly_billing.py: maintainers: fraff $modules/cloud/packet/packet_device.py: maintainers: baldwinSPC t0mk teebes - $modules/cloud/packet/: + $modules/cloud/packet/packet_: maintainers: nurfet-becirevic t0mk $modules/cloud/packet/packet_sshkey.py: maintainers: t0mk - $modules/cloud/profitbricks/: + $modules/cloud/profitbricks/profitbricks: maintainers: baldwinSPC $modules/cloud/pubnub/pubnub_blocks.py: maintainers: parfeon pubnub $modules/cloud/rackspace/rax.py: maintainers: omgjlk sivel - $modules/cloud/rackspace/: + $modules/cloud/rackspace/rax: ignore: ryansb sivel $modules/cloud/rackspace/rax_cbs.py: maintainers: claco @@ -457,7 +458,7 @@ files: maintainers: smashwilson $modules/cloud/rackspace/rax_queue.py: maintainers: claco - $modules/cloud/scaleway/: + $modules/cloud/scaleway/scaleway_: maintainers: $team_scaleway $modules/cloud/scaleway/scaleway_compute_private_network.py: maintainers: pastral @@ -490,29 +491,39 @@ files: ignore: hekonsek $modules/cloud/scaleway/scaleway_volume_info.py: maintainers: Spredzy - $modules/cloud/smartos/: + $modules/cloud/smartos/imgadm.py: maintainers: $team_solaris labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool $modules/cloud/smartos/nictagadm.py: - maintainers: SmithX10 + maintainers: $team_solaris SmithX10 + labels: solaris + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + $modules/cloud/smartos/smartos_image_info.py: + maintainers: $team_solaris + labels: solaris + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + $modules/cloud/smartos/vmadm.py: + maintainers: $team_solaris + labels: solaris + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool $modules/cloud/softlayer/sl_vm.py: maintainers: mcltn $modules/cloud/spotinst/spotinst_aws_elastigroup.py: maintainers: talzur - $modules/cloud/univention/: + $modules/cloud/univention/udm_: maintainers: keachi - $modules/cloud/webfaction/: + $modules/cloud/webfaction/webfaction_: maintainers: quentinsf - $modules/cloud/xenserver/: + $modules/cloud/xenserver/xenserver_: maintainers: bvitnik - $modules/clustering/consul/: + $modules/clustering/consul/consul: maintainers: $team_consul ignore: colin-nolan $modules/clustering/etcd3.py: maintainers: evrardjp ignore: vfauth - $modules/clustering/nomad/: + $modules/clustering/nomad/nomad_: maintainers: chris93111 $modules/clustering/pacemaker_cluster.py: maintainers: matbu @@ -520,7 +531,7 @@ files: maintainers: treyperry $modules/database/aerospike/aerospike_migrations.py: maintainers: Alb0t - $modules/database/influxdb/: + $modules/database/influxdb/influxdb_: maintainers: kamsz $modules/database/influxdb/influxdb_query.py: maintainers: resmo @@ -554,7 +565,7 @@ files: labels: mssql_script $modules/database/saphana/hana_query.py: maintainers: rainerleber - $modules/database/vertica/: + $modules/database/vertica/vertica_: maintainers: dareko $modules/files/archive.py: maintainers: bendoh @@ -579,7 +590,7 @@ files: maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0 labels: m:xml xml ignore: magnus919 - $modules/identity/ipa/: + $modules/identity/ipa/ipa_: maintainers: $team_ipa $modules/identity/ipa/ipa_pwpolicy.py: maintainers: adralioh @@ -587,7 +598,7 @@ files: maintainers: cprh $modules/identity/ipa/ipa_vault.py: maintainers: jparrill - $modules/identity/keycloak/: + $modules/identity/keycloak/keycloak_: maintainers: $team_keycloak $modules/identity/keycloak/keycloak_authentication.py: maintainers: elfelip Gaetan2907 @@ -665,10 +676,10 @@ files: maintainers: thaumos $modules/monitoring/rollbar_deployment.py: maintainers: kavu + $modules/monitoring/sensu/sensu_: + maintainers: dmsimard $modules/monitoring/sensu/sensu_check.py: maintainers: andsens - $modules/monitoring/sensu/: - maintainers: dmsimard $modules/monitoring/sensu/sensu_silence.py: maintainers: smbambling $modules/monitoring/sensu/sensu_subscription.py: @@ -725,7 +736,7 @@ files: maintainers: nerzhul $modules/net_tools/omapi_host.py: maintainers: amasolov nerzhul - $modules/net_tools/pritunl/: + $modules/net_tools/pritunl/pritunl_: maintainers: Lowess $modules/net_tools/nmcli.py: maintainers: alcamie101 @@ -961,21 +972,24 @@ files: maintainers: $team_suse labels: zypper ignore: matze - $modules/remote_management/cobbler/: + $modules/remote_management/cobbler/cobbler_: maintainers: dagwieers - $modules/remote_management/hpilo/: + $modules/remote_management/hpilo/hpilo_: + maintainers: haad + ignore: dagwieers + $modules/remote_management/hpilo/hponcfg.py: maintainers: haad ignore: dagwieers $modules/remote_management/imc/imc_rest.py: maintainers: dagwieers labels: cisco - $modules/remote_management/ipmi/: + $modules/remote_management/ipmi/ipmi_: maintainers: bgaifullin cloudnull - $modules/remote_management/lenovoxcc/: + $modules/remote_management/lenovoxcc/xcc_: maintainers: panyy3 renxulei - $modules/remote_management/lxca/: + $modules/remote_management/lxca/lxca_: maintainers: navalkp prabhosa - $modules/remote_management/manageiq/: + $modules/remote_management/manageiq/manageiq_: labels: manageiq maintainers: $team_manageiq $modules/remote_management/manageiq/manageiq_alert_profiles.py: @@ -990,7 +1004,7 @@ files: maintainers: russoz $team_manageiq $modules/remote_management/manageiq/manageiq_tenant.py: maintainers: evertmulder - $modules/remote_management/oneview/: + $modules/remote_management/oneview/oneview_: maintainers: adriane-cardozo fgbulsoni tmiotto $modules/remote_management/oneview/oneview_datacenter_info.py: maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr @@ -998,7 +1012,16 @@ files: maintainers: fgbulsoni $modules/remote_management/oneview/oneview_fcoe_network.py: maintainers: fgbulsoni - $modules/remote_management/redfish/: + $modules/remote_management/redfish/idrac_: + maintainers: $team_redfish + ignore: jose-delarosa + $modules/remote_management/redfish/ilo_: + maintainers: $team_redfish + ignore: jose-delarosa + $modules/remote_management/redfish/redfish_: + maintainers: $team_redfish + ignore: jose-delarosa + $modules/remote_management/redfish/wdc_: maintainers: $team_redfish ignore: jose-delarosa $modules/remote_management/redfish/wdc_redfish_command.py: @@ -1010,7 +1033,7 @@ files: labels: stacki_host $modules/remote_management/wakeonlan.py: maintainers: dagwieers - $modules/source_control/bitbucket/: + $modules/source_control/bitbucket/bitbucket_: maintainers: catcombo $modules/source_control/bzr.py: maintainers: andreparames @@ -1028,9 +1051,9 @@ files: maintainers: adrianmoisey $modules/source_control/github/github_repo.py: maintainers: atorrescogollo - $modules/source_control/github/: + $modules/source_control/github/github_: maintainers: stpierre - $modules/source_control/gitlab/: + $modules/source_control/gitlab/gitlab_: notify: jlozadad maintainers: $team_gitlab keywords: gitlab source_control @@ -1048,13 +1071,13 @@ files: maintainers: remixtj $modules/storage/hpe3par/ss_3par_cpg.py: maintainers: farhan7500 gautamphegde - $modules/storage/ibm/: + $modules/storage/ibm/ibm_sa_: maintainers: tzure $modules/storage/pmem/pmem.py: maintainers: mizumm - $modules/storage/vexata/: + $modules/storage/vexata/vexata_: maintainers: vexata - $modules/storage/zfs/: + $modules/storage/zfs/zfs: maintainers: $team_solaris labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool @@ -1062,6 +1085,10 @@ files: maintainers: johanwiren $modules/storage/zfs/zfs_delegate_admin.py: maintainers: natefoo + $modules/storage/zfs/zpool_facts: + maintainers: $team_solaris + labels: solaris + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool $modules/system/aix: maintainers: $team_aix labels: aix @@ -1259,7 +1286,7 @@ files: maintainers: phsmith $modules/web_infrastructure/rundeck_job_executions_info.py: maintainers: phsmith - $modules/web_infrastructure/sophos_utm/: + $modules/web_infrastructure/sophos_utm/utm_: maintainers: $team_e_spirit keywords: sophos utm $modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py: diff --git a/tests/unit/plugins/modules/cloud/linode/conftest.py b/tests/unit/plugins/modules/cloud/linode/linode_conftest.py similarity index 100% rename from tests/unit/plugins/modules/cloud/linode/conftest.py rename to tests/unit/plugins/modules/cloud/linode/linode_conftest.py diff --git a/tests/unit/plugins/modules/cloud/linode/test_linode.py b/tests/unit/plugins/modules/cloud/linode/test_linode.py index ad769eba6e..76aa5a75ce 100644 --- a/tests/unit/plugins/modules/cloud/linode/test_linode.py +++ b/tests/unit/plugins/modules/cloud/linode/test_linode.py @@ -10,6 +10,8 @@ import pytest from ansible_collections.community.general.plugins.modules.cloud.linode import linode from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args +from .linode_conftest import api_key, auth + if not linode.HAS_LINODE: pytestmark = pytest.mark.skip('test_linode.py requires the `linode-python` module') diff --git a/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py b/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py index 6e0bdea007..1060633142 100644 --- a/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py +++ b/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py @@ -25,6 +25,8 @@ from ansible_collections.community.general.plugins.module_utils.linode import ge from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args from ansible_collections.community.general.tests.unit.compat import mock +from .linode_conftest import access_token, no_access_token_in_env, default_args, mock_linode + def test_mandatory_state_is_validated(capfd): with pytest.raises(SystemExit): diff --git a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py index 149b2cdc8c..922d34e092 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py +++ b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py @@ -11,7 +11,8 @@ __metaclass__ = type import json import pytest -from .common import fake_xenapi_ref +from .xenserver_common import fake_xenapi_ref +from .xenserver_conftest import XenAPI, xenserver_guest_info pytestmark = pytest.mark.usefixtures('patch_ansible_module') diff --git a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py index 1cc543e48b..ea137628ad 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py +++ b/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py @@ -10,7 +10,8 @@ __metaclass__ = type import json import pytest -from .common import fake_xenapi_ref +from .xenserver_common import fake_xenapi_ref +from .xenserver_conftest import fake_ansible_module, XenAPI, xenserver_guest_powerstate testcase_set_powerstate = { diff --git a/tests/unit/plugins/modules/cloud/xenserver/common.py b/tests/unit/plugins/modules/cloud/xenserver/xenserver_common.py similarity index 100% rename from tests/unit/plugins/modules/cloud/xenserver/common.py rename to tests/unit/plugins/modules/cloud/xenserver/xenserver_common.py diff --git a/tests/unit/plugins/modules/cloud/xenserver/conftest.py b/tests/unit/plugins/modules/cloud/xenserver/xenserver_conftest.py similarity index 100% rename from tests/unit/plugins/modules/cloud/xenserver/conftest.py rename to tests/unit/plugins/modules/cloud/xenserver/xenserver_conftest.py diff --git a/tests/unit/plugins/modules/packaging/os/conftest.py b/tests/unit/plugins/modules/packaging/os/rhn_conftest.py similarity index 100% rename from tests/unit/plugins/modules/packaging/os/conftest.py rename to tests/unit/plugins/modules/packaging/os/rhn_conftest.py diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py b/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py index bda110c74c..c30a3488da 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py @@ -10,6 +10,8 @@ import json from ansible_collections.community.general.plugins.modules.packaging.os import rhn_channel +from .rhn_conftest import mock_request + import pytest diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py index cfbdfb36f4..fa3b92d6d2 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py @@ -15,6 +15,8 @@ import ansible.module_utils.six from ansible.module_utils.six.moves import xmlrpc_client from ansible_collections.community.general.plugins.modules.packaging.os import rhn_register +from .rhn_conftest import mock_request + import pytest diff --git a/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py b/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py index a41066c6b0..658041772e 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py +++ b/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py @@ -13,6 +13,7 @@ import yaml from mock import Mock, patch from .oneview_module_loader import ONEVIEW_MODULE_UTILS_PATH +from .oneview_conftest import mock_ov_client, mock_ansible_module from hpOneView.oneview_client import OneViewClient diff --git a/tests/unit/plugins/modules/remote_management/oneview/conftest.py b/tests/unit/plugins/modules/remote_management/oneview/oneview_conftest.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/conftest.py rename to tests/unit/plugins/modules/remote_management/oneview/oneview_conftest.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py b/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py index e4c9c98166..aa7d148f11 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py +++ b/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py @@ -10,8 +10,9 @@ from ansible_collections.community.general.tests.unit.compat.mock import Mock # FIXME: These should be done inside of a fixture so that they're only mocked during # these unittests -sys.modules['hpOneView'] = Mock() -sys.modules['hpOneView.oneview_client'] = Mock() +if 'hpOneView' not in sys.modules: + sys.modules['hpOneView'] = Mock() + sys.modules['hpOneView.oneview_client'] = Mock() ONEVIEW_MODULE_UTILS_PATH = 'ansible_collections.community.general.plugins.module_utils.oneview' from ansible_collections.community.general.plugins.module_utils.oneview import (OneViewModuleException, diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py index 6226513595..d2542d159c 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py @@ -7,8 +7,10 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_datacenter_info import DatacenterInfoModule from .hpe_test_utils import FactsParamsTest +from .oneview_conftest import mock_ov_client, mock_ansible_module + +from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_datacenter_info import DatacenterInfoModule PARAMS_GET_CONNECTED = dict( config='config.json', diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py index 2f59916d71..1032d224a6 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py @@ -5,9 +5,11 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +from .hpe_test_utils import FactsParamsTestCase +from .oneview_conftest import mock_ov_client, mock_ansible_module + from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_enclosure_info import EnclosureInfoModule -from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py index f1398740ee..834c6c88c6 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py @@ -11,6 +11,7 @@ import yaml from ansible_collections.community.general.tests.unit.compat import unittest, mock from .oneview_module_loader import EthernetNetworkModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py index 4a2813e2f8..f922bc8f48 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py @@ -8,6 +8,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import EthernetNetworkInfoModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py index 6def80fc43..97d5ef85b6 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py @@ -9,6 +9,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcNetworkModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py index 236ce136ad..c548bf02f7 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py @@ -7,6 +7,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcNetworkInfoModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py index 224e5471e9..8e74f8c73d 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py @@ -9,6 +9,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcoeNetworkModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py index a83a7e1513..a8fda975a8 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py @@ -8,7 +8,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcoeNetworkInfoModule - +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py index f8b3101c62..597c6953ef 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py @@ -8,8 +8,9 @@ __metaclass__ = type from copy import deepcopy from ansible_collections.community.general.tests.unit.compat import unittest, mock -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group import LogicalInterconnectGroupModule from .hpe_test_utils import OneViewBaseTestCase +from .oneview_conftest import mock_ov_client, mock_ansible_module +from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group import LogicalInterconnectGroupModule FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py index b1f0d24725..45f72a198b 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py @@ -6,10 +6,11 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest +from .hpe_test_utils import FactsParamsTestCase +from .oneview_conftest import mock_ov_client, mock_ansible_module from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group_info import ( LogicalInterconnectGroupInfoModule ) -from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py index f801cd102a..be89898aed 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py @@ -8,6 +8,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest, mock from .hpe_test_utils import OneViewBaseTestCase from .oneview_module_loader import NetworkSetModule +from .oneview_conftest import mock_ov_client, mock_ansible_module FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py index 13cd0400a4..67d8f28201 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py @@ -7,6 +7,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import NetworkSetInfoModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py index d675c3b353..22ee624f24 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py @@ -7,6 +7,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest, mock from .oneview_module_loader import SanManagerModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase from copy import deepcopy diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py index be1f243161..c786e504e0 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py +++ b/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py @@ -7,6 +7,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import SanManagerInfoModule +from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase diff --git a/tests/unit/plugins/modules/system/interfaces_file/README.md b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file-README.md similarity index 82% rename from tests/unit/plugins/modules/system/interfaces_file/README.md rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file-README.md index b0c22f3dc3..aa9298f370 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/README.md +++ b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file-README.md @@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-3.0-or-later 1. Clone project to `ansible_collections/community/general` 2. Change directory to the project one `cd ansible_collections/community/general` -3. Run `ansible-test units --docker -v --python 3.6 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py` +3. Run `ansible-test units --docker -v --python 3.10 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py` ## Adding tests @@ -23,5 +23,5 @@ SPDX-License-Identifier: GPL-3.0-or-later 2. New test cases should be defined in `test_interfaces_file.py`. Same for new test functions if needed 3. On first test run for a new combination of a test case and an interface configuration new set of golden files will be generated. In case of docker-based test approach that's going to fail due to RO mount option. The workaround is to run tests locally with Python 3 (3.7 in this example): 1. Install required modules with `pip3.7 install pytest-xdist pytest-mock mock` - 3. Run tests with `ansible-test units --python 3.7 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py` + 3. Run tests with `ansible-test units --python 3.10 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py` 4. Carefully verify newly created golden output files! diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family.test_no_changes.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_aggi_up_twice.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_aggi_remove_dup.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_change_method.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_revert.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/address_family_set_aggi_slaves.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp.test_no_changes.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_aggi_up_twice.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_aggi_remove_dup.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_change_method.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_revert.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/default_dhcp_set_aggi_slaves.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com.test_no_changes.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_aggi_up_twice.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_aggi_remove_dup.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_change_method.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_revert.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/servers.com_set_aggi_slaves.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup.test_no_changes.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_aggi_up_twice.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_aggi_remove_dup.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6 b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6 rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_post_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_change_method.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_revert.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/golden_output/up_down_dup_set_aggi_slaves.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/address_family.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/default_dhcp.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/servers.com.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup.license b/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/fixtures/input/up_down_dup.license rename to tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py index 60303234a3..ac5450eca7 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py @@ -39,8 +39,8 @@ class ModuleMocked: module = ModuleMocked() -fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'input') -golden_output_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'golden_output') +fixture_path = os.path.join(os.path.dirname(__file__), 'interfaces_file_fixtures', 'input') +golden_output_path = os.path.join(os.path.dirname(__file__), 'interfaces_file_fixtures', 'golden_output') class TestInterfacesFileModule(unittest.TestCase): From df34a7b0f23f5abb17b31fa04ac290269d4f6bc3 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Sat, 29 Oct 2022 10:51:03 +0200 Subject: [PATCH 0275/2104] add option to force dig lookup to return empty list instead of list of empty strings. (#5439) fixes https://github.com/ansible-collections/community.general/issues/5428 --- .../5439-dig-return-empty-result.yml | 2 ++ plugins/lookup/dig.py | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5439-dig-return-empty-result.yml diff --git a/changelogs/fragments/5439-dig-return-empty-result.yml b/changelogs/fragments/5439-dig-return-empty-result.yml new file mode 100644 index 0000000000..8d7d2090df --- /dev/null +++ b/changelogs/fragments/5439-dig-return-empty-result.yml @@ -0,0 +1,2 @@ +bugfixes: + - dig lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5439, https://github.com/ansible-collections/community.general/issues/5428). diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index d7a7d8ec28..3d91152aea 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -52,6 +52,13 @@ DOCUMENTATION = ''' default: false type: bool version_added: 5.4.0 + real_empty: + description: + - Return empty result without empty strings, and return empty list instead of C(NXDOMAIN). + - The default for this option will likely change to C(true) in the future. + default: false + type: bool + version_added: 6.0.0 notes: - ALL is not a record per-se, merely the listed fields are available for any record results you retrieve in the form of a dictionary. - While the 'dig' lookup plugin supports anything which dnspython supports out of the box, only a subset can be converted into a dictionary. @@ -285,6 +292,7 @@ class LookupModule(LookupBase): qtype = 'A' flat = True fail_on_error = False + real_empty = False rdclass = dns.rdataclass.from_text('IN') for t in terms: @@ -325,6 +333,8 @@ class LookupModule(LookupBase): myres.retry_servfail = boolean(arg) elif opt == 'fail_on_error': fail_on_error = boolean(arg) + elif opt == 'real_empty': + real_empty = boolean(arg) continue @@ -375,15 +385,18 @@ class LookupModule(LookupBase): except dns.resolver.NXDOMAIN as err: if fail_on_error: raise AnsibleError("Lookup failed: %s" % str(err)) - ret.append('NXDOMAIN') + if not real_empty: + ret.append('NXDOMAIN') except dns.resolver.NoAnswer as err: if fail_on_error: raise AnsibleError("Lookup failed: %s" % str(err)) - ret.append("") + if not real_empty: + ret.append("") except dns.resolver.Timeout as err: if fail_on_error: raise AnsibleError("Lookup failed: %s" % str(err)) - ret.append('') + if not real_empty: + ret.append("") except dns.exception.DNSException as err: raise AnsibleError("dns.resolver unhandled exception %s" % to_native(err)) From a1f75efee29385f562c35ce70ab37abf8481cd92 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 31 Oct 2022 21:15:03 +0100 Subject: [PATCH 0276/2104] Fix iso_customize tests. (#5447) --- tests/integration/targets/iso_customize/meta/main.yml | 1 + tests/integration/targets/iso_customize/tasks/prepare.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/integration/targets/iso_customize/meta/main.yml b/tests/integration/targets/iso_customize/meta/main.yml index 982de6eb03..5b9177b126 100644 --- a/tests/integration/targets/iso_customize/meta/main.yml +++ b/tests/integration/targets/iso_customize/meta/main.yml @@ -5,3 +5,4 @@ dependencies: - setup_remote_tmp_dir + - setup_remote_constraints diff --git a/tests/integration/targets/iso_customize/tasks/prepare.yml b/tests/integration/targets/iso_customize/tasks/prepare.yml index 0db78553d0..e3c860b7c1 100644 --- a/tests/integration/targets/iso_customize/tasks/prepare.yml +++ b/tests/integration/targets/iso_customize/tasks/prepare.yml @@ -6,6 +6,7 @@ - name: install pycdlib ansible.builtin.pip: name: pycdlib + extra_args: "-c {{ remote_constraints }}" - name: Make sure the previous testing sub-directory is deleted ansible.builtin.file: From 20b84fc709989b8939a4ca88863e7fc0b4c4c371 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 1 Nov 2022 02:33:43 -0400 Subject: [PATCH 0277/2104] linnode inventory, remove redundant (#5438) * remove redundant templar is already in base class env var is already consulted in via config resolution * more whites * no need to import templar again * Add changelog fragment. * Try to update tests. Co-authored-by: Felix Fontein --- changelogs/fragments/5438-linode.yml | 2 ++ plugins/inventory/linode.py | 15 +++------------ tests/unit/plugins/inventory/test_linode.py | 5 ++++- 3 files changed, 9 insertions(+), 13 deletions(-) create mode 100644 changelogs/fragments/5438-linode.yml diff --git a/changelogs/fragments/5438-linode.yml b/changelogs/fragments/5438-linode.yml new file mode 100644 index 0000000000..ce2aeadcf3 --- /dev/null +++ b/changelogs/fragments/5438-linode.yml @@ -0,0 +1,2 @@ +minor_changes: + - "linode inventory plugin - simplify option handling (https://github.com/ansible-collections/community.general/pull/5438)." diff --git a/plugins/inventory/linode.py b/plugins/inventory/linode.py index 8790da7079..ea87a9a58e 100644 --- a/plugins/inventory/linode.py +++ b/plugins/inventory/linode.py @@ -126,7 +126,6 @@ import os from ansible.errors import AnsibleError, AnsibleParserError from ansible.module_utils.six import string_types from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable -from ansible.template import Templar try: @@ -145,22 +144,14 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): def _build_client(self, loader): """Build the Linode client.""" - t = Templar(loader=loader) - access_token = self.get_option('access_token') - if t.is_template(access_token): - access_token = t.template(variable=access_token, disable_lookups=False) - - if access_token is None: - try: - access_token = os.environ['LINODE_ACCESS_TOKEN'] - except KeyError: - pass + if self.templar.is_template(access_token): + access_token = self.templar.template(variable=access_token, disable_lookups=False) if access_token is None: raise AnsibleError(( 'Could not retrieve Linode access token ' - 'from plugin configuration or environment' + 'from plugin configuration sources' )) self.client = LinodeClient(access_token) diff --git a/tests/unit/plugins/inventory/test_linode.py b/tests/unit/plugins/inventory/test_linode.py index 60b3c8cb68..4e6a018850 100644 --- a/tests/unit/plugins/inventory/test_linode.py +++ b/tests/unit/plugins/inventory/test_linode.py @@ -18,12 +18,15 @@ mandatory_py_version = pytest.mark.skipif( from ansible.errors import AnsibleError, AnsibleParserError from ansible.parsing.dataloader import DataLoader +from ansible.template import Templar from ansible_collections.community.general.plugins.inventory.linode import InventoryModule @pytest.fixture(scope="module") def inventory(): - return InventoryModule() + plugin = InventoryModule() + plugin.templar = Templar(loader=DataLoader()) + return plugin def test_missing_access_token_lookup(inventory): From f1d5f71b8d6ee1ec1d8fc8df9feaa3dfdf0e71fa Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 1 Nov 2022 02:33:54 -0400 Subject: [PATCH 0278/2104] proxmox inventory, remove redundant and simplify code (#5437) * remove redundant and simplify code we already have a templar from base class loop reuses code instead of X copies of it * whitey * no need to import templar again * Add changelog fragment. Co-authored-by: Felix Fontein --- changelogs/fragments/5437-proxmox.yml | 2 ++ plugins/inventory/proxmox.py | 38 +++++++-------------------- 2 files changed, 12 insertions(+), 28 deletions(-) create mode 100644 changelogs/fragments/5437-proxmox.yml diff --git a/changelogs/fragments/5437-proxmox.yml b/changelogs/fragments/5437-proxmox.yml new file mode 100644 index 0000000000..072c9d97b2 --- /dev/null +++ b/changelogs/fragments/5437-proxmox.yml @@ -0,0 +1,2 @@ +minor_changes: + - "proxmox inventory plugin - simplify option handling code (https://github.com/ansible-collections/community.general/pull/5437)." diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index 67e0428157..b24bcacf25 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -222,7 +222,6 @@ from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.six import string_types from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.utils.display import Display -from ansible.template import Templar from ansible_collections.community.general.plugins.module_utils.version import LooseVersion @@ -612,40 +611,23 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): # read config from file, this sets 'options' self._read_config_data(path) - t = Templar(loader=loader) + # read and template auth options + for o in ('url', 'user', 'password', 'token_id', 'token_secret'): + v = self.get_option(o) + if self.templar.is_template(v): + v = self.templar.template(v, disable_looups=False) + setattr(self, 'proxmox_%s' % o, v) - # read options - proxmox_url = self.get_option('url') - if t.is_template(proxmox_url): - proxmox_url = t.template(variable=proxmox_url, disable_lookups=False) - self.proxmox_url = proxmox_url.rstrip('/') + # some more cleanup and validation + self.proxmox_url = self.proxmox_url.rstrip('/') - proxmox_user = self.get_option('user') - if t.is_template(proxmox_user): - proxmox_user = t.template(variable=proxmox_user, disable_lookups=False) - self.proxmox_user = proxmox_user - - proxmox_password = self.get_option('password') - if t.is_template(proxmox_password): - proxmox_password = t.template(variable=proxmox_password, disable_lookups=False) - self.proxmox_password = proxmox_password - - proxmox_token_id = self.get_option('token_id') - if t.is_template(proxmox_token_id): - proxmox_token_id = t.template(variable=proxmox_token_id, disable_lookups=False) - self.proxmox_token_id = proxmox_token_id - - proxmox_token_secret = self.get_option('token_secret') - if t.is_template(proxmox_token_secret): - proxmox_token_secret = t.template(variable=proxmox_token_secret, disable_lookups=False) - self.proxmox_token_secret = proxmox_token_secret - - if proxmox_password is None and (proxmox_token_id is None or proxmox_token_secret is None): + if self.proxmox_password is None and (self.proxmox_token_id is None or self.proxmox_token_secret is None): raise AnsibleError('You must specify either a password or both token_id and token_secret.') if self.get_option('qemu_extended_statuses') and not self.get_option('want_facts'): raise AnsibleError('You must set want_facts to True if you want to use qemu_extended_statuses.') + # read rest of options self.cache_key = self.get_cache_key(path) self.use_cache = cache and self.get_option('cache') self.host_filters = self.get_option('filters') From a978bff2c72abcd7e395c868492df37566505daa Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 1 Nov 2022 18:11:02 +0100 Subject: [PATCH 0279/2104] Fix non-matching defaults in docs (#5446) * Allow to pass options as lookup options. * Adjust tests. * Fix non-matching defaults. --- .../fragments/5444-passwordstore-options.yml | 2 + plugins/doc_fragments/influxdb.py | 2 + plugins/doc_fragments/ldap.py | 1 + plugins/doc_fragments/utm.py | 1 + plugins/lookup/passwordstore.py | 74 ++++++++++--------- .../modules/cloud/atomic/atomic_container.py | 1 + .../cloud/dimensiondata/dimensiondata_vlan.py | 3 + .../modules/cloud/huawei/hwc_ecs_instance.py | 1 + plugins/modules/cloud/huawei/hwc_evs_disk.py | 1 + .../modules/cloud/huawei/hwc_network_vpc.py | 1 + plugins/modules/cloud/huawei/hwc_vpc_eip.py | 1 + .../cloud/huawei/hwc_vpc_peering_connect.py | 1 + plugins/modules/cloud/huawei/hwc_vpc_port.py | 1 + .../modules/cloud/huawei/hwc_vpc_subnet.py | 1 + plugins/modules/cloud/linode/linode.py | 1 + plugins/modules/cloud/memset/memset_zone.py | 1 + .../cloud/memset/memset_zone_record.py | 3 + plugins/modules/cloud/misc/rhevm.py | 1 + plugins/modules/cloud/misc/serverless.py | 2 + plugins/modules/cloud/misc/terraform.py | 1 + .../oneandone/oneandone_firewall_policy.py | 5 ++ .../oneandone/oneandone_load_balancer.py | 5 ++ .../oneandone/oneandone_monitoring_policy.py | 11 +++ .../oneandone/oneandone_private_network.py | 2 + plugins/modules/cloud/packet/packet_device.py | 1 + .../cloud/profitbricks/profitbricks.py | 2 + .../cloud/profitbricks/profitbricks_volume.py | 4 +- plugins/modules/cloud/pubnub/pubnub_blocks.py | 4 +- plugins/modules/cloud/rackspace/rax.py | 4 + plugins/modules/cloud/rackspace/rax_cbs.py | 1 + plugins/modules/cloud/rackspace/rax_clb.py | 1 + plugins/modules/cloud/rackspace/rax_files.py | 1 + .../cloud/rackspace/rax_files_objects.py | 1 + plugins/modules/cloud/rackspace/rax_meta.py | 1 + .../modules/cloud/rackspace/rax_mon_check.py | 2 + .../modules/cloud/rackspace/rax_mon_entity.py | 2 + .../cloud/rackspace/rax_scaling_group.py | 2 + .../scaleway/scaleway_container_registry.py | 1 + plugins/modules/cloud/scaleway/scaleway_lb.py | 1 + plugins/modules/cloud/softlayer/sl_vm.py | 1 + .../spotinst/spotinst_aws_elastigroup.py | 6 ++ .../modules/cloud/univention/udm_dns_zone.py | 2 + plugins/modules/cloud/univention/udm_group.py | 2 + plugins/modules/cloud/univention/udm_user.py | 3 + plugins/modules/database/mssql/mssql_db.py | 2 + plugins/modules/files/iso_customize.py | 2 + plugins/modules/files/xml.py | 1 + plugins/modules/identity/onepassword_info.py | 1 - .../modules/monitoring/sensu/sensu_check.py | 4 - plugins/modules/monitoring/statsd.py | 1 + plugins/modules/net_tools/dnsmadeeasy.py | 1 - .../modules/net_tools/infinity/infinity.py | 5 -- plugins/modules/net_tools/ldap/ldap_entry.py | 1 + plugins/modules/notification/mail.py | 2 + .../modules/packaging/language/composer.py | 1 + .../packaging/language/maven_artifact.py | 1 + plugins/modules/packaging/os/opkg.py | 1 + plugins/modules/packaging/os/pacman.py | 6 +- .../packaging/os/redhat_subscription.py | 1 - plugins/modules/packaging/os/sorcery.py | 1 + .../lenovoxcc/xcc_redfish_command.py | 1 + .../manageiq/manageiq_tenant.py | 2 +- .../redfish/redfish_command.py | 3 + .../redfish/redfish_config.py | 4 + .../remote_management/stacki/stacki_host.py | 2 + .../source_control/gitlab/gitlab_hook.py | 1 + plugins/modules/storage/zfs/zfs.py | 1 + plugins/modules/storage/zfs/zfs_facts.py | 1 + plugins/modules/system/aix_lvol.py | 2 + plugins/modules/system/java_cert.py | 1 - plugins/modules/system/lvg.py | 2 + plugins/modules/system/selinux_permissive.py | 1 + plugins/modules/web_infrastructure/jira.py | 1 + .../sophos_utm/utm_aaa_group.py | 6 ++ .../sophos_utm/utm_dns_host.py | 2 + .../utm_network_interface_address.py | 1 + .../sophos_utm/utm_proxy_location.py | 3 + .../tasks/password_tests.yml | 16 ++-- .../lookup_passwordstore/tasks/tests.yml | 4 +- 79 files changed, 187 insertions(+), 63 deletions(-) create mode 100644 changelogs/fragments/5444-passwordstore-options.yml diff --git a/changelogs/fragments/5444-passwordstore-options.yml b/changelogs/fragments/5444-passwordstore-options.yml new file mode 100644 index 0000000000..a25c9a2fef --- /dev/null +++ b/changelogs/fragments/5444-passwordstore-options.yml @@ -0,0 +1,2 @@ +minor_changes: + - "passwordstore lookup plugin - allow options to be passed lookup options instead of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444)." diff --git a/plugins/doc_fragments/influxdb.py b/plugins/doc_fragments/influxdb.py index f9e08550bd..6aedd5ad39 100644 --- a/plugins/doc_fragments/influxdb.py +++ b/plugins/doc_fragments/influxdb.py @@ -43,6 +43,7 @@ options: - The path on which InfluxDB server is accessible - Only available when using python-influxdb >= 5.1.0 type: str + default: '' version_added: '0.2.0' validate_certs: description: @@ -80,4 +81,5 @@ options: description: - HTTP(S) proxy to use for Requests to connect to InfluxDB server. type: dict + default: {} ''' diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index 28e9d2fdae..c73e5080be 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -23,6 +23,7 @@ options: description: - The password to use with I(bind_dn). type: str + default: '' dn: required: true description: diff --git a/plugins/doc_fragments/utm.py b/plugins/doc_fragments/utm.py index d8b2305d23..73ad805035 100644 --- a/plugins/doc_fragments/utm.py +++ b/plugins/doc_fragments/utm.py @@ -17,6 +17,7 @@ options: - Is needed for some modules type: dict required: false + default: {} utm_host: description: - The REST Endpoint of the Sophos UTM. diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index ce1f4ee852..1106bbc473 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -21,17 +21,15 @@ DOCUMENTATION = ''' _terms: description: query key. required: true - passwordstore: - description: - - Location of the password store. - - 'The value is decided by checking the following in order:' - - If set, this value is used. - - If C(directory) is set, that value will be used. - - If I(backend=pass), then C(~/.password-store) is used. - - If I(backend=gopass), then the C(path) field in C(~/.config/gopass/config.yml) is used, - falling back to C(~/.local/share/gopass/stores/root) if not defined. directory: - description: The directory of the password store. + description: + - The directory of the password store. + - If I(backend=pass), the default is C(~/.password-store) is used. + - If I(backend=gopass), then the default is the C(path) field in C(~/.config/gopass/config.yml), + falling back to C(~/.local/share/gopass/stores/root) if C(path) is not defined in the gopass config. + type: path + vars: + - name: passwordstore env: - name: PASSWORD_STORE_DIR create: @@ -55,9 +53,11 @@ DOCUMENTATION = ''' default: false subkey: description: Return a specific subkey of the password. When set to C(password), always returns the first line. + type: str default: password userpass: description: Specify a password to save, instead of a generated one. + type: str length: description: The length of the generated password. type: integer @@ -67,7 +67,7 @@ DOCUMENTATION = ''' type: bool default: false nosymbols: - description: use alphanumeric characters. + description: Use alphanumeric characters. type: bool default: false missing: @@ -129,6 +129,8 @@ DOCUMENTATION = ''' - pass - gopass version_added: 5.2.0 + notes: + - The lookup supports passing all options as lookup parameters since community.general 6.0.0. ''' EXAMPLES = """ ansible.cfg: | @@ -136,7 +138,7 @@ ansible.cfg: | lock=readwrite locktimeout=45s -playbook.yml: | +tasks.yml: | --- # Debug is used for examples, BAD IDEA to show passwords on screen @@ -146,45 +148,49 @@ playbook.yml: | - name: Basic lookup. Warns if example/test does not exist and returns empty string ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test missing=warn')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', missing='warn')}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test create=true')}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test', create=true)}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=create')}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test', missing='create')}}" - name: Prints 'abc' if example/test does not exist, just give the password otherwise ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=empty') | default('abc', true) }}" + mypassword: >- + {{ lookup('community.general.passwordstore', 'example/test', missing='empty') + | default('abc', true) }} - name: Different size password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true length=42')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, length=42)}}" - - name: Create password and overwrite the password if it exists. As a bonus, this module includes the old password inside the pass file + - name: >- + Create password and overwrite the password if it exists. + As a bonus, this module includes the old password inside the pass file ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true overwrite=true')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, overwrite=true)}}" - name: Create an alphanumeric password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true nosymbols=true') }}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, nosymbols=true) }}" - name: Return the value for user in the KV pair user, username ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test subkey=user')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', subkey='user')}}" - name: Return the entire password file content ansible.builtin.set_fact: - passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test returnall=true')}}" + passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test', returnall=true)}}" """ RETURN = """ @@ -320,7 +326,7 @@ class LookupModule(LookupBase): raise AnsibleError('Passwordstore directory \'{0}\' does not exist'.format(self.paramvals['directory'])) # Set PASSWORD_STORE_UMASK if umask is set - if 'umask' in self.paramvals: + if self.paramvals.get('umask') is not None: if len(self.paramvals['umask']) != 3: raise AnsibleError('Passwordstore umask must have a length of 3.') elif int(self.paramvals['umask'][0]) > 3: @@ -435,8 +441,7 @@ class LookupModule(LookupBase): unit_to_seconds = {"s": 1, "m": 60, "h": 3600} self.lock_timeout = int(timeout[:-1]) * unit_to_seconds[timeout[-1]] - directory = variables.get('passwordstore', os.environ.get('PASSWORD_STORE_DIR', None)) - + directory = self.get_option('directory') if directory is None: if self.backend == 'gopass': try: @@ -448,16 +453,17 @@ class LookupModule(LookupBase): directory = os.path.expanduser('~/.password-store') self.paramvals = { - 'subkey': 'password', + 'subkey': self.get_option('subkey'), 'directory': directory, - 'create': False, - 'returnall': False, - 'overwrite': False, - 'nosymbols': False, - 'userpass': '', - 'length': 16, - 'backup': False, - 'missing': 'error', + 'create': self.get_option('create'), + 'returnall': self.get_option('returnall'), + 'overwrite': self.get_option('overwrite'), + 'nosymbols': self.get_option('nosymbols'), + 'userpass': self.get_option('userpass') or '', + 'length': self.get_option('length'), + 'backup': self.get_option('backup'), + 'missing': self.get_option('missing'), + 'umask': self.get_option('umask'), } def run(self, terms, variables, **kwargs): diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index 586b1254c2..c32e617a22 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -61,6 +61,7 @@ options: - The values specified here will be used at installation time as --set arguments for atomic install. type: list elements: str + default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py index b06566b8e6..ca25374dcb 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py @@ -31,6 +31,7 @@ options: description: - A description of the VLAN. type: str + default: '' network_domain: description: - The Id or name of the target network domain. @@ -40,11 +41,13 @@ options: description: - The base address for the VLAN's IPv4 network (e.g. 192.168.1.0). type: str + default: '' private_ipv4_prefix_size: description: - The size of the IPv4 address space, e.g 24. - Required, if C(private_ipv4_base_address) is specified. type: int + default: 0 state: description: - The desired state for the target VLAN. diff --git a/plugins/modules/cloud/huawei/hwc_ecs_instance.py b/plugins/modules/cloud/huawei/hwc_ecs_instance.py index 8026c0f2f6..10d913f9b5 100644 --- a/plugins/modules/cloud/huawei/hwc_ecs_instance.py +++ b/plugins/modules/cloud/huawei/hwc_ecs_instance.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_evs_disk.py b/plugins/modules/cloud/huawei/hwc_evs_disk.py index e319821c9f..7b5a99fb7f 100644 --- a/plugins/modules/cloud/huawei/hwc_evs_disk.py +++ b/plugins/modules/cloud/huawei/hwc_evs_disk.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_network_vpc.py b/plugins/modules/cloud/huawei/hwc_network_vpc.py index 2f08f20313..78f5925e0c 100644 --- a/plugins/modules/cloud/huawei/hwc_network_vpc.py +++ b/plugins/modules/cloud/huawei/hwc_network_vpc.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_eip.py b/plugins/modules/cloud/huawei/hwc_vpc_eip.py index a86338052e..e14fb0e502 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_eip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_eip.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py index 89955d2091..01c52932ba 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py @@ -34,6 +34,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_port.py b/plugins/modules/cloud/huawei/hwc_vpc_port.py index dadc76c064..aac9636f88 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_port.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_port.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py index d38150dfc3..4b192a5682 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index c19770dc41..5304ed3d89 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -37,6 +37,7 @@ options: description: - Add the instance to a Display Group in Linode Manager. type: str + default: '' linode_id: description: - Unique ID of a linode server. This value is read-only in the sense that diff --git a/plugins/modules/cloud/memset/memset_zone.py b/plugins/modules/cloud/memset/memset_zone.py index f402e0e0f4..9731e3a943 100644 --- a/plugins/modules/cloud/memset/memset_zone.py +++ b/plugins/modules/cloud/memset/memset_zone.py @@ -44,6 +44,7 @@ options: - The default TTL for all records created in the zone. This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create). type: int + default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] force: required: false diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/cloud/memset/memset_zone_record.py index 5082475176..c114532f90 100644 --- a/plugins/modules/cloud/memset/memset_zone_record.py +++ b/plugins/modules/cloud/memset/memset_zone_record.py @@ -44,11 +44,13 @@ options: description: - C(SRV) and C(TXT) record priority, in the range 0 > 999 (inclusive). type: int + default: 0 record: required: false description: - The subdomain to create. type: str + default: '' type: required: true description: @@ -65,6 +67,7 @@ options: description: - The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create). + default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] type: int zone: diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 2542511bea..994f737093 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -54,6 +54,7 @@ options: description: - The RHEV/oVirt cluster in which you want you VM to start. type: str + default: '' datacenter: description: - The RHEV/oVirt datacenter in which you want you VM to start. diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index 2819adae59..4d36ba679a 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -35,11 +35,13 @@ options: - The name of the serverless framework project stage to deploy to. - This uses the serverless framework default "dev". type: str + default: '' region: description: - AWS region to deploy the service to. - This parameter defaults to C(us-east-1). type: str + default: '' deploy: description: - Whether or not to deploy artifacts after building them. diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index 7b6fbc5126..615c125cf3 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -105,6 +105,7 @@ options: resources selected here will also auto-include any dependencies. type: list elements: str + default: [] lock: description: - Enable statefile locking, if you use a service that accepts locks (such diff --git a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py index 9d9f042f2b..23203e8d05 100644 --- a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py @@ -48,6 +48,7 @@ options: (port_from, port_to, and source) type: list elements: dict + default: [] add_server_ips: description: - A list of server identifiers (id or name) to be assigned to a firewall policy. @@ -55,12 +56,14 @@ options: type: list elements: str required: false + default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state. type: list elements: str required: false + default: [] add_rules: description: - A list of rules that will be added to an existing firewall policy. @@ -68,12 +71,14 @@ options: type: list elements: dict required: false + default: [] remove_rules: description: - A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state. type: list elements: str required: false + default: [] description: description: - Firewall policy description. maxLength=256 diff --git a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py index 3407e264ad..04aefde63a 100644 --- a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py +++ b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py @@ -86,6 +86,7 @@ options: port_balancer, and port_server parameters, in addition to source parameter, which is optional. type: list elements: dict + default: [] description: description: - Description of the load balancer. maxLength=256 @@ -98,12 +99,14 @@ options: type: list elements: str required: false + default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a load balancer. Used in combination with update state. type: list elements: str required: false + default: [] add_rules: description: - A list of rules that will be added to an existing load balancer. @@ -111,12 +114,14 @@ options: type: list elements: dict required: false + default: [] remove_rules: description: - A list of rule ids that will be removed from an existing load balancer. Used in combination with update state. type: list elements: str required: false + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py index cd9ee40ca2..46c68e86e0 100644 --- a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py @@ -62,6 +62,7 @@ options: and value is used to advise when the value is exceeded. type: list elements: dict + default: [] suboptions: cpu: description: @@ -88,6 +89,7 @@ options: - Array of ports that will be monitoring. type: list elements: dict + default: [] suboptions: protocol: description: @@ -112,6 +114,7 @@ options: - Array of processes that will be monitoring. type: list elements: dict + default: [] suboptions: process: description: @@ -128,48 +131,56 @@ options: type: list elements: dict required: false + default: [] add_processes: description: - Processes to add to the monitoring policy. type: list elements: dict required: false + default: [] add_servers: description: - Servers to add to the monitoring policy. type: list elements: str required: false + default: [] remove_ports: description: - Ports to remove from the monitoring policy. type: list elements: str required: false + default: [] remove_processes: description: - Processes to remove from the monitoring policy. type: list elements: str required: false + default: [] remove_servers: description: - Servers to remove from the monitoring policy. type: list elements: str required: false + default: [] update_ports: description: - Ports to be updated on the monitoring policy. type: list elements: dict required: false + default: [] update_processes: description: - Processes to be updated on the monitoring policy. type: list elements: dict required: false + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_private_network.py b/plugins/modules/cloud/oneandone/oneandone_private_network.py index 36633716f7..a6db23310a 100644 --- a/plugins/modules/cloud/oneandone/oneandone_private_network.py +++ b/plugins/modules/cloud/oneandone/oneandone_private_network.py @@ -62,11 +62,13 @@ options: - List of server identifiers (name or id) to be added to the private network. type: list elements: str + default: [] remove_members: description: - List of server identifiers (name or id) to be removed from the private network. type: list elements: str + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index e8452f99eb..6b78406a6e 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -136,6 +136,7 @@ options: - URL of custom iPXE script for provisioning. - More about custom iPXE for Packet devices at U(https://help.packet.net/technical/infrastructure/custom-ipxe). type: str + default: '' always_pxe: description: diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index 42e6a1314b..cb41491464 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -38,6 +38,7 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str + default: [] datacenter: description: - The datacenter to provision this virtual machine. @@ -74,6 +75,7 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str + default: [] count: description: - The number of virtual machines to create. diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index a49948b4bf..2d449fd92a 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -50,7 +50,7 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str - required: false + default: [] disk_type: description: - The disk type of the volume. @@ -81,7 +81,7 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str - required: false + default: [] subscription_user: description: - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. diff --git a/plugins/modules/cloud/pubnub/pubnub_blocks.py b/plugins/modules/cloud/pubnub/pubnub_blocks.py index 8e9a56bdf5..9942c57134 100644 --- a/plugins/modules/cloud/pubnub/pubnub_blocks.py +++ b/plugins/modules/cloud/pubnub/pubnub_blocks.py @@ -37,6 +37,7 @@ options: same play)." required: false type: str + default: '' password: description: - Password which match to account to which specified C(email) belong. @@ -44,6 +45,7 @@ options: same play)." required: false type: str + default: '' cache: description: > In case if single play use blocks management module few times it is @@ -58,7 +60,7 @@ options: manage blocks." - "User's account will be used if value not set or empty." type: str - required: false + default: '' application: description: - "Name of target PubNub application for which blocks configuration on diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index 35f88dde81..b35384173a 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -82,17 +82,20 @@ options: default: false extra_client_args: type: dict + default: {} description: - A hash of key/value pairs to be used when creating the cloudservers client. This is considered an advanced option, use it wisely and with caution. extra_create_args: type: dict + default: {} description: - A hash of key/value pairs to be used when creating a new server. This is considered an advanced option, use it wisely and with caution. files: type: dict + default: {} description: - Files to insert into the instance. remotefilename:localcontent flavor: @@ -124,6 +127,7 @@ options: - keypair meta: type: dict + default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index cde1d98755..dd8bcefa35 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -26,6 +26,7 @@ options: C(name). This option requires C(pyrax>=1.9.3). meta: type: dict + default: {} description: - A hash of metadata to associate with the volume. name: diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/cloud/rackspace/rax_clb.py index 8e5db34e50..7d45c865f0 100644 --- a/plugins/modules/cloud/rackspace/rax_clb.py +++ b/plugins/modules/cloud/rackspace/rax_clb.py @@ -28,6 +28,7 @@ options: default: LEAST_CONNECTIONS meta: type: dict + default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/cloud/rackspace/rax_files.py index 6599c88d16..1c549827cc 100644 --- a/plugins/modules/cloud/rackspace/rax_files.py +++ b/plugins/modules/cloud/rackspace/rax_files.py @@ -27,6 +27,7 @@ options: - The container to use for container or metadata operations. meta: type: dict + default: {} description: - A hash of items to set as metadata values on a container private: diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index a7c36e6920..82bedffddb 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -38,6 +38,7 @@ options: - Used to set an expiration in seconds on an uploaded file or folder. meta: type: dict + default: {} description: - Items to set as metadata values on an uploaded file or folder. method: diff --git a/plugins/modules/cloud/rackspace/rax_meta.py b/plugins/modules/cloud/rackspace/rax_meta.py index 7937696f88..33acad365c 100644 --- a/plugins/modules/cloud/rackspace/rax_meta.py +++ b/plugins/modules/cloud/rackspace/rax_meta.py @@ -30,6 +30,7 @@ options: - Server name to modify metadata for meta: type: dict + default: {} description: - A hash of metadata to associate with the instance author: "Matt Martz (@sivel)" diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index adbd7e7600..c6259dab47 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -87,6 +87,7 @@ options: I(ip_addresses) hash to resolve an IP address to target. details: type: dict + default: {} description: - Additional details specific to the check type. Must be a hash of strings between 1 and 255 characters long, or an array or object containing 0 to @@ -98,6 +99,7 @@ options: default: false metadata: type: dict + default: {} description: - Hash of arbitrary key-value pairs to accompany this check if it fires. Keys and values must be strings between 1 and 255 characters long. diff --git a/plugins/modules/cloud/rackspace/rax_mon_entity.py b/plugins/modules/cloud/rackspace/rax_mon_entity.py index e8dabef69e..cc502496dc 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_entity.py +++ b/plugins/modules/cloud/rackspace/rax_mon_entity.py @@ -38,6 +38,7 @@ options: bound. Necessary to collect C(agent.) rax_mon_checks against this entity. named_ip_addresses: type: dict + default: {} description: - Hash of IP addresses that may be referenced by name by rax_mon_checks added to this entity. Must be a dictionary of with keys that are names @@ -45,6 +46,7 @@ options: addresses. metadata: type: dict + default: {} description: - Hash of arbitrary C(name), C(value) pairs that are passed to associated rax_mon_alarms. Names and values must all be between 1 and 255 characters diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/cloud/rackspace/rax_scaling_group.py index 6389f91a26..ef31cbb031 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_group.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_group.py @@ -37,6 +37,7 @@ options: - manual files: type: dict + default: {} description: - 'Files to insert into the instance. Hash of C(remotepath: localpath)' flavor: @@ -66,6 +67,7 @@ options: required: true meta: type: dict + default: {} description: - A hash of metadata to associate with the instance min_entities: diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry.py b/plugins/modules/cloud/scaleway/scaleway_container_registry.py index ed10ddf292..294be2cb4c 100644 --- a/plugins/modules/cloud/scaleway/scaleway_container_registry.py +++ b/plugins/modules/cloud/scaleway/scaleway_container_registry.py @@ -60,6 +60,7 @@ options: description: - Description of the container registry. type: str + default: '' privacy_policy: type: str diff --git a/plugins/modules/cloud/scaleway/scaleway_lb.py b/plugins/modules/cloud/scaleway/scaleway_lb.py index b323064012..124cba5945 100644 --- a/plugins/modules/cloud/scaleway/scaleway_lb.py +++ b/plugins/modules/cloud/scaleway/scaleway_lb.py @@ -66,6 +66,7 @@ options: tags: type: list elements: str + default: [] description: - List of tags to apply to the load-balancer diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/cloud/softlayer/sl_vm.py index 851f7a7f53..56b3ccdd39 100644 --- a/plugins/modules/cloud/softlayer/sl_vm.py +++ b/plugins/modules/cloud/softlayer/sl_vm.py @@ -143,6 +143,7 @@ options: - List of ssh keys by their Id to be assigned to a virtual instance. type: list elements: str + default: [] post_uri: description: - URL of a post provisioning script to be loaded and executed on virtual instance. diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py index 40d0270800..df2b8d84db 100644 --- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py +++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py @@ -503,6 +503,12 @@ options: Only works if wait_for_instances is True. type: int + do_not_update: + description: + - TODO document. + type: list + default: [] + ''' EXAMPLES = ''' # Basic configuration YAML example diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/cloud/univention/udm_dns_zone.py index 9b80368536..b75cbe95ac 100644 --- a/plugins/modules/cloud/univention/udm_dns_zone.py +++ b/plugins/modules/cloud/univention/udm_dns_zone.py @@ -43,11 +43,13 @@ options: nameserver: type: list elements: str + default: [] description: - List of appropriate name servers. Required if I(state=present). interfaces: type: list elements: str + default: [] description: - List of interface IP addresses, on which the server should response this zone. Required if I(state=present). diff --git a/plugins/modules/cloud/univention/udm_group.py b/plugins/modules/cloud/univention/udm_group.py index 034cdca1c3..74916cfee2 100644 --- a/plugins/modules/cloud/univention/udm_group.py +++ b/plugins/modules/cloud/univention/udm_group.py @@ -45,11 +45,13 @@ options: - define the whole ldap position of the group, e.g. C(cn=g123m-1A,cn=classes,cn=schueler,cn=groups,ou=schule,dc=example,dc=com). type: str + default: '' ou: required: false description: - LDAP OU, e.g. school for LDAP OU C(ou=school,dc=example,dc=com). type: str + default: '' subpath: required: false description: diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index 5fef1a337a..d5b26fbb28 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -169,6 +169,7 @@ options: description: - List of telephone numbers. type: list + default: [] postcode: description: - Postal code of users business address. @@ -200,11 +201,13 @@ options: join." aliases: [ sambaPrivileges ] type: list + default: [] samba_user_workstations: description: - Allow the authentication only on this Microsoft Windows host. aliases: [ sambaUserWorkstations ] type: list + default: [] sambahome: description: - Windows home path, e.g. C('\\$FQDN\$USERNAME'). diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/database/mssql/mssql_db.py index 7e64dcc2cc..a7d16b2710 100644 --- a/plugins/modules/database/mssql/mssql_db.py +++ b/plugins/modules/database/mssql/mssql_db.py @@ -27,10 +27,12 @@ options: description: - The username used to authenticate with type: str + default: '' login_password: description: - The password used to authenticate with type: str + default: '' login_host: description: - Host running the database diff --git a/plugins/modules/files/iso_customize.py b/plugins/modules/files/iso_customize.py index a6136cdd8f..c3a2ae2651 100644 --- a/plugins/modules/files/iso_customize.py +++ b/plugins/modules/files/iso_customize.py @@ -40,6 +40,7 @@ options: type: list required: false elements: str + default: [] add_files: description: - Allows to add and replace files in the ISO file. @@ -47,6 +48,7 @@ options: type: list required: false elements: dict + default: [] suboptions: src_file: description: diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index 05bbdf00c8..a35cc31ef0 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -40,6 +40,7 @@ options: - The namespace C(prefix:uri) mapping for the XPath expression. - Needs to be a C(dict), not a C(list) of items. type: dict + default: {} state: description: - Set or remove an xpath selection (node(s), attribute(s)). diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index 8118709b17..ddf8579cb1 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -86,7 +86,6 @@ options: description: - The secret key for your subdomain. - Only required for initial sign in. - default: {} required: false cli_path: type: path diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index 943a653249..07b7a060e1 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -53,14 +53,12 @@ options: elements: str description: - List of handlers to notify when the check fails - default: [] subscribers: type: list elements: str description: - List of subscribers/channels this check should run for - See sensu_subscribers to subscribe a machine to a channel - default: [] interval: type: int description: @@ -92,7 +90,6 @@ options: elements: str description: - Other checks this check depends on, if dependencies fail handling of this check will be disabled - default: [] metric: description: - Whether the check is a metric @@ -138,7 +135,6 @@ options: description: - A hash/dictionary of custom parameters for mixing to the configuration. - You can't rewrite others module parameters using this - default: {} source: type: str description: diff --git a/plugins/modules/monitoring/statsd.py b/plugins/modules/monitoring/statsd.py index 26c8e7c283..aed1c08397 100644 --- a/plugins/modules/monitoring/statsd.py +++ b/plugins/modules/monitoring/statsd.py @@ -62,6 +62,7 @@ options: type: str description: - The prefix to add to the metric. + default: '' value: type: int required: true diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/net_tools/dnsmadeeasy.py index ec9e9951cd..cb27a5a68a 100644 --- a/plugins/modules/net_tools/dnsmadeeasy.py +++ b/plugins/modules/net_tools/dnsmadeeasy.py @@ -127,7 +127,6 @@ options: description: - Name or id of the contact list that the monitor will notify. - The default C('') means the Account Owner. - default: '' type: str httpFqdn: diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/net_tools/infinity/infinity.py index 53fa7efd48..4b0e835209 100644 --- a/plugins/modules/net_tools/infinity/infinity.py +++ b/plugins/modules/net_tools/infinity/infinity.py @@ -42,27 +42,22 @@ options: description: - Network ID. type: str - default: '' ip_address: description: - IP Address for a reservation or a release. type: str - default: '' network_address: description: - Network address with CIDR format (e.g., 192.168.310.0). type: str - default: '' network_size: description: - Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26). type: str - default: '' network_name: description: - The name of a network. type: str - default: '' network_location: description: - The parent network id for a given network. diff --git a/plugins/modules/net_tools/ldap/ldap_entry.py b/plugins/modules/net_tools/ldap/ldap_entry.py index affdafeb6c..d15b31f6d3 100644 --- a/plugins/modules/net_tools/ldap/ldap_entry.py +++ b/plugins/modules/net_tools/ldap/ldap_entry.py @@ -37,6 +37,7 @@ options: entries are never modified. To assert specific attribute values on an existing entry, use M(community.general.ldap_attrs) module instead. type: dict + default: {} objectClass: description: - If I(state=present), value or list of values to use when creating diff --git a/plugins/modules/notification/mail.py b/plugins/modules/notification/mail.py index 697ed49ee7..9d01fc59a7 100644 --- a/plugins/modules/notification/mail.py +++ b/plugins/modules/notification/mail.py @@ -49,12 +49,14 @@ options: - This is a list, which may contain address and phrase portions. type: list elements: str + default: [] bcc: description: - The email-address(es) the mail is being 'blind' copied to. - This is a list, which may contain address and phrase portions. type: list elements: str + default: [] subject: description: - The subject of the email being sent. diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 64310c760e..34a15edda5 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -31,6 +31,7 @@ options: type: str description: - Composer arguments like required package, version and so on. + default: '' executable: type: path description: diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index b909f509a4..754c2392ba 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -51,6 +51,7 @@ options: type: str description: - The maven classifier coordinate + default: '' extension: type: str description: diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/packaging/os/opkg.py index f7f3e6ab27..60d2adc958 100644 --- a/plugins/modules/packaging/os/opkg.py +++ b/plugins/modules/packaging/os/opkg.py @@ -47,6 +47,7 @@ options: - "remove" - "checksum" - "removal-of-dependent-packages" + default: "" type: str update_cache: description: diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index c8d6caebe5..1066f10e88 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -73,7 +73,7 @@ options: extra_args: description: - Additional option to pass to pacman when enforcing C(state). - default: + default: '' type: str update_cache: @@ -89,7 +89,7 @@ options: update_cache_extra_args: description: - Additional option to pass to pacman when enforcing C(update_cache). - default: + default: '' type: str upgrade: @@ -102,7 +102,7 @@ options: upgrade_extra_args: description: - Additional option to pass to pacman when enforcing C(upgrade). - default: + default: '' type: str reason: diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index 26b7d9df2a..69aa550c5d 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -152,7 +152,6 @@ options: When some attribute is not listed in the new list of attributes, the existing attribute will be removed from C(syspurpose.json) file. Unknown attributes are ignored. type: dict - default: {} suboptions: usage: description: Syspurpose attribute usage diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index 23070ad3b3..bd16da1f52 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -76,6 +76,7 @@ options: - especially useful for SCM and rsync grimoires - makes sense only in pair with C(update_cache) type: int + default: 0 ''' diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index 8a213d85ff..4fb0dfe178 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -70,6 +70,7 @@ options: - The list of media types appropriate for the image. type: list elements: str + default: [] image_url: description: - The URL of the image to insert or eject. diff --git a/plugins/modules/remote_management/manageiq/manageiq_tenant.py b/plugins/modules/remote_management/manageiq/manageiq_tenant.py index f696934b2f..0f4473092b 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tenant.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tenant.py @@ -65,7 +65,7 @@ options: - ' - C(vms_allocated) (int): use null to remove the quota.' - ' - C(templates_allocated) (int): use null to remove the quota.' required: false - default: null + default: {} ''' EXAMPLES = ''' diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 4ab519f5a4..43443cf38e 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -116,6 +116,7 @@ options: description: - Properties of account service to update. type: dict + default: {} version_added: '0.2.0' resource_id: required: false @@ -141,6 +142,7 @@ options: - List of target resource URIs to apply the update to. type: list elements: str + default: [] version_added: '0.2.0' update_creds: required: false @@ -172,6 +174,7 @@ options: - List of media types appropriate for the image. type: list elements: str + default: [] image_url: required: false description: diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 0e7d1537bf..07ac2e1588 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -72,6 +72,7 @@ options: description: - Setting dict of manager services to update. type: dict + default: {} version_added: '0.2.0' resource_id: required: false @@ -91,6 +92,7 @@ options: description: - Setting dict of EthernetInterface on OOB controller. type: dict + default: {} version_added: '0.2.0' strip_etag_quotes: description: @@ -106,6 +108,7 @@ options: description: - Setting dict of HostInterface on OOB controller. type: dict + default: {} version_added: '4.1.0' hostinterface_id: required: false @@ -118,6 +121,7 @@ options: description: - Setting dict of Sessions. type: dict + default: {} version_added: '5.7.0' author: "Jose Delarosa (@jose-delarosa)" diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/remote_management/stacki/stacki_host.py index 2e339bf280..d5f968c909 100644 --- a/plugins/modules/remote_management/stacki/stacki_host.py +++ b/plugins/modules/remote_management/stacki/stacki_host.py @@ -74,12 +74,14 @@ options: - Rack to be used in host creation. - Required if I(state) is C(present) and host does not yet exist. type: int + default: 0 rank: description: - Rank to be used in host creation. - In Stacki terminology, the rank is the position of the machine in a rack. - Required if I(state) is C(present) and host does not yet exist. type: int + default: 0 network: description: - Network to be configured in the host. diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index f69ed8f4e1..c10cb45324 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -55,6 +55,7 @@ options: - Branch name of wildcard to trigger hook on push events type: str version_added: '0.2.0' + default: '' issues_events: description: - Trigger hook on issues events. diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index a09a386f41..84e5c05b1f 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -38,6 +38,7 @@ options: - A dictionary of zfs properties to be set. - See the zfs(8) man page for more information. type: dict + default: {} notes: - C(check_mode) is supported, but in certain situations it may report a task as changed that will not be reported as changed when C(check_mode) is disabled. diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index ee0884f995..15eef706e5 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -52,6 +52,7 @@ options: description: - Specifies recursion depth. type: int + default: 0 ''' EXAMPLES = ''' diff --git a/plugins/modules/system/aix_lvol.py b/plugins/modules/system/aix_lvol.py index 99bd3ead9b..6219bdb8e3 100644 --- a/plugins/modules/system/aix_lvol.py +++ b/plugins/modules/system/aix_lvol.py @@ -62,11 +62,13 @@ options: description: - Free-form options to be passed to the mklv command. type: str + default: '' pvs: description: - A list of physical volumes e.g. C(hdisk1,hdisk2). type: list elements: str + default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index a78d71155a..1d1327ed71 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -56,7 +56,6 @@ options: description: - Password for importing from PKCS12 keystore. type: str - default: '' pkcs12_alias: description: - Alias in the PKCS12 keystore. diff --git a/plugins/modules/system/lvg.py b/plugins/modules/system/lvg.py index 0bb91583fa..ca38565f4a 100644 --- a/plugins/modules/system/lvg.py +++ b/plugins/modules/system/lvg.py @@ -42,6 +42,7 @@ options: description: - Additional options to pass to C(pvcreate) when creating the volume group. type: str + default: '' pvresize: description: - If C(true), resize the physical volume to the maximum available size. @@ -52,6 +53,7 @@ options: description: - Additional options to pass to C(vgcreate) when creating the volume group. type: str + default: '' state: description: - Control if the volume group exists. diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/system/selinux_permissive.py index 2578519909..3563775d14 100644 --- a/plugins/modules/system/selinux_permissive.py +++ b/plugins/modules/system/selinux_permissive.py @@ -38,6 +38,7 @@ options: description: - Name of the SELinux policy store to use. type: str + default: '' notes: - Requires a recent version of SELinux and C(policycoreutils-python) (EL 6 or newer). requirements: [ policycoreutils-python ] diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index 979dd6d69c..3b006a55bb 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -161,6 +161,7 @@ options: and the JIRA REST API for the structure required for various fields. - When passed to comment, the data structure is merged at the first level since community.general 4.6.0. Useful to add JIRA properties for example. - Note that JIRA may not allow changing field values on specific transitions or states. + default: {} jql: required: false diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py index 7d55449f63..cff1834c93 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py @@ -33,10 +33,12 @@ options: - List of adirectory group strings. type: list elements: str + default: [] adirectory_groups_sids: description: - Dictionary of group sids. type: dict + default: {} backend_match: description: - The backend for the group. @@ -68,18 +70,22 @@ options: - List of edirectory group strings. type: list elements: str + default: [] ipsec_dn: description: - The ipsec dn string. type: str + default: '' ldap_attribute: description: - The ldap attribute to check against. type: str + default: '' ldap_attribute_value: description: - The ldap attribute value to check against. type: str + default: '' members: description: - A list of user ref names (aaa/user). diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py index 387b8301a0..af91e2433b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py @@ -42,6 +42,7 @@ options: type: str description: - An optional comment to add to the dns host object + default: '' hostname: type: str description: @@ -50,6 +51,7 @@ options: type: str description: - The reference name of the interface to use. If not provided the default interface will be used + default: '' resolved: description: - whether the hostname's ipv4 address is already resolved or not diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py index cb10ad49f4..e980a0221b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py @@ -42,6 +42,7 @@ options: type: str description: - An optional comment to add to the object + default: '' resolved: type: bool description: diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 5864cf1924..c6ff1bd26b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -48,6 +48,7 @@ options: type: str description: - The reference name of the auth profile + default: '' backend: type: list elements: str @@ -58,10 +59,12 @@ options: type: str description: - The path of the backend + default: '' comment: type: str description: - The optional comment string + default: '' denied_networks: type: list elements: str diff --git a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml index c701e199ae..a94529e460 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml @@ -5,7 +5,7 @@ - name: Create a password ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass', length=8, create=true, backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -18,7 +18,7 @@ - name: Create a password with equal sign ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=true', backend=backend) }}" - name: Fetch a password with equal sign ({{ backend }}) set_fact: @@ -31,7 +31,7 @@ - name: Create a password using missing=create ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=create length=8', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='create', length=8, backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -44,7 +44,7 @@ - name: Fetch password from existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=empty', backend=backend) }}" + readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -53,7 +53,7 @@ - name: Fetch password from non-existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ query('community.general.passwordstore', 'test-missing-pass missing=empty', backend=backend) }}" + readpass: "{{ query('community.general.passwordstore', 'test-missing-pass', missing='empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -71,7 +71,7 @@ - name: Fetch a password with YAML subkey ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass subkey=key', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass', subkey='key', backend=backend) }}" - name: Read a yaml subkey ({{ backend }}) assert: @@ -96,7 +96,7 @@ - name: Fetch all from multiline file ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass returnall=yes', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', returnall='yes', backend=backend) }}" - name: Multiline pass returnall returns everything in the file ({{ backend }}) assert: @@ -105,7 +105,7 @@ - name: Create a password in a folder ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass length=8 create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', length=8, create=true, backend=backend) }}" - name: Fetch password from folder ({{ backend }}) set_fact: diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index a18b58d651..583aafd108 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -125,7 +125,9 @@ that: - eval_error is failed - >- - "Passwordstore directory 'somenonexistentplace' does not exist" in eval_error.msg + "Passwordstore directory '" in eval_error.msg + - >- + "/somenonexistentplace' does not exist" in eval_error.msg - name: Test pass compatibility shim detection block: From 5f4e59311687656af03ab0059b64353e353afd79 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 1 Nov 2022 19:12:21 +0100 Subject: [PATCH 0280/2104] Revert "Fix non-matching defaults in docs (#5446)" This reverts commit a978bff2c72abcd7e395c868492df37566505daa. --- .../fragments/5444-passwordstore-options.yml | 2 - plugins/doc_fragments/influxdb.py | 2 - plugins/doc_fragments/ldap.py | 1 - plugins/doc_fragments/utm.py | 1 - plugins/lookup/passwordstore.py | 74 +++++++++---------- .../modules/cloud/atomic/atomic_container.py | 1 - .../cloud/dimensiondata/dimensiondata_vlan.py | 3 - .../modules/cloud/huawei/hwc_ecs_instance.py | 1 - plugins/modules/cloud/huawei/hwc_evs_disk.py | 1 - .../modules/cloud/huawei/hwc_network_vpc.py | 1 - plugins/modules/cloud/huawei/hwc_vpc_eip.py | 1 - .../cloud/huawei/hwc_vpc_peering_connect.py | 1 - plugins/modules/cloud/huawei/hwc_vpc_port.py | 1 - .../modules/cloud/huawei/hwc_vpc_subnet.py | 1 - plugins/modules/cloud/linode/linode.py | 1 - plugins/modules/cloud/memset/memset_zone.py | 1 - .../cloud/memset/memset_zone_record.py | 3 - plugins/modules/cloud/misc/rhevm.py | 1 - plugins/modules/cloud/misc/serverless.py | 2 - plugins/modules/cloud/misc/terraform.py | 1 - .../oneandone/oneandone_firewall_policy.py | 5 -- .../oneandone/oneandone_load_balancer.py | 5 -- .../oneandone/oneandone_monitoring_policy.py | 11 --- .../oneandone/oneandone_private_network.py | 2 - plugins/modules/cloud/packet/packet_device.py | 1 - .../cloud/profitbricks/profitbricks.py | 2 - .../cloud/profitbricks/profitbricks_volume.py | 4 +- plugins/modules/cloud/pubnub/pubnub_blocks.py | 4 +- plugins/modules/cloud/rackspace/rax.py | 4 - plugins/modules/cloud/rackspace/rax_cbs.py | 1 - plugins/modules/cloud/rackspace/rax_clb.py | 1 - plugins/modules/cloud/rackspace/rax_files.py | 1 - .../cloud/rackspace/rax_files_objects.py | 1 - plugins/modules/cloud/rackspace/rax_meta.py | 1 - .../modules/cloud/rackspace/rax_mon_check.py | 2 - .../modules/cloud/rackspace/rax_mon_entity.py | 2 - .../cloud/rackspace/rax_scaling_group.py | 2 - .../scaleway/scaleway_container_registry.py | 1 - plugins/modules/cloud/scaleway/scaleway_lb.py | 1 - plugins/modules/cloud/softlayer/sl_vm.py | 1 - .../spotinst/spotinst_aws_elastigroup.py | 6 -- .../modules/cloud/univention/udm_dns_zone.py | 2 - plugins/modules/cloud/univention/udm_group.py | 2 - plugins/modules/cloud/univention/udm_user.py | 3 - plugins/modules/database/mssql/mssql_db.py | 2 - plugins/modules/files/iso_customize.py | 2 - plugins/modules/files/xml.py | 1 - plugins/modules/identity/onepassword_info.py | 1 + .../modules/monitoring/sensu/sensu_check.py | 4 + plugins/modules/monitoring/statsd.py | 1 - plugins/modules/net_tools/dnsmadeeasy.py | 1 + .../modules/net_tools/infinity/infinity.py | 5 ++ plugins/modules/net_tools/ldap/ldap_entry.py | 1 - plugins/modules/notification/mail.py | 2 - .../modules/packaging/language/composer.py | 1 - .../packaging/language/maven_artifact.py | 1 - plugins/modules/packaging/os/opkg.py | 1 - plugins/modules/packaging/os/pacman.py | 6 +- .../packaging/os/redhat_subscription.py | 1 + plugins/modules/packaging/os/sorcery.py | 1 - .../lenovoxcc/xcc_redfish_command.py | 1 - .../manageiq/manageiq_tenant.py | 2 +- .../redfish/redfish_command.py | 3 - .../redfish/redfish_config.py | 4 - .../remote_management/stacki/stacki_host.py | 2 - .../source_control/gitlab/gitlab_hook.py | 1 - plugins/modules/storage/zfs/zfs.py | 1 - plugins/modules/storage/zfs/zfs_facts.py | 1 - plugins/modules/system/aix_lvol.py | 2 - plugins/modules/system/java_cert.py | 1 + plugins/modules/system/lvg.py | 2 - plugins/modules/system/selinux_permissive.py | 1 - plugins/modules/web_infrastructure/jira.py | 1 - .../sophos_utm/utm_aaa_group.py | 6 -- .../sophos_utm/utm_dns_host.py | 2 - .../utm_network_interface_address.py | 1 - .../sophos_utm/utm_proxy_location.py | 3 - .../tasks/password_tests.yml | 16 ++-- .../lookup_passwordstore/tasks/tests.yml | 4 +- 79 files changed, 63 insertions(+), 187 deletions(-) delete mode 100644 changelogs/fragments/5444-passwordstore-options.yml diff --git a/changelogs/fragments/5444-passwordstore-options.yml b/changelogs/fragments/5444-passwordstore-options.yml deleted file mode 100644 index a25c9a2fef..0000000000 --- a/changelogs/fragments/5444-passwordstore-options.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "passwordstore lookup plugin - allow options to be passed lookup options instead of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444)." diff --git a/plugins/doc_fragments/influxdb.py b/plugins/doc_fragments/influxdb.py index 6aedd5ad39..f9e08550bd 100644 --- a/plugins/doc_fragments/influxdb.py +++ b/plugins/doc_fragments/influxdb.py @@ -43,7 +43,6 @@ options: - The path on which InfluxDB server is accessible - Only available when using python-influxdb >= 5.1.0 type: str - default: '' version_added: '0.2.0' validate_certs: description: @@ -81,5 +80,4 @@ options: description: - HTTP(S) proxy to use for Requests to connect to InfluxDB server. type: dict - default: {} ''' diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index c73e5080be..28e9d2fdae 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -23,7 +23,6 @@ options: description: - The password to use with I(bind_dn). type: str - default: '' dn: required: true description: diff --git a/plugins/doc_fragments/utm.py b/plugins/doc_fragments/utm.py index 73ad805035..d8b2305d23 100644 --- a/plugins/doc_fragments/utm.py +++ b/plugins/doc_fragments/utm.py @@ -17,7 +17,6 @@ options: - Is needed for some modules type: dict required: false - default: {} utm_host: description: - The REST Endpoint of the Sophos UTM. diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 1106bbc473..ce1f4ee852 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -21,15 +21,17 @@ DOCUMENTATION = ''' _terms: description: query key. required: true - directory: + passwordstore: description: - - The directory of the password store. - - If I(backend=pass), the default is C(~/.password-store) is used. - - If I(backend=gopass), then the default is the C(path) field in C(~/.config/gopass/config.yml), - falling back to C(~/.local/share/gopass/stores/root) if C(path) is not defined in the gopass config. - type: path - vars: - - name: passwordstore + - Location of the password store. + - 'The value is decided by checking the following in order:' + - If set, this value is used. + - If C(directory) is set, that value will be used. + - If I(backend=pass), then C(~/.password-store) is used. + - If I(backend=gopass), then the C(path) field in C(~/.config/gopass/config.yml) is used, + falling back to C(~/.local/share/gopass/stores/root) if not defined. + directory: + description: The directory of the password store. env: - name: PASSWORD_STORE_DIR create: @@ -53,11 +55,9 @@ DOCUMENTATION = ''' default: false subkey: description: Return a specific subkey of the password. When set to C(password), always returns the first line. - type: str default: password userpass: description: Specify a password to save, instead of a generated one. - type: str length: description: The length of the generated password. type: integer @@ -67,7 +67,7 @@ DOCUMENTATION = ''' type: bool default: false nosymbols: - description: Use alphanumeric characters. + description: use alphanumeric characters. type: bool default: false missing: @@ -129,8 +129,6 @@ DOCUMENTATION = ''' - pass - gopass version_added: 5.2.0 - notes: - - The lookup supports passing all options as lookup parameters since community.general 6.0.0. ''' EXAMPLES = """ ansible.cfg: | @@ -138,7 +136,7 @@ ansible.cfg: | lock=readwrite locktimeout=45s -tasks.yml: | +playbook.yml: | --- # Debug is used for examples, BAD IDEA to show passwords on screen @@ -148,49 +146,45 @@ tasks.yml: | - name: Basic lookup. Warns if example/test does not exist and returns empty string ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test', missing='warn')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test missing=warn')}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test', create=true)}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test create=true')}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test', missing='create')}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=create')}}" - name: Prints 'abc' if example/test does not exist, just give the password otherwise ansible.builtin.debug: var: mypassword vars: - mypassword: >- - {{ lookup('community.general.passwordstore', 'example/test', missing='empty') - | default('abc', true) }} + mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=empty') | default('abc', true) }}" - name: Different size password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, length=42)}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test create=true length=42')}}" - - name: >- - Create password and overwrite the password if it exists. - As a bonus, this module includes the old password inside the pass file + - name: Create password and overwrite the password if it exists. As a bonus, this module includes the old password inside the pass file ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, overwrite=true)}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test create=true overwrite=true')}}" - name: Create an alphanumeric password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, nosymbols=true) }}" + msg: "{{ lookup('community.general.passwordstore', 'example/test create=true nosymbols=true') }}" - name: Return the value for user in the KV pair user, username ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test', subkey='user')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test subkey=user')}}" - name: Return the entire password file content ansible.builtin.set_fact: - passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test', returnall=true)}}" + passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test returnall=true')}}" """ RETURN = """ @@ -326,7 +320,7 @@ class LookupModule(LookupBase): raise AnsibleError('Passwordstore directory \'{0}\' does not exist'.format(self.paramvals['directory'])) # Set PASSWORD_STORE_UMASK if umask is set - if self.paramvals.get('umask') is not None: + if 'umask' in self.paramvals: if len(self.paramvals['umask']) != 3: raise AnsibleError('Passwordstore umask must have a length of 3.') elif int(self.paramvals['umask'][0]) > 3: @@ -441,7 +435,8 @@ class LookupModule(LookupBase): unit_to_seconds = {"s": 1, "m": 60, "h": 3600} self.lock_timeout = int(timeout[:-1]) * unit_to_seconds[timeout[-1]] - directory = self.get_option('directory') + directory = variables.get('passwordstore', os.environ.get('PASSWORD_STORE_DIR', None)) + if directory is None: if self.backend == 'gopass': try: @@ -453,17 +448,16 @@ class LookupModule(LookupBase): directory = os.path.expanduser('~/.password-store') self.paramvals = { - 'subkey': self.get_option('subkey'), + 'subkey': 'password', 'directory': directory, - 'create': self.get_option('create'), - 'returnall': self.get_option('returnall'), - 'overwrite': self.get_option('overwrite'), - 'nosymbols': self.get_option('nosymbols'), - 'userpass': self.get_option('userpass') or '', - 'length': self.get_option('length'), - 'backup': self.get_option('backup'), - 'missing': self.get_option('missing'), - 'umask': self.get_option('umask'), + 'create': False, + 'returnall': False, + 'overwrite': False, + 'nosymbols': False, + 'userpass': '', + 'length': 16, + 'backup': False, + 'missing': 'error', } def run(self, terms, variables, **kwargs): diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index c32e617a22..586b1254c2 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -61,7 +61,6 @@ options: - The values specified here will be used at installation time as --set arguments for atomic install. type: list elements: str - default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py index ca25374dcb..b06566b8e6 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py @@ -31,7 +31,6 @@ options: description: - A description of the VLAN. type: str - default: '' network_domain: description: - The Id or name of the target network domain. @@ -41,13 +40,11 @@ options: description: - The base address for the VLAN's IPv4 network (e.g. 192.168.1.0). type: str - default: '' private_ipv4_prefix_size: description: - The size of the IPv4 address space, e.g 24. - Required, if C(private_ipv4_base_address) is specified. type: int - default: 0 state: description: - The desired state for the target VLAN. diff --git a/plugins/modules/cloud/huawei/hwc_ecs_instance.py b/plugins/modules/cloud/huawei/hwc_ecs_instance.py index 10d913f9b5..8026c0f2f6 100644 --- a/plugins/modules/cloud/huawei/hwc_ecs_instance.py +++ b/plugins/modules/cloud/huawei/hwc_ecs_instance.py @@ -33,7 +33,6 @@ options: description: - The timeouts for each operations. type: dict - default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_evs_disk.py b/plugins/modules/cloud/huawei/hwc_evs_disk.py index 7b5a99fb7f..e319821c9f 100644 --- a/plugins/modules/cloud/huawei/hwc_evs_disk.py +++ b/plugins/modules/cloud/huawei/hwc_evs_disk.py @@ -33,7 +33,6 @@ options: description: - The timeouts for each operations. type: dict - default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_network_vpc.py b/plugins/modules/cloud/huawei/hwc_network_vpc.py index 78f5925e0c..2f08f20313 100644 --- a/plugins/modules/cloud/huawei/hwc_network_vpc.py +++ b/plugins/modules/cloud/huawei/hwc_network_vpc.py @@ -33,7 +33,6 @@ options: description: - The timeouts for each operations. type: dict - default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_eip.py b/plugins/modules/cloud/huawei/hwc_vpc_eip.py index e14fb0e502..a86338052e 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_eip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_eip.py @@ -33,7 +33,6 @@ options: description: - The timeouts for each operations. type: dict - default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py index 01c52932ba..89955d2091 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py @@ -34,7 +34,6 @@ options: description: - The timeouts for each operations. type: dict - default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_port.py b/plugins/modules/cloud/huawei/hwc_vpc_port.py index aac9636f88..dadc76c064 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_port.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_port.py @@ -33,7 +33,6 @@ options: description: - The timeouts for each operations. type: dict - default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py index 4b192a5682..d38150dfc3 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py @@ -33,7 +33,6 @@ options: description: - The timeouts for each operations. type: dict - default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index 5304ed3d89..c19770dc41 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -37,7 +37,6 @@ options: description: - Add the instance to a Display Group in Linode Manager. type: str - default: '' linode_id: description: - Unique ID of a linode server. This value is read-only in the sense that diff --git a/plugins/modules/cloud/memset/memset_zone.py b/plugins/modules/cloud/memset/memset_zone.py index 9731e3a943..f402e0e0f4 100644 --- a/plugins/modules/cloud/memset/memset_zone.py +++ b/plugins/modules/cloud/memset/memset_zone.py @@ -44,7 +44,6 @@ options: - The default TTL for all records created in the zone. This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create). type: int - default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] force: required: false diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/cloud/memset/memset_zone_record.py index c114532f90..5082475176 100644 --- a/plugins/modules/cloud/memset/memset_zone_record.py +++ b/plugins/modules/cloud/memset/memset_zone_record.py @@ -44,13 +44,11 @@ options: description: - C(SRV) and C(TXT) record priority, in the range 0 > 999 (inclusive). type: int - default: 0 record: required: false description: - The subdomain to create. type: str - default: '' type: required: true description: @@ -67,7 +65,6 @@ options: description: - The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create). - default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] type: int zone: diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 994f737093..2542511bea 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -54,7 +54,6 @@ options: description: - The RHEV/oVirt cluster in which you want you VM to start. type: str - default: '' datacenter: description: - The RHEV/oVirt datacenter in which you want you VM to start. diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index 4d36ba679a..2819adae59 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -35,13 +35,11 @@ options: - The name of the serverless framework project stage to deploy to. - This uses the serverless framework default "dev". type: str - default: '' region: description: - AWS region to deploy the service to. - This parameter defaults to C(us-east-1). type: str - default: '' deploy: description: - Whether or not to deploy artifacts after building them. diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index 615c125cf3..7b6fbc5126 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -105,7 +105,6 @@ options: resources selected here will also auto-include any dependencies. type: list elements: str - default: [] lock: description: - Enable statefile locking, if you use a service that accepts locks (such diff --git a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py index 23203e8d05..9d9f042f2b 100644 --- a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py @@ -48,7 +48,6 @@ options: (port_from, port_to, and source) type: list elements: dict - default: [] add_server_ips: description: - A list of server identifiers (id or name) to be assigned to a firewall policy. @@ -56,14 +55,12 @@ options: type: list elements: str required: false - default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state. type: list elements: str required: false - default: [] add_rules: description: - A list of rules that will be added to an existing firewall policy. @@ -71,14 +68,12 @@ options: type: list elements: dict required: false - default: [] remove_rules: description: - A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state. type: list elements: str required: false - default: [] description: description: - Firewall policy description. maxLength=256 diff --git a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py index 04aefde63a..3407e264ad 100644 --- a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py +++ b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py @@ -86,7 +86,6 @@ options: port_balancer, and port_server parameters, in addition to source parameter, which is optional. type: list elements: dict - default: [] description: description: - Description of the load balancer. maxLength=256 @@ -99,14 +98,12 @@ options: type: list elements: str required: false - default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a load balancer. Used in combination with update state. type: list elements: str required: false - default: [] add_rules: description: - A list of rules that will be added to an existing load balancer. @@ -114,14 +111,12 @@ options: type: list elements: dict required: false - default: [] remove_rules: description: - A list of rule ids that will be removed from an existing load balancer. Used in combination with update state. type: list elements: str required: false - default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py index 46c68e86e0..cd9ee40ca2 100644 --- a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py @@ -62,7 +62,6 @@ options: and value is used to advise when the value is exceeded. type: list elements: dict - default: [] suboptions: cpu: description: @@ -89,7 +88,6 @@ options: - Array of ports that will be monitoring. type: list elements: dict - default: [] suboptions: protocol: description: @@ -114,7 +112,6 @@ options: - Array of processes that will be monitoring. type: list elements: dict - default: [] suboptions: process: description: @@ -131,56 +128,48 @@ options: type: list elements: dict required: false - default: [] add_processes: description: - Processes to add to the monitoring policy. type: list elements: dict required: false - default: [] add_servers: description: - Servers to add to the monitoring policy. type: list elements: str required: false - default: [] remove_ports: description: - Ports to remove from the monitoring policy. type: list elements: str required: false - default: [] remove_processes: description: - Processes to remove from the monitoring policy. type: list elements: str required: false - default: [] remove_servers: description: - Servers to remove from the monitoring policy. type: list elements: str required: false - default: [] update_ports: description: - Ports to be updated on the monitoring policy. type: list elements: dict required: false - default: [] update_processes: description: - Processes to be updated on the monitoring policy. type: list elements: dict required: false - default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_private_network.py b/plugins/modules/cloud/oneandone/oneandone_private_network.py index a6db23310a..36633716f7 100644 --- a/plugins/modules/cloud/oneandone/oneandone_private_network.py +++ b/plugins/modules/cloud/oneandone/oneandone_private_network.py @@ -62,13 +62,11 @@ options: - List of server identifiers (name or id) to be added to the private network. type: list elements: str - default: [] remove_members: description: - List of server identifiers (name or id) to be removed from the private network. type: list elements: str - default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index 6b78406a6e..e8452f99eb 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -136,7 +136,6 @@ options: - URL of custom iPXE script for provisioning. - More about custom iPXE for Packet devices at U(https://help.packet.net/technical/infrastructure/custom-ipxe). type: str - default: '' always_pxe: description: diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index cb41491464..42e6a1314b 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -38,7 +38,6 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str - default: [] datacenter: description: - The datacenter to provision this virtual machine. @@ -75,7 +74,6 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str - default: [] count: description: - The number of virtual machines to create. diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index 2d449fd92a..a49948b4bf 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -50,7 +50,7 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str - default: [] + required: false disk_type: description: - The disk type of the volume. @@ -81,7 +81,7 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str - default: [] + required: false subscription_user: description: - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. diff --git a/plugins/modules/cloud/pubnub/pubnub_blocks.py b/plugins/modules/cloud/pubnub/pubnub_blocks.py index 9942c57134..8e9a56bdf5 100644 --- a/plugins/modules/cloud/pubnub/pubnub_blocks.py +++ b/plugins/modules/cloud/pubnub/pubnub_blocks.py @@ -37,7 +37,6 @@ options: same play)." required: false type: str - default: '' password: description: - Password which match to account to which specified C(email) belong. @@ -45,7 +44,6 @@ options: same play)." required: false type: str - default: '' cache: description: > In case if single play use blocks management module few times it is @@ -60,7 +58,7 @@ options: manage blocks." - "User's account will be used if value not set or empty." type: str - default: '' + required: false application: description: - "Name of target PubNub application for which blocks configuration on diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index b35384173a..35f88dde81 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -82,20 +82,17 @@ options: default: false extra_client_args: type: dict - default: {} description: - A hash of key/value pairs to be used when creating the cloudservers client. This is considered an advanced option, use it wisely and with caution. extra_create_args: type: dict - default: {} description: - A hash of key/value pairs to be used when creating a new server. This is considered an advanced option, use it wisely and with caution. files: type: dict - default: {} description: - Files to insert into the instance. remotefilename:localcontent flavor: @@ -127,7 +124,6 @@ options: - keypair meta: type: dict - default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index dd8bcefa35..cde1d98755 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -26,7 +26,6 @@ options: C(name). This option requires C(pyrax>=1.9.3). meta: type: dict - default: {} description: - A hash of metadata to associate with the volume. name: diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/cloud/rackspace/rax_clb.py index 7d45c865f0..8e5db34e50 100644 --- a/plugins/modules/cloud/rackspace/rax_clb.py +++ b/plugins/modules/cloud/rackspace/rax_clb.py @@ -28,7 +28,6 @@ options: default: LEAST_CONNECTIONS meta: type: dict - default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/cloud/rackspace/rax_files.py index 1c549827cc..6599c88d16 100644 --- a/plugins/modules/cloud/rackspace/rax_files.py +++ b/plugins/modules/cloud/rackspace/rax_files.py @@ -27,7 +27,6 @@ options: - The container to use for container or metadata operations. meta: type: dict - default: {} description: - A hash of items to set as metadata values on a container private: diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index 82bedffddb..a7c36e6920 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -38,7 +38,6 @@ options: - Used to set an expiration in seconds on an uploaded file or folder. meta: type: dict - default: {} description: - Items to set as metadata values on an uploaded file or folder. method: diff --git a/plugins/modules/cloud/rackspace/rax_meta.py b/plugins/modules/cloud/rackspace/rax_meta.py index 33acad365c..7937696f88 100644 --- a/plugins/modules/cloud/rackspace/rax_meta.py +++ b/plugins/modules/cloud/rackspace/rax_meta.py @@ -30,7 +30,6 @@ options: - Server name to modify metadata for meta: type: dict - default: {} description: - A hash of metadata to associate with the instance author: "Matt Martz (@sivel)" diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index c6259dab47..adbd7e7600 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -87,7 +87,6 @@ options: I(ip_addresses) hash to resolve an IP address to target. details: type: dict - default: {} description: - Additional details specific to the check type. Must be a hash of strings between 1 and 255 characters long, or an array or object containing 0 to @@ -99,7 +98,6 @@ options: default: false metadata: type: dict - default: {} description: - Hash of arbitrary key-value pairs to accompany this check if it fires. Keys and values must be strings between 1 and 255 characters long. diff --git a/plugins/modules/cloud/rackspace/rax_mon_entity.py b/plugins/modules/cloud/rackspace/rax_mon_entity.py index cc502496dc..e8dabef69e 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_entity.py +++ b/plugins/modules/cloud/rackspace/rax_mon_entity.py @@ -38,7 +38,6 @@ options: bound. Necessary to collect C(agent.) rax_mon_checks against this entity. named_ip_addresses: type: dict - default: {} description: - Hash of IP addresses that may be referenced by name by rax_mon_checks added to this entity. Must be a dictionary of with keys that are names @@ -46,7 +45,6 @@ options: addresses. metadata: type: dict - default: {} description: - Hash of arbitrary C(name), C(value) pairs that are passed to associated rax_mon_alarms. Names and values must all be between 1 and 255 characters diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/cloud/rackspace/rax_scaling_group.py index ef31cbb031..6389f91a26 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_group.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_group.py @@ -37,7 +37,6 @@ options: - manual files: type: dict - default: {} description: - 'Files to insert into the instance. Hash of C(remotepath: localpath)' flavor: @@ -67,7 +66,6 @@ options: required: true meta: type: dict - default: {} description: - A hash of metadata to associate with the instance min_entities: diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry.py b/plugins/modules/cloud/scaleway/scaleway_container_registry.py index 294be2cb4c..ed10ddf292 100644 --- a/plugins/modules/cloud/scaleway/scaleway_container_registry.py +++ b/plugins/modules/cloud/scaleway/scaleway_container_registry.py @@ -60,7 +60,6 @@ options: description: - Description of the container registry. type: str - default: '' privacy_policy: type: str diff --git a/plugins/modules/cloud/scaleway/scaleway_lb.py b/plugins/modules/cloud/scaleway/scaleway_lb.py index 124cba5945..b323064012 100644 --- a/plugins/modules/cloud/scaleway/scaleway_lb.py +++ b/plugins/modules/cloud/scaleway/scaleway_lb.py @@ -66,7 +66,6 @@ options: tags: type: list elements: str - default: [] description: - List of tags to apply to the load-balancer diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/cloud/softlayer/sl_vm.py index 56b3ccdd39..851f7a7f53 100644 --- a/plugins/modules/cloud/softlayer/sl_vm.py +++ b/plugins/modules/cloud/softlayer/sl_vm.py @@ -143,7 +143,6 @@ options: - List of ssh keys by their Id to be assigned to a virtual instance. type: list elements: str - default: [] post_uri: description: - URL of a post provisioning script to be loaded and executed on virtual instance. diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py index df2b8d84db..40d0270800 100644 --- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py +++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py @@ -503,12 +503,6 @@ options: Only works if wait_for_instances is True. type: int - do_not_update: - description: - - TODO document. - type: list - default: [] - ''' EXAMPLES = ''' # Basic configuration YAML example diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/cloud/univention/udm_dns_zone.py index b75cbe95ac..9b80368536 100644 --- a/plugins/modules/cloud/univention/udm_dns_zone.py +++ b/plugins/modules/cloud/univention/udm_dns_zone.py @@ -43,13 +43,11 @@ options: nameserver: type: list elements: str - default: [] description: - List of appropriate name servers. Required if I(state=present). interfaces: type: list elements: str - default: [] description: - List of interface IP addresses, on which the server should response this zone. Required if I(state=present). diff --git a/plugins/modules/cloud/univention/udm_group.py b/plugins/modules/cloud/univention/udm_group.py index 74916cfee2..034cdca1c3 100644 --- a/plugins/modules/cloud/univention/udm_group.py +++ b/plugins/modules/cloud/univention/udm_group.py @@ -45,13 +45,11 @@ options: - define the whole ldap position of the group, e.g. C(cn=g123m-1A,cn=classes,cn=schueler,cn=groups,ou=schule,dc=example,dc=com). type: str - default: '' ou: required: false description: - LDAP OU, e.g. school for LDAP OU C(ou=school,dc=example,dc=com). type: str - default: '' subpath: required: false description: diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index d5b26fbb28..5fef1a337a 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -169,7 +169,6 @@ options: description: - List of telephone numbers. type: list - default: [] postcode: description: - Postal code of users business address. @@ -201,13 +200,11 @@ options: join." aliases: [ sambaPrivileges ] type: list - default: [] samba_user_workstations: description: - Allow the authentication only on this Microsoft Windows host. aliases: [ sambaUserWorkstations ] type: list - default: [] sambahome: description: - Windows home path, e.g. C('\\$FQDN\$USERNAME'). diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/database/mssql/mssql_db.py index a7d16b2710..7e64dcc2cc 100644 --- a/plugins/modules/database/mssql/mssql_db.py +++ b/plugins/modules/database/mssql/mssql_db.py @@ -27,12 +27,10 @@ options: description: - The username used to authenticate with type: str - default: '' login_password: description: - The password used to authenticate with type: str - default: '' login_host: description: - Host running the database diff --git a/plugins/modules/files/iso_customize.py b/plugins/modules/files/iso_customize.py index c3a2ae2651..a6136cdd8f 100644 --- a/plugins/modules/files/iso_customize.py +++ b/plugins/modules/files/iso_customize.py @@ -40,7 +40,6 @@ options: type: list required: false elements: str - default: [] add_files: description: - Allows to add and replace files in the ISO file. @@ -48,7 +47,6 @@ options: type: list required: false elements: dict - default: [] suboptions: src_file: description: diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index a35cc31ef0..05bbdf00c8 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -40,7 +40,6 @@ options: - The namespace C(prefix:uri) mapping for the XPath expression. - Needs to be a C(dict), not a C(list) of items. type: dict - default: {} state: description: - Set or remove an xpath selection (node(s), attribute(s)). diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index ddf8579cb1..8118709b17 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -86,6 +86,7 @@ options: description: - The secret key for your subdomain. - Only required for initial sign in. + default: {} required: false cli_path: type: path diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index 07b7a060e1..943a653249 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -53,12 +53,14 @@ options: elements: str description: - List of handlers to notify when the check fails + default: [] subscribers: type: list elements: str description: - List of subscribers/channels this check should run for - See sensu_subscribers to subscribe a machine to a channel + default: [] interval: type: int description: @@ -90,6 +92,7 @@ options: elements: str description: - Other checks this check depends on, if dependencies fail handling of this check will be disabled + default: [] metric: description: - Whether the check is a metric @@ -135,6 +138,7 @@ options: description: - A hash/dictionary of custom parameters for mixing to the configuration. - You can't rewrite others module parameters using this + default: {} source: type: str description: diff --git a/plugins/modules/monitoring/statsd.py b/plugins/modules/monitoring/statsd.py index aed1c08397..26c8e7c283 100644 --- a/plugins/modules/monitoring/statsd.py +++ b/plugins/modules/monitoring/statsd.py @@ -62,7 +62,6 @@ options: type: str description: - The prefix to add to the metric. - default: '' value: type: int required: true diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/net_tools/dnsmadeeasy.py index cb27a5a68a..ec9e9951cd 100644 --- a/plugins/modules/net_tools/dnsmadeeasy.py +++ b/plugins/modules/net_tools/dnsmadeeasy.py @@ -127,6 +127,7 @@ options: description: - Name or id of the contact list that the monitor will notify. - The default C('') means the Account Owner. + default: '' type: str httpFqdn: diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/net_tools/infinity/infinity.py index 4b0e835209..53fa7efd48 100644 --- a/plugins/modules/net_tools/infinity/infinity.py +++ b/plugins/modules/net_tools/infinity/infinity.py @@ -42,22 +42,27 @@ options: description: - Network ID. type: str + default: '' ip_address: description: - IP Address for a reservation or a release. type: str + default: '' network_address: description: - Network address with CIDR format (e.g., 192.168.310.0). type: str + default: '' network_size: description: - Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26). type: str + default: '' network_name: description: - The name of a network. type: str + default: '' network_location: description: - The parent network id for a given network. diff --git a/plugins/modules/net_tools/ldap/ldap_entry.py b/plugins/modules/net_tools/ldap/ldap_entry.py index d15b31f6d3..affdafeb6c 100644 --- a/plugins/modules/net_tools/ldap/ldap_entry.py +++ b/plugins/modules/net_tools/ldap/ldap_entry.py @@ -37,7 +37,6 @@ options: entries are never modified. To assert specific attribute values on an existing entry, use M(community.general.ldap_attrs) module instead. type: dict - default: {} objectClass: description: - If I(state=present), value or list of values to use when creating diff --git a/plugins/modules/notification/mail.py b/plugins/modules/notification/mail.py index 9d01fc59a7..697ed49ee7 100644 --- a/plugins/modules/notification/mail.py +++ b/plugins/modules/notification/mail.py @@ -49,14 +49,12 @@ options: - This is a list, which may contain address and phrase portions. type: list elements: str - default: [] bcc: description: - The email-address(es) the mail is being 'blind' copied to. - This is a list, which may contain address and phrase portions. type: list elements: str - default: [] subject: description: - The subject of the email being sent. diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 34a15edda5..64310c760e 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -31,7 +31,6 @@ options: type: str description: - Composer arguments like required package, version and so on. - default: '' executable: type: path description: diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index 754c2392ba..b909f509a4 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -51,7 +51,6 @@ options: type: str description: - The maven classifier coordinate - default: '' extension: type: str description: diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/packaging/os/opkg.py index 60d2adc958..f7f3e6ab27 100644 --- a/plugins/modules/packaging/os/opkg.py +++ b/plugins/modules/packaging/os/opkg.py @@ -47,7 +47,6 @@ options: - "remove" - "checksum" - "removal-of-dependent-packages" - default: "" type: str update_cache: description: diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index 1066f10e88..c8d6caebe5 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -73,7 +73,7 @@ options: extra_args: description: - Additional option to pass to pacman when enforcing C(state). - default: '' + default: type: str update_cache: @@ -89,7 +89,7 @@ options: update_cache_extra_args: description: - Additional option to pass to pacman when enforcing C(update_cache). - default: '' + default: type: str upgrade: @@ -102,7 +102,7 @@ options: upgrade_extra_args: description: - Additional option to pass to pacman when enforcing C(upgrade). - default: '' + default: type: str reason: diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index 69aa550c5d..26b7d9df2a 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -152,6 +152,7 @@ options: When some attribute is not listed in the new list of attributes, the existing attribute will be removed from C(syspurpose.json) file. Unknown attributes are ignored. type: dict + default: {} suboptions: usage: description: Syspurpose attribute usage diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index bd16da1f52..23070ad3b3 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -76,7 +76,6 @@ options: - especially useful for SCM and rsync grimoires - makes sense only in pair with C(update_cache) type: int - default: 0 ''' diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index 4fb0dfe178..8a213d85ff 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -70,7 +70,6 @@ options: - The list of media types appropriate for the image. type: list elements: str - default: [] image_url: description: - The URL of the image to insert or eject. diff --git a/plugins/modules/remote_management/manageiq/manageiq_tenant.py b/plugins/modules/remote_management/manageiq/manageiq_tenant.py index 0f4473092b..f696934b2f 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tenant.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tenant.py @@ -65,7 +65,7 @@ options: - ' - C(vms_allocated) (int): use null to remove the quota.' - ' - C(templates_allocated) (int): use null to remove the quota.' required: false - default: {} + default: null ''' EXAMPLES = ''' diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 43443cf38e..4ab519f5a4 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -116,7 +116,6 @@ options: description: - Properties of account service to update. type: dict - default: {} version_added: '0.2.0' resource_id: required: false @@ -142,7 +141,6 @@ options: - List of target resource URIs to apply the update to. type: list elements: str - default: [] version_added: '0.2.0' update_creds: required: false @@ -174,7 +172,6 @@ options: - List of media types appropriate for the image. type: list elements: str - default: [] image_url: required: false description: diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 07ac2e1588..0e7d1537bf 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -72,7 +72,6 @@ options: description: - Setting dict of manager services to update. type: dict - default: {} version_added: '0.2.0' resource_id: required: false @@ -92,7 +91,6 @@ options: description: - Setting dict of EthernetInterface on OOB controller. type: dict - default: {} version_added: '0.2.0' strip_etag_quotes: description: @@ -108,7 +106,6 @@ options: description: - Setting dict of HostInterface on OOB controller. type: dict - default: {} version_added: '4.1.0' hostinterface_id: required: false @@ -121,7 +118,6 @@ options: description: - Setting dict of Sessions. type: dict - default: {} version_added: '5.7.0' author: "Jose Delarosa (@jose-delarosa)" diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/remote_management/stacki/stacki_host.py index d5f968c909..2e339bf280 100644 --- a/plugins/modules/remote_management/stacki/stacki_host.py +++ b/plugins/modules/remote_management/stacki/stacki_host.py @@ -74,14 +74,12 @@ options: - Rack to be used in host creation. - Required if I(state) is C(present) and host does not yet exist. type: int - default: 0 rank: description: - Rank to be used in host creation. - In Stacki terminology, the rank is the position of the machine in a rack. - Required if I(state) is C(present) and host does not yet exist. type: int - default: 0 network: description: - Network to be configured in the host. diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index c10cb45324..f69ed8f4e1 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -55,7 +55,6 @@ options: - Branch name of wildcard to trigger hook on push events type: str version_added: '0.2.0' - default: '' issues_events: description: - Trigger hook on issues events. diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index 84e5c05b1f..a09a386f41 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -38,7 +38,6 @@ options: - A dictionary of zfs properties to be set. - See the zfs(8) man page for more information. type: dict - default: {} notes: - C(check_mode) is supported, but in certain situations it may report a task as changed that will not be reported as changed when C(check_mode) is disabled. diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index 15eef706e5..ee0884f995 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -52,7 +52,6 @@ options: description: - Specifies recursion depth. type: int - default: 0 ''' EXAMPLES = ''' diff --git a/plugins/modules/system/aix_lvol.py b/plugins/modules/system/aix_lvol.py index 6219bdb8e3..99bd3ead9b 100644 --- a/plugins/modules/system/aix_lvol.py +++ b/plugins/modules/system/aix_lvol.py @@ -62,13 +62,11 @@ options: description: - Free-form options to be passed to the mklv command. type: str - default: '' pvs: description: - A list of physical volumes e.g. C(hdisk1,hdisk2). type: list elements: str - default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index 1d1327ed71..a78d71155a 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -56,6 +56,7 @@ options: description: - Password for importing from PKCS12 keystore. type: str + default: '' pkcs12_alias: description: - Alias in the PKCS12 keystore. diff --git a/plugins/modules/system/lvg.py b/plugins/modules/system/lvg.py index ca38565f4a..0bb91583fa 100644 --- a/plugins/modules/system/lvg.py +++ b/plugins/modules/system/lvg.py @@ -42,7 +42,6 @@ options: description: - Additional options to pass to C(pvcreate) when creating the volume group. type: str - default: '' pvresize: description: - If C(true), resize the physical volume to the maximum available size. @@ -53,7 +52,6 @@ options: description: - Additional options to pass to C(vgcreate) when creating the volume group. type: str - default: '' state: description: - Control if the volume group exists. diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/system/selinux_permissive.py index 3563775d14..2578519909 100644 --- a/plugins/modules/system/selinux_permissive.py +++ b/plugins/modules/system/selinux_permissive.py @@ -38,7 +38,6 @@ options: description: - Name of the SELinux policy store to use. type: str - default: '' notes: - Requires a recent version of SELinux and C(policycoreutils-python) (EL 6 or newer). requirements: [ policycoreutils-python ] diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index 3b006a55bb..979dd6d69c 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -161,7 +161,6 @@ options: and the JIRA REST API for the structure required for various fields. - When passed to comment, the data structure is merged at the first level since community.general 4.6.0. Useful to add JIRA properties for example. - Note that JIRA may not allow changing field values on specific transitions or states. - default: {} jql: required: false diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py index cff1834c93..7d55449f63 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py @@ -33,12 +33,10 @@ options: - List of adirectory group strings. type: list elements: str - default: [] adirectory_groups_sids: description: - Dictionary of group sids. type: dict - default: {} backend_match: description: - The backend for the group. @@ -70,22 +68,18 @@ options: - List of edirectory group strings. type: list elements: str - default: [] ipsec_dn: description: - The ipsec dn string. type: str - default: '' ldap_attribute: description: - The ldap attribute to check against. type: str - default: '' ldap_attribute_value: description: - The ldap attribute value to check against. type: str - default: '' members: description: - A list of user ref names (aaa/user). diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py index af91e2433b..387b8301a0 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py @@ -42,7 +42,6 @@ options: type: str description: - An optional comment to add to the dns host object - default: '' hostname: type: str description: @@ -51,7 +50,6 @@ options: type: str description: - The reference name of the interface to use. If not provided the default interface will be used - default: '' resolved: description: - whether the hostname's ipv4 address is already resolved or not diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py index e980a0221b..cb10ad49f4 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py @@ -42,7 +42,6 @@ options: type: str description: - An optional comment to add to the object - default: '' resolved: type: bool description: diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index c6ff1bd26b..5864cf1924 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -48,7 +48,6 @@ options: type: str description: - The reference name of the auth profile - default: '' backend: type: list elements: str @@ -59,12 +58,10 @@ options: type: str description: - The path of the backend - default: '' comment: type: str description: - The optional comment string - default: '' denied_networks: type: list elements: str diff --git a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml index a94529e460..c701e199ae 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml @@ -5,7 +5,7 @@ - name: Create a password ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass', length=8, create=true, backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes', backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -18,7 +18,7 @@ - name: Create a password with equal sign ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=true', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=yes', backend=backend) }}" - name: Fetch a password with equal sign ({{ backend }}) set_fact: @@ -31,7 +31,7 @@ - name: Create a password using missing=create ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='create', length=8, backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=create length=8', backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -44,7 +44,7 @@ - name: Fetch password from existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='empty', backend=backend) }}" + readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -53,7 +53,7 @@ - name: Fetch password from non-existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ query('community.general.passwordstore', 'test-missing-pass', missing='empty', backend=backend) }}" + readpass: "{{ query('community.general.passwordstore', 'test-missing-pass missing=empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -71,7 +71,7 @@ - name: Fetch a password with YAML subkey ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass', subkey='key', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass subkey=key', backend=backend) }}" - name: Read a yaml subkey ({{ backend }}) assert: @@ -96,7 +96,7 @@ - name: Fetch all from multiline file ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', returnall='yes', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass returnall=yes', backend=backend) }}" - name: Multiline pass returnall returns everything in the file ({{ backend }}) assert: @@ -105,7 +105,7 @@ - name: Create a password in a folder ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', length=8, create=true, backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass length=8 create=yes', backend=backend) }}" - name: Fetch password from folder ({{ backend }}) set_fact: diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index 583aafd108..a18b58d651 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -125,9 +125,7 @@ that: - eval_error is failed - >- - "Passwordstore directory '" in eval_error.msg - - >- - "/somenonexistentplace' does not exist" in eval_error.msg + "Passwordstore directory 'somenonexistentplace' does not exist" in eval_error.msg - name: Test pass compatibility shim detection block: From f84a9bf932890c4770c4b765240fb66d98c4d43b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 1 Nov 2022 19:25:51 +0100 Subject: [PATCH 0281/2104] Fix non-matching defaults. (#5452) --- plugins/doc_fragments/influxdb.py | 2 ++ plugins/doc_fragments/ldap.py | 1 + plugins/doc_fragments/utm.py | 1 + plugins/modules/cloud/atomic/atomic_container.py | 1 + .../modules/cloud/dimensiondata/dimensiondata_vlan.py | 3 +++ plugins/modules/cloud/huawei/hwc_ecs_instance.py | 1 + plugins/modules/cloud/huawei/hwc_evs_disk.py | 1 + plugins/modules/cloud/huawei/hwc_network_vpc.py | 1 + plugins/modules/cloud/huawei/hwc_vpc_eip.py | 1 + .../modules/cloud/huawei/hwc_vpc_peering_connect.py | 1 + plugins/modules/cloud/huawei/hwc_vpc_port.py | 1 + plugins/modules/cloud/huawei/hwc_vpc_subnet.py | 1 + plugins/modules/cloud/linode/linode.py | 1 + plugins/modules/cloud/memset/memset_zone.py | 1 + plugins/modules/cloud/memset/memset_zone_record.py | 3 +++ plugins/modules/cloud/misc/rhevm.py | 1 + plugins/modules/cloud/misc/serverless.py | 2 ++ plugins/modules/cloud/misc/terraform.py | 1 + .../cloud/oneandone/oneandone_firewall_policy.py | 5 +++++ .../cloud/oneandone/oneandone_load_balancer.py | 5 +++++ .../cloud/oneandone/oneandone_monitoring_policy.py | 11 +++++++++++ .../cloud/oneandone/oneandone_private_network.py | 2 ++ plugins/modules/cloud/packet/packet_device.py | 1 + plugins/modules/cloud/profitbricks/profitbricks.py | 2 ++ .../modules/cloud/profitbricks/profitbricks_volume.py | 4 ++-- plugins/modules/cloud/pubnub/pubnub_blocks.py | 4 +++- plugins/modules/cloud/rackspace/rax.py | 4 ++++ plugins/modules/cloud/rackspace/rax_cbs.py | 1 + plugins/modules/cloud/rackspace/rax_clb.py | 1 + plugins/modules/cloud/rackspace/rax_files.py | 1 + plugins/modules/cloud/rackspace/rax_files_objects.py | 1 + plugins/modules/cloud/rackspace/rax_meta.py | 1 + plugins/modules/cloud/rackspace/rax_mon_check.py | 2 ++ plugins/modules/cloud/rackspace/rax_mon_entity.py | 2 ++ plugins/modules/cloud/rackspace/rax_scaling_group.py | 2 ++ .../cloud/scaleway/scaleway_container_registry.py | 1 + plugins/modules/cloud/scaleway/scaleway_lb.py | 1 + plugins/modules/cloud/softlayer/sl_vm.py | 1 + .../cloud/spotinst/spotinst_aws_elastigroup.py | 6 ++++++ plugins/modules/cloud/univention/udm_dns_zone.py | 2 ++ plugins/modules/cloud/univention/udm_group.py | 2 ++ plugins/modules/cloud/univention/udm_user.py | 3 +++ plugins/modules/database/mssql/mssql_db.py | 2 ++ plugins/modules/files/iso_customize.py | 2 ++ plugins/modules/files/xml.py | 1 + plugins/modules/identity/onepassword_info.py | 1 - plugins/modules/monitoring/sensu/sensu_check.py | 4 ---- plugins/modules/monitoring/statsd.py | 1 + plugins/modules/net_tools/dnsmadeeasy.py | 1 - plugins/modules/net_tools/infinity/infinity.py | 5 ----- plugins/modules/net_tools/ldap/ldap_entry.py | 1 + plugins/modules/notification/mail.py | 2 ++ plugins/modules/packaging/language/composer.py | 1 + plugins/modules/packaging/language/maven_artifact.py | 1 + plugins/modules/packaging/os/opkg.py | 1 + plugins/modules/packaging/os/pacman.py | 6 +++--- plugins/modules/packaging/os/redhat_subscription.py | 1 - plugins/modules/packaging/os/sorcery.py | 1 + .../lenovoxcc/xcc_redfish_command.py | 1 + .../remote_management/manageiq/manageiq_tenant.py | 2 +- .../remote_management/redfish/redfish_command.py | 3 +++ .../remote_management/redfish/redfish_config.py | 4 ++++ .../modules/remote_management/stacki/stacki_host.py | 2 ++ plugins/modules/source_control/gitlab/gitlab_hook.py | 1 + plugins/modules/storage/zfs/zfs.py | 1 + plugins/modules/storage/zfs/zfs_facts.py | 1 + plugins/modules/system/aix_lvol.py | 2 ++ plugins/modules/system/java_cert.py | 1 - plugins/modules/system/lvg.py | 2 ++ plugins/modules/system/selinux_permissive.py | 1 + plugins/modules/web_infrastructure/jira.py | 1 + .../web_infrastructure/sophos_utm/utm_aaa_group.py | 6 ++++++ .../web_infrastructure/sophos_utm/utm_dns_host.py | 2 ++ .../sophos_utm/utm_network_interface_address.py | 1 + .../sophos_utm/utm_proxy_location.py | 3 +++ 75 files changed, 134 insertions(+), 20 deletions(-) diff --git a/plugins/doc_fragments/influxdb.py b/plugins/doc_fragments/influxdb.py index f9e08550bd..6aedd5ad39 100644 --- a/plugins/doc_fragments/influxdb.py +++ b/plugins/doc_fragments/influxdb.py @@ -43,6 +43,7 @@ options: - The path on which InfluxDB server is accessible - Only available when using python-influxdb >= 5.1.0 type: str + default: '' version_added: '0.2.0' validate_certs: description: @@ -80,4 +81,5 @@ options: description: - HTTP(S) proxy to use for Requests to connect to InfluxDB server. type: dict + default: {} ''' diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index 28e9d2fdae..c73e5080be 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -23,6 +23,7 @@ options: description: - The password to use with I(bind_dn). type: str + default: '' dn: required: true description: diff --git a/plugins/doc_fragments/utm.py b/plugins/doc_fragments/utm.py index d8b2305d23..73ad805035 100644 --- a/plugins/doc_fragments/utm.py +++ b/plugins/doc_fragments/utm.py @@ -17,6 +17,7 @@ options: - Is needed for some modules type: dict required: false + default: {} utm_host: description: - The REST Endpoint of the Sophos UTM. diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index 586b1254c2..c32e617a22 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -61,6 +61,7 @@ options: - The values specified here will be used at installation time as --set arguments for atomic install. type: list elements: str + default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py index b06566b8e6..ca25374dcb 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py @@ -31,6 +31,7 @@ options: description: - A description of the VLAN. type: str + default: '' network_domain: description: - The Id or name of the target network domain. @@ -40,11 +41,13 @@ options: description: - The base address for the VLAN's IPv4 network (e.g. 192.168.1.0). type: str + default: '' private_ipv4_prefix_size: description: - The size of the IPv4 address space, e.g 24. - Required, if C(private_ipv4_base_address) is specified. type: int + default: 0 state: description: - The desired state for the target VLAN. diff --git a/plugins/modules/cloud/huawei/hwc_ecs_instance.py b/plugins/modules/cloud/huawei/hwc_ecs_instance.py index 8026c0f2f6..10d913f9b5 100644 --- a/plugins/modules/cloud/huawei/hwc_ecs_instance.py +++ b/plugins/modules/cloud/huawei/hwc_ecs_instance.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_evs_disk.py b/plugins/modules/cloud/huawei/hwc_evs_disk.py index e319821c9f..7b5a99fb7f 100644 --- a/plugins/modules/cloud/huawei/hwc_evs_disk.py +++ b/plugins/modules/cloud/huawei/hwc_evs_disk.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_network_vpc.py b/plugins/modules/cloud/huawei/hwc_network_vpc.py index 2f08f20313..78f5925e0c 100644 --- a/plugins/modules/cloud/huawei/hwc_network_vpc.py +++ b/plugins/modules/cloud/huawei/hwc_network_vpc.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_eip.py b/plugins/modules/cloud/huawei/hwc_vpc_eip.py index a86338052e..e14fb0e502 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_eip.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_eip.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py index 89955d2091..01c52932ba 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py @@ -34,6 +34,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_port.py b/plugins/modules/cloud/huawei/hwc_vpc_port.py index dadc76c064..aac9636f88 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_port.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_port.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py index d38150dfc3..4b192a5682 100644 --- a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py +++ b/plugins/modules/cloud/huawei/hwc_vpc_subnet.py @@ -33,6 +33,7 @@ options: description: - The timeouts for each operations. type: dict + default: {} suboptions: create: description: diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index c19770dc41..5304ed3d89 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -37,6 +37,7 @@ options: description: - Add the instance to a Display Group in Linode Manager. type: str + default: '' linode_id: description: - Unique ID of a linode server. This value is read-only in the sense that diff --git a/plugins/modules/cloud/memset/memset_zone.py b/plugins/modules/cloud/memset/memset_zone.py index f402e0e0f4..9731e3a943 100644 --- a/plugins/modules/cloud/memset/memset_zone.py +++ b/plugins/modules/cloud/memset/memset_zone.py @@ -44,6 +44,7 @@ options: - The default TTL for all records created in the zone. This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create). type: int + default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] force: required: false diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/cloud/memset/memset_zone_record.py index 5082475176..c114532f90 100644 --- a/plugins/modules/cloud/memset/memset_zone_record.py +++ b/plugins/modules/cloud/memset/memset_zone_record.py @@ -44,11 +44,13 @@ options: description: - C(SRV) and C(TXT) record priority, in the range 0 > 999 (inclusive). type: int + default: 0 record: required: false description: - The subdomain to create. type: str + default: '' type: required: true description: @@ -65,6 +67,7 @@ options: description: - The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create). + default: 0 choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ] type: int zone: diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 2542511bea..994f737093 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -54,6 +54,7 @@ options: description: - The RHEV/oVirt cluster in which you want you VM to start. type: str + default: '' datacenter: description: - The RHEV/oVirt datacenter in which you want you VM to start. diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index 2819adae59..4d36ba679a 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -35,11 +35,13 @@ options: - The name of the serverless framework project stage to deploy to. - This uses the serverless framework default "dev". type: str + default: '' region: description: - AWS region to deploy the service to. - This parameter defaults to C(us-east-1). type: str + default: '' deploy: description: - Whether or not to deploy artifacts after building them. diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index 7b6fbc5126..615c125cf3 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -105,6 +105,7 @@ options: resources selected here will also auto-include any dependencies. type: list elements: str + default: [] lock: description: - Enable statefile locking, if you use a service that accepts locks (such diff --git a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py index 9d9f042f2b..23203e8d05 100644 --- a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py @@ -48,6 +48,7 @@ options: (port_from, port_to, and source) type: list elements: dict + default: [] add_server_ips: description: - A list of server identifiers (id or name) to be assigned to a firewall policy. @@ -55,12 +56,14 @@ options: type: list elements: str required: false + default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state. type: list elements: str required: false + default: [] add_rules: description: - A list of rules that will be added to an existing firewall policy. @@ -68,12 +71,14 @@ options: type: list elements: dict required: false + default: [] remove_rules: description: - A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state. type: list elements: str required: false + default: [] description: description: - Firewall policy description. maxLength=256 diff --git a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py index 3407e264ad..04aefde63a 100644 --- a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py +++ b/plugins/modules/cloud/oneandone/oneandone_load_balancer.py @@ -86,6 +86,7 @@ options: port_balancer, and port_server parameters, in addition to source parameter, which is optional. type: list elements: dict + default: [] description: description: - Description of the load balancer. maxLength=256 @@ -98,12 +99,14 @@ options: type: list elements: str required: false + default: [] remove_server_ips: description: - A list of server IP ids to be unassigned from a load balancer. Used in combination with update state. type: list elements: str required: false + default: [] add_rules: description: - A list of rules that will be added to an existing load balancer. @@ -111,12 +114,14 @@ options: type: list elements: dict required: false + default: [] remove_rules: description: - A list of rule ids that will be removed from an existing load balancer. Used in combination with update state. type: list elements: str required: false + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py index cd9ee40ca2..46c68e86e0 100644 --- a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py +++ b/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py @@ -62,6 +62,7 @@ options: and value is used to advise when the value is exceeded. type: list elements: dict + default: [] suboptions: cpu: description: @@ -88,6 +89,7 @@ options: - Array of ports that will be monitoring. type: list elements: dict + default: [] suboptions: protocol: description: @@ -112,6 +114,7 @@ options: - Array of processes that will be monitoring. type: list elements: dict + default: [] suboptions: process: description: @@ -128,48 +131,56 @@ options: type: list elements: dict required: false + default: [] add_processes: description: - Processes to add to the monitoring policy. type: list elements: dict required: false + default: [] add_servers: description: - Servers to add to the monitoring policy. type: list elements: str required: false + default: [] remove_ports: description: - Ports to remove from the monitoring policy. type: list elements: str required: false + default: [] remove_processes: description: - Processes to remove from the monitoring policy. type: list elements: str required: false + default: [] remove_servers: description: - Servers to remove from the monitoring policy. type: list elements: str required: false + default: [] update_ports: description: - Ports to be updated on the monitoring policy. type: list elements: dict required: false + default: [] update_processes: description: - Processes to be updated on the monitoring policy. type: list elements: dict required: false + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/oneandone/oneandone_private_network.py b/plugins/modules/cloud/oneandone/oneandone_private_network.py index 36633716f7..a6db23310a 100644 --- a/plugins/modules/cloud/oneandone/oneandone_private_network.py +++ b/plugins/modules/cloud/oneandone/oneandone_private_network.py @@ -62,11 +62,13 @@ options: - List of server identifiers (name or id) to be added to the private network. type: list elements: str + default: [] remove_members: description: - List of server identifiers (name or id) to be removed from the private network. type: list elements: str + default: [] wait: description: - wait for the instance to be in state 'running' before returning diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index e8452f99eb..6b78406a6e 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -136,6 +136,7 @@ options: - URL of custom iPXE script for provisioning. - More about custom iPXE for Packet devices at U(https://help.packet.net/technical/infrastructure/custom-ipxe). type: str + default: '' always_pxe: description: diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index 42e6a1314b..cb41491464 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -38,6 +38,7 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str + default: [] datacenter: description: - The datacenter to provision this virtual machine. @@ -74,6 +75,7 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str + default: [] count: description: - The number of virtual machines to create. diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index a49948b4bf..2d449fd92a 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -50,7 +50,7 @@ options: - Public SSH keys allowing access to the virtual machine. type: list elements: str - required: false + default: [] disk_type: description: - The disk type of the volume. @@ -81,7 +81,7 @@ options: - list of instance ids, currently only used when state='absent' to remove instances. type: list elements: str - required: false + default: [] subscription_user: description: - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. diff --git a/plugins/modules/cloud/pubnub/pubnub_blocks.py b/plugins/modules/cloud/pubnub/pubnub_blocks.py index 8e9a56bdf5..9942c57134 100644 --- a/plugins/modules/cloud/pubnub/pubnub_blocks.py +++ b/plugins/modules/cloud/pubnub/pubnub_blocks.py @@ -37,6 +37,7 @@ options: same play)." required: false type: str + default: '' password: description: - Password which match to account to which specified C(email) belong. @@ -44,6 +45,7 @@ options: same play)." required: false type: str + default: '' cache: description: > In case if single play use blocks management module few times it is @@ -58,7 +60,7 @@ options: manage blocks." - "User's account will be used if value not set or empty." type: str - required: false + default: '' application: description: - "Name of target PubNub application for which blocks configuration on diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index 35f88dde81..b35384173a 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -82,17 +82,20 @@ options: default: false extra_client_args: type: dict + default: {} description: - A hash of key/value pairs to be used when creating the cloudservers client. This is considered an advanced option, use it wisely and with caution. extra_create_args: type: dict + default: {} description: - A hash of key/value pairs to be used when creating a new server. This is considered an advanced option, use it wisely and with caution. files: type: dict + default: {} description: - Files to insert into the instance. remotefilename:localcontent flavor: @@ -124,6 +127,7 @@ options: - keypair meta: type: dict + default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/cloud/rackspace/rax_cbs.py index cde1d98755..dd8bcefa35 100644 --- a/plugins/modules/cloud/rackspace/rax_cbs.py +++ b/plugins/modules/cloud/rackspace/rax_cbs.py @@ -26,6 +26,7 @@ options: C(name). This option requires C(pyrax>=1.9.3). meta: type: dict + default: {} description: - A hash of metadata to associate with the volume. name: diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/cloud/rackspace/rax_clb.py index 8e5db34e50..7d45c865f0 100644 --- a/plugins/modules/cloud/rackspace/rax_clb.py +++ b/plugins/modules/cloud/rackspace/rax_clb.py @@ -28,6 +28,7 @@ options: default: LEAST_CONNECTIONS meta: type: dict + default: {} description: - A hash of metadata to associate with the instance name: diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/cloud/rackspace/rax_files.py index 6599c88d16..1c549827cc 100644 --- a/plugins/modules/cloud/rackspace/rax_files.py +++ b/plugins/modules/cloud/rackspace/rax_files.py @@ -27,6 +27,7 @@ options: - The container to use for container or metadata operations. meta: type: dict + default: {} description: - A hash of items to set as metadata values on a container private: diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/cloud/rackspace/rax_files_objects.py index a7c36e6920..82bedffddb 100644 --- a/plugins/modules/cloud/rackspace/rax_files_objects.py +++ b/plugins/modules/cloud/rackspace/rax_files_objects.py @@ -38,6 +38,7 @@ options: - Used to set an expiration in seconds on an uploaded file or folder. meta: type: dict + default: {} description: - Items to set as metadata values on an uploaded file or folder. method: diff --git a/plugins/modules/cloud/rackspace/rax_meta.py b/plugins/modules/cloud/rackspace/rax_meta.py index 7937696f88..33acad365c 100644 --- a/plugins/modules/cloud/rackspace/rax_meta.py +++ b/plugins/modules/cloud/rackspace/rax_meta.py @@ -30,6 +30,7 @@ options: - Server name to modify metadata for meta: type: dict + default: {} description: - A hash of metadata to associate with the instance author: "Matt Martz (@sivel)" diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/cloud/rackspace/rax_mon_check.py index adbd7e7600..c6259dab47 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_check.py +++ b/plugins/modules/cloud/rackspace/rax_mon_check.py @@ -87,6 +87,7 @@ options: I(ip_addresses) hash to resolve an IP address to target. details: type: dict + default: {} description: - Additional details specific to the check type. Must be a hash of strings between 1 and 255 characters long, or an array or object containing 0 to @@ -98,6 +99,7 @@ options: default: false metadata: type: dict + default: {} description: - Hash of arbitrary key-value pairs to accompany this check if it fires. Keys and values must be strings between 1 and 255 characters long. diff --git a/plugins/modules/cloud/rackspace/rax_mon_entity.py b/plugins/modules/cloud/rackspace/rax_mon_entity.py index e8dabef69e..cc502496dc 100644 --- a/plugins/modules/cloud/rackspace/rax_mon_entity.py +++ b/plugins/modules/cloud/rackspace/rax_mon_entity.py @@ -38,6 +38,7 @@ options: bound. Necessary to collect C(agent.) rax_mon_checks against this entity. named_ip_addresses: type: dict + default: {} description: - Hash of IP addresses that may be referenced by name by rax_mon_checks added to this entity. Must be a dictionary of with keys that are names @@ -45,6 +46,7 @@ options: addresses. metadata: type: dict + default: {} description: - Hash of arbitrary C(name), C(value) pairs that are passed to associated rax_mon_alarms. Names and values must all be between 1 and 255 characters diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/cloud/rackspace/rax_scaling_group.py index 6389f91a26..ef31cbb031 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_group.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_group.py @@ -37,6 +37,7 @@ options: - manual files: type: dict + default: {} description: - 'Files to insert into the instance. Hash of C(remotepath: localpath)' flavor: @@ -66,6 +67,7 @@ options: required: true meta: type: dict + default: {} description: - A hash of metadata to associate with the instance min_entities: diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry.py b/plugins/modules/cloud/scaleway/scaleway_container_registry.py index ed10ddf292..294be2cb4c 100644 --- a/plugins/modules/cloud/scaleway/scaleway_container_registry.py +++ b/plugins/modules/cloud/scaleway/scaleway_container_registry.py @@ -60,6 +60,7 @@ options: description: - Description of the container registry. type: str + default: '' privacy_policy: type: str diff --git a/plugins/modules/cloud/scaleway/scaleway_lb.py b/plugins/modules/cloud/scaleway/scaleway_lb.py index b323064012..124cba5945 100644 --- a/plugins/modules/cloud/scaleway/scaleway_lb.py +++ b/plugins/modules/cloud/scaleway/scaleway_lb.py @@ -66,6 +66,7 @@ options: tags: type: list elements: str + default: [] description: - List of tags to apply to the load-balancer diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/cloud/softlayer/sl_vm.py index 851f7a7f53..56b3ccdd39 100644 --- a/plugins/modules/cloud/softlayer/sl_vm.py +++ b/plugins/modules/cloud/softlayer/sl_vm.py @@ -143,6 +143,7 @@ options: - List of ssh keys by their Id to be assigned to a virtual instance. type: list elements: str + default: [] post_uri: description: - URL of a post provisioning script to be loaded and executed on virtual instance. diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py index 40d0270800..df2b8d84db 100644 --- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py +++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py @@ -503,6 +503,12 @@ options: Only works if wait_for_instances is True. type: int + do_not_update: + description: + - TODO document. + type: list + default: [] + ''' EXAMPLES = ''' # Basic configuration YAML example diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/cloud/univention/udm_dns_zone.py index 9b80368536..b75cbe95ac 100644 --- a/plugins/modules/cloud/univention/udm_dns_zone.py +++ b/plugins/modules/cloud/univention/udm_dns_zone.py @@ -43,11 +43,13 @@ options: nameserver: type: list elements: str + default: [] description: - List of appropriate name servers. Required if I(state=present). interfaces: type: list elements: str + default: [] description: - List of interface IP addresses, on which the server should response this zone. Required if I(state=present). diff --git a/plugins/modules/cloud/univention/udm_group.py b/plugins/modules/cloud/univention/udm_group.py index 034cdca1c3..74916cfee2 100644 --- a/plugins/modules/cloud/univention/udm_group.py +++ b/plugins/modules/cloud/univention/udm_group.py @@ -45,11 +45,13 @@ options: - define the whole ldap position of the group, e.g. C(cn=g123m-1A,cn=classes,cn=schueler,cn=groups,ou=schule,dc=example,dc=com). type: str + default: '' ou: required: false description: - LDAP OU, e.g. school for LDAP OU C(ou=school,dc=example,dc=com). type: str + default: '' subpath: required: false description: diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index 5fef1a337a..d5b26fbb28 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -169,6 +169,7 @@ options: description: - List of telephone numbers. type: list + default: [] postcode: description: - Postal code of users business address. @@ -200,11 +201,13 @@ options: join." aliases: [ sambaPrivileges ] type: list + default: [] samba_user_workstations: description: - Allow the authentication only on this Microsoft Windows host. aliases: [ sambaUserWorkstations ] type: list + default: [] sambahome: description: - Windows home path, e.g. C('\\$FQDN\$USERNAME'). diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/database/mssql/mssql_db.py index 7e64dcc2cc..a7d16b2710 100644 --- a/plugins/modules/database/mssql/mssql_db.py +++ b/plugins/modules/database/mssql/mssql_db.py @@ -27,10 +27,12 @@ options: description: - The username used to authenticate with type: str + default: '' login_password: description: - The password used to authenticate with type: str + default: '' login_host: description: - Host running the database diff --git a/plugins/modules/files/iso_customize.py b/plugins/modules/files/iso_customize.py index a6136cdd8f..c3a2ae2651 100644 --- a/plugins/modules/files/iso_customize.py +++ b/plugins/modules/files/iso_customize.py @@ -40,6 +40,7 @@ options: type: list required: false elements: str + default: [] add_files: description: - Allows to add and replace files in the ISO file. @@ -47,6 +48,7 @@ options: type: list required: false elements: dict + default: [] suboptions: src_file: description: diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index 05bbdf00c8..a35cc31ef0 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -40,6 +40,7 @@ options: - The namespace C(prefix:uri) mapping for the XPath expression. - Needs to be a C(dict), not a C(list) of items. type: dict + default: {} state: description: - Set or remove an xpath selection (node(s), attribute(s)). diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index 8118709b17..ddf8579cb1 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -86,7 +86,6 @@ options: description: - The secret key for your subdomain. - Only required for initial sign in. - default: {} required: false cli_path: type: path diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index 943a653249..07b7a060e1 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -53,14 +53,12 @@ options: elements: str description: - List of handlers to notify when the check fails - default: [] subscribers: type: list elements: str description: - List of subscribers/channels this check should run for - See sensu_subscribers to subscribe a machine to a channel - default: [] interval: type: int description: @@ -92,7 +90,6 @@ options: elements: str description: - Other checks this check depends on, if dependencies fail handling of this check will be disabled - default: [] metric: description: - Whether the check is a metric @@ -138,7 +135,6 @@ options: description: - A hash/dictionary of custom parameters for mixing to the configuration. - You can't rewrite others module parameters using this - default: {} source: type: str description: diff --git a/plugins/modules/monitoring/statsd.py b/plugins/modules/monitoring/statsd.py index 26c8e7c283..aed1c08397 100644 --- a/plugins/modules/monitoring/statsd.py +++ b/plugins/modules/monitoring/statsd.py @@ -62,6 +62,7 @@ options: type: str description: - The prefix to add to the metric. + default: '' value: type: int required: true diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/net_tools/dnsmadeeasy.py index ec9e9951cd..cb27a5a68a 100644 --- a/plugins/modules/net_tools/dnsmadeeasy.py +++ b/plugins/modules/net_tools/dnsmadeeasy.py @@ -127,7 +127,6 @@ options: description: - Name or id of the contact list that the monitor will notify. - The default C('') means the Account Owner. - default: '' type: str httpFqdn: diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/net_tools/infinity/infinity.py index 53fa7efd48..4b0e835209 100644 --- a/plugins/modules/net_tools/infinity/infinity.py +++ b/plugins/modules/net_tools/infinity/infinity.py @@ -42,27 +42,22 @@ options: description: - Network ID. type: str - default: '' ip_address: description: - IP Address for a reservation or a release. type: str - default: '' network_address: description: - Network address with CIDR format (e.g., 192.168.310.0). type: str - default: '' network_size: description: - Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26). type: str - default: '' network_name: description: - The name of a network. type: str - default: '' network_location: description: - The parent network id for a given network. diff --git a/plugins/modules/net_tools/ldap/ldap_entry.py b/plugins/modules/net_tools/ldap/ldap_entry.py index affdafeb6c..d15b31f6d3 100644 --- a/plugins/modules/net_tools/ldap/ldap_entry.py +++ b/plugins/modules/net_tools/ldap/ldap_entry.py @@ -37,6 +37,7 @@ options: entries are never modified. To assert specific attribute values on an existing entry, use M(community.general.ldap_attrs) module instead. type: dict + default: {} objectClass: description: - If I(state=present), value or list of values to use when creating diff --git a/plugins/modules/notification/mail.py b/plugins/modules/notification/mail.py index 697ed49ee7..9d01fc59a7 100644 --- a/plugins/modules/notification/mail.py +++ b/plugins/modules/notification/mail.py @@ -49,12 +49,14 @@ options: - This is a list, which may contain address and phrase portions. type: list elements: str + default: [] bcc: description: - The email-address(es) the mail is being 'blind' copied to. - This is a list, which may contain address and phrase portions. type: list elements: str + default: [] subject: description: - The subject of the email being sent. diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 64310c760e..34a15edda5 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -31,6 +31,7 @@ options: type: str description: - Composer arguments like required package, version and so on. + default: '' executable: type: path description: diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index b909f509a4..754c2392ba 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -51,6 +51,7 @@ options: type: str description: - The maven classifier coordinate + default: '' extension: type: str description: diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/packaging/os/opkg.py index f7f3e6ab27..60d2adc958 100644 --- a/plugins/modules/packaging/os/opkg.py +++ b/plugins/modules/packaging/os/opkg.py @@ -47,6 +47,7 @@ options: - "remove" - "checksum" - "removal-of-dependent-packages" + default: "" type: str update_cache: description: diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index c8d6caebe5..1066f10e88 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -73,7 +73,7 @@ options: extra_args: description: - Additional option to pass to pacman when enforcing C(state). - default: + default: '' type: str update_cache: @@ -89,7 +89,7 @@ options: update_cache_extra_args: description: - Additional option to pass to pacman when enforcing C(update_cache). - default: + default: '' type: str upgrade: @@ -102,7 +102,7 @@ options: upgrade_extra_args: description: - Additional option to pass to pacman when enforcing C(upgrade). - default: + default: '' type: str reason: diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index 26b7d9df2a..69aa550c5d 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -152,7 +152,6 @@ options: When some attribute is not listed in the new list of attributes, the existing attribute will be removed from C(syspurpose.json) file. Unknown attributes are ignored. type: dict - default: {} suboptions: usage: description: Syspurpose attribute usage diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/packaging/os/sorcery.py index 23070ad3b3..bd16da1f52 100644 --- a/plugins/modules/packaging/os/sorcery.py +++ b/plugins/modules/packaging/os/sorcery.py @@ -76,6 +76,7 @@ options: - especially useful for SCM and rsync grimoires - makes sense only in pair with C(update_cache) type: int + default: 0 ''' diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index 8a213d85ff..4fb0dfe178 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -70,6 +70,7 @@ options: - The list of media types appropriate for the image. type: list elements: str + default: [] image_url: description: - The URL of the image to insert or eject. diff --git a/plugins/modules/remote_management/manageiq/manageiq_tenant.py b/plugins/modules/remote_management/manageiq/manageiq_tenant.py index f696934b2f..0f4473092b 100644 --- a/plugins/modules/remote_management/manageiq/manageiq_tenant.py +++ b/plugins/modules/remote_management/manageiq/manageiq_tenant.py @@ -65,7 +65,7 @@ options: - ' - C(vms_allocated) (int): use null to remove the quota.' - ' - C(templates_allocated) (int): use null to remove the quota.' required: false - default: null + default: {} ''' EXAMPLES = ''' diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 4ab519f5a4..43443cf38e 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -116,6 +116,7 @@ options: description: - Properties of account service to update. type: dict + default: {} version_added: '0.2.0' resource_id: required: false @@ -141,6 +142,7 @@ options: - List of target resource URIs to apply the update to. type: list elements: str + default: [] version_added: '0.2.0' update_creds: required: false @@ -172,6 +174,7 @@ options: - List of media types appropriate for the image. type: list elements: str + default: [] image_url: required: false description: diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 0e7d1537bf..07ac2e1588 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -72,6 +72,7 @@ options: description: - Setting dict of manager services to update. type: dict + default: {} version_added: '0.2.0' resource_id: required: false @@ -91,6 +92,7 @@ options: description: - Setting dict of EthernetInterface on OOB controller. type: dict + default: {} version_added: '0.2.0' strip_etag_quotes: description: @@ -106,6 +108,7 @@ options: description: - Setting dict of HostInterface on OOB controller. type: dict + default: {} version_added: '4.1.0' hostinterface_id: required: false @@ -118,6 +121,7 @@ options: description: - Setting dict of Sessions. type: dict + default: {} version_added: '5.7.0' author: "Jose Delarosa (@jose-delarosa)" diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/remote_management/stacki/stacki_host.py index 2e339bf280..d5f968c909 100644 --- a/plugins/modules/remote_management/stacki/stacki_host.py +++ b/plugins/modules/remote_management/stacki/stacki_host.py @@ -74,12 +74,14 @@ options: - Rack to be used in host creation. - Required if I(state) is C(present) and host does not yet exist. type: int + default: 0 rank: description: - Rank to be used in host creation. - In Stacki terminology, the rank is the position of the machine in a rack. - Required if I(state) is C(present) and host does not yet exist. type: int + default: 0 network: description: - Network to be configured in the host. diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index f69ed8f4e1..c10cb45324 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -55,6 +55,7 @@ options: - Branch name of wildcard to trigger hook on push events type: str version_added: '0.2.0' + default: '' issues_events: description: - Trigger hook on issues events. diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index a09a386f41..84e5c05b1f 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -38,6 +38,7 @@ options: - A dictionary of zfs properties to be set. - See the zfs(8) man page for more information. type: dict + default: {} notes: - C(check_mode) is supported, but in certain situations it may report a task as changed that will not be reported as changed when C(check_mode) is disabled. diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py index ee0884f995..15eef706e5 100644 --- a/plugins/modules/storage/zfs/zfs_facts.py +++ b/plugins/modules/storage/zfs/zfs_facts.py @@ -52,6 +52,7 @@ options: description: - Specifies recursion depth. type: int + default: 0 ''' EXAMPLES = ''' diff --git a/plugins/modules/system/aix_lvol.py b/plugins/modules/system/aix_lvol.py index 99bd3ead9b..6219bdb8e3 100644 --- a/plugins/modules/system/aix_lvol.py +++ b/plugins/modules/system/aix_lvol.py @@ -62,11 +62,13 @@ options: description: - Free-form options to be passed to the mklv command. type: str + default: '' pvs: description: - A list of physical volumes e.g. C(hdisk1,hdisk2). type: list elements: str + default: [] ''' EXAMPLES = r''' diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index a78d71155a..1d1327ed71 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -56,7 +56,6 @@ options: description: - Password for importing from PKCS12 keystore. type: str - default: '' pkcs12_alias: description: - Alias in the PKCS12 keystore. diff --git a/plugins/modules/system/lvg.py b/plugins/modules/system/lvg.py index 0bb91583fa..ca38565f4a 100644 --- a/plugins/modules/system/lvg.py +++ b/plugins/modules/system/lvg.py @@ -42,6 +42,7 @@ options: description: - Additional options to pass to C(pvcreate) when creating the volume group. type: str + default: '' pvresize: description: - If C(true), resize the physical volume to the maximum available size. @@ -52,6 +53,7 @@ options: description: - Additional options to pass to C(vgcreate) when creating the volume group. type: str + default: '' state: description: - Control if the volume group exists. diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/system/selinux_permissive.py index 2578519909..3563775d14 100644 --- a/plugins/modules/system/selinux_permissive.py +++ b/plugins/modules/system/selinux_permissive.py @@ -38,6 +38,7 @@ options: description: - Name of the SELinux policy store to use. type: str + default: '' notes: - Requires a recent version of SELinux and C(policycoreutils-python) (EL 6 or newer). requirements: [ policycoreutils-python ] diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index 979dd6d69c..3b006a55bb 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -161,6 +161,7 @@ options: and the JIRA REST API for the structure required for various fields. - When passed to comment, the data structure is merged at the first level since community.general 4.6.0. Useful to add JIRA properties for example. - Note that JIRA may not allow changing field values on specific transitions or states. + default: {} jql: required: false diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py index 7d55449f63..cff1834c93 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py @@ -33,10 +33,12 @@ options: - List of adirectory group strings. type: list elements: str + default: [] adirectory_groups_sids: description: - Dictionary of group sids. type: dict + default: {} backend_match: description: - The backend for the group. @@ -68,18 +70,22 @@ options: - List of edirectory group strings. type: list elements: str + default: [] ipsec_dn: description: - The ipsec dn string. type: str + default: '' ldap_attribute: description: - The ldap attribute to check against. type: str + default: '' ldap_attribute_value: description: - The ldap attribute value to check against. type: str + default: '' members: description: - A list of user ref names (aaa/user). diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py index 387b8301a0..af91e2433b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py @@ -42,6 +42,7 @@ options: type: str description: - An optional comment to add to the dns host object + default: '' hostname: type: str description: @@ -50,6 +51,7 @@ options: type: str description: - The reference name of the interface to use. If not provided the default interface will be used + default: '' resolved: description: - whether the hostname's ipv4 address is already resolved or not diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py index cb10ad49f4..e980a0221b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py @@ -42,6 +42,7 @@ options: type: str description: - An optional comment to add to the object + default: '' resolved: type: bool description: diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 5864cf1924..c6ff1bd26b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -48,6 +48,7 @@ options: type: str description: - The reference name of the auth profile + default: '' backend: type: list elements: str @@ -58,10 +59,12 @@ options: type: str description: - The path of the backend + default: '' comment: type: str description: - The optional comment string + default: '' denied_networks: type: list elements: str From dc66aefa40ad8457894ff15786bd93d0c0ab2224 Mon Sep 17 00:00:00 2001 From: Alex Groshev <38885591+haddystuff@users.noreply.github.com> Date: Tue, 1 Nov 2022 21:40:17 +0100 Subject: [PATCH 0282/2104] fix int options idempotence bug and add new test to check it (#5443) --- ...4998-nmcli-fix-int-options-idempotence.yml | 2 + plugins/modules/net_tools/nmcli.py | 3 +- .../plugins/modules/net_tools/test_nmcli.py | 182 ++++++++++++++++++ 3 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml diff --git a/changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml b/changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml new file mode 100644 index 0000000000..823b894982 --- /dev/null +++ b/changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml @@ -0,0 +1,2 @@ +bugfixes: + - nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998). diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 49565b9122..aa2ddafe1d 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -2135,7 +2135,8 @@ class Nmcli(object): elif all([key == self.mtu_setting, self.type == 'dummy', current_value is None, value == 'auto', self.mtu is None]): value = None else: - if current_value != to_text(value): + value = to_text(value) + if current_value != value: changed = True diff_before[key] = current_value diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index 276d318185..885bdf3a96 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -11,6 +11,7 @@ import pytest from ansible.module_utils.common.text.converters import to_text from ansible_collections.community.general.plugins.modules.net_tools import nmcli +from ansible.module_utils.basic import AnsibleModule pytestmark = pytest.mark.usefixtures('patch_ansible_module') @@ -132,6 +133,7 @@ connection.autoconnect: yes ipv4.method: manual ipv4.addresses: 10.10.10.10/24 ipv4.gateway: 10.10.10.1 +ipv4.route-metric: -1 ipv4.ignore-auto-dns: no ipv4.ignore-auto-routes: no ipv4.never-default: no @@ -141,6 +143,19 @@ ipv6.ignore-auto-dns: no ipv6.ignore-auto-routes: no """ +TESTCASE_GENERIC_DIFF_CHECK = [ + { + 'type': 'generic', + 'conn_name': 'non_existent_nw_device', + 'ifname': 'generic_non_existant', + 'ip4': '10.10.10.10/24', + 'gw4': '10.10.10.2', + 'route_metric4': -1, + 'state': 'present', + '_ansible_check_mode': False, + }, +] + TESTCASE_GENERIC_MODIFY_ROUTING_RULES = [ { 'type': 'generic', @@ -1726,6 +1741,13 @@ def mocked_infiniband_connection_static_transport_mode_connected_modify(mocker): )) +@pytest.fixture +def mocked_generic_connection_diff_check(mocker): + mocker_set(mocker, + connection_exists=True, + execute_return=(0, TESTCASE_GENERIC_SHOW_OUTPUT, "")) + + @pytest.mark.parametrize('patch_ansible_module', TESTCASE_BOND, indirect=['patch_ansible_module']) def test_bond_connection_create(mocked_generic_connection_create, capfd): """ @@ -3810,3 +3832,163 @@ def test_infiniband_connection_static_transport_mode_connected( assert results.get('changed') is True assert not results.get('failed') + + +@pytest.mark.parametrize('patch_ansible_module', TESTCASE_GENERIC_DIFF_CHECK, indirect=['patch_ansible_module']) +def test_bond_connection_unchanged(mocked_generic_connection_diff_check, capfd): + """ + Test : Bond connection unchanged + """ + + module = AnsibleModule( + argument_spec=dict( + ignore_unsupported_suboptions=dict(type='bool', default=False), + autoconnect=dict(type='bool', default=True), + state=dict(type='str', required=True, choices=['absent', 'present']), + conn_name=dict(type='str', required=True), + master=dict(type='str'), + ifname=dict(type='str'), + type=dict(type='str', + choices=[ + 'bond', + 'bond-slave', + 'bridge', + 'bridge-slave', + 'dummy', + 'ethernet', + 'generic', + 'gre', + 'infiniband', + 'ipip', + 'sit', + 'team', + 'team-slave', + 'vlan', + 'vxlan', + 'wifi', + 'gsm', + 'wireguard', + 'vpn', + ]), + ip4=dict(type='list', elements='str'), + gw4=dict(type='str'), + gw4_ignore_auto=dict(type='bool', default=False), + routes4=dict(type='list', elements='str'), + routes4_extended=dict(type='list', + elements='dict', + options=dict( + ip=dict(type='str', required=True), + next_hop=dict(type='str'), + metric=dict(type='int'), + table=dict(type='int'), + tos=dict(type='int'), + cwnd=dict(type='int'), + mtu=dict(type='int'), + onlink=dict(type='bool') + )), + route_metric4=dict(type='int'), + routing_rules4=dict(type='list', elements='str'), + never_default4=dict(type='bool', default=False), + dns4=dict(type='list', elements='str'), + dns4_search=dict(type='list', elements='str'), + dns4_ignore_auto=dict(type='bool', default=False), + method4=dict(type='str', choices=['auto', 'link-local', 'manual', 'shared', 'disabled']), + may_fail4=dict(type='bool', default=True), + dhcp_client_id=dict(type='str'), + ip6=dict(type='list', elements='str'), + gw6=dict(type='str'), + gw6_ignore_auto=dict(type='bool', default=False), + dns6=dict(type='list', elements='str'), + dns6_search=dict(type='list', elements='str'), + dns6_ignore_auto=dict(type='bool', default=False), + routes6=dict(type='list', elements='str'), + routes6_extended=dict(type='list', + elements='dict', + options=dict( + ip=dict(type='str', required=True), + next_hop=dict(type='str'), + metric=dict(type='int'), + table=dict(type='int'), + cwnd=dict(type='int'), + mtu=dict(type='int'), + onlink=dict(type='bool') + )), + route_metric6=dict(type='int'), + method6=dict(type='str', choices=['ignore', 'auto', 'dhcp', 'link-local', 'manual', 'shared', 'disabled']), + ip_privacy6=dict(type='str', choices=['disabled', 'prefer-public-addr', 'prefer-temp-addr', 'unknown']), + addr_gen_mode6=dict(type='str', choices=['eui64', 'stable-privacy']), + # Bond Specific vars + mode=dict(type='str', default='balance-rr', + choices=['802.3ad', 'active-backup', 'balance-alb', 'balance-rr', 'balance-tlb', 'balance-xor', 'broadcast']), + miimon=dict(type='int'), + downdelay=dict(type='int'), + updelay=dict(type='int'), + xmit_hash_policy=dict(type='str'), + arp_interval=dict(type='int'), + arp_ip_target=dict(type='str'), + primary=dict(type='str'), + # general usage + mtu=dict(type='int'), + mac=dict(type='str'), + zone=dict(type='str'), + # bridge specific vars + stp=dict(type='bool', default=True), + priority=dict(type='int', default=128), + slavepriority=dict(type='int', default=32), + forwarddelay=dict(type='int', default=15), + hellotime=dict(type='int', default=2), + maxage=dict(type='int', default=20), + ageingtime=dict(type='int', default=300), + hairpin=dict(type='bool'), + path_cost=dict(type='int', default=100), + # team specific vars + runner=dict(type='str', default='roundrobin', + choices=['broadcast', 'roundrobin', 'activebackup', 'loadbalance', 'lacp']), + # team active-backup runner specific options + runner_hwaddr_policy=dict(type='str', choices=['same_all', 'by_active', 'only_active']), + # vlan specific vars + vlanid=dict(type='int'), + vlandev=dict(type='str'), + flags=dict(type='str'), + ingress=dict(type='str'), + egress=dict(type='str'), + # vxlan specific vars + vxlan_id=dict(type='int'), + vxlan_local=dict(type='str'), + vxlan_remote=dict(type='str'), + # ip-tunnel specific vars + ip_tunnel_dev=dict(type='str'), + ip_tunnel_local=dict(type='str'), + ip_tunnel_remote=dict(type='str'), + # ip-tunnel type gre specific vars + ip_tunnel_input_key=dict(type='str', no_log=True), + ip_tunnel_output_key=dict(type='str', no_log=True), + # 802-11-wireless* specific vars + ssid=dict(type='str'), + wifi=dict(type='dict'), + wifi_sec=dict(type='dict', no_log=True), + gsm=dict(type='dict'), + wireguard=dict(type='dict'), + vpn=dict(type='dict'), + transport_mode=dict(type='str', choices=['datagram', 'connected']), + ), + mutually_exclusive=[['never_default4', 'gw4'], + ['routes4_extended', 'routes4'], + ['routes6_extended', 'routes6']], + required_if=[("type", "wifi", [("ssid")])], + supports_check_mode=True, + ) + module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C') + + nmcli_module = nmcli.Nmcli(module) + + changed, diff = nmcli_module.is_connection_changed() + + assert changed + + num_of_diff_params = 0 + for parameter, value in diff.get('before').items(): + if value != diff['after'][parameter]: + num_of_diff_params += 1 + + assert num_of_diff_params == 1 From e718bd844518d9f69a1a61f63aca885f2d629a57 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 1 Nov 2022 21:58:46 +0100 Subject: [PATCH 0283/2104] Lookups: use Ansible's config manager whenever possible (#5440) * Start using Ansible's config manager to handle options. * Docs improvements. * Fix documentation, make options actual lookup options. * The cyberarkpassword lookup does too strange things. * The onepassword lookups are converted in #4728, let's not interfere. * Improve docs. * Skip shelvefile as well. * Convert lmdb_kv. * Convert and fix credstash. * Convert manifold. * Drop chef_databag. * Convert dig. * Update examples. * Forgot the most important part. * Fix lmdb_kv docs. * Python 2.6 compatibility. * Convert AnsibleUnicode to str. * Load lookup with lookup loader. * Fix environment handling and error message checking. * Improve docs formatting. --- .github/workflows/docs-pr.yml | 1 + changelogs/fragments/lookup-options.yml | 14 ++++++ plugins/lookup/cartesian.py | 5 ++- plugins/lookup/credstash.py | 45 +++++++++++++------ plugins/lookup/cyberarkpassword.py | 1 - plugins/lookup/dependent.py | 4 +- plugins/lookup/dig.py | 42 +++++++++++------ plugins/lookup/dnstxt.py | 1 + plugins/lookup/filetree.py | 2 + plugins/lookup/flattened.py | 14 +++--- plugins/lookup/hiera.py | 33 +++++++------- plugins/lookup/keyring.py | 8 +++- plugins/lookup/lmdb_kv.py | 29 ++++++------ plugins/lookup/manifold.py | 11 ++--- plugins/lookup/shelvefile.py | 14 +++--- .../targets/lookup_lmdb_kv/test.yml | 4 +- tests/unit/plugins/lookup/test_manifold.py | 24 +++++----- 17 files changed, 161 insertions(+), 91 deletions(-) create mode 100644 changelogs/fragments/lookup-options.yml diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 26213d705d..04a50dc201 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -26,6 +26,7 @@ jobs: init-fail-on-error: true provide-link-targets: | ansible_collections.ansible.builtin.dict2items_filter + ansible_collections.ansible.builtin.items_lookup ansible_collections.ansible.builtin.path_join_filter ansible_collections.community.kubevirt.kubevirt_cdi_upload_module ansible_collections.community.kubevirt.kubevirt_inventory diff --git a/changelogs/fragments/lookup-options.yml b/changelogs/fragments/lookup-options.yml new file mode 100644 index 0000000000..1fb406a383 --- /dev/null +++ b/changelogs/fragments/lookup-options.yml @@ -0,0 +1,14 @@ +minor_changes: + - "cartesian lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "credstash lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "dependent lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "dig lookup plugin - start using Ansible's configuration manager to parse options. All documented options can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440)." + - "dnstxt lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "filetree lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "flattened lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "hiera lookup plugin - start using Ansible's configuration manager to parse options. The Hiera executable and config file can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440)." + - "keyring lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "lmdb_kv lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." + - "manifold lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." +bugfixes: + - "credstash lookup plugin - pass plugin options to credstash for all terms, not just for the first (https://github.com/ansible-collections/community.general/pull/5440)." diff --git a/plugins/lookup/cartesian.py b/plugins/lookup/cartesian.py index 516d153389..d76e8f532a 100644 --- a/plugins/lookup/cartesian.py +++ b/plugins/lookup/cartesian.py @@ -15,9 +15,11 @@ DOCUMENTATION = ''' - It is clearer with an example, it turns [1, 2, 3], [a, b] into [1, a], [1, b], [2, a], [2, b], [3, a], [3, b]. You can see the exact syntax in the examples section. options: - _raw: + _terms: description: - a set of lists + type: list + elements: list required: true ''' @@ -69,6 +71,7 @@ class LookupModule(LookupBase): return results def run(self, terms, variables=None, **kwargs): + self.set_options(var_options=variables, direct=kwargs) terms = self._lookup_variables(terms) diff --git a/plugins/lookup/credstash.py b/plugins/lookup/credstash.py index a783f8ba08..d49d5b23cb 100644 --- a/plugins/lookup/credstash.py +++ b/plugins/lookup/credstash.py @@ -22,25 +22,33 @@ DOCUMENTATION = ''' required: true table: description: name of the credstash table to query + type: str default: 'credential-store' version: description: Credstash version + type: str + default: '' region: description: AWS region + type: str profile_name: description: AWS profile to use for authentication + type: str env: - name: AWS_PROFILE aws_access_key_id: description: AWS access key ID + type: str env: - name: AWS_ACCESS_KEY_ID aws_secret_access_key: description: AWS access key + type: str env: - name: AWS_SECRET_ACCESS_KEY aws_session_token: description: AWS session token + type: str env: - name: AWS_SESSION_TOKEN ''' @@ -100,28 +108,39 @@ except ImportError: class LookupModule(LookupBase): - def run(self, terms, variables, **kwargs): - + def run(self, terms, variables=None, **kwargs): if not CREDSTASH_INSTALLED: raise AnsibleError('The credstash lookup plugin requires credstash to be installed.') + self.set_options(var_options=variables, direct=kwargs) + + version = self.get_option('version') + region = self.get_option('region') + table = self.get_option('table') + profile_name = self.get_option('profile_name') + aws_access_key_id = self.get_option('aws_access_key_id') + aws_secret_access_key = self.get_option('aws_secret_access_key') + aws_session_token = self.get_option('aws_session_token') + + context = dict( + (k, v) for k, v in kwargs.items() + if k not in ('version', 'region', 'table', 'profile_name', 'aws_access_key_id', 'aws_secret_access_key', 'aws_session_token') + ) + + kwargs_pass = { + 'profile_name': profile_name, + 'aws_access_key_id': aws_access_key_id, + 'aws_secret_access_key': aws_secret_access_key, + 'aws_session_token': aws_session_token, + } + ret = [] for term in terms: try: - version = kwargs.pop('version', '') - region = kwargs.pop('region', None) - table = kwargs.pop('table', 'credential-store') - profile_name = kwargs.pop('profile_name', os.getenv('AWS_PROFILE', None)) - aws_access_key_id = kwargs.pop('aws_access_key_id', os.getenv('AWS_ACCESS_KEY_ID', None)) - aws_secret_access_key = kwargs.pop('aws_secret_access_key', os.getenv('AWS_SECRET_ACCESS_KEY', None)) - aws_session_token = kwargs.pop('aws_session_token', os.getenv('AWS_SESSION_TOKEN', None)) - kwargs_pass = {'profile_name': profile_name, 'aws_access_key_id': aws_access_key_id, - 'aws_secret_access_key': aws_secret_access_key, 'aws_session_token': aws_session_token} - val = credstash.getSecret(term, version, region, table, context=kwargs, **kwargs_pass) + ret.append(credstash.getSecret(term, version, region, table, context=context, **kwargs_pass)) except credstash.ItemNotFound: raise AnsibleError('Key {0} not found'.format(term)) except Exception as e: raise AnsibleError('Encountered exception while fetching {0}: {1}'.format(term, e)) - ret.append(val) return ret diff --git a/plugins/lookup/cyberarkpassword.py b/plugins/lookup/cyberarkpassword.py index 00dd81d7f7..1e005e23e8 100644 --- a/plugins/lookup/cyberarkpassword.py +++ b/plugins/lookup/cyberarkpassword.py @@ -174,7 +174,6 @@ class LookupModule(LookupBase): """ def run(self, terms, variables=None, **kwargs): - display.vvvv("%s" % terms) if isinstance(terms, list): return_values = [] diff --git a/plugins/lookup/dependent.py b/plugins/lookup/dependent.py index 0bd234c1b4..b44a9208af 100644 --- a/plugins/lookup/dependent.py +++ b/plugins/lookup/dependent.py @@ -16,7 +16,7 @@ description: or template expressions which evaluate to lists or dicts, composed of the elements of the input evaluated lists and dictionaries." options: - _raw: + _terms: description: - A list where the elements are one-element dictionaries, mapping a name to a string, list, or dictionary. The name is the index that is used in the result object. The value is iterated over as described below. @@ -180,6 +180,8 @@ class LookupModule(LookupBase): def run(self, terms, variables=None, **kwargs): """Generate list.""" + self.set_options(var_options=variables, direct=kwargs) + result = [] if len(terms) > 0: templar = Templar(loader=self._templar._loader) diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index 3d91152aea..ceaff15e9f 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -21,22 +21,26 @@ DOCUMENTATION = ''' - In addition to (default) A record, it is also possible to specify a different record type that should be queried. This can be done by either passing-in additional parameter of format qtype=TYPE to the dig lookup, or by appending /TYPE to the FQDN being queried. - If multiple values are associated with the requested record, the results will be returned as a comma-separated list. - In such cases you may want to pass option wantlist=True to the plugin, which will result in the record values being returned as a list - over which you can iterate later on. + In such cases you may want to pass option I(wantlist=true) to the lookup call, or alternatively use C(query) instead of C(lookup), + which will result in the record values being returned as a list over which you can iterate later on. - By default, the lookup will rely on system-wide configured DNS servers for performing the query. It is also possible to explicitly specify DNS servers to query using the @DNS_SERVER_1,DNS_SERVER_2,...,DNS_SERVER_N notation. This needs to be passed-in as an additional parameter to the lookup options: _terms: description: Domain(s) to query. + type: list + elements: str qtype: description: - Record type to query. - C(DLV) has been removed in community.general 6.0.0. + type: str default: 'A' choices: [A, ALL, AAAA, CNAME, DNAME, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT] flat: description: If 0 each record is returned as a dictionary, otherwise a string. + type: int default: 1 retry_servfail: description: Retry a nameserver if it returns SERVFAIL. @@ -59,6 +63,11 @@ DOCUMENTATION = ''' default: false type: bool version_added: 6.0.0 + class: + description: + - "Class." + type: str + default: 'IN' notes: - ALL is not a record per-se, merely the listed fields are available for any record results you retrieve in the form of a dictionary. - While the 'dig' lookup plugin supports anything which dnspython supports out of the box, only a subset can be converted into a dictionary. @@ -74,7 +83,7 @@ EXAMPLES = """ - name: "The TXT record for example.org." ansible.builtin.debug: - msg: "{{ lookup('community.general.dig', 'example.org.', 'qtype=TXT') }}" + msg: "{{ lookup('community.general.dig', 'example.org.', qtype='TXT') }}" - name: "The TXT record for example.org, alternative syntax." ansible.builtin.debug: @@ -83,24 +92,24 @@ EXAMPLES = """ - name: use in a loop ansible.builtin.debug: msg: "MX record for gmail.com {{ item }}" - with_items: "{{ lookup('community.general.dig', 'gmail.com./MX', wantlist=True) }}" + with_items: "{{ lookup('community.general.dig', 'gmail.com./MX', wantlist=true) }}" - ansible.builtin.debug: msg: "Reverse DNS for 192.0.2.5 is {{ lookup('community.general.dig', '192.0.2.5/PTR') }}" - ansible.builtin.debug: msg: "Reverse DNS for 192.0.2.5 is {{ lookup('community.general.dig', '5.2.0.192.in-addr.arpa./PTR') }}" - ansible.builtin.debug: - msg: "Reverse DNS for 192.0.2.5 is {{ lookup('community.general.dig', '5.2.0.192.in-addr.arpa.', 'qtype=PTR') }}" + msg: "Reverse DNS for 192.0.2.5 is {{ lookup('community.general.dig', '5.2.0.192.in-addr.arpa.', qtype='PTR') }}" - ansible.builtin.debug: msg: "Querying 198.51.100.23 for IPv4 address for example.com. produces {{ lookup('dig', 'example.com', '@198.51.100.23') }}" - ansible.builtin.debug: msg: "XMPP service for gmail.com. is available at {{ item.target }} on port {{ item.port }}" - with_items: "{{ lookup('community.general.dig', '_xmpp-server._tcp.gmail.com./SRV', 'flat=0', wantlist=True) }}" + with_items: "{{ lookup('community.general.dig', '_xmpp-server._tcp.gmail.com./SRV', flat=0, wantlist=true) }}" - name: Retry nameservers that return SERVFAIL ansible.builtin.debug: - msg: "{{ lookup('community.general.dig', 'example.org./A', 'retry_servfail=True') }}" + msg: "{{ lookup('community.general.dig', 'example.org./A', retry_servfail=true) }}" """ RETURN = """ @@ -279,21 +288,26 @@ class LookupModule(LookupBase): ... flat=0 # returns a dict; default is 1 == string ''' - if HAVE_DNS is False: raise AnsibleError("The dig lookup requires the python 'dnspython' library and it is not installed") + self.set_options(var_options=variables, direct=kwargs) + # Create Resolver object so that we can set NS if necessary myres = dns.resolver.Resolver(configure=True) edns_size = 4096 myres.use_edns(0, ednsflags=dns.flags.DO, payload=edns_size) domain = None - qtype = 'A' - flat = True - fail_on_error = False - real_empty = False - rdclass = dns.rdataclass.from_text('IN') + qtype = self.get_option('qtype') + flat = self.get_option('flat') + fail_on_error = self.get_option('fail_on_error') + real_empty = self.get_option('real_empty') + try: + rdclass = dns.rdataclass.from_text(self.get_option('class')) + except Exception as e: + raise AnsibleError("dns lookup illegal CLASS: %s" % to_native(e)) + myres.retry_servfail = self.get_option('retry_servfail') for t in terms: if t.startswith('@'): # e.g. "@10.0.1.2,192.0.2.1" is ok. @@ -316,7 +330,7 @@ class LookupModule(LookupBase): continue if '=' in t: try: - opt, arg = t.split('=') + opt, arg = t.split('=', 1) except Exception: pass diff --git a/plugins/lookup/dnstxt.py b/plugins/lookup/dnstxt.py index abf3e64b60..396b93f436 100644 --- a/plugins/lookup/dnstxt.py +++ b/plugins/lookup/dnstxt.py @@ -71,6 +71,7 @@ from ansible.plugins.lookup import LookupBase class LookupModule(LookupBase): def run(self, terms, variables=None, **kwargs): + self.set_options(var_options=variables, direct=kwargs) if HAVE_DNS is False: raise AnsibleError("Can't LOOKUP(dnstxt): module dns.resolver is not installed") diff --git a/plugins/lookup/filetree.py b/plugins/lookup/filetree.py index 13b3d71e43..f12cc45192 100644 --- a/plugins/lookup/filetree.py +++ b/plugins/lookup/filetree.py @@ -201,6 +201,8 @@ def file_props(root, path): class LookupModule(LookupBase): def run(self, terms, variables=None, **kwargs): + self.set_options(var_options=variables, direct=kwargs) + basedir = self.get_basedir(variables) ret = [] diff --git a/plugins/lookup/flattened.py b/plugins/lookup/flattened.py index 25098fa23a..0f290e559d 100644 --- a/plugins/lookup/flattened.py +++ b/plugins/lookup/flattened.py @@ -11,14 +11,17 @@ DOCUMENTATION = ''' author: Serge van Ginderachter (!UNKNOWN) short_description: return single list completely flattened description: - - given one or more lists, this lookup will flatten any list elements found recursively until only 1 list is left. + - Given one or more lists, this lookup will flatten any list elements found recursively until only 1 list is left. options: _terms: description: lists to flatten + type: list + elements: raw required: true notes: - - unlike 'items' which only flattens 1 level, this plugin will continue to flatten until it cannot find lists anymore. - - aka highlander plugin, there can only be one (list). + - Unlike the R(items lookup,ansible_collections.ansible.builtin.items_lookup) which only flattens 1 level, + this plugin will continue to flatten until it cannot find lists anymore. + - Aka highlander plugin, there can only be one (list). ''' EXAMPLES = """ @@ -78,9 +81,10 @@ class LookupModule(LookupBase): return ret - def run(self, terms, variables, **kwargs): - + def run(self, terms, variables=None, **kwargs): if not isinstance(terms, list): raise AnsibleError("with_flattened expects a list") + self.set_options(var_options=variables, direct=kwargs) + return self._do_flatten(terms, variables) diff --git a/plugins/lookup/hiera.py b/plugins/lookup/hiera.py index 055d16133b..1049e80b02 100644 --- a/plugins/lookup/hiera.py +++ b/plugins/lookup/hiera.py @@ -14,23 +14,23 @@ DOCUMENTATION = ''' requirements: - hiera (command line utility) description: - - Retrieves data from an Puppetmaster node using Hiera as ENC + - Retrieves data from an Puppetmaster node using Hiera as ENC. options: - _hiera_key: + _terms: description: - - The list of keys to lookup on the Puppetmaster + - The list of keys to lookup on the Puppetmaster. type: list elements: string required: true - _bin_file: + executable: description: - - Binary file to execute Hiera + - Binary file to execute Hiera. default: '/usr/bin/hiera' env: - name: ANSIBLE_HIERA_BIN - _hierarchy_file: + config_file: description: - - File that describes the hierarchy of Hiera + - File that describes the hierarchy of Hiera. default: '/etc/hiera.yaml' env: - name: ANSIBLE_HIERA_CFG @@ -67,25 +67,28 @@ from ansible.plugins.lookup import LookupBase from ansible.utils.cmd_functions import run_cmd from ansible.module_utils.common.text.converters import to_text -ANSIBLE_HIERA_CFG = os.getenv('ANSIBLE_HIERA_CFG', '/etc/hiera.yaml') -ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera') - class Hiera(object): + def __init__(self, hiera_cfg, hiera_bin): + self.hiera_cfg = hiera_cfg + self.hiera_bin = hiera_bin + def get(self, hiera_key): - pargs = [ANSIBLE_HIERA_BIN] - pargs.extend(['-c', ANSIBLE_HIERA_CFG]) + pargs = [self.hiera_bin] + pargs.extend(['-c', self.hiera_cfg]) pargs.extend(hiera_key) rc, output, err = run_cmd("{0} -c {1} {2}".format( - ANSIBLE_HIERA_BIN, ANSIBLE_HIERA_CFG, hiera_key[0])) + self.hiera_bin, self.hiera_cfg, hiera_key[0])) return to_text(output.strip()) class LookupModule(LookupBase): - def run(self, terms, variables=''): - hiera = Hiera() + def run(self, terms, variables=None, **kwargs): + self.set_options(var_options=variables, direct=kwargs) + + hiera = Hiera(self.get_option('config_file'), self.get_option('executable')) ret = [hiera.get(terms)] return ret diff --git a/plugins/lookup/keyring.py b/plugins/lookup/keyring.py index 56718c32e9..a4c914ed1a 100644 --- a/plugins/lookup/keyring.py +++ b/plugins/lookup/keyring.py @@ -26,7 +26,9 @@ EXAMPLES = """ - 'servicename username' - name: access mysql with password from keyring - mysql_db: login_password={{lookup('community.general.keyring','mysql joe')}} login_user=joe + community.mysql.mysql_db: + login_password: "{{ lookup('community.general.keyring', 'mysql joe') }}" + login_user: joe """ RETURN = """ @@ -53,10 +55,12 @@ display = Display() class LookupModule(LookupBase): - def run(self, terms, **kwargs): + def run(self, terms, variables=None, **kwargs): if not HAS_KEYRING: raise AnsibleError(u"Can't LOOKUP(keyring): missing required python library 'keyring'") + self.set_options(var_options=variables, direct=kwargs) + display.vvvv(u"keyring: %s" % keyring.get_keyring()) ret = [] for term in terms: diff --git a/plugins/lookup/lmdb_kv.py b/plugins/lookup/lmdb_kv.py index 569a49a5f0..0950249dc8 100644 --- a/plugins/lookup/lmdb_kv.py +++ b/plugins/lookup/lmdb_kv.py @@ -13,15 +13,20 @@ DOCUMENTATION = ''' version_added: '0.2.0' short_description: fetch data from LMDB description: - - This lookup returns a list of results from an LMDB DB corresponding to a list of items given to it + - This lookup returns a list of results from an LMDB DB corresponding to a list of items given to it. requirements: - lmdb (python library https://lmdb.readthedocs.io/en/release/) options: _terms: - description: list of keys to query + description: List of keys to query. + type: list + elements: str db: - description: path to LMDB database + description: Path to LMDB database. + type: str default: 'ansible.mdb' + vars: + - name: lmdb_kv_db ''' EXAMPLES = """ @@ -43,8 +48,8 @@ EXAMPLES = """ - item == 'Belgium' vars: - lmdb_kv_db: jp.mdb - with_community.general.lmdb_kv: - - be + with_community.general.lmdb_kv: + - be """ RETURN = """ @@ -58,6 +63,7 @@ _raw: from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase from ansible.module_utils.common.text.converters import to_native, to_text + HAVE_LMDB = True try: import lmdb @@ -67,8 +73,7 @@ except ImportError: class LookupModule(LookupBase): - def run(self, terms, variables, **kwargs): - + def run(self, terms, variables=None, **kwargs): ''' terms contain any number of keys to be retrieved. If terms is None, all keys from the database are returned @@ -81,17 +86,15 @@ class LookupModule(LookupBase): vars: - lmdb_kv_db: "jp.mdb" ''' - if HAVE_LMDB is False: raise AnsibleError("Can't LOOKUP(lmdb_kv): this module requires lmdb to be installed") - db = variables.get('lmdb_kv_db', None) - if db is None: - db = kwargs.get('db', 'ansible.mdb') - db = str(db) + self.set_options(var_options=variables, direct=kwargs) + + db = self.get_option('db') try: - env = lmdb.open(db, readonly=True) + env = lmdb.open(str(db), readonly=True) except Exception as e: raise AnsibleError("LMDB can't open database %s: %s" % (db, to_native(e))) diff --git a/plugins/lookup/manifold.py b/plugins/lookup/manifold.py index 9d2913063a..51064b9c2b 100644 --- a/plugins/lookup/manifold.py +++ b/plugins/lookup/manifold.py @@ -207,7 +207,7 @@ class ManifoldApiClient(object): class LookupModule(LookupBase): - def run(self, terms, variables=None, api_token=None, project=None, team=None): + def run(self, terms, variables=None, **kwargs): """ :param terms: a list of resources lookups to run. :param variables: ansible variables active at the time of the lookup @@ -217,10 +217,11 @@ class LookupModule(LookupBase): :return: a dictionary of resources credentials """ - if not api_token: - api_token = os.getenv('MANIFOLD_API_TOKEN') - if not api_token: - raise AnsibleError('API token is required. Please set api_token parameter or MANIFOLD_API_TOKEN env var') + self.set_options(var_options=variables, direct=kwargs) + + api_token = self.get_option('api_token') + project = self.get_option('project') + team = self.get_option('team') try: labels = terms diff --git a/plugins/lookup/shelvefile.py b/plugins/lookup/shelvefile.py index c1aaef83ce..35f1097c8b 100644 --- a/plugins/lookup/shelvefile.py +++ b/plugins/lookup/shelvefile.py @@ -14,23 +14,24 @@ DOCUMENTATION = ''' - Read keys from Python shelve file. options: _terms: - description: sets of key value pairs of parameters + description: Sets of key value pairs of parameters. key: - description: key to query + description: Key to query. required: true file: - description: path to shelve file + description: Path to shelve file. required: true ''' EXAMPLES = """ -- name: retrieve a string value corresponding to a key inside a Python shelve file - ansible.builtin.debug: msg="{{ lookup('community.general.shelvefile', 'file=path_to_some_shelve_file.db key=key_to_retrieve') }} +- name: Retrieve a string value corresponding to a key inside a Python shelve file + ansible.builtin.debug: + msg: "{{ lookup('community.general.shelvefile', 'file=path_to_some_shelve_file.db key=key_to_retrieve') }}" """ RETURN = """ _list: - description: value(s) of key(s) in shelve file(s) + description: Value(s) of key(s) in shelve file(s). type: list elements: str """ @@ -53,7 +54,6 @@ class LookupModule(LookupBase): return res def run(self, terms, variables=None, **kwargs): - if not isinstance(terms, list): terms = [terms] diff --git a/tests/integration/targets/lookup_lmdb_kv/test.yml b/tests/integration/targets/lookup_lmdb_kv/test.yml index 3c39d4e251..217c020cac 100644 --- a/tests/integration/targets/lookup_lmdb_kv/test.yml +++ b/tests/integration/targets/lookup_lmdb_kv/test.yml @@ -6,10 +6,10 @@ - hosts: localhost tasks: - debug: - msg: '{{ query(''community.general.lmdb_kv'', ''nl'', ''be'', ''lu'', db=''jp.mdb'') }}' + msg: '{{ query("community.general.lmdb_kv", "nl", "be", "lu", db="jp.mdb") }}' - debug: var: item.1 - loop: '{{ query(''community.general.lmdb_kv'', db=''jp.mdb'') }}' + loop: '{{ query("community.general.lmdb_kv", db="jp.mdb") }}' - assert: that: - query('community.general.lmdb_kv', 'nl', 'be', 'lu', db='jp.mdb') == ['Netherlands', 'Belgium', 'Luxembourg'] diff --git a/tests/unit/plugins/lookup/test_manifold.py b/tests/unit/plugins/lookup/test_manifold.py index e9fd912b2b..f6f4a605a6 100644 --- a/tests/unit/plugins/lookup/test_manifold.py +++ b/tests/unit/plugins/lookup/test_manifold.py @@ -11,8 +11,10 @@ from ansible.errors import AnsibleError from ansible.module_utils.urls import ConnectionError, SSLValidationError from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError from ansible.module_utils import six +from ansible.plugins.loader import lookup_loader from ansible_collections.community.general.plugins.lookup.manifold import ManifoldApiClient, LookupModule, ApiError import json +import os API_FIXTURES = { @@ -375,8 +377,7 @@ class TestManifoldApiClient(unittest.TestCase): class TestLookupModule(unittest.TestCase): def setUp(self): - self.lookup = LookupModule() - self.lookup._load_name = "manifold" + self.lookup = lookup_loader.get('community.general.manifold') @patch('ansible_collections.community.general.plugins.lookup.manifold.ManifoldApiClient') def test_get_all(self, client_mock): @@ -515,23 +516,22 @@ class TestLookupModule(unittest.TestCase): self.lookup.run([], api_token='token-123') self.assertTrue('Exception: Unknown error' in str(context.exception)) - @patch('ansible_collections.community.general.plugins.lookup.manifold.os.getenv') @patch('ansible_collections.community.general.plugins.lookup.manifold.ManifoldApiClient') - def test_falls_back_to_env_var(self, client_mock, getenv_mock): - getenv_mock.return_value = 'token-321' + def test_falls_back_to_env_var(self, client_mock): client_mock.return_value.get_resources.return_value = [] client_mock.return_value.get_credentials.return_value = [] - self.lookup.run([]) - getenv_mock.assert_called_with('MANIFOLD_API_TOKEN') + try: + os.environ['MANIFOLD_API_TOKEN'] = 'token-321' + self.lookup.run([]) + finally: + os.environ.pop('MANIFOLD_API_TOKEN', None) client_mock.assert_called_with('token-321') - @patch('ansible_collections.community.general.plugins.lookup.manifold.os.getenv') @patch('ansible_collections.community.general.plugins.lookup.manifold.ManifoldApiClient') - def test_falls_raises_on_no_token(self, client_mock, getenv_mock): - getenv_mock.return_value = None + def test_falls_raises_on_no_token(self, client_mock): client_mock.return_value.get_resources.return_value = [] client_mock.return_value.get_credentials.return_value = [] + os.environ.pop('MANIFOLD_API_TOKEN', None) with self.assertRaises(AnsibleError) as context: self.lookup.run([]) - self.assertEqual('API token is required. Please set api_token parameter or MANIFOLD_API_TOKEN env var', - str(context.exception)) + assert 'api_token' in str(context.exception) From 47cc2a4e8e010bdf6b181be82489a3db9831ff8f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 1 Nov 2022 22:19:33 +0100 Subject: [PATCH 0284/2104] dnstxt lookup - add option to return empty list. (#5457) --- changelogs/fragments/5457-dnstxt-empty.yml | 2 ++ plugins/lookup/dnstxt.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 changelogs/fragments/5457-dnstxt-empty.yml diff --git a/changelogs/fragments/5457-dnstxt-empty.yml b/changelogs/fragments/5457-dnstxt-empty.yml new file mode 100644 index 0000000000..db4b87bca4 --- /dev/null +++ b/changelogs/fragments/5457-dnstxt-empty.yml @@ -0,0 +1,2 @@ +bugfixes: + - dnstxt lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5457, https://github.com/ansible-collections/community.general/issues/5428). diff --git a/plugins/lookup/dnstxt.py b/plugins/lookup/dnstxt.py index 396b93f436..55067dc82b 100644 --- a/plugins/lookup/dnstxt.py +++ b/plugins/lookup/dnstxt.py @@ -20,6 +20,13 @@ DOCUMENTATION = ''' required: true type: list elements: string + real_empty: + description: + - Return empty result without empty strings, and return empty list instead of C(NXDOMAIN). + - The default for this option will likely change to C(true) in the future. + default: false + type: bool + version_added: 6.0.0 ''' EXAMPLES = """ @@ -76,6 +83,8 @@ class LookupModule(LookupBase): if HAVE_DNS is False: raise AnsibleError("Can't LOOKUP(dnstxt): module dns.resolver is not installed") + real_empty = self.get_option('real_empty') + ret = [] for term in terms: domain = term.split()[0] @@ -87,10 +96,16 @@ class LookupModule(LookupBase): string.append(s[1:-1]) # Strip outside quotes on TXT rdata except dns.resolver.NXDOMAIN: + if real_empty: + continue string = 'NXDOMAIN' except dns.resolver.Timeout: + if real_empty: + continue string = '' except dns.resolver.NoAnswer: + if real_empty: + continue string = '' except DNSException as e: raise AnsibleError("dns.resolver unhandled exception %s" % to_native(e)) From ea3550d838f81450e0518169f7b75b4193ff6a87 Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Wed, 2 Nov 2022 02:40:21 -0400 Subject: [PATCH 0285/2104] Redfish: centralize payload inspection logic and OEM logic (#5425) * Redfish: centralize payload checking when performing modification requests to a Redfish service * CI fixes * Updates based on unit testing * CI fix * Modified vendor-specific logic to establish common pattern for workarounds --- ...of-configuration-logic-and-oem-checks.yaml | 2 + plugins/module_utils/redfish_utils.py | 706 +++++++----------- 2 files changed, 278 insertions(+), 430 deletions(-) create mode 100644 changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml diff --git a/changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml b/changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml new file mode 100644 index 0000000000..ec21dd22f9 --- /dev/null +++ b/changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml @@ -0,0 +1,2 @@ +bugfixes: + - redfish_utils module utils - centralize payload checking when performing modification requests to a Redfish service (https://github.com/ansible-collections/community.general/issues/5210/). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 0c1422b23b..3bd3d73676 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -39,6 +39,7 @@ class RedfishUtils(object): self.resource_id = resource_id self.data_modification = data_modification self.strip_etag_quotes = strip_etag_quotes + self._vendor = None self._init_session() def _auth_params(self, headers): @@ -61,6 +62,62 @@ class RedfishUtils(object): force_basic_auth = True return username, password, force_basic_auth + def _check_request_payload(self, req_pyld, cur_pyld, uri): + """ + Checks the request payload with the values currently held by the + service. Will check if changes are needed and if properties are + supported by the service. + + :param req_pyld: dict containing the properties to apply + :param cur_pyld: dict containing the properties currently set + :param uri: string containing the URI being modified + :return: dict containing response information + """ + + change_required = False + for prop in req_pyld: + # Check if the property is supported by the service + if prop not in cur_pyld: + return {'ret': False, + 'changed': False, + 'msg': '%s does not support the property %s' % (uri, prop), + 'changes_required': False} + + # Perform additional checks based on the type of property + if isinstance(req_pyld[prop], dict) and isinstance(cur_pyld[prop], dict): + # If the property is a dictionary, check the nested properties + sub_resp = self._check_request_payload(req_pyld[prop], cur_pyld[prop], uri) + if not sub_resp['ret']: + # Unsupported property or other error condition; no change + return sub_resp + if sub_resp['changes_required']: + # Subordinate dictionary requires changes + change_required = True + + else: + # For other properties, just compare the values + + # Note: This is also a fallthrough for cases where the request + # payload and current settings do not match in their data type. + # There are cases where this can be expected, such as when a + # property is always 'null' in responses, so we want to attempt + # the PATCH request. + + # Note: This is also a fallthrough for properties that are + # arrays of objects. Some services erroneously omit properties + # within arrays of objects when not configured, and it's + # expecting the client to provide them anyway. + + if req_pyld[prop] != cur_pyld[prop]: + change_required = True + + resp = {'ret': True, 'changes_required': change_required} + if not change_required: + # No changes required; all properties set + resp['changed'] = False + resp['msg'] = 'Properties in %s are already set' % uri + return resp + # The following functions are to send GET/POST/PATCH/DELETE requests def get_request(self, uri): req_headers = dict(GET_HEADERS) @@ -114,7 +171,7 @@ class RedfishUtils(object): 'msg': "Failed POST request to '%s': '%s'" % (uri, to_text(e))} return {'ret': True, 'headers': headers, 'resp': resp} - def patch_request(self, uri, pyld): + def patch_request(self, uri, pyld, check_pyld=False): req_headers = dict(PATCH_HEADERS) r = self.get_request(uri) if r['ret']: @@ -126,6 +183,19 @@ class RedfishUtils(object): if self.strip_etag_quotes: etag = etag.strip('"') req_headers['If-Match'] = etag + + if check_pyld: + # Check the payload with the current settings to see if changes + # are needed or if there are unsupported properties + if r['ret']: + check_resp = self._check_request_payload(pyld, r['data'], uri) + if not check_resp.pop('changes_required'): + check_resp['changed'] = False + return check_resp + else: + r['changed'] = False + return r + username, password, basic_auth = self._auth_params(req_headers) try: resp = open_url(uri, data=json.dumps(pyld), @@ -136,18 +206,18 @@ class RedfishUtils(object): use_proxy=True, timeout=self.timeout) except HTTPError as e: msg = self._get_extended_message(e) - return {'ret': False, + return {'ret': False, 'changed': False, 'msg': "HTTP Error %s on PATCH request to '%s', extended message: '%s'" % (e.code, uri, msg), 'status': e.code} except URLError as e: - return {'ret': False, 'msg': "URL Error on PATCH request to '%s': '%s'" - % (uri, e.reason)} + return {'ret': False, 'changed': False, + 'msg': "URL Error on PATCH request to '%s': '%s'" % (uri, e.reason)} # Almost all errors should be caught above, but just in case except Exception as e: - return {'ret': False, + return {'ret': False, 'changed': False, 'msg': "Failed PATCH request to '%s': '%s'" % (uri, to_text(e))} - return {'ret': True, 'resp': resp} + return {'ret': True, 'changed': True, 'resp': resp, 'msg': 'Modified %s' % uri} def delete_request(self, uri, pyld=None): req_headers = dict(DELETE_HEADERS) @@ -203,13 +273,32 @@ class RedfishUtils(object): pass def _get_vendor(self): + # If we got the vendor info once, don't get it again + if self._vendor is not None: + return {'ret': 'True', 'Vendor': self._vendor} + + # Find the vendor info from the service root response = self.get_request(self.root_uri + self.service_root) if response['ret'] is False: return {'ret': False, 'Vendor': ''} data = response['data'] + if 'Vendor' in data: + # Extract the vendor string from the Vendor property + self._vendor = data["Vendor"] return {'ret': True, 'Vendor': data["Vendor"]} + elif 'Oem' in data and len(data['Oem']) > 0: + # Determine the vendor from the OEM object if needed + vendor = list(data['Oem'].keys())[0] + if vendor == 'Hpe' or vendor == 'Hp': + # HPE uses Pascal-casing for their OEM object + # Older systems reported 'Hp' (pre-split) + vendor = 'HPE' + self._vendor = vendor + return {'ret': True, 'Vendor': vendor} else: + # Could not determine; use an empty string + self._vendor = '' return {'ret': True, 'Vendor': ''} def _find_accountservice_resource(self): @@ -756,31 +845,19 @@ class RedfishUtils(object): return self.manage_indicator_led(command, self.chassis_uri) def manage_indicator_led(self, command, resource_uri=None): - result = {} - key = 'IndicatorLED' + # If no resource is specified; default to the Chassis resource if resource_uri is None: resource_uri = self.chassis_uri + # Perform a PATCH on the IndicatorLED property based on the requested command payloads = {'IndicatorLedOn': 'Lit', 'IndicatorLedOff': 'Off', "IndicatorLedBlink": 'Blinking'} - - result = {} - response = self.get_request(self.root_uri + resource_uri) - if response['ret'] is False: - return response - result['ret'] = True - data = response['data'] - if key not in data: - return {'ret': False, 'msg': "Key %s not found" % key} - - if command in payloads.keys(): - payload = {'IndicatorLED': payloads[command]} - response = self.patch_request(self.root_uri + resource_uri, payload) - if response['ret'] is False: - return response - else: - return {'ret': False, 'msg': 'Invalid command'} - - return result + if command not in payloads.keys(): + return {'ret': False, 'msg': 'Invalid command (%s)' % command} + payload = {'IndicatorLED': payloads[command]} + resp = self.patch_request(self.root_uri + resource_uri, payload, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Set IndicatorLED to %s' % payloads[command] + return resp def _map_reset_type(self, reset_type, allowable_values): equiv_types = { @@ -971,10 +1048,7 @@ class RedfishUtils(object): payload['Password'] = user.get('account_password') if user.get('account_roleid'): payload['RoleId'] = user.get('account_roleid') - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True} + return self.patch_request(self.root_uri + uri, payload, check_pyld=True) def add_user(self, user): if not user.get('account_username'): @@ -1022,17 +1096,9 @@ class RedfishUtils(object): if not response['ret']: return response uri = response['uri'] - data = response['data'] - - if data.get('Enabled', True): - # account already enabled, nothing to do - return {'ret': True, 'changed': False} payload = {'Enabled': True} - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True} + return self.patch_request(self.root_uri + uri, payload, check_pyld=True) def delete_user_via_patch(self, user, uri=None, data=None): if not uri: @@ -1043,17 +1109,10 @@ class RedfishUtils(object): uri = response['uri'] data = response['data'] - if data and data.get('UserName') == '' and not data.get('Enabled', False): - # account UserName already cleared, nothing to do - return {'ret': True, 'changed': False} - payload = {'UserName': ''} if data.get('Enabled', False): payload['Enabled'] = False - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True} + return self.patch_request(self.root_uri + uri, payload, check_pyld=True) def delete_user(self, user): response = self._find_account_uri(username=user.get('account_username'), @@ -1090,18 +1149,10 @@ class RedfishUtils(object): acct_id=user.get('account_id')) if not response['ret']: return response + uri = response['uri'] - data = response['data'] - - if not data.get('Enabled'): - # account already disabled, nothing to do - return {'ret': True, 'changed': False} - payload = {'Enabled': False} - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True} + return self.patch_request(self.root_uri + uri, payload, check_pyld=True) def update_user_role(self, user): if not user.get('account_roleid'): @@ -1112,30 +1163,24 @@ class RedfishUtils(object): acct_id=user.get('account_id')) if not response['ret']: return response + uri = response['uri'] - data = response['data'] - - if data.get('RoleId') == user.get('account_roleid'): - # account already has RoleId , nothing to do - return {'ret': True, 'changed': False} - - payload = {'RoleId': user.get('account_roleid')} - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True} + payload = {'RoleId': user['account_roleid']} + return self.patch_request(self.root_uri + uri, payload, check_pyld=True) def update_user_password(self, user): + if not user.get('account_password'): + return {'ret': False, 'msg': + 'Must provide account_password for UpdateUserPassword command'} + response = self._find_account_uri(username=user.get('account_username'), acct_id=user.get('account_id')) if not response['ret']: return response + uri = response['uri'] payload = {'Password': user['account_password']} - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True} + return self.patch_request(self.root_uri + uri, payload, check_pyld=True) def update_user_name(self, user): if not user.get('account_updatename'): @@ -1146,53 +1191,31 @@ class RedfishUtils(object): acct_id=user.get('account_id')) if not response['ret']: return response + uri = response['uri'] payload = {'UserName': user['account_updatename']} - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True} + return self.patch_request(self.root_uri + uri, payload, check_pyld=True) def update_accountservice_properties(self, user): - if user.get('account_properties') is None: + account_properties = user.get('account_properties') + if account_properties is None: return {'ret': False, 'msg': 'Must provide account_properties for UpdateAccountServiceProperties command'} - account_properties = user.get('account_properties') - # Find AccountService + # Find the AccountService resource response = self.get_request(self.root_uri + self.service_root) if response['ret'] is False: return response data = response['data'] - if 'AccountService' not in data: + accountservice_uri = data.get("AccountService", {}).get("@odata.id") + if accountservice_uri is None: return {'ret': False, 'msg': "AccountService resource not found"} - accountservice_uri = data["AccountService"]["@odata.id"] - # Check support or not - response = self.get_request(self.root_uri + accountservice_uri) - if response['ret'] is False: - return response - data = response['data'] - for property_name in account_properties.keys(): - if property_name not in data: - return {'ret': False, 'msg': - 'property %s not supported' % property_name} - - # if properties is already matched, nothing to do - need_change = False - for property_name in account_properties.keys(): - if account_properties[property_name] != data[property_name]: - need_change = True - break - - if not need_change: - return {'ret': True, 'changed': False, 'msg': "AccountService properties already set"} - - payload = account_properties - response = self.patch_request(self.root_uri + accountservice_uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, 'msg': "Modified AccountService properties"} + # Perform a PATCH on the AccountService resource with the requested properties + resp = self.patch_request(self.root_uri + accountservice_uri, account_properties, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Modified account service' + return resp def get_sessions(self): result = {} @@ -1235,7 +1258,7 @@ class RedfishUtils(object): # if no active sessions, return as success if data['Members@odata.count'] == 0: - return {'ret': True, 'changed': False, 'msg': "There is no active sessions"} + return {'ret': True, 'changed': False, 'msg': "There are no active sessions"} # loop to delete every active session for session in data[u'Members']: @@ -1243,7 +1266,7 @@ class RedfishUtils(object): if response['ret'] is False: return response - return {'ret': True, 'changed': True, 'msg': "Clear all sessions successfully"} + return {'ret': True, 'changed': True, 'msg': "Cleared all sessions successfully"} def create_session(self): if not self.creds.get('user') or not self.creds.get('pswd'): @@ -1560,60 +1583,52 @@ class RedfishUtils(object): return self.aggregate_systems(self.get_boot_override) def set_bios_default_settings(self): - result = {} - key = "Bios" - - # Search for 'key' entry and extract URI from it + # Find the Bios resource from the requested ComputerSystem resource response = self.get_request(self.root_uri + self.systems_uri) if response['ret'] is False: return response - result['ret'] = True data = response['data'] + bios_uri = data.get('Bios', {}).get('@odata.id') + if bios_uri is None: + return {'ret': False, 'msg': 'Bios resource not found'} - if key not in data: - return {'ret': False, 'msg': "Key %s not found" % key} - - bios_uri = data[key]["@odata.id"] - - # Extract proper URI + # Find the URI of the ResetBios action response = self.get_request(self.root_uri + bios_uri) if response['ret'] is False: return response - result['ret'] = True data = response['data'] - reset_bios_settings_uri = data["Actions"]["#Bios.ResetBios"]["target"] + reset_bios_uri = data.get('Actions', {}).get('#Bios.ResetBios', {}).get('target') + if reset_bios_uri is None: + return {'ret': False, 'msg': 'ResetBios action not found'} - response = self.post_request(self.root_uri + reset_bios_settings_uri, {}) + # Perform the ResetBios action + response = self.post_request(self.root_uri + reset_bios_uri, {}) if response['ret'] is False: return response - return {'ret': True, 'changed': True, 'msg': "Set BIOS to default settings"} + return {'ret': True, 'changed': True, 'msg': "BIOS set to default settings"} def set_boot_override(self, boot_opts): - result = {} - key = "Boot" - + # Extract the requested boot override options bootdevice = boot_opts.get('bootdevice') uefi_target = boot_opts.get('uefi_target') boot_next = boot_opts.get('boot_next') override_enabled = boot_opts.get('override_enabled') boot_override_mode = boot_opts.get('boot_override_mode') - if not bootdevice and override_enabled != 'Disabled': return {'ret': False, 'msg': "bootdevice option required for temporary boot override"} - # Search for 'key' entry and extract URI from it + # Get the current boot override options from the Boot property response = self.get_request(self.root_uri + self.systems_uri) if response['ret'] is False: return response - result['ret'] = True data = response['data'] + boot = data.get('Boot') + if boot is None: + return {'ret': False, 'msg': "Boot property not found"} + cur_override_mode = boot.get('BootSourceOverrideMode') - if key not in data: - return {'ret': False, 'msg': "Key %s not found" % key} - - boot = data[key] - + # Check if the requested target is supported by the system if override_enabled != 'Disabled': annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues' if annotation in boot: @@ -1623,26 +1638,18 @@ class RedfishUtils(object): 'msg': "Boot device %s not in list of allowable values (%s)" % (bootdevice, allowable_values)} - # read existing values - cur_enabled = boot.get('BootSourceOverrideEnabled') - target = boot.get('BootSourceOverrideTarget') - cur_uefi_target = boot.get('UefiTargetBootSourceOverride') - cur_boot_next = boot.get('BootNext') - cur_override_mode = boot.get('BootSourceOverrideMode') - + # Build the request payload based on the desired boot override options if override_enabled == 'Disabled': payload = { 'Boot': { - 'BootSourceOverrideEnabled': override_enabled + 'BootSourceOverrideEnabled': override_enabled, + 'BootSourceOverrideTarget': 'None' } } elif bootdevice == 'UefiTarget': if not uefi_target: return {'ret': False, 'msg': "uefi_target option required to SetOneTimeBoot for UefiTarget"} - if override_enabled == cur_enabled and target == bootdevice and uefi_target == cur_uefi_target: - # If properties are already set, no changes needed - return {'ret': True, 'changed': False} payload = { 'Boot': { 'BootSourceOverrideEnabled': override_enabled, @@ -1650,13 +1657,13 @@ class RedfishUtils(object): 'UefiTargetBootSourceOverride': uefi_target } } + # If needed, also specify UEFI mode + if cur_override_mode == 'Legacy': + payload['Boot']['BootSourceOverrideMode'] = 'UEFI' elif bootdevice == 'UefiBootNext': if not boot_next: return {'ret': False, 'msg': "boot_next option required to SetOneTimeBoot for UefiBootNext"} - if cur_enabled == override_enabled and target == bootdevice and boot_next == cur_boot_next: - # If properties are already set, no changes needed - return {'ret': True, 'changed': False} payload = { 'Boot': { 'BootSourceOverrideEnabled': override_enabled, @@ -1664,11 +1671,10 @@ class RedfishUtils(object): 'BootNext': boot_next } } + # If needed, also specify UEFI mode + if cur_override_mode == 'Legacy': + payload['Boot']['BootSourceOverrideMode'] = 'UEFI' else: - if (cur_enabled == override_enabled and target == bootdevice and - (cur_override_mode == boot_override_mode or not boot_override_mode)): - # If properties are already set, no changes needed - return {'ret': True, 'changed': False} payload = { 'Boot': { 'BootSourceOverrideEnabled': override_enabled, @@ -1678,32 +1684,35 @@ class RedfishUtils(object): if boot_override_mode: payload['Boot']['BootSourceOverrideMode'] = boot_override_mode - response = self.patch_request(self.root_uri + self.systems_uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True} + # Apply the requested boot override request + resp = self.patch_request(self.root_uri + self.systems_uri, payload, check_pyld=True) + if resp['ret'] is False: + # WORKAROUND + # Older Dell systems do not allow BootSourceOverrideEnabled to be + # specified with UefiTarget as the target device + vendor = self._get_vendor()['Vendor'] + if vendor == 'Dell': + if bootdevice == 'UefiTarget' and override_enabled != 'Disabled': + payload['Boot'].pop('BootSourceOverrideEnabled', None) + resp = self.patch_request(self.root_uri + self.systems_uri, payload, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Updated the boot override settings' + return resp def set_bios_attributes(self, attributes): - result = {} - key = "Bios" - - # Search for 'key' entry and extract URI from it + # Find the Bios resource from the requested ComputerSystem resource response = self.get_request(self.root_uri + self.systems_uri) if response['ret'] is False: return response - result['ret'] = True data = response['data'] + bios_uri = data.get('Bios', {}).get('@odata.id') + if bios_uri is None: + return {'ret': False, 'msg': 'Bios resource not found'} - if key not in data: - return {'ret': False, 'msg': "Key %s not found" % key} - - bios_uri = data[key]["@odata.id"] - - # Extract proper URI + # Get the current BIOS settings response = self.get_request(self.root_uri + bios_uri) if response['ret'] is False: return response - result['ret'] = True data = response['data'] # Make a copy of the attributes dict @@ -1726,7 +1735,7 @@ class RedfishUtils(object): warning = "" if attrs_bad: - warning = "Incorrect attributes %s" % (attrs_bad) + warning = "Unsupported attributes %s" % (attrs_bad) # Return success w/ changed=False if no attrs need to be changed if not attrs_to_patch: @@ -1734,8 +1743,10 @@ class RedfishUtils(object): 'msg': "BIOS attributes already set", 'warning': warning} - # Get the SettingsObject URI - set_bios_attr_uri = data["@Redfish.Settings"]["SettingsObject"]["@odata.id"] + # Get the SettingsObject URI to apply the attributes + set_bios_attr_uri = data.get("@Redfish.Settings", {}).get("SettingsObject", {}).get("@odata.id") + if set_bios_attr_uri is None: + return {'ret': False, 'msg': "Settings resource for BIOS attributes not found."} # Construct payload and issue PATCH command payload = {"Attributes": attrs_to_patch} @@ -1765,7 +1776,7 @@ class RedfishUtils(object): boot_order = boot['BootOrder'] boot_options_dict = self._get_boot_options_dict(boot) - # validate boot_list against BootOptionReferences if available + # Verify the requested boot options are valid if boot_options_dict: boot_option_references = boot_options_dict.keys() for ref in boot_list: @@ -1773,20 +1784,16 @@ class RedfishUtils(object): return {'ret': False, 'msg': "BootOptionReference %s not found in BootOptions" % ref} - # If requested BootOrder is already set, nothing to do - if boot_order == boot_list: - return {'ret': True, 'changed': False, - 'msg': "BootOrder already set to %s" % boot_list} - + # Apply the boot order payload = { 'Boot': { 'BootOrder': boot_list } } - response = self.patch_request(self.root_uri + systems_uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, 'msg': "BootOrder set"} + resp = self.patch_request(self.root_uri + systems_uri, payload, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Modified the boot order' + return resp def set_default_boot_order(self): systems_uri = self.systems_uri @@ -2243,7 +2250,7 @@ class RedfishUtils(object): return resources, headers @staticmethod - def _insert_virt_media_payload(options, param_map, data, ai, image_only=False): + def _insert_virt_media_payload(options, param_map, data, ai): payload = { 'Image': options.get('image_url') } @@ -2257,12 +2264,6 @@ class RedfishUtils(object): options.get(option), option, allowable)} payload[param] = options.get(option) - - # Some hardware (such as iLO 4 or Supermicro) only supports the Image property - # Inserted and WriteProtected are not writable - if image_only: - del payload['Inserted'] - del payload['WriteProtected'] return payload def virtual_media_insert_via_patch(self, options, param_map, uri, data, image_only=False): @@ -2271,15 +2272,25 @@ class RedfishUtils(object): {'AllowableValues': v}) for k, v in data.items() if k.endswith('@Redfish.AllowableValues')) # construct payload - payload = self._insert_virt_media_payload(options, param_map, data, ai, image_only) + payload = self._insert_virt_media_payload(options, param_map, data, ai) if 'Inserted' not in payload and not image_only: + # Add Inserted to the payload if needed payload['Inserted'] = True # PATCH the resource - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, 'msg': "VirtualMedia inserted"} + resp = self.patch_request(self.root_uri + uri, payload, check_pyld=True) + if resp['ret'] is False: + # WORKAROUND + # Older HPE systems with iLO 4 and Supermicro do not support + # specifying Inserted or WriteProtected + vendor = self._get_vendor()['Vendor'] + if vendor == 'HPE' or vendor == 'Supermicro': + payload.pop('Inserted', None) + payload.pop('WriteProtected', None) + resp = self.patch_request(self.root_uri + uri, payload, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'VirtualMedia inserted' + return resp def virtual_media_insert(self, options, resource_type='Manager'): param_map = { @@ -2290,7 +2301,6 @@ class RedfishUtils(object): 'TransferProtocolType': 'transfer_protocol_type', 'TransferMethod': 'transfer_method' } - image_only = False image_url = options.get('image_url') if not image_url: return {'ret': False, @@ -2310,18 +2320,6 @@ class RedfishUtils(object): if 'VirtualMedia' not in data: return {'ret': False, 'msg': "VirtualMedia resource not found"} - # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation - # Inserted and WriteProtected are not writable - if "FirmwareVersion" in data and data["FirmwareVersion"].startswith("iLO 4"): - image_only = True - - # Supermicro does also not support Inserted and WriteProtected - # Supermicro uses as firmware version only a number so we can't check for it because we - # can't be sure that this firmware version is nut used by another vendor - # Tested with Supermicro Firmware 01.74.02 - if 'Supermicro' in data['Oem']: - image_only = True - virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: @@ -2365,7 +2363,7 @@ class RedfishUtils(object): 'msg': "%s action not found and PATCH not allowed" % '#VirtualMedia.InsertMedia'} return self.virtual_media_insert_via_patch(options, param_map, - uri, data, image_only) + uri, data) # get the action property action = data['Actions']['#VirtualMedia.InsertMedia'] @@ -2377,9 +2375,18 @@ class RedfishUtils(object): # get ActionInfo or AllowableValues ai = self._get_all_action_info_values(action) # construct payload - payload = self._insert_virt_media_payload(options, param_map, data, ai, image_only) + payload = self._insert_virt_media_payload(options, param_map, data, ai) # POST to action response = self.post_request(self.root_uri + action_uri, payload) + if response['ret'] is False and ('Inserted' in payload or 'WriteProtected' in payload): + # WORKAROUND + # Older HPE systems with iLO 4 and Supermicro do not support + # specifying Inserted or WriteProtected + vendor = self._get_vendor()['Vendor'] + if vendor == 'HPE' or vendor == 'Supermicro': + payload.pop('Inserted', None) + payload.pop('WriteProtected', None) + response = self.post_request(self.root_uri + action_uri, payload) if response['ret'] is False: return response return {'ret': True, 'changed': True, 'msg': "VirtualMedia inserted"} @@ -2391,17 +2398,23 @@ class RedfishUtils(object): 'Image': None } - # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation # Inserted is not writable if image_only: del payload['Inserted'] # PATCH resource - response = self.patch_request(self.root_uri + uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, - 'msg': "VirtualMedia ejected"} + resp = self.patch_request(self.root_uri + uri, payload, check_pyld=True) + if resp['ret'] is False and 'Inserted' in payload: + # WORKAROUND + # Older HPE systems with iLO 4 and Supermicro do not support + # specifying Inserted + vendor = self._get_vendor()['Vendor'] + if vendor == 'HPE' or vendor == 'Supermicro': + payload.pop('Inserted', None) + resp = self.patch_request(self.root_uri + uri, payload, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'VirtualMedia ejected' + return resp def virtual_media_eject(self, options, resource_type='Manager'): image_url = options.get('image_url') @@ -2422,15 +2435,6 @@ class RedfishUtils(object): if 'VirtualMedia' not in data: return {'ret': False, 'msg': "VirtualMedia resource not found"} - # Some hardware (such as iLO 4) only supports the Image property on the PATCH operation - # Inserted is not writable - image_only = False - if "FirmwareVersion" in data and data["FirmwareVersion"].startswith("iLO 4"): - image_only = True - - if 'Supermicro' in data['Oem']: - image_only = True - virt_media_uri = data["VirtualMedia"]["@odata.id"] response = self.get_request(self.root_uri + virt_media_uri) if response['ret'] is False: @@ -2455,7 +2459,7 @@ class RedfishUtils(object): return {'ret': False, 'msg': "%s action not found and PATCH not allowed" % '#VirtualMedia.EjectMedia'} - return self.virtual_media_eject_via_patch(uri, image_only) + return self.virtual_media_eject_via_patch(uri) else: # POST to the EjectMedia Action action = data['Actions']['#VirtualMedia.EjectMedia'] @@ -2623,43 +2627,20 @@ class RedfishUtils(object): else: payload[service_name][service_property] = value - # Find NetworkProtocol + # Find the ManagerNetworkProtocol resource response = self.get_request(self.root_uri + self.manager_uri) if response['ret'] is False: return response data = response['data'] - if 'NetworkProtocol' not in data: + networkprotocol_uri = data.get("NetworkProtocol", {}).get("@odata.id") + if networkprotocol_uri is None: return {'ret': False, 'msg': "NetworkProtocol resource not found"} - networkprotocol_uri = data["NetworkProtocol"]["@odata.id"] - # Check service property support or not - response = self.get_request(self.root_uri + networkprotocol_uri) - if response['ret'] is False: - return response - data = response['data'] - for service_name in payload.keys(): - if service_name not in data: - return {'ret': False, 'msg': "%s service not supported" % service_name} - for service_property in payload[service_name].keys(): - if service_property not in data[service_name]: - return {'ret': False, 'msg': "%s property for %s service not supported" % (service_property, service_name)} - - # if the protocol is already set, nothing to do - need_change = False - for service_name in payload.keys(): - for service_property in payload[service_name].keys(): - value = payload[service_name][service_property] - if value != data[service_name][service_property]: - need_change = True - break - - if not need_change: - return {'ret': True, 'changed': False, 'msg': "Manager NetworkProtocol services already set"} - - response = self.patch_request(self.root_uri + networkprotocol_uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, 'msg': "Modified Manager NetworkProtocol services"} + # Modify the ManagerNetworkProtocol resource + resp = self.patch_request(self.root_uri + networkprotocol_uri, payload, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Modified manager network protocol settings' + return resp @staticmethod def to_singular(resource_name): @@ -2794,66 +2775,27 @@ class RedfishUtils(object): target_ethernet_current_setting = nic_info['ethernet_setting'] # Convert input to payload and check validity + # Note: Some properties in the EthernetInterface resource are arrays of + # objects. The call into this module expects a flattened view, meaning + # the user specifies exactly one object for an array property. For + # example, if a user provides IPv4StaticAddresses in the request to this + # module, it will turn that into an array of one member. This pattern + # should be avoided for future commands in this module, but needs to be + # preserved here for backwards compatibility. payload = {} for property in nic_config.keys(): value = nic_config[property] - if property not in target_ethernet_current_setting: - return {'ret': False, 'msg': "Property %s in nic_config is invalid" % property} - if isinstance(value, dict): - if isinstance(target_ethernet_current_setting[property], dict): - payload[property] = value - elif isinstance(target_ethernet_current_setting[property], list): - payload[property] = list() - payload[property].append(value) - else: - return {'ret': False, 'msg': "Value of property %s in nic_config is invalid" % property} + if property in target_ethernet_current_setting and isinstance(value, dict) and isinstance(target_ethernet_current_setting[property], list): + payload[property] = list() + payload[property].append(value) else: payload[property] = value - # If no need change, nothing to do. If error detected, report it - need_change = False - for property in payload.keys(): - set_value = payload[property] - cur_value = target_ethernet_current_setting[property] - # type is simple(not dict/list) - if not isinstance(set_value, dict) and not isinstance(set_value, list): - if set_value != cur_value: - need_change = True - # type is dict - if isinstance(set_value, dict): - for subprop in payload[property].keys(): - if subprop not in target_ethernet_current_setting[property]: - # Not configured already; need to apply the request - need_change = True - break - sub_set_value = payload[property][subprop] - sub_cur_value = target_ethernet_current_setting[property][subprop] - if sub_set_value != sub_cur_value: - need_change = True - # type is list - if isinstance(set_value, list): - if len(set_value) != len(cur_value): - # if arrays are not the same len, no need to check each element - need_change = True - continue - for i in range(len(set_value)): - for subprop in payload[property][i].keys(): - if subprop not in target_ethernet_current_setting[property][i]: - # Not configured already; need to apply the request - need_change = True - break - sub_set_value = payload[property][i][subprop] - sub_cur_value = target_ethernet_current_setting[property][i][subprop] - if sub_set_value != sub_cur_value: - need_change = True - - if not need_change: - return {'ret': True, 'changed': False, 'msg': "Manager NIC already set"} - - response = self.patch_request(self.root_uri + target_ethernet_uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, 'msg': "Modified Manager NIC"} + # Modify the EthernetInterface resource + resp = self.patch_request(self.root_uri + target_ethernet_uri, payload, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Modified manager NIC' + return resp # A helper function to get the EthernetInterface URI def get_manager_ethernet_uri(self, nic_addr='null'): @@ -2900,23 +2842,27 @@ class RedfishUtils(object): return nic_info def set_hostinterface_attributes(self, hostinterface_config, hostinterface_id=None): + if hostinterface_config is None: + return {'ret': False, 'msg': + 'Must provide hostinterface_config for SetHostInterface command'} + + # Find the HostInterfaceCollection resource response = self.get_request(self.root_uri + self.manager_uri) if response['ret'] is False: return response data = response['data'] - if 'HostInterfaces' not in data: - return {'ret': False, 'msg': "HostInterfaces resource not found"} - - hostinterfaces_uri = data["HostInterfaces"]["@odata.id"] + hostinterfaces_uri = data.get("HostInterfaces", {}).get("@odata.id") + if hostinterfaces_uri is None: + return {'ret': False, 'msg': "HostInterface resource not found"} response = self.get_request(self.root_uri + hostinterfaces_uri) if response['ret'] is False: return response data = response['data'] uris = [a.get('@odata.id') for a in data.get('Members', []) if a.get('@odata.id')] - # Capture list of URIs that match a specified HostInterface resource ID + + # Capture list of URIs that match a specified HostInterface resource Id if hostinterface_id: matching_hostinterface_uris = [uri for uri in uris if hostinterface_id in uri.split('/')[-1]] - if hostinterface_id and matching_hostinterface_uris: hostinterface_uri = list.pop(matching_hostinterface_uris) elif hostinterface_id and not matching_hostinterface_uris: @@ -2926,62 +2872,11 @@ class RedfishUtils(object): else: return {'ret': False, 'msg': "HostInterface ID not defined and multiple interfaces detected."} - response = self.get_request(self.root_uri + hostinterface_uri) - if response['ret'] is False: - return response - current_hostinterface_config = response['data'] - payload = {} - for property in hostinterface_config.keys(): - value = hostinterface_config[property] - if property not in current_hostinterface_config: - return {'ret': False, 'msg': "Property %s in hostinterface_config is invalid" % property} - if isinstance(value, dict): - if isinstance(current_hostinterface_config[property], dict): - payload[property] = value - elif isinstance(current_hostinterface_config[property], list): - payload[property] = list() - payload[property].append(value) - else: - return {'ret': False, 'msg': "Value of property %s in hostinterface_config is invalid" % property} - else: - payload[property] = value - - need_change = False - for property in payload.keys(): - set_value = payload[property] - cur_value = current_hostinterface_config[property] - if not isinstance(set_value, dict) and not isinstance(set_value, list): - if set_value != cur_value: - need_change = True - if isinstance(set_value, dict): - for subprop in payload[property].keys(): - if subprop not in current_hostinterface_config[property]: - need_change = True - break - sub_set_value = payload[property][subprop] - sub_cur_value = current_hostinterface_config[property][subprop] - if sub_set_value != sub_cur_value: - need_change = True - if isinstance(set_value, list): - if len(set_value) != len(cur_value): - need_change = True - continue - for i in range(len(set_value)): - for subprop in payload[property][i].keys(): - if subprop not in current_hostinterface_config[property][i]: - need_change = True - break - sub_set_value = payload[property][i][subprop] - sub_cur_value = current_hostinterface_config[property][i][subprop] - if sub_set_value != sub_cur_value: - need_change = True - if not need_change: - return {'ret': True, 'changed': False, 'msg': "Host Interface already configured"} - - response = self.patch_request(self.root_uri + hostinterface_uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, 'msg': "Modified Host Interface"} + # Modify the HostInterface resource + resp = self.patch_request(self.root_uri + hostinterface_uri, hostinterface_config, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Modified host interface' + return resp def get_hostinterfaces(self): result = {} @@ -2997,10 +2892,8 @@ class RedfishUtils(object): result['ret'] = True data = response['data'] - - if 'HostInterfaces' in data: - hostinterfaces_uri = data[u'HostInterfaces'][u'@odata.id'] - else: + hostinterfaces_uri = data.get("HostInterfaces", {}).get("@odata.id") + if hostinterfaces_uri is None: continue response = self.get_request(self.root_uri + hostinterfaces_uri) @@ -3084,58 +2977,11 @@ class RedfishUtils(object): return self.aggregate_managers(self.get_manager_inventory) def set_session_service(self, sessions_config): - result = {} - response = self.get_request(self.root_uri + self.session_service_uri) - if response['ret'] is False: - return response - current_sessions_config = response['data'] - payload = {} - for property, value in sessions_config.items(): - value = sessions_config[property] - if property not in current_sessions_config: - return {'ret': False, 'msg': "Property %s in sessions_config is invalid" % property} - if isinstance(value, dict): - if isinstance(current_sessions_config[property], dict): - payload[property] = value - elif isinstance(current_sessions_config[property], list): - payload[property] = [value] - else: - return {'ret': False, 'msg': "Value of property %s in sessions_config is invalid" % property} - else: - payload[property] = value + if sessions_config is None: + return {'ret': False, 'msg': + 'Must provide sessions_config for SetSessionService command'} - need_change = False - for property, set_value in payload.items(): - cur_value = current_sessions_config[property] - if not isinstance(set_value, (dict, list)): - if set_value != cur_value: - need_change = True - if isinstance(set_value, dict): - for subprop in set_value.keys(): - if subprop not in current_sessions_config[property]: - need_change = True - break - sub_set_value = set_value[subprop] - sub_cur_value = current_sessions_config[property][subprop] - if sub_set_value != sub_cur_value: - need_change = True - if isinstance(set_value, list): - if len(set_value) != len(cur_value): - need_change = True - continue - for i in range(len(set_value)): - for subprop in set_value[i].keys(): - if subprop not in current_sessions_config[property][i]: - need_change = True - break - sub_set_value = set_value[i][subprop] - sub_cur_value = current_sessions_config[property][i][subprop] - if sub_set_value != sub_cur_value: - need_change = True - if not need_change: - return {'ret': True, 'changed': False, 'msg': "SessionService already configured"} - - response = self.patch_request(self.root_uri + self.session_service_uri, payload) - if response['ret'] is False: - return response - return {'ret': True, 'changed': True, 'msg': "Modified SessionService"} + resp = self.patch_request(self.root_uri + self.session_service_uri, sessions_config, check_pyld=True) + if resp['ret'] and resp['changed']: + resp['msg'] = 'Modified session service' + return resp From 5fe0f5703305f1114225f278913986a131220c5e Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Wed, 2 Nov 2022 20:11:04 +0100 Subject: [PATCH 0286/2104] [Scaleway] Add module to manage function namespaces (#5415) * [Scaleway] Add module to manage function namespaces Signed-off-by: Lunik * rename short_descriptions Signed-off-by: Lunik * handle changed verification on hashed secret values Signed-off-by: Lunik * fix syntax for python 2.6 Signed-off-by: Lunik * fix missing argon2 in unittest Signed-off-by: Lunik * fix missing value on description field Signed-off-by: Lunik Signed-off-by: Lunik --- .github/BOTMETA.yml | 4 + meta/runtime.yml | 4 + plugins/module_utils/scaleway.py | 50 ++- .../scaleway/scaleway_function_namespace.py | 289 ++++++++++++++++++ .../scaleway_function_namespace_info.py | 142 +++++++++ .../scaleway_function_namespace/aliases | 6 + .../defaults/main.yml | 15 + .../tasks/main.yml | 260 ++++++++++++++++ .../scaleway_function_namespace_info/aliases | 6 + .../defaults/main.yml | 13 + .../tasks/main.yml | 43 +++ .../module_utils/cloud/test_scaleway.py | 128 ++++++++ tests/unit/requirements.txt | 3 + 13 files changed, 962 insertions(+), 1 deletion(-) create mode 100644 plugins/modules/cloud/scaleway/scaleway_function_namespace.py create mode 100644 plugins/modules/cloud/scaleway/scaleway_function_namespace_info.py create mode 100644 tests/integration/targets/scaleway_function_namespace/aliases create mode 100644 tests/integration/targets/scaleway_function_namespace/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_function_namespace/tasks/main.yml create mode 100644 tests/integration/targets/scaleway_function_namespace_info/aliases create mode 100644 tests/integration/targets/scaleway_function_namespace_info/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_function_namespace_info/tasks/main.yml create mode 100644 tests/unit/plugins/module_utils/cloud/test_scaleway.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 4aaea6b773..5db3a6e6bd 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -468,6 +468,10 @@ files: maintainers: Lunik $modules/cloud/scaleway/scaleway_database_backup.py: maintainers: guillaume_ro_fr + $modules/cloud/scaleway/scaleway_function_namespace.py: + maintainers: Lunik + $modules/cloud/scaleway/scaleway_function_namespace_info.py: + maintainers: Lunik $modules/cloud/scaleway/scaleway_image_info.py: maintainers: Spredzy $modules/cloud/scaleway/scaleway_ip_info.py: diff --git a/meta/runtime.yml b/meta/runtime.yml index 350edaee11..9f9574afad 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1385,6 +1385,10 @@ plugin_routing: redirect: community.general.cloud.scaleway.scaleway_container_registry_info scaleway_database_backup: redirect: community.general.cloud.scaleway.scaleway_database_backup + scaleway_function_namespace: + redirect: community.general.cloud.scaleway.scaleway_function_namespace + scaleway_function_namespace_info: + redirect: community.general.cloud.scaleway.scaleway_function_namespace_info scaleway_image_facts: tombstone: removal_version: 3.0.0 diff --git a/plugins/module_utils/scaleway.py b/plugins/module_utils/scaleway.py index ee22d0f183..a44c52aa78 100644 --- a/plugins/module_utils/scaleway.py +++ b/plugins/module_utils/scaleway.py @@ -11,11 +11,21 @@ import re import sys import datetime import time +import traceback -from ansible.module_utils.basic import env_fallback +from ansible.module_utils.basic import env_fallback, missing_required_lib from ansible.module_utils.urls import fetch_url from ansible.module_utils.six.moves.urllib.parse import urlencode +SCALEWAY_SECRET_IMP_ERR = None +try: + from passlib.hash import argon2 + HAS_SCALEWAY_SECRET_PACKAGE = True +except Exception: + argon2 = None + SCALEWAY_SECRET_IMP_ERR = traceback.format_exc() + HAS_SCALEWAY_SECRET_PACKAGE = False + def scaleway_argument_spec(): return dict( @@ -80,6 +90,44 @@ def filter_sensitive_attributes(container, attributes): return container +class SecretVariables(object): + @staticmethod + def ensure_scaleway_secret_package(module): + if not HAS_SCALEWAY_SECRET_PACKAGE: + module.fail_json( + msg=missing_required_lib("passlib[argon2]", url='https://passlib.readthedocs.io/en/stable/'), + exception=SCALEWAY_SECRET_IMP_ERR + ) + + @staticmethod + def dict_to_list(source_dict): + return [ + dict(key=var[0], value=var[1]) + for var in source_dict.items() + ] + + @staticmethod + def list_to_dict(source_list, hashed=False): + key_value = 'hashed_value' if hashed else 'value' + return dict( + (var['key'], var[key_value]) + for var in source_list + ) + + @classmethod + def decode(cls, secrets_list, values_list): + secrets_dict = cls.list_to_dict(secrets_list, hashed=True) + values_dict = cls.list_to_dict(values_list, hashed=False) + for key in values_dict: + if key in secrets_dict: + if argon2.verify(values_dict[key], secrets_dict[key]): + secrets_dict[key] = values_dict[key] + else: + secrets_dict[key] = secrets_dict[key] + + return cls.dict_to_list(secrets_dict) + + def resource_attributes_should_be_changed(target, wished, verifiable_mutable_attributes, mutable_attributes): diff = dict() for attr in verifiable_mutable_attributes: diff --git a/plugins/modules/cloud/scaleway/scaleway_function_namespace.py b/plugins/modules/cloud/scaleway/scaleway_function_namespace.py new file mode 100644 index 0000000000..213666cdd3 --- /dev/null +++ b/plugins/modules/cloud/scaleway/scaleway_function_namespace.py @@ -0,0 +1,289 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless function namespace management module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_function_namespace +short_description: Scaleway Function namespace management +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module manages function namespaces on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + - community.general.scaleway_waitable_resource +requirements: + - passlib[argon2] >= 1.7.4 + +options: + state: + type: str + description: + - Indicate desired state of the function namespace. + default: present + choices: + - present + - absent + + project_id: + type: str + description: + - Project identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the function namespace. + required: true + + description: + description: + - Description of the function namespace. + type: str + default: '' + + environment_variables: + description: + - Environment variables of the function namespace. + - Injected in functions at runtime. + type: dict + + secret_environment_variables: + description: + - Secret environment variables of the function namespace. + - Updating thoses values will not output a C(changed) state in Ansible. + - Injected in functions at runtime. + type: dict +''' + +EXAMPLES = ''' +- name: Create a function namespace + community.general.scaleway_function_namespace: + project_id: '{{ scw_project }}' + state: present + region: fr-par + name: my-awesome-function-namespace + environment_variables: + MY_VAR: my_value + secret_environment_variables: + MY_SECRET_VAR: my_secret_value + register: function_namespace_creation_task + +- name: Make sure function namespace is deleted + community.general.scaleway_function_namespace: + project_id: '{{ scw_project }}' + state: absent + region: fr-par + name: my-awesome-function-namespace +''' + +RETURN = ''' +function_namespace: + description: The function namespace information. + returned: when I(state=present) + type: dict + sample: + description: "" + environment_variables: + MY_VAR: my_value + error_message: null + id: 531a1fd7-98d2-4a74-ad77-d398324304b8 + name: my-awesome-function-namespace + organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0 + project_id: d44cea58-dcb7-4c95-bff1-1105acb60a98 + region: fr-par + registry_endpoint: "" + registry_namespace_id: "" + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg + status: pending +''' + +from copy import deepcopy + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed, + SecretVariables +) +from ansible.module_utils.basic import AnsibleModule + + +STABLE_STATES = ( + "ready", + "absent" +) + +MUTABLE_ATTRIBUTES = ( + "description", + "environment_variables", + "secret_environment_variables", +) + + +def payload_from_wished_fn(wished_fn): + payload = { + "project_id": wished_fn["project_id"], + "name": wished_fn["name"], + "description": wished_fn["description"], + "environment_variables": wished_fn["environment_variables"], + "secret_environment_variables": SecretVariables.dict_to_list(wished_fn["secret_environment_variables"]) + } + + return payload + + +def absent_strategy(api, wished_fn): + changed = False + + fn_list = api.fetch_all_resources("namespaces") + fn_lookup = dict((fn["name"], fn) + for fn in fn_list) + + if wished_fn["name"] not in fn_lookup: + return changed, {} + + target_fn = fn_lookup[wished_fn["name"]] + changed = True + if api.module.check_mode: + return changed, {"status": "Function namespace would be destroyed"} + + api.wait_to_complete_state_transition(resource=target_fn, stable_states=STABLE_STATES, force_wait=True) + response = api.delete(path=api.api_path + "/%s" % target_fn["id"]) + if not response.ok: + api.module.fail_json(msg='Error deleting function namespace [{0}: {1}]'.format( + response.status_code, response.json)) + + api.wait_to_complete_state_transition(resource=target_fn, stable_states=STABLE_STATES) + return changed, response.json + + +def present_strategy(api, wished_fn): + changed = False + + fn_list = api.fetch_all_resources("namespaces") + fn_lookup = dict((fn["name"], fn) + for fn in fn_list) + + payload_fn = payload_from_wished_fn(wished_fn) + + if wished_fn["name"] not in fn_lookup: + changed = True + if api.module.check_mode: + return changed, {"status": "A function namespace would be created."} + + # Create function namespace + api.warn(payload_fn) + creation_response = api.post(path=api.api_path, + data=payload_fn) + + if not creation_response.ok: + msg = "Error during function namespace creation: %s: '%s' (%s)" % (creation_response.info['msg'], + creation_response.json['message'], + creation_response.json) + api.module.fail_json(msg=msg) + + api.wait_to_complete_state_transition(resource=creation_response.json, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % creation_response.json["id"]) + return changed, response.json + + target_fn = fn_lookup[wished_fn["name"]] + decoded_target_fn = deepcopy(target_fn) + decoded_target_fn["secret_environment_variables"] = SecretVariables.decode(decoded_target_fn["secret_environment_variables"], + payload_fn["secret_environment_variables"]) + + patch_payload = resource_attributes_should_be_changed(target=decoded_target_fn, + wished=payload_fn, + verifiable_mutable_attributes=MUTABLE_ATTRIBUTES, + mutable_attributes=MUTABLE_ATTRIBUTES) + + if not patch_payload: + return changed, target_fn + + changed = True + if api.module.check_mode: + return changed, {"status": "Function namespace attributes would be changed."} + + fn_patch_response = api.patch(path=api.api_path + "/%s" % target_fn["id"], + data=patch_payload) + + if not fn_patch_response.ok: + api.module.fail_json(msg='Error during function namespace attributes update: [{0}: {1}]'.format( + fn_patch_response.status_code, fn_patch_response.json['message'])) + + api.wait_to_complete_state_transition(resource=target_fn, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % target_fn["id"]) + return changed, response.json + + +state_strategy = { + "present": present_strategy, + "absent": absent_strategy +} + + +def core(module): + SecretVariables.ensure_scaleway_secret_package(module) + + region = module.params["region"] + wished_function_namespace = { + "state": module.params["state"], + "project_id": module.params["project_id"], + "name": module.params["name"], + "description": module.params['description'], + "environment_variables": module.params['environment_variables'], + "secret_environment_variables": module.params['secret_environment_variables'] + } + + api = Scaleway(module=module) + api.api_path = "functions/v1beta1/regions/%s/namespaces" % region + + changed, summary = state_strategy[wished_function_namespace["state"]](api=api, wished_fn=wished_function_namespace) + + module.exit_json(changed=changed, function_namespace=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(scaleway_waitable_resource_argument_spec()) + argument_spec.update(dict( + state=dict(type='str', default='present', choices=['absent', 'present']), + project_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True), + description=dict(type='str', default=''), + environment_variables=dict(type='dict', default={}), + secret_environment_variables=dict(type='dict', default={}, no_log=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/cloud/scaleway/scaleway_function_namespace_info.py b/plugins/modules/cloud/scaleway/scaleway_function_namespace_info.py new file mode 100644 index 0000000000..7e02e8e42d --- /dev/null +++ b/plugins/modules/cloud/scaleway/scaleway_function_namespace_info.py @@ -0,0 +1,142 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless function namespace info module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_function_namespace_info +short_description: Retrieve information on Scaleway Function namespace +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module return information about a function namespace on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + + +options: + project_id: + type: str + description: + - Project identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the function namespace. + required: true +''' + +EXAMPLES = ''' +- name: Get a function namespace info + community.general.scaleway_function_namespace_info: + project_id: '{{ scw_project }}' + region: fr-par + name: my-awesome-function-namespace + register: function_namespace_info_task +''' + +RETURN = ''' +function_namespace: + description: The function namespace information. + returned: always + type: dict + sample: + description: "" + environment_variables: + MY_VAR: my_value + error_message: null + id: 531a1fd7-98d2-4a74-ad77-d398324304b8 + name: my-awesome-function-namespace + organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0 + project_id: d44cea58-dcb7-4c95-bff1-1105acb60a98 + region: fr-par + registry_endpoint: "" + registry_namespace_id: "" + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg + status: pending +''' + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway +) +from ansible.module_utils.basic import AnsibleModule + + +def info_strategy(api, wished_fn): + fn_list = api.fetch_all_resources("namespaces") + fn_lookup = dict((fn["name"], fn) + for fn in fn_list) + + if wished_fn["name"] not in fn_lookup: + msg = "Error during function namespace lookup: Unable to find function namespace named '%s' in project '%s'" % (wished_fn["name"], + wished_fn["project_id"]) + + api.module.fail_json(msg=msg) + + target_fn = fn_lookup[wished_fn["name"]] + + response = api.get(path=api.api_path + "/%s" % target_fn["id"]) + if not response.ok: + msg = "Error during function namespace lookup: %s: '%s' (%s)" % (response.info['msg'], + response.json['message'], + response.json) + api.module.fail_json(msg=msg) + + return response.json + + +def core(module): + region = module.params["region"] + wished_function_namespace = { + "project_id": module.params["project_id"], + "name": module.params["name"] + } + + api = Scaleway(module=module) + api.api_path = "functions/v1beta1/regions/%s/namespaces" % region + + summary = info_strategy(api=api, wished_fn=wished_function_namespace) + + module.exit_json(changed=False, function_namespace=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(dict( + project_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/scaleway_function_namespace/aliases b/tests/integration/targets/scaleway_function_namespace/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_function_namespace/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_function_namespace/defaults/main.yml b/tests/integration/targets/scaleway_function_namespace/defaults/main.yml new file mode 100644 index 0000000000..399d0ea1a3 --- /dev/null +++ b/tests/integration/targets/scaleway_function_namespace/defaults/main.yml @@ -0,0 +1,15 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +name: fn-ansible-test +description: Function namespace used for testing scaleway_function_namespace ansible module +updated_description: Function namespace used for testing scaleway_function_namespace ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value +updated_secret_environment_variables: + MY_SECRET_VAR: my_other_secret_value diff --git a/tests/integration/targets/scaleway_function_namespace/tasks/main.yml b/tests/integration/targets/scaleway_function_namespace/tasks/main.yml new file mode 100644 index 0000000000..e760a4c7fa --- /dev/null +++ b/tests/integration/targets/scaleway_function_namespace/tasks/main.yml @@ -0,0 +1,260 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create a function namespace (Check) + check_mode: yes + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_creation_check_task + +- ansible.builtin.debug: + var: fn_creation_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_creation_check_task is success + - fn_creation_check_task is changed + +- name: Create function_namespace + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_creation_task + +- ansible.builtin.debug: + var: fn_creation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_creation_task is success + - fn_creation_task is changed + - fn_creation_task.function_namespace.status == "ready" + - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + +- name: Create function namespace (Confirmation) + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_creation_confirmation_task + +- ansible.builtin.debug: + var: fn_creation_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_creation_confirmation_task is success + - fn_creation_confirmation_task is not changed + - fn_creation_confirmation_task.function_namespace.status == "ready" + - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + +- name: Update function namespace (Check) + check_mode: yes + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_update_check_task + +- ansible.builtin.debug: + var: fn_update_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_check_task is success + - fn_update_check_task is changed + +- name: Update function namespace + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_update_task + +- ansible.builtin.debug: + var: fn_update_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_task is success + - fn_update_task is changed + - fn_update_task.function_namespace.status == "ready" + - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + +- name: Update function namespace (Confirmation) + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_update_confirmation_task + +- ansible.builtin.debug: + var: fn_update_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_confirmation_task is success + - fn_update_confirmation_task is not changed + - fn_update_confirmation_task.function_namespace.status == "ready" + - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + +- name: Update function namespace secret variables (Check) + check_mode: yes + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: fn_update_secret_check_task + +- ansible.builtin.debug: + var: fn_update_secret_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_secret_check_task is success + - fn_update_secret_check_task is changed + +- name: Update function namespace secret variables + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: fn_update_secret_task + +- ansible.builtin.debug: + var: fn_update_secret_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_secret_task is success + - fn_update_secret_task is changed + - fn_update_secret_task.function_namespace.status == "ready" + - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + +- name: Update function namespace secret variables (Confirmation) + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: fn_update_secret_confirmation_task + +- ansible.builtin.debug: + var: fn_update_secret_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_secret_confirmation_task is success + - fn_update_secret_confirmation_task is not changed + - fn_update_secret_confirmation_task.function_namespace.status == "ready" + - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + +- name: Delete function namespace (Check) + check_mode: yes + community.general.scaleway_function_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: fn_deletion_check_task + +- ansible.builtin.debug: + var: fn_deletion_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_deletion_check_task is success + - fn_deletion_check_task is changed + +- name: Delete function namespace + community.general.scaleway_function_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: fn_deletion_task + +- ansible.builtin.debug: + var: fn_deletion_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_deletion_task is success + - fn_deletion_task is changed + - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + +- name: Delete function namespace (Confirmation) + community.general.scaleway_function_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: fn_deletion_confirmation_task + +- ansible.builtin.debug: + var: fn_deletion_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_deletion_confirmation_task is success + - fn_deletion_confirmation_task is not changed diff --git a/tests/integration/targets/scaleway_function_namespace_info/aliases b/tests/integration/targets/scaleway_function_namespace_info/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_function_namespace_info/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_function_namespace_info/defaults/main.yml b/tests/integration/targets/scaleway_function_namespace_info/defaults/main.yml new file mode 100644 index 0000000000..0b05eaac03 --- /dev/null +++ b/tests/integration/targets/scaleway_function_namespace_info/defaults/main.yml @@ -0,0 +1,13 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +name: fn-ansible-test +description: Function namespace used for testing scaleway_function_namespace_info ansible module +updated_description: Function namespace used for testing scaleway_function_namespace_info ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value diff --git a/tests/integration/targets/scaleway_function_namespace_info/tasks/main.yml b/tests/integration/targets/scaleway_function_namespace_info/tasks/main.yml new file mode 100644 index 0000000000..793cd09239 --- /dev/null +++ b/tests/integration/targets/scaleway_function_namespace_info/tasks/main.yml @@ -0,0 +1,43 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create function_namespace + community.general.scaleway_function_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + secret_environment_variables: '{{ secret_environment_variables }}' + +- name: Get function namespace info + community.general.scaleway_function_namespace_info: + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + register: fn_info_task + +- ansible.builtin.debug: + var: fn_info_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_info_task is success + - fn_info_task is not changed + - "'hashed_value' in fn_info_task.function_namespace.secret_environment_variables[0]" + +- name: Delete function namespace + community.general.scaleway_function_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' diff --git a/tests/unit/plugins/module_utils/cloud/test_scaleway.py b/tests/unit/plugins/module_utils/cloud/test_scaleway.py new file mode 100644 index 0000000000..3dbd7fbbbc --- /dev/null +++ b/tests/unit/plugins/module_utils/cloud/test_scaleway.py @@ -0,0 +1,128 @@ +# Copyright (c) Ansible project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import random + +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.general.plugins.module_utils.scaleway import SecretVariables, argon2 + + +class SecretVariablesTestCase(unittest.TestCase): + def test_dict_to_list(self): + source = dict( + attribute1="value1", + attribute2="value2" + ) + expect = [ + dict(key="attribute1", value="value1"), + dict(key="attribute2", value="value2") + ] + + result = SecretVariables.dict_to_list(source) + result = sorted(result, key=lambda el: el['key']) + self.assertEqual(result, expect) + + def test_list_to_dict(self): + source = [ + dict(key="secret1", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$NuZk+6UATHNFV78nFRXFvA$3kivcXfzNHI1c/4ZBpP8BeBSGhhI82NfOh4Dd48JJgc"), + dict(key="secret2", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$etGO/Z8ImYDeKr6uFsyPAQ$FbL5+hG/duDEpa8UCYqXpEUQ5EacKg6i2iAs+Dq4dAI") + ] + expect = dict( + secret1="$argon2id$v=19$m=65536,t=1,p=2$NuZk+6UATHNFV78nFRXFvA$3kivcXfzNHI1c/4ZBpP8BeBSGhhI82NfOh4Dd48JJgc", + secret2="$argon2id$v=19$m=65536,t=1,p=2$etGO/Z8ImYDeKr6uFsyPAQ$FbL5+hG/duDEpa8UCYqXpEUQ5EacKg6i2iAs+Dq4dAI" + ) + + self.assertEqual(SecretVariables.list_to_dict(source, hashed=True), expect) + + def test_list_to_dict(self): + source = [ + dict(key="secret1", value="value1"), + dict(key="secret2", value="value2") + ] + expect = dict( + secret1="value1", + secret2="value2" + ) + + self.assertEqual(SecretVariables.list_to_dict(source, hashed=False), expect) + + @unittest.skipIf(argon2 is None, "Missing required 'argon2' library") + def test_decode_full(self): + source_secret = [ + dict(key="secret1", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$NuZk+6UATHNFV78nFRXFvA$3kivcXfzNHI1c/4ZBpP8BeBSGhhI82NfOh4Dd48JJgc"), + dict(key="secret2", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$etGO/Z8ImYDeKr6uFsyPAQ$FbL5+hG/duDEpa8UCYqXpEUQ5EacKg6i2iAs+Dq4dAI"), + ] + source_value = [ + dict(key="secret1", value="value1"), + dict(key="secret2", value="value2"), + ] + + expect = [ + dict(key="secret1", value="value1"), + dict(key="secret2", value="value2"), + ] + + result = SecretVariables.decode(source_secret, source_value) + result = sorted(result, key=lambda el: el['key']) + self.assertEqual(result, expect) + + @unittest.skipIf(argon2 is None, "Missing required 'argon2' library") + def test_decode_dict_divergent_values(self): + source_secret = [ + dict(key="secret1", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$NuZk+6UATHNFV78nFRXFvA$3kivcXfzNHI1c/4ZBpP8BeBSGhhI82NfOh4Dd48JJgc"), + dict(key="secret2", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$etGO/Z8ImYDeKr6uFsyPAQ$FbL5+hG/duDEpa8UCYqXpEUQ5EacKg6i2iAs+Dq4dAI"), + ] + source_value = [ + dict(key="secret1", value="value1"), + dict(key="secret2", value="diverged_value2"), + ] + + expect = [ + dict(key="secret1", value="value1"), + dict(key="secret2", value="$argon2id$v=19$m=65536,t=1,p=2$etGO/Z8ImYDeKr6uFsyPAQ$FbL5+hG/duDEpa8UCYqXpEUQ5EacKg6i2iAs+Dq4dAI"), + ] + + result = SecretVariables.decode(source_secret, source_value) + result = sorted(result, key=lambda el: el['key']) + self.assertEqual(result, expect) + + @unittest.skipIf(argon2 is None, "Missing required 'argon2' library") + def test_decode_dict_missing_values_left(self): + source_secret = [ + dict(key="secret1", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$NuZk+6UATHNFV78nFRXFvA$3kivcXfzNHI1c/4ZBpP8BeBSGhhI82NfOh4Dd48JJgc"), + ] + source_value = [ + dict(key="secret1", value="value1"), + dict(key="secret2", value="value2"), + ] + + expect = [ + dict(key="secret1", value="value1"), + ] + + result = SecretVariables.decode(source_secret, source_value) + result = sorted(result, key=lambda el: el['key']) + self.assertEqual(result, expect) + + @unittest.skipIf(argon2 is None, "Missing required 'argon2' library") + def test_decode_dict_missing_values_right(self): + source_secret = [ + dict(key="secret1", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$NuZk+6UATHNFV78nFRXFvA$3kivcXfzNHI1c/4ZBpP8BeBSGhhI82NfOh4Dd48JJgc"), + dict(key="secret2", hashed_value="$argon2id$v=19$m=65536,t=1,p=2$etGO/Z8ImYDeKr6uFsyPAQ$FbL5+hG/duDEpa8UCYqXpEUQ5EacKg6i2iAs+Dq4dAI"), + ] + source_value = [ + dict(key="secret1", value="value1"), + ] + + expect = [ + dict(key="secret1", value="value1"), + dict(key="secret2", value="$argon2id$v=19$m=65536,t=1,p=2$etGO/Z8ImYDeKr6uFsyPAQ$FbL5+hG/duDEpa8UCYqXpEUQ5EacKg6i2iAs+Dq4dAI"), + ] + + result = SecretVariables.decode(source_secret, source_value) + result = sorted(result, key=lambda el: el['key']) + self.assertEqual(result, expect) diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt index 788fa4cb6c..0aa7c1fc9f 100644 --- a/tests/unit/requirements.txt +++ b/tests/unit/requirements.txt @@ -41,3 +41,6 @@ dataclasses ; python_version == '3.6' # requirement for the elastic callback plugin elastic-apm ; python_version >= '3.6' + +# requirements for scaleway modules +passlib[argon2] \ No newline at end of file From e4b9e098c74e405cae911d01d2561e208ff3421c Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Wed, 2 Nov 2022 20:12:21 +0100 Subject: [PATCH 0287/2104] Clearer error logging in passwordstore lookup (#5436) * Clearer error logging in passwordstore lookup * Add changelog fragment for passwordstore errmsgs Co-authored-by: Sylvia van Os --- changelogs/fragments/5436-passwordstore-errors.yml | 2 ++ plugins/lookup/passwordstore.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/5436-passwordstore-errors.yml diff --git a/changelogs/fragments/5436-passwordstore-errors.yml b/changelogs/fragments/5436-passwordstore-errors.yml new file mode 100644 index 0000000000..86c9e06b36 --- /dev/null +++ b/changelogs/fragments/5436-passwordstore-errors.yml @@ -0,0 +1,2 @@ +minor_changes: + - passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436) diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index ce1f4ee852..0756d11791 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -268,7 +268,7 @@ class LookupModule(LookupBase): ) self.realpass = 'pass: the standard unix password manager' in passoutput except (subprocess.CalledProcessError) as e: - raise AnsibleError(e) + raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output)) return self.realpass @@ -354,7 +354,7 @@ class LookupModule(LookupBase): except (subprocess.CalledProcessError) as e: # 'not in password store' is the expected error if a password wasn't found if 'not in the password store' not in e.output: - raise AnsibleError(e) + raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output)) if self.paramvals['missing'] == 'error': raise AnsibleError('passwordstore: passname {0} not found and missing=error is set'.format(self.passname)) @@ -387,7 +387,7 @@ class LookupModule(LookupBase): try: check_output2([self.pass_cmd, 'insert', '-f', '-m', self.passname], input=msg, env=self.env) except (subprocess.CalledProcessError) as e: - raise AnsibleError(e) + raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output)) return newpass def generate_password(self): @@ -399,7 +399,7 @@ class LookupModule(LookupBase): try: check_output2([self.pass_cmd, 'insert', '-f', '-m', self.passname], input=msg, env=self.env) except (subprocess.CalledProcessError) as e: - raise AnsibleError(e) + raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output)) return newpass def get_passresult(self): From 5cb9a9e4f0ff68670e5aa285263c01227b03d8af Mon Sep 17 00:00:00 2001 From: Simon-TheUser <35318753+Simon-TheUser@users.noreply.github.com> Date: Wed, 2 Nov 2022 15:13:50 -0400 Subject: [PATCH 0288/2104] nsupdate: issues/4657 (#5377) * Insert new entries before deleting old ones. resolves #4657 * Slight wording changes. * lint fix * Address lint * Added changelog Fixed lint * More linting * Update changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../5377-nsupdate-ns-records-with-bind.yml | 2 ++ plugins/modules/net_tools/nsupdate.py | 31 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml diff --git a/changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml b/changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml new file mode 100644 index 0000000000..c414ddc4bf --- /dev/null +++ b/changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml @@ -0,0 +1,2 @@ +bugfixes: + - nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed DNS zones (https://github.com/ansible-collections/community.general/issues/4657). diff --git a/plugins/modules/net_tools/nsupdate.py b/plugins/modules/net_tools/nsupdate.py index 512e44da2f..43b951fe61 100644 --- a/plugins/modules/net_tools/nsupdate.py +++ b/plugins/modules/net_tools/nsupdate.py @@ -339,7 +339,31 @@ class RecordManager(object): def modify_record(self): update = dns.update.Update(self.zone, keyring=self.keyring, keyalgorithm=self.algorithm) - update.delete(self.module.params['record'], self.module.params['type']) + + if self.module.params['type'].upper() == 'NS': + # When modifying a NS record, Bind9 silently refuses to delete all the NS entries for a zone: + # > 09-May-2022 18:00:50.352 client @0x7fe7dd1f9568 192.168.1.3#45458/key rndc_ddns_ansible: + # > updating zone 'lab/IN': attempt to delete all SOA or NS records ignored + # https://gitlab.isc.org/isc-projects/bind9/-/blob/v9_18/lib/ns/update.c#L3304 + # Let's perform dns inserts and updates first, deletes after. + query = dns.message.make_query(self.module.params['record'], self.module.params['type']) + if self.keyring: + query.use_tsig(keyring=self.keyring, algorithm=self.algorithm) + + try: + if self.module.params['protocol'] == 'tcp': + lookup = dns.query.tcp(query, self.module.params['server'], timeout=10, port=self.module.params['port']) + else: + lookup = dns.query.udp(query, self.module.params['server'], timeout=10, port=self.module.params['port']) + except (dns.tsig.PeerBadKey, dns.tsig.PeerBadSignature) as e: + self.module.fail_json(msg='TSIG update error (%s): %s' % (e.__class__.__name__, to_native(e))) + except (socket_error, dns.exception.Timeout) as e: + self.module.fail_json(msg='DNS server error: (%s): %s' % (e.__class__.__name__, to_native(e))) + + entries_to_remove = [n.to_text() for n in lookup.answer[0].items if n.to_text() not in self.value] + else: + update.delete(self.module.params['record'], self.module.params['type']) + for entry in self.value: try: update.add(self.module.params['record'], @@ -350,6 +374,11 @@ class RecordManager(object): self.module.fail_json(msg='value needed when state=present') except dns.exception.SyntaxError: self.module.fail_json(msg='Invalid/malformed value') + + if self.module.params['type'].upper() == 'NS': + for entry in entries_to_remove: + update.delete(self.module.params['record'], self.module.params['type'], entry) + response = self.__do_update(update) return dns.message.Message.rcode(response) From faf4ec7fa6ffc15d4a7184c48134fb7d86d11e00 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 20:17:08 +0100 Subject: [PATCH 0289/2104] passwordstore lookup: allow to pass options as lookup options (#5444) * Allow to pass options as lookup options. * Adjust tests. --- .../fragments/5444-passwordstore-options.yml | 2 + plugins/lookup/passwordstore.py | 74 ++++++++++--------- .../tasks/password_tests.yml | 16 ++-- .../lookup_passwordstore/tasks/tests.yml | 4 +- 4 files changed, 53 insertions(+), 43 deletions(-) create mode 100644 changelogs/fragments/5444-passwordstore-options.yml diff --git a/changelogs/fragments/5444-passwordstore-options.yml b/changelogs/fragments/5444-passwordstore-options.yml new file mode 100644 index 0000000000..a25c9a2fef --- /dev/null +++ b/changelogs/fragments/5444-passwordstore-options.yml @@ -0,0 +1,2 @@ +minor_changes: + - "passwordstore lookup plugin - allow options to be passed lookup options instead of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444)." diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 0756d11791..6face16f39 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -21,17 +21,15 @@ DOCUMENTATION = ''' _terms: description: query key. required: true - passwordstore: - description: - - Location of the password store. - - 'The value is decided by checking the following in order:' - - If set, this value is used. - - If C(directory) is set, that value will be used. - - If I(backend=pass), then C(~/.password-store) is used. - - If I(backend=gopass), then the C(path) field in C(~/.config/gopass/config.yml) is used, - falling back to C(~/.local/share/gopass/stores/root) if not defined. directory: - description: The directory of the password store. + description: + - The directory of the password store. + - If I(backend=pass), the default is C(~/.password-store) is used. + - If I(backend=gopass), then the default is the C(path) field in C(~/.config/gopass/config.yml), + falling back to C(~/.local/share/gopass/stores/root) if C(path) is not defined in the gopass config. + type: path + vars: + - name: passwordstore env: - name: PASSWORD_STORE_DIR create: @@ -55,9 +53,11 @@ DOCUMENTATION = ''' default: false subkey: description: Return a specific subkey of the password. When set to C(password), always returns the first line. + type: str default: password userpass: description: Specify a password to save, instead of a generated one. + type: str length: description: The length of the generated password. type: integer @@ -67,7 +67,7 @@ DOCUMENTATION = ''' type: bool default: false nosymbols: - description: use alphanumeric characters. + description: Use alphanumeric characters. type: bool default: false missing: @@ -129,6 +129,8 @@ DOCUMENTATION = ''' - pass - gopass version_added: 5.2.0 + notes: + - The lookup supports passing all options as lookup parameters since community.general 6.0.0. ''' EXAMPLES = """ ansible.cfg: | @@ -136,7 +138,7 @@ ansible.cfg: | lock=readwrite locktimeout=45s -playbook.yml: | +tasks.yml: | --- # Debug is used for examples, BAD IDEA to show passwords on screen @@ -146,45 +148,49 @@ playbook.yml: | - name: Basic lookup. Warns if example/test does not exist and returns empty string ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test missing=warn')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', missing='warn')}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test create=true')}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test', create=true)}}" - name: Create pass with random 16 character password. If password exists just give the password ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=create')}}" + mypassword: "{{ lookup('community.general.passwordstore', 'example/test', missing='create')}}" - name: Prints 'abc' if example/test does not exist, just give the password otherwise ansible.builtin.debug: var: mypassword vars: - mypassword: "{{ lookup('community.general.passwordstore', 'example/test missing=empty') | default('abc', true) }}" + mypassword: >- + {{ lookup('community.general.passwordstore', 'example/test', missing='empty') + | default('abc', true) }} - name: Different size password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true length=42')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, length=42)}}" - - name: Create password and overwrite the password if it exists. As a bonus, this module includes the old password inside the pass file + - name: >- + Create password and overwrite the password if it exists. + As a bonus, this module includes the old password inside the pass file ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true overwrite=true')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, overwrite=true)}}" - name: Create an alphanumeric password ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test create=true nosymbols=true') }}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', create=true, nosymbols=true) }}" - name: Return the value for user in the KV pair user, username ansible.builtin.debug: - msg: "{{ lookup('community.general.passwordstore', 'example/test subkey=user')}}" + msg: "{{ lookup('community.general.passwordstore', 'example/test', subkey='user')}}" - name: Return the entire password file content ansible.builtin.set_fact: - passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test returnall=true')}}" + passfilecontent: "{{ lookup('community.general.passwordstore', 'example/test', returnall=true)}}" """ RETURN = """ @@ -320,7 +326,7 @@ class LookupModule(LookupBase): raise AnsibleError('Passwordstore directory \'{0}\' does not exist'.format(self.paramvals['directory'])) # Set PASSWORD_STORE_UMASK if umask is set - if 'umask' in self.paramvals: + if self.paramvals.get('umask') is not None: if len(self.paramvals['umask']) != 3: raise AnsibleError('Passwordstore umask must have a length of 3.') elif int(self.paramvals['umask'][0]) > 3: @@ -435,8 +441,7 @@ class LookupModule(LookupBase): unit_to_seconds = {"s": 1, "m": 60, "h": 3600} self.lock_timeout = int(timeout[:-1]) * unit_to_seconds[timeout[-1]] - directory = variables.get('passwordstore', os.environ.get('PASSWORD_STORE_DIR', None)) - + directory = self.get_option('directory') if directory is None: if self.backend == 'gopass': try: @@ -448,16 +453,17 @@ class LookupModule(LookupBase): directory = os.path.expanduser('~/.password-store') self.paramvals = { - 'subkey': 'password', + 'subkey': self.get_option('subkey'), 'directory': directory, - 'create': False, - 'returnall': False, - 'overwrite': False, - 'nosymbols': False, - 'userpass': '', - 'length': 16, - 'backup': False, - 'missing': 'error', + 'create': self.get_option('create'), + 'returnall': self.get_option('returnall'), + 'overwrite': self.get_option('overwrite'), + 'nosymbols': self.get_option('nosymbols'), + 'userpass': self.get_option('userpass') or '', + 'length': self.get_option('length'), + 'backup': self.get_option('backup'), + 'missing': self.get_option('missing'), + 'umask': self.get_option('umask'), } def run(self, terms, variables, **kwargs): diff --git a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml index c701e199ae..a94529e460 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/password_tests.yml @@ -5,7 +5,7 @@ - name: Create a password ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass', length=8, create=true, backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -18,7 +18,7 @@ - name: Create a password with equal sign ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass-equal userpass=SimpleSample= create=true', backend=backend) }}" - name: Fetch a password with equal sign ({{ backend }}) set_fact: @@ -31,7 +31,7 @@ - name: Create a password using missing=create ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=create length=8', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='create', length=8, backend=backend) }}" - name: Fetch password from an existing file ({{ backend }}) set_fact: @@ -44,7 +44,7 @@ - name: Fetch password from existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create missing=empty', backend=backend) }}" + readpass: "{{ lookup('community.general.passwordstore', 'test-missing-create', missing='empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -53,7 +53,7 @@ - name: Fetch password from non-existing file using missing=empty ({{ backend }}) set_fact: - readpass: "{{ query('community.general.passwordstore', 'test-missing-pass missing=empty', backend=backend) }}" + readpass: "{{ query('community.general.passwordstore', 'test-missing-pass', missing='empty', backend=backend) }}" - name: Verify password ({{ backend }}) assert: @@ -71,7 +71,7 @@ - name: Fetch a password with YAML subkey ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass subkey=key', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-yaml-pass', subkey='key', backend=backend) }}" - name: Read a yaml subkey ({{ backend }}) assert: @@ -96,7 +96,7 @@ - name: Fetch all from multiline file ({{ backend }}) set_fact: - readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass returnall=yes', backend=backend) }}" + readyamlpass: "{{ lookup('community.general.passwordstore', 'test-multiline-pass', returnall='yes', backend=backend) }}" - name: Multiline pass returnall returns everything in the file ({{ backend }}) assert: @@ -105,7 +105,7 @@ - name: Create a password in a folder ({{ backend }}) set_fact: - newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass length=8 create=yes', backend=backend) }}" + newpass: "{{ lookup('community.general.passwordstore', 'folder/test-pass', length=8, create=true, backend=backend) }}" - name: Fetch password from folder ({{ backend }}) set_fact: diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index a18b58d651..583aafd108 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -125,7 +125,9 @@ that: - eval_error is failed - >- - "Passwordstore directory 'somenonexistentplace' does not exist" in eval_error.msg + "Passwordstore directory '" in eval_error.msg + - >- + "/somenonexistentplace' does not exist" in eval_error.msg - name: Test pass compatibility shim detection block: From 2b0bebc8fc431692702fd21c2ad24e2c9cb60599 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 20:59:51 +0100 Subject: [PATCH 0290/2104] Fix defaults. --- plugins/modules/cloud/scaleway/scaleway_function_namespace.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/modules/cloud/scaleway/scaleway_function_namespace.py b/plugins/modules/cloud/scaleway/scaleway_function_namespace.py index 213666cdd3..cae4c5ede5 100644 --- a/plugins/modules/cloud/scaleway/scaleway_function_namespace.py +++ b/plugins/modules/cloud/scaleway/scaleway_function_namespace.py @@ -68,6 +68,7 @@ options: - Environment variables of the function namespace. - Injected in functions at runtime. type: dict + default: {} secret_environment_variables: description: @@ -75,6 +76,7 @@ options: - Updating thoses values will not output a C(changed) state in Ansible. - Injected in functions at runtime. type: dict + default: {} ''' EXAMPLES = ''' From b531ecdc9bfe48fe98ea6b67279eb048e0c9071d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 21:42:29 +0100 Subject: [PATCH 0291/2104] Unflatmap community.general (#5461) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Move files. * Update imports and references. * Move wrongly placed files. * Reverse redirects, deprecate long → short name redirects. * Simplify contribution guidelines for new modules. * Rewrite BOTMETA. * Add changelog fragment. * Fix ignore.txt files. --- .github/BOTMETA.yml | 834 +-- CONTRIBUTING.md | 16 +- changelogs/fragments/unflatmap.yml | 8 + meta/runtime.yml | 5069 +++++++++++++---- plugins/action/{system => }/iptables_state.py | 0 plugins/action/{system => }/shutdown.py | 0 .../aerospike => }/aerospike_migrations.py | 0 .../{monitoring => }/airbrake_deployment.py | 0 plugins/modules/{system => }/aix_devices.py | 0 .../modules/{system => }/aix_filesystem.py | 0 plugins/modules/{system => }/aix_inittab.py | 0 plugins/modules/{system => }/aix_lvg.py | 0 plugins/modules/{system => }/aix_lvol.py | 0 .../{monitoring => }/alerta_customer.py | 0 .../{cloud/alicloud => }/ali_instance.py | 0 .../{cloud/alicloud => }/ali_instance_info.py | 0 plugins/modules/{system => }/alternatives.py | 0 .../language => }/ansible_galaxy_install.py | 0 .../apache2_mod_proxy.py | 0 .../apache2_module.py | 0 plugins/modules/{packaging/os => }/apk.py | 0 .../modules/{packaging/os => }/apt_repo.py | 0 plugins/modules/{packaging/os => }/apt_rpm.py | 0 plugins/modules/{files => }/archive.py | 0 .../{cloud/atomic => }/atomic_container.py | 0 .../modules/{cloud/atomic => }/atomic_host.py | 0 .../{cloud/atomic => }/atomic_image.py | 0 plugins/modules/{system => }/awall.py | 0 plugins/modules/{system => }/beadm.py | 0 .../modules/{notification => }/bearychat.py | 0 plugins/modules/{monitoring => }/bigpanda.py | 0 .../bitbucket => }/bitbucket_access_key.py | 0 .../bitbucket_pipeline_key_pair.py | 0 .../bitbucket_pipeline_known_host.py | 0 .../bitbucket_pipeline_variable.py | 0 .../modules/{packaging/language => }/bower.py | 0 .../{packaging/language => }/bundler.py | 0 plugins/modules/{source_control => }/bzr.py | 0 .../modules/{notification => }/campfire.py | 0 plugins/modules/{system => }/capabilities.py | 0 .../modules/{packaging/language => }/cargo.py | 0 .../modules/{notification => }/catapult.py | 0 .../{monitoring => }/circonus_annotation.py | 0 .../modules/{notification => }/cisco_webex.py | 0 .../{cloud/centurylink => }/clc_aa_policy.py | 0 .../centurylink => }/clc_alert_policy.py | 0 .../centurylink => }/clc_blueprint_package.py | 0 .../centurylink => }/clc_firewall_policy.py | 0 .../{cloud/centurylink => }/clc_group.py | 0 .../centurylink => }/clc_loadbalancer.py | 0 .../centurylink => }/clc_modify_server.py | 0 .../{cloud/centurylink => }/clc_publicip.py | 0 .../{cloud/centurylink => }/clc_server.py | 0 .../centurylink => }/clc_server_snapshot.py | 0 .../{cloud/misc => }/cloud_init_data_facts.py | 0 .../modules/{net_tools => }/cloudflare_dns.py | 0 .../cobbler => }/cobbler_sync.py | 0 .../cobbler => }/cobbler_system.py | 0 .../{packaging/language => }/composer.py | 0 .../modules/{clustering/consul => }/consul.py | 0 .../{clustering/consul => }/consul_acl.py | 0 .../{clustering/consul => }/consul_kv.py | 0 .../{clustering/consul => }/consul_session.py | 0 plugins/modules/{packaging/os => }/copr.py | 0 .../modules/{packaging/language => }/cpanm.py | 0 plugins/modules/{system => }/cronvar.py | 0 plugins/modules/{system => }/crypttab.py | 0 .../datadog => }/datadog_downtime.py | 0 .../{monitoring/datadog => }/datadog_event.py | 0 .../datadog => }/datadog_monitor.py | 0 plugins/modules/{system => }/dconf.py | 0 .../{web_infrastructure => }/deploy_helper.py | 0 .../dimensiondata_network.py | 0 .../dimensiondata => }/dimensiondata_vlan.py | 0 plugins/modules/{notification => }/discord.py | 0 .../{web_infrastructure => }/django_manage.py | 0 .../{packaging/os => }/dnf_versionlock.py | 0 plugins/modules/{net_tools => }/dnsimple.py | 0 .../modules/{net_tools => }/dnsimple_info.py | 0 .../modules/{net_tools => }/dnsmadeeasy.py | 0 plugins/modules/{system => }/dpkg_divert.py | 0 .../{packaging/language => }/easy_install.py | 0 .../{web_infrastructure => }/ejabberd_user.py | 0 .../misc => }/elasticsearch_plugin.py | 0 .../{storage/emc => }/emc_vnx_sg_member.py | 0 plugins/modules/{clustering => }/etcd3.py | 0 plugins/modules/{system => }/facter.py | 0 plugins/modules/{files => }/filesize.py | 0 plugins/modules/{system => }/filesystem.py | 0 plugins/modules/{packaging/os => }/flatpak.py | 0 .../{packaging/os => }/flatpak_remote.py | 0 .../modules/{notification => }/flowdock.py | 0 .../modules/{net_tools => }/gandi_livedns.py | 0 plugins/modules/{system => }/gconftool2.py | 0 .../modules/{system => }/gconftool2_info.py | 0 .../modules/{packaging/language => }/gem.py | 0 .../{source_control => }/git_config.py | 0 .../github => }/github_deploy_key.py | 0 .../github => }/github_issue.py | 0 .../{source_control/github => }/github_key.py | 0 .../github => }/github_release.py | 0 .../github => }/github_repo.py | 0 .../github => }/github_webhook.py | 0 .../github => }/github_webhook_info.py | 0 .../gitlab => }/gitlab_branch.py | 0 .../gitlab => }/gitlab_deploy_key.py | 0 .../gitlab => }/gitlab_group.py | 0 .../gitlab => }/gitlab_group_members.py | 0 .../gitlab => }/gitlab_group_variable.py | 0 .../gitlab => }/gitlab_hook.py | 0 .../gitlab => }/gitlab_project.py | 0 .../gitlab => }/gitlab_project_members.py | 0 .../gitlab => }/gitlab_project_variable.py | 0 .../gitlab => }/gitlab_protected_branch.py | 0 .../gitlab => }/gitlab_runner.py | 0 .../gitlab => }/gitlab_user.py | 0 plugins/modules/{notification => }/grove.py | 0 .../{web_infrastructure => }/gunicorn.py | 0 .../{database/saphana => }/hana_query.py | 0 plugins/modules/{net_tools => }/haproxy.py | 0 .../{cloud/heroku => }/heroku_collaborator.py | 0 plugins/modules/{source_control => }/hg.py | 0 plugins/modules/{notification => }/hipchat.py | 0 .../modules/{packaging/os => }/homebrew.py | 0 .../{packaging/os => }/homebrew_cask.py | 0 .../{packaging/os => }/homebrew_tap.py | 0 plugins/modules/{system => }/homectl.py | 0 .../honeybadger_deployment.py | 0 .../hpilo => }/hpilo_boot.py | 0 .../hpilo => }/hpilo_info.py | 0 .../{remote_management/hpilo => }/hponcfg.py | 0 .../{web_infrastructure => }/htpasswd.py | 0 .../{cloud/huawei => }/hwc_ecs_instance.py | 0 .../{cloud/huawei => }/hwc_evs_disk.py | 0 .../{cloud/huawei => }/hwc_network_vpc.py | 0 .../{cloud/huawei => }/hwc_smn_topic.py | 0 .../modules/{cloud/huawei => }/hwc_vpc_eip.py | 0 .../huawei => }/hwc_vpc_peering_connect.py | 0 .../{cloud/huawei => }/hwc_vpc_port.py | 0 .../{cloud/huawei => }/hwc_vpc_private_ip.py | 0 .../{cloud/huawei => }/hwc_vpc_route.py | 0 .../huawei => }/hwc_vpc_security_group.py | 0 .../hwc_vpc_security_group_rule.py | 0 .../{cloud/huawei => }/hwc_vpc_subnet.py | 0 .../{storage/ibm => }/ibm_sa_domain.py | 0 .../modules/{storage/ibm => }/ibm_sa_host.py | 0 .../{storage/ibm => }/ibm_sa_host_ports.py | 0 .../modules/{storage/ibm => }/ibm_sa_pool.py | 0 .../modules/{storage/ibm => }/ibm_sa_vol.py | 0 .../{storage/ibm => }/ibm_sa_vol_map.py | 0 .../{monitoring => }/icinga2_feature.py | 0 .../modules/{monitoring => }/icinga2_host.py | 0 .../redfish => }/idrac_redfish_command.py | 0 .../redfish => }/idrac_redfish_config.py | 0 .../redfish => }/idrac_redfish_info.py | 0 .../redfish => }/ilo_redfish_config.py | 0 .../redfish => }/ilo_redfish_info.py | 0 .../{remote_management/imc => }/imc_rest.py | 0 plugins/modules/{cloud/smartos => }/imgadm.py | 0 .../{net_tools/infinity => }/infinity.py | 0 .../influxdb => }/influxdb_database.py | 0 .../{database/influxdb => }/influxdb_query.py | 0 .../influxdb_retention_policy.py | 0 .../{database/influxdb => }/influxdb_user.py | 0 .../{database/influxdb => }/influxdb_write.py | 0 plugins/modules/{files => }/ini_file.py | 0 .../modules/{packaging/os => }/installp.py | 0 .../modules/{system => }/interfaces_file.py | 0 plugins/modules/{net_tools => }/ip_netns.py | 0 .../modules/{identity/ipa => }/ipa_config.py | 0 .../{identity/ipa => }/ipa_dnsrecord.py | 0 .../modules/{identity/ipa => }/ipa_dnszone.py | 0 .../modules/{identity/ipa => }/ipa_group.py | 0 .../{identity/ipa => }/ipa_hbacrule.py | 0 .../modules/{identity/ipa => }/ipa_host.py | 0 .../{identity/ipa => }/ipa_hostgroup.py | 0 .../{identity/ipa => }/ipa_otpconfig.py | 0 .../{identity/ipa => }/ipa_otptoken.py | 0 .../{identity/ipa => }/ipa_pwpolicy.py | 0 .../modules/{identity/ipa => }/ipa_role.py | 0 .../modules/{identity/ipa => }/ipa_service.py | 0 .../modules/{identity/ipa => }/ipa_subca.py | 0 .../modules/{identity/ipa => }/ipa_sudocmd.py | 0 .../{identity/ipa => }/ipa_sudocmdgroup.py | 0 .../{identity/ipa => }/ipa_sudorule.py | 0 .../modules/{identity/ipa => }/ipa_user.py | 0 .../modules/{identity/ipa => }/ipa_vault.py | 0 .../modules/{net_tools => }/ipify_facts.py | 0 .../modules/{net_tools => }/ipinfoio_facts.py | 0 .../{remote_management/ipmi => }/ipmi_boot.py | 0 .../ipmi => }/ipmi_power.py | 0 .../modules/{system => }/iptables_state.py | 0 plugins/modules/{net_tools => }/ipwcli_dns.py | 0 plugins/modules/{notification => }/irc.py | 0 plugins/modules/{files => }/iso_create.py | 0 plugins/modules/{files => }/iso_customize.py | 0 plugins/modules/{files => }/iso_extract.py | 0 plugins/modules/{notification => }/jabber.py | 0 plugins/modules/{system => }/java_cert.py | 0 plugins/modules/{system => }/java_keystore.py | 0 .../modules/{web_infrastructure => }/jboss.py | 0 .../{web_infrastructure => }/jenkins_build.py | 0 .../{web_infrastructure => }/jenkins_job.py | 0 .../jenkins_job_info.py | 0 .../jenkins_plugin.py | 0 .../jenkins_script.py | 0 .../modules/{web_infrastructure => }/jira.py | 0 .../modules/{system => }/kernel_blacklist.py | 0 .../keycloak => }/keycloak_authentication.py | 0 .../keycloak => }/keycloak_client.py | 0 .../keycloak_client_rolemapping.py | 0 .../keycloak => }/keycloak_clientscope.py | 0 .../keycloak => }/keycloak_clienttemplate.py | 0 .../{identity/keycloak => }/keycloak_group.py | 0 .../keycloak_identity_provider.py | 0 .../{identity/keycloak => }/keycloak_realm.py | 0 .../keycloak => }/keycloak_realm_info.py | 0 .../{identity/keycloak => }/keycloak_role.py | 0 .../keycloak => }/keycloak_user_federation.py | 0 .../keycloak_user_rolemapping.py | 0 plugins/modules/{system => }/keyring.py | 0 plugins/modules/{system => }/keyring_info.py | 0 .../{database/misc => }/kibana_plugin.py | 0 plugins/modules/{system => }/launchd.py | 0 plugins/modules/{packaging/os => }/layman.py | 0 plugins/modules/{system => }/lbu.py | 0 .../{net_tools/ldap => }/ldap_attrs.py | 0 .../{net_tools/ldap => }/ldap_entry.py | 0 .../{net_tools/ldap => }/ldap_passwd.py | 0 .../{net_tools/ldap => }/ldap_search.py | 0 .../{monitoring => }/librato_annotation.py | 0 plugins/modules/{cloud/linode => }/linode.py | 0 .../modules/{cloud/linode => }/linode_v4.py | 0 .../{system => }/listen_ports_facts.py | 0 plugins/modules/{net_tools => }/lldp.py | 0 plugins/modules/{system => }/locale_gen.py | 0 .../modules/{monitoring => }/logentries.py | 0 .../{notification => }/logentries_msg.py | 0 .../{monitoring => }/logstash_plugin.py | 0 plugins/modules/{system => }/lvg.py | 0 plugins/modules/{system => }/lvol.py | 0 .../modules/{cloud/lxc => }/lxc_container.py | 0 .../{remote_management/lxca => }/lxca_cmms.py | 0 .../lxca => }/lxca_nodes.py | 0 .../modules/{cloud/lxd => }/lxd_container.py | 0 .../modules/{cloud/lxd => }/lxd_profile.py | 0 .../modules/{cloud/lxd => }/lxd_project.py | 0 .../modules/{packaging/os => }/macports.py | 0 plugins/modules/{notification => }/mail.py | 0 plugins/modules/{system => }/make.py | 0 .../manageiq => }/manageiq_alert_profiles.py | 0 .../manageiq => }/manageiq_alerts.py | 0 .../manageiq => }/manageiq_group.py | 0 .../manageiq => }/manageiq_policies.py | 0 .../manageiq => }/manageiq_policies_info.py | 0 .../manageiq => }/manageiq_provider.py | 0 .../manageiq => }/manageiq_tags.py | 0 .../manageiq => }/manageiq_tags_info.py | 0 .../manageiq => }/manageiq_tenant.py | 0 .../manageiq => }/manageiq_user.py | 0 plugins/modules/{packaging/os => }/mas.py | 0 plugins/modules/{notification => }/matrix.py | 0 .../modules/{notification => }/mattermost.py | 0 .../language => }/maven_artifact.py | 0 .../{cloud/memset => }/memset_dns_reload.py | 0 .../memset => }/memset_memstore_info.py | 0 .../{cloud/memset => }/memset_server_info.py | 0 .../modules/{cloud/memset => }/memset_zone.py | 0 .../{cloud/memset => }/memset_zone_domain.py | 0 .../{cloud/memset => }/memset_zone_record.py | 0 plugins/modules/{system => }/mksysb.py | 0 plugins/modules/{system => }/modprobe.py | 0 plugins/modules/{monitoring => }/monit.py | 0 plugins/modules/{notification => }/mqtt.py | 0 .../modules/{database/mssql => }/mssql_db.py | 0 .../{database/mssql => }/mssql_script.py | 0 plugins/modules/{monitoring => }/nagios.py | 0 plugins/modules/{net_tools => }/netcup_dns.py | 0 .../{monitoring => }/newrelic_deployment.py | 0 plugins/modules/{notification => }/nexmo.py | 0 .../nginx_status_info.py | 0 .../modules/{cloud/smartos => }/nictagadm.py | 0 plugins/modules/{net_tools => }/nmcli.py | 0 .../{clustering/nomad => }/nomad_job.py | 0 .../{clustering/nomad => }/nomad_job_info.py | 0 plugins/modules/{system => }/nosh.py | 0 .../modules/{packaging/language => }/npm.py | 0 plugins/modules/{net_tools => }/nsupdate.py | 0 plugins/modules/{cloud/oracle => }/oci_vcn.py | 0 plugins/modules/{database/misc => }/odbc.py | 0 .../office_365_connector_card.py | 0 plugins/modules/{system => }/ohai.py | 0 plugins/modules/{net_tools => }/omapi_host.py | 0 .../{cloud/opennebula => }/one_host.py | 0 .../{cloud/opennebula => }/one_image.py | 0 .../{cloud/opennebula => }/one_image_info.py | 0 .../{cloud/opennebula => }/one_service.py | 0 .../{cloud/opennebula => }/one_template.py | 0 .../modules/{cloud/opennebula => }/one_vm.py | 0 .../oneandone_firewall_policy.py | 0 .../oneandone => }/oneandone_load_balancer.py | 0 .../oneandone_monitoring_policy.py | 0 .../oneandone_private_network.py | 0 .../oneandone => }/oneandone_public_ip.py | 0 .../{cloud/oneandone => }/oneandone_server.py | 0 .../{identity => }/onepassword_info.py | 0 .../oneview => }/oneview_datacenter_info.py | 0 .../oneview => }/oneview_enclosure_info.py | 0 .../oneview => }/oneview_ethernet_network.py | 0 .../oneview_ethernet_network_info.py | 0 .../oneview => }/oneview_fc_network.py | 0 .../oneview => }/oneview_fc_network_info.py | 0 .../oneview => }/oneview_fcoe_network.py | 0 .../oneview => }/oneview_fcoe_network_info.py | 0 .../oneview_logical_interconnect_group.py | 0 ...oneview_logical_interconnect_group_info.py | 0 .../oneview => }/oneview_network_set.py | 0 .../oneview => }/oneview_network_set_info.py | 0 .../oneview => }/oneview_san_manager.py | 0 .../oneview => }/oneview_san_manager_info.py | 0 .../{cloud/online => }/online_server_info.py | 0 .../{cloud/online => }/online_user_info.py | 0 plugins/modules/{system => }/open_iscsi.py | 0 .../modules/{packaging/os => }/openbsd_pkg.py | 0 .../opendj => }/opendj_backendprop.py | 0 plugins/modules/{system => }/openwrt_init.py | 0 plugins/modules/{packaging/os => }/opkg.py | 0 plugins/modules/{system => }/osx_defaults.py | 0 .../{cloud/ovh => }/ovh_ip_failover.py | 0 .../ovh => }/ovh_ip_loadbalancing_backend.py | 0 .../{cloud/ovh => }/ovh_monthly_billing.py | 0 .../{clustering => }/pacemaker_cluster.py | 0 .../{cloud/packet => }/packet_device.py | 0 .../{cloud/packet => }/packet_ip_subnet.py | 0 .../{cloud/packet => }/packet_project.py | 0 .../{cloud/packet => }/packet_sshkey.py | 0 .../{cloud/packet => }/packet_volume.py | 0 .../packet => }/packet_volume_attachment.py | 0 plugins/modules/{packaging/os => }/pacman.py | 0 .../modules/{packaging/os => }/pacman_key.py | 0 plugins/modules/{monitoring => }/pagerduty.py | 0 .../{monitoring => }/pagerduty_alert.py | 0 .../{monitoring => }/pagerduty_change.py | 0 .../{monitoring => }/pagerduty_user.py | 0 plugins/modules/{system => }/pam_limits.py | 0 plugins/modules/{system => }/pamd.py | 0 plugins/modules/{system => }/parted.py | 0 .../modules/{packaging/language => }/pear.py | 0 plugins/modules/{system => }/pids.py | 0 plugins/modules/{monitoring => }/pingdom.py | 0 .../language => }/pip_package_info.py | 0 .../modules/{packaging/language => }/pipx.py | 0 .../{packaging/language => }/pipx_info.py | 0 plugins/modules/{packaging/os => }/pkg5.py | 0 .../{packaging/os => }/pkg5_publisher.py | 0 plugins/modules/{packaging/os => }/pkgin.py | 0 plugins/modules/{packaging/os => }/pkgng.py | 0 plugins/modules/{packaging/os => }/pkgutil.py | 0 plugins/modules/{storage/pmem => }/pmem.py | 0 plugins/modules/{packaging/os => }/portage.py | 0 .../modules/{packaging/os => }/portinstall.py | 0 .../{net_tools/pritunl => }/pritunl_org.py | 0 .../pritunl => }/pritunl_org_info.py | 0 .../{net_tools/pritunl => }/pritunl_user.py | 0 .../pritunl => }/pritunl_user_info.py | 0 .../{cloud/profitbricks => }/profitbricks.py | 0 .../profitbricks_datacenter.py | 0 .../profitbricks => }/profitbricks_nic.py | 0 .../profitbricks => }/profitbricks_volume.py | 0 .../profitbricks_volume_attachments.py | 0 plugins/modules/{cloud/misc => }/proxmox.py | 0 .../modules/{cloud/misc => }/proxmox_disk.py | 0 .../{cloud/misc => }/proxmox_domain_info.py | 0 .../{cloud/misc => }/proxmox_group_info.py | 0 .../modules/{cloud/misc => }/proxmox_kvm.py | 0 .../modules/{cloud/misc => }/proxmox_nic.py | 0 .../modules/{cloud/misc => }/proxmox_snap.py | 0 .../{cloud/misc => }/proxmox_storage_info.py | 0 .../{cloud/misc => }/proxmox_tasks_info.py | 0 .../{cloud/misc => }/proxmox_template.py | 0 .../{cloud/misc => }/proxmox_user_info.py | 0 .../{cloud/pubnub => }/pubnub_blocks.py | 0 .../modules/{packaging/os => }/pulp_repo.py | 0 plugins/modules/{system => }/puppet.py | 0 .../modules/{notification => }/pushbullet.py | 0 .../modules/{notification => }/pushover.py | 0 .../{system => }/python_requirements_info.py | 0 plugins/modules/{cloud/rackspace => }/rax.py | 0 .../modules/{cloud/rackspace => }/rax_cbs.py | 0 .../rackspace => }/rax_cbs_attachments.py | 0 .../modules/{cloud/rackspace => }/rax_cdb.py | 0 .../{cloud/rackspace => }/rax_cdb_database.py | 0 .../{cloud/rackspace => }/rax_cdb_user.py | 0 .../modules/{cloud/rackspace => }/rax_clb.py | 0 .../{cloud/rackspace => }/rax_clb_nodes.py | 0 .../{cloud/rackspace => }/rax_clb_ssl.py | 0 .../modules/{cloud/rackspace => }/rax_dns.py | 0 .../{cloud/rackspace => }/rax_dns_record.py | 0 .../{cloud/rackspace => }/rax_facts.py | 0 .../{cloud/rackspace => }/rax_files.py | 0 .../rackspace => }/rax_files_objects.py | 0 .../{cloud/rackspace => }/rax_identity.py | 0 .../{cloud/rackspace => }/rax_keypair.py | 0 .../modules/{cloud/rackspace => }/rax_meta.py | 0 .../{cloud/rackspace => }/rax_mon_alarm.py | 0 .../{cloud/rackspace => }/rax_mon_check.py | 0 .../{cloud/rackspace => }/rax_mon_entity.py | 0 .../rackspace => }/rax_mon_notification.py | 0 .../rax_mon_notification_plan.py | 0 .../{cloud/rackspace => }/rax_network.py | 0 .../{cloud/rackspace => }/rax_queue.py | 0 .../rackspace => }/rax_scaling_group.py | 0 .../rackspace => }/rax_scaling_policy.py | 0 plugins/modules/{files => }/read_csv.py | 0 .../redfish => }/redfish_command.py | 0 .../redfish => }/redfish_config.py | 0 .../redfish => }/redfish_info.py | 0 .../{packaging/os => }/redhat_subscription.py | 0 plugins/modules/{database/misc => }/redis.py | 0 .../modules/{database/misc => }/redis_data.py | 0 .../{database/misc => }/redis_data_incr.py | 0 .../{database/misc => }/redis_data_info.py | 0 .../modules/{database/misc => }/redis_info.py | 0 plugins/modules/{cloud/misc => }/rhevm.py | 0 .../modules/{packaging/os => }/rhn_channel.py | 0 .../{packaging/os => }/rhn_register.py | 0 .../{packaging/os => }/rhsm_release.py | 0 .../{packaging/os => }/rhsm_repository.py | 0 plugins/modules/{database/misc => }/riak.py | 0 .../modules/{notification => }/rocketchat.py | 0 .../{monitoring => }/rollbar_deployment.py | 0 .../{packaging/os => }/rpm_ostree_pkg.py | 0 .../rundeck_acl_policy.py | 0 .../rundeck_job_executions_info.py | 0 .../rundeck_job_run.py | 0 .../rundeck_project.py | 0 plugins/modules/{system => }/runit.py | 0 .../{system => }/sap_task_list_execute.py | 0 plugins/modules/{files => }/sapcar_extract.py | 0 plugins/modules/{notification => }/say.py | 0 .../{cloud/scaleway => }/scaleway_compute.py | 0 .../scaleway_compute_private_network.py | 0 .../scaleway_container_registry.py | 0 .../scaleway_container_registry_info.py | 0 .../scaleway => }/scaleway_database_backup.py | 0 .../scaleway_function_namespace.py | 0 .../scaleway_function_namespace_info.py | 0 .../scaleway => }/scaleway_image_info.py | 0 .../{cloud/scaleway => }/scaleway_ip.py | 0 .../{cloud/scaleway => }/scaleway_ip_info.py | 0 .../{cloud/scaleway => }/scaleway_lb.py | 0 .../scaleway_organization_info.py | 0 .../scaleway => }/scaleway_private_network.py | 0 .../scaleway => }/scaleway_security_group.py | 0 .../scaleway_security_group_info.py | 0 .../scaleway_security_group_rule.py | 0 .../scaleway => }/scaleway_server_info.py | 0 .../scaleway => }/scaleway_snapshot_info.py | 0 .../{cloud/scaleway => }/scaleway_sshkey.py | 0 .../scaleway => }/scaleway_user_data.py | 0 .../{cloud/scaleway => }/scaleway_volume.py | 0 .../scaleway => }/scaleway_volume_info.py | 0 plugins/modules/{system => }/sefcontext.py | 0 .../{system => }/selinux_permissive.py | 0 plugins/modules/{system => }/selogin.py | 0 .../modules/{notification => }/sendgrid.py | 0 .../{monitoring/sensu => }/sensu_check.py | 0 .../{monitoring/sensu => }/sensu_client.py | 0 .../{monitoring/sensu => }/sensu_handler.py | 0 .../{monitoring/sensu => }/sensu_silence.py | 0 .../sensu => }/sensu_subscription.py | 0 plugins/modules/{system => }/seport.py | 0 .../modules/{cloud/misc => }/serverless.py | 0 plugins/modules/{system => }/shutdown.py | 0 .../modules/{cloud/softlayer => }/sl_vm.py | 0 plugins/modules/{notification => }/slack.py | 0 .../modules/{packaging/os => }/slackpkg.py | 0 .../{cloud/smartos => }/smartos_image_info.py | 0 plugins/modules/{packaging/os => }/snap.py | 0 .../modules/{packaging/os => }/snap_alias.py | 0 plugins/modules/{net_tools => }/snmp_facts.py | 0 plugins/modules/{system => }/solaris_zone.py | 0 plugins/modules/{packaging/os => }/sorcery.py | 0 .../{monitoring => }/spectrum_device.py | 0 .../{monitoring => }/spectrum_model_attrs.py | 0 .../spotinst => }/spotinst_aws_elastigroup.py | 0 .../{storage/hpe3par => }/ss_3par_cpg.py | 0 plugins/modules/{system => }/ssh_config.py | 0 .../modules/{monitoring => }/stackdriver.py | 0 .../stacki => }/stacki_host.py | 0 plugins/modules/{monitoring => }/statsd.py | 0 .../{monitoring => }/statusio_maintenance.py | 0 plugins/modules/{system => }/sudoers.py | 0 .../{web_infrastructure => }/supervisorctl.py | 0 plugins/modules/{system => }/svc.py | 0 plugins/modules/{packaging/os => }/svr4pkg.py | 0 plugins/modules/{packaging/os => }/swdepot.py | 0 plugins/modules/{packaging/os => }/swupd.py | 0 .../modules/{notification => }/syslogger.py | 0 plugins/modules/{system => }/syspatch.py | 0 plugins/modules/{system => }/sysrc.py | 0 plugins/modules/{system => }/sysupgrade.py | 0 .../{web_infrastructure => }/taiga_issue.py | 0 .../modules/{notification => }/telegram.py | 0 plugins/modules/{cloud/misc => }/terraform.py | 0 plugins/modules/{system => }/timezone.py | 0 plugins/modules/{notification => }/twilio.py | 0 .../modules/{notification => }/typetalk.py | 0 .../{cloud/univention => }/udm_dns_record.py | 0 .../{cloud/univention => }/udm_dns_zone.py | 0 .../{cloud/univention => }/udm_group.py | 0 .../{cloud/univention => }/udm_share.py | 0 .../{cloud/univention => }/udm_user.py | 0 plugins/modules/{system => }/ufw.py | 0 .../modules/{monitoring => }/uptimerobot.py | 0 plugins/modules/{packaging/os => }/urpmi.py | 0 .../sophos_utm => }/utm_aaa_group.py | 0 .../sophos_utm => }/utm_aaa_group_info.py | 0 .../sophos_utm => }/utm_ca_host_key_cert.py | 0 .../utm_ca_host_key_cert_info.py | 0 .../sophos_utm => }/utm_dns_host.py | 0 .../utm_network_interface_address.py | 0 .../utm_network_interface_address_info.py | 0 .../sophos_utm => }/utm_proxy_auth_profile.py | 0 .../sophos_utm => }/utm_proxy_exception.py | 0 .../sophos_utm => }/utm_proxy_frontend.py | 0 .../utm_proxy_frontend_info.py | 0 .../sophos_utm => }/utm_proxy_location.py | 0 .../utm_proxy_location_info.py | 0 plugins/modules/{system => }/vdo.py | 0 .../vertica => }/vertica_configuration.py | 0 .../{database/vertica => }/vertica_info.py | 0 .../{database/vertica => }/vertica_role.py | 0 .../{database/vertica => }/vertica_schema.py | 0 .../{database/vertica => }/vertica_user.py | 0 .../modules/{storage/vexata => }/vexata_eg.py | 0 .../{storage/vexata => }/vexata_volume.py | 0 plugins/modules/{cloud/smartos => }/vmadm.py | 0 .../{remote_management => }/wakeonlan.py | 0 .../redfish => }/wdc_redfish_command.py | 0 .../redfish => }/wdc_redfish_info.py | 0 .../{cloud/webfaction => }/webfaction_app.py | 0 .../{cloud/webfaction => }/webfaction_db.py | 0 .../webfaction => }/webfaction_domain.py | 0 .../webfaction => }/webfaction_mailbox.py | 0 .../{cloud/webfaction => }/webfaction_site.py | 0 plugins/modules/{files => }/xattr.py | 0 plugins/modules/{packaging/os => }/xbps.py | 0 .../lenovoxcc => }/xcc_redfish_command.py | 0 .../{cloud/misc => }/xenserver_facts.py | 0 .../{cloud/xenserver => }/xenserver_guest.py | 0 .../xenserver => }/xenserver_guest_info.py | 0 .../xenserver_guest_powerstate.py | 0 plugins/modules/{system => }/xfconf.py | 0 plugins/modules/{system => }/xfconf_info.py | 0 plugins/modules/{system => }/xfs_quota.py | 0 plugins/modules/{files => }/xml.py | 0 .../modules/{packaging/language => }/yarn.py | 0 .../{packaging/os => }/yum_versionlock.py | 0 plugins/modules/{storage/zfs => }/zfs.py | 0 .../{storage/zfs => }/zfs_delegate_admin.py | 0 .../modules/{storage/zfs => }/zfs_facts.py | 0 plugins/modules/{clustering => }/znode.py | 0 .../modules/{storage/zfs => }/zpool_facts.py | 0 plugins/modules/{packaging/os => }/zypper.py | 0 .../{packaging/os => }/zypper_repository.py | 0 tests/sanity/ignore-2.11.txt | 66 +- tests/sanity/ignore-2.12.txt | 66 +- tests/sanity/ignore-2.13.txt | 66 +- tests/sanity/ignore-2.14.txt | 70 +- tests/sanity/ignore-2.15.txt | 70 +- .../xenserver => }/FakeAnsibleModule.py | 0 .../{cloud/xenserver => }/FakeXenAPI.py | 0 .../{source_control/gitlab => }/gitlab.py | 0 .../oneview => }/hpe_test_utils.py | 4 +- .../interfaces_file/interfaces_file-README.md | 0 .../address_family.test_no_changes | 0 .../address_family.test_no_changes.json | 0 ...ddress_family.test_no_changes.json.license | 0 .../address_family.test_no_changes.license | 0 .../golden_output/address_family_add_aggi_up | 0 .../address_family_add_aggi_up.exceptions.txt | 0 ..._family_add_aggi_up.exceptions.txt.license | 0 .../address_family_add_aggi_up.json | 0 .../address_family_add_aggi_up.json.license | 0 .../address_family_add_aggi_up.license | 0 .../address_family_add_aggi_up_twice | 0 ...ss_family_add_aggi_up_twice.exceptions.txt | 0 ...y_add_aggi_up_twice.exceptions.txt.license | 0 .../address_family_add_aggi_up_twice.json | 0 ...ress_family_add_aggi_up_twice.json.license | 0 .../address_family_add_aggi_up_twice.license | 0 .../address_family_add_and_delete_aggi_up | 0 ...mily_add_and_delete_aggi_up.exceptions.txt | 0 ..._and_delete_aggi_up.exceptions.txt.license | 0 ...address_family_add_and_delete_aggi_up.json | 0 ...family_add_and_delete_aggi_up.json.license | 0 ...ress_family_add_and_delete_aggi_up.license | 0 .../address_family_aggi_remove_dup | 0 ...ress_family_aggi_remove_dup.exceptions.txt | 0 ...ily_aggi_remove_dup.exceptions.txt.license | 0 .../address_family_aggi_remove_dup.json | 0 ...ddress_family_aggi_remove_dup.json.license | 0 .../address_family_aggi_remove_dup.license | 0 .../golden_output/address_family_change_ipv4 | 0 .../address_family_change_ipv4.exceptions.txt | 0 .../address_family_change_ipv4.json | 0 .../address_family_change_ipv4.json.license | 0 .../address_family_change_ipv4.license | 0 .../address_family_change_ipv4_post_up | 0 ..._family_change_ipv4_post_up.exceptions.txt | 0 .../address_family_change_ipv4_post_up.json | 0 ...ss_family_change_ipv4_post_up.json.license | 0 ...address_family_change_ipv4_post_up.license | 0 .../address_family_change_ipv4_pre_up | 0 ...s_family_change_ipv4_pre_up.exceptions.txt | 0 .../address_family_change_ipv4_pre_up.json | 0 ...ess_family_change_ipv4_pre_up.json.license | 0 .../address_family_change_ipv4_pre_up.license | 0 .../golden_output/address_family_change_ipv6 | 0 .../address_family_change_ipv6.exceptions.txt | 0 .../address_family_change_ipv6.json | 0 .../address_family_change_ipv6.json.license | 0 .../address_family_change_ipv6.license | 0 .../address_family_change_ipv6_post_up | 0 ..._family_change_ipv6_post_up.exceptions.txt | 0 .../address_family_change_ipv6_post_up.json | 0 ...ss_family_change_ipv6_post_up.json.license | 0 ...address_family_change_ipv6_post_up.license | 0 .../address_family_change_ipv6_pre_up | 0 ...s_family_change_ipv6_pre_up.exceptions.txt | 0 .../address_family_change_ipv6_pre_up.json | 0 ...ess_family_change_ipv6_pre_up.json.license | 0 .../address_family_change_ipv6_pre_up.license | 0 .../address_family_change_method | 0 ...ddress_family_change_method.exceptions.txt | 0 ...amily_change_method.exceptions.txt.license | 0 .../address_family_change_method.json | 0 .../address_family_change_method.json.license | 0 .../address_family_change_method.license | 0 .../golden_output/address_family_revert | 0 .../address_family_revert.exceptions.txt | 0 .../golden_output/address_family_revert.json | 0 .../address_family_revert.json.license | 0 .../address_family_revert.license | 0 .../address_family_set_aggi_and_eth0_mtu | 0 ...amily_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../address_family_set_aggi_and_eth0_mtu.json | 0 ..._family_set_aggi_and_eth0_mtu.json.license | 0 ...dress_family_set_aggi_and_eth0_mtu.license | 0 .../address_family_set_aggi_slaves | 0 ...ress_family_set_aggi_slaves.exceptions.txt | 0 ...ily_set_aggi_slaves.exceptions.txt.license | 0 .../address_family_set_aggi_slaves.json | 0 ...ddress_family_set_aggi_slaves.json.license | 0 .../address_family_set_aggi_slaves.license | 0 .../default_dhcp.test_no_changes | 0 .../default_dhcp.test_no_changes.json | 0 .../default_dhcp.test_no_changes.json.license | 0 .../default_dhcp.test_no_changes.license | 0 .../golden_output/default_dhcp_add_aggi_up | 0 .../default_dhcp_add_aggi_up.exceptions.txt | 0 ...lt_dhcp_add_aggi_up.exceptions.txt.license | 0 .../default_dhcp_add_aggi_up.json | 0 .../default_dhcp_add_aggi_up.json.license | 0 .../default_dhcp_add_aggi_up.license | 0 .../default_dhcp_add_aggi_up_twice | 0 ...ault_dhcp_add_aggi_up_twice.exceptions.txt | 0 ...p_add_aggi_up_twice.exceptions.txt.license | 0 .../default_dhcp_add_aggi_up_twice.json | 0 ...efault_dhcp_add_aggi_up_twice.json.license | 0 .../default_dhcp_add_aggi_up_twice.license | 0 .../default_dhcp_add_and_delete_aggi_up | 0 ...dhcp_add_and_delete_aggi_up.exceptions.txt | 0 ..._and_delete_aggi_up.exceptions.txt.license | 0 .../default_dhcp_add_and_delete_aggi_up.json | 0 ...t_dhcp_add_and_delete_aggi_up.json.license | 0 ...efault_dhcp_add_and_delete_aggi_up.license | 0 .../default_dhcp_aggi_remove_dup | 0 ...efault_dhcp_aggi_remove_dup.exceptions.txt | 0 ...hcp_aggi_remove_dup.exceptions.txt.license | 0 .../default_dhcp_aggi_remove_dup.json | 0 .../default_dhcp_aggi_remove_dup.json.license | 0 .../default_dhcp_aggi_remove_dup.license | 0 .../golden_output/default_dhcp_change_ipv4 | 0 .../default_dhcp_change_ipv4.exceptions.txt | 0 .../default_dhcp_change_ipv4.json | 0 .../default_dhcp_change_ipv4.json.license | 0 .../default_dhcp_change_ipv4.license | 0 .../default_dhcp_change_ipv4_post_up | 0 ...lt_dhcp_change_ipv4_post_up.exceptions.txt | 0 .../default_dhcp_change_ipv4_post_up.json | 0 ...ault_dhcp_change_ipv4_post_up.json.license | 0 .../default_dhcp_change_ipv4_post_up.license | 0 .../default_dhcp_change_ipv4_pre_up | 0 ...ult_dhcp_change_ipv4_pre_up.exceptions.txt | 0 .../default_dhcp_change_ipv4_pre_up.json | 0 ...fault_dhcp_change_ipv4_pre_up.json.license | 0 .../default_dhcp_change_ipv4_pre_up.license | 0 .../golden_output/default_dhcp_change_ipv6 | 0 .../default_dhcp_change_ipv6.exceptions.txt | 0 ...lt_dhcp_change_ipv6.exceptions.txt.license | 0 .../default_dhcp_change_ipv6.json | 0 .../default_dhcp_change_ipv6.json.license | 0 .../default_dhcp_change_ipv6.license | 0 .../default_dhcp_change_ipv6_post_up | 0 ...lt_dhcp_change_ipv6_post_up.exceptions.txt | 0 ...change_ipv6_post_up.exceptions.txt.license | 0 .../default_dhcp_change_ipv6_post_up.json | 0 ...ault_dhcp_change_ipv6_post_up.json.license | 0 .../default_dhcp_change_ipv6_post_up.license | 0 .../default_dhcp_change_ipv6_pre_up | 0 ...ult_dhcp_change_ipv6_pre_up.exceptions.txt | 0 ..._change_ipv6_pre_up.exceptions.txt.license | 0 .../default_dhcp_change_ipv6_pre_up.json | 0 ...fault_dhcp_change_ipv6_pre_up.json.license | 0 .../default_dhcp_change_ipv6_pre_up.license | 0 .../golden_output/default_dhcp_change_method | 0 .../default_dhcp_change_method.exceptions.txt | 0 ..._dhcp_change_method.exceptions.txt.license | 0 .../default_dhcp_change_method.json | 0 .../default_dhcp_change_method.json.license | 0 .../default_dhcp_change_method.license | 0 .../golden_output/default_dhcp_revert | 0 .../default_dhcp_revert.exceptions.txt | 0 .../golden_output/default_dhcp_revert.json | 0 .../default_dhcp_revert.json.license | 0 .../golden_output/default_dhcp_revert.license | 0 .../default_dhcp_set_aggi_and_eth0_mtu | 0 ..._dhcp_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../default_dhcp_set_aggi_and_eth0_mtu.json | 0 ...lt_dhcp_set_aggi_and_eth0_mtu.json.license | 0 ...default_dhcp_set_aggi_and_eth0_mtu.license | 0 .../default_dhcp_set_aggi_slaves | 0 ...efault_dhcp_set_aggi_slaves.exceptions.txt | 0 ...hcp_set_aggi_slaves.exceptions.txt.license | 0 .../default_dhcp_set_aggi_slaves.json | 0 .../default_dhcp_set_aggi_slaves.json.license | 0 .../default_dhcp_set_aggi_slaves.license | 0 .../golden_output/servers.com.test_no_changes | 0 .../servers.com.test_no_changes.json | 0 .../servers.com.test_no_changes.json.license | 0 .../servers.com.test_no_changes.license | 0 .../golden_output/servers.com_add_aggi_up | 0 .../servers.com_add_aggi_up.exceptions.txt | 0 .../servers.com_add_aggi_up.json | 0 .../servers.com_add_aggi_up.json.license | 0 .../servers.com_add_aggi_up.license | 0 .../servers.com_add_aggi_up_twice | 0 ...rvers.com_add_aggi_up_twice.exceptions.txt | 0 .../servers.com_add_aggi_up_twice.json | 0 ...servers.com_add_aggi_up_twice.json.license | 0 .../servers.com_add_aggi_up_twice.license | 0 .../servers.com_add_and_delete_aggi_up | 0 ....com_add_and_delete_aggi_up.exceptions.txt | 0 .../servers.com_add_and_delete_aggi_up.json | 0 ...rs.com_add_and_delete_aggi_up.json.license | 0 ...servers.com_add_and_delete_aggi_up.license | 0 .../golden_output/servers.com_aggi_remove_dup | 0 ...servers.com_aggi_remove_dup.exceptions.txt | 0 .../servers.com_aggi_remove_dup.json | 0 .../servers.com_aggi_remove_dup.json.license | 0 .../servers.com_aggi_remove_dup.license | 0 .../golden_output/servers.com_change_ipv4 | 0 .../servers.com_change_ipv4.exceptions.txt | 0 ...ers.com_change_ipv4.exceptions.txt.license | 0 .../servers.com_change_ipv4.json | 0 .../servers.com_change_ipv4.json.license | 0 .../servers.com_change_ipv4.license | 0 .../servers.com_change_ipv4_post_up | 0 ...ers.com_change_ipv4_post_up.exceptions.txt | 0 ...change_ipv4_post_up.exceptions.txt.license | 0 .../servers.com_change_ipv4_post_up.json | 0 ...rvers.com_change_ipv4_post_up.json.license | 0 .../servers.com_change_ipv4_post_up.license | 0 .../servers.com_change_ipv4_pre_up | 0 ...vers.com_change_ipv4_pre_up.exceptions.txt | 0 ..._change_ipv4_pre_up.exceptions.txt.license | 0 .../servers.com_change_ipv4_pre_up.json | 0 ...ervers.com_change_ipv4_pre_up.json.license | 0 .../servers.com_change_ipv4_pre_up.license | 0 .../golden_output/servers.com_change_ipv6 | 0 .../servers.com_change_ipv6.exceptions.txt | 0 ...ers.com_change_ipv6.exceptions.txt.license | 0 .../servers.com_change_ipv6.json | 0 .../servers.com_change_ipv6.json.license | 0 .../servers.com_change_ipv6.license | 0 .../servers.com_change_ipv6_post_up | 0 ...ers.com_change_ipv6_post_up.exceptions.txt | 0 ...change_ipv6_post_up.exceptions.txt.license | 0 .../servers.com_change_ipv6_post_up.json | 0 ...rvers.com_change_ipv6_post_up.json.license | 0 .../servers.com_change_ipv6_post_up.license | 0 .../servers.com_change_ipv6_pre_up | 0 ...vers.com_change_ipv6_pre_up.exceptions.txt | 0 ..._change_ipv6_pre_up.exceptions.txt.license | 0 .../servers.com_change_ipv6_pre_up.json | 0 ...ervers.com_change_ipv6_pre_up.json.license | 0 .../servers.com_change_ipv6_pre_up.license | 0 .../golden_output/servers.com_change_method | 0 .../servers.com_change_method.exceptions.txt | 0 .../servers.com_change_method.json | 0 .../servers.com_change_method.json.license | 0 .../servers.com_change_method.license | 0 .../golden_output/servers.com_revert | 0 .../servers.com_revert.exceptions.txt | 0 .../servers.com_revert.exceptions.txt.license | 0 .../golden_output/servers.com_revert.json | 0 .../servers.com_revert.json.license | 0 .../golden_output/servers.com_revert.license | 0 .../servers.com_set_aggi_and_eth0_mtu | 0 ...s.com_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../servers.com_set_aggi_and_eth0_mtu.json | 0 ...ers.com_set_aggi_and_eth0_mtu.json.license | 0 .../servers.com_set_aggi_and_eth0_mtu.license | 0 .../golden_output/servers.com_set_aggi_slaves | 0 ...servers.com_set_aggi_slaves.exceptions.txt | 0 .../servers.com_set_aggi_slaves.json | 0 .../servers.com_set_aggi_slaves.json.license | 0 .../servers.com_set_aggi_slaves.license | 0 .../golden_output/up_down_dup.test_no_changes | 0 .../up_down_dup.test_no_changes.json | 0 .../up_down_dup.test_no_changes.json.license | 0 .../up_down_dup.test_no_changes.license | 0 .../golden_output/up_down_dup_add_aggi_up | 0 .../up_down_dup_add_aggi_up.exceptions.txt | 0 .../up_down_dup_add_aggi_up.json | 0 .../up_down_dup_add_aggi_up.json.license | 0 .../up_down_dup_add_aggi_up.license | 0 .../up_down_dup_add_aggi_up_twice | 0 ..._down_dup_add_aggi_up_twice.exceptions.txt | 0 .../up_down_dup_add_aggi_up_twice.json | 0 ...up_down_dup_add_aggi_up_twice.json.license | 0 .../up_down_dup_add_aggi_up_twice.license | 0 .../up_down_dup_add_and_delete_aggi_up | 0 ..._dup_add_and_delete_aggi_up.exceptions.txt | 0 .../up_down_dup_add_and_delete_aggi_up.json | 0 ...wn_dup_add_and_delete_aggi_up.json.license | 0 ...up_down_dup_add_and_delete_aggi_up.license | 0 .../golden_output/up_down_dup_aggi_remove_dup | 0 ...up_down_dup_aggi_remove_dup.exceptions.txt | 0 .../up_down_dup_aggi_remove_dup.json | 0 .../up_down_dup_aggi_remove_dup.json.license | 0 .../up_down_dup_aggi_remove_dup.license | 0 .../golden_output/up_down_dup_change_ipv4 | 0 .../up_down_dup_change_ipv4.exceptions.txt | 0 ...own_dup_change_ipv4.exceptions.txt.license | 0 .../up_down_dup_change_ipv4.json | 0 .../up_down_dup_change_ipv4.json.license | 0 .../up_down_dup_change_ipv4.license | 0 .../up_down_dup_change_ipv4_post_up | 0 ...own_dup_change_ipv4_post_up.exceptions.txt | 0 ...change_ipv4_post_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv4_post_up.json | 0 ..._down_dup_change_ipv4_post_up.json.license | 0 .../up_down_dup_change_ipv4_post_up.license | 0 .../up_down_dup_change_ipv4_pre_up | 0 ...down_dup_change_ipv4_pre_up.exceptions.txt | 0 ..._change_ipv4_pre_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv4_pre_up.json | 0 ...p_down_dup_change_ipv4_pre_up.json.license | 0 .../up_down_dup_change_ipv4_pre_up.license | 0 .../golden_output/up_down_dup_change_ipv6 | 0 .../up_down_dup_change_ipv6.exceptions.txt | 0 ...own_dup_change_ipv6.exceptions.txt.license | 0 .../up_down_dup_change_ipv6.json | 0 .../up_down_dup_change_ipv6.json.license | 0 .../up_down_dup_change_ipv6.license | 0 .../up_down_dup_change_ipv6_post_up | 0 ...own_dup_change_ipv6_post_up.exceptions.txt | 0 ...change_ipv6_post_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv6_post_up.json | 0 ..._down_dup_change_ipv6_post_up.json.license | 0 .../up_down_dup_change_ipv6_post_up.license | 0 .../up_down_dup_change_ipv6_pre_up | 0 ...down_dup_change_ipv6_pre_up.exceptions.txt | 0 ..._change_ipv6_pre_up.exceptions.txt.license | 0 .../up_down_dup_change_ipv6_pre_up.json | 0 ...p_down_dup_change_ipv6_pre_up.json.license | 0 .../up_down_dup_change_ipv6_pre_up.license | 0 .../golden_output/up_down_dup_change_method | 0 .../up_down_dup_change_method.exceptions.txt | 0 ...n_dup_change_method.exceptions.txt.license | 0 .../up_down_dup_change_method.json | 0 .../up_down_dup_change_method.json.license | 0 .../up_down_dup_change_method.license | 0 .../golden_output/up_down_dup_revert | 0 .../up_down_dup_revert.exceptions.txt | 0 .../up_down_dup_revert.exceptions.txt.license | 0 .../golden_output/up_down_dup_revert.json | 0 .../up_down_dup_revert.json.license | 0 .../golden_output/up_down_dup_revert.license | 0 .../up_down_dup_set_aggi_and_eth0_mtu | 0 ...n_dup_set_aggi_and_eth0_mtu.exceptions.txt | 0 ...t_aggi_and_eth0_mtu.exceptions.txt.license | 0 .../up_down_dup_set_aggi_and_eth0_mtu.json | 0 ...own_dup_set_aggi_and_eth0_mtu.json.license | 0 .../up_down_dup_set_aggi_and_eth0_mtu.license | 0 .../golden_output/up_down_dup_set_aggi_slaves | 0 ...up_down_dup_set_aggi_slaves.exceptions.txt | 0 .../up_down_dup_set_aggi_slaves.json | 0 .../up_down_dup_set_aggi_slaves.json.license | 0 .../up_down_dup_set_aggi_slaves.license | 0 .../input/address_family | 0 .../input/address_family.license | 0 .../input/default_dhcp | 0 .../input/default_dhcp.license | 0 .../input/servers.com | 0 .../input/servers.com.license | 0 .../input/up_down_dup | 0 .../input/up_down_dup.license | 0 .../interfaces_file/test_interfaces_file.py | 2 +- .../{cloud/linode => }/linode_conftest.py | 0 .../oneview => }/oneview_conftest.py | 0 .../plugins/modules/oneview_module_loader.py | 32 + .../oneview/oneview_module_loader.py | 32 - .../{packaging/os => }/rhn_conftest.py | 0 .../{monitoring => }/test_alerta_customer.py | 2 +- .../test_apache2_module.py | 2 +- .../modules/{packaging/os => }/test_apk.py | 6 +- .../modules/{files => }/test_archive.py | 2 +- .../test_bitbucket_access_key.py | 2 +- .../test_bitbucket_pipeline_key_pair.py | 2 +- .../test_bitbucket_pipeline_known_host.py | 4 +- .../test_bitbucket_pipeline_variable.py | 2 +- .../{notification => }/test_campfire.py | 2 +- .../test_circonus_annotation.py | 2 +- .../{packaging/language => }/test_cpanm.py | 2 +- .../test_datadog_downtime.py.disabled | 0 .../{notification => }/test_discord.py | 2 +- .../modules/{net_tools => }/test_dnsimple.py | 2 +- .../{net_tools => }/test_dnsimple_info.py | 2 +- .../{system => }/test_gconftool2_info.py | 2 +- .../{packaging/language => }/test_gem.py | 8 +- .../github => }/test_github_repo.py | 2 +- .../gitlab => }/test_gitlab_deploy_key.py | 2 +- .../gitlab => }/test_gitlab_group.py | 2 +- .../gitlab => }/test_gitlab_hook.py | 2 +- .../gitlab => }/test_gitlab_project.py | 2 +- .../test_gitlab_protected_branch.py | 2 +- .../gitlab => }/test_gitlab_runner.py | 2 +- .../gitlab => }/test_gitlab_user.py | 2 +- .../{database/saphana => }/test_hana_query.py | 2 +- .../{packaging/os => }/test_homebrew.py | 2 +- .../{packaging/os => }/test_homebrew_cask.py | 2 +- .../{monitoring => }/test_icinga2_feature.py | 2 +- .../{identity/ipa => }/test_ipa_otpconfig.py | 2 +- .../{identity/ipa => }/test_ipa_otptoken.py | 2 +- .../{identity/ipa => }/test_ipa_pwpolicy.py | 2 +- .../{system => }/test_java_keystore.py | 12 +- .../test_jenkins_build.py | 22 +- .../test_jenkins_plugin.py | 2 +- .../test_keycloak_authentication.py | 2 +- .../keycloak => }/test_keycloak_client.py | 2 +- .../test_keycloak_client_rolemapping.py | 2 +- .../test_keycloak_clientscope.py | 2 +- .../test_keycloak_identity_provider.py | 2 +- .../keycloak => }/test_keycloak_realm.py | 2 +- .../keycloak => }/test_keycloak_realm_info.py | 2 +- .../keycloak => }/test_keycloak_role.py | 2 +- .../test_keycloak_user_federation.py | 2 +- .../modules/{cloud/linode => }/test_linode.py | 2 +- .../{cloud/linode => }/test_linode_v4.py | 2 +- .../lxca => }/test_lxca_cmms.py | 12 +- .../lxca => }/test_lxca_nodes.py | 12 +- .../{packaging/os => }/test_macports.py | 2 +- .../language => }/test_maven_artifact.py | 4 +- .../modules/{system => }/test_modprobe.py | 6 +- .../modules/{monitoring => }/test_monit.py | 2 +- .../modules/{net_tools => }/test_nmcli.py | 2 +- .../{packaging/language => }/test_npm.py | 4 +- .../test_oneview_datacenter_info.py | 2 +- .../test_oneview_enclosure_info.py | 2 +- .../test_oneview_ethernet_network.py | 0 .../test_oneview_ethernet_network_info.py | 0 .../oneview => }/test_oneview_fc_network.py | 0 .../test_oneview_fc_network_info.py | 0 .../oneview => }/test_oneview_fcoe_network.py | 0 .../test_oneview_fcoe_network_info.py | 0 ...test_oneview_logical_interconnect_group.py | 2 +- ...oneview_logical_interconnect_group_info.py | 2 +- .../oneview => }/test_oneview_network_set.py | 0 .../test_oneview_network_set_info.py | 0 .../oneview => }/test_oneview_san_manager.py | 0 .../test_oneview_san_manager_info.py | 0 .../modules/{packaging/os => }/test_pacman.py | 4 +- .../{packaging/os => }/test_pacman_key.py | 2 +- .../{monitoring => }/test_pagerduty.py | 2 +- .../{monitoring => }/test_pagerduty_alert.py | 2 +- .../{monitoring => }/test_pagerduty_change.py | 2 +- .../plugins/modules/{system => }/test_pamd.py | 10 +- .../modules/{system => }/test_parted.py | 34 +- .../modules/{packaging/os => }/test_pkgin.py | 18 +- .../modules/{storage/pmem => }/test_pmem.py | 36 +- .../pritunl => }/test_pritunl_org.py | 2 +- .../pritunl => }/test_pritunl_org_info.py | 2 +- .../pritunl => }/test_pritunl_user.py | 2 +- .../pritunl => }/test_pritunl_user_info.py | 2 +- .../{cloud/misc => }/test_proxmox_kvm.py | 2 +- .../{cloud/misc => }/test_proxmox_snap.py | 2 +- .../misc => }/test_proxmox_tasks_info.py | 2 +- .../os => }/test_redhat_subscription.py | 10 +- .../{database/misc => }/test_redis_data.py | 2 +- .../misc => }/test_redis_data_incr.py | 2 +- .../misc => }/test_redis_data_info.py | 2 +- .../{database/misc => }/test_redis_info.py | 4 +- .../{packaging/os => }/test_rhn_channel.py | 2 +- .../{packaging/os => }/test_rhn_register.py | 6 +- .../{packaging/os => }/test_rhsm_release.py | 6 +- .../{packaging/os => }/test_rpm_ostree_pkg.py | 4 +- .../test_sap_task_list_execute.py | 2 +- .../{files => }/test_sapcar_extract.py | 2 +- .../test_scaleway_compute_private_network.py | 2 +- .../test_scaleway_private_network.py | 2 +- .../modules/{notification => }/test_slack.py | 2 +- .../modules/{system => }/test_solaris_zone.py | 2 +- .../{storage/hpe3par => }/test_ss_3par_cpg.py | 28 +- .../modules/{monitoring => }/test_statsd.py | 6 +- .../modules/{system => }/test_sysupgrade.py | 2 +- .../{cloud/misc => }/test_terraform.py | 2 +- .../plugins/modules/{system => }/test_ufw.py | 2 +- .../wdc => }/test_wdc_redfish_command.py | 2 +- .../wdc => }/test_wdc_redfish_info.py | 2 +- .../test_xcc_redfish_command.py | 2 +- .../test_xenserver_guest_info.py | 6 +- .../test_xenserver_guest_powerstate.py | 36 +- .../modules/{system => }/test_xfconf.py | 2 +- .../modules/{system => }/test_xfconf_info.py | 2 +- .../{cloud/xenserver => }/xenserver_common.py | 0 .../xenserver => }/xenserver_conftest.py | 6 +- 1033 files changed, 4802 insertions(+), 1989 deletions(-) create mode 100644 changelogs/fragments/unflatmap.yml rename plugins/action/{system => }/iptables_state.py (100%) rename plugins/action/{system => }/shutdown.py (100%) rename plugins/modules/{database/aerospike => }/aerospike_migrations.py (100%) rename plugins/modules/{monitoring => }/airbrake_deployment.py (100%) rename plugins/modules/{system => }/aix_devices.py (100%) rename plugins/modules/{system => }/aix_filesystem.py (100%) rename plugins/modules/{system => }/aix_inittab.py (100%) rename plugins/modules/{system => }/aix_lvg.py (100%) rename plugins/modules/{system => }/aix_lvol.py (100%) rename plugins/modules/{monitoring => }/alerta_customer.py (100%) rename plugins/modules/{cloud/alicloud => }/ali_instance.py (100%) rename plugins/modules/{cloud/alicloud => }/ali_instance_info.py (100%) rename plugins/modules/{system => }/alternatives.py (100%) rename plugins/modules/{packaging/language => }/ansible_galaxy_install.py (100%) rename plugins/modules/{web_infrastructure => }/apache2_mod_proxy.py (100%) rename plugins/modules/{web_infrastructure => }/apache2_module.py (100%) rename plugins/modules/{packaging/os => }/apk.py (100%) rename plugins/modules/{packaging/os => }/apt_repo.py (100%) rename plugins/modules/{packaging/os => }/apt_rpm.py (100%) rename plugins/modules/{files => }/archive.py (100%) rename plugins/modules/{cloud/atomic => }/atomic_container.py (100%) rename plugins/modules/{cloud/atomic => }/atomic_host.py (100%) rename plugins/modules/{cloud/atomic => }/atomic_image.py (100%) rename plugins/modules/{system => }/awall.py (100%) rename plugins/modules/{system => }/beadm.py (100%) rename plugins/modules/{notification => }/bearychat.py (100%) rename plugins/modules/{monitoring => }/bigpanda.py (100%) rename plugins/modules/{source_control/bitbucket => }/bitbucket_access_key.py (100%) rename plugins/modules/{source_control/bitbucket => }/bitbucket_pipeline_key_pair.py (100%) rename plugins/modules/{source_control/bitbucket => }/bitbucket_pipeline_known_host.py (100%) rename plugins/modules/{source_control/bitbucket => }/bitbucket_pipeline_variable.py (100%) rename plugins/modules/{packaging/language => }/bower.py (100%) rename plugins/modules/{packaging/language => }/bundler.py (100%) rename plugins/modules/{source_control => }/bzr.py (100%) rename plugins/modules/{notification => }/campfire.py (100%) rename plugins/modules/{system => }/capabilities.py (100%) rename plugins/modules/{packaging/language => }/cargo.py (100%) rename plugins/modules/{notification => }/catapult.py (100%) rename plugins/modules/{monitoring => }/circonus_annotation.py (100%) rename plugins/modules/{notification => }/cisco_webex.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_aa_policy.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_alert_policy.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_blueprint_package.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_firewall_policy.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_group.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_loadbalancer.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_modify_server.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_publicip.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_server.py (100%) rename plugins/modules/{cloud/centurylink => }/clc_server_snapshot.py (100%) rename plugins/modules/{cloud/misc => }/cloud_init_data_facts.py (100%) rename plugins/modules/{net_tools => }/cloudflare_dns.py (100%) rename plugins/modules/{remote_management/cobbler => }/cobbler_sync.py (100%) rename plugins/modules/{remote_management/cobbler => }/cobbler_system.py (100%) rename plugins/modules/{packaging/language => }/composer.py (100%) rename plugins/modules/{clustering/consul => }/consul.py (100%) rename plugins/modules/{clustering/consul => }/consul_acl.py (100%) rename plugins/modules/{clustering/consul => }/consul_kv.py (100%) rename plugins/modules/{clustering/consul => }/consul_session.py (100%) rename plugins/modules/{packaging/os => }/copr.py (100%) rename plugins/modules/{packaging/language => }/cpanm.py (100%) rename plugins/modules/{system => }/cronvar.py (100%) rename plugins/modules/{system => }/crypttab.py (100%) rename plugins/modules/{monitoring/datadog => }/datadog_downtime.py (100%) rename plugins/modules/{monitoring/datadog => }/datadog_event.py (100%) rename plugins/modules/{monitoring/datadog => }/datadog_monitor.py (100%) rename plugins/modules/{system => }/dconf.py (100%) rename plugins/modules/{web_infrastructure => }/deploy_helper.py (100%) rename plugins/modules/{cloud/dimensiondata => }/dimensiondata_network.py (100%) rename plugins/modules/{cloud/dimensiondata => }/dimensiondata_vlan.py (100%) rename plugins/modules/{notification => }/discord.py (100%) rename plugins/modules/{web_infrastructure => }/django_manage.py (100%) rename plugins/modules/{packaging/os => }/dnf_versionlock.py (100%) rename plugins/modules/{net_tools => }/dnsimple.py (100%) rename plugins/modules/{net_tools => }/dnsimple_info.py (100%) rename plugins/modules/{net_tools => }/dnsmadeeasy.py (100%) rename plugins/modules/{system => }/dpkg_divert.py (100%) rename plugins/modules/{packaging/language => }/easy_install.py (100%) rename plugins/modules/{web_infrastructure => }/ejabberd_user.py (100%) rename plugins/modules/{database/misc => }/elasticsearch_plugin.py (100%) rename plugins/modules/{storage/emc => }/emc_vnx_sg_member.py (100%) rename plugins/modules/{clustering => }/etcd3.py (100%) rename plugins/modules/{system => }/facter.py (100%) rename plugins/modules/{files => }/filesize.py (100%) rename plugins/modules/{system => }/filesystem.py (100%) rename plugins/modules/{packaging/os => }/flatpak.py (100%) rename plugins/modules/{packaging/os => }/flatpak_remote.py (100%) rename plugins/modules/{notification => }/flowdock.py (100%) rename plugins/modules/{net_tools => }/gandi_livedns.py (100%) rename plugins/modules/{system => }/gconftool2.py (100%) rename plugins/modules/{system => }/gconftool2_info.py (100%) rename plugins/modules/{packaging/language => }/gem.py (100%) rename plugins/modules/{source_control => }/git_config.py (100%) rename plugins/modules/{source_control/github => }/github_deploy_key.py (100%) rename plugins/modules/{source_control/github => }/github_issue.py (100%) rename plugins/modules/{source_control/github => }/github_key.py (100%) rename plugins/modules/{source_control/github => }/github_release.py (100%) rename plugins/modules/{source_control/github => }/github_repo.py (100%) rename plugins/modules/{source_control/github => }/github_webhook.py (100%) rename plugins/modules/{source_control/github => }/github_webhook_info.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_branch.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_deploy_key.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_group.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_group_members.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_group_variable.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_hook.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_project.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_project_members.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_project_variable.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_protected_branch.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_runner.py (100%) rename plugins/modules/{source_control/gitlab => }/gitlab_user.py (100%) rename plugins/modules/{notification => }/grove.py (100%) rename plugins/modules/{web_infrastructure => }/gunicorn.py (100%) rename plugins/modules/{database/saphana => }/hana_query.py (100%) rename plugins/modules/{net_tools => }/haproxy.py (100%) rename plugins/modules/{cloud/heroku => }/heroku_collaborator.py (100%) rename plugins/modules/{source_control => }/hg.py (100%) rename plugins/modules/{notification => }/hipchat.py (100%) rename plugins/modules/{packaging/os => }/homebrew.py (100%) rename plugins/modules/{packaging/os => }/homebrew_cask.py (100%) rename plugins/modules/{packaging/os => }/homebrew_tap.py (100%) rename plugins/modules/{system => }/homectl.py (100%) rename plugins/modules/{monitoring => }/honeybadger_deployment.py (100%) rename plugins/modules/{remote_management/hpilo => }/hpilo_boot.py (100%) rename plugins/modules/{remote_management/hpilo => }/hpilo_info.py (100%) rename plugins/modules/{remote_management/hpilo => }/hponcfg.py (100%) rename plugins/modules/{web_infrastructure => }/htpasswd.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_ecs_instance.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_evs_disk.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_network_vpc.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_smn_topic.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_eip.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_peering_connect.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_port.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_private_ip.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_route.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_security_group.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_security_group_rule.py (100%) rename plugins/modules/{cloud/huawei => }/hwc_vpc_subnet.py (100%) rename plugins/modules/{storage/ibm => }/ibm_sa_domain.py (100%) rename plugins/modules/{storage/ibm => }/ibm_sa_host.py (100%) rename plugins/modules/{storage/ibm => }/ibm_sa_host_ports.py (100%) rename plugins/modules/{storage/ibm => }/ibm_sa_pool.py (100%) rename plugins/modules/{storage/ibm => }/ibm_sa_vol.py (100%) rename plugins/modules/{storage/ibm => }/ibm_sa_vol_map.py (100%) rename plugins/modules/{monitoring => }/icinga2_feature.py (100%) rename plugins/modules/{monitoring => }/icinga2_host.py (100%) rename plugins/modules/{remote_management/redfish => }/idrac_redfish_command.py (100%) rename plugins/modules/{remote_management/redfish => }/idrac_redfish_config.py (100%) rename plugins/modules/{remote_management/redfish => }/idrac_redfish_info.py (100%) rename plugins/modules/{remote_management/redfish => }/ilo_redfish_config.py (100%) rename plugins/modules/{remote_management/redfish => }/ilo_redfish_info.py (100%) rename plugins/modules/{remote_management/imc => }/imc_rest.py (100%) rename plugins/modules/{cloud/smartos => }/imgadm.py (100%) rename plugins/modules/{net_tools/infinity => }/infinity.py (100%) rename plugins/modules/{database/influxdb => }/influxdb_database.py (100%) rename plugins/modules/{database/influxdb => }/influxdb_query.py (100%) rename plugins/modules/{database/influxdb => }/influxdb_retention_policy.py (100%) rename plugins/modules/{database/influxdb => }/influxdb_user.py (100%) rename plugins/modules/{database/influxdb => }/influxdb_write.py (100%) rename plugins/modules/{files => }/ini_file.py (100%) rename plugins/modules/{packaging/os => }/installp.py (100%) rename plugins/modules/{system => }/interfaces_file.py (100%) rename plugins/modules/{net_tools => }/ip_netns.py (100%) rename plugins/modules/{identity/ipa => }/ipa_config.py (100%) rename plugins/modules/{identity/ipa => }/ipa_dnsrecord.py (100%) rename plugins/modules/{identity/ipa => }/ipa_dnszone.py (100%) rename plugins/modules/{identity/ipa => }/ipa_group.py (100%) rename plugins/modules/{identity/ipa => }/ipa_hbacrule.py (100%) rename plugins/modules/{identity/ipa => }/ipa_host.py (100%) rename plugins/modules/{identity/ipa => }/ipa_hostgroup.py (100%) rename plugins/modules/{identity/ipa => }/ipa_otpconfig.py (100%) rename plugins/modules/{identity/ipa => }/ipa_otptoken.py (100%) rename plugins/modules/{identity/ipa => }/ipa_pwpolicy.py (100%) rename plugins/modules/{identity/ipa => }/ipa_role.py (100%) rename plugins/modules/{identity/ipa => }/ipa_service.py (100%) rename plugins/modules/{identity/ipa => }/ipa_subca.py (100%) rename plugins/modules/{identity/ipa => }/ipa_sudocmd.py (100%) rename plugins/modules/{identity/ipa => }/ipa_sudocmdgroup.py (100%) rename plugins/modules/{identity/ipa => }/ipa_sudorule.py (100%) rename plugins/modules/{identity/ipa => }/ipa_user.py (100%) rename plugins/modules/{identity/ipa => }/ipa_vault.py (100%) rename plugins/modules/{net_tools => }/ipify_facts.py (100%) rename plugins/modules/{net_tools => }/ipinfoio_facts.py (100%) rename plugins/modules/{remote_management/ipmi => }/ipmi_boot.py (100%) rename plugins/modules/{remote_management/ipmi => }/ipmi_power.py (100%) rename plugins/modules/{system => }/iptables_state.py (100%) rename plugins/modules/{net_tools => }/ipwcli_dns.py (100%) rename plugins/modules/{notification => }/irc.py (100%) rename plugins/modules/{files => }/iso_create.py (100%) rename plugins/modules/{files => }/iso_customize.py (100%) rename plugins/modules/{files => }/iso_extract.py (100%) rename plugins/modules/{notification => }/jabber.py (100%) rename plugins/modules/{system => }/java_cert.py (100%) rename plugins/modules/{system => }/java_keystore.py (100%) rename plugins/modules/{web_infrastructure => }/jboss.py (100%) rename plugins/modules/{web_infrastructure => }/jenkins_build.py (100%) rename plugins/modules/{web_infrastructure => }/jenkins_job.py (100%) rename plugins/modules/{web_infrastructure => }/jenkins_job_info.py (100%) rename plugins/modules/{web_infrastructure => }/jenkins_plugin.py (100%) rename plugins/modules/{web_infrastructure => }/jenkins_script.py (100%) rename plugins/modules/{web_infrastructure => }/jira.py (100%) rename plugins/modules/{system => }/kernel_blacklist.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_authentication.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_client.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_client_rolemapping.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_clientscope.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_clienttemplate.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_group.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_identity_provider.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_realm.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_realm_info.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_role.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_user_federation.py (100%) rename plugins/modules/{identity/keycloak => }/keycloak_user_rolemapping.py (100%) rename plugins/modules/{system => }/keyring.py (100%) rename plugins/modules/{system => }/keyring_info.py (100%) rename plugins/modules/{database/misc => }/kibana_plugin.py (100%) rename plugins/modules/{system => }/launchd.py (100%) rename plugins/modules/{packaging/os => }/layman.py (100%) rename plugins/modules/{system => }/lbu.py (100%) rename plugins/modules/{net_tools/ldap => }/ldap_attrs.py (100%) rename plugins/modules/{net_tools/ldap => }/ldap_entry.py (100%) rename plugins/modules/{net_tools/ldap => }/ldap_passwd.py (100%) rename plugins/modules/{net_tools/ldap => }/ldap_search.py (100%) rename plugins/modules/{monitoring => }/librato_annotation.py (100%) rename plugins/modules/{cloud/linode => }/linode.py (100%) rename plugins/modules/{cloud/linode => }/linode_v4.py (100%) rename plugins/modules/{system => }/listen_ports_facts.py (100%) rename plugins/modules/{net_tools => }/lldp.py (100%) rename plugins/modules/{system => }/locale_gen.py (100%) rename plugins/modules/{monitoring => }/logentries.py (100%) rename plugins/modules/{notification => }/logentries_msg.py (100%) rename plugins/modules/{monitoring => }/logstash_plugin.py (100%) rename plugins/modules/{system => }/lvg.py (100%) rename plugins/modules/{system => }/lvol.py (100%) rename plugins/modules/{cloud/lxc => }/lxc_container.py (100%) rename plugins/modules/{remote_management/lxca => }/lxca_cmms.py (100%) rename plugins/modules/{remote_management/lxca => }/lxca_nodes.py (100%) rename plugins/modules/{cloud/lxd => }/lxd_container.py (100%) rename plugins/modules/{cloud/lxd => }/lxd_profile.py (100%) rename plugins/modules/{cloud/lxd => }/lxd_project.py (100%) rename plugins/modules/{packaging/os => }/macports.py (100%) rename plugins/modules/{notification => }/mail.py (100%) rename plugins/modules/{system => }/make.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_alert_profiles.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_alerts.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_group.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_policies.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_policies_info.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_provider.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_tags.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_tags_info.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_tenant.py (100%) rename plugins/modules/{remote_management/manageiq => }/manageiq_user.py (100%) rename plugins/modules/{packaging/os => }/mas.py (100%) rename plugins/modules/{notification => }/matrix.py (100%) rename plugins/modules/{notification => }/mattermost.py (100%) rename plugins/modules/{packaging/language => }/maven_artifact.py (100%) rename plugins/modules/{cloud/memset => }/memset_dns_reload.py (100%) rename plugins/modules/{cloud/memset => }/memset_memstore_info.py (100%) rename plugins/modules/{cloud/memset => }/memset_server_info.py (100%) rename plugins/modules/{cloud/memset => }/memset_zone.py (100%) rename plugins/modules/{cloud/memset => }/memset_zone_domain.py (100%) rename plugins/modules/{cloud/memset => }/memset_zone_record.py (100%) rename plugins/modules/{system => }/mksysb.py (100%) rename plugins/modules/{system => }/modprobe.py (100%) rename plugins/modules/{monitoring => }/monit.py (100%) rename plugins/modules/{notification => }/mqtt.py (100%) rename plugins/modules/{database/mssql => }/mssql_db.py (100%) rename plugins/modules/{database/mssql => }/mssql_script.py (100%) rename plugins/modules/{monitoring => }/nagios.py (100%) rename plugins/modules/{net_tools => }/netcup_dns.py (100%) rename plugins/modules/{monitoring => }/newrelic_deployment.py (100%) rename plugins/modules/{notification => }/nexmo.py (100%) rename plugins/modules/{web_infrastructure => }/nginx_status_info.py (100%) rename plugins/modules/{cloud/smartos => }/nictagadm.py (100%) rename plugins/modules/{net_tools => }/nmcli.py (100%) rename plugins/modules/{clustering/nomad => }/nomad_job.py (100%) rename plugins/modules/{clustering/nomad => }/nomad_job_info.py (100%) rename plugins/modules/{system => }/nosh.py (100%) rename plugins/modules/{packaging/language => }/npm.py (100%) rename plugins/modules/{net_tools => }/nsupdate.py (100%) rename plugins/modules/{cloud/oracle => }/oci_vcn.py (100%) rename plugins/modules/{database/misc => }/odbc.py (100%) rename plugins/modules/{notification => }/office_365_connector_card.py (100%) rename plugins/modules/{system => }/ohai.py (100%) rename plugins/modules/{net_tools => }/omapi_host.py (100%) rename plugins/modules/{cloud/opennebula => }/one_host.py (100%) rename plugins/modules/{cloud/opennebula => }/one_image.py (100%) rename plugins/modules/{cloud/opennebula => }/one_image_info.py (100%) rename plugins/modules/{cloud/opennebula => }/one_service.py (100%) rename plugins/modules/{cloud/opennebula => }/one_template.py (100%) rename plugins/modules/{cloud/opennebula => }/one_vm.py (100%) rename plugins/modules/{cloud/oneandone => }/oneandone_firewall_policy.py (100%) rename plugins/modules/{cloud/oneandone => }/oneandone_load_balancer.py (100%) rename plugins/modules/{cloud/oneandone => }/oneandone_monitoring_policy.py (100%) rename plugins/modules/{cloud/oneandone => }/oneandone_private_network.py (100%) rename plugins/modules/{cloud/oneandone => }/oneandone_public_ip.py (100%) rename plugins/modules/{cloud/oneandone => }/oneandone_server.py (100%) rename plugins/modules/{identity => }/onepassword_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_datacenter_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_enclosure_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_ethernet_network.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_ethernet_network_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_fc_network.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_fc_network_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_fcoe_network.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_fcoe_network_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_logical_interconnect_group.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_logical_interconnect_group_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_network_set.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_network_set_info.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_san_manager.py (100%) rename plugins/modules/{remote_management/oneview => }/oneview_san_manager_info.py (100%) rename plugins/modules/{cloud/online => }/online_server_info.py (100%) rename plugins/modules/{cloud/online => }/online_user_info.py (100%) rename plugins/modules/{system => }/open_iscsi.py (100%) rename plugins/modules/{packaging/os => }/openbsd_pkg.py (100%) rename plugins/modules/{identity/opendj => }/opendj_backendprop.py (100%) rename plugins/modules/{system => }/openwrt_init.py (100%) rename plugins/modules/{packaging/os => }/opkg.py (100%) rename plugins/modules/{system => }/osx_defaults.py (100%) rename plugins/modules/{cloud/ovh => }/ovh_ip_failover.py (100%) rename plugins/modules/{cloud/ovh => }/ovh_ip_loadbalancing_backend.py (100%) rename plugins/modules/{cloud/ovh => }/ovh_monthly_billing.py (100%) rename plugins/modules/{clustering => }/pacemaker_cluster.py (100%) rename plugins/modules/{cloud/packet => }/packet_device.py (100%) rename plugins/modules/{cloud/packet => }/packet_ip_subnet.py (100%) rename plugins/modules/{cloud/packet => }/packet_project.py (100%) rename plugins/modules/{cloud/packet => }/packet_sshkey.py (100%) rename plugins/modules/{cloud/packet => }/packet_volume.py (100%) rename plugins/modules/{cloud/packet => }/packet_volume_attachment.py (100%) rename plugins/modules/{packaging/os => }/pacman.py (100%) rename plugins/modules/{packaging/os => }/pacman_key.py (100%) rename plugins/modules/{monitoring => }/pagerduty.py (100%) rename plugins/modules/{monitoring => }/pagerduty_alert.py (100%) rename plugins/modules/{monitoring => }/pagerduty_change.py (100%) rename plugins/modules/{monitoring => }/pagerduty_user.py (100%) rename plugins/modules/{system => }/pam_limits.py (100%) rename plugins/modules/{system => }/pamd.py (100%) rename plugins/modules/{system => }/parted.py (100%) rename plugins/modules/{packaging/language => }/pear.py (100%) rename plugins/modules/{system => }/pids.py (100%) rename plugins/modules/{monitoring => }/pingdom.py (100%) rename plugins/modules/{packaging/language => }/pip_package_info.py (100%) rename plugins/modules/{packaging/language => }/pipx.py (100%) rename plugins/modules/{packaging/language => }/pipx_info.py (100%) rename plugins/modules/{packaging/os => }/pkg5.py (100%) rename plugins/modules/{packaging/os => }/pkg5_publisher.py (100%) rename plugins/modules/{packaging/os => }/pkgin.py (100%) rename plugins/modules/{packaging/os => }/pkgng.py (100%) rename plugins/modules/{packaging/os => }/pkgutil.py (100%) rename plugins/modules/{storage/pmem => }/pmem.py (100%) rename plugins/modules/{packaging/os => }/portage.py (100%) rename plugins/modules/{packaging/os => }/portinstall.py (100%) rename plugins/modules/{net_tools/pritunl => }/pritunl_org.py (100%) rename plugins/modules/{net_tools/pritunl => }/pritunl_org_info.py (100%) rename plugins/modules/{net_tools/pritunl => }/pritunl_user.py (100%) rename plugins/modules/{net_tools/pritunl => }/pritunl_user_info.py (100%) rename plugins/modules/{cloud/profitbricks => }/profitbricks.py (100%) rename plugins/modules/{cloud/profitbricks => }/profitbricks_datacenter.py (100%) rename plugins/modules/{cloud/profitbricks => }/profitbricks_nic.py (100%) rename plugins/modules/{cloud/profitbricks => }/profitbricks_volume.py (100%) rename plugins/modules/{cloud/profitbricks => }/profitbricks_volume_attachments.py (100%) rename plugins/modules/{cloud/misc => }/proxmox.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_disk.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_domain_info.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_group_info.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_kvm.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_nic.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_snap.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_storage_info.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_tasks_info.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_template.py (100%) rename plugins/modules/{cloud/misc => }/proxmox_user_info.py (100%) rename plugins/modules/{cloud/pubnub => }/pubnub_blocks.py (100%) rename plugins/modules/{packaging/os => }/pulp_repo.py (100%) rename plugins/modules/{system => }/puppet.py (100%) rename plugins/modules/{notification => }/pushbullet.py (100%) rename plugins/modules/{notification => }/pushover.py (100%) rename plugins/modules/{system => }/python_requirements_info.py (100%) rename plugins/modules/{cloud/rackspace => }/rax.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_cbs.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_cbs_attachments.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_cdb.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_cdb_database.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_cdb_user.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_clb.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_clb_nodes.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_clb_ssl.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_dns.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_dns_record.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_facts.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_files.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_files_objects.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_identity.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_keypair.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_meta.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_mon_alarm.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_mon_check.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_mon_entity.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_mon_notification.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_mon_notification_plan.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_network.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_queue.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_scaling_group.py (100%) rename plugins/modules/{cloud/rackspace => }/rax_scaling_policy.py (100%) rename plugins/modules/{files => }/read_csv.py (100%) rename plugins/modules/{remote_management/redfish => }/redfish_command.py (100%) rename plugins/modules/{remote_management/redfish => }/redfish_config.py (100%) rename plugins/modules/{remote_management/redfish => }/redfish_info.py (100%) rename plugins/modules/{packaging/os => }/redhat_subscription.py (100%) rename plugins/modules/{database/misc => }/redis.py (100%) rename plugins/modules/{database/misc => }/redis_data.py (100%) rename plugins/modules/{database/misc => }/redis_data_incr.py (100%) rename plugins/modules/{database/misc => }/redis_data_info.py (100%) rename plugins/modules/{database/misc => }/redis_info.py (100%) rename plugins/modules/{cloud/misc => }/rhevm.py (100%) rename plugins/modules/{packaging/os => }/rhn_channel.py (100%) rename plugins/modules/{packaging/os => }/rhn_register.py (100%) rename plugins/modules/{packaging/os => }/rhsm_release.py (100%) rename plugins/modules/{packaging/os => }/rhsm_repository.py (100%) rename plugins/modules/{database/misc => }/riak.py (100%) rename plugins/modules/{notification => }/rocketchat.py (100%) rename plugins/modules/{monitoring => }/rollbar_deployment.py (100%) rename plugins/modules/{packaging/os => }/rpm_ostree_pkg.py (100%) rename plugins/modules/{web_infrastructure => }/rundeck_acl_policy.py (100%) rename plugins/modules/{web_infrastructure => }/rundeck_job_executions_info.py (100%) rename plugins/modules/{web_infrastructure => }/rundeck_job_run.py (100%) rename plugins/modules/{web_infrastructure => }/rundeck_project.py (100%) rename plugins/modules/{system => }/runit.py (100%) rename plugins/modules/{system => }/sap_task_list_execute.py (100%) rename plugins/modules/{files => }/sapcar_extract.py (100%) rename plugins/modules/{notification => }/say.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_compute.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_compute_private_network.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_container_registry.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_container_registry_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_database_backup.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_function_namespace.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_function_namespace_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_image_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_ip.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_ip_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_lb.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_organization_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_private_network.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_security_group.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_security_group_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_security_group_rule.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_server_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_snapshot_info.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_sshkey.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_user_data.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_volume.py (100%) rename plugins/modules/{cloud/scaleway => }/scaleway_volume_info.py (100%) rename plugins/modules/{system => }/sefcontext.py (100%) rename plugins/modules/{system => }/selinux_permissive.py (100%) rename plugins/modules/{system => }/selogin.py (100%) rename plugins/modules/{notification => }/sendgrid.py (100%) rename plugins/modules/{monitoring/sensu => }/sensu_check.py (100%) rename plugins/modules/{monitoring/sensu => }/sensu_client.py (100%) rename plugins/modules/{monitoring/sensu => }/sensu_handler.py (100%) rename plugins/modules/{monitoring/sensu => }/sensu_silence.py (100%) rename plugins/modules/{monitoring/sensu => }/sensu_subscription.py (100%) rename plugins/modules/{system => }/seport.py (100%) rename plugins/modules/{cloud/misc => }/serverless.py (100%) rename plugins/modules/{system => }/shutdown.py (100%) rename plugins/modules/{cloud/softlayer => }/sl_vm.py (100%) rename plugins/modules/{notification => }/slack.py (100%) rename plugins/modules/{packaging/os => }/slackpkg.py (100%) rename plugins/modules/{cloud/smartos => }/smartos_image_info.py (100%) rename plugins/modules/{packaging/os => }/snap.py (100%) rename plugins/modules/{packaging/os => }/snap_alias.py (100%) rename plugins/modules/{net_tools => }/snmp_facts.py (100%) rename plugins/modules/{system => }/solaris_zone.py (100%) rename plugins/modules/{packaging/os => }/sorcery.py (100%) rename plugins/modules/{monitoring => }/spectrum_device.py (100%) rename plugins/modules/{monitoring => }/spectrum_model_attrs.py (100%) rename plugins/modules/{cloud/spotinst => }/spotinst_aws_elastigroup.py (100%) rename plugins/modules/{storage/hpe3par => }/ss_3par_cpg.py (100%) rename plugins/modules/{system => }/ssh_config.py (100%) rename plugins/modules/{monitoring => }/stackdriver.py (100%) rename plugins/modules/{remote_management/stacki => }/stacki_host.py (100%) rename plugins/modules/{monitoring => }/statsd.py (100%) rename plugins/modules/{monitoring => }/statusio_maintenance.py (100%) rename plugins/modules/{system => }/sudoers.py (100%) rename plugins/modules/{web_infrastructure => }/supervisorctl.py (100%) rename plugins/modules/{system => }/svc.py (100%) rename plugins/modules/{packaging/os => }/svr4pkg.py (100%) rename plugins/modules/{packaging/os => }/swdepot.py (100%) rename plugins/modules/{packaging/os => }/swupd.py (100%) rename plugins/modules/{notification => }/syslogger.py (100%) rename plugins/modules/{system => }/syspatch.py (100%) rename plugins/modules/{system => }/sysrc.py (100%) rename plugins/modules/{system => }/sysupgrade.py (100%) rename plugins/modules/{web_infrastructure => }/taiga_issue.py (100%) rename plugins/modules/{notification => }/telegram.py (100%) rename plugins/modules/{cloud/misc => }/terraform.py (100%) rename plugins/modules/{system => }/timezone.py (100%) rename plugins/modules/{notification => }/twilio.py (100%) rename plugins/modules/{notification => }/typetalk.py (100%) rename plugins/modules/{cloud/univention => }/udm_dns_record.py (100%) rename plugins/modules/{cloud/univention => }/udm_dns_zone.py (100%) rename plugins/modules/{cloud/univention => }/udm_group.py (100%) rename plugins/modules/{cloud/univention => }/udm_share.py (100%) rename plugins/modules/{cloud/univention => }/udm_user.py (100%) rename plugins/modules/{system => }/ufw.py (100%) rename plugins/modules/{monitoring => }/uptimerobot.py (100%) rename plugins/modules/{packaging/os => }/urpmi.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_aaa_group.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_aaa_group_info.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_ca_host_key_cert.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_ca_host_key_cert_info.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_dns_host.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_network_interface_address.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_network_interface_address_info.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_proxy_auth_profile.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_proxy_exception.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_proxy_frontend.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_proxy_frontend_info.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_proxy_location.py (100%) rename plugins/modules/{web_infrastructure/sophos_utm => }/utm_proxy_location_info.py (100%) rename plugins/modules/{system => }/vdo.py (100%) rename plugins/modules/{database/vertica => }/vertica_configuration.py (100%) rename plugins/modules/{database/vertica => }/vertica_info.py (100%) rename plugins/modules/{database/vertica => }/vertica_role.py (100%) rename plugins/modules/{database/vertica => }/vertica_schema.py (100%) rename plugins/modules/{database/vertica => }/vertica_user.py (100%) rename plugins/modules/{storage/vexata => }/vexata_eg.py (100%) rename plugins/modules/{storage/vexata => }/vexata_volume.py (100%) rename plugins/modules/{cloud/smartos => }/vmadm.py (100%) rename plugins/modules/{remote_management => }/wakeonlan.py (100%) rename plugins/modules/{remote_management/redfish => }/wdc_redfish_command.py (100%) rename plugins/modules/{remote_management/redfish => }/wdc_redfish_info.py (100%) rename plugins/modules/{cloud/webfaction => }/webfaction_app.py (100%) rename plugins/modules/{cloud/webfaction => }/webfaction_db.py (100%) rename plugins/modules/{cloud/webfaction => }/webfaction_domain.py (100%) rename plugins/modules/{cloud/webfaction => }/webfaction_mailbox.py (100%) rename plugins/modules/{cloud/webfaction => }/webfaction_site.py (100%) rename plugins/modules/{files => }/xattr.py (100%) rename plugins/modules/{packaging/os => }/xbps.py (100%) rename plugins/modules/{remote_management/lenovoxcc => }/xcc_redfish_command.py (100%) rename plugins/modules/{cloud/misc => }/xenserver_facts.py (100%) rename plugins/modules/{cloud/xenserver => }/xenserver_guest.py (100%) rename plugins/modules/{cloud/xenserver => }/xenserver_guest_info.py (100%) rename plugins/modules/{cloud/xenserver => }/xenserver_guest_powerstate.py (100%) rename plugins/modules/{system => }/xfconf.py (100%) rename plugins/modules/{system => }/xfconf_info.py (100%) rename plugins/modules/{system => }/xfs_quota.py (100%) rename plugins/modules/{files => }/xml.py (100%) rename plugins/modules/{packaging/language => }/yarn.py (100%) rename plugins/modules/{packaging/os => }/yum_versionlock.py (100%) rename plugins/modules/{storage/zfs => }/zfs.py (100%) rename plugins/modules/{storage/zfs => }/zfs_delegate_admin.py (100%) rename plugins/modules/{storage/zfs => }/zfs_facts.py (100%) rename plugins/modules/{clustering => }/znode.py (100%) rename plugins/modules/{storage/zfs => }/zpool_facts.py (100%) rename plugins/modules/{packaging/os => }/zypper.py (100%) rename plugins/modules/{packaging/os => }/zypper_repository.py (100%) rename tests/unit/plugins/modules/{cloud/xenserver => }/FakeAnsibleModule.py (100%) rename tests/unit/plugins/modules/{cloud/xenserver => }/FakeXenAPI.py (100%) rename tests/unit/plugins/modules/{source_control/gitlab => }/gitlab.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/hpe_test_utils.py (98%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file-README.md (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6 (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/address_family (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/address_family.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/default_dhcp (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/default_dhcp.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/servers.com (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/servers.com.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/up_down_dup (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/interfaces_file_fixtures/input/up_down_dup.license (100%) rename tests/unit/plugins/modules/{system => }/interfaces_file/test_interfaces_file.py (99%) rename tests/unit/plugins/modules/{cloud/linode => }/linode_conftest.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/oneview_conftest.py (100%) create mode 100644 tests/unit/plugins/modules/oneview_module_loader.py delete mode 100644 tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py rename tests/unit/plugins/modules/{packaging/os => }/rhn_conftest.py (100%) rename tests/unit/plugins/modules/{monitoring => }/test_alerta_customer.py (98%) rename tests/unit/plugins/modules/{web_infrastructure => }/test_apache2_module.py (86%) rename tests/unit/plugins/modules/{packaging/os => }/test_apk.py (89%) rename tests/unit/plugins/modules/{files => }/test_archive.py (96%) rename tests/unit/plugins/modules/{source_control/bitbucket => }/test_bitbucket_access_key.py (99%) rename tests/unit/plugins/modules/{source_control/bitbucket => }/test_bitbucket_pipeline_key_pair.py (98%) rename tests/unit/plugins/modules/{source_control/bitbucket => }/test_bitbucket_pipeline_known_host.py (97%) rename tests/unit/plugins/modules/{source_control/bitbucket => }/test_bitbucket_pipeline_variable.py (99%) rename tests/unit/plugins/modules/{notification => }/test_campfire.py (97%) rename tests/unit/plugins/modules/{monitoring => }/test_circonus_annotation.py (98%) rename tests/unit/plugins/modules/{packaging/language => }/test_cpanm.py (99%) rename tests/unit/plugins/modules/{monitoring => }/test_datadog_downtime.py.disabled (100%) rename tests/unit/plugins/modules/{notification => }/test_discord.py (97%) rename tests/unit/plugins/modules/{net_tools => }/test_dnsimple.py (95%) rename tests/unit/plugins/modules/{net_tools => }/test_dnsimple_info.py (97%) rename tests/unit/plugins/modules/{system => }/test_gconftool2_info.py (97%) rename tests/unit/plugins/modules/{packaging/language => }/test_gem.py (94%) rename tests/unit/plugins/modules/{source_control/github => }/test_github_repo.py (99%) rename tests/unit/plugins/modules/{source_control/gitlab => }/test_gitlab_deploy_key.py (97%) rename tests/unit/plugins/modules/{source_control/gitlab => }/test_gitlab_group.py (97%) rename tests/unit/plugins/modules/{source_control/gitlab => }/test_gitlab_hook.py (96%) rename tests/unit/plugins/modules/{source_control/gitlab => }/test_gitlab_project.py (97%) rename tests/unit/plugins/modules/{source_control/gitlab => }/test_gitlab_protected_branch.py (96%) rename tests/unit/plugins/modules/{source_control/gitlab => }/test_gitlab_runner.py (97%) rename tests/unit/plugins/modules/{source_control/gitlab => }/test_gitlab_user.py (98%) rename tests/unit/plugins/modules/{database/saphana => }/test_hana_query.py (97%) rename tests/unit/plugins/modules/{packaging/os => }/test_homebrew.py (87%) rename tests/unit/plugins/modules/{packaging/os => }/test_homebrew_cask.py (86%) rename tests/unit/plugins/modules/{monitoring => }/test_icinga2_feature.py (97%) rename tests/unit/plugins/modules/{identity/ipa => }/test_ipa_otpconfig.py (99%) rename tests/unit/plugins/modules/{identity/ipa => }/test_ipa_otptoken.py (99%) rename tests/unit/plugins/modules/{identity/ipa => }/test_ipa_pwpolicy.py (99%) rename tests/unit/plugins/modules/{system => }/test_java_keystore.py (97%) rename tests/unit/plugins/modules/{web_infrastructure => }/test_jenkins_build.py (89%) rename tests/unit/plugins/modules/{web_infrastructure => }/test_jenkins_plugin.py (98%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_authentication.py (99%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_client.py (98%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_client_rolemapping.py (99%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_clientscope.py (99%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_identity_provider.py (99%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_realm.py (99%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_realm_info.py (97%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_role.py (99%) rename tests/unit/plugins/modules/{identity/keycloak => }/test_keycloak_user_federation.py (99%) rename tests/unit/plugins/modules/{cloud/linode => }/test_linode.py (89%) rename tests/unit/plugins/modules/{cloud/linode => }/test_linode_v4.py (99%) rename tests/unit/plugins/modules/{remote_management/lxca => }/test_lxca_cmms.py (91%) rename tests/unit/plugins/modules/{remote_management/lxca => }/test_lxca_nodes.py (92%) rename tests/unit/plugins/modules/{packaging/os => }/test_macports.py (95%) rename tests/unit/plugins/modules/{packaging/language => }/test_maven_artifact.py (92%) rename tests/unit/plugins/modules/{system => }/test_modprobe.py (96%) rename tests/unit/plugins/modules/{monitoring => }/test_monit.py (98%) rename tests/unit/plugins/modules/{net_tools => }/test_nmcli.py (99%) rename tests/unit/plugins/modules/{packaging/language => }/test_npm.py (98%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_datacenter_info.py (95%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_enclosure_info.py (97%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_ethernet_network.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_ethernet_network_info.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_fc_network.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_fc_network_info.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_fcoe_network.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_fcoe_network_info.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_logical_interconnect_group.py (98%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_logical_interconnect_group_info.py (93%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_network_set.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_network_set_info.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_san_manager.py (100%) rename tests/unit/plugins/modules/{remote_management/oneview => }/test_oneview_san_manager_info.py (100%) rename tests/unit/plugins/modules/{packaging/os => }/test_pacman.py (99%) rename tests/unit/plugins/modules/{packaging/os => }/test_pacman_key.py (99%) rename tests/unit/plugins/modules/{monitoring => }/test_pagerduty.py (98%) rename tests/unit/plugins/modules/{monitoring => }/test_pagerduty_alert.py (95%) rename tests/unit/plugins/modules/{monitoring => }/test_pagerduty_change.py (97%) rename tests/unit/plugins/modules/{system => }/test_pamd.py (97%) rename tests/unit/plugins/modules/{system => }/test_parted.py (90%) rename tests/unit/plugins/modules/{packaging/os => }/test_pkgin.py (93%) rename tests/unit/plugins/modules/{storage/pmem => }/test_pmem.py (95%) rename tests/unit/plugins/modules/{net_tools/pritunl => }/test_pritunl_org.py (98%) rename tests/unit/plugins/modules/{net_tools/pritunl => }/test_pritunl_org_info.py (98%) rename tests/unit/plugins/modules/{net_tools/pritunl => }/test_pritunl_user.py (98%) rename tests/unit/plugins/modules/{net_tools/pritunl => }/test_pritunl_user_info.py (98%) rename tests/unit/plugins/modules/{cloud/misc => }/test_proxmox_kvm.py (86%) rename tests/unit/plugins/modules/{cloud/misc => }/test_proxmox_snap.py (97%) rename tests/unit/plugins/modules/{cloud/misc => }/test_proxmox_tasks_info.py (98%) rename tests/unit/plugins/modules/{packaging/os => }/test_redhat_subscription.py (99%) rename tests/unit/plugins/modules/{database/misc => }/test_redis_data.py (99%) rename tests/unit/plugins/modules/{database/misc => }/test_redis_data_incr.py (98%) rename tests/unit/plugins/modules/{database/misc => }/test_redis_data_info.py (97%) rename tests/unit/plugins/modules/{database/misc => }/test_redis_info.py (94%) rename tests/unit/plugins/modules/{packaging/os => }/test_rhn_channel.py (98%) rename tests/unit/plugins/modules/{packaging/os => }/test_rhn_register.py (97%) rename tests/unit/plugins/modules/{packaging/os => }/test_rhsm_release.py (96%) rename tests/unit/plugins/modules/{packaging/os => }/test_rpm_ostree_pkg.py (96%) rename tests/unit/plugins/modules/{system => }/test_sap_task_list_execute.py (97%) rename tests/unit/plugins/modules/{files => }/test_sapcar_extract.py (96%) rename tests/unit/plugins/modules/{cloud/scaleway => }/test_scaleway_compute_private_network.py (98%) rename tests/unit/plugins/modules/{cloud/scaleway => }/test_scaleway_private_network.py (98%) rename tests/unit/plugins/modules/{notification => }/test_slack.py (98%) rename tests/unit/plugins/modules/{system => }/test_solaris_zone.py (97%) rename tests/unit/plugins/modules/{storage/hpe3par => }/test_ss_3par_cpg.py (94%) rename tests/unit/plugins/modules/{monitoring => }/test_statsd.py (94%) rename tests/unit/plugins/modules/{system => }/test_sysupgrade.py (97%) rename tests/unit/plugins/modules/{cloud/misc => }/test_terraform.py (88%) rename tests/unit/plugins/modules/{system => }/test_ufw.py (99%) rename tests/unit/plugins/modules/{remote_management/wdc => }/test_wdc_redfish_command.py (99%) rename tests/unit/plugins/modules/{remote_management/wdc => }/test_wdc_redfish_info.py (98%) rename tests/unit/plugins/modules/{remote_management/lenovoxcc => }/test_xcc_redfish_command.py (99%) rename tests/unit/plugins/modules/{cloud/xenserver => }/test_xenserver_guest_info.py (90%) rename tests/unit/plugins/modules/{cloud/xenserver => }/test_xenserver_guest_powerstate.py (84%) rename tests/unit/plugins/modules/{system => }/test_xfconf.py (99%) rename tests/unit/plugins/modules/{system => }/test_xfconf_info.py (98%) rename tests/unit/plugins/modules/{cloud/xenserver => }/xenserver_common.py (100%) rename tests/unit/plugins/modules/{cloud/xenserver => }/xenserver_conftest.py (89%) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 5db3a6e6bd..559689d6fe 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -13,9 +13,9 @@ files: support: community $actions: labels: action - $actions/system/iptables_state.py: + $actions/iptables_state.py: maintainers: quidame - $actions/system/shutdown.py: + $actions/shutdown.py: maintainers: nitzmahone samdoran aminvakil $becomes/: labels: become @@ -327,989 +327,989 @@ files: $module_utils/xfconf.py: maintainers: russoz labels: xfconf - $modules/cloud/alicloud/ali_: + $modules/ali_: maintainers: xiaozhu36 - $modules/cloud/atomic/atomic_container.py: + $modules/atomic_container.py: maintainers: giuseppe krsacme - $modules/cloud/atomic/atomic_: + $modules/atomic_: maintainers: krsacme - $modules/cloud/centurylink/clc_: + $modules/clc_: maintainers: clc-runner - $modules/cloud/dimensiondata/dimensiondata_network.py: + $modules/dimensiondata_network.py: maintainers: aimonb tintoy labels: dimensiondata_network - $modules/cloud/dimensiondata/dimensiondata_vlan.py: + $modules/dimensiondata_vlan.py: maintainers: tintoy - $modules/cloud/heroku/heroku_collaborator.py: + $modules/heroku_collaborator.py: maintainers: marns93 - $modules/cloud/huawei/hwc_: + $modules/hwc_: maintainers: $team_huawei huaweicloud keywords: cloud huawei hwc - $modules/cloud/linode/linode: + $modules/linode: maintainers: $team_linode - $modules/cloud/linode/linode.py: + $modules/linode.py: maintainers: zbal - $modules/cloud/lxc/lxc_container.py: + $modules/lxc_container.py: maintainers: cloudnull - $modules/cloud/lxd/lxd_: + $modules/lxd_: ignore: hnakamur - $modules/cloud/lxd/lxd_profile.py: + $modules/lxd_profile.py: maintainers: conloos - $modules/cloud/lxd/lxd_project.py: + $modules/lxd_project.py: maintainers: we10710aa - $modules/cloud/memset/memset_: + $modules/memset_: maintainers: glitchcrab - $modules/cloud/misc/cloud_init_data_facts.py: + $modules/cloud_init_data_facts.py: maintainers: resmo - $modules/cloud/misc/proxmox: + $modules/proxmox: maintainers: $team_virt labels: proxmox virt keywords: kvm libvirt proxmox qemu - $modules/cloud/misc/proxmox.py: + $modules/proxmox.py: maintainers: UnderGreen ignore: skvidal - $modules/cloud/misc/proxmox_kvm.py: + $modules/proxmox_kvm.py: maintainers: helldorado ignore: skvidal - $modules/cloud/misc/proxmox_nic.py: + $modules/proxmox_nic.py: maintainers: Kogelvis - $modules/cloud/misc/proxmox_tasks_info: + $modules/proxmox_tasks_info: maintainers: paginabianca - $modules/cloud/misc/proxmox_template.py: + $modules/proxmox_template.py: maintainers: UnderGreen ignore: skvidal - $modules/cloud/misc/proxmox_disk.py: + $modules/proxmox_disk.py: maintainers: castorsky - $modules/cloud/misc/rhevm.py: + $modules/rhevm.py: maintainers: $team_virt TimothyVandenbrande labels: rhevm virt ignore: skvidal keywords: kvm libvirt proxmox qemu - $modules/cloud/misc/serverless.py: + $modules/serverless.py: ignore: ryansb - $modules/cloud/misc/terraform.py: + $modules/terraform.py: maintainers: m-yosefpor rainerleber ignore: ryansb - $modules/cloud/misc/xenserver_facts.py: + $modules/xenserver_facts.py: maintainers: caphrim007 cheese labels: xenserver_facts ignore: andyhky ryansb - $modules/cloud/oneandone/oneandone_: + $modules/oneandone_: maintainers: aajdinov edevenport - $modules/cloud/online/online_: + $modules/online_: maintainers: remyleone - $modules/cloud/opennebula/one_: + $modules/one_: maintainers: $team_opennebula - $modules/cloud/opennebula/one_host.py: + $modules/one_host.py: maintainers: rvalle - $modules/cloud/oracle/oci_vcn.py: + $modules/oci_vcn.py: maintainers: $team_oracle rohitChaware - $modules/cloud/ovh/ovh_: + $modules/ovh_: maintainers: pascalheraud - $modules/cloud/ovh/ovh_monthly_billing.py: + $modules/ovh_monthly_billing.py: maintainers: fraff - $modules/cloud/packet/packet_device.py: + $modules/packet_device.py: maintainers: baldwinSPC t0mk teebes - $modules/cloud/packet/packet_: + $modules/packet_: maintainers: nurfet-becirevic t0mk - $modules/cloud/packet/packet_sshkey.py: + $modules/packet_sshkey.py: maintainers: t0mk - $modules/cloud/profitbricks/profitbricks: + $modules/profitbricks: maintainers: baldwinSPC - $modules/cloud/pubnub/pubnub_blocks.py: + $modules/pubnub_blocks.py: maintainers: parfeon pubnub - $modules/cloud/rackspace/rax.py: + $modules/rax.py: maintainers: omgjlk sivel - $modules/cloud/rackspace/rax: + $modules/rax: ignore: ryansb sivel - $modules/cloud/rackspace/rax_cbs.py: + $modules/rax_cbs.py: maintainers: claco - $modules/cloud/rackspace/rax_cbs_attachments.py: + $modules/rax_cbs_attachments.py: maintainers: claco - $modules/cloud/rackspace/rax_cdb.py: + $modules/rax_cdb.py: maintainers: jails - $modules/cloud/rackspace/rax_cdb_user.py: + $modules/rax_cdb_user.py: maintainers: jails - $modules/cloud/rackspace/rax_cdb_database.py: + $modules/rax_cdb_database.py: maintainers: jails - $modules/cloud/rackspace/rax_clb.py: + $modules/rax_clb.py: maintainers: claco - $modules/cloud/rackspace/rax_clb_nodes.py: + $modules/rax_clb_nodes.py: maintainers: neuroid - $modules/cloud/rackspace/rax_clb_ssl.py: + $modules/rax_clb_ssl.py: maintainers: smashwilson - $modules/cloud/rackspace/rax_files.py: + $modules/rax_files.py: maintainers: angstwad - $modules/cloud/rackspace/rax_files_objects.py: + $modules/rax_files_objects.py: maintainers: angstwad - $modules/cloud/rackspace/rax_identity.py: + $modules/rax_identity.py: maintainers: claco - $modules/cloud/rackspace/rax_network.py: + $modules/rax_network.py: maintainers: claco omgjlk - $modules/cloud/rackspace/rax_mon_alarm.py: + $modules/rax_mon_alarm.py: maintainers: smashwilson - $modules/cloud/rackspace/rax_mon_check.py: + $modules/rax_mon_check.py: maintainers: smashwilson - $modules/cloud/rackspace/rax_mon_entity.py: + $modules/rax_mon_entity.py: maintainers: smashwilson - $modules/cloud/rackspace/rax_mon_notification.py: + $modules/rax_mon_notification.py: maintainers: smashwilson - $modules/cloud/rackspace/rax_mon_notification_plan.py: + $modules/rax_mon_notification_plan.py: maintainers: smashwilson - $modules/cloud/rackspace/rax_queue.py: + $modules/rax_queue.py: maintainers: claco - $modules/cloud/scaleway/scaleway_: + $modules/scaleway_: maintainers: $team_scaleway - $modules/cloud/scaleway/scaleway_compute_private_network.py: + $modules/scaleway_compute_private_network.py: maintainers: pastral - $modules/cloud/scaleway/scaleway_container_registry.py: + $modules/scaleway_container_registry.py: maintainers: Lunik - $modules/cloud/scaleway/scaleway_container_registry_info.py: + $modules/scaleway_container_registry_info.py: maintainers: Lunik - $modules/cloud/scaleway/scaleway_database_backup.py: + $modules/scaleway_database_backup.py: maintainers: guillaume_ro_fr - $modules/cloud/scaleway/scaleway_function_namespace.py: + $modules/scaleway_function_namespace.py: maintainers: Lunik - $modules/cloud/scaleway/scaleway_function_namespace_info.py: + $modules/scaleway_function_namespace_info.py: maintainers: Lunik - $modules/cloud/scaleway/scaleway_image_info.py: + $modules/scaleway_image_info.py: maintainers: Spredzy - $modules/cloud/scaleway/scaleway_ip_info.py: + $modules/scaleway_ip_info.py: maintainers: Spredzy - $modules/cloud/scaleway/scaleway_organization_info.py: + $modules/scaleway_organization_info.py: maintainers: Spredzy - $modules/cloud/scaleway/scaleway_private_network.py: + $modules/scaleway_private_network.py: maintainers: pastral - $modules/cloud/scaleway/scaleway_security_group.py: + $modules/scaleway_security_group.py: maintainers: DenBeke - $modules/cloud/scaleway/scaleway_security_group_info.py: + $modules/scaleway_security_group_info.py: maintainers: Spredzy - $modules/cloud/scaleway/scaleway_security_group_rule.py: + $modules/scaleway_security_group_rule.py: maintainers: DenBeke - $modules/cloud/scaleway/scaleway_server_info.py: + $modules/scaleway_server_info.py: maintainers: Spredzy - $modules/cloud/scaleway/scaleway_snapshot_info.py: + $modules/scaleway_snapshot_info.py: maintainers: Spredzy - $modules/cloud/scaleway/scaleway_volume.py: + $modules/scaleway_volume.py: labels: scaleway_volume ignore: hekonsek - $modules/cloud/scaleway/scaleway_volume_info.py: + $modules/scaleway_volume_info.py: maintainers: Spredzy - $modules/cloud/smartos/imgadm.py: + $modules/imgadm.py: maintainers: $team_solaris labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/cloud/smartos/nictagadm.py: + $modules/nictagadm.py: maintainers: $team_solaris SmithX10 labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/cloud/smartos/smartos_image_info.py: + $modules/smartos_image_info.py: maintainers: $team_solaris labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/cloud/smartos/vmadm.py: + $modules/vmadm.py: maintainers: $team_solaris labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/cloud/softlayer/sl_vm.py: + $modules/sl_vm.py: maintainers: mcltn - $modules/cloud/spotinst/spotinst_aws_elastigroup.py: + $modules/spotinst_aws_elastigroup.py: maintainers: talzur - $modules/cloud/univention/udm_: + $modules/udm_: maintainers: keachi - $modules/cloud/webfaction/webfaction_: + $modules/webfaction_: maintainers: quentinsf - $modules/cloud/xenserver/xenserver_: + $modules/xenserver_: maintainers: bvitnik - $modules/clustering/consul/consul: + $modules/consul: maintainers: $team_consul ignore: colin-nolan - $modules/clustering/etcd3.py: + $modules/etcd3.py: maintainers: evrardjp ignore: vfauth - $modules/clustering/nomad/nomad_: + $modules/nomad_: maintainers: chris93111 - $modules/clustering/pacemaker_cluster.py: + $modules/pacemaker_cluster.py: maintainers: matbu - $modules/clustering/znode.py: + $modules/znode.py: maintainers: treyperry - $modules/database/aerospike/aerospike_migrations.py: + $modules/aerospike_migrations.py: maintainers: Alb0t - $modules/database/influxdb/influxdb_: + $modules/influxdb_: maintainers: kamsz - $modules/database/influxdb/influxdb_query.py: + $modules/influxdb_query.py: maintainers: resmo - $modules/database/influxdb/influxdb_user.py: + $modules/influxdb_user.py: maintainers: zhhuta - $modules/database/influxdb/influxdb_write.py: + $modules/influxdb_write.py: maintainers: resmo - $modules/database/misc/elasticsearch_plugin.py: + $modules/elasticsearch_plugin.py: maintainers: ThePixelDeveloper samdoran - $modules/database/misc/kibana_plugin.py: + $modules/kibana_plugin.py: maintainers: barryib - $modules/database/misc/odbc.py: + $modules/odbc.py: maintainers: john-westcott-iv - $modules/database/misc/redis.py: + $modules/redis.py: maintainers: slok - $modules/database/misc/redis_info.py: + $modules/redis_info.py: maintainers: levonet - $modules/database/misc/redis_data_info.py: + $modules/redis_data_info.py: maintainers: paginabianca - $modules/database/misc/redis_data.py: + $modules/redis_data.py: maintainers: paginabianca - $modules/database/misc/redis_data_incr.py: + $modules/redis_data_incr.py: maintainers: paginabianca - $modules/database/misc/riak.py: + $modules/riak.py: maintainers: drewkerrigan jsmartin - $modules/database/mssql/mssql_db.py: + $modules/mssql_db.py: maintainers: vedit Jmainguy kenichi-ogawa-1988 labels: mssql_db - $modules/database/mssql/mssql_script.py: + $modules/mssql_script.py: maintainers: kbudde labels: mssql_script - $modules/database/saphana/hana_query.py: + $modules/hana_query.py: maintainers: rainerleber - $modules/database/vertica/vertica_: + $modules/vertica_: maintainers: dareko - $modules/files/archive.py: + $modules/archive.py: maintainers: bendoh - $modules/files/filesize.py: + $modules/filesize.py: maintainers: quidame - $modules/files/ini_file.py: + $modules/ini_file.py: maintainers: jpmens noseka1 - $modules/files/iso_create.py: + $modules/iso_create.py: maintainers: Tomorrow9 - $modules/files/iso_customize.py: + $modules/iso_customize.py: maintainers: ZouYuhua - $modules/files/iso_extract.py: + $modules/iso_extract.py: maintainers: dagwieers jhoekx ribbons - $modules/files/read_csv.py: + $modules/read_csv.py: maintainers: dagwieers - $modules/files/sapcar_extract.py: + $modules/sapcar_extract.py: maintainers: RainerLeber - $modules/files/xattr.py: + $modules/xattr.py: maintainers: bcoca labels: xattr - $modules/files/xml.py: + $modules/xml.py: maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0 labels: m:xml xml ignore: magnus919 - $modules/identity/ipa/ipa_: + $modules/ipa_: maintainers: $team_ipa - $modules/identity/ipa/ipa_pwpolicy.py: + $modules/ipa_pwpolicy.py: maintainers: adralioh - $modules/identity/ipa/ipa_service.py: + $modules/ipa_service.py: maintainers: cprh - $modules/identity/ipa/ipa_vault.py: + $modules/ipa_vault.py: maintainers: jparrill - $modules/identity/keycloak/keycloak_: + $modules/keycloak_: maintainers: $team_keycloak - $modules/identity/keycloak/keycloak_authentication.py: + $modules/keycloak_authentication.py: maintainers: elfelip Gaetan2907 - $modules/identity/keycloak/keycloak_clientscope.py: + $modules/keycloak_clientscope.py: maintainers: Gaetan2907 - $modules/identity/keycloak/keycloak_client_rolemapping.py: + $modules/keycloak_client_rolemapping.py: maintainers: Gaetan2907 - $modules/identity/keycloak/keycloak_user_rolemapping.py: + $modules/keycloak_user_rolemapping.py: maintainers: bratwurzt - $modules/identity/keycloak/keycloak_group.py: + $modules/keycloak_group.py: maintainers: adamgoossens - $modules/identity/keycloak/keycloak_identity_provider.py: + $modules/keycloak_identity_provider.py: maintainers: laurpaum - $modules/identity/keycloak/keycloak_realm_info.py: + $modules/keycloak_realm_info.py: maintainers: fynncfchen - $modules/identity/keycloak/keycloak_realm.py: + $modules/keycloak_realm.py: maintainers: kris2kris - $modules/identity/keycloak/keycloak_role.py: + $modules/keycloak_role.py: maintainers: laurpaum - $modules/identity/keycloak/keycloak_user_federation.py: + $modules/keycloak_user_federation.py: maintainers: laurpaum - $modules/identity/onepassword_info.py: + $modules/onepassword_info.py: maintainers: Rylon - $modules/identity/opendj/opendj_backendprop.py: + $modules/opendj_backendprop.py: maintainers: dj-wasabi - $modules/monitoring/airbrake_deployment.py: + $modules/airbrake_deployment.py: maintainers: phumpal labels: airbrake_deployment ignore: bpennypacker - $modules/monitoring/alerta_customer.py: + $modules/alerta_customer.py: maintainers: cwollinger - $modules/monitoring/bigpanda.py: + $modules/bigpanda.py: maintainers: hkariti - $modules/monitoring/circonus_annotation.py: + $modules/circonus_annotation.py: maintainers: NickatEpic - $modules/monitoring/datadog/datadog_event.py: + $modules/datadog_event.py: maintainers: n0ts labels: datadog_event ignore: arturaz - $modules/monitoring/datadog/datadog_downtime.py: + $modules/datadog_downtime.py: maintainers: Datadog - $modules/monitoring/datadog/datadog_monitor.py: + $modules/datadog_monitor.py: maintainers: skornehl - $modules/monitoring/honeybadger_deployment.py: + $modules/honeybadger_deployment.py: maintainers: stympy - $modules/monitoring/icinga2_feature.py: + $modules/icinga2_feature.py: maintainers: nerzhul - $modules/monitoring/icinga2_host.py: + $modules/icinga2_host.py: maintainers: t794104 - $modules/monitoring/librato_annotation.py: + $modules/librato_annotation.py: maintainers: Sedward - $modules/monitoring/logentries.py: + $modules/logentries.py: labels: logentries ignore: ivanvanderbyl - $modules/monitoring/logstash_plugin.py: + $modules/logstash_plugin.py: maintainers: nerzhul - $modules/monitoring/monit.py: + $modules/monit.py: maintainers: dstoflet brian-brazil snopoke labels: monit - $modules/monitoring/nagios.py: + $modules/nagios.py: maintainers: tbielawa tgoetheyn - $modules/monitoring/newrelic_deployment.py: + $modules/newrelic_deployment.py: ignore: mcodd - $modules/monitoring/pagerduty.py: + $modules/pagerduty.py: maintainers: suprememoocow thaumos labels: pagerduty ignore: bpennypacker - $modules/monitoring/pagerduty_alert.py: + $modules/pagerduty_alert.py: maintainers: ApsOps - $modules/monitoring/pagerduty_change.py: + $modules/pagerduty_change.py: maintainers: adamvaughan - $modules/monitoring/pagerduty_user.py: + $modules/pagerduty_user.py: maintainers: zanssa - $modules/monitoring/pingdom.py: + $modules/pingdom.py: maintainers: thaumos - $modules/monitoring/rollbar_deployment.py: + $modules/rollbar_deployment.py: maintainers: kavu - $modules/monitoring/sensu/sensu_: + $modules/sensu_: maintainers: dmsimard - $modules/monitoring/sensu/sensu_check.py: + $modules/sensu_check.py: maintainers: andsens - $modules/monitoring/sensu/sensu_silence.py: + $modules/sensu_silence.py: maintainers: smbambling - $modules/monitoring/sensu/sensu_subscription.py: + $modules/sensu_subscription.py: maintainers: andsens - $modules/monitoring/spectrum_device.py: + $modules/spectrum_device.py: maintainers: orgito - $modules/monitoring/spectrum_model_attrs.py: + $modules/spectrum_model_attrs.py: maintainers: tgates81 - $modules/monitoring/stackdriver.py: + $modules/stackdriver.py: maintainers: bwhaley - $modules/monitoring/statsd.py: + $modules/statsd.py: maintainers: mamercad - $modules/monitoring/statusio_maintenance.py: + $modules/statusio_maintenance.py: maintainers: bhcopeland - $modules/monitoring/uptimerobot.py: + $modules/uptimerobot.py: maintainers: nate-kingsley - $modules/net_tools/cloudflare_dns.py: + $modules/cloudflare_dns.py: maintainers: mgruener labels: cloudflare_dns - $modules/net_tools/dnsimple.py: + $modules/dnsimple.py: maintainers: drcapulet - $modules/net_tools/dnsimple_info.py: + $modules/dnsimple_info.py: maintainers: edhilgendorf - $modules/net_tools/dnsmadeeasy.py: + $modules/dnsmadeeasy.py: maintainers: briceburg - $modules/net_tools/gandi_livedns.py: + $modules/gandi_livedns.py: maintainers: gthiemonge - $modules/net_tools/haproxy.py: + $modules/haproxy.py: maintainers: ravibhure Normo - $modules/net_tools/infinity/infinity.py: + $modules/infinity.py: maintainers: MeganLiu - $modules/net_tools/ip_netns.py: + $modules/ip_netns.py: maintainers: bregman-arie - $modules/net_tools/ipify_facts.py: + $modules/ipify_facts.py: maintainers: resmo - $modules/net_tools/ipinfoio_facts.py: + $modules/ipinfoio_facts.py: maintainers: akostyuk - $modules/net_tools/ipwcli_dns.py: + $modules/ipwcli_dns.py: maintainers: cwollinger - $modules/net_tools/ldap/ldap_attrs.py: + $modules/ldap_attrs.py: maintainers: drybjed jtyr noles - $modules/net_tools/ldap/ldap_entry.py: + $modules/ldap_entry.py: maintainers: jtyr - $modules/net_tools/ldap/ldap_passwd.py: + $modules/ldap_passwd.py: maintainers: KellerFuchs jtyr - $modules/net_tools/ldap/ldap_search.py: + $modules/ldap_search.py: maintainers: eryx12o45 jtyr - $modules/net_tools/lldp.py: + $modules/lldp.py: labels: lldp ignore: andyhky - $modules/net_tools/netcup_dns.py: + $modules/netcup_dns.py: maintainers: nbuchwitz - $modules/net_tools/nsupdate.py: + $modules/nsupdate.py: maintainers: nerzhul - $modules/net_tools/omapi_host.py: + $modules/omapi_host.py: maintainers: amasolov nerzhul - $modules/net_tools/pritunl/pritunl_: + $modules/pritunl_: maintainers: Lowess - $modules/net_tools/nmcli.py: + $modules/nmcli.py: maintainers: alcamie101 - $modules/net_tools/snmp_facts.py: + $modules/snmp_facts.py: maintainers: ogenstad ujwalkomarla - $modules/notification/bearychat.py: + $modules/bearychat.py: maintainers: tonyseek - $modules/notification/campfire.py: + $modules/campfire.py: maintainers: fabulops - $modules/notification/catapult.py: + $modules/catapult.py: maintainers: Jmainguy - $modules/notification/cisco_webex.py: + $modules/cisco_webex.py: maintainers: drew-russell - $modules/notification/discord.py: + $modules/discord.py: maintainers: cwollinger - $modules/notification/flowdock.py: + $modules/flowdock.py: ignore: mcodd - $modules/notification/grove.py: + $modules/grove.py: maintainers: zimbatm - $modules/notification/hipchat.py: + $modules/hipchat.py: maintainers: pb8226 shirou - $modules/notification/irc.py: + $modules/irc.py: maintainers: jpmens sivel - $modules/notification/jabber.py: + $modules/jabber.py: maintainers: bcoca - $modules/notification/logentries_msg.py: + $modules/logentries_msg.py: maintainers: jcftang - $modules/notification/mail.py: + $modules/mail.py: maintainers: dagwieers - $modules/notification/matrix.py: + $modules/matrix.py: maintainers: jcgruenhage - $modules/notification/mattermost.py: + $modules/mattermost.py: maintainers: bjolivot - $modules/notification/mqtt.py: + $modules/mqtt.py: maintainers: jpmens - $modules/notification/nexmo.py: + $modules/nexmo.py: maintainers: sivel - $modules/notification/office_365_connector_card.py: + $modules/office_365_connector_card.py: maintainers: marc-sensenich - $modules/notification/pushbullet.py: + $modules/pushbullet.py: maintainers: willybarro - $modules/notification/pushover.py: + $modules/pushover.py: maintainers: weaselkeeper wopfel - $modules/notification/rocketchat.py: + $modules/rocketchat.py: maintainers: Deepakkothandan labels: rocketchat ignore: ramondelafuente - $modules/notification/say.py: + $modules/say.py: maintainers: $team_ansible_core mpdehaan - $modules/notification/sendgrid.py: + $modules/sendgrid.py: maintainers: makaimc - $modules/notification/slack.py: + $modules/slack.py: maintainers: ramondelafuente - $modules/notification/syslogger.py: + $modules/syslogger.py: maintainers: garbled1 - $modules/notification/telegram.py: + $modules/telegram.py: maintainers: tyouxa loms lomserman - $modules/notification/twilio.py: + $modules/twilio.py: maintainers: makaimc - $modules/notification/typetalk.py: + $modules/typetalk.py: maintainers: tksmd - $modules/packaging/language/ansible_galaxy_install.py: + $modules/ansible_galaxy_install.py: maintainers: russoz - $modules/packaging/language/bower.py: + $modules/bower.py: maintainers: mwarkentin - $modules/packaging/language/bundler.py: + $modules/bundler.py: maintainers: thoiberg - $modules/packaging/language/cargo.py: + $modules/cargo.py: maintainers: radek-sprta - $modules/packaging/language/composer.py: + $modules/composer.py: maintainers: dmtrs ignore: resmo - $modules/packaging/language/cpanm.py: + $modules/cpanm.py: maintainers: fcuny russoz - $modules/packaging/language/easy_install.py: + $modules/easy_install.py: maintainers: mattupstate - $modules/packaging/language/gem.py: + $modules/gem.py: maintainers: $team_ansible_core johanwiren labels: gem - $modules/packaging/language/maven_artifact.py: + $modules/maven_artifact.py: maintainers: tumbl3w33d turb labels: maven_artifact ignore: chrisisbeef - $modules/packaging/language/npm.py: + $modules/npm.py: maintainers: shane-walker xcambar labels: npm ignore: chrishoffman - $modules/packaging/language/pear.py: + $modules/pear.py: labels: pear ignore: jle64 - $modules/packaging/language/pip_package_info.py: + $modules/pip_package_info.py: maintainers: bcoca matburt maxamillion - $modules/packaging/language/pipx.py: + $modules/pipx.py: maintainers: russoz - $modules/packaging/language/pipx_info.py: + $modules/pipx_info.py: maintainers: russoz - $modules/packaging/language/yarn.py: + $modules/yarn.py: maintainers: chrishoffman verkaufer - $modules/packaging/os/apk.py: + $modules/apk.py: maintainers: tdtrask labels: apk ignore: kbrebanov - $modules/packaging/os/apt_repo.py: + $modules/apt_repo.py: maintainers: obirvalger - $modules/packaging/os/apt_rpm.py: + $modules/apt_rpm.py: maintainers: evgkrsk - $modules/packaging/os/copr.py: + $modules/copr.py: maintainers: schlupov - $modules/packaging/os/dnf_versionlock.py: + $modules/dnf_versionlock.py: maintainers: moreda - $modules/packaging/os/flatpak.py: + $modules/flatpak.py: maintainers: $team_flatpak - $modules/packaging/os/flatpak_remote.py: + $modules/flatpak_remote.py: maintainers: $team_flatpak - $modules/packaging/os/pkg5: + $modules/pkg5: maintainers: $team_solaris mavit labels: pkg5 solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/packaging/os/homebrew.py: + $modules/homebrew.py: notify: chris-short maintainers: $team_macos andrew-d labels: homebrew macos ignore: ryansb keywords: brew cask darwin homebrew macosx macports osx - $modules/packaging/os/homebrew_cask.py: + $modules/homebrew_cask.py: notify: chris-short maintainers: $team_macos enriclluelles labels: homebrew_ macos ignore: ryansb keywords: brew cask darwin homebrew macosx macports osx - $modules/packaging/os/homebrew_tap.py: + $modules/homebrew_tap.py: notify: chris-short maintainers: $team_macos labels: homebrew_ macos ignore: ryansb keywords: brew cask darwin homebrew macosx macports osx - $modules/packaging/os/installp.py: + $modules/installp.py: maintainers: $team_aix kairoaraujo labels: aix installp keywords: aix efix lpar wpar - $modules/packaging/os/layman.py: + $modules/layman.py: maintainers: jirutka - $modules/packaging/os/macports.py: + $modules/macports.py: notify: chris-short maintainers: $team_macos jcftang labels: macos macports ignore: ryansb keywords: brew cask darwin homebrew macosx macports osx - $modules/packaging/os/mas.py: + $modules/mas.py: maintainers: lukasbestle mheap - $modules/packaging/os/openbsd_pkg.py: + $modules/openbsd_pkg.py: maintainers: $team_bsd eest labels: bsd openbsd_pkg ignore: ryansb keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense - $modules/packaging/os/opkg.py: + $modules/opkg.py: maintainers: skinp - $modules/packaging/os/pacman.py: + $modules/pacman.py: maintainers: elasticdog indrajitr tchernomax jraby labels: pacman ignore: elasticdog - $modules/packaging/os/pacman_key.py: + $modules/pacman_key.py: maintainers: grawlinson labels: pacman - $modules/packaging/os/pkgin.py: + $modules/pkgin.py: maintainers: $team_solaris L2G jasperla szinck martinm82 labels: pkgin solaris - $modules/packaging/os/pkgng.py: + $modules/pkgng.py: maintainers: $team_bsd bleader labels: bsd pkgng ignore: bleader keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense - $modules/packaging/os/pkgutil.py: + $modules/pkgutil.py: maintainers: $team_solaris dermute labels: pkgutil solaris - $modules/packaging/os/portage.py: + $modules/portage.py: maintainers: Tatsh wltjr labels: portage ignore: sayap - $modules/packaging/os/portinstall.py: + $modules/portinstall.py: maintainers: $team_bsd berenddeboer labels: bsd portinstall ignore: ryansb keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense - $modules/packaging/os/pulp_repo.py: + $modules/pulp_repo.py: maintainers: sysadmind - $modules/packaging/os/redhat_subscription.py: + $modules/redhat_subscription.py: maintainers: barnabycourt alikins kahowell labels: redhat_subscription - $modules/packaging/os/rhn_channel.py: + $modules/rhn_channel.py: maintainers: vincentvdk alikins $team_rhn labels: rhn_channel - $modules/packaging/os/rhn_register.py: + $modules/rhn_register.py: maintainers: jlaska $team_rhn labels: rhn_register - $modules/packaging/os/rhsm_release.py: + $modules/rhsm_release.py: maintainers: seandst - $modules/packaging/os/rhsm_repository.py: + $modules/rhsm_repository.py: maintainers: giovannisciortino - $modules/packaging/os/rpm_ostree_pkg.py: + $modules/rpm_ostree_pkg.py: maintainers: dustymabe Akasurde - $modules/packaging/os/slackpkg.py: + $modules/slackpkg.py: maintainers: KimNorgaard - $modules/packaging/os/snap.py: + $modules/snap.py: maintainers: angristan vcarceler labels: snap - $modules/packaging/os/snap_alias.py: + $modules/snap_alias.py: maintainers: russoz labels: snap - $modules/packaging/os/sorcery.py: + $modules/sorcery.py: maintainers: vaygr - $modules/packaging/os/svr4pkg.py: + $modules/svr4pkg.py: maintainers: $team_solaris brontitall labels: solaris svr4pkg - $modules/packaging/os/swdepot.py: + $modules/swdepot.py: maintainers: $team_hpux melodous labels: hpux swdepot keywords: hp-ux - $modules/packaging/os/swupd.py: + $modules/swupd.py: maintainers: hnanni albertomurillo labels: swupd - $modules/packaging/os/urpmi.py: + $modules/urpmi.py: maintainers: pmakowski - $modules/packaging/os/xbps.py: + $modules/xbps.py: maintainers: dinoocch the-maldridge - $modules/packaging/os/yum_versionlock.py: + $modules/yum_versionlock.py: maintainers: gyptazy aminvakil - $modules/packaging/os/zypper.py: + $modules/zypper.py: maintainers: $team_suse labels: zypper ignore: dirtyharrycallahan robinro - $modules/packaging/os/zypper_repository.py: + $modules/zypper_repository.py: maintainers: $team_suse labels: zypper ignore: matze - $modules/remote_management/cobbler/cobbler_: + $modules/cobbler_: maintainers: dagwieers - $modules/remote_management/hpilo/hpilo_: + $modules/hpilo_: maintainers: haad ignore: dagwieers - $modules/remote_management/hpilo/hponcfg.py: + $modules/hponcfg.py: maintainers: haad ignore: dagwieers - $modules/remote_management/imc/imc_rest.py: + $modules/imc_rest.py: maintainers: dagwieers labels: cisco - $modules/remote_management/ipmi/ipmi_: + $modules/ipmi_: maintainers: bgaifullin cloudnull - $modules/remote_management/lenovoxcc/xcc_: + $modules/xcc_: maintainers: panyy3 renxulei - $modules/remote_management/lxca/lxca_: + $modules/lxca_: maintainers: navalkp prabhosa - $modules/remote_management/manageiq/manageiq_: + $modules/manageiq_: labels: manageiq maintainers: $team_manageiq - $modules/remote_management/manageiq/manageiq_alert_profiles.py: + $modules/manageiq_alert_profiles.py: maintainers: elad661 - $modules/remote_management/manageiq/manageiq_alerts.py: + $modules/manageiq_alerts.py: maintainers: elad661 - $modules/remote_management/manageiq/manageiq_group.py: + $modules/manageiq_group.py: maintainers: evertmulder - $modules/remote_management/manageiq/manageiq_policies_info.py: + $modules/manageiq_policies_info.py: maintainers: russoz $team_manageiq - $modules/remote_management/manageiq/manageiq_tags_info.py: + $modules/manageiq_tags_info.py: maintainers: russoz $team_manageiq - $modules/remote_management/manageiq/manageiq_tenant.py: + $modules/manageiq_tenant.py: maintainers: evertmulder - $modules/remote_management/oneview/oneview_: + $modules/oneview_: maintainers: adriane-cardozo fgbulsoni tmiotto - $modules/remote_management/oneview/oneview_datacenter_info.py: + $modules/oneview_datacenter_info.py: maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr - $modules/remote_management/oneview/oneview_fc_network.py: + $modules/oneview_fc_network.py: maintainers: fgbulsoni - $modules/remote_management/oneview/oneview_fcoe_network.py: + $modules/oneview_fcoe_network.py: maintainers: fgbulsoni - $modules/remote_management/redfish/idrac_: + $modules/idrac_: maintainers: $team_redfish ignore: jose-delarosa - $modules/remote_management/redfish/ilo_: + $modules/ilo_: maintainers: $team_redfish ignore: jose-delarosa - $modules/remote_management/redfish/redfish_: + $modules/redfish_: maintainers: $team_redfish ignore: jose-delarosa - $modules/remote_management/redfish/wdc_: + $modules/wdc_: maintainers: $team_redfish ignore: jose-delarosa - $modules/remote_management/redfish/wdc_redfish_command.py: + $modules/wdc_redfish_command.py: maintainers: $team_wdc - $modules/remote_management/redfish/wdc_redfish_info.py: + $modules/wdc_redfish_info.py: maintainers: $team_wdc - $modules/remote_management/stacki/stacki_host.py: + $modules/stacki_host.py: maintainers: bsanders bbyhuy labels: stacki_host - $modules/remote_management/wakeonlan.py: + $modules/wakeonlan.py: maintainers: dagwieers - $modules/source_control/bitbucket/bitbucket_: + $modules/bitbucket_: maintainers: catcombo - $modules/source_control/bzr.py: + $modules/bzr.py: maintainers: andreparames - $modules/source_control/git_config.py: + $modules/git_config.py: maintainers: djmattyg007 mgedmin - $modules/source_control/github/github_deploy_key.py: + $modules/github_deploy_key.py: maintainers: bincyber - $modules/source_control/github/github_issue.py: + $modules/github_issue.py: maintainers: Akasurde - $modules/source_control/github/github_key.py: + $modules/github_key.py: maintainers: erydo labels: github_key ignore: erydo - $modules/source_control/github/github_release.py: + $modules/github_release.py: maintainers: adrianmoisey - $modules/source_control/github/github_repo.py: + $modules/github_repo.py: maintainers: atorrescogollo - $modules/source_control/github/github_: + $modules/github_: maintainers: stpierre - $modules/source_control/gitlab/gitlab_: + $modules/gitlab_: notify: jlozadad maintainers: $team_gitlab keywords: gitlab source_control - $modules/source_control/gitlab/gitlab_project_variable.py: + $modules/gitlab_project_variable.py: maintainers: markuman - $modules/source_control/gitlab/gitlab_runner.py: + $modules/gitlab_runner.py: maintainers: SamyCoenen - $modules/source_control/gitlab/gitlab_user.py: + $modules/gitlab_user.py: maintainers: LennertMertens stgrace - $modules/source_control/gitlab/gitlab_branch.py: + $modules/gitlab_branch.py: maintainers: paytroff - $modules/source_control/hg.py: + $modules/hg.py: maintainers: yeukhon - $modules/storage/emc/emc_vnx_sg_member.py: + $modules/emc_vnx_sg_member.py: maintainers: remixtj - $modules/storage/hpe3par/ss_3par_cpg.py: + $modules/ss_3par_cpg.py: maintainers: farhan7500 gautamphegde - $modules/storage/ibm/ibm_sa_: + $modules/ibm_sa_: maintainers: tzure - $modules/storage/pmem/pmem.py: + $modules/pmem.py: maintainers: mizumm - $modules/storage/vexata/vexata_: + $modules/vexata_: maintainers: vexata - $modules/storage/zfs/zfs: + $modules/zfs: maintainers: $team_solaris labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/storage/zfs/zfs.py: + $modules/zfs.py: maintainers: johanwiren - $modules/storage/zfs/zfs_delegate_admin.py: + $modules/zfs_delegate_admin.py: maintainers: natefoo - $modules/storage/zfs/zpool_facts: + $modules/zpool_facts: maintainers: $team_solaris labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/system/aix: + $modules/aix: maintainers: $team_aix labels: aix keywords: aix efix lpar wpar - $modules/system/alternatives.py: + $modules/alternatives.py: maintainers: mulby labels: alternatives ignore: DavidWittman jiuka - $modules/system/aix_lvol.py: + $modules/aix_lvol.py: maintainers: adejoux - $modules/system/awall.py: + $modules/awall.py: maintainers: tdtrask - $modules/system/beadm.py: + $modules/beadm.py: maintainers: $team_solaris labels: beadm solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/system/capabilities.py: + $modules/capabilities.py: maintainers: natefoo - $modules/system/cronvar.py: + $modules/cronvar.py: maintainers: dougluce - $modules/system/crypttab.py: + $modules/crypttab.py: maintainers: groks - $modules/system/dconf.py: + $modules/dconf.py: maintainers: azaghal - $modules/system/dpkg_divert.py: + $modules/dpkg_divert.py: maintainers: quidame - $modules/system/facter.py: + $modules/facter.py: maintainers: $team_ansible_core gamethis labels: facter - $modules/system/filesystem.py: + $modules/filesystem.py: maintainers: pilou- abulimov quidame labels: filesystem - $modules/system/gconftool2.py: + $modules/gconftool2.py: maintainers: Akasurde kevensen labels: gconftool2 - $modules/system/gconftool2_info.py: + $modules/gconftool2_info.py: maintainers: russoz labels: gconftool2 - $modules/system/homectl.py: + $modules/homectl.py: maintainers: jameslivulpi - $modules/system/interfaces_file.py: + $modules/interfaces_file.py: maintainers: obourdon hryamzik labels: interfaces_file - $modules/system/iptables_state.py: + $modules/iptables_state.py: maintainers: quidame - $modules/system/keyring.py: + $modules/keyring.py: maintainers: ahussey-redhat - $modules/system/keyring_info.py: + $modules/keyring_info.py: maintainers: ahussey-redhat - $modules/system/shutdown.py: + $modules/shutdown.py: maintainers: nitzmahone samdoran aminvakil - $modules/system/java_cert.py: + $modules/java_cert.py: maintainers: haad absynth76 - $modules/system/java_keystore.py: + $modules/java_keystore.py: maintainers: Mogztter quidame - $modules/system/kernel_blacklist.py: + $modules/kernel_blacklist.py: maintainers: matze - $modules/system/launchd.py: + $modules/launchd.py: maintainers: martinm82 - $modules/system/lbu.py: + $modules/lbu.py: maintainers: kunkku - $modules/system/listen_ports_facts.py: + $modules/listen_ports_facts.py: maintainers: ndavison - $modules/system/locale_gen.py: + $modules/locale_gen.py: maintainers: AugustusKling - $modules/system/lvg.py: + $modules/lvg.py: maintainers: abulimov - $modules/system/lvol.py: + $modules/lvol.py: maintainers: abulimov jhoekx zigaSRC unkaputtbar112 - $modules/system/make.py: + $modules/make.py: maintainers: LinusU - $modules/system/mksysb.py: + $modules/mksysb.py: maintainers: $team_aix labels: aix mksysb - $modules/system/modprobe.py: + $modules/modprobe.py: maintainers: jdauphant mattjeffery labels: modprobe ignore: stygstra - $modules/system/nosh.py: + $modules/nosh.py: maintainers: tacatac - $modules/system/ohai.py: + $modules/ohai.py: maintainers: $team_ansible_core mpdehaan labels: ohai - $modules/system/open_iscsi.py: + $modules/open_iscsi.py: maintainers: srvg - $modules/system/openwrt_init.py: + $modules/openwrt_init.py: maintainers: agaffney - $modules/system/osx_defaults.py: + $modules/osx_defaults.py: notify: chris-short maintainers: $team_macos notok labels: macos osx_defaults keywords: brew cask darwin homebrew macosx macports osx - $modules/system/pam_limits.py: + $modules/pam_limits.py: maintainers: giovannisciortino labels: pam_limits ignore: usawa - $modules/system/pamd.py: + $modules/pamd.py: maintainers: kevensen - $modules/system/parted.py: + $modules/parted.py: maintainers: ColOfAbRiX rosowiecki jake2184 - $modules/system/pids.py: + $modules/pids.py: maintainers: saranyasridharan - $modules/system/puppet.py: + $modules/puppet.py: maintainers: nibalizer emonty labels: puppet - $modules/system/python_requirements_info.py: + $modules/python_requirements_info.py: maintainers: willthames ignore: ryansb - $modules/system/runit.py: + $modules/runit.py: maintainers: jsumners - $modules/system/sap_task_list_execute: + $modules/sap_task_list_execute: maintainers: rainerleber - $modules/system/sefcontext.py: + $modules/sefcontext.py: maintainers: dagwieers - $modules/system/selinux_permissive.py: + $modules/selinux_permissive.py: maintainers: mscherer - $modules/system/selogin.py: + $modules/selogin.py: maintainers: bachradsusi dankeder jamescassell - $modules/system/seport.py: + $modules/seport.py: maintainers: dankeder - $modules/system/solaris_zone.py: + $modules/solaris_zone.py: maintainers: $team_solaris pmarkham labels: solaris keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/system/ssh_config.py: + $modules/ssh_config.py: maintainers: gaqzi Akasurde - $modules/system/sudoers.py: + $modules/sudoers.py: maintainers: JonEllis - $modules/system/svc.py: + $modules/svc.py: maintainers: bcoca - $modules/system/syspatch.py: + $modules/syspatch.py: maintainers: precurse - $modules/system/sysrc.py: + $modules/sysrc.py: maintainers: dlundgren - $modules/system/sysupgrade.py: + $modules/sysupgrade.py: maintainers: precurse - $modules/system/timezone.py: + $modules/timezone.py: maintainers: indrajitr jasperla tmshn - $modules/system/ufw.py: + $modules/ufw.py: notify: felixfontein maintainers: ahtik ovcharenko pyykkis labels: ufw - $modules/system/vdo.py: + $modules/vdo.py: maintainers: rhawalsh bgurney-rh - $modules/system/xfconf.py: + $modules/xfconf.py: maintainers: russoz jbenden labels: xfconf - $modules/system/xfconf_info.py: + $modules/xfconf_info.py: maintainers: russoz labels: xfconf - $modules/system/xfs_quota.py: + $modules/xfs_quota.py: maintainers: bushvin - $modules/web_infrastructure/apache2_mod_proxy.py: + $modules/apache2_mod_proxy.py: maintainers: oboukili - $modules/web_infrastructure/apache2_module.py: + $modules/apache2_module.py: maintainers: berendt n0trax ignore: robinro - $modules/web_infrastructure/deploy_helper.py: + $modules/deploy_helper.py: maintainers: ramondelafuente - $modules/web_infrastructure/django_manage.py: + $modules/django_manage.py: maintainers: russoz ignore: scottanderson42 tastychutney labels: django_manage - $modules/web_infrastructure/ejabberd_user.py: + $modules/ejabberd_user.py: maintainers: privateip - $modules/web_infrastructure/gunicorn.py: + $modules/gunicorn.py: maintainers: agmezr - $modules/web_infrastructure/htpasswd.py: + $modules/htpasswd.py: maintainers: $team_ansible_core labels: htpasswd - $modules/web_infrastructure/jboss.py: + $modules/jboss.py: maintainers: $team_jboss jhoekx labels: jboss - $modules/web_infrastructure/jenkins_build.py: + $modules/jenkins_build.py: maintainers: brettmilford unnecessary-username - $modules/web_infrastructure/jenkins_job.py: + $modules/jenkins_job.py: maintainers: sermilrod - $modules/web_infrastructure/jenkins_job_info.py: + $modules/jenkins_job_info.py: maintainers: stpierre - $modules/web_infrastructure/jenkins_plugin.py: + $modules/jenkins_plugin.py: maintainers: jtyr - $modules/web_infrastructure/jenkins_script.py: + $modules/jenkins_script.py: maintainers: hogarthj - $modules/web_infrastructure/jira.py: + $modules/jira.py: maintainers: Slezhuk tarka pertoft ignore: DWSR labels: jira - $modules/web_infrastructure/nginx_status_info.py: + $modules/nginx_status_info.py: maintainers: resmo - $modules/web_infrastructure/rundeck_acl_policy.py: + $modules/rundeck_acl_policy.py: maintainers: nerzhul - $modules/web_infrastructure/rundeck_project.py: + $modules/rundeck_project.py: maintainers: nerzhul - $modules/web_infrastructure/rundeck_job_run.py: + $modules/rundeck_job_run.py: maintainers: phsmith - $modules/web_infrastructure/rundeck_job_executions_info.py: + $modules/rundeck_job_executions_info.py: maintainers: phsmith - $modules/web_infrastructure/sophos_utm/utm_: + $modules/utm_: maintainers: $team_e_spirit keywords: sophos utm - $modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py: + $modules/utm_proxy_auth_profile.py: maintainers: $team_e_spirit stearz keywords: sophos utm - $modules/web_infrastructure/sophos_utm/utm_proxy_exception.py: + $modules/utm_proxy_exception.py: maintainers: $team_e_spirit RickS-C137 keywords: sophos utm - $modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py: + $modules/utm_ca_host_key_cert.py: maintainers: stearz - $modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py: + $modules/utm_ca_host_key_cert_info.py: maintainers: stearz - $modules/web_infrastructure/sophos_utm/utm_network_interface_address.py: + $modules/utm_network_interface_address.py: maintainers: steamx - $modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py: + $modules/utm_network_interface_address_info.py: maintainers: steamx - $modules/web_infrastructure/supervisorctl.py: + $modules/supervisorctl.py: maintainers: inetfuture mattupstate - $modules/web_infrastructure/taiga_issue.py: + $modules/taiga_issue.py: maintainers: lekum $tests/a_module.py: maintainers: felixfontein diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae10c4afc4..4236778dc6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -112,19 +112,9 @@ Creating new modules and plugins requires a bit more work than other Pull Reques - Make sure that new plugins and modules have tests (unit tests, integration tests, or both); it is preferable to have some tests which run in CI. -4. For modules and action plugins, make sure to create your module/plugin in the correct subdirectory, and add a redirect entry - in `meta/runtime.yml`. For example, for the `aerospike_migrations` module located in - `plugins/modules/database/aerospike/aerospike_migrations.py`, you need to create the following entry: - ```.yaml - aerospike_migrations: - redirect: community.general.database.aerospike.aerospike_migrations - ``` - Here, the relative path `database/aerospike/` is inserted into the module's FQCN (Fully Qualified Collection Name) after the - collection's name and before the module's name. This must not be done for other plugin types but modules and action plugins! - - - Action plugins need to be accompanied by a module, even if the module file only contains documentation - (`DOCUMENTATION`, `EXAMPLES` and `RETURN`). The module must have the same name and directory path in `plugins/modules/` - than the action plugin has in `plugins/action/`. +4. Action plugins need to be accompanied by a module, even if the module file only contains documentation + (`DOCUMENTATION`, `EXAMPLES` and `RETURN`). The module must have the same name and directory path in `plugins/modules/` + than the action plugin has in `plugins/action/`. 5. Make sure to add a BOTMETA entry for your new module/plugin in `.github/BOTMETA.yml`. Search for other plugins/modules in the same directory to see how entries could look. You should list all authors either as `maintainers` or under `ignore`. People diff --git a/changelogs/fragments/unflatmap.yml b/changelogs/fragments/unflatmap.yml new file mode 100644 index 0000000000..a75ff2f31f --- /dev/null +++ b/changelogs/fragments/unflatmap.yml @@ -0,0 +1,8 @@ +major_changes: + - "The internal structure of the collection was changed for modules and action plugins. + These no longer live in a directory hierarchy ordered by topic, but instead are now all in a single (flat) directory. + This has no impact on users *assuming they did not use internal FQCNs*. These will still work, but result in deprecation warnings. + They were never officially supported and thus the redirects are kept as a courtsey, and this is not labelled as a breaking change. + Note that for example the Ansible VScode plugin started recommending these internal names. If you followed its recommendation, + you will now have to change back to the short names to avoid deprecation warnings, and potential errors in the future as + these redirects will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5461)." diff --git a/meta/runtime.yml b/meta/runtime.yml index 9f9574afad..98a46f62dc 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -22,160 +22,537 @@ plugin_routing: nios_next_network: redirect: infoblox.nios_modules.nios_next_network modules: - aerospike_migrations: - redirect: community.general.database.aerospike.aerospike_migrations - airbrake_deployment: - redirect: community.general.monitoring.airbrake_deployment - aix_devices: - redirect: community.general.system.aix_devices - aix_filesystem: - redirect: community.general.system.aix_filesystem - aix_inittab: - redirect: community.general.system.aix_inittab - aix_lvg: - redirect: community.general.system.aix_lvg - aix_lvol: - redirect: community.general.system.aix_lvol - alerta_customer: - redirect: community.general.monitoring.alerta_customer - ali_instance: - redirect: community.general.cloud.alicloud.ali_instance + database.aerospike.aerospike_migrations: + redirect: community.general.aerospike_migrations + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.aerospike_migrations + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.airbrake_deployment: + redirect: community.general.airbrake_deployment + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.airbrake_deployment + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.aix_devices: + redirect: community.general.aix_devices + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.aix_devices + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.aix_filesystem: + redirect: community.general.aix_filesystem + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.aix_filesystem + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.aix_inittab: + redirect: community.general.aix_inittab + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.aix_inittab + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.aix_lvg: + redirect: community.general.aix_lvg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.aix_lvg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.aix_lvol: + redirect: community.general.aix_lvol + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.aix_lvol + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.alerta_customer: + redirect: community.general.alerta_customer + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.alerta_customer + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.alicloud.ali_instance: + redirect: community.general.ali_instance + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ali_instance + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. ali_instance_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.ali_instance_info instead. - ali_instance_info: - redirect: community.general.cloud.alicloud.ali_instance_info - alternatives: - redirect: community.general.system.alternatives - ansible_galaxy_install: - redirect: community.general.packaging.language.ansible_galaxy_install - apache2_mod_proxy: - redirect: community.general.web_infrastructure.apache2_mod_proxy - apache2_module: - redirect: community.general.web_infrastructure.apache2_module - apk: - redirect: community.general.packaging.os.apk - apt_repo: - redirect: community.general.packaging.os.apt_repo - apt_rpm: - redirect: community.general.packaging.os.apt_rpm - archive: - redirect: community.general.files.archive - atomic_container: - redirect: community.general.cloud.atomic.atomic_container - atomic_host: - redirect: community.general.cloud.atomic.atomic_host - atomic_image: - redirect: community.general.cloud.atomic.atomic_image - awall: - redirect: community.general.system.awall - beadm: - redirect: community.general.system.beadm - bearychat: - redirect: community.general.notification.bearychat - bigpanda: - redirect: community.general.monitoring.bigpanda - bitbucket_access_key: - redirect: community.general.source_control.bitbucket.bitbucket_access_key - bitbucket_pipeline_key_pair: - redirect: community.general.source_control.bitbucket.bitbucket_pipeline_key_pair - bitbucket_pipeline_known_host: - redirect: community.general.source_control.bitbucket.bitbucket_pipeline_known_host - bitbucket_pipeline_variable: - redirect: community.general.source_control.bitbucket.bitbucket_pipeline_variable - bower: - redirect: community.general.packaging.language.bower - bundler: - redirect: community.general.packaging.language.bundler - bzr: - redirect: community.general.source_control.bzr - campfire: - redirect: community.general.notification.campfire - capabilities: - redirect: community.general.system.capabilities - cargo: - redirect: community.general.packaging.language.cargo - catapult: - redirect: community.general.notification.catapult - circonus_annotation: - redirect: community.general.monitoring.circonus_annotation + cloud.alicloud.ali_instance_info: + redirect: community.general.ali_instance_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ali_instance_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.alternatives: + redirect: community.general.alternatives + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.alternatives + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.ansible_galaxy_install: + redirect: community.general.ansible_galaxy_install + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ansible_galaxy_install + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.apache2_mod_proxy: + redirect: community.general.apache2_mod_proxy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.apache2_mod_proxy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.apache2_module: + redirect: community.general.apache2_module + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.apache2_module + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.apk: + redirect: community.general.apk + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.apk + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.apt_repo: + redirect: community.general.apt_repo + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.apt_repo + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.apt_rpm: + redirect: community.general.apt_rpm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.apt_rpm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.archive: + redirect: community.general.archive + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.archive + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.atomic.atomic_container: + redirect: community.general.atomic_container + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.atomic_container + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.atomic.atomic_host: + redirect: community.general.atomic_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.atomic_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.atomic.atomic_image: + redirect: community.general.atomic_image + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.atomic_image + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.awall: + redirect: community.general.awall + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.awall + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.beadm: + redirect: community.general.beadm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.beadm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.bearychat: + redirect: community.general.bearychat + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bearychat + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.bigpanda: + redirect: community.general.bigpanda + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bigpanda + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.bitbucket.bitbucket_access_key: + redirect: community.general.bitbucket_access_key + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bitbucket_access_key + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.bitbucket.bitbucket_pipeline_key_pair: + redirect: community.general.bitbucket_pipeline_key_pair + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bitbucket_pipeline_key_pair + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.bitbucket.bitbucket_pipeline_known_host: + redirect: community.general.bitbucket_pipeline_known_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bitbucket_pipeline_known_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.bitbucket.bitbucket_pipeline_variable: + redirect: community.general.bitbucket_pipeline_variable + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bitbucket_pipeline_variable + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.bower: + redirect: community.general.bower + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bower + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.bundler: + redirect: community.general.bundler + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bundler + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.bzr: + redirect: community.general.bzr + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.bzr + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.campfire: + redirect: community.general.campfire + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.campfire + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.capabilities: + redirect: community.general.capabilities + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.capabilities + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.cargo: + redirect: community.general.cargo + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cargo + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.catapult: + redirect: community.general.catapult + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.catapult + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.circonus_annotation: + redirect: community.general.circonus_annotation + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.circonus_annotation + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. cisco_spark: - redirect: community.general.notification.cisco_spark - cisco_webex: - redirect: community.general.notification.cisco_webex - clc_aa_policy: - redirect: community.general.cloud.centurylink.clc_aa_policy - clc_alert_policy: - redirect: community.general.cloud.centurylink.clc_alert_policy - clc_blueprint_package: - redirect: community.general.cloud.centurylink.clc_blueprint_package - clc_firewall_policy: - redirect: community.general.cloud.centurylink.clc_firewall_policy - clc_group: - redirect: community.general.cloud.centurylink.clc_group - clc_loadbalancer: - redirect: community.general.cloud.centurylink.clc_loadbalancer - clc_modify_server: - redirect: community.general.cloud.centurylink.clc_modify_server - clc_publicip: - redirect: community.general.cloud.centurylink.clc_publicip - clc_server: - redirect: community.general.cloud.centurylink.clc_server - clc_server_snapshot: - redirect: community.general.cloud.centurylink.clc_server_snapshot - cloud_init_data_facts: - redirect: community.general.cloud.misc.cloud_init_data_facts - cloudflare_dns: - redirect: community.general.net_tools.cloudflare_dns - cobbler_sync: - redirect: community.general.remote_management.cobbler.cobbler_sync - cobbler_system: - redirect: community.general.remote_management.cobbler.cobbler_system - composer: - redirect: community.general.packaging.language.composer - consul: - redirect: community.general.clustering.consul.consul - consul_acl: - redirect: community.general.clustering.consul.consul_acl - consul_kv: - redirect: community.general.clustering.consul.consul_kv - consul_session: - redirect: community.general.clustering.consul.consul_session - copr: - redirect: community.general.packaging.os.copr - cpanm: - redirect: community.general.packaging.language.cpanm - cronvar: - redirect: community.general.system.cronvar - crypttab: - redirect: community.general.system.crypttab - datadog_downtime: - redirect: community.general.monitoring.datadog.datadog_downtime - datadog_event: - redirect: community.general.monitoring.datadog.datadog_event - datadog_monitor: - redirect: community.general.monitoring.datadog.datadog_monitor - dconf: - redirect: community.general.system.dconf - deploy_helper: - redirect: community.general.web_infrastructure.deploy_helper - dimensiondata_network: - redirect: community.general.cloud.dimensiondata.dimensiondata_network - dimensiondata_vlan: - redirect: community.general.cloud.dimensiondata.dimensiondata_vlan - discord: - redirect: community.general.notification.discord - django_manage: - redirect: community.general.web_infrastructure.django_manage - dnf_versionlock: - redirect: community.general.packaging.os.dnf_versionlock - dnsimple: - redirect: community.general.net_tools.dnsimple - dnsimple_info: - redirect: community.general.net_tools.dnsimple_info - dnsmadeeasy: - redirect: community.general.net_tools.dnsmadeeasy + redirect: community.general.cisco_webex + notification.cisco_spark: + redirect: community.general.cisco_webex + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cisco_webex + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.cisco_webex: + redirect: community.general.cisco_webex + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cisco_webex + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_aa_policy: + redirect: community.general.clc_aa_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_aa_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_alert_policy: + redirect: community.general.clc_alert_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_alert_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_blueprint_package: + redirect: community.general.clc_blueprint_package + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_blueprint_package + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_firewall_policy: + redirect: community.general.clc_firewall_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_firewall_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_group: + redirect: community.general.clc_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_loadbalancer: + redirect: community.general.clc_loadbalancer + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_loadbalancer + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_modify_server: + redirect: community.general.clc_modify_server + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_modify_server + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_publicip: + redirect: community.general.clc_publicip + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_publicip + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_server: + redirect: community.general.clc_server + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_server + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.centurylink.clc_server_snapshot: + redirect: community.general.clc_server_snapshot + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.clc_server_snapshot + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.cloud_init_data_facts: + redirect: community.general.cloud_init_data_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cloud_init_data_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.cloudflare_dns: + redirect: community.general.cloudflare_dns + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cloudflare_dns + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.cobbler.cobbler_sync: + redirect: community.general.cobbler_sync + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cobbler_sync + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.cobbler.cobbler_system: + redirect: community.general.cobbler_system + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cobbler_system + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.composer: + redirect: community.general.composer + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.composer + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.consul.consul: + redirect: community.general.consul + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.consul + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.consul.consul_acl: + redirect: community.general.consul_acl + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.consul_acl + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.consul.consul_kv: + redirect: community.general.consul_kv + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.consul_kv + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.consul.consul_session: + redirect: community.general.consul_session + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.consul_session + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.copr: + redirect: community.general.copr + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.copr + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.cpanm: + redirect: community.general.cpanm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cpanm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.cronvar: + redirect: community.general.cronvar + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.cronvar + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.crypttab: + redirect: community.general.crypttab + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.crypttab + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.datadog.datadog_downtime: + redirect: community.general.datadog_downtime + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.datadog_downtime + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.datadog.datadog_event: + redirect: community.general.datadog_event + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.datadog_event + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.datadog.datadog_monitor: + redirect: community.general.datadog_monitor + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.datadog_monitor + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.dconf: + redirect: community.general.dconf + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dconf + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.deploy_helper: + redirect: community.general.deploy_helper + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.deploy_helper + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.dimensiondata.dimensiondata_network: + redirect: community.general.dimensiondata_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dimensiondata_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.dimensiondata.dimensiondata_vlan: + redirect: community.general.dimensiondata_vlan + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dimensiondata_vlan + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.discord: + redirect: community.general.discord + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.discord + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.django_manage: + redirect: community.general.django_manage + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.django_manage + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.dnf_versionlock: + redirect: community.general.dnf_versionlock + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dnf_versionlock + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.dnsimple: + redirect: community.general.dnsimple + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dnsimple + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.dnsimple_info: + redirect: community.general.dnsimple_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dnsimple_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.dnsmadeeasy: + redirect: community.general.dnsmadeeasy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dnsmadeeasy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. docker_compose: redirect: community.docker.docker_compose docker_config: @@ -230,36 +607,101 @@ plugin_routing: redirect: community.docker.docker_volume docker_volume_info: redirect: community.docker.docker_volume_info - dpkg_divert: - redirect: community.general.system.dpkg_divert - easy_install: - redirect: community.general.packaging.language.easy_install - ejabberd_user: - redirect: community.general.web_infrastructure.ejabberd_user - elasticsearch_plugin: - redirect: community.general.database.misc.elasticsearch_plugin - emc_vnx_sg_member: - redirect: community.general.storage.emc.emc_vnx_sg_member - etcd3: - redirect: community.general.clustering.etcd3 - facter: - redirect: community.general.system.facter - filesize: - redirect: community.general.files.filesize - filesystem: - redirect: community.general.system.filesystem - flatpak: - redirect: community.general.packaging.os.flatpak - flatpak_remote: - redirect: community.general.packaging.os.flatpak_remote - flowdock: - redirect: community.general.notification.flowdock + system.dpkg_divert: + redirect: community.general.dpkg_divert + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.dpkg_divert + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.easy_install: + redirect: community.general.easy_install + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.easy_install + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.ejabberd_user: + redirect: community.general.ejabberd_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ejabberd_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.elasticsearch_plugin: + redirect: community.general.elasticsearch_plugin + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.elasticsearch_plugin + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.emc.emc_vnx_sg_member: + redirect: community.general.emc_vnx_sg_member + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.emc_vnx_sg_member + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.etcd3: + redirect: community.general.etcd3 + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.etcd3 + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.facter: + redirect: community.general.facter + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.facter + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.filesize: + redirect: community.general.filesize + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.filesize + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.filesystem: + redirect: community.general.filesystem + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.filesystem + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.flatpak: + redirect: community.general.flatpak + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.flatpak + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.flatpak_remote: + redirect: community.general.flatpak_remote + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.flatpak_remote + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.flowdock: + redirect: community.general.flowdock + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.flowdock + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. foreman: tombstone: removal_version: 2.0.0 warning_text: Use the modules from the theforeman.foreman collection instead. - gandi_livedns: - redirect: community.general.net_tools.gandi_livedns + net_tools.gandi_livedns: + redirect: community.general.gandi_livedns + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gandi_livedns + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. gc_storage: redirect: community.google.gc_storage gcdns_record: @@ -294,10 +736,20 @@ plugin_routing: redirect: community.google.gce_snapshot gce_tag: redirect: community.google.gce_tag - gconftool2: - redirect: community.general.system.gconftool2 - gconftool2_info: - redirect: community.general.system.gconftool2_info + system.gconftool2: + redirect: community.general.gconftool2 + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gconftool2 + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.gconftool2_info: + redirect: community.general.gconftool2_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gconftool2_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. gcp_backend_service: tombstone: removal_version: 2.0.0 @@ -333,63 +785,193 @@ plugin_routing: removal_version: 2.0.0 warning_text: Use google.cloud.gcp_spanner_database and/or google.cloud.gcp_spanner_instance instead. - gem: - redirect: community.general.packaging.language.gem - git_config: - redirect: community.general.source_control.git_config - github_deploy_key: - redirect: community.general.source_control.github.github_deploy_key + packaging.language.gem: + redirect: community.general.gem + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gem + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.git_config: + redirect: community.general.git_config + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.git_config + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.github.github_deploy_key: + redirect: community.general.github_deploy_key + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.github_deploy_key + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. github_hooks: tombstone: removal_version: 2.0.0 warning_text: Use community.general.github_webhook and community.general.github_webhook_info instead. - github_issue: - redirect: community.general.source_control.github.github_issue - github_key: - redirect: community.general.source_control.github.github_key - github_release: - redirect: community.general.source_control.github.github_release - github_repo: - redirect: community.general.source_control.github.github_repo - github_webhook: - redirect: community.general.source_control.github.github_webhook - github_webhook_info: - redirect: community.general.source_control.github.github_webhook_info - gitlab_branch: - redirect: community.general.source_control.gitlab.gitlab_branch - gitlab_deploy_key: - redirect: community.general.source_control.gitlab.gitlab_deploy_key - gitlab_group: - redirect: community.general.source_control.gitlab.gitlab_group - gitlab_group_members: - redirect: community.general.source_control.gitlab.gitlab_group_members - gitlab_group_variable: - redirect: community.general.source_control.gitlab.gitlab_group_variable - gitlab_hook: - redirect: community.general.source_control.gitlab.gitlab_hook - gitlab_project: - redirect: community.general.source_control.gitlab.gitlab_project - gitlab_project_members: - redirect: community.general.source_control.gitlab.gitlab_project_members - gitlab_project_variable: - redirect: community.general.source_control.gitlab.gitlab_project_variable - gitlab_protected_branch: - redirect: community.general.source_control.gitlab.gitlab_protected_branch - gitlab_runner: - redirect: community.general.source_control.gitlab.gitlab_runner - gitlab_user: - redirect: community.general.source_control.gitlab.gitlab_user - grove: - redirect: community.general.notification.grove - gunicorn: - redirect: community.general.web_infrastructure.gunicorn - hana_query: - redirect: community.general.database.saphana.hana_query - haproxy: - redirect: community.general.net_tools.haproxy - heroku_collaborator: - redirect: community.general.cloud.heroku.heroku_collaborator + source_control.github.github_issue: + redirect: community.general.github_issue + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.github_issue + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.github.github_key: + redirect: community.general.github_key + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.github_key + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.github.github_release: + redirect: community.general.github_release + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.github_release + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.github.github_repo: + redirect: community.general.github_repo + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.github_repo + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.github.github_webhook: + redirect: community.general.github_webhook + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.github_webhook + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.github.github_webhook_info: + redirect: community.general.github_webhook_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.github_webhook_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_branch: + redirect: community.general.gitlab_branch + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_branch + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_deploy_key: + redirect: community.general.gitlab_deploy_key + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_deploy_key + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_group: + redirect: community.general.gitlab_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_group_members: + redirect: community.general.gitlab_group_members + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_group_members + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_group_variable: + redirect: community.general.gitlab_group_variable + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_group_variable + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_hook: + redirect: community.general.gitlab_hook + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_hook + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_project: + redirect: community.general.gitlab_project + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_project + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_project_members: + redirect: community.general.gitlab_project_members + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_project_members + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_project_variable: + redirect: community.general.gitlab_project_variable + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_project_variable + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_protected_branch: + redirect: community.general.gitlab_protected_branch + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_protected_branch + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_runner: + redirect: community.general.gitlab_runner + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_runner + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + source_control.gitlab.gitlab_user: + redirect: community.general.gitlab_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gitlab_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.grove: + redirect: community.general.grove + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.grove + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.gunicorn: + redirect: community.general.gunicorn + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.gunicorn + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.saphana.hana_query: + redirect: community.general.hana_query + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hana_query + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.haproxy: + redirect: community.general.haproxy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.haproxy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.heroku.heroku_collaborator: + redirect: community.general.heroku_collaborator + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.heroku_collaborator + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. hetzner_failover_ip: redirect: community.hrobot.failover_ip hetzner_failover_ip_info: @@ -398,230 +980,740 @@ plugin_routing: redirect: community.hrobot.firewall hetzner_firewall_info: redirect: community.hrobot.firewall_info - hg: - redirect: community.general.source_control.hg - hipchat: - redirect: community.general.notification.hipchat - homebrew: - redirect: community.general.packaging.os.homebrew - homebrew_cask: - redirect: community.general.packaging.os.homebrew_cask - homebrew_tap: - redirect: community.general.packaging.os.homebrew_tap - homectl: - redirect: community.general.system.homectl - honeybadger_deployment: - redirect: community.general.monitoring.honeybadger_deployment - hpilo_boot: - redirect: community.general.remote_management.hpilo.hpilo_boot + source_control.hg: + redirect: community.general.hg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.hipchat: + redirect: community.general.hipchat + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hipchat + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.homebrew: + redirect: community.general.homebrew + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.homebrew + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.homebrew_cask: + redirect: community.general.homebrew_cask + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.homebrew_cask + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.homebrew_tap: + redirect: community.general.homebrew_tap + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.homebrew_tap + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.homectl: + redirect: community.general.homectl + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.homectl + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.honeybadger_deployment: + redirect: community.general.honeybadger_deployment + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.honeybadger_deployment + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.hpilo.hpilo_boot: + redirect: community.general.hpilo_boot + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hpilo_boot + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. hpilo_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.hpilo_info instead. - hpilo_info: - redirect: community.general.remote_management.hpilo.hpilo_info - hponcfg: - redirect: community.general.remote_management.hpilo.hponcfg - htpasswd: - redirect: community.general.web_infrastructure.htpasswd - hwc_ecs_instance: - redirect: community.general.cloud.huawei.hwc_ecs_instance - hwc_evs_disk: - redirect: community.general.cloud.huawei.hwc_evs_disk - hwc_network_vpc: - redirect: community.general.cloud.huawei.hwc_network_vpc - hwc_smn_topic: - redirect: community.general.cloud.huawei.hwc_smn_topic - hwc_vpc_eip: - redirect: community.general.cloud.huawei.hwc_vpc_eip - hwc_vpc_peering_connect: - redirect: community.general.cloud.huawei.hwc_vpc_peering_connect - hwc_vpc_port: - redirect: community.general.cloud.huawei.hwc_vpc_port - hwc_vpc_private_ip: - redirect: community.general.cloud.huawei.hwc_vpc_private_ip - hwc_vpc_route: - redirect: community.general.cloud.huawei.hwc_vpc_route - hwc_vpc_security_group: - redirect: community.general.cloud.huawei.hwc_vpc_security_group - hwc_vpc_security_group_rule: - redirect: community.general.cloud.huawei.hwc_vpc_security_group_rule - hwc_vpc_subnet: - redirect: community.general.cloud.huawei.hwc_vpc_subnet - ibm_sa_domain: - redirect: community.general.storage.ibm.ibm_sa_domain - ibm_sa_host: - redirect: community.general.storage.ibm.ibm_sa_host - ibm_sa_host_ports: - redirect: community.general.storage.ibm.ibm_sa_host_ports - ibm_sa_pool: - redirect: community.general.storage.ibm.ibm_sa_pool - ibm_sa_vol: - redirect: community.general.storage.ibm.ibm_sa_vol - ibm_sa_vol_map: - redirect: community.general.storage.ibm.ibm_sa_vol_map - icinga2_feature: - redirect: community.general.monitoring.icinga2_feature - icinga2_host: - redirect: community.general.monitoring.icinga2_host + remote_management.hpilo.hpilo_info: + redirect: community.general.hpilo_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hpilo_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.hpilo.hponcfg: + redirect: community.general.hponcfg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hponcfg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.htpasswd: + redirect: community.general.htpasswd + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.htpasswd + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_ecs_instance: + redirect: community.general.hwc_ecs_instance + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_ecs_instance + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_evs_disk: + redirect: community.general.hwc_evs_disk + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_evs_disk + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_network_vpc: + redirect: community.general.hwc_network_vpc + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_network_vpc + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_smn_topic: + redirect: community.general.hwc_smn_topic + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_smn_topic + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_eip: + redirect: community.general.hwc_vpc_eip + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_eip + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_peering_connect: + redirect: community.general.hwc_vpc_peering_connect + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_peering_connect + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_port: + redirect: community.general.hwc_vpc_port + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_port + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_private_ip: + redirect: community.general.hwc_vpc_private_ip + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_private_ip + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_route: + redirect: community.general.hwc_vpc_route + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_route + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_security_group: + redirect: community.general.hwc_vpc_security_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_security_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_security_group_rule: + redirect: community.general.hwc_vpc_security_group_rule + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_security_group_rule + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.huawei.hwc_vpc_subnet: + redirect: community.general.hwc_vpc_subnet + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.hwc_vpc_subnet + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.ibm.ibm_sa_domain: + redirect: community.general.ibm_sa_domain + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ibm_sa_domain + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.ibm.ibm_sa_host: + redirect: community.general.ibm_sa_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ibm_sa_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.ibm.ibm_sa_host_ports: + redirect: community.general.ibm_sa_host_ports + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ibm_sa_host_ports + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.ibm.ibm_sa_pool: + redirect: community.general.ibm_sa_pool + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ibm_sa_pool + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.ibm.ibm_sa_vol: + redirect: community.general.ibm_sa_vol + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ibm_sa_vol + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.ibm.ibm_sa_vol_map: + redirect: community.general.ibm_sa_vol_map + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ibm_sa_vol_map + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.icinga2_feature: + redirect: community.general.icinga2_feature + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.icinga2_feature + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.icinga2_host: + redirect: community.general.icinga2_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.icinga2_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. idrac_firmware: redirect: dellemc.openmanage.idrac_firmware - idrac_redfish_command: - redirect: community.general.remote_management.redfish.idrac_redfish_command - idrac_redfish_config: - redirect: community.general.remote_management.redfish.idrac_redfish_config + remote_management.redfish.idrac_redfish_command: + redirect: community.general.idrac_redfish_command + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.idrac_redfish_command + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.redfish.idrac_redfish_config: + redirect: community.general.idrac_redfish_config + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.idrac_redfish_config + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. idrac_redfish_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.idrac_redfish_info instead. - idrac_redfish_info: - redirect: community.general.remote_management.redfish.idrac_redfish_info + remote_management.redfish.idrac_redfish_info: + redirect: community.general.idrac_redfish_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.idrac_redfish_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. idrac_server_config_profile: redirect: dellemc.openmanage.idrac_server_config_profile - ilo_redfish_config: - redirect: community.general.remote_management.redfish.ilo_redfish_config - ilo_redfish_info: - redirect: community.general.remote_management.redfish.ilo_redfish_info - imc_rest: - redirect: community.general.remote_management.imc.imc_rest - imgadm: - redirect: community.general.cloud.smartos.imgadm - infinity: - redirect: community.general.net_tools.infinity.infinity - influxdb_database: - redirect: community.general.database.influxdb.influxdb_database - influxdb_query: - redirect: community.general.database.influxdb.influxdb_query - influxdb_retention_policy: - redirect: community.general.database.influxdb.influxdb_retention_policy - influxdb_user: - redirect: community.general.database.influxdb.influxdb_user - influxdb_write: - redirect: community.general.database.influxdb.influxdb_write - ini_file: - redirect: community.general.files.ini_file - installp: - redirect: community.general.packaging.os.installp - interfaces_file: - redirect: community.general.system.interfaces_file - ip_netns: - redirect: community.general.net_tools.ip_netns - ipa_config: - redirect: community.general.identity.ipa.ipa_config - ipa_dnsrecord: - redirect: community.general.identity.ipa.ipa_dnsrecord - ipa_dnszone: - redirect: community.general.identity.ipa.ipa_dnszone - ipa_group: - redirect: community.general.identity.ipa.ipa_group - ipa_hbacrule: - redirect: community.general.identity.ipa.ipa_hbacrule - ipa_host: - redirect: community.general.identity.ipa.ipa_host - ipa_hostgroup: - redirect: community.general.identity.ipa.ipa_hostgroup - ipa_otpconfig: - redirect: community.general.identity.ipa.ipa_otpconfig - ipa_otptoken: - redirect: community.general.identity.ipa.ipa_otptoken - ipa_pwpolicy: - redirect: community.general.identity.ipa.ipa_pwpolicy - ipa_role: - redirect: community.general.identity.ipa.ipa_role - ipa_service: - redirect: community.general.identity.ipa.ipa_service - ipa_subca: - redirect: community.general.identity.ipa.ipa_subca - ipa_sudocmd: - redirect: community.general.identity.ipa.ipa_sudocmd - ipa_sudocmdgroup: - redirect: community.general.identity.ipa.ipa_sudocmdgroup - ipa_sudorule: - redirect: community.general.identity.ipa.ipa_sudorule - ipa_user: - redirect: community.general.identity.ipa.ipa_user - ipa_vault: - redirect: community.general.identity.ipa.ipa_vault - ipify_facts: - redirect: community.general.net_tools.ipify_facts - ipinfoio_facts: - redirect: community.general.net_tools.ipinfoio_facts - ipmi_boot: - redirect: community.general.remote_management.ipmi.ipmi_boot - ipmi_power: - redirect: community.general.remote_management.ipmi.ipmi_power - iptables_state: - redirect: community.general.system.iptables_state - ipwcli_dns: - redirect: community.general.net_tools.ipwcli_dns - irc: - redirect: community.general.notification.irc - iso_create: - redirect: community.general.files.iso_create - iso_extract: - redirect: community.general.files.iso_extract - iso_customize: - redirect: community.general.files.iso_customize - jabber: - redirect: community.general.notification.jabber - java_cert: - redirect: community.general.system.java_cert - java_keystore: - redirect: community.general.system.java_keystore - jboss: - redirect: community.general.web_infrastructure.jboss - jenkins_build: - redirect: community.general.web_infrastructure.jenkins_build - jenkins_job: - redirect: community.general.web_infrastructure.jenkins_job + remote_management.redfish.ilo_redfish_config: + redirect: community.general.ilo_redfish_config + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ilo_redfish_config + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.redfish.ilo_redfish_info: + redirect: community.general.ilo_redfish_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ilo_redfish_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.imc.imc_rest: + redirect: community.general.imc_rest + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.imc_rest + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.smartos.imgadm: + redirect: community.general.imgadm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.imgadm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.infinity.infinity: + redirect: community.general.infinity + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.infinity + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.influxdb.influxdb_database: + redirect: community.general.influxdb_database + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.influxdb_database + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.influxdb.influxdb_query: + redirect: community.general.influxdb_query + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.influxdb_query + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.influxdb.influxdb_retention_policy: + redirect: community.general.influxdb_retention_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.influxdb_retention_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.influxdb.influxdb_user: + redirect: community.general.influxdb_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.influxdb_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.influxdb.influxdb_write: + redirect: community.general.influxdb_write + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.influxdb_write + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.ini_file: + redirect: community.general.ini_file + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ini_file + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.installp: + redirect: community.general.installp + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.installp + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.interfaces_file: + redirect: community.general.interfaces_file + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.interfaces_file + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.ip_netns: + redirect: community.general.ip_netns + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ip_netns + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_config: + redirect: community.general.ipa_config + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_config + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_dnsrecord: + redirect: community.general.ipa_dnsrecord + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_dnsrecord + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_dnszone: + redirect: community.general.ipa_dnszone + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_dnszone + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_group: + redirect: community.general.ipa_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_hbacrule: + redirect: community.general.ipa_hbacrule + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_hbacrule + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_host: + redirect: community.general.ipa_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_hostgroup: + redirect: community.general.ipa_hostgroup + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_hostgroup + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_otpconfig: + redirect: community.general.ipa_otpconfig + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_otpconfig + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_otptoken: + redirect: community.general.ipa_otptoken + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_otptoken + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_pwpolicy: + redirect: community.general.ipa_pwpolicy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_pwpolicy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_role: + redirect: community.general.ipa_role + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_role + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_service: + redirect: community.general.ipa_service + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_service + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_subca: + redirect: community.general.ipa_subca + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_subca + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_sudocmd: + redirect: community.general.ipa_sudocmd + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_sudocmd + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_sudocmdgroup: + redirect: community.general.ipa_sudocmdgroup + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_sudocmdgroup + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_sudorule: + redirect: community.general.ipa_sudorule + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_sudorule + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_user: + redirect: community.general.ipa_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.ipa.ipa_vault: + redirect: community.general.ipa_vault + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipa_vault + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.ipify_facts: + redirect: community.general.ipify_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipify_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.ipinfoio_facts: + redirect: community.general.ipinfoio_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipinfoio_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.ipmi.ipmi_boot: + redirect: community.general.ipmi_boot + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipmi_boot + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.ipmi.ipmi_power: + redirect: community.general.ipmi_power + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipmi_power + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.iptables_state: + redirect: community.general.iptables_state + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.iptables_state + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.ipwcli_dns: + redirect: community.general.ipwcli_dns + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ipwcli_dns + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.irc: + redirect: community.general.irc + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.irc + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.iso_create: + redirect: community.general.iso_create + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.iso_create + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.iso_extract: + redirect: community.general.iso_extract + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.iso_extract + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.iso_customize: + redirect: community.general.iso_customize + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.iso_customize + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.jabber: + redirect: community.general.jabber + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jabber + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.java_cert: + redirect: community.general.java_cert + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.java_cert + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.java_keystore: + redirect: community.general.java_keystore + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.java_keystore + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.jboss: + redirect: community.general.jboss + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jboss + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.jenkins_build: + redirect: community.general.jenkins_build + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jenkins_build + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.jenkins_job: + redirect: community.general.jenkins_job + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jenkins_job + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. jenkins_job_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.jenkins_job_info instead. - jenkins_job_info: - redirect: community.general.web_infrastructure.jenkins_job_info - jenkins_plugin: - redirect: community.general.web_infrastructure.jenkins_plugin - jenkins_script: - redirect: community.general.web_infrastructure.jenkins_script - jira: - redirect: community.general.web_infrastructure.jira + web_infrastructure.jenkins_job_info: + redirect: community.general.jenkins_job_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jenkins_job_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.jenkins_plugin: + redirect: community.general.jenkins_plugin + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jenkins_plugin + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.jenkins_script: + redirect: community.general.jenkins_script + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jenkins_script + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.jira: + redirect: community.general.jira + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.jira + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. katello: tombstone: removal_version: 2.0.0 warning_text: Use the modules from the theforeman.foreman collection instead. - kernel_blacklist: - redirect: community.general.system.kernel_blacklist - keycloak_authentication: - redirect: community.general.identity.keycloak.keycloak_authentication - keycloak_client: - redirect: community.general.identity.keycloak.keycloak_client - keycloak_client_rolemapping: - redirect: community.general.identity.keycloak.keycloak_client_rolemapping - keycloak_clientscope: - redirect: community.general.identity.keycloak.keycloak_clientscope - keycloak_clienttemplate: - redirect: community.general.identity.keycloak.keycloak_clienttemplate - keycloak_group: - redirect: community.general.identity.keycloak.keycloak_group - keycloak_identity_provider: - redirect: community.general.identity.keycloak.keycloak_identity_provider - keycloak_realm: - redirect: community.general.identity.keycloak.keycloak_realm - keycloak_realm_info: - redirect: community.general.identity.keycloak.keycloak_realm_info - keycloak_role: - redirect: community.general.identity.keycloak.keycloak_role - keycloak_user_federation: - redirect: community.general.identity.keycloak.keycloak_user_federation - keycloak_user_rolemapping: - redirect: community.general.identity.keycloak.keycloak_user_rolemapping - keyring: - redirect: community.general.system.keyring - keyring_info: - redirect: community.general.system.keyring_info - kibana_plugin: - redirect: community.general.database.misc.kibana_plugin + system.kernel_blacklist: + redirect: community.general.kernel_blacklist + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.kernel_blacklist + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_authentication: + redirect: community.general.keycloak_authentication + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_authentication + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_client: + redirect: community.general.keycloak_client + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_client + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_client_rolemapping: + redirect: community.general.keycloak_client_rolemapping + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_client_rolemapping + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_clientscope: + redirect: community.general.keycloak_clientscope + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_clientscope + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_clienttemplate: + redirect: community.general.keycloak_clienttemplate + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_clienttemplate + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_group: + redirect: community.general.keycloak_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_identity_provider: + redirect: community.general.keycloak_identity_provider + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_identity_provider + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_realm: + redirect: community.general.keycloak_realm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_realm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_realm_info: + redirect: community.general.keycloak_realm_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_realm_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_role: + redirect: community.general.keycloak_role + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_role + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_user_federation: + redirect: community.general.keycloak_user_federation + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_user_federation + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.keycloak.keycloak_user_rolemapping: + redirect: community.general.keycloak_user_rolemapping + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keycloak_user_rolemapping + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.keyring: + redirect: community.general.keyring + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keyring + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.keyring_info: + redirect: community.general.keyring_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.keyring_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.kibana_plugin: + redirect: community.general.kibana_plugin + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.kibana_plugin + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. kubevirt_cdi_upload: redirect: community.kubevirt.kubevirt_cdi_upload kubevirt_preset: @@ -634,40 +1726,115 @@ plugin_routing: redirect: community.kubevirt.kubevirt_template kubevirt_vm: redirect: community.kubevirt.kubevirt_vm - launchd: - redirect: community.general.system.launchd - layman: - redirect: community.general.packaging.os.layman - lbu: - redirect: community.general.system.lbu + system.launchd: + redirect: community.general.launchd + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.launchd + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.layman: + redirect: community.general.layman + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.layman + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.lbu: + redirect: community.general.lbu + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lbu + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. ldap_attr: tombstone: removal_version: 3.0.0 warning_text: Use community.general.ldap_attrs instead. - ldap_attrs: - redirect: community.general.net_tools.ldap.ldap_attrs - ldap_entry: - redirect: community.general.net_tools.ldap.ldap_entry - ldap_passwd: - redirect: community.general.net_tools.ldap.ldap_passwd - ldap_search: - redirect: community.general.net_tools.ldap.ldap_search - librato_annotation: - redirect: community.general.monitoring.librato_annotation - linode: - redirect: community.general.cloud.linode.linode - linode_v4: - redirect: community.general.cloud.linode.linode_v4 - listen_ports_facts: - redirect: community.general.system.listen_ports_facts - lldp: - redirect: community.general.net_tools.lldp - locale_gen: - redirect: community.general.system.locale_gen - logentries: - redirect: community.general.monitoring.logentries - logentries_msg: - redirect: community.general.notification.logentries_msg + net_tools.ldap.ldap_attrs: + redirect: community.general.ldap_attrs + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ldap_attrs + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.ldap.ldap_entry: + redirect: community.general.ldap_entry + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ldap_entry + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.ldap.ldap_passwd: + redirect: community.general.ldap_passwd + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ldap_passwd + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.ldap.ldap_search: + redirect: community.general.ldap_search + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ldap_search + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.librato_annotation: + redirect: community.general.librato_annotation + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.librato_annotation + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.linode.linode: + redirect: community.general.linode + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.linode + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.linode.linode_v4: + redirect: community.general.linode_v4 + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.linode_v4 + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.listen_ports_facts: + redirect: community.general.listen_ports_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.listen_ports_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.lldp: + redirect: community.general.lldp + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lldp + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.locale_gen: + redirect: community.general.locale_gen + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.locale_gen + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.logentries: + redirect: community.general.logentries + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.logentries + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.logentries_msg: + redirect: community.general.logentries_msg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.logentries_msg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. logicmonitor: tombstone: removal_version: 1.0.0 @@ -678,90 +1845,280 @@ plugin_routing: removal_version: 1.0.0 warning_text: The logicmonitor_facts module is no longer maintained and the API used has been disabled in 2017. - logstash_plugin: - redirect: community.general.monitoring.logstash_plugin - lvg: - redirect: community.general.system.lvg - lvol: - redirect: community.general.system.lvol - lxc_container: - redirect: community.general.cloud.lxc.lxc_container - lxca_cmms: - redirect: community.general.remote_management.lxca.lxca_cmms - lxca_nodes: - redirect: community.general.remote_management.lxca.lxca_nodes - lxd_container: - redirect: community.general.cloud.lxd.lxd_container - lxd_profile: - redirect: community.general.cloud.lxd.lxd_profile - lxd_project: - redirect: community.general.cloud.lxd.lxd_project - macports: - redirect: community.general.packaging.os.macports - mail: - redirect: community.general.notification.mail - make: - redirect: community.general.system.make - manageiq_alert_profiles: - redirect: community.general.remote_management.manageiq.manageiq_alert_profiles - manageiq_alerts: - redirect: community.general.remote_management.manageiq.manageiq_alerts - manageiq_group: - redirect: community.general.remote_management.manageiq.manageiq_group - manageiq_policies: - redirect: community.general.remote_management.manageiq.manageiq_policies - manageiq_policies_info: - redirect: community.general.remote_management.manageiq.manageiq_policies_info - manageiq_provider: - redirect: community.general.remote_management.manageiq.manageiq_provider - manageiq_tags: - redirect: community.general.remote_management.manageiq.manageiq_tags - manageiq_tags_info: - redirect: community.general.remote_management.manageiq.manageiq_tags_info - manageiq_tenant: - redirect: community.general.remote_management.manageiq.manageiq_tenant - manageiq_user: - redirect: community.general.remote_management.manageiq.manageiq_user - mas: - redirect: community.general.packaging.os.mas - matrix: - redirect: community.general.notification.matrix - mattermost: - redirect: community.general.notification.mattermost - maven_artifact: - redirect: community.general.packaging.language.maven_artifact - memset_dns_reload: - redirect: community.general.cloud.memset.memset_dns_reload + monitoring.logstash_plugin: + redirect: community.general.logstash_plugin + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.logstash_plugin + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.lvg: + redirect: community.general.lvg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lvg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.lvol: + redirect: community.general.lvol + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lvol + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.lxc.lxc_container: + redirect: community.general.lxc_container + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lxc_container + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.lxca.lxca_cmms: + redirect: community.general.lxca_cmms + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lxca_cmms + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.lxca.lxca_nodes: + redirect: community.general.lxca_nodes + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lxca_nodes + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.lxd.lxd_container: + redirect: community.general.lxd_container + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lxd_container + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.lxd.lxd_profile: + redirect: community.general.lxd_profile + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lxd_profile + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.lxd.lxd_project: + redirect: community.general.lxd_project + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.lxd_project + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.macports: + redirect: community.general.macports + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.macports + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.mail: + redirect: community.general.mail + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.mail + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.make: + redirect: community.general.make + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.make + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_alert_profiles: + redirect: community.general.manageiq_alert_profiles + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_alert_profiles + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_alerts: + redirect: community.general.manageiq_alerts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_alerts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_group: + redirect: community.general.manageiq_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_policies: + redirect: community.general.manageiq_policies + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_policies + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_policies_info: + redirect: community.general.manageiq_policies_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_policies_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_provider: + redirect: community.general.manageiq_provider + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_provider + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_tags: + redirect: community.general.manageiq_tags + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_tags + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_tags_info: + redirect: community.general.manageiq_tags_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_tags_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_tenant: + redirect: community.general.manageiq_tenant + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_tenant + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.manageiq.manageiq_user: + redirect: community.general.manageiq_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.manageiq_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.mas: + redirect: community.general.mas + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.mas + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.matrix: + redirect: community.general.matrix + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.matrix + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.mattermost: + redirect: community.general.mattermost + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.mattermost + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.maven_artifact: + redirect: community.general.maven_artifact + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.maven_artifact + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.memset.memset_dns_reload: + redirect: community.general.memset_dns_reload + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.memset_dns_reload + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. memset_memstore_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.memset_memstore_info instead. - memset_memstore_info: - redirect: community.general.cloud.memset.memset_memstore_info + cloud.memset.memset_memstore_info: + redirect: community.general.memset_memstore_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.memset_memstore_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. memset_server_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.memset_server_info instead. - memset_server_info: - redirect: community.general.cloud.memset.memset_server_info - memset_zone: - redirect: community.general.cloud.memset.memset_zone - memset_zone_domain: - redirect: community.general.cloud.memset.memset_zone_domain - memset_zone_record: - redirect: community.general.cloud.memset.memset_zone_record - mksysb: - redirect: community.general.system.mksysb - modprobe: - redirect: community.general.system.modprobe - monit: - redirect: community.general.monitoring.monit - mqtt: - redirect: community.general.notification.mqtt - mssql_db: - redirect: community.general.database.mssql.mssql_db - mssql_script: - redirect: community.general.database.mssql.mssql_script + cloud.memset.memset_server_info: + redirect: community.general.memset_server_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.memset_server_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.memset.memset_zone: + redirect: community.general.memset_zone + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.memset_zone + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.memset.memset_zone_domain: + redirect: community.general.memset_zone_domain + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.memset_zone_domain + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.memset.memset_zone_record: + redirect: community.general.memset_zone_record + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.memset_zone_record + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.mksysb: + redirect: community.general.mksysb + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.mksysb + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.modprobe: + redirect: community.general.modprobe + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.modprobe + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.monit: + redirect: community.general.monit + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.monit + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.mqtt: + redirect: community.general.mqtt + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.mqtt + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.mssql.mssql_db: + redirect: community.general.mssql_db + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.mssql_db + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.mssql.mssql_script: + redirect: community.general.mssql_script + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.mssql_script + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. na_cdot_aggregate: tombstone: removal_version: 2.0.0 @@ -798,22 +2155,52 @@ plugin_routing: tombstone: removal_version: 3.0.0 warning_text: Use netapp.ontap.na_ontap_info instead. - nagios: - redirect: community.general.monitoring.nagios - netcup_dns: - redirect: community.general.net_tools.netcup_dns - newrelic_deployment: - redirect: community.general.monitoring.newrelic_deployment - nexmo: - redirect: community.general.notification.nexmo + monitoring.nagios: + redirect: community.general.nagios + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nagios + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.netcup_dns: + redirect: community.general.netcup_dns + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.netcup_dns + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.newrelic_deployment: + redirect: community.general.newrelic_deployment + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.newrelic_deployment + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.nexmo: + redirect: community.general.nexmo + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nexmo + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. nginx_status_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.nginx_status_info instead. - nginx_status_info: - redirect: community.general.web_infrastructure.nginx_status_info - nictagadm: - redirect: community.general.cloud.smartos.nictagadm + web_infrastructure.nginx_status_info: + redirect: community.general.nginx_status_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nginx_status_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.smartos.nictagadm: + redirect: community.general.nictagadm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nictagadm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. nios_a_record: redirect: infoblox.nios_modules.nios_a_record nios_aaaa_record: @@ -846,157 +2233,400 @@ plugin_routing: redirect: infoblox.nios_modules.nios_txt_record nios_zone: redirect: infoblox.nios_modules.nios_zone - nmcli: - redirect: community.general.net_tools.nmcli - nomad_job: - redirect: community.general.clustering.nomad.nomad_job - nomad_job_info: - redirect: community.general.clustering.nomad.nomad_job_info - nosh: - redirect: community.general.system.nosh - notification.cisco_spark: - redirect: community.general.notification.cisco_webex - npm: - redirect: community.general.packaging.language.npm - nsupdate: - redirect: community.general.net_tools.nsupdate - oci_vcn: - redirect: community.general.cloud.oracle.oci_vcn - odbc: - redirect: community.general.database.misc.odbc - office_365_connector_card: - redirect: community.general.notification.office_365_connector_card - ohai: - redirect: community.general.system.ohai - omapi_host: - redirect: community.general.net_tools.omapi_host + net_tools.nmcli: + redirect: community.general.nmcli + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nmcli + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.nomad.nomad_job: + redirect: community.general.nomad_job + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nomad_job + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.nomad.nomad_job_info: + redirect: community.general.nomad_job_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nomad_job_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.nosh: + redirect: community.general.nosh + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nosh + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.npm: + redirect: community.general.npm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.npm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.nsupdate: + redirect: community.general.nsupdate + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.nsupdate + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.oracle.oci_vcn: + redirect: community.general.oci_vcn + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oci_vcn + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.odbc: + redirect: community.general.odbc + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.odbc + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.office_365_connector_card: + redirect: community.general.office_365_connector_card + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.office_365_connector_card + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.ohai: + redirect: community.general.ohai + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ohai + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.omapi_host: + redirect: community.general.omapi_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.omapi_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. ome_device_info: redirect: dellemc.openmanage.ome_device_info - one_host: - redirect: community.general.cloud.opennebula.one_host - one_image: - redirect: community.general.cloud.opennebula.one_image + cloud.opennebula.one_host: + redirect: community.general.one_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.one_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.opennebula.one_image: + redirect: community.general.one_image + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.one_image + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. one_image_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.one_image_info instead. - one_image_info: - redirect: community.general.cloud.opennebula.one_image_info - one_service: - redirect: community.general.cloud.opennebula.one_service - one_template: - redirect: community.general.cloud.opennebula.one_template - one_vm: - redirect: community.general.cloud.opennebula.one_vm - oneandone_firewall_policy: - redirect: community.general.cloud.oneandone.oneandone_firewall_policy - oneandone_load_balancer: - redirect: community.general.cloud.oneandone.oneandone_load_balancer - oneandone_monitoring_policy: - redirect: community.general.cloud.oneandone.oneandone_monitoring_policy - oneandone_private_network: - redirect: community.general.cloud.oneandone.oneandone_private_network - oneandone_public_ip: - redirect: community.general.cloud.oneandone.oneandone_public_ip - oneandone_server: - redirect: community.general.cloud.oneandone.oneandone_server + cloud.opennebula.one_image_info: + redirect: community.general.one_image_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.one_image_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.opennebula.one_service: + redirect: community.general.one_service + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.one_service + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.opennebula.one_template: + redirect: community.general.one_template + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.one_template + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.opennebula.one_vm: + redirect: community.general.one_vm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.one_vm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.oneandone.oneandone_firewall_policy: + redirect: community.general.oneandone_firewall_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneandone_firewall_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.oneandone.oneandone_load_balancer: + redirect: community.general.oneandone_load_balancer + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneandone_load_balancer + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.oneandone.oneandone_monitoring_policy: + redirect: community.general.oneandone_monitoring_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneandone_monitoring_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.oneandone.oneandone_private_network: + redirect: community.general.oneandone_private_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneandone_private_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.oneandone.oneandone_public_ip: + redirect: community.general.oneandone_public_ip + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneandone_public_ip + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.oneandone.oneandone_server: + redirect: community.general.oneandone_server + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneandone_server + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. onepassword_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.onepassword_info instead. - onepassword_info: - redirect: community.general.identity.onepassword_info + identity.onepassword_info: + redirect: community.general.onepassword_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.onepassword_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_datacenter_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_datacenter_info instead. - oneview_datacenter_info: - redirect: community.general.remote_management.oneview.oneview_datacenter_info + remote_management.oneview.oneview_datacenter_info: + redirect: community.general.oneview_datacenter_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_datacenter_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_enclosure_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_enclosure_info instead. - oneview_enclosure_info: - redirect: community.general.remote_management.oneview.oneview_enclosure_info - oneview_ethernet_network: - redirect: community.general.remote_management.oneview.oneview_ethernet_network + remote_management.oneview.oneview_enclosure_info: + redirect: community.general.oneview_enclosure_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_enclosure_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.oneview.oneview_ethernet_network: + redirect: community.general.oneview_ethernet_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_ethernet_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_ethernet_network_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_ethernet_network_info instead. - oneview_ethernet_network_info: - redirect: community.general.remote_management.oneview.oneview_ethernet_network_info - oneview_fc_network: - redirect: community.general.remote_management.oneview.oneview_fc_network + remote_management.oneview.oneview_ethernet_network_info: + redirect: community.general.oneview_ethernet_network_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_ethernet_network_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.oneview.oneview_fc_network: + redirect: community.general.oneview_fc_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_fc_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_fc_network_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_fc_network_info instead. - oneview_fc_network_info: - redirect: community.general.remote_management.oneview.oneview_fc_network_info - oneview_fcoe_network: - redirect: community.general.remote_management.oneview.oneview_fcoe_network + remote_management.oneview.oneview_fc_network_info: + redirect: community.general.oneview_fc_network_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_fc_network_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.oneview.oneview_fcoe_network: + redirect: community.general.oneview_fcoe_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_fcoe_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_fcoe_network_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_fcoe_network_info instead. - oneview_fcoe_network_info: - redirect: community.general.remote_management.oneview.oneview_fcoe_network_info - oneview_logical_interconnect_group: - redirect: community.general.remote_management.oneview.oneview_logical_interconnect_group + remote_management.oneview.oneview_fcoe_network_info: + redirect: community.general.oneview_fcoe_network_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_fcoe_network_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.oneview.oneview_logical_interconnect_group: + redirect: community.general.oneview_logical_interconnect_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_logical_interconnect_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_logical_interconnect_group_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_logical_interconnect_group_info instead. - oneview_logical_interconnect_group_info: - redirect: community.general.remote_management.oneview.oneview_logical_interconnect_group_info - oneview_network_set: - redirect: community.general.remote_management.oneview.oneview_network_set + remote_management.oneview.oneview_logical_interconnect_group_info: + redirect: community.general.oneview_logical_interconnect_group_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_logical_interconnect_group_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.oneview.oneview_network_set: + redirect: community.general.oneview_network_set + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_network_set + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_network_set_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_network_set_info instead. - oneview_network_set_info: - redirect: community.general.remote_management.oneview.oneview_network_set_info - oneview_san_manager: - redirect: community.general.remote_management.oneview.oneview_san_manager + remote_management.oneview.oneview_network_set_info: + redirect: community.general.oneview_network_set_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_network_set_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.oneview.oneview_san_manager: + redirect: community.general.oneview_san_manager + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_san_manager + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. oneview_san_manager_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.oneview_san_manager_info instead. - oneview_san_manager_info: - redirect: community.general.remote_management.oneview.oneview_san_manager_info + remote_management.oneview.oneview_san_manager_info: + redirect: community.general.oneview_san_manager_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.oneview_san_manager_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. online_server_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.online_server_info instead. - online_server_info: - redirect: community.general.cloud.online.online_server_info + cloud.online.online_server_info: + redirect: community.general.online_server_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.online_server_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. online_user_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.online_user_info instead. - online_user_info: - redirect: community.general.cloud.online.online_user_info - open_iscsi: - redirect: community.general.system.open_iscsi - openbsd_pkg: - redirect: community.general.packaging.os.openbsd_pkg - opendj_backendprop: - redirect: community.general.identity.opendj.opendj_backendprop - openwrt_init: - redirect: community.general.system.openwrt_init - opkg: - redirect: community.general.packaging.os.opkg - osx_defaults: - redirect: community.general.system.osx_defaults - ovh_ip_failover: - redirect: community.general.cloud.ovh.ovh_ip_failover - ovh_ip_loadbalancing_backend: - redirect: community.general.cloud.ovh.ovh_ip_loadbalancing_backend - ovh_monthly_billing: - redirect: community.general.cloud.ovh.ovh_monthly_billing + cloud.online.online_user_info: + redirect: community.general.online_user_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.online_user_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.open_iscsi: + redirect: community.general.open_iscsi + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.open_iscsi + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.openbsd_pkg: + redirect: community.general.openbsd_pkg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.openbsd_pkg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + identity.opendj.opendj_backendprop: + redirect: community.general.opendj_backendprop + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.opendj_backendprop + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.openwrt_init: + redirect: community.general.openwrt_init + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.openwrt_init + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.opkg: + redirect: community.general.opkg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.opkg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.osx_defaults: + redirect: community.general.osx_defaults + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.osx_defaults + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.ovh.ovh_ip_failover: + redirect: community.general.ovh_ip_failover + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ovh_ip_failover + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.ovh.ovh_ip_loadbalancing_backend: + redirect: community.general.ovh_ip_loadbalancing_backend + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ovh_ip_loadbalancing_backend + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.ovh.ovh_monthly_billing: + redirect: community.general.ovh_monthly_billing + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ovh_monthly_billing + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. ovirt: tombstone: removal_version: 3.0.0 @@ -1097,66 +2727,216 @@ plugin_routing: tombstone: removal_version: 3.0.0 warning_text: Use ovirt.ovirt.ovirt_vmpool_info instead. - pacemaker_cluster: - redirect: community.general.clustering.pacemaker_cluster - packet_device: - redirect: community.general.cloud.packet.packet_device - packet_ip_subnet: - redirect: community.general.cloud.packet.packet_ip_subnet - packet_project: - redirect: community.general.cloud.packet.packet_project - packet_sshkey: - redirect: community.general.cloud.packet.packet_sshkey - packet_volume: - redirect: community.general.cloud.packet.packet_volume - packet_volume_attachment: - redirect: community.general.cloud.packet.packet_volume_attachment - pacman: - redirect: community.general.packaging.os.pacman - pacman_key: - redirect: community.general.packaging.os.pacman_key - pagerduty: - redirect: community.general.monitoring.pagerduty - pagerduty_alert: - redirect: community.general.monitoring.pagerduty_alert - pagerduty_change: - redirect: community.general.monitoring.pagerduty_change - pagerduty_user: - redirect: community.general.monitoring.pagerduty_user - pam_limits: - redirect: community.general.system.pam_limits - pamd: - redirect: community.general.system.pamd - parted: - redirect: community.general.system.parted - pear: - redirect: community.general.packaging.language.pear - pids: - redirect: community.general.system.pids - pingdom: - redirect: community.general.monitoring.pingdom - pip_package_info: - redirect: community.general.packaging.language.pip_package_info - pipx: - redirect: community.general.packaging.language.pipx - pipx_info: - redirect: community.general.packaging.language.pipx_info - pkg5: - redirect: community.general.packaging.os.pkg5 - pkg5_publisher: - redirect: community.general.packaging.os.pkg5_publisher - pkgin: - redirect: community.general.packaging.os.pkgin - pkgng: - redirect: community.general.packaging.os.pkgng - pkgutil: - redirect: community.general.packaging.os.pkgutil - pmem: - redirect: community.general.storage.pmem.pmem - portage: - redirect: community.general.packaging.os.portage - portinstall: - redirect: community.general.packaging.os.portinstall + clustering.pacemaker_cluster: + redirect: community.general.pacemaker_cluster + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pacemaker_cluster + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.packet.packet_device: + redirect: community.general.packet_device + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.packet_device + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.packet.packet_ip_subnet: + redirect: community.general.packet_ip_subnet + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.packet_ip_subnet + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.packet.packet_project: + redirect: community.general.packet_project + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.packet_project + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.packet.packet_sshkey: + redirect: community.general.packet_sshkey + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.packet_sshkey + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.packet.packet_volume: + redirect: community.general.packet_volume + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.packet_volume + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.packet.packet_volume_attachment: + redirect: community.general.packet_volume_attachment + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.packet_volume_attachment + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pacman: + redirect: community.general.pacman + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pacman + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pacman_key: + redirect: community.general.pacman_key + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pacman_key + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.pagerduty: + redirect: community.general.pagerduty + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pagerduty + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.pagerduty_alert: + redirect: community.general.pagerduty_alert + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pagerduty_alert + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.pagerduty_change: + redirect: community.general.pagerduty_change + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pagerduty_change + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.pagerduty_user: + redirect: community.general.pagerduty_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pagerduty_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.pam_limits: + redirect: community.general.pam_limits + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pam_limits + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.pamd: + redirect: community.general.pamd + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pamd + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.parted: + redirect: community.general.parted + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.parted + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.pear: + redirect: community.general.pear + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pear + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.pids: + redirect: community.general.pids + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pids + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.pingdom: + redirect: community.general.pingdom + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pingdom + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.pip_package_info: + redirect: community.general.pip_package_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pip_package_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.pipx: + redirect: community.general.pipx + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pipx + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.pipx_info: + redirect: community.general.pipx_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pipx_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pkg5: + redirect: community.general.pkg5 + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pkg5 + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pkg5_publisher: + redirect: community.general.pkg5_publisher + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pkg5_publisher + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pkgin: + redirect: community.general.pkgin + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pkgin + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pkgng: + redirect: community.general.pkgng + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pkgng + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pkgutil: + redirect: community.general.pkgutil + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pkgutil + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.pmem.pmem: + redirect: community.general.pmem + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pmem + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.portage: + redirect: community.general.portage + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.portage + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.portinstall: + redirect: community.general.portinstall + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.portinstall + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. postgresql_copy: redirect: community.postgresql.postgresql_copy postgresql_db: @@ -1201,52 +2981,167 @@ plugin_routing: redirect: community.postgresql.postgresql_user postgresql_user_obj_stat_info: redirect: community.postgresql.postgresql_user_obj_stat_info - pritunl_org: - redirect: community.general.net_tools.pritunl.pritunl_org - pritunl_org_info: - redirect: community.general.net_tools.pritunl.pritunl_org_info - pritunl_user: - redirect: community.general.net_tools.pritunl.pritunl_user - pritunl_user_info: - redirect: community.general.net_tools.pritunl.pritunl_user_info - profitbricks: - redirect: community.general.cloud.profitbricks.profitbricks - profitbricks_datacenter: - redirect: community.general.cloud.profitbricks.profitbricks_datacenter - profitbricks_nic: - redirect: community.general.cloud.profitbricks.profitbricks_nic - profitbricks_volume: - redirect: community.general.cloud.profitbricks.profitbricks_volume - profitbricks_volume_attachments: - redirect: community.general.cloud.profitbricks.profitbricks_volume_attachments - proxmox: - redirect: community.general.cloud.misc.proxmox - proxmox_disk: - redirect: community.general.cloud.misc.proxmox_disk - proxmox_domain_info: - redirect: community.general.cloud.misc.proxmox_domain_info - proxmox_group_info: - redirect: community.general.cloud.misc.proxmox_group_info - proxmox_kvm: - redirect: community.general.cloud.misc.proxmox_kvm - proxmox_nic: - redirect: community.general.cloud.misc.proxmox_nic - proxmox_snap: - redirect: community.general.cloud.misc.proxmox_snap - proxmox_storage_info: - redirect: community.general.cloud.misc.proxmox_storage_info - proxmox_tasks_info: - redirect: community.general.cloud.misc.proxmox_tasks_info - proxmox_template: - redirect: community.general.cloud.misc.proxmox_template - proxmox_user_info: - redirect: community.general.cloud.misc.proxmox_user_info - pubnub_blocks: - redirect: community.general.cloud.pubnub.pubnub_blocks - pulp_repo: - redirect: community.general.packaging.os.pulp_repo - puppet: - redirect: community.general.system.puppet + net_tools.pritunl.pritunl_org: + redirect: community.general.pritunl_org + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pritunl_org + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.pritunl.pritunl_org_info: + redirect: community.general.pritunl_org_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pritunl_org_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.pritunl.pritunl_user: + redirect: community.general.pritunl_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pritunl_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.pritunl.pritunl_user_info: + redirect: community.general.pritunl_user_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pritunl_user_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.profitbricks.profitbricks: + redirect: community.general.profitbricks + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.profitbricks + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.profitbricks.profitbricks_datacenter: + redirect: community.general.profitbricks_datacenter + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.profitbricks_datacenter + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.profitbricks.profitbricks_nic: + redirect: community.general.profitbricks_nic + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.profitbricks_nic + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.profitbricks.profitbricks_volume: + redirect: community.general.profitbricks_volume + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.profitbricks_volume + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.profitbricks.profitbricks_volume_attachments: + redirect: community.general.profitbricks_volume_attachments + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.profitbricks_volume_attachments + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox: + redirect: community.general.proxmox + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_disk: + redirect: community.general.proxmox_disk + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_disk + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_domain_info: + redirect: community.general.proxmox_domain_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_domain_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_group_info: + redirect: community.general.proxmox_group_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_group_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_kvm: + redirect: community.general.proxmox_kvm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_kvm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_nic: + redirect: community.general.proxmox_nic + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_nic + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_snap: + redirect: community.general.proxmox_snap + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_snap + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_storage_info: + redirect: community.general.proxmox_storage_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_storage_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_tasks_info: + redirect: community.general.proxmox_tasks_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_tasks_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_template: + redirect: community.general.proxmox_template + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_template + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.proxmox_user_info: + redirect: community.general.proxmox_user_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.proxmox_user_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.pubnub.pubnub_blocks: + redirect: community.general.pubnub_blocks + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pubnub_blocks + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.pulp_repo: + redirect: community.general.pulp_repo + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pulp_repo + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.puppet: + redirect: community.general.puppet + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.puppet + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. purefa_facts: tombstone: removal_version: 3.0.0 @@ -1255,220 +3150,665 @@ plugin_routing: tombstone: removal_version: 3.0.0 warning_text: Use purestorage.flashblade.purefb_info instead. - pushbullet: - redirect: community.general.notification.pushbullet - pushover: - redirect: community.general.notification.pushover + notification.pushbullet: + redirect: community.general.pushbullet + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pushbullet + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.pushover: + redirect: community.general.pushover + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.pushover + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. python_requirements_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.python_requirements_info instead. - python_requirements_info: - redirect: community.general.system.python_requirements_info - rax: - redirect: community.general.cloud.rackspace.rax - rax_cbs: - redirect: community.general.cloud.rackspace.rax_cbs - rax_cbs_attachments: - redirect: community.general.cloud.rackspace.rax_cbs_attachments - rax_cdb: - redirect: community.general.cloud.rackspace.rax_cdb - rax_cdb_database: - redirect: community.general.cloud.rackspace.rax_cdb_database - rax_cdb_user: - redirect: community.general.cloud.rackspace.rax_cdb_user - rax_clb: - redirect: community.general.cloud.rackspace.rax_clb - rax_clb_nodes: - redirect: community.general.cloud.rackspace.rax_clb_nodes - rax_clb_ssl: - redirect: community.general.cloud.rackspace.rax_clb_ssl - rax_dns: - redirect: community.general.cloud.rackspace.rax_dns - rax_dns_record: - redirect: community.general.cloud.rackspace.rax_dns_record - rax_facts: - redirect: community.general.cloud.rackspace.rax_facts - rax_files: - redirect: community.general.cloud.rackspace.rax_files - rax_files_objects: - redirect: community.general.cloud.rackspace.rax_files_objects - rax_identity: - redirect: community.general.cloud.rackspace.rax_identity - rax_keypair: - redirect: community.general.cloud.rackspace.rax_keypair - rax_meta: - redirect: community.general.cloud.rackspace.rax_meta - rax_mon_alarm: - redirect: community.general.cloud.rackspace.rax_mon_alarm - rax_mon_check: - redirect: community.general.cloud.rackspace.rax_mon_check - rax_mon_entity: - redirect: community.general.cloud.rackspace.rax_mon_entity - rax_mon_notification: - redirect: community.general.cloud.rackspace.rax_mon_notification - rax_mon_notification_plan: - redirect: community.general.cloud.rackspace.rax_mon_notification_plan - rax_network: - redirect: community.general.cloud.rackspace.rax_network - rax_queue: - redirect: community.general.cloud.rackspace.rax_queue - rax_scaling_group: - redirect: community.general.cloud.rackspace.rax_scaling_group - rax_scaling_policy: - redirect: community.general.cloud.rackspace.rax_scaling_policy - read_csv: - redirect: community.general.files.read_csv - redfish_command: - redirect: community.general.remote_management.redfish.redfish_command - redfish_config: - redirect: community.general.remote_management.redfish.redfish_config + system.python_requirements_info: + redirect: community.general.python_requirements_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.python_requirements_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax: + redirect: community.general.rax + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_cbs: + redirect: community.general.rax_cbs + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_cbs + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_cbs_attachments: + redirect: community.general.rax_cbs_attachments + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_cbs_attachments + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_cdb: + redirect: community.general.rax_cdb + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_cdb + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_cdb_database: + redirect: community.general.rax_cdb_database + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_cdb_database + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_cdb_user: + redirect: community.general.rax_cdb_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_cdb_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_clb: + redirect: community.general.rax_clb + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_clb + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_clb_nodes: + redirect: community.general.rax_clb_nodes + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_clb_nodes + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_clb_ssl: + redirect: community.general.rax_clb_ssl + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_clb_ssl + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_dns: + redirect: community.general.rax_dns + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_dns + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_dns_record: + redirect: community.general.rax_dns_record + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_dns_record + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_facts: + redirect: community.general.rax_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_files: + redirect: community.general.rax_files + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_files + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_files_objects: + redirect: community.general.rax_files_objects + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_files_objects + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_identity: + redirect: community.general.rax_identity + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_identity + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_keypair: + redirect: community.general.rax_keypair + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_keypair + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_meta: + redirect: community.general.rax_meta + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_meta + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_mon_alarm: + redirect: community.general.rax_mon_alarm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_mon_alarm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_mon_check: + redirect: community.general.rax_mon_check + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_mon_check + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_mon_entity: + redirect: community.general.rax_mon_entity + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_mon_entity + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_mon_notification: + redirect: community.general.rax_mon_notification + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_mon_notification + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_mon_notification_plan: + redirect: community.general.rax_mon_notification_plan + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_mon_notification_plan + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_network: + redirect: community.general.rax_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_queue: + redirect: community.general.rax_queue + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_queue + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_scaling_group: + redirect: community.general.rax_scaling_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_scaling_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.rackspace.rax_scaling_policy: + redirect: community.general.rax_scaling_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rax_scaling_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.read_csv: + redirect: community.general.read_csv + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.read_csv + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.redfish.redfish_command: + redirect: community.general.redfish_command + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redfish_command + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.redfish.redfish_config: + redirect: community.general.redfish_config + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redfish_config + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. redfish_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.redfish_info instead. - redfish_info: - redirect: community.general.remote_management.redfish.redfish_info - redhat_subscription: - redirect: community.general.packaging.os.redhat_subscription - redis: - redirect: community.general.database.misc.redis - redis_data: - redirect: community.general.database.misc.redis_data - redis_data_incr: - redirect: community.general.database.misc.redis_data_incr - redis_data_info: - redirect: community.general.database.misc.redis_data_info - redis_info: - redirect: community.general.database.misc.redis_info - rhevm: - redirect: community.general.cloud.misc.rhevm - rhn_channel: - redirect: community.general.packaging.os.rhn_channel - rhn_register: - redirect: community.general.packaging.os.rhn_register - rhsm_release: - redirect: community.general.packaging.os.rhsm_release - rhsm_repository: - redirect: community.general.packaging.os.rhsm_repository - riak: - redirect: community.general.database.misc.riak - rocketchat: - redirect: community.general.notification.rocketchat - rollbar_deployment: - redirect: community.general.monitoring.rollbar_deployment - rpm_ostree_pkg: - redirect: community.general.packaging.os.rpm_ostree_pkg - rundeck_acl_policy: - redirect: community.general.web_infrastructure.rundeck_acl_policy - rundeck_job_executions_info: - redirect: community.general.web_infrastructure.rundeck_job_executions_info - rundeck_job_run: - redirect: community.general.web_infrastructure.rundeck_job_run - rundeck_project: - redirect: community.general.web_infrastructure.rundeck_project - runit: - redirect: community.general.system.runit - sap_task_list_execute: - redirect: community.general.system.sap_task_list_execute - sapcar_extract: - redirect: community.general.files.sapcar_extract - say: - redirect: community.general.notification.say - scaleway_compute: - redirect: community.general.cloud.scaleway.scaleway_compute - scaleway_compute_private_network: - redirect: community.general.cloud.scaleway.scaleway_compute_private_network - scaleway_container_registry: - redirect: community.general.cloud.scaleway.scaleway_container_registry - scaleway_container_registry_info: - redirect: community.general.cloud.scaleway.scaleway_container_registry_info - scaleway_database_backup: - redirect: community.general.cloud.scaleway.scaleway_database_backup - scaleway_function_namespace: - redirect: community.general.cloud.scaleway.scaleway_function_namespace - scaleway_function_namespace_info: - redirect: community.general.cloud.scaleway.scaleway_function_namespace_info + remote_management.redfish.redfish_info: + redirect: community.general.redfish_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redfish_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.redhat_subscription: + redirect: community.general.redhat_subscription + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redhat_subscription + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.redis: + redirect: community.general.redis + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redis + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.redis_data: + redirect: community.general.redis_data + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redis_data + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.redis_data_incr: + redirect: community.general.redis_data_incr + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redis_data_incr + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.redis_data_info: + redirect: community.general.redis_data_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redis_data_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.redis_info: + redirect: community.general.redis_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.redis_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.rhevm: + redirect: community.general.rhevm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rhevm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.rhn_channel: + redirect: community.general.rhn_channel + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rhn_channel + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.rhn_register: + redirect: community.general.rhn_register + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rhn_register + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.rhsm_release: + redirect: community.general.rhsm_release + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rhsm_release + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.rhsm_repository: + redirect: community.general.rhsm_repository + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rhsm_repository + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.misc.riak: + redirect: community.general.riak + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.riak + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.rocketchat: + redirect: community.general.rocketchat + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rocketchat + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.rollbar_deployment: + redirect: community.general.rollbar_deployment + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rollbar_deployment + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.rpm_ostree_pkg: + redirect: community.general.rpm_ostree_pkg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rpm_ostree_pkg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.rundeck_acl_policy: + redirect: community.general.rundeck_acl_policy + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rundeck_acl_policy + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.rundeck_job_executions_info: + redirect: community.general.rundeck_job_executions_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rundeck_job_executions_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.rundeck_job_run: + redirect: community.general.rundeck_job_run + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rundeck_job_run + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.rundeck_project: + redirect: community.general.rundeck_project + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.rundeck_project + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.runit: + redirect: community.general.runit + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.runit + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.sap_task_list_execute: + redirect: community.general.sap_task_list_execute + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sap_task_list_execute + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.sapcar_extract: + redirect: community.general.sapcar_extract + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sapcar_extract + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.say: + redirect: community.general.say + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.say + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_compute: + redirect: community.general.scaleway_compute + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_compute + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_compute_private_network: + redirect: community.general.scaleway_compute_private_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_compute_private_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_container_registry: + redirect: community.general.scaleway_container_registry + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_container_registry + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_container_registry_info: + redirect: community.general.scaleway_container_registry_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_container_registry_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_database_backup: + redirect: community.general.scaleway_database_backup + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_database_backup + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_function_namespace: + redirect: community.general.scaleway_function_namespace + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_function_namespace + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_function_namespace_info: + redirect: community.general.scaleway_function_namespace_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_function_namespace_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. scaleway_image_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.scaleway_image_info instead. - scaleway_image_info: - redirect: community.general.cloud.scaleway.scaleway_image_info - scaleway_ip: - redirect: community.general.cloud.scaleway.scaleway_ip + cloud.scaleway.scaleway_image_info: + redirect: community.general.scaleway_image_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_image_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_ip: + redirect: community.general.scaleway_ip + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_ip + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. scaleway_ip_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.scaleway_ip_info instead. - scaleway_ip_info: - redirect: community.general.cloud.scaleway.scaleway_ip_info - scaleway_lb: - redirect: community.general.cloud.scaleway.scaleway_lb + cloud.scaleway.scaleway_ip_info: + redirect: community.general.scaleway_ip_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_ip_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_lb: + redirect: community.general.scaleway_lb + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_lb + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. scaleway_organization_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.scaleway_organization_info instead. - scaleway_organization_info: - redirect: community.general.cloud.scaleway.scaleway_organization_info - scaleway_private_network: - redirect: community.general.cloud.scaleway.scaleway_private_network - scaleway_security_group: - redirect: community.general.cloud.scaleway.scaleway_security_group + cloud.scaleway.scaleway_organization_info: + redirect: community.general.scaleway_organization_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_organization_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_private_network: + redirect: community.general.scaleway_private_network + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_private_network + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_security_group: + redirect: community.general.scaleway_security_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_security_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. scaleway_security_group_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.scaleway_security_group_info instead. - scaleway_security_group_info: - redirect: community.general.cloud.scaleway.scaleway_security_group_info - scaleway_security_group_rule: - redirect: community.general.cloud.scaleway.scaleway_security_group_rule + cloud.scaleway.scaleway_security_group_info: + redirect: community.general.scaleway_security_group_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_security_group_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_security_group_rule: + redirect: community.general.scaleway_security_group_rule + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_security_group_rule + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. scaleway_server_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.scaleway_server_info instead. - scaleway_server_info: - redirect: community.general.cloud.scaleway.scaleway_server_info + cloud.scaleway.scaleway_server_info: + redirect: community.general.scaleway_server_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_server_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. scaleway_snapshot_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.scaleway_snapshot_info instead. - scaleway_snapshot_info: - redirect: community.general.cloud.scaleway.scaleway_snapshot_info - scaleway_sshkey: - redirect: community.general.cloud.scaleway.scaleway_sshkey - scaleway_user_data: - redirect: community.general.cloud.scaleway.scaleway_user_data - scaleway_volume: - redirect: community.general.cloud.scaleway.scaleway_volume + cloud.scaleway.scaleway_snapshot_info: + redirect: community.general.scaleway_snapshot_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_snapshot_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_sshkey: + redirect: community.general.scaleway_sshkey + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_sshkey + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_user_data: + redirect: community.general.scaleway_user_data + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_user_data + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.scaleway.scaleway_volume: + redirect: community.general.scaleway_volume + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_volume + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. scaleway_volume_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.scaleway_volume_info instead. - scaleway_volume_info: - redirect: community.general.cloud.scaleway.scaleway_volume_info - sefcontext: - redirect: community.general.system.sefcontext - selinux_permissive: - redirect: community.general.system.selinux_permissive - selogin: - redirect: community.general.system.selogin - sendgrid: - redirect: community.general.notification.sendgrid - sensu_check: - redirect: community.general.monitoring.sensu.sensu_check - sensu_client: - redirect: community.general.monitoring.sensu.sensu_client - sensu_handler: - redirect: community.general.monitoring.sensu.sensu_handler - sensu_silence: - redirect: community.general.monitoring.sensu.sensu_silence - sensu_subscription: - redirect: community.general.monitoring.sensu.sensu_subscription - seport: - redirect: community.general.system.seport - serverless: - redirect: community.general.cloud.misc.serverless + cloud.scaleway.scaleway_volume_info: + redirect: community.general.scaleway_volume_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.scaleway_volume_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.sefcontext: + redirect: community.general.sefcontext + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sefcontext + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.selinux_permissive: + redirect: community.general.selinux_permissive + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.selinux_permissive + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.selogin: + redirect: community.general.selogin + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.selogin + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.sendgrid: + redirect: community.general.sendgrid + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sendgrid + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.sensu.sensu_check: + redirect: community.general.sensu_check + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sensu_check + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.sensu.sensu_client: + redirect: community.general.sensu_client + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sensu_client + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.sensu.sensu_handler: + redirect: community.general.sensu_handler + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sensu_handler + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.sensu.sensu_silence: + redirect: community.general.sensu_silence + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sensu_silence + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.sensu.sensu_subscription: + redirect: community.general.sensu_subscription + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sensu_subscription + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.seport: + redirect: community.general.seport + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.seport + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.serverless: + redirect: community.general.serverless + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.serverless + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. sf_account_manager: tombstone: removal_version: 2.0.0 @@ -1489,204 +3829,669 @@ plugin_routing: tombstone: removal_version: 2.0.0 warning_text: Use netapp.elementsw.na_elementsw_volume instead. - shutdown: - redirect: community.general.system.shutdown - sl_vm: - redirect: community.general.cloud.softlayer.sl_vm - slack: - redirect: community.general.notification.slack - slackpkg: - redirect: community.general.packaging.os.slackpkg + system.shutdown: + redirect: community.general.shutdown + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.shutdown + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.softlayer.sl_vm: + redirect: community.general.sl_vm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sl_vm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.slack: + redirect: community.general.slack + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.slack + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.slackpkg: + redirect: community.general.slackpkg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.slackpkg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. smartos_image_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.smartos_image_info instead. - smartos_image_info: - redirect: community.general.cloud.smartos.smartos_image_info - snap: - redirect: community.general.packaging.os.snap - snap_alias: - redirect: community.general.packaging.os.snap_alias - snmp_facts: - redirect: community.general.net_tools.snmp_facts - solaris_zone: - redirect: community.general.system.solaris_zone - sorcery: - redirect: community.general.packaging.os.sorcery - spectrum_device: - redirect: community.general.monitoring.spectrum_device - spectrum_model_attrs: - redirect: community.general.monitoring.spectrum_model_attrs - spotinst_aws_elastigroup: - redirect: community.general.cloud.spotinst.spotinst_aws_elastigroup - ss_3par_cpg: - redirect: community.general.storage.hpe3par.ss_3par_cpg - ssh_config: - redirect: community.general.system.ssh_config - stackdriver: - redirect: community.general.monitoring.stackdriver - stacki_host: - redirect: community.general.remote_management.stacki.stacki_host - statsd: - redirect: community.general.monitoring.statsd - statusio_maintenance: - redirect: community.general.monitoring.statusio_maintenance - sudoers: - redirect: community.general.system.sudoers - supervisorctl: - redirect: community.general.web_infrastructure.supervisorctl - svc: - redirect: community.general.system.svc - svr4pkg: - redirect: community.general.packaging.os.svr4pkg - swdepot: - redirect: community.general.packaging.os.swdepot - swupd: - redirect: community.general.packaging.os.swupd - syslogger: - redirect: community.general.notification.syslogger - syspatch: - redirect: community.general.system.syspatch - sysrc: - redirect: community.general.system.sysrc - sysupgrade: - redirect: community.general.system.sysupgrade - taiga_issue: - redirect: community.general.web_infrastructure.taiga_issue - telegram: - redirect: community.general.notification.telegram - terraform: - redirect: community.general.cloud.misc.terraform - timezone: - redirect: community.general.system.timezone - twilio: - redirect: community.general.notification.twilio - typetalk: - redirect: community.general.notification.typetalk - udm_dns_record: - redirect: community.general.cloud.univention.udm_dns_record - udm_dns_zone: - redirect: community.general.cloud.univention.udm_dns_zone - udm_group: - redirect: community.general.cloud.univention.udm_group - udm_share: - redirect: community.general.cloud.univention.udm_share - udm_user: - redirect: community.general.cloud.univention.udm_user - ufw: - redirect: community.general.system.ufw - uptimerobot: - redirect: community.general.monitoring.uptimerobot - urpmi: - redirect: community.general.packaging.os.urpmi - utm_aaa_group: - redirect: community.general.web_infrastructure.sophos_utm.utm_aaa_group - utm_aaa_group_info: - redirect: community.general.web_infrastructure.sophos_utm.utm_aaa_group_info - utm_ca_host_key_cert: - redirect: community.general.web_infrastructure.sophos_utm.utm_ca_host_key_cert - utm_ca_host_key_cert_info: - redirect: community.general.web_infrastructure.sophos_utm.utm_ca_host_key_cert_info - utm_dns_host: - redirect: community.general.web_infrastructure.sophos_utm.utm_dns_host - utm_network_interface_address: - redirect: community.general.web_infrastructure.sophos_utm.utm_network_interface_address - utm_network_interface_address_info: - redirect: community.general.web_infrastructure.sophos_utm.utm_network_interface_address_info - utm_proxy_auth_profile: - redirect: community.general.web_infrastructure.sophos_utm.utm_proxy_auth_profile - utm_proxy_exception: - redirect: community.general.web_infrastructure.sophos_utm.utm_proxy_exception - utm_proxy_frontend: - redirect: community.general.web_infrastructure.sophos_utm.utm_proxy_frontend - utm_proxy_frontend_info: - redirect: community.general.web_infrastructure.sophos_utm.utm_proxy_frontend_info - utm_proxy_location: - redirect: community.general.web_infrastructure.sophos_utm.utm_proxy_location - utm_proxy_location_info: - redirect: community.general.web_infrastructure.sophos_utm.utm_proxy_location_info - vdo: - redirect: community.general.system.vdo - vertica_configuration: - redirect: community.general.database.vertica.vertica_configuration + cloud.smartos.smartos_image_info: + redirect: community.general.smartos_image_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.smartos_image_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.snap: + redirect: community.general.snap + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.snap + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.snap_alias: + redirect: community.general.snap_alias + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.snap_alias + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + net_tools.snmp_facts: + redirect: community.general.snmp_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.snmp_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.solaris_zone: + redirect: community.general.solaris_zone + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.solaris_zone + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.sorcery: + redirect: community.general.sorcery + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sorcery + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.spectrum_device: + redirect: community.general.spectrum_device + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.spectrum_device + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.spectrum_model_attrs: + redirect: community.general.spectrum_model_attrs + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.spectrum_model_attrs + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.spotinst.spotinst_aws_elastigroup: + redirect: community.general.spotinst_aws_elastigroup + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.spotinst_aws_elastigroup + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.hpe3par.ss_3par_cpg: + redirect: community.general.ss_3par_cpg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ss_3par_cpg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.ssh_config: + redirect: community.general.ssh_config + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ssh_config + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.stackdriver: + redirect: community.general.stackdriver + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.stackdriver + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.stacki.stacki_host: + redirect: community.general.stacki_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.stacki_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.statsd: + redirect: community.general.statsd + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.statsd + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.statusio_maintenance: + redirect: community.general.statusio_maintenance + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.statusio_maintenance + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.sudoers: + redirect: community.general.sudoers + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sudoers + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.supervisorctl: + redirect: community.general.supervisorctl + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.supervisorctl + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.svc: + redirect: community.general.svc + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.svc + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.svr4pkg: + redirect: community.general.svr4pkg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.svr4pkg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.swdepot: + redirect: community.general.swdepot + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.swdepot + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.swupd: + redirect: community.general.swupd + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.swupd + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.syslogger: + redirect: community.general.syslogger + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.syslogger + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.syspatch: + redirect: community.general.syspatch + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.syspatch + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.sysrc: + redirect: community.general.sysrc + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sysrc + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.sysupgrade: + redirect: community.general.sysupgrade + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.sysupgrade + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.taiga_issue: + redirect: community.general.taiga_issue + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.taiga_issue + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.telegram: + redirect: community.general.telegram + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.telegram + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.terraform: + redirect: community.general.terraform + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.terraform + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.timezone: + redirect: community.general.timezone + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.timezone + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.twilio: + redirect: community.general.twilio + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.twilio + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + notification.typetalk: + redirect: community.general.typetalk + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.typetalk + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.univention.udm_dns_record: + redirect: community.general.udm_dns_record + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.udm_dns_record + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.univention.udm_dns_zone: + redirect: community.general.udm_dns_zone + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.udm_dns_zone + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.univention.udm_group: + redirect: community.general.udm_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.udm_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.univention.udm_share: + redirect: community.general.udm_share + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.udm_share + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.univention.udm_user: + redirect: community.general.udm_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.udm_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.ufw: + redirect: community.general.ufw + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.ufw + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + monitoring.uptimerobot: + redirect: community.general.uptimerobot + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.uptimerobot + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.urpmi: + redirect: community.general.urpmi + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.urpmi + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_aaa_group: + redirect: community.general.utm_aaa_group + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_aaa_group + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_aaa_group_info: + redirect: community.general.utm_aaa_group_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_aaa_group_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_ca_host_key_cert: + redirect: community.general.utm_ca_host_key_cert + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_ca_host_key_cert + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_ca_host_key_cert_info: + redirect: community.general.utm_ca_host_key_cert_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_ca_host_key_cert_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_dns_host: + redirect: community.general.utm_dns_host + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_dns_host + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_network_interface_address: + redirect: community.general.utm_network_interface_address + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_network_interface_address + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_network_interface_address_info: + redirect: community.general.utm_network_interface_address_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_network_interface_address_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_proxy_auth_profile: + redirect: community.general.utm_proxy_auth_profile + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_proxy_auth_profile + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_proxy_exception: + redirect: community.general.utm_proxy_exception + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_proxy_exception + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_proxy_frontend: + redirect: community.general.utm_proxy_frontend + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_proxy_frontend + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_proxy_frontend_info: + redirect: community.general.utm_proxy_frontend_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_proxy_frontend_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_proxy_location: + redirect: community.general.utm_proxy_location + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_proxy_location + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + web_infrastructure.sophos_utm.utm_proxy_location_info: + redirect: community.general.utm_proxy_location_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.utm_proxy_location_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.vdo: + redirect: community.general.vdo + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vdo + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.vertica.vertica_configuration: + redirect: community.general.vertica_configuration + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vertica_configuration + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. vertica_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.vertica_info instead. - vertica_info: - redirect: community.general.database.vertica.vertica_info - vertica_role: - redirect: community.general.database.vertica.vertica_role - vertica_schema: - redirect: community.general.database.vertica.vertica_schema - vertica_user: - redirect: community.general.database.vertica.vertica_user - vexata_eg: - redirect: community.general.storage.vexata.vexata_eg - vexata_volume: - redirect: community.general.storage.vexata.vexata_volume - vmadm: - redirect: community.general.cloud.smartos.vmadm - wakeonlan: - redirect: community.general.remote_management.wakeonlan - wdc_redfish_command: - redirect: community.general.remote_management.redfish.wdc_redfish_command - wdc_redfish_info: - redirect: community.general.remote_management.redfish.wdc_redfish_info - webfaction_app: - redirect: community.general.cloud.webfaction.webfaction_app - webfaction_db: - redirect: community.general.cloud.webfaction.webfaction_db - webfaction_domain: - redirect: community.general.cloud.webfaction.webfaction_domain - webfaction_mailbox: - redirect: community.general.cloud.webfaction.webfaction_mailbox - webfaction_site: - redirect: community.general.cloud.webfaction.webfaction_site - xattr: - redirect: community.general.files.xattr - xbps: - redirect: community.general.packaging.os.xbps - xcc_redfish_command: - redirect: community.general.remote_management.lenovoxcc.xcc_redfish_command - xenserver_facts: - redirect: community.general.cloud.misc.xenserver_facts - xenserver_guest: - redirect: community.general.cloud.xenserver.xenserver_guest + database.vertica.vertica_info: + redirect: community.general.vertica_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vertica_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.vertica.vertica_role: + redirect: community.general.vertica_role + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vertica_role + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.vertica.vertica_schema: + redirect: community.general.vertica_schema + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vertica_schema + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + database.vertica.vertica_user: + redirect: community.general.vertica_user + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vertica_user + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.vexata.vexata_eg: + redirect: community.general.vexata_eg + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vexata_eg + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.vexata.vexata_volume: + redirect: community.general.vexata_volume + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vexata_volume + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.smartos.vmadm: + redirect: community.general.vmadm + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.vmadm + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.wakeonlan: + redirect: community.general.wakeonlan + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.wakeonlan + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.redfish.wdc_redfish_command: + redirect: community.general.wdc_redfish_command + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.wdc_redfish_command + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.redfish.wdc_redfish_info: + redirect: community.general.wdc_redfish_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.wdc_redfish_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.webfaction.webfaction_app: + redirect: community.general.webfaction_app + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.webfaction_app + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.webfaction.webfaction_db: + redirect: community.general.webfaction_db + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.webfaction_db + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.webfaction.webfaction_domain: + redirect: community.general.webfaction_domain + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.webfaction_domain + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.webfaction.webfaction_mailbox: + redirect: community.general.webfaction_mailbox + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.webfaction_mailbox + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.webfaction.webfaction_site: + redirect: community.general.webfaction_site + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.webfaction_site + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.xattr: + redirect: community.general.xattr + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xattr + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.xbps: + redirect: community.general.xbps + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xbps + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + remote_management.lenovoxcc.xcc_redfish_command: + redirect: community.general.xcc_redfish_command + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xcc_redfish_command + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.misc.xenserver_facts: + redirect: community.general.xenserver_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xenserver_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.xenserver.xenserver_guest: + redirect: community.general.xenserver_guest + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xenserver_guest + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. xenserver_guest_facts: tombstone: removal_version: 3.0.0 warning_text: Use community.general.xenserver_guest_info instead. - xenserver_guest_info: - redirect: community.general.cloud.xenserver.xenserver_guest_info - xenserver_guest_powerstate: - redirect: community.general.cloud.xenserver.xenserver_guest_powerstate - xfconf: - redirect: community.general.system.xfconf - xfconf_info: - redirect: community.general.system.xfconf_info - xfs_quota: - redirect: community.general.system.xfs_quota - xml: - redirect: community.general.files.xml - yarn: - redirect: community.general.packaging.language.yarn - yum_versionlock: - redirect: community.general.packaging.os.yum_versionlock - zfs: - redirect: community.general.storage.zfs.zfs - zfs_delegate_admin: - redirect: community.general.storage.zfs.zfs_delegate_admin - zfs_facts: - redirect: community.general.storage.zfs.zfs_facts - znode: - redirect: community.general.clustering.znode - zpool_facts: - redirect: community.general.storage.zfs.zpool_facts - zypper: - redirect: community.general.packaging.os.zypper - zypper_repository: - redirect: community.general.packaging.os.zypper_repository + cloud.xenserver.xenserver_guest_info: + redirect: community.general.xenserver_guest_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xenserver_guest_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + cloud.xenserver.xenserver_guest_powerstate: + redirect: community.general.xenserver_guest_powerstate + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xenserver_guest_powerstate + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.xfconf: + redirect: community.general.xfconf + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xfconf + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.xfconf_info: + redirect: community.general.xfconf_info + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xfconf_info + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.xfs_quota: + redirect: community.general.xfs_quota + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xfs_quota + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + files.xml: + redirect: community.general.xml + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.xml + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.language.yarn: + redirect: community.general.yarn + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.yarn + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.yum_versionlock: + redirect: community.general.yum_versionlock + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.yum_versionlock + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.zfs.zfs: + redirect: community.general.zfs + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.zfs + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.zfs.zfs_delegate_admin: + redirect: community.general.zfs_delegate_admin + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.zfs_delegate_admin + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.zfs.zfs_facts: + redirect: community.general.zfs_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.zfs_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + clustering.znode: + redirect: community.general.znode + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.znode + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + storage.zfs.zpool_facts: + redirect: community.general.zpool_facts + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.zpool_facts + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.zypper: + redirect: community.general.zypper + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.zypper + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. + packaging.os.zypper_repository: + redirect: community.general.zypper_repository + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.zypper_repository + modules. This has never been supported or documented, and will stop working + in community.general 9.0.0. doc_fragments: _gcp: redirect: community.google._gcp @@ -1761,7 +4566,17 @@ plugin_routing: # eventually will deprecate and then remove it. redirect: ansible.builtin.path_join action: - iptables_state: - redirect: community.general.system.iptables_state - shutdown: - redirect: community.general.system.shutdown + system.iptables_state: + redirect: community.general.iptables_state + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.iptables_state + action. This has never been supported or documented, and will stop working + in community.general 9.0.0. + system.shutdown: + redirect: community.general.shutdown + deprecation: + removal_version: 9.0.0 + warning_text: You are using an internal name to access the community.general.shutdown + action. This has never been supported or documented, and will stop working + in community.general 9.0.0. diff --git a/plugins/action/system/iptables_state.py b/plugins/action/iptables_state.py similarity index 100% rename from plugins/action/system/iptables_state.py rename to plugins/action/iptables_state.py diff --git a/plugins/action/system/shutdown.py b/plugins/action/shutdown.py similarity index 100% rename from plugins/action/system/shutdown.py rename to plugins/action/shutdown.py diff --git a/plugins/modules/database/aerospike/aerospike_migrations.py b/plugins/modules/aerospike_migrations.py similarity index 100% rename from plugins/modules/database/aerospike/aerospike_migrations.py rename to plugins/modules/aerospike_migrations.py diff --git a/plugins/modules/monitoring/airbrake_deployment.py b/plugins/modules/airbrake_deployment.py similarity index 100% rename from plugins/modules/monitoring/airbrake_deployment.py rename to plugins/modules/airbrake_deployment.py diff --git a/plugins/modules/system/aix_devices.py b/plugins/modules/aix_devices.py similarity index 100% rename from plugins/modules/system/aix_devices.py rename to plugins/modules/aix_devices.py diff --git a/plugins/modules/system/aix_filesystem.py b/plugins/modules/aix_filesystem.py similarity index 100% rename from plugins/modules/system/aix_filesystem.py rename to plugins/modules/aix_filesystem.py diff --git a/plugins/modules/system/aix_inittab.py b/plugins/modules/aix_inittab.py similarity index 100% rename from plugins/modules/system/aix_inittab.py rename to plugins/modules/aix_inittab.py diff --git a/plugins/modules/system/aix_lvg.py b/plugins/modules/aix_lvg.py similarity index 100% rename from plugins/modules/system/aix_lvg.py rename to plugins/modules/aix_lvg.py diff --git a/plugins/modules/system/aix_lvol.py b/plugins/modules/aix_lvol.py similarity index 100% rename from plugins/modules/system/aix_lvol.py rename to plugins/modules/aix_lvol.py diff --git a/plugins/modules/monitoring/alerta_customer.py b/plugins/modules/alerta_customer.py similarity index 100% rename from plugins/modules/monitoring/alerta_customer.py rename to plugins/modules/alerta_customer.py diff --git a/plugins/modules/cloud/alicloud/ali_instance.py b/plugins/modules/ali_instance.py similarity index 100% rename from plugins/modules/cloud/alicloud/ali_instance.py rename to plugins/modules/ali_instance.py diff --git a/plugins/modules/cloud/alicloud/ali_instance_info.py b/plugins/modules/ali_instance_info.py similarity index 100% rename from plugins/modules/cloud/alicloud/ali_instance_info.py rename to plugins/modules/ali_instance_info.py diff --git a/plugins/modules/system/alternatives.py b/plugins/modules/alternatives.py similarity index 100% rename from plugins/modules/system/alternatives.py rename to plugins/modules/alternatives.py diff --git a/plugins/modules/packaging/language/ansible_galaxy_install.py b/plugins/modules/ansible_galaxy_install.py similarity index 100% rename from plugins/modules/packaging/language/ansible_galaxy_install.py rename to plugins/modules/ansible_galaxy_install.py diff --git a/plugins/modules/web_infrastructure/apache2_mod_proxy.py b/plugins/modules/apache2_mod_proxy.py similarity index 100% rename from plugins/modules/web_infrastructure/apache2_mod_proxy.py rename to plugins/modules/apache2_mod_proxy.py diff --git a/plugins/modules/web_infrastructure/apache2_module.py b/plugins/modules/apache2_module.py similarity index 100% rename from plugins/modules/web_infrastructure/apache2_module.py rename to plugins/modules/apache2_module.py diff --git a/plugins/modules/packaging/os/apk.py b/plugins/modules/apk.py similarity index 100% rename from plugins/modules/packaging/os/apk.py rename to plugins/modules/apk.py diff --git a/plugins/modules/packaging/os/apt_repo.py b/plugins/modules/apt_repo.py similarity index 100% rename from plugins/modules/packaging/os/apt_repo.py rename to plugins/modules/apt_repo.py diff --git a/plugins/modules/packaging/os/apt_rpm.py b/plugins/modules/apt_rpm.py similarity index 100% rename from plugins/modules/packaging/os/apt_rpm.py rename to plugins/modules/apt_rpm.py diff --git a/plugins/modules/files/archive.py b/plugins/modules/archive.py similarity index 100% rename from plugins/modules/files/archive.py rename to plugins/modules/archive.py diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/atomic_container.py similarity index 100% rename from plugins/modules/cloud/atomic/atomic_container.py rename to plugins/modules/atomic_container.py diff --git a/plugins/modules/cloud/atomic/atomic_host.py b/plugins/modules/atomic_host.py similarity index 100% rename from plugins/modules/cloud/atomic/atomic_host.py rename to plugins/modules/atomic_host.py diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/atomic_image.py similarity index 100% rename from plugins/modules/cloud/atomic/atomic_image.py rename to plugins/modules/atomic_image.py diff --git a/plugins/modules/system/awall.py b/plugins/modules/awall.py similarity index 100% rename from plugins/modules/system/awall.py rename to plugins/modules/awall.py diff --git a/plugins/modules/system/beadm.py b/plugins/modules/beadm.py similarity index 100% rename from plugins/modules/system/beadm.py rename to plugins/modules/beadm.py diff --git a/plugins/modules/notification/bearychat.py b/plugins/modules/bearychat.py similarity index 100% rename from plugins/modules/notification/bearychat.py rename to plugins/modules/bearychat.py diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/bigpanda.py similarity index 100% rename from plugins/modules/monitoring/bigpanda.py rename to plugins/modules/bigpanda.py diff --git a/plugins/modules/source_control/bitbucket/bitbucket_access_key.py b/plugins/modules/bitbucket_access_key.py similarity index 100% rename from plugins/modules/source_control/bitbucket/bitbucket_access_key.py rename to plugins/modules/bitbucket_access_key.py diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py b/plugins/modules/bitbucket_pipeline_key_pair.py similarity index 100% rename from plugins/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py rename to plugins/modules/bitbucket_pipeline_key_pair.py diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py b/plugins/modules/bitbucket_pipeline_known_host.py similarity index 100% rename from plugins/modules/source_control/bitbucket/bitbucket_pipeline_known_host.py rename to plugins/modules/bitbucket_pipeline_known_host.py diff --git a/plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py b/plugins/modules/bitbucket_pipeline_variable.py similarity index 100% rename from plugins/modules/source_control/bitbucket/bitbucket_pipeline_variable.py rename to plugins/modules/bitbucket_pipeline_variable.py diff --git a/plugins/modules/packaging/language/bower.py b/plugins/modules/bower.py similarity index 100% rename from plugins/modules/packaging/language/bower.py rename to plugins/modules/bower.py diff --git a/plugins/modules/packaging/language/bundler.py b/plugins/modules/bundler.py similarity index 100% rename from plugins/modules/packaging/language/bundler.py rename to plugins/modules/bundler.py diff --git a/plugins/modules/source_control/bzr.py b/plugins/modules/bzr.py similarity index 100% rename from plugins/modules/source_control/bzr.py rename to plugins/modules/bzr.py diff --git a/plugins/modules/notification/campfire.py b/plugins/modules/campfire.py similarity index 100% rename from plugins/modules/notification/campfire.py rename to plugins/modules/campfire.py diff --git a/plugins/modules/system/capabilities.py b/plugins/modules/capabilities.py similarity index 100% rename from plugins/modules/system/capabilities.py rename to plugins/modules/capabilities.py diff --git a/plugins/modules/packaging/language/cargo.py b/plugins/modules/cargo.py similarity index 100% rename from plugins/modules/packaging/language/cargo.py rename to plugins/modules/cargo.py diff --git a/plugins/modules/notification/catapult.py b/plugins/modules/catapult.py similarity index 100% rename from plugins/modules/notification/catapult.py rename to plugins/modules/catapult.py diff --git a/plugins/modules/monitoring/circonus_annotation.py b/plugins/modules/circonus_annotation.py similarity index 100% rename from plugins/modules/monitoring/circonus_annotation.py rename to plugins/modules/circonus_annotation.py diff --git a/plugins/modules/notification/cisco_webex.py b/plugins/modules/cisco_webex.py similarity index 100% rename from plugins/modules/notification/cisco_webex.py rename to plugins/modules/cisco_webex.py diff --git a/plugins/modules/cloud/centurylink/clc_aa_policy.py b/plugins/modules/clc_aa_policy.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_aa_policy.py rename to plugins/modules/clc_aa_policy.py diff --git a/plugins/modules/cloud/centurylink/clc_alert_policy.py b/plugins/modules/clc_alert_policy.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_alert_policy.py rename to plugins/modules/clc_alert_policy.py diff --git a/plugins/modules/cloud/centurylink/clc_blueprint_package.py b/plugins/modules/clc_blueprint_package.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_blueprint_package.py rename to plugins/modules/clc_blueprint_package.py diff --git a/plugins/modules/cloud/centurylink/clc_firewall_policy.py b/plugins/modules/clc_firewall_policy.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_firewall_policy.py rename to plugins/modules/clc_firewall_policy.py diff --git a/plugins/modules/cloud/centurylink/clc_group.py b/plugins/modules/clc_group.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_group.py rename to plugins/modules/clc_group.py diff --git a/plugins/modules/cloud/centurylink/clc_loadbalancer.py b/plugins/modules/clc_loadbalancer.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_loadbalancer.py rename to plugins/modules/clc_loadbalancer.py diff --git a/plugins/modules/cloud/centurylink/clc_modify_server.py b/plugins/modules/clc_modify_server.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_modify_server.py rename to plugins/modules/clc_modify_server.py diff --git a/plugins/modules/cloud/centurylink/clc_publicip.py b/plugins/modules/clc_publicip.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_publicip.py rename to plugins/modules/clc_publicip.py diff --git a/plugins/modules/cloud/centurylink/clc_server.py b/plugins/modules/clc_server.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_server.py rename to plugins/modules/clc_server.py diff --git a/plugins/modules/cloud/centurylink/clc_server_snapshot.py b/plugins/modules/clc_server_snapshot.py similarity index 100% rename from plugins/modules/cloud/centurylink/clc_server_snapshot.py rename to plugins/modules/clc_server_snapshot.py diff --git a/plugins/modules/cloud/misc/cloud_init_data_facts.py b/plugins/modules/cloud_init_data_facts.py similarity index 100% rename from plugins/modules/cloud/misc/cloud_init_data_facts.py rename to plugins/modules/cloud_init_data_facts.py diff --git a/plugins/modules/net_tools/cloudflare_dns.py b/plugins/modules/cloudflare_dns.py similarity index 100% rename from plugins/modules/net_tools/cloudflare_dns.py rename to plugins/modules/cloudflare_dns.py diff --git a/plugins/modules/remote_management/cobbler/cobbler_sync.py b/plugins/modules/cobbler_sync.py similarity index 100% rename from plugins/modules/remote_management/cobbler/cobbler_sync.py rename to plugins/modules/cobbler_sync.py diff --git a/plugins/modules/remote_management/cobbler/cobbler_system.py b/plugins/modules/cobbler_system.py similarity index 100% rename from plugins/modules/remote_management/cobbler/cobbler_system.py rename to plugins/modules/cobbler_system.py diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/composer.py similarity index 100% rename from plugins/modules/packaging/language/composer.py rename to plugins/modules/composer.py diff --git a/plugins/modules/clustering/consul/consul.py b/plugins/modules/consul.py similarity index 100% rename from plugins/modules/clustering/consul/consul.py rename to plugins/modules/consul.py diff --git a/plugins/modules/clustering/consul/consul_acl.py b/plugins/modules/consul_acl.py similarity index 100% rename from plugins/modules/clustering/consul/consul_acl.py rename to plugins/modules/consul_acl.py diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/consul_kv.py similarity index 100% rename from plugins/modules/clustering/consul/consul_kv.py rename to plugins/modules/consul_kv.py diff --git a/plugins/modules/clustering/consul/consul_session.py b/plugins/modules/consul_session.py similarity index 100% rename from plugins/modules/clustering/consul/consul_session.py rename to plugins/modules/consul_session.py diff --git a/plugins/modules/packaging/os/copr.py b/plugins/modules/copr.py similarity index 100% rename from plugins/modules/packaging/os/copr.py rename to plugins/modules/copr.py diff --git a/plugins/modules/packaging/language/cpanm.py b/plugins/modules/cpanm.py similarity index 100% rename from plugins/modules/packaging/language/cpanm.py rename to plugins/modules/cpanm.py diff --git a/plugins/modules/system/cronvar.py b/plugins/modules/cronvar.py similarity index 100% rename from plugins/modules/system/cronvar.py rename to plugins/modules/cronvar.py diff --git a/plugins/modules/system/crypttab.py b/plugins/modules/crypttab.py similarity index 100% rename from plugins/modules/system/crypttab.py rename to plugins/modules/crypttab.py diff --git a/plugins/modules/monitoring/datadog/datadog_downtime.py b/plugins/modules/datadog_downtime.py similarity index 100% rename from plugins/modules/monitoring/datadog/datadog_downtime.py rename to plugins/modules/datadog_downtime.py diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/datadog_event.py similarity index 100% rename from plugins/modules/monitoring/datadog/datadog_event.py rename to plugins/modules/datadog_event.py diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/datadog_monitor.py similarity index 100% rename from plugins/modules/monitoring/datadog/datadog_monitor.py rename to plugins/modules/datadog_monitor.py diff --git a/plugins/modules/system/dconf.py b/plugins/modules/dconf.py similarity index 100% rename from plugins/modules/system/dconf.py rename to plugins/modules/dconf.py diff --git a/plugins/modules/web_infrastructure/deploy_helper.py b/plugins/modules/deploy_helper.py similarity index 100% rename from plugins/modules/web_infrastructure/deploy_helper.py rename to plugins/modules/deploy_helper.py diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_network.py b/plugins/modules/dimensiondata_network.py similarity index 100% rename from plugins/modules/cloud/dimensiondata/dimensiondata_network.py rename to plugins/modules/dimensiondata_network.py diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py b/plugins/modules/dimensiondata_vlan.py similarity index 100% rename from plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py rename to plugins/modules/dimensiondata_vlan.py diff --git a/plugins/modules/notification/discord.py b/plugins/modules/discord.py similarity index 100% rename from plugins/modules/notification/discord.py rename to plugins/modules/discord.py diff --git a/plugins/modules/web_infrastructure/django_manage.py b/plugins/modules/django_manage.py similarity index 100% rename from plugins/modules/web_infrastructure/django_manage.py rename to plugins/modules/django_manage.py diff --git a/plugins/modules/packaging/os/dnf_versionlock.py b/plugins/modules/dnf_versionlock.py similarity index 100% rename from plugins/modules/packaging/os/dnf_versionlock.py rename to plugins/modules/dnf_versionlock.py diff --git a/plugins/modules/net_tools/dnsimple.py b/plugins/modules/dnsimple.py similarity index 100% rename from plugins/modules/net_tools/dnsimple.py rename to plugins/modules/dnsimple.py diff --git a/plugins/modules/net_tools/dnsimple_info.py b/plugins/modules/dnsimple_info.py similarity index 100% rename from plugins/modules/net_tools/dnsimple_info.py rename to plugins/modules/dnsimple_info.py diff --git a/plugins/modules/net_tools/dnsmadeeasy.py b/plugins/modules/dnsmadeeasy.py similarity index 100% rename from plugins/modules/net_tools/dnsmadeeasy.py rename to plugins/modules/dnsmadeeasy.py diff --git a/plugins/modules/system/dpkg_divert.py b/plugins/modules/dpkg_divert.py similarity index 100% rename from plugins/modules/system/dpkg_divert.py rename to plugins/modules/dpkg_divert.py diff --git a/plugins/modules/packaging/language/easy_install.py b/plugins/modules/easy_install.py similarity index 100% rename from plugins/modules/packaging/language/easy_install.py rename to plugins/modules/easy_install.py diff --git a/plugins/modules/web_infrastructure/ejabberd_user.py b/plugins/modules/ejabberd_user.py similarity index 100% rename from plugins/modules/web_infrastructure/ejabberd_user.py rename to plugins/modules/ejabberd_user.py diff --git a/plugins/modules/database/misc/elasticsearch_plugin.py b/plugins/modules/elasticsearch_plugin.py similarity index 100% rename from plugins/modules/database/misc/elasticsearch_plugin.py rename to plugins/modules/elasticsearch_plugin.py diff --git a/plugins/modules/storage/emc/emc_vnx_sg_member.py b/plugins/modules/emc_vnx_sg_member.py similarity index 100% rename from plugins/modules/storage/emc/emc_vnx_sg_member.py rename to plugins/modules/emc_vnx_sg_member.py diff --git a/plugins/modules/clustering/etcd3.py b/plugins/modules/etcd3.py similarity index 100% rename from plugins/modules/clustering/etcd3.py rename to plugins/modules/etcd3.py diff --git a/plugins/modules/system/facter.py b/plugins/modules/facter.py similarity index 100% rename from plugins/modules/system/facter.py rename to plugins/modules/facter.py diff --git a/plugins/modules/files/filesize.py b/plugins/modules/filesize.py similarity index 100% rename from plugins/modules/files/filesize.py rename to plugins/modules/filesize.py diff --git a/plugins/modules/system/filesystem.py b/plugins/modules/filesystem.py similarity index 100% rename from plugins/modules/system/filesystem.py rename to plugins/modules/filesystem.py diff --git a/plugins/modules/packaging/os/flatpak.py b/plugins/modules/flatpak.py similarity index 100% rename from plugins/modules/packaging/os/flatpak.py rename to plugins/modules/flatpak.py diff --git a/plugins/modules/packaging/os/flatpak_remote.py b/plugins/modules/flatpak_remote.py similarity index 100% rename from plugins/modules/packaging/os/flatpak_remote.py rename to plugins/modules/flatpak_remote.py diff --git a/plugins/modules/notification/flowdock.py b/plugins/modules/flowdock.py similarity index 100% rename from plugins/modules/notification/flowdock.py rename to plugins/modules/flowdock.py diff --git a/plugins/modules/net_tools/gandi_livedns.py b/plugins/modules/gandi_livedns.py similarity index 100% rename from plugins/modules/net_tools/gandi_livedns.py rename to plugins/modules/gandi_livedns.py diff --git a/plugins/modules/system/gconftool2.py b/plugins/modules/gconftool2.py similarity index 100% rename from plugins/modules/system/gconftool2.py rename to plugins/modules/gconftool2.py diff --git a/plugins/modules/system/gconftool2_info.py b/plugins/modules/gconftool2_info.py similarity index 100% rename from plugins/modules/system/gconftool2_info.py rename to plugins/modules/gconftool2_info.py diff --git a/plugins/modules/packaging/language/gem.py b/plugins/modules/gem.py similarity index 100% rename from plugins/modules/packaging/language/gem.py rename to plugins/modules/gem.py diff --git a/plugins/modules/source_control/git_config.py b/plugins/modules/git_config.py similarity index 100% rename from plugins/modules/source_control/git_config.py rename to plugins/modules/git_config.py diff --git a/plugins/modules/source_control/github/github_deploy_key.py b/plugins/modules/github_deploy_key.py similarity index 100% rename from plugins/modules/source_control/github/github_deploy_key.py rename to plugins/modules/github_deploy_key.py diff --git a/plugins/modules/source_control/github/github_issue.py b/plugins/modules/github_issue.py similarity index 100% rename from plugins/modules/source_control/github/github_issue.py rename to plugins/modules/github_issue.py diff --git a/plugins/modules/source_control/github/github_key.py b/plugins/modules/github_key.py similarity index 100% rename from plugins/modules/source_control/github/github_key.py rename to plugins/modules/github_key.py diff --git a/plugins/modules/source_control/github/github_release.py b/plugins/modules/github_release.py similarity index 100% rename from plugins/modules/source_control/github/github_release.py rename to plugins/modules/github_release.py diff --git a/plugins/modules/source_control/github/github_repo.py b/plugins/modules/github_repo.py similarity index 100% rename from plugins/modules/source_control/github/github_repo.py rename to plugins/modules/github_repo.py diff --git a/plugins/modules/source_control/github/github_webhook.py b/plugins/modules/github_webhook.py similarity index 100% rename from plugins/modules/source_control/github/github_webhook.py rename to plugins/modules/github_webhook.py diff --git a/plugins/modules/source_control/github/github_webhook_info.py b/plugins/modules/github_webhook_info.py similarity index 100% rename from plugins/modules/source_control/github/github_webhook_info.py rename to plugins/modules/github_webhook_info.py diff --git a/plugins/modules/source_control/gitlab/gitlab_branch.py b/plugins/modules/gitlab_branch.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_branch.py rename to plugins/modules/gitlab_branch.py diff --git a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py b/plugins/modules/gitlab_deploy_key.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_deploy_key.py rename to plugins/modules/gitlab_deploy_key.py diff --git a/plugins/modules/source_control/gitlab/gitlab_group.py b/plugins/modules/gitlab_group.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_group.py rename to plugins/modules/gitlab_group.py diff --git a/plugins/modules/source_control/gitlab/gitlab_group_members.py b/plugins/modules/gitlab_group_members.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_group_members.py rename to plugins/modules/gitlab_group_members.py diff --git a/plugins/modules/source_control/gitlab/gitlab_group_variable.py b/plugins/modules/gitlab_group_variable.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_group_variable.py rename to plugins/modules/gitlab_group_variable.py diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/gitlab_hook.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_hook.py rename to plugins/modules/gitlab_hook.py diff --git a/plugins/modules/source_control/gitlab/gitlab_project.py b/plugins/modules/gitlab_project.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_project.py rename to plugins/modules/gitlab_project.py diff --git a/plugins/modules/source_control/gitlab/gitlab_project_members.py b/plugins/modules/gitlab_project_members.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_project_members.py rename to plugins/modules/gitlab_project_members.py diff --git a/plugins/modules/source_control/gitlab/gitlab_project_variable.py b/plugins/modules/gitlab_project_variable.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_project_variable.py rename to plugins/modules/gitlab_project_variable.py diff --git a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py b/plugins/modules/gitlab_protected_branch.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_protected_branch.py rename to plugins/modules/gitlab_protected_branch.py diff --git a/plugins/modules/source_control/gitlab/gitlab_runner.py b/plugins/modules/gitlab_runner.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_runner.py rename to plugins/modules/gitlab_runner.py diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/gitlab_user.py similarity index 100% rename from plugins/modules/source_control/gitlab/gitlab_user.py rename to plugins/modules/gitlab_user.py diff --git a/plugins/modules/notification/grove.py b/plugins/modules/grove.py similarity index 100% rename from plugins/modules/notification/grove.py rename to plugins/modules/grove.py diff --git a/plugins/modules/web_infrastructure/gunicorn.py b/plugins/modules/gunicorn.py similarity index 100% rename from plugins/modules/web_infrastructure/gunicorn.py rename to plugins/modules/gunicorn.py diff --git a/plugins/modules/database/saphana/hana_query.py b/plugins/modules/hana_query.py similarity index 100% rename from plugins/modules/database/saphana/hana_query.py rename to plugins/modules/hana_query.py diff --git a/plugins/modules/net_tools/haproxy.py b/plugins/modules/haproxy.py similarity index 100% rename from plugins/modules/net_tools/haproxy.py rename to plugins/modules/haproxy.py diff --git a/plugins/modules/cloud/heroku/heroku_collaborator.py b/plugins/modules/heroku_collaborator.py similarity index 100% rename from plugins/modules/cloud/heroku/heroku_collaborator.py rename to plugins/modules/heroku_collaborator.py diff --git a/plugins/modules/source_control/hg.py b/plugins/modules/hg.py similarity index 100% rename from plugins/modules/source_control/hg.py rename to plugins/modules/hg.py diff --git a/plugins/modules/notification/hipchat.py b/plugins/modules/hipchat.py similarity index 100% rename from plugins/modules/notification/hipchat.py rename to plugins/modules/hipchat.py diff --git a/plugins/modules/packaging/os/homebrew.py b/plugins/modules/homebrew.py similarity index 100% rename from plugins/modules/packaging/os/homebrew.py rename to plugins/modules/homebrew.py diff --git a/plugins/modules/packaging/os/homebrew_cask.py b/plugins/modules/homebrew_cask.py similarity index 100% rename from plugins/modules/packaging/os/homebrew_cask.py rename to plugins/modules/homebrew_cask.py diff --git a/plugins/modules/packaging/os/homebrew_tap.py b/plugins/modules/homebrew_tap.py similarity index 100% rename from plugins/modules/packaging/os/homebrew_tap.py rename to plugins/modules/homebrew_tap.py diff --git a/plugins/modules/system/homectl.py b/plugins/modules/homectl.py similarity index 100% rename from plugins/modules/system/homectl.py rename to plugins/modules/homectl.py diff --git a/plugins/modules/monitoring/honeybadger_deployment.py b/plugins/modules/honeybadger_deployment.py similarity index 100% rename from plugins/modules/monitoring/honeybadger_deployment.py rename to plugins/modules/honeybadger_deployment.py diff --git a/plugins/modules/remote_management/hpilo/hpilo_boot.py b/plugins/modules/hpilo_boot.py similarity index 100% rename from plugins/modules/remote_management/hpilo/hpilo_boot.py rename to plugins/modules/hpilo_boot.py diff --git a/plugins/modules/remote_management/hpilo/hpilo_info.py b/plugins/modules/hpilo_info.py similarity index 100% rename from plugins/modules/remote_management/hpilo/hpilo_info.py rename to plugins/modules/hpilo_info.py diff --git a/plugins/modules/remote_management/hpilo/hponcfg.py b/plugins/modules/hponcfg.py similarity index 100% rename from plugins/modules/remote_management/hpilo/hponcfg.py rename to plugins/modules/hponcfg.py diff --git a/plugins/modules/web_infrastructure/htpasswd.py b/plugins/modules/htpasswd.py similarity index 100% rename from plugins/modules/web_infrastructure/htpasswd.py rename to plugins/modules/htpasswd.py diff --git a/plugins/modules/cloud/huawei/hwc_ecs_instance.py b/plugins/modules/hwc_ecs_instance.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_ecs_instance.py rename to plugins/modules/hwc_ecs_instance.py diff --git a/plugins/modules/cloud/huawei/hwc_evs_disk.py b/plugins/modules/hwc_evs_disk.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_evs_disk.py rename to plugins/modules/hwc_evs_disk.py diff --git a/plugins/modules/cloud/huawei/hwc_network_vpc.py b/plugins/modules/hwc_network_vpc.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_network_vpc.py rename to plugins/modules/hwc_network_vpc.py diff --git a/plugins/modules/cloud/huawei/hwc_smn_topic.py b/plugins/modules/hwc_smn_topic.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_smn_topic.py rename to plugins/modules/hwc_smn_topic.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_eip.py b/plugins/modules/hwc_vpc_eip.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_eip.py rename to plugins/modules/hwc_vpc_eip.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py b/plugins/modules/hwc_vpc_peering_connect.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_peering_connect.py rename to plugins/modules/hwc_vpc_peering_connect.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_port.py b/plugins/modules/hwc_vpc_port.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_port.py rename to plugins/modules/hwc_vpc_port.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_private_ip.py b/plugins/modules/hwc_vpc_private_ip.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_private_ip.py rename to plugins/modules/hwc_vpc_private_ip.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_route.py b/plugins/modules/hwc_vpc_route.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_route.py rename to plugins/modules/hwc_vpc_route.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_security_group.py b/plugins/modules/hwc_vpc_security_group.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_security_group.py rename to plugins/modules/hwc_vpc_security_group.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_security_group_rule.py b/plugins/modules/hwc_vpc_security_group_rule.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_security_group_rule.py rename to plugins/modules/hwc_vpc_security_group_rule.py diff --git a/plugins/modules/cloud/huawei/hwc_vpc_subnet.py b/plugins/modules/hwc_vpc_subnet.py similarity index 100% rename from plugins/modules/cloud/huawei/hwc_vpc_subnet.py rename to plugins/modules/hwc_vpc_subnet.py diff --git a/plugins/modules/storage/ibm/ibm_sa_domain.py b/plugins/modules/ibm_sa_domain.py similarity index 100% rename from plugins/modules/storage/ibm/ibm_sa_domain.py rename to plugins/modules/ibm_sa_domain.py diff --git a/plugins/modules/storage/ibm/ibm_sa_host.py b/plugins/modules/ibm_sa_host.py similarity index 100% rename from plugins/modules/storage/ibm/ibm_sa_host.py rename to plugins/modules/ibm_sa_host.py diff --git a/plugins/modules/storage/ibm/ibm_sa_host_ports.py b/plugins/modules/ibm_sa_host_ports.py similarity index 100% rename from plugins/modules/storage/ibm/ibm_sa_host_ports.py rename to plugins/modules/ibm_sa_host_ports.py diff --git a/plugins/modules/storage/ibm/ibm_sa_pool.py b/plugins/modules/ibm_sa_pool.py similarity index 100% rename from plugins/modules/storage/ibm/ibm_sa_pool.py rename to plugins/modules/ibm_sa_pool.py diff --git a/plugins/modules/storage/ibm/ibm_sa_vol.py b/plugins/modules/ibm_sa_vol.py similarity index 100% rename from plugins/modules/storage/ibm/ibm_sa_vol.py rename to plugins/modules/ibm_sa_vol.py diff --git a/plugins/modules/storage/ibm/ibm_sa_vol_map.py b/plugins/modules/ibm_sa_vol_map.py similarity index 100% rename from plugins/modules/storage/ibm/ibm_sa_vol_map.py rename to plugins/modules/ibm_sa_vol_map.py diff --git a/plugins/modules/monitoring/icinga2_feature.py b/plugins/modules/icinga2_feature.py similarity index 100% rename from plugins/modules/monitoring/icinga2_feature.py rename to plugins/modules/icinga2_feature.py diff --git a/plugins/modules/monitoring/icinga2_host.py b/plugins/modules/icinga2_host.py similarity index 100% rename from plugins/modules/monitoring/icinga2_host.py rename to plugins/modules/icinga2_host.py diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_command.py b/plugins/modules/idrac_redfish_command.py similarity index 100% rename from plugins/modules/remote_management/redfish/idrac_redfish_command.py rename to plugins/modules/idrac_redfish_command.py diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_config.py b/plugins/modules/idrac_redfish_config.py similarity index 100% rename from plugins/modules/remote_management/redfish/idrac_redfish_config.py rename to plugins/modules/idrac_redfish_config.py diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_info.py b/plugins/modules/idrac_redfish_info.py similarity index 100% rename from plugins/modules/remote_management/redfish/idrac_redfish_info.py rename to plugins/modules/idrac_redfish_info.py diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_config.py b/plugins/modules/ilo_redfish_config.py similarity index 100% rename from plugins/modules/remote_management/redfish/ilo_redfish_config.py rename to plugins/modules/ilo_redfish_config.py diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/ilo_redfish_info.py similarity index 100% rename from plugins/modules/remote_management/redfish/ilo_redfish_info.py rename to plugins/modules/ilo_redfish_info.py diff --git a/plugins/modules/remote_management/imc/imc_rest.py b/plugins/modules/imc_rest.py similarity index 100% rename from plugins/modules/remote_management/imc/imc_rest.py rename to plugins/modules/imc_rest.py diff --git a/plugins/modules/cloud/smartos/imgadm.py b/plugins/modules/imgadm.py similarity index 100% rename from plugins/modules/cloud/smartos/imgadm.py rename to plugins/modules/imgadm.py diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/infinity.py similarity index 100% rename from plugins/modules/net_tools/infinity/infinity.py rename to plugins/modules/infinity.py diff --git a/plugins/modules/database/influxdb/influxdb_database.py b/plugins/modules/influxdb_database.py similarity index 100% rename from plugins/modules/database/influxdb/influxdb_database.py rename to plugins/modules/influxdb_database.py diff --git a/plugins/modules/database/influxdb/influxdb_query.py b/plugins/modules/influxdb_query.py similarity index 100% rename from plugins/modules/database/influxdb/influxdb_query.py rename to plugins/modules/influxdb_query.py diff --git a/plugins/modules/database/influxdb/influxdb_retention_policy.py b/plugins/modules/influxdb_retention_policy.py similarity index 100% rename from plugins/modules/database/influxdb/influxdb_retention_policy.py rename to plugins/modules/influxdb_retention_policy.py diff --git a/plugins/modules/database/influxdb/influxdb_user.py b/plugins/modules/influxdb_user.py similarity index 100% rename from plugins/modules/database/influxdb/influxdb_user.py rename to plugins/modules/influxdb_user.py diff --git a/plugins/modules/database/influxdb/influxdb_write.py b/plugins/modules/influxdb_write.py similarity index 100% rename from plugins/modules/database/influxdb/influxdb_write.py rename to plugins/modules/influxdb_write.py diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/ini_file.py similarity index 100% rename from plugins/modules/files/ini_file.py rename to plugins/modules/ini_file.py diff --git a/plugins/modules/packaging/os/installp.py b/plugins/modules/installp.py similarity index 100% rename from plugins/modules/packaging/os/installp.py rename to plugins/modules/installp.py diff --git a/plugins/modules/system/interfaces_file.py b/plugins/modules/interfaces_file.py similarity index 100% rename from plugins/modules/system/interfaces_file.py rename to plugins/modules/interfaces_file.py diff --git a/plugins/modules/net_tools/ip_netns.py b/plugins/modules/ip_netns.py similarity index 100% rename from plugins/modules/net_tools/ip_netns.py rename to plugins/modules/ip_netns.py diff --git a/plugins/modules/identity/ipa/ipa_config.py b/plugins/modules/ipa_config.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_config.py rename to plugins/modules/ipa_config.py diff --git a/plugins/modules/identity/ipa/ipa_dnsrecord.py b/plugins/modules/ipa_dnsrecord.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_dnsrecord.py rename to plugins/modules/ipa_dnsrecord.py diff --git a/plugins/modules/identity/ipa/ipa_dnszone.py b/plugins/modules/ipa_dnszone.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_dnszone.py rename to plugins/modules/ipa_dnszone.py diff --git a/plugins/modules/identity/ipa/ipa_group.py b/plugins/modules/ipa_group.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_group.py rename to plugins/modules/ipa_group.py diff --git a/plugins/modules/identity/ipa/ipa_hbacrule.py b/plugins/modules/ipa_hbacrule.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_hbacrule.py rename to plugins/modules/ipa_hbacrule.py diff --git a/plugins/modules/identity/ipa/ipa_host.py b/plugins/modules/ipa_host.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_host.py rename to plugins/modules/ipa_host.py diff --git a/plugins/modules/identity/ipa/ipa_hostgroup.py b/plugins/modules/ipa_hostgroup.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_hostgroup.py rename to plugins/modules/ipa_hostgroup.py diff --git a/plugins/modules/identity/ipa/ipa_otpconfig.py b/plugins/modules/ipa_otpconfig.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_otpconfig.py rename to plugins/modules/ipa_otpconfig.py diff --git a/plugins/modules/identity/ipa/ipa_otptoken.py b/plugins/modules/ipa_otptoken.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_otptoken.py rename to plugins/modules/ipa_otptoken.py diff --git a/plugins/modules/identity/ipa/ipa_pwpolicy.py b/plugins/modules/ipa_pwpolicy.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_pwpolicy.py rename to plugins/modules/ipa_pwpolicy.py diff --git a/plugins/modules/identity/ipa/ipa_role.py b/plugins/modules/ipa_role.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_role.py rename to plugins/modules/ipa_role.py diff --git a/plugins/modules/identity/ipa/ipa_service.py b/plugins/modules/ipa_service.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_service.py rename to plugins/modules/ipa_service.py diff --git a/plugins/modules/identity/ipa/ipa_subca.py b/plugins/modules/ipa_subca.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_subca.py rename to plugins/modules/ipa_subca.py diff --git a/plugins/modules/identity/ipa/ipa_sudocmd.py b/plugins/modules/ipa_sudocmd.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_sudocmd.py rename to plugins/modules/ipa_sudocmd.py diff --git a/plugins/modules/identity/ipa/ipa_sudocmdgroup.py b/plugins/modules/ipa_sudocmdgroup.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_sudocmdgroup.py rename to plugins/modules/ipa_sudocmdgroup.py diff --git a/plugins/modules/identity/ipa/ipa_sudorule.py b/plugins/modules/ipa_sudorule.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_sudorule.py rename to plugins/modules/ipa_sudorule.py diff --git a/plugins/modules/identity/ipa/ipa_user.py b/plugins/modules/ipa_user.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_user.py rename to plugins/modules/ipa_user.py diff --git a/plugins/modules/identity/ipa/ipa_vault.py b/plugins/modules/ipa_vault.py similarity index 100% rename from plugins/modules/identity/ipa/ipa_vault.py rename to plugins/modules/ipa_vault.py diff --git a/plugins/modules/net_tools/ipify_facts.py b/plugins/modules/ipify_facts.py similarity index 100% rename from plugins/modules/net_tools/ipify_facts.py rename to plugins/modules/ipify_facts.py diff --git a/plugins/modules/net_tools/ipinfoio_facts.py b/plugins/modules/ipinfoio_facts.py similarity index 100% rename from plugins/modules/net_tools/ipinfoio_facts.py rename to plugins/modules/ipinfoio_facts.py diff --git a/plugins/modules/remote_management/ipmi/ipmi_boot.py b/plugins/modules/ipmi_boot.py similarity index 100% rename from plugins/modules/remote_management/ipmi/ipmi_boot.py rename to plugins/modules/ipmi_boot.py diff --git a/plugins/modules/remote_management/ipmi/ipmi_power.py b/plugins/modules/ipmi_power.py similarity index 100% rename from plugins/modules/remote_management/ipmi/ipmi_power.py rename to plugins/modules/ipmi_power.py diff --git a/plugins/modules/system/iptables_state.py b/plugins/modules/iptables_state.py similarity index 100% rename from plugins/modules/system/iptables_state.py rename to plugins/modules/iptables_state.py diff --git a/plugins/modules/net_tools/ipwcli_dns.py b/plugins/modules/ipwcli_dns.py similarity index 100% rename from plugins/modules/net_tools/ipwcli_dns.py rename to plugins/modules/ipwcli_dns.py diff --git a/plugins/modules/notification/irc.py b/plugins/modules/irc.py similarity index 100% rename from plugins/modules/notification/irc.py rename to plugins/modules/irc.py diff --git a/plugins/modules/files/iso_create.py b/plugins/modules/iso_create.py similarity index 100% rename from plugins/modules/files/iso_create.py rename to plugins/modules/iso_create.py diff --git a/plugins/modules/files/iso_customize.py b/plugins/modules/iso_customize.py similarity index 100% rename from plugins/modules/files/iso_customize.py rename to plugins/modules/iso_customize.py diff --git a/plugins/modules/files/iso_extract.py b/plugins/modules/iso_extract.py similarity index 100% rename from plugins/modules/files/iso_extract.py rename to plugins/modules/iso_extract.py diff --git a/plugins/modules/notification/jabber.py b/plugins/modules/jabber.py similarity index 100% rename from plugins/modules/notification/jabber.py rename to plugins/modules/jabber.py diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/java_cert.py similarity index 100% rename from plugins/modules/system/java_cert.py rename to plugins/modules/java_cert.py diff --git a/plugins/modules/system/java_keystore.py b/plugins/modules/java_keystore.py similarity index 100% rename from plugins/modules/system/java_keystore.py rename to plugins/modules/java_keystore.py diff --git a/plugins/modules/web_infrastructure/jboss.py b/plugins/modules/jboss.py similarity index 100% rename from plugins/modules/web_infrastructure/jboss.py rename to plugins/modules/jboss.py diff --git a/plugins/modules/web_infrastructure/jenkins_build.py b/plugins/modules/jenkins_build.py similarity index 100% rename from plugins/modules/web_infrastructure/jenkins_build.py rename to plugins/modules/jenkins_build.py diff --git a/plugins/modules/web_infrastructure/jenkins_job.py b/plugins/modules/jenkins_job.py similarity index 100% rename from plugins/modules/web_infrastructure/jenkins_job.py rename to plugins/modules/jenkins_job.py diff --git a/plugins/modules/web_infrastructure/jenkins_job_info.py b/plugins/modules/jenkins_job_info.py similarity index 100% rename from plugins/modules/web_infrastructure/jenkins_job_info.py rename to plugins/modules/jenkins_job_info.py diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/jenkins_plugin.py similarity index 100% rename from plugins/modules/web_infrastructure/jenkins_plugin.py rename to plugins/modules/jenkins_plugin.py diff --git a/plugins/modules/web_infrastructure/jenkins_script.py b/plugins/modules/jenkins_script.py similarity index 100% rename from plugins/modules/web_infrastructure/jenkins_script.py rename to plugins/modules/jenkins_script.py diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/jira.py similarity index 100% rename from plugins/modules/web_infrastructure/jira.py rename to plugins/modules/jira.py diff --git a/plugins/modules/system/kernel_blacklist.py b/plugins/modules/kernel_blacklist.py similarity index 100% rename from plugins/modules/system/kernel_blacklist.py rename to plugins/modules/kernel_blacklist.py diff --git a/plugins/modules/identity/keycloak/keycloak_authentication.py b/plugins/modules/keycloak_authentication.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_authentication.py rename to plugins/modules/keycloak_authentication.py diff --git a/plugins/modules/identity/keycloak/keycloak_client.py b/plugins/modules/keycloak_client.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_client.py rename to plugins/modules/keycloak_client.py diff --git a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py b/plugins/modules/keycloak_client_rolemapping.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_client_rolemapping.py rename to plugins/modules/keycloak_client_rolemapping.py diff --git a/plugins/modules/identity/keycloak/keycloak_clientscope.py b/plugins/modules/keycloak_clientscope.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_clientscope.py rename to plugins/modules/keycloak_clientscope.py diff --git a/plugins/modules/identity/keycloak/keycloak_clienttemplate.py b/plugins/modules/keycloak_clienttemplate.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_clienttemplate.py rename to plugins/modules/keycloak_clienttemplate.py diff --git a/plugins/modules/identity/keycloak/keycloak_group.py b/plugins/modules/keycloak_group.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_group.py rename to plugins/modules/keycloak_group.py diff --git a/plugins/modules/identity/keycloak/keycloak_identity_provider.py b/plugins/modules/keycloak_identity_provider.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_identity_provider.py rename to plugins/modules/keycloak_identity_provider.py diff --git a/plugins/modules/identity/keycloak/keycloak_realm.py b/plugins/modules/keycloak_realm.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_realm.py rename to plugins/modules/keycloak_realm.py diff --git a/plugins/modules/identity/keycloak/keycloak_realm_info.py b/plugins/modules/keycloak_realm_info.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_realm_info.py rename to plugins/modules/keycloak_realm_info.py diff --git a/plugins/modules/identity/keycloak/keycloak_role.py b/plugins/modules/keycloak_role.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_role.py rename to plugins/modules/keycloak_role.py diff --git a/plugins/modules/identity/keycloak/keycloak_user_federation.py b/plugins/modules/keycloak_user_federation.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_user_federation.py rename to plugins/modules/keycloak_user_federation.py diff --git a/plugins/modules/identity/keycloak/keycloak_user_rolemapping.py b/plugins/modules/keycloak_user_rolemapping.py similarity index 100% rename from plugins/modules/identity/keycloak/keycloak_user_rolemapping.py rename to plugins/modules/keycloak_user_rolemapping.py diff --git a/plugins/modules/system/keyring.py b/plugins/modules/keyring.py similarity index 100% rename from plugins/modules/system/keyring.py rename to plugins/modules/keyring.py diff --git a/plugins/modules/system/keyring_info.py b/plugins/modules/keyring_info.py similarity index 100% rename from plugins/modules/system/keyring_info.py rename to plugins/modules/keyring_info.py diff --git a/plugins/modules/database/misc/kibana_plugin.py b/plugins/modules/kibana_plugin.py similarity index 100% rename from plugins/modules/database/misc/kibana_plugin.py rename to plugins/modules/kibana_plugin.py diff --git a/plugins/modules/system/launchd.py b/plugins/modules/launchd.py similarity index 100% rename from plugins/modules/system/launchd.py rename to plugins/modules/launchd.py diff --git a/plugins/modules/packaging/os/layman.py b/plugins/modules/layman.py similarity index 100% rename from plugins/modules/packaging/os/layman.py rename to plugins/modules/layman.py diff --git a/plugins/modules/system/lbu.py b/plugins/modules/lbu.py similarity index 100% rename from plugins/modules/system/lbu.py rename to plugins/modules/lbu.py diff --git a/plugins/modules/net_tools/ldap/ldap_attrs.py b/plugins/modules/ldap_attrs.py similarity index 100% rename from plugins/modules/net_tools/ldap/ldap_attrs.py rename to plugins/modules/ldap_attrs.py diff --git a/plugins/modules/net_tools/ldap/ldap_entry.py b/plugins/modules/ldap_entry.py similarity index 100% rename from plugins/modules/net_tools/ldap/ldap_entry.py rename to plugins/modules/ldap_entry.py diff --git a/plugins/modules/net_tools/ldap/ldap_passwd.py b/plugins/modules/ldap_passwd.py similarity index 100% rename from plugins/modules/net_tools/ldap/ldap_passwd.py rename to plugins/modules/ldap_passwd.py diff --git a/plugins/modules/net_tools/ldap/ldap_search.py b/plugins/modules/ldap_search.py similarity index 100% rename from plugins/modules/net_tools/ldap/ldap_search.py rename to plugins/modules/ldap_search.py diff --git a/plugins/modules/monitoring/librato_annotation.py b/plugins/modules/librato_annotation.py similarity index 100% rename from plugins/modules/monitoring/librato_annotation.py rename to plugins/modules/librato_annotation.py diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/linode.py similarity index 100% rename from plugins/modules/cloud/linode/linode.py rename to plugins/modules/linode.py diff --git a/plugins/modules/cloud/linode/linode_v4.py b/plugins/modules/linode_v4.py similarity index 100% rename from plugins/modules/cloud/linode/linode_v4.py rename to plugins/modules/linode_v4.py diff --git a/plugins/modules/system/listen_ports_facts.py b/plugins/modules/listen_ports_facts.py similarity index 100% rename from plugins/modules/system/listen_ports_facts.py rename to plugins/modules/listen_ports_facts.py diff --git a/plugins/modules/net_tools/lldp.py b/plugins/modules/lldp.py similarity index 100% rename from plugins/modules/net_tools/lldp.py rename to plugins/modules/lldp.py diff --git a/plugins/modules/system/locale_gen.py b/plugins/modules/locale_gen.py similarity index 100% rename from plugins/modules/system/locale_gen.py rename to plugins/modules/locale_gen.py diff --git a/plugins/modules/monitoring/logentries.py b/plugins/modules/logentries.py similarity index 100% rename from plugins/modules/monitoring/logentries.py rename to plugins/modules/logentries.py diff --git a/plugins/modules/notification/logentries_msg.py b/plugins/modules/logentries_msg.py similarity index 100% rename from plugins/modules/notification/logentries_msg.py rename to plugins/modules/logentries_msg.py diff --git a/plugins/modules/monitoring/logstash_plugin.py b/plugins/modules/logstash_plugin.py similarity index 100% rename from plugins/modules/monitoring/logstash_plugin.py rename to plugins/modules/logstash_plugin.py diff --git a/plugins/modules/system/lvg.py b/plugins/modules/lvg.py similarity index 100% rename from plugins/modules/system/lvg.py rename to plugins/modules/lvg.py diff --git a/plugins/modules/system/lvol.py b/plugins/modules/lvol.py similarity index 100% rename from plugins/modules/system/lvol.py rename to plugins/modules/lvol.py diff --git a/plugins/modules/cloud/lxc/lxc_container.py b/plugins/modules/lxc_container.py similarity index 100% rename from plugins/modules/cloud/lxc/lxc_container.py rename to plugins/modules/lxc_container.py diff --git a/plugins/modules/remote_management/lxca/lxca_cmms.py b/plugins/modules/lxca_cmms.py similarity index 100% rename from plugins/modules/remote_management/lxca/lxca_cmms.py rename to plugins/modules/lxca_cmms.py diff --git a/plugins/modules/remote_management/lxca/lxca_nodes.py b/plugins/modules/lxca_nodes.py similarity index 100% rename from plugins/modules/remote_management/lxca/lxca_nodes.py rename to plugins/modules/lxca_nodes.py diff --git a/plugins/modules/cloud/lxd/lxd_container.py b/plugins/modules/lxd_container.py similarity index 100% rename from plugins/modules/cloud/lxd/lxd_container.py rename to plugins/modules/lxd_container.py diff --git a/plugins/modules/cloud/lxd/lxd_profile.py b/plugins/modules/lxd_profile.py similarity index 100% rename from plugins/modules/cloud/lxd/lxd_profile.py rename to plugins/modules/lxd_profile.py diff --git a/plugins/modules/cloud/lxd/lxd_project.py b/plugins/modules/lxd_project.py similarity index 100% rename from plugins/modules/cloud/lxd/lxd_project.py rename to plugins/modules/lxd_project.py diff --git a/plugins/modules/packaging/os/macports.py b/plugins/modules/macports.py similarity index 100% rename from plugins/modules/packaging/os/macports.py rename to plugins/modules/macports.py diff --git a/plugins/modules/notification/mail.py b/plugins/modules/mail.py similarity index 100% rename from plugins/modules/notification/mail.py rename to plugins/modules/mail.py diff --git a/plugins/modules/system/make.py b/plugins/modules/make.py similarity index 100% rename from plugins/modules/system/make.py rename to plugins/modules/make.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py b/plugins/modules/manageiq_alert_profiles.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py rename to plugins/modules/manageiq_alert_profiles.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_alerts.py b/plugins/modules/manageiq_alerts.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_alerts.py rename to plugins/modules/manageiq_alerts.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_group.py b/plugins/modules/manageiq_group.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_group.py rename to plugins/modules/manageiq_group.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_policies.py b/plugins/modules/manageiq_policies.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_policies.py rename to plugins/modules/manageiq_policies.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_policies_info.py b/plugins/modules/manageiq_policies_info.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_policies_info.py rename to plugins/modules/manageiq_policies_info.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_provider.py b/plugins/modules/manageiq_provider.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_provider.py rename to plugins/modules/manageiq_provider.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_tags.py b/plugins/modules/manageiq_tags.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_tags.py rename to plugins/modules/manageiq_tags.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_tags_info.py b/plugins/modules/manageiq_tags_info.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_tags_info.py rename to plugins/modules/manageiq_tags_info.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_tenant.py b/plugins/modules/manageiq_tenant.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_tenant.py rename to plugins/modules/manageiq_tenant.py diff --git a/plugins/modules/remote_management/manageiq/manageiq_user.py b/plugins/modules/manageiq_user.py similarity index 100% rename from plugins/modules/remote_management/manageiq/manageiq_user.py rename to plugins/modules/manageiq_user.py diff --git a/plugins/modules/packaging/os/mas.py b/plugins/modules/mas.py similarity index 100% rename from plugins/modules/packaging/os/mas.py rename to plugins/modules/mas.py diff --git a/plugins/modules/notification/matrix.py b/plugins/modules/matrix.py similarity index 100% rename from plugins/modules/notification/matrix.py rename to plugins/modules/matrix.py diff --git a/plugins/modules/notification/mattermost.py b/plugins/modules/mattermost.py similarity index 100% rename from plugins/modules/notification/mattermost.py rename to plugins/modules/mattermost.py diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/maven_artifact.py similarity index 100% rename from plugins/modules/packaging/language/maven_artifact.py rename to plugins/modules/maven_artifact.py diff --git a/plugins/modules/cloud/memset/memset_dns_reload.py b/plugins/modules/memset_dns_reload.py similarity index 100% rename from plugins/modules/cloud/memset/memset_dns_reload.py rename to plugins/modules/memset_dns_reload.py diff --git a/plugins/modules/cloud/memset/memset_memstore_info.py b/plugins/modules/memset_memstore_info.py similarity index 100% rename from plugins/modules/cloud/memset/memset_memstore_info.py rename to plugins/modules/memset_memstore_info.py diff --git a/plugins/modules/cloud/memset/memset_server_info.py b/plugins/modules/memset_server_info.py similarity index 100% rename from plugins/modules/cloud/memset/memset_server_info.py rename to plugins/modules/memset_server_info.py diff --git a/plugins/modules/cloud/memset/memset_zone.py b/plugins/modules/memset_zone.py similarity index 100% rename from plugins/modules/cloud/memset/memset_zone.py rename to plugins/modules/memset_zone.py diff --git a/plugins/modules/cloud/memset/memset_zone_domain.py b/plugins/modules/memset_zone_domain.py similarity index 100% rename from plugins/modules/cloud/memset/memset_zone_domain.py rename to plugins/modules/memset_zone_domain.py diff --git a/plugins/modules/cloud/memset/memset_zone_record.py b/plugins/modules/memset_zone_record.py similarity index 100% rename from plugins/modules/cloud/memset/memset_zone_record.py rename to plugins/modules/memset_zone_record.py diff --git a/plugins/modules/system/mksysb.py b/plugins/modules/mksysb.py similarity index 100% rename from plugins/modules/system/mksysb.py rename to plugins/modules/mksysb.py diff --git a/plugins/modules/system/modprobe.py b/plugins/modules/modprobe.py similarity index 100% rename from plugins/modules/system/modprobe.py rename to plugins/modules/modprobe.py diff --git a/plugins/modules/monitoring/monit.py b/plugins/modules/monit.py similarity index 100% rename from plugins/modules/monitoring/monit.py rename to plugins/modules/monit.py diff --git a/plugins/modules/notification/mqtt.py b/plugins/modules/mqtt.py similarity index 100% rename from plugins/modules/notification/mqtt.py rename to plugins/modules/mqtt.py diff --git a/plugins/modules/database/mssql/mssql_db.py b/plugins/modules/mssql_db.py similarity index 100% rename from plugins/modules/database/mssql/mssql_db.py rename to plugins/modules/mssql_db.py diff --git a/plugins/modules/database/mssql/mssql_script.py b/plugins/modules/mssql_script.py similarity index 100% rename from plugins/modules/database/mssql/mssql_script.py rename to plugins/modules/mssql_script.py diff --git a/plugins/modules/monitoring/nagios.py b/plugins/modules/nagios.py similarity index 100% rename from plugins/modules/monitoring/nagios.py rename to plugins/modules/nagios.py diff --git a/plugins/modules/net_tools/netcup_dns.py b/plugins/modules/netcup_dns.py similarity index 100% rename from plugins/modules/net_tools/netcup_dns.py rename to plugins/modules/netcup_dns.py diff --git a/plugins/modules/monitoring/newrelic_deployment.py b/plugins/modules/newrelic_deployment.py similarity index 100% rename from plugins/modules/monitoring/newrelic_deployment.py rename to plugins/modules/newrelic_deployment.py diff --git a/plugins/modules/notification/nexmo.py b/plugins/modules/nexmo.py similarity index 100% rename from plugins/modules/notification/nexmo.py rename to plugins/modules/nexmo.py diff --git a/plugins/modules/web_infrastructure/nginx_status_info.py b/plugins/modules/nginx_status_info.py similarity index 100% rename from plugins/modules/web_infrastructure/nginx_status_info.py rename to plugins/modules/nginx_status_info.py diff --git a/plugins/modules/cloud/smartos/nictagadm.py b/plugins/modules/nictagadm.py similarity index 100% rename from plugins/modules/cloud/smartos/nictagadm.py rename to plugins/modules/nictagadm.py diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/nmcli.py similarity index 100% rename from plugins/modules/net_tools/nmcli.py rename to plugins/modules/nmcli.py diff --git a/plugins/modules/clustering/nomad/nomad_job.py b/plugins/modules/nomad_job.py similarity index 100% rename from plugins/modules/clustering/nomad/nomad_job.py rename to plugins/modules/nomad_job.py diff --git a/plugins/modules/clustering/nomad/nomad_job_info.py b/plugins/modules/nomad_job_info.py similarity index 100% rename from plugins/modules/clustering/nomad/nomad_job_info.py rename to plugins/modules/nomad_job_info.py diff --git a/plugins/modules/system/nosh.py b/plugins/modules/nosh.py similarity index 100% rename from plugins/modules/system/nosh.py rename to plugins/modules/nosh.py diff --git a/plugins/modules/packaging/language/npm.py b/plugins/modules/npm.py similarity index 100% rename from plugins/modules/packaging/language/npm.py rename to plugins/modules/npm.py diff --git a/plugins/modules/net_tools/nsupdate.py b/plugins/modules/nsupdate.py similarity index 100% rename from plugins/modules/net_tools/nsupdate.py rename to plugins/modules/nsupdate.py diff --git a/plugins/modules/cloud/oracle/oci_vcn.py b/plugins/modules/oci_vcn.py similarity index 100% rename from plugins/modules/cloud/oracle/oci_vcn.py rename to plugins/modules/oci_vcn.py diff --git a/plugins/modules/database/misc/odbc.py b/plugins/modules/odbc.py similarity index 100% rename from plugins/modules/database/misc/odbc.py rename to plugins/modules/odbc.py diff --git a/plugins/modules/notification/office_365_connector_card.py b/plugins/modules/office_365_connector_card.py similarity index 100% rename from plugins/modules/notification/office_365_connector_card.py rename to plugins/modules/office_365_connector_card.py diff --git a/plugins/modules/system/ohai.py b/plugins/modules/ohai.py similarity index 100% rename from plugins/modules/system/ohai.py rename to plugins/modules/ohai.py diff --git a/plugins/modules/net_tools/omapi_host.py b/plugins/modules/omapi_host.py similarity index 100% rename from plugins/modules/net_tools/omapi_host.py rename to plugins/modules/omapi_host.py diff --git a/plugins/modules/cloud/opennebula/one_host.py b/plugins/modules/one_host.py similarity index 100% rename from plugins/modules/cloud/opennebula/one_host.py rename to plugins/modules/one_host.py diff --git a/plugins/modules/cloud/opennebula/one_image.py b/plugins/modules/one_image.py similarity index 100% rename from plugins/modules/cloud/opennebula/one_image.py rename to plugins/modules/one_image.py diff --git a/plugins/modules/cloud/opennebula/one_image_info.py b/plugins/modules/one_image_info.py similarity index 100% rename from plugins/modules/cloud/opennebula/one_image_info.py rename to plugins/modules/one_image_info.py diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/one_service.py similarity index 100% rename from plugins/modules/cloud/opennebula/one_service.py rename to plugins/modules/one_service.py diff --git a/plugins/modules/cloud/opennebula/one_template.py b/plugins/modules/one_template.py similarity index 100% rename from plugins/modules/cloud/opennebula/one_template.py rename to plugins/modules/one_template.py diff --git a/plugins/modules/cloud/opennebula/one_vm.py b/plugins/modules/one_vm.py similarity index 100% rename from plugins/modules/cloud/opennebula/one_vm.py rename to plugins/modules/one_vm.py diff --git a/plugins/modules/cloud/oneandone/oneandone_firewall_policy.py b/plugins/modules/oneandone_firewall_policy.py similarity index 100% rename from plugins/modules/cloud/oneandone/oneandone_firewall_policy.py rename to plugins/modules/oneandone_firewall_policy.py diff --git a/plugins/modules/cloud/oneandone/oneandone_load_balancer.py b/plugins/modules/oneandone_load_balancer.py similarity index 100% rename from plugins/modules/cloud/oneandone/oneandone_load_balancer.py rename to plugins/modules/oneandone_load_balancer.py diff --git a/plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py b/plugins/modules/oneandone_monitoring_policy.py similarity index 100% rename from plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py rename to plugins/modules/oneandone_monitoring_policy.py diff --git a/plugins/modules/cloud/oneandone/oneandone_private_network.py b/plugins/modules/oneandone_private_network.py similarity index 100% rename from plugins/modules/cloud/oneandone/oneandone_private_network.py rename to plugins/modules/oneandone_private_network.py diff --git a/plugins/modules/cloud/oneandone/oneandone_public_ip.py b/plugins/modules/oneandone_public_ip.py similarity index 100% rename from plugins/modules/cloud/oneandone/oneandone_public_ip.py rename to plugins/modules/oneandone_public_ip.py diff --git a/plugins/modules/cloud/oneandone/oneandone_server.py b/plugins/modules/oneandone_server.py similarity index 100% rename from plugins/modules/cloud/oneandone/oneandone_server.py rename to plugins/modules/oneandone_server.py diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/onepassword_info.py similarity index 100% rename from plugins/modules/identity/onepassword_info.py rename to plugins/modules/onepassword_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_datacenter_info.py b/plugins/modules/oneview_datacenter_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_datacenter_info.py rename to plugins/modules/oneview_datacenter_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_enclosure_info.py b/plugins/modules/oneview_enclosure_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_enclosure_info.py rename to plugins/modules/oneview_enclosure_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_ethernet_network.py b/plugins/modules/oneview_ethernet_network.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_ethernet_network.py rename to plugins/modules/oneview_ethernet_network.py diff --git a/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py b/plugins/modules/oneview_ethernet_network_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py rename to plugins/modules/oneview_ethernet_network_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_fc_network.py b/plugins/modules/oneview_fc_network.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_fc_network.py rename to plugins/modules/oneview_fc_network.py diff --git a/plugins/modules/remote_management/oneview/oneview_fc_network_info.py b/plugins/modules/oneview_fc_network_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_fc_network_info.py rename to plugins/modules/oneview_fc_network_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_fcoe_network.py b/plugins/modules/oneview_fcoe_network.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_fcoe_network.py rename to plugins/modules/oneview_fcoe_network.py diff --git a/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py b/plugins/modules/oneview_fcoe_network_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py rename to plugins/modules/oneview_fcoe_network_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group.py b/plugins/modules/oneview_logical_interconnect_group.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_logical_interconnect_group.py rename to plugins/modules/oneview_logical_interconnect_group.py diff --git a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py b/plugins/modules/oneview_logical_interconnect_group_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py rename to plugins/modules/oneview_logical_interconnect_group_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_network_set.py b/plugins/modules/oneview_network_set.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_network_set.py rename to plugins/modules/oneview_network_set.py diff --git a/plugins/modules/remote_management/oneview/oneview_network_set_info.py b/plugins/modules/oneview_network_set_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_network_set_info.py rename to plugins/modules/oneview_network_set_info.py diff --git a/plugins/modules/remote_management/oneview/oneview_san_manager.py b/plugins/modules/oneview_san_manager.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_san_manager.py rename to plugins/modules/oneview_san_manager.py diff --git a/plugins/modules/remote_management/oneview/oneview_san_manager_info.py b/plugins/modules/oneview_san_manager_info.py similarity index 100% rename from plugins/modules/remote_management/oneview/oneview_san_manager_info.py rename to plugins/modules/oneview_san_manager_info.py diff --git a/plugins/modules/cloud/online/online_server_info.py b/plugins/modules/online_server_info.py similarity index 100% rename from plugins/modules/cloud/online/online_server_info.py rename to plugins/modules/online_server_info.py diff --git a/plugins/modules/cloud/online/online_user_info.py b/plugins/modules/online_user_info.py similarity index 100% rename from plugins/modules/cloud/online/online_user_info.py rename to plugins/modules/online_user_info.py diff --git a/plugins/modules/system/open_iscsi.py b/plugins/modules/open_iscsi.py similarity index 100% rename from plugins/modules/system/open_iscsi.py rename to plugins/modules/open_iscsi.py diff --git a/plugins/modules/packaging/os/openbsd_pkg.py b/plugins/modules/openbsd_pkg.py similarity index 100% rename from plugins/modules/packaging/os/openbsd_pkg.py rename to plugins/modules/openbsd_pkg.py diff --git a/plugins/modules/identity/opendj/opendj_backendprop.py b/plugins/modules/opendj_backendprop.py similarity index 100% rename from plugins/modules/identity/opendj/opendj_backendprop.py rename to plugins/modules/opendj_backendprop.py diff --git a/plugins/modules/system/openwrt_init.py b/plugins/modules/openwrt_init.py similarity index 100% rename from plugins/modules/system/openwrt_init.py rename to plugins/modules/openwrt_init.py diff --git a/plugins/modules/packaging/os/opkg.py b/plugins/modules/opkg.py similarity index 100% rename from plugins/modules/packaging/os/opkg.py rename to plugins/modules/opkg.py diff --git a/plugins/modules/system/osx_defaults.py b/plugins/modules/osx_defaults.py similarity index 100% rename from plugins/modules/system/osx_defaults.py rename to plugins/modules/osx_defaults.py diff --git a/plugins/modules/cloud/ovh/ovh_ip_failover.py b/plugins/modules/ovh_ip_failover.py similarity index 100% rename from plugins/modules/cloud/ovh/ovh_ip_failover.py rename to plugins/modules/ovh_ip_failover.py diff --git a/plugins/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py b/plugins/modules/ovh_ip_loadbalancing_backend.py similarity index 100% rename from plugins/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py rename to plugins/modules/ovh_ip_loadbalancing_backend.py diff --git a/plugins/modules/cloud/ovh/ovh_monthly_billing.py b/plugins/modules/ovh_monthly_billing.py similarity index 100% rename from plugins/modules/cloud/ovh/ovh_monthly_billing.py rename to plugins/modules/ovh_monthly_billing.py diff --git a/plugins/modules/clustering/pacemaker_cluster.py b/plugins/modules/pacemaker_cluster.py similarity index 100% rename from plugins/modules/clustering/pacemaker_cluster.py rename to plugins/modules/pacemaker_cluster.py diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/packet_device.py similarity index 100% rename from plugins/modules/cloud/packet/packet_device.py rename to plugins/modules/packet_device.py diff --git a/plugins/modules/cloud/packet/packet_ip_subnet.py b/plugins/modules/packet_ip_subnet.py similarity index 100% rename from plugins/modules/cloud/packet/packet_ip_subnet.py rename to plugins/modules/packet_ip_subnet.py diff --git a/plugins/modules/cloud/packet/packet_project.py b/plugins/modules/packet_project.py similarity index 100% rename from plugins/modules/cloud/packet/packet_project.py rename to plugins/modules/packet_project.py diff --git a/plugins/modules/cloud/packet/packet_sshkey.py b/plugins/modules/packet_sshkey.py similarity index 100% rename from plugins/modules/cloud/packet/packet_sshkey.py rename to plugins/modules/packet_sshkey.py diff --git a/plugins/modules/cloud/packet/packet_volume.py b/plugins/modules/packet_volume.py similarity index 100% rename from plugins/modules/cloud/packet/packet_volume.py rename to plugins/modules/packet_volume.py diff --git a/plugins/modules/cloud/packet/packet_volume_attachment.py b/plugins/modules/packet_volume_attachment.py similarity index 100% rename from plugins/modules/cloud/packet/packet_volume_attachment.py rename to plugins/modules/packet_volume_attachment.py diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/pacman.py similarity index 100% rename from plugins/modules/packaging/os/pacman.py rename to plugins/modules/pacman.py diff --git a/plugins/modules/packaging/os/pacman_key.py b/plugins/modules/pacman_key.py similarity index 100% rename from plugins/modules/packaging/os/pacman_key.py rename to plugins/modules/pacman_key.py diff --git a/plugins/modules/monitoring/pagerduty.py b/plugins/modules/pagerduty.py similarity index 100% rename from plugins/modules/monitoring/pagerduty.py rename to plugins/modules/pagerduty.py diff --git a/plugins/modules/monitoring/pagerduty_alert.py b/plugins/modules/pagerduty_alert.py similarity index 100% rename from plugins/modules/monitoring/pagerduty_alert.py rename to plugins/modules/pagerduty_alert.py diff --git a/plugins/modules/monitoring/pagerduty_change.py b/plugins/modules/pagerduty_change.py similarity index 100% rename from plugins/modules/monitoring/pagerduty_change.py rename to plugins/modules/pagerduty_change.py diff --git a/plugins/modules/monitoring/pagerduty_user.py b/plugins/modules/pagerduty_user.py similarity index 100% rename from plugins/modules/monitoring/pagerduty_user.py rename to plugins/modules/pagerduty_user.py diff --git a/plugins/modules/system/pam_limits.py b/plugins/modules/pam_limits.py similarity index 100% rename from plugins/modules/system/pam_limits.py rename to plugins/modules/pam_limits.py diff --git a/plugins/modules/system/pamd.py b/plugins/modules/pamd.py similarity index 100% rename from plugins/modules/system/pamd.py rename to plugins/modules/pamd.py diff --git a/plugins/modules/system/parted.py b/plugins/modules/parted.py similarity index 100% rename from plugins/modules/system/parted.py rename to plugins/modules/parted.py diff --git a/plugins/modules/packaging/language/pear.py b/plugins/modules/pear.py similarity index 100% rename from plugins/modules/packaging/language/pear.py rename to plugins/modules/pear.py diff --git a/plugins/modules/system/pids.py b/plugins/modules/pids.py similarity index 100% rename from plugins/modules/system/pids.py rename to plugins/modules/pids.py diff --git a/plugins/modules/monitoring/pingdom.py b/plugins/modules/pingdom.py similarity index 100% rename from plugins/modules/monitoring/pingdom.py rename to plugins/modules/pingdom.py diff --git a/plugins/modules/packaging/language/pip_package_info.py b/plugins/modules/pip_package_info.py similarity index 100% rename from plugins/modules/packaging/language/pip_package_info.py rename to plugins/modules/pip_package_info.py diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/pipx.py similarity index 100% rename from plugins/modules/packaging/language/pipx.py rename to plugins/modules/pipx.py diff --git a/plugins/modules/packaging/language/pipx_info.py b/plugins/modules/pipx_info.py similarity index 100% rename from plugins/modules/packaging/language/pipx_info.py rename to plugins/modules/pipx_info.py diff --git a/plugins/modules/packaging/os/pkg5.py b/plugins/modules/pkg5.py similarity index 100% rename from plugins/modules/packaging/os/pkg5.py rename to plugins/modules/pkg5.py diff --git a/plugins/modules/packaging/os/pkg5_publisher.py b/plugins/modules/pkg5_publisher.py similarity index 100% rename from plugins/modules/packaging/os/pkg5_publisher.py rename to plugins/modules/pkg5_publisher.py diff --git a/plugins/modules/packaging/os/pkgin.py b/plugins/modules/pkgin.py similarity index 100% rename from plugins/modules/packaging/os/pkgin.py rename to plugins/modules/pkgin.py diff --git a/plugins/modules/packaging/os/pkgng.py b/plugins/modules/pkgng.py similarity index 100% rename from plugins/modules/packaging/os/pkgng.py rename to plugins/modules/pkgng.py diff --git a/plugins/modules/packaging/os/pkgutil.py b/plugins/modules/pkgutil.py similarity index 100% rename from plugins/modules/packaging/os/pkgutil.py rename to plugins/modules/pkgutil.py diff --git a/plugins/modules/storage/pmem/pmem.py b/plugins/modules/pmem.py similarity index 100% rename from plugins/modules/storage/pmem/pmem.py rename to plugins/modules/pmem.py diff --git a/plugins/modules/packaging/os/portage.py b/plugins/modules/portage.py similarity index 100% rename from plugins/modules/packaging/os/portage.py rename to plugins/modules/portage.py diff --git a/plugins/modules/packaging/os/portinstall.py b/plugins/modules/portinstall.py similarity index 100% rename from plugins/modules/packaging/os/portinstall.py rename to plugins/modules/portinstall.py diff --git a/plugins/modules/net_tools/pritunl/pritunl_org.py b/plugins/modules/pritunl_org.py similarity index 100% rename from plugins/modules/net_tools/pritunl/pritunl_org.py rename to plugins/modules/pritunl_org.py diff --git a/plugins/modules/net_tools/pritunl/pritunl_org_info.py b/plugins/modules/pritunl_org_info.py similarity index 100% rename from plugins/modules/net_tools/pritunl/pritunl_org_info.py rename to plugins/modules/pritunl_org_info.py diff --git a/plugins/modules/net_tools/pritunl/pritunl_user.py b/plugins/modules/pritunl_user.py similarity index 100% rename from plugins/modules/net_tools/pritunl/pritunl_user.py rename to plugins/modules/pritunl_user.py diff --git a/plugins/modules/net_tools/pritunl/pritunl_user_info.py b/plugins/modules/pritunl_user_info.py similarity index 100% rename from plugins/modules/net_tools/pritunl/pritunl_user_info.py rename to plugins/modules/pritunl_user_info.py diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/profitbricks.py similarity index 100% rename from plugins/modules/cloud/profitbricks/profitbricks.py rename to plugins/modules/profitbricks.py diff --git a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py b/plugins/modules/profitbricks_datacenter.py similarity index 100% rename from plugins/modules/cloud/profitbricks/profitbricks_datacenter.py rename to plugins/modules/profitbricks_datacenter.py diff --git a/plugins/modules/cloud/profitbricks/profitbricks_nic.py b/plugins/modules/profitbricks_nic.py similarity index 100% rename from plugins/modules/cloud/profitbricks/profitbricks_nic.py rename to plugins/modules/profitbricks_nic.py diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/profitbricks_volume.py similarity index 100% rename from plugins/modules/cloud/profitbricks/profitbricks_volume.py rename to plugins/modules/profitbricks_volume.py diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py b/plugins/modules/profitbricks_volume_attachments.py similarity index 100% rename from plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py rename to plugins/modules/profitbricks_volume_attachments.py diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/proxmox.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox.py rename to plugins/modules/proxmox.py diff --git a/plugins/modules/cloud/misc/proxmox_disk.py b/plugins/modules/proxmox_disk.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_disk.py rename to plugins/modules/proxmox_disk.py diff --git a/plugins/modules/cloud/misc/proxmox_domain_info.py b/plugins/modules/proxmox_domain_info.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_domain_info.py rename to plugins/modules/proxmox_domain_info.py diff --git a/plugins/modules/cloud/misc/proxmox_group_info.py b/plugins/modules/proxmox_group_info.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_group_info.py rename to plugins/modules/proxmox_group_info.py diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/proxmox_kvm.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_kvm.py rename to plugins/modules/proxmox_kvm.py diff --git a/plugins/modules/cloud/misc/proxmox_nic.py b/plugins/modules/proxmox_nic.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_nic.py rename to plugins/modules/proxmox_nic.py diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/proxmox_snap.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_snap.py rename to plugins/modules/proxmox_snap.py diff --git a/plugins/modules/cloud/misc/proxmox_storage_info.py b/plugins/modules/proxmox_storage_info.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_storage_info.py rename to plugins/modules/proxmox_storage_info.py diff --git a/plugins/modules/cloud/misc/proxmox_tasks_info.py b/plugins/modules/proxmox_tasks_info.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_tasks_info.py rename to plugins/modules/proxmox_tasks_info.py diff --git a/plugins/modules/cloud/misc/proxmox_template.py b/plugins/modules/proxmox_template.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_template.py rename to plugins/modules/proxmox_template.py diff --git a/plugins/modules/cloud/misc/proxmox_user_info.py b/plugins/modules/proxmox_user_info.py similarity index 100% rename from plugins/modules/cloud/misc/proxmox_user_info.py rename to plugins/modules/proxmox_user_info.py diff --git a/plugins/modules/cloud/pubnub/pubnub_blocks.py b/plugins/modules/pubnub_blocks.py similarity index 100% rename from plugins/modules/cloud/pubnub/pubnub_blocks.py rename to plugins/modules/pubnub_blocks.py diff --git a/plugins/modules/packaging/os/pulp_repo.py b/plugins/modules/pulp_repo.py similarity index 100% rename from plugins/modules/packaging/os/pulp_repo.py rename to plugins/modules/pulp_repo.py diff --git a/plugins/modules/system/puppet.py b/plugins/modules/puppet.py similarity index 100% rename from plugins/modules/system/puppet.py rename to plugins/modules/puppet.py diff --git a/plugins/modules/notification/pushbullet.py b/plugins/modules/pushbullet.py similarity index 100% rename from plugins/modules/notification/pushbullet.py rename to plugins/modules/pushbullet.py diff --git a/plugins/modules/notification/pushover.py b/plugins/modules/pushover.py similarity index 100% rename from plugins/modules/notification/pushover.py rename to plugins/modules/pushover.py diff --git a/plugins/modules/system/python_requirements_info.py b/plugins/modules/python_requirements_info.py similarity index 100% rename from plugins/modules/system/python_requirements_info.py rename to plugins/modules/python_requirements_info.py diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/rax.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax.py rename to plugins/modules/rax.py diff --git a/plugins/modules/cloud/rackspace/rax_cbs.py b/plugins/modules/rax_cbs.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_cbs.py rename to plugins/modules/rax_cbs.py diff --git a/plugins/modules/cloud/rackspace/rax_cbs_attachments.py b/plugins/modules/rax_cbs_attachments.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_cbs_attachments.py rename to plugins/modules/rax_cbs_attachments.py diff --git a/plugins/modules/cloud/rackspace/rax_cdb.py b/plugins/modules/rax_cdb.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_cdb.py rename to plugins/modules/rax_cdb.py diff --git a/plugins/modules/cloud/rackspace/rax_cdb_database.py b/plugins/modules/rax_cdb_database.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_cdb_database.py rename to plugins/modules/rax_cdb_database.py diff --git a/plugins/modules/cloud/rackspace/rax_cdb_user.py b/plugins/modules/rax_cdb_user.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_cdb_user.py rename to plugins/modules/rax_cdb_user.py diff --git a/plugins/modules/cloud/rackspace/rax_clb.py b/plugins/modules/rax_clb.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_clb.py rename to plugins/modules/rax_clb.py diff --git a/plugins/modules/cloud/rackspace/rax_clb_nodes.py b/plugins/modules/rax_clb_nodes.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_clb_nodes.py rename to plugins/modules/rax_clb_nodes.py diff --git a/plugins/modules/cloud/rackspace/rax_clb_ssl.py b/plugins/modules/rax_clb_ssl.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_clb_ssl.py rename to plugins/modules/rax_clb_ssl.py diff --git a/plugins/modules/cloud/rackspace/rax_dns.py b/plugins/modules/rax_dns.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_dns.py rename to plugins/modules/rax_dns.py diff --git a/plugins/modules/cloud/rackspace/rax_dns_record.py b/plugins/modules/rax_dns_record.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_dns_record.py rename to plugins/modules/rax_dns_record.py diff --git a/plugins/modules/cloud/rackspace/rax_facts.py b/plugins/modules/rax_facts.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_facts.py rename to plugins/modules/rax_facts.py diff --git a/plugins/modules/cloud/rackspace/rax_files.py b/plugins/modules/rax_files.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_files.py rename to plugins/modules/rax_files.py diff --git a/plugins/modules/cloud/rackspace/rax_files_objects.py b/plugins/modules/rax_files_objects.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_files_objects.py rename to plugins/modules/rax_files_objects.py diff --git a/plugins/modules/cloud/rackspace/rax_identity.py b/plugins/modules/rax_identity.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_identity.py rename to plugins/modules/rax_identity.py diff --git a/plugins/modules/cloud/rackspace/rax_keypair.py b/plugins/modules/rax_keypair.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_keypair.py rename to plugins/modules/rax_keypair.py diff --git a/plugins/modules/cloud/rackspace/rax_meta.py b/plugins/modules/rax_meta.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_meta.py rename to plugins/modules/rax_meta.py diff --git a/plugins/modules/cloud/rackspace/rax_mon_alarm.py b/plugins/modules/rax_mon_alarm.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_mon_alarm.py rename to plugins/modules/rax_mon_alarm.py diff --git a/plugins/modules/cloud/rackspace/rax_mon_check.py b/plugins/modules/rax_mon_check.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_mon_check.py rename to plugins/modules/rax_mon_check.py diff --git a/plugins/modules/cloud/rackspace/rax_mon_entity.py b/plugins/modules/rax_mon_entity.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_mon_entity.py rename to plugins/modules/rax_mon_entity.py diff --git a/plugins/modules/cloud/rackspace/rax_mon_notification.py b/plugins/modules/rax_mon_notification.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_mon_notification.py rename to plugins/modules/rax_mon_notification.py diff --git a/plugins/modules/cloud/rackspace/rax_mon_notification_plan.py b/plugins/modules/rax_mon_notification_plan.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_mon_notification_plan.py rename to plugins/modules/rax_mon_notification_plan.py diff --git a/plugins/modules/cloud/rackspace/rax_network.py b/plugins/modules/rax_network.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_network.py rename to plugins/modules/rax_network.py diff --git a/plugins/modules/cloud/rackspace/rax_queue.py b/plugins/modules/rax_queue.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_queue.py rename to plugins/modules/rax_queue.py diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/rax_scaling_group.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_scaling_group.py rename to plugins/modules/rax_scaling_group.py diff --git a/plugins/modules/cloud/rackspace/rax_scaling_policy.py b/plugins/modules/rax_scaling_policy.py similarity index 100% rename from plugins/modules/cloud/rackspace/rax_scaling_policy.py rename to plugins/modules/rax_scaling_policy.py diff --git a/plugins/modules/files/read_csv.py b/plugins/modules/read_csv.py similarity index 100% rename from plugins/modules/files/read_csv.py rename to plugins/modules/read_csv.py diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/redfish_command.py similarity index 100% rename from plugins/modules/remote_management/redfish/redfish_command.py rename to plugins/modules/redfish_command.py diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/redfish_config.py similarity index 100% rename from plugins/modules/remote_management/redfish/redfish_config.py rename to plugins/modules/redfish_config.py diff --git a/plugins/modules/remote_management/redfish/redfish_info.py b/plugins/modules/redfish_info.py similarity index 100% rename from plugins/modules/remote_management/redfish/redfish_info.py rename to plugins/modules/redfish_info.py diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/redhat_subscription.py similarity index 100% rename from plugins/modules/packaging/os/redhat_subscription.py rename to plugins/modules/redhat_subscription.py diff --git a/plugins/modules/database/misc/redis.py b/plugins/modules/redis.py similarity index 100% rename from plugins/modules/database/misc/redis.py rename to plugins/modules/redis.py diff --git a/plugins/modules/database/misc/redis_data.py b/plugins/modules/redis_data.py similarity index 100% rename from plugins/modules/database/misc/redis_data.py rename to plugins/modules/redis_data.py diff --git a/plugins/modules/database/misc/redis_data_incr.py b/plugins/modules/redis_data_incr.py similarity index 100% rename from plugins/modules/database/misc/redis_data_incr.py rename to plugins/modules/redis_data_incr.py diff --git a/plugins/modules/database/misc/redis_data_info.py b/plugins/modules/redis_data_info.py similarity index 100% rename from plugins/modules/database/misc/redis_data_info.py rename to plugins/modules/redis_data_info.py diff --git a/plugins/modules/database/misc/redis_info.py b/plugins/modules/redis_info.py similarity index 100% rename from plugins/modules/database/misc/redis_info.py rename to plugins/modules/redis_info.py diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/rhevm.py similarity index 100% rename from plugins/modules/cloud/misc/rhevm.py rename to plugins/modules/rhevm.py diff --git a/plugins/modules/packaging/os/rhn_channel.py b/plugins/modules/rhn_channel.py similarity index 100% rename from plugins/modules/packaging/os/rhn_channel.py rename to plugins/modules/rhn_channel.py diff --git a/plugins/modules/packaging/os/rhn_register.py b/plugins/modules/rhn_register.py similarity index 100% rename from plugins/modules/packaging/os/rhn_register.py rename to plugins/modules/rhn_register.py diff --git a/plugins/modules/packaging/os/rhsm_release.py b/plugins/modules/rhsm_release.py similarity index 100% rename from plugins/modules/packaging/os/rhsm_release.py rename to plugins/modules/rhsm_release.py diff --git a/plugins/modules/packaging/os/rhsm_repository.py b/plugins/modules/rhsm_repository.py similarity index 100% rename from plugins/modules/packaging/os/rhsm_repository.py rename to plugins/modules/rhsm_repository.py diff --git a/plugins/modules/database/misc/riak.py b/plugins/modules/riak.py similarity index 100% rename from plugins/modules/database/misc/riak.py rename to plugins/modules/riak.py diff --git a/plugins/modules/notification/rocketchat.py b/plugins/modules/rocketchat.py similarity index 100% rename from plugins/modules/notification/rocketchat.py rename to plugins/modules/rocketchat.py diff --git a/plugins/modules/monitoring/rollbar_deployment.py b/plugins/modules/rollbar_deployment.py similarity index 100% rename from plugins/modules/monitoring/rollbar_deployment.py rename to plugins/modules/rollbar_deployment.py diff --git a/plugins/modules/packaging/os/rpm_ostree_pkg.py b/plugins/modules/rpm_ostree_pkg.py similarity index 100% rename from plugins/modules/packaging/os/rpm_ostree_pkg.py rename to plugins/modules/rpm_ostree_pkg.py diff --git a/plugins/modules/web_infrastructure/rundeck_acl_policy.py b/plugins/modules/rundeck_acl_policy.py similarity index 100% rename from plugins/modules/web_infrastructure/rundeck_acl_policy.py rename to plugins/modules/rundeck_acl_policy.py diff --git a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py b/plugins/modules/rundeck_job_executions_info.py similarity index 100% rename from plugins/modules/web_infrastructure/rundeck_job_executions_info.py rename to plugins/modules/rundeck_job_executions_info.py diff --git a/plugins/modules/web_infrastructure/rundeck_job_run.py b/plugins/modules/rundeck_job_run.py similarity index 100% rename from plugins/modules/web_infrastructure/rundeck_job_run.py rename to plugins/modules/rundeck_job_run.py diff --git a/plugins/modules/web_infrastructure/rundeck_project.py b/plugins/modules/rundeck_project.py similarity index 100% rename from plugins/modules/web_infrastructure/rundeck_project.py rename to plugins/modules/rundeck_project.py diff --git a/plugins/modules/system/runit.py b/plugins/modules/runit.py similarity index 100% rename from plugins/modules/system/runit.py rename to plugins/modules/runit.py diff --git a/plugins/modules/system/sap_task_list_execute.py b/plugins/modules/sap_task_list_execute.py similarity index 100% rename from plugins/modules/system/sap_task_list_execute.py rename to plugins/modules/sap_task_list_execute.py diff --git a/plugins/modules/files/sapcar_extract.py b/plugins/modules/sapcar_extract.py similarity index 100% rename from plugins/modules/files/sapcar_extract.py rename to plugins/modules/sapcar_extract.py diff --git a/plugins/modules/notification/say.py b/plugins/modules/say.py similarity index 100% rename from plugins/modules/notification/say.py rename to plugins/modules/say.py diff --git a/plugins/modules/cloud/scaleway/scaleway_compute.py b/plugins/modules/scaleway_compute.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_compute.py rename to plugins/modules/scaleway_compute.py diff --git a/plugins/modules/cloud/scaleway/scaleway_compute_private_network.py b/plugins/modules/scaleway_compute_private_network.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_compute_private_network.py rename to plugins/modules/scaleway_compute_private_network.py diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry.py b/plugins/modules/scaleway_container_registry.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_container_registry.py rename to plugins/modules/scaleway_container_registry.py diff --git a/plugins/modules/cloud/scaleway/scaleway_container_registry_info.py b/plugins/modules/scaleway_container_registry_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_container_registry_info.py rename to plugins/modules/scaleway_container_registry_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_database_backup.py b/plugins/modules/scaleway_database_backup.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_database_backup.py rename to plugins/modules/scaleway_database_backup.py diff --git a/plugins/modules/cloud/scaleway/scaleway_function_namespace.py b/plugins/modules/scaleway_function_namespace.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_function_namespace.py rename to plugins/modules/scaleway_function_namespace.py diff --git a/plugins/modules/cloud/scaleway/scaleway_function_namespace_info.py b/plugins/modules/scaleway_function_namespace_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_function_namespace_info.py rename to plugins/modules/scaleway_function_namespace_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_image_info.py b/plugins/modules/scaleway_image_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_image_info.py rename to plugins/modules/scaleway_image_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_ip.py b/plugins/modules/scaleway_ip.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_ip.py rename to plugins/modules/scaleway_ip.py diff --git a/plugins/modules/cloud/scaleway/scaleway_ip_info.py b/plugins/modules/scaleway_ip_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_ip_info.py rename to plugins/modules/scaleway_ip_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_lb.py b/plugins/modules/scaleway_lb.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_lb.py rename to plugins/modules/scaleway_lb.py diff --git a/plugins/modules/cloud/scaleway/scaleway_organization_info.py b/plugins/modules/scaleway_organization_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_organization_info.py rename to plugins/modules/scaleway_organization_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_private_network.py b/plugins/modules/scaleway_private_network.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_private_network.py rename to plugins/modules/scaleway_private_network.py diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group.py b/plugins/modules/scaleway_security_group.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_security_group.py rename to plugins/modules/scaleway_security_group.py diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group_info.py b/plugins/modules/scaleway_security_group_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_security_group_info.py rename to plugins/modules/scaleway_security_group_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py b/plugins/modules/scaleway_security_group_rule.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_security_group_rule.py rename to plugins/modules/scaleway_security_group_rule.py diff --git a/plugins/modules/cloud/scaleway/scaleway_server_info.py b/plugins/modules/scaleway_server_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_server_info.py rename to plugins/modules/scaleway_server_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_snapshot_info.py b/plugins/modules/scaleway_snapshot_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_snapshot_info.py rename to plugins/modules/scaleway_snapshot_info.py diff --git a/plugins/modules/cloud/scaleway/scaleway_sshkey.py b/plugins/modules/scaleway_sshkey.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_sshkey.py rename to plugins/modules/scaleway_sshkey.py diff --git a/plugins/modules/cloud/scaleway/scaleway_user_data.py b/plugins/modules/scaleway_user_data.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_user_data.py rename to plugins/modules/scaleway_user_data.py diff --git a/plugins/modules/cloud/scaleway/scaleway_volume.py b/plugins/modules/scaleway_volume.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_volume.py rename to plugins/modules/scaleway_volume.py diff --git a/plugins/modules/cloud/scaleway/scaleway_volume_info.py b/plugins/modules/scaleway_volume_info.py similarity index 100% rename from plugins/modules/cloud/scaleway/scaleway_volume_info.py rename to plugins/modules/scaleway_volume_info.py diff --git a/plugins/modules/system/sefcontext.py b/plugins/modules/sefcontext.py similarity index 100% rename from plugins/modules/system/sefcontext.py rename to plugins/modules/sefcontext.py diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/selinux_permissive.py similarity index 100% rename from plugins/modules/system/selinux_permissive.py rename to plugins/modules/selinux_permissive.py diff --git a/plugins/modules/system/selogin.py b/plugins/modules/selogin.py similarity index 100% rename from plugins/modules/system/selogin.py rename to plugins/modules/selogin.py diff --git a/plugins/modules/notification/sendgrid.py b/plugins/modules/sendgrid.py similarity index 100% rename from plugins/modules/notification/sendgrid.py rename to plugins/modules/sendgrid.py diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/sensu_check.py similarity index 100% rename from plugins/modules/monitoring/sensu/sensu_check.py rename to plugins/modules/sensu_check.py diff --git a/plugins/modules/monitoring/sensu/sensu_client.py b/plugins/modules/sensu_client.py similarity index 100% rename from plugins/modules/monitoring/sensu/sensu_client.py rename to plugins/modules/sensu_client.py diff --git a/plugins/modules/monitoring/sensu/sensu_handler.py b/plugins/modules/sensu_handler.py similarity index 100% rename from plugins/modules/monitoring/sensu/sensu_handler.py rename to plugins/modules/sensu_handler.py diff --git a/plugins/modules/monitoring/sensu/sensu_silence.py b/plugins/modules/sensu_silence.py similarity index 100% rename from plugins/modules/monitoring/sensu/sensu_silence.py rename to plugins/modules/sensu_silence.py diff --git a/plugins/modules/monitoring/sensu/sensu_subscription.py b/plugins/modules/sensu_subscription.py similarity index 100% rename from plugins/modules/monitoring/sensu/sensu_subscription.py rename to plugins/modules/sensu_subscription.py diff --git a/plugins/modules/system/seport.py b/plugins/modules/seport.py similarity index 100% rename from plugins/modules/system/seport.py rename to plugins/modules/seport.py diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/serverless.py similarity index 100% rename from plugins/modules/cloud/misc/serverless.py rename to plugins/modules/serverless.py diff --git a/plugins/modules/system/shutdown.py b/plugins/modules/shutdown.py similarity index 100% rename from plugins/modules/system/shutdown.py rename to plugins/modules/shutdown.py diff --git a/plugins/modules/cloud/softlayer/sl_vm.py b/plugins/modules/sl_vm.py similarity index 100% rename from plugins/modules/cloud/softlayer/sl_vm.py rename to plugins/modules/sl_vm.py diff --git a/plugins/modules/notification/slack.py b/plugins/modules/slack.py similarity index 100% rename from plugins/modules/notification/slack.py rename to plugins/modules/slack.py diff --git a/plugins/modules/packaging/os/slackpkg.py b/plugins/modules/slackpkg.py similarity index 100% rename from plugins/modules/packaging/os/slackpkg.py rename to plugins/modules/slackpkg.py diff --git a/plugins/modules/cloud/smartos/smartos_image_info.py b/plugins/modules/smartos_image_info.py similarity index 100% rename from plugins/modules/cloud/smartos/smartos_image_info.py rename to plugins/modules/smartos_image_info.py diff --git a/plugins/modules/packaging/os/snap.py b/plugins/modules/snap.py similarity index 100% rename from plugins/modules/packaging/os/snap.py rename to plugins/modules/snap.py diff --git a/plugins/modules/packaging/os/snap_alias.py b/plugins/modules/snap_alias.py similarity index 100% rename from plugins/modules/packaging/os/snap_alias.py rename to plugins/modules/snap_alias.py diff --git a/plugins/modules/net_tools/snmp_facts.py b/plugins/modules/snmp_facts.py similarity index 100% rename from plugins/modules/net_tools/snmp_facts.py rename to plugins/modules/snmp_facts.py diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/solaris_zone.py similarity index 100% rename from plugins/modules/system/solaris_zone.py rename to plugins/modules/solaris_zone.py diff --git a/plugins/modules/packaging/os/sorcery.py b/plugins/modules/sorcery.py similarity index 100% rename from plugins/modules/packaging/os/sorcery.py rename to plugins/modules/sorcery.py diff --git a/plugins/modules/monitoring/spectrum_device.py b/plugins/modules/spectrum_device.py similarity index 100% rename from plugins/modules/monitoring/spectrum_device.py rename to plugins/modules/spectrum_device.py diff --git a/plugins/modules/monitoring/spectrum_model_attrs.py b/plugins/modules/spectrum_model_attrs.py similarity index 100% rename from plugins/modules/monitoring/spectrum_model_attrs.py rename to plugins/modules/spectrum_model_attrs.py diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/spotinst_aws_elastigroup.py similarity index 100% rename from plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py rename to plugins/modules/spotinst_aws_elastigroup.py diff --git a/plugins/modules/storage/hpe3par/ss_3par_cpg.py b/plugins/modules/ss_3par_cpg.py similarity index 100% rename from plugins/modules/storage/hpe3par/ss_3par_cpg.py rename to plugins/modules/ss_3par_cpg.py diff --git a/plugins/modules/system/ssh_config.py b/plugins/modules/ssh_config.py similarity index 100% rename from plugins/modules/system/ssh_config.py rename to plugins/modules/ssh_config.py diff --git a/plugins/modules/monitoring/stackdriver.py b/plugins/modules/stackdriver.py similarity index 100% rename from plugins/modules/monitoring/stackdriver.py rename to plugins/modules/stackdriver.py diff --git a/plugins/modules/remote_management/stacki/stacki_host.py b/plugins/modules/stacki_host.py similarity index 100% rename from plugins/modules/remote_management/stacki/stacki_host.py rename to plugins/modules/stacki_host.py diff --git a/plugins/modules/monitoring/statsd.py b/plugins/modules/statsd.py similarity index 100% rename from plugins/modules/monitoring/statsd.py rename to plugins/modules/statsd.py diff --git a/plugins/modules/monitoring/statusio_maintenance.py b/plugins/modules/statusio_maintenance.py similarity index 100% rename from plugins/modules/monitoring/statusio_maintenance.py rename to plugins/modules/statusio_maintenance.py diff --git a/plugins/modules/system/sudoers.py b/plugins/modules/sudoers.py similarity index 100% rename from plugins/modules/system/sudoers.py rename to plugins/modules/sudoers.py diff --git a/plugins/modules/web_infrastructure/supervisorctl.py b/plugins/modules/supervisorctl.py similarity index 100% rename from plugins/modules/web_infrastructure/supervisorctl.py rename to plugins/modules/supervisorctl.py diff --git a/plugins/modules/system/svc.py b/plugins/modules/svc.py similarity index 100% rename from plugins/modules/system/svc.py rename to plugins/modules/svc.py diff --git a/plugins/modules/packaging/os/svr4pkg.py b/plugins/modules/svr4pkg.py similarity index 100% rename from plugins/modules/packaging/os/svr4pkg.py rename to plugins/modules/svr4pkg.py diff --git a/plugins/modules/packaging/os/swdepot.py b/plugins/modules/swdepot.py similarity index 100% rename from plugins/modules/packaging/os/swdepot.py rename to plugins/modules/swdepot.py diff --git a/plugins/modules/packaging/os/swupd.py b/plugins/modules/swupd.py similarity index 100% rename from plugins/modules/packaging/os/swupd.py rename to plugins/modules/swupd.py diff --git a/plugins/modules/notification/syslogger.py b/plugins/modules/syslogger.py similarity index 100% rename from plugins/modules/notification/syslogger.py rename to plugins/modules/syslogger.py diff --git a/plugins/modules/system/syspatch.py b/plugins/modules/syspatch.py similarity index 100% rename from plugins/modules/system/syspatch.py rename to plugins/modules/syspatch.py diff --git a/plugins/modules/system/sysrc.py b/plugins/modules/sysrc.py similarity index 100% rename from plugins/modules/system/sysrc.py rename to plugins/modules/sysrc.py diff --git a/plugins/modules/system/sysupgrade.py b/plugins/modules/sysupgrade.py similarity index 100% rename from plugins/modules/system/sysupgrade.py rename to plugins/modules/sysupgrade.py diff --git a/plugins/modules/web_infrastructure/taiga_issue.py b/plugins/modules/taiga_issue.py similarity index 100% rename from plugins/modules/web_infrastructure/taiga_issue.py rename to plugins/modules/taiga_issue.py diff --git a/plugins/modules/notification/telegram.py b/plugins/modules/telegram.py similarity index 100% rename from plugins/modules/notification/telegram.py rename to plugins/modules/telegram.py diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/terraform.py similarity index 100% rename from plugins/modules/cloud/misc/terraform.py rename to plugins/modules/terraform.py diff --git a/plugins/modules/system/timezone.py b/plugins/modules/timezone.py similarity index 100% rename from plugins/modules/system/timezone.py rename to plugins/modules/timezone.py diff --git a/plugins/modules/notification/twilio.py b/plugins/modules/twilio.py similarity index 100% rename from plugins/modules/notification/twilio.py rename to plugins/modules/twilio.py diff --git a/plugins/modules/notification/typetalk.py b/plugins/modules/typetalk.py similarity index 100% rename from plugins/modules/notification/typetalk.py rename to plugins/modules/typetalk.py diff --git a/plugins/modules/cloud/univention/udm_dns_record.py b/plugins/modules/udm_dns_record.py similarity index 100% rename from plugins/modules/cloud/univention/udm_dns_record.py rename to plugins/modules/udm_dns_record.py diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/udm_dns_zone.py similarity index 100% rename from plugins/modules/cloud/univention/udm_dns_zone.py rename to plugins/modules/udm_dns_zone.py diff --git a/plugins/modules/cloud/univention/udm_group.py b/plugins/modules/udm_group.py similarity index 100% rename from plugins/modules/cloud/univention/udm_group.py rename to plugins/modules/udm_group.py diff --git a/plugins/modules/cloud/univention/udm_share.py b/plugins/modules/udm_share.py similarity index 100% rename from plugins/modules/cloud/univention/udm_share.py rename to plugins/modules/udm_share.py diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/udm_user.py similarity index 100% rename from plugins/modules/cloud/univention/udm_user.py rename to plugins/modules/udm_user.py diff --git a/plugins/modules/system/ufw.py b/plugins/modules/ufw.py similarity index 100% rename from plugins/modules/system/ufw.py rename to plugins/modules/ufw.py diff --git a/plugins/modules/monitoring/uptimerobot.py b/plugins/modules/uptimerobot.py similarity index 100% rename from plugins/modules/monitoring/uptimerobot.py rename to plugins/modules/uptimerobot.py diff --git a/plugins/modules/packaging/os/urpmi.py b/plugins/modules/urpmi.py similarity index 100% rename from plugins/modules/packaging/os/urpmi.py rename to plugins/modules/urpmi.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/plugins/modules/utm_aaa_group.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py rename to plugins/modules/utm_aaa_group.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py b/plugins/modules/utm_aaa_group_info.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py rename to plugins/modules/utm_aaa_group_info.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py b/plugins/modules/utm_ca_host_key_cert.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py rename to plugins/modules/utm_ca_host_key_cert.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py b/plugins/modules/utm_ca_host_key_cert_info.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py rename to plugins/modules/utm_ca_host_key_cert_info.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/utm_dns_host.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py rename to plugins/modules/utm_dns_host.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/plugins/modules/utm_network_interface_address.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py rename to plugins/modules/utm_network_interface_address.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py b/plugins/modules/utm_network_interface_address_info.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py rename to plugins/modules/utm_network_interface_address_info.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py b/plugins/modules/utm_proxy_auth_profile.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py rename to plugins/modules/utm_proxy_auth_profile.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py b/plugins/modules/utm_proxy_exception.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py rename to plugins/modules/utm_proxy_exception.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py b/plugins/modules/utm_proxy_frontend.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py rename to plugins/modules/utm_proxy_frontend.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py b/plugins/modules/utm_proxy_frontend_info.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py rename to plugins/modules/utm_proxy_frontend_info.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/utm_proxy_location.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py rename to plugins/modules/utm_proxy_location.py diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py b/plugins/modules/utm_proxy_location_info.py similarity index 100% rename from plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py rename to plugins/modules/utm_proxy_location_info.py diff --git a/plugins/modules/system/vdo.py b/plugins/modules/vdo.py similarity index 100% rename from plugins/modules/system/vdo.py rename to plugins/modules/vdo.py diff --git a/plugins/modules/database/vertica/vertica_configuration.py b/plugins/modules/vertica_configuration.py similarity index 100% rename from plugins/modules/database/vertica/vertica_configuration.py rename to plugins/modules/vertica_configuration.py diff --git a/plugins/modules/database/vertica/vertica_info.py b/plugins/modules/vertica_info.py similarity index 100% rename from plugins/modules/database/vertica/vertica_info.py rename to plugins/modules/vertica_info.py diff --git a/plugins/modules/database/vertica/vertica_role.py b/plugins/modules/vertica_role.py similarity index 100% rename from plugins/modules/database/vertica/vertica_role.py rename to plugins/modules/vertica_role.py diff --git a/plugins/modules/database/vertica/vertica_schema.py b/plugins/modules/vertica_schema.py similarity index 100% rename from plugins/modules/database/vertica/vertica_schema.py rename to plugins/modules/vertica_schema.py diff --git a/plugins/modules/database/vertica/vertica_user.py b/plugins/modules/vertica_user.py similarity index 100% rename from plugins/modules/database/vertica/vertica_user.py rename to plugins/modules/vertica_user.py diff --git a/plugins/modules/storage/vexata/vexata_eg.py b/plugins/modules/vexata_eg.py similarity index 100% rename from plugins/modules/storage/vexata/vexata_eg.py rename to plugins/modules/vexata_eg.py diff --git a/plugins/modules/storage/vexata/vexata_volume.py b/plugins/modules/vexata_volume.py similarity index 100% rename from plugins/modules/storage/vexata/vexata_volume.py rename to plugins/modules/vexata_volume.py diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/vmadm.py similarity index 100% rename from plugins/modules/cloud/smartos/vmadm.py rename to plugins/modules/vmadm.py diff --git a/plugins/modules/remote_management/wakeonlan.py b/plugins/modules/wakeonlan.py similarity index 100% rename from plugins/modules/remote_management/wakeonlan.py rename to plugins/modules/wakeonlan.py diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_command.py b/plugins/modules/wdc_redfish_command.py similarity index 100% rename from plugins/modules/remote_management/redfish/wdc_redfish_command.py rename to plugins/modules/wdc_redfish_command.py diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_info.py b/plugins/modules/wdc_redfish_info.py similarity index 100% rename from plugins/modules/remote_management/redfish/wdc_redfish_info.py rename to plugins/modules/wdc_redfish_info.py diff --git a/plugins/modules/cloud/webfaction/webfaction_app.py b/plugins/modules/webfaction_app.py similarity index 100% rename from plugins/modules/cloud/webfaction/webfaction_app.py rename to plugins/modules/webfaction_app.py diff --git a/plugins/modules/cloud/webfaction/webfaction_db.py b/plugins/modules/webfaction_db.py similarity index 100% rename from plugins/modules/cloud/webfaction/webfaction_db.py rename to plugins/modules/webfaction_db.py diff --git a/plugins/modules/cloud/webfaction/webfaction_domain.py b/plugins/modules/webfaction_domain.py similarity index 100% rename from plugins/modules/cloud/webfaction/webfaction_domain.py rename to plugins/modules/webfaction_domain.py diff --git a/plugins/modules/cloud/webfaction/webfaction_mailbox.py b/plugins/modules/webfaction_mailbox.py similarity index 100% rename from plugins/modules/cloud/webfaction/webfaction_mailbox.py rename to plugins/modules/webfaction_mailbox.py diff --git a/plugins/modules/cloud/webfaction/webfaction_site.py b/plugins/modules/webfaction_site.py similarity index 100% rename from plugins/modules/cloud/webfaction/webfaction_site.py rename to plugins/modules/webfaction_site.py diff --git a/plugins/modules/files/xattr.py b/plugins/modules/xattr.py similarity index 100% rename from plugins/modules/files/xattr.py rename to plugins/modules/xattr.py diff --git a/plugins/modules/packaging/os/xbps.py b/plugins/modules/xbps.py similarity index 100% rename from plugins/modules/packaging/os/xbps.py rename to plugins/modules/xbps.py diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/xcc_redfish_command.py similarity index 100% rename from plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py rename to plugins/modules/xcc_redfish_command.py diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/xenserver_facts.py similarity index 100% rename from plugins/modules/cloud/misc/xenserver_facts.py rename to plugins/modules/xenserver_facts.py diff --git a/plugins/modules/cloud/xenserver/xenserver_guest.py b/plugins/modules/xenserver_guest.py similarity index 100% rename from plugins/modules/cloud/xenserver/xenserver_guest.py rename to plugins/modules/xenserver_guest.py diff --git a/plugins/modules/cloud/xenserver/xenserver_guest_info.py b/plugins/modules/xenserver_guest_info.py similarity index 100% rename from plugins/modules/cloud/xenserver/xenserver_guest_info.py rename to plugins/modules/xenserver_guest_info.py diff --git a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py b/plugins/modules/xenserver_guest_powerstate.py similarity index 100% rename from plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py rename to plugins/modules/xenserver_guest_powerstate.py diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/xfconf.py similarity index 100% rename from plugins/modules/system/xfconf.py rename to plugins/modules/xfconf.py diff --git a/plugins/modules/system/xfconf_info.py b/plugins/modules/xfconf_info.py similarity index 100% rename from plugins/modules/system/xfconf_info.py rename to plugins/modules/xfconf_info.py diff --git a/plugins/modules/system/xfs_quota.py b/plugins/modules/xfs_quota.py similarity index 100% rename from plugins/modules/system/xfs_quota.py rename to plugins/modules/xfs_quota.py diff --git a/plugins/modules/files/xml.py b/plugins/modules/xml.py similarity index 100% rename from plugins/modules/files/xml.py rename to plugins/modules/xml.py diff --git a/plugins/modules/packaging/language/yarn.py b/plugins/modules/yarn.py similarity index 100% rename from plugins/modules/packaging/language/yarn.py rename to plugins/modules/yarn.py diff --git a/plugins/modules/packaging/os/yum_versionlock.py b/plugins/modules/yum_versionlock.py similarity index 100% rename from plugins/modules/packaging/os/yum_versionlock.py rename to plugins/modules/yum_versionlock.py diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/zfs.py similarity index 100% rename from plugins/modules/storage/zfs/zfs.py rename to plugins/modules/zfs.py diff --git a/plugins/modules/storage/zfs/zfs_delegate_admin.py b/plugins/modules/zfs_delegate_admin.py similarity index 100% rename from plugins/modules/storage/zfs/zfs_delegate_admin.py rename to plugins/modules/zfs_delegate_admin.py diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/zfs_facts.py similarity index 100% rename from plugins/modules/storage/zfs/zfs_facts.py rename to plugins/modules/zfs_facts.py diff --git a/plugins/modules/clustering/znode.py b/plugins/modules/znode.py similarity index 100% rename from plugins/modules/clustering/znode.py rename to plugins/modules/znode.py diff --git a/plugins/modules/storage/zfs/zpool_facts.py b/plugins/modules/zpool_facts.py similarity index 100% rename from plugins/modules/storage/zfs/zpool_facts.py rename to plugins/modules/zpool_facts.py diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/zypper.py similarity index 100% rename from plugins/modules/packaging/os/zypper.py rename to plugins/modules/zypper.py diff --git a/plugins/modules/packaging/os/zypper_repository.py b/plugins/modules/zypper_repository.py similarity index 100% rename from plugins/modules/packaging/os/zypper_repository.py rename to plugins/modules/zypper_repository.py diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 86db6d3a2c..7c555b4722 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -4,38 +4,38 @@ .azure-pipelines/scripts/publish-codecov.py compile-3.5!skip # Uses Python 3.6+ syntax .azure-pipelines/scripts/publish-codecov.py future-import-boilerplate .azure-pipelines/scripts/publish-codecov.py metaclass-boilerplate -plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type -plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter -plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/packaging/language/yarn.py use-argspec-type-path -plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error -plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/puppet.py use-argspec-type-path -plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/system/xfconf.py validate-modules:return-syntax-error -plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/consul.py validate-modules:doc-missing-type +plugins/modules/consul.py validate-modules:undocumented-parameter +plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/yarn.py use-argspec-type-path +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice +plugins/modules/parted.py validate-modules:parameter-state-invalid-choice +plugins/modules/puppet.py use-argspec-type-path +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/xfconf.py validate-modules:return-syntax-error +plugins/modules/jenkins_plugin.py use-argspec-type-path tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.7 # django generated code diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 77cfe75bbd..53d2d47bd4 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -1,34 +1,34 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type -plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter -plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/packaging/language/yarn.py use-argspec-type-path -plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error -plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/puppet.py use-argspec-type-path -plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/system/xfconf.py validate-modules:return-syntax-error -plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/consul.py validate-modules:doc-missing-type +plugins/modules/consul.py validate-modules:undocumented-parameter +plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/yarn.py use-argspec-type-path +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice +plugins/modules/parted.py validate-modules:parameter-state-invalid-choice +plugins/modules/puppet.py use-argspec-type-path +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/xfconf.py validate-modules:return-syntax-error +plugins/modules/jenkins_plugin.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 77cfe75bbd..53d2d47bd4 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -1,34 +1,34 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type -plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter -plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/packaging/language/yarn.py use-argspec-type-path -plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error -plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/puppet.py use-argspec-type-path -plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/system/xfconf.py validate-modules:return-syntax-error -plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/consul.py validate-modules:doc-missing-type +plugins/modules/consul.py validate-modules:undocumented-parameter +plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/yarn.py use-argspec-type-path +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice +plugins/modules/parted.py validate-modules:parameter-state-invalid-choice +plugins/modules/puppet.py use-argspec-type-path +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/xfconf.py validate-modules:return-syntax-error +plugins/modules/jenkins_plugin.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 6ca8d9d972..9d9d74bcb4 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -1,36 +1,36 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type -plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter -plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/packaging/language/yarn.py use-argspec-type-path -plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error -plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/puppet.py use-argspec-type-path -plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/system/xfconf.py validate-modules:return-syntax-error -plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/consul.py validate-modules:doc-missing-type +plugins/modules/consul.py validate-modules:undocumented-parameter +plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/yarn.py use-argspec-type-path +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice +plugins/modules/parted.py validate-modules:parameter-state-invalid-choice +plugins/modules/puppet.py use-argspec-type-path +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/xfconf.py validate-modules:return-syntax-error +plugins/modules/jenkins_plugin.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 6ca8d9d972..9d9d74bcb4 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -1,36 +1,36 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/cloud/lxd/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/cloud/scaleway/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/univention/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type -plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter -plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/packaging/language/yarn.py use-argspec-type-path -plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error -plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/remote_management/manageiq/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/system/osx_defaults.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/system/puppet.py use-argspec-type-path -plugins/modules/system/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/system/xfconf.py validate-modules:return-syntax-error -plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/consul.py validate-modules:doc-missing-type +plugins/modules/consul.py validate-modules:undocumented-parameter +plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice +plugins/modules/yarn.py use-argspec-type-path +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions +plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice +plugins/modules/parted.py validate-modules:parameter-state-invalid-choice +plugins/modules/puppet.py use-argspec-type-path +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/xfconf.py validate-modules:return-syntax-error +plugins/modules/jenkins_plugin.py use-argspec-type-path diff --git a/tests/unit/plugins/modules/cloud/xenserver/FakeAnsibleModule.py b/tests/unit/plugins/modules/FakeAnsibleModule.py similarity index 100% rename from tests/unit/plugins/modules/cloud/xenserver/FakeAnsibleModule.py rename to tests/unit/plugins/modules/FakeAnsibleModule.py diff --git a/tests/unit/plugins/modules/cloud/xenserver/FakeXenAPI.py b/tests/unit/plugins/modules/FakeXenAPI.py similarity index 100% rename from tests/unit/plugins/modules/cloud/xenserver/FakeXenAPI.py rename to tests/unit/plugins/modules/FakeXenAPI.py diff --git a/tests/unit/plugins/modules/source_control/gitlab/gitlab.py b/tests/unit/plugins/modules/gitlab.py similarity index 100% rename from tests/unit/plugins/modules/source_control/gitlab/gitlab.py rename to tests/unit/plugins/modules/gitlab.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py b/tests/unit/plugins/modules/hpe_test_utils.py similarity index 98% rename from tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py rename to tests/unit/plugins/modules/hpe_test_utils.py index 658041772e..56b4d11045 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/hpe_test_utils.py +++ b/tests/unit/plugins/modules/hpe_test_utils.py @@ -33,7 +33,7 @@ class OneViewBaseTest(object): resource_module_path_name = 'oneview_' + str.join('_', resource_module_path_name).lower() ansible_collections = __import__('ansible_collections') - oneview_module = ansible_collections.community.general.plugins.modules.remote_management.oneview + oneview_module = ansible_collections.community.general.plugins.modules resource_module = getattr(oneview_module, resource_module_path_name) self.testing_class = getattr(resource_module, resource_name) testing_module = self.testing_class.__module__.split('.')[-1] @@ -138,7 +138,7 @@ class OneViewBaseTestCase(object): # Load scenarios from module examples (Also checks if it is a valid yaml) ansible_collections = __import__('ansible_collections') testing_module = self.testing_class.__module__.split('.')[-1] - self.testing_module = getattr(ansible_collections.community.general.plugins.modules.remote_management.oneview, testing_module) + self.testing_module = getattr(ansible_collections.community.general.plugins.modules, testing_module) try: # Load scenarios from module examples (Also checks if it is a valid yaml) diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file-README.md b/tests/unit/plugins/modules/interfaces_file/interfaces_file-README.md similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file-README.md rename to tests/unit/plugins/modules/interfaces_file/interfaces_file-README.md diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/address_family_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/default_dhcp_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/servers.com_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup.test_no_changes.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_aggi_up_twice.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_add_and_delete_aggi_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_aggi_remove_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv4_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6 b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6 similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6 rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6 diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_post_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_ipv6_pre_up.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_change_method.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_revert.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.exceptions.txt.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_and_eth0_mtu.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.exceptions.txt diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.json.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/up_down_dup_set_aggi_slaves.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/address_family similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/address_family diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/address_family.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/address_family.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/address_family.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/default_dhcp similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/default_dhcp diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/default_dhcp.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/default_dhcp.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/default_dhcp.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/servers.com similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/servers.com diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/servers.com.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/servers.com.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/servers.com.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/up_down_dup similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/up_down_dup diff --git a/tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup.license b/tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/up_down_dup.license similarity index 100% rename from tests/unit/plugins/modules/system/interfaces_file/interfaces_file_fixtures/input/up_down_dup.license rename to tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/up_down_dup.license diff --git a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py similarity index 99% rename from tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py rename to tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py index ac5450eca7..da6aa5f4be 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py @@ -9,7 +9,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.system import interfaces_file +from ansible_collections.community.general.plugins.modules import interfaces_file from shutil import copyfile, move import difflib import inspect diff --git a/tests/unit/plugins/modules/cloud/linode/linode_conftest.py b/tests/unit/plugins/modules/linode_conftest.py similarity index 100% rename from tests/unit/plugins/modules/cloud/linode/linode_conftest.py rename to tests/unit/plugins/modules/linode_conftest.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/oneview_conftest.py b/tests/unit/plugins/modules/oneview_conftest.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/oneview_conftest.py rename to tests/unit/plugins/modules/oneview_conftest.py diff --git a/tests/unit/plugins/modules/oneview_module_loader.py b/tests/unit/plugins/modules/oneview_module_loader.py new file mode 100644 index 0000000000..51dcee788b --- /dev/null +++ b/tests/unit/plugins/modules/oneview_module_loader.py @@ -0,0 +1,32 @@ +# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import sys +from ansible_collections.community.general.tests.unit.compat.mock import Mock + +# FIXME: These should be done inside of a fixture so that they're only mocked during +# these unittests +if 'hpOneView' not in sys.modules: + sys.modules['hpOneView'] = Mock() + sys.modules['hpOneView.oneview_client'] = Mock() + +ONEVIEW_MODULE_UTILS_PATH = 'ansible_collections.community.general.plugins.module_utils.oneview' +from ansible_collections.community.general.plugins.module_utils.oneview import (OneViewModuleException, + OneViewModuleTaskError, + OneViewModuleResourceNotFound, + OneViewModuleBase) + +from ansible_collections.community.general.plugins.modules.oneview_ethernet_network import EthernetNetworkModule +from ansible_collections.community.general.plugins.modules.oneview_ethernet_network_info import EthernetNetworkInfoModule +from ansible_collections.community.general.plugins.modules.oneview_fc_network import FcNetworkModule +from ansible_collections.community.general.plugins.modules.oneview_fc_network_info import FcNetworkInfoModule +from ansible_collections.community.general.plugins.modules.oneview_fcoe_network import FcoeNetworkModule +from ansible_collections.community.general.plugins.modules.oneview_fcoe_network_info import FcoeNetworkInfoModule +from ansible_collections.community.general.plugins.modules.oneview_network_set import NetworkSetModule +from ansible_collections.community.general.plugins.modules.oneview_network_set_info import NetworkSetInfoModule +from ansible_collections.community.general.plugins.modules.oneview_san_manager import SanManagerModule +from ansible_collections.community.general.plugins.modules.oneview_san_manager_info import SanManagerInfoModule diff --git a/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py b/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py deleted file mode 100644 index aa7d148f11..0000000000 --- a/tests/unit/plugins/modules/remote_management/oneview/oneview_module_loader.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import sys -from ansible_collections.community.general.tests.unit.compat.mock import Mock - -# FIXME: These should be done inside of a fixture so that they're only mocked during -# these unittests -if 'hpOneView' not in sys.modules: - sys.modules['hpOneView'] = Mock() - sys.modules['hpOneView.oneview_client'] = Mock() - -ONEVIEW_MODULE_UTILS_PATH = 'ansible_collections.community.general.plugins.module_utils.oneview' -from ansible_collections.community.general.plugins.module_utils.oneview import (OneViewModuleException, - OneViewModuleTaskError, - OneViewModuleResourceNotFound, - OneViewModuleBase) - -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_ethernet_network import EthernetNetworkModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_ethernet_network_info import EthernetNetworkInfoModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_fc_network import FcNetworkModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_fc_network_info import FcNetworkInfoModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_fcoe_network import FcoeNetworkModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_fcoe_network_info import FcoeNetworkInfoModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_network_set import NetworkSetModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_network_set_info import NetworkSetInfoModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_san_manager import SanManagerModule -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_san_manager_info import SanManagerInfoModule diff --git a/tests/unit/plugins/modules/packaging/os/rhn_conftest.py b/tests/unit/plugins/modules/rhn_conftest.py similarity index 100% rename from tests/unit/plugins/modules/packaging/os/rhn_conftest.py rename to tests/unit/plugins/modules/rhn_conftest.py diff --git a/tests/unit/plugins/modules/monitoring/test_alerta_customer.py b/tests/unit/plugins/modules/test_alerta_customer.py similarity index 98% rename from tests/unit/plugins/modules/monitoring/test_alerta_customer.py rename to tests/unit/plugins/modules/test_alerta_customer.py index 21f6804d8a..2b63464e09 100644 --- a/tests/unit/plugins/modules/monitoring/test_alerta_customer.py +++ b/tests/unit/plugins/modules/test_alerta_customer.py @@ -8,7 +8,7 @@ __metaclass__ = type import json import pytest from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch -from ansible_collections.community.general.plugins.modules.monitoring import alerta_customer +from ansible_collections.community.general.plugins.modules import alerta_customer from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py b/tests/unit/plugins/modules/test_apache2_module.py similarity index 86% rename from tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py rename to tests/unit/plugins/modules/test_apache2_module.py index b39bc99a8c..3e44bdb58d 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_apache2_module.py +++ b/tests/unit/plugins/modules/test_apache2_module.py @@ -7,7 +7,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.web_infrastructure.apache2_module import create_apache_identifier +from ansible_collections.community.general.plugins.modules.apache2_module import create_apache_identifier REPLACEMENTS = [ ('php7.1', 'php7_module'), diff --git a/tests/unit/plugins/modules/packaging/os/test_apk.py b/tests/unit/plugins/modules/test_apk.py similarity index 89% rename from tests/unit/plugins/modules/packaging/os/test_apk.py rename to tests/unit/plugins/modules/test_apk.py index a7f3bee895..c952456eff 100644 --- a/tests/unit/plugins/modules/packaging/os/test_apk.py +++ b/tests/unit/plugins/modules/test_apk.py @@ -8,7 +8,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import mock from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.packaging.os import apk +from ansible_collections.community.general.plugins.modules import apk class TestApkQueryLatest(unittest.TestCase): @@ -19,7 +19,7 @@ class TestApkQueryLatest(unittest.TestCase): 'g++', ] - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.apk.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.apk.AnsibleModule') def test_not_latest(self, mock_module): apk.APK_PATH = "" for module_name in self.module_names: @@ -28,7 +28,7 @@ class TestApkQueryLatest(unittest.TestCase): command_result = apk.query_latest(mock_module, module_name) self.assertFalse(command_result) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.apk.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.apk.AnsibleModule') def test_latest(self, mock_module): apk.APK_PATH = "" for module_name in self.module_names: diff --git a/tests/unit/plugins/modules/files/test_archive.py b/tests/unit/plugins/modules/test_archive.py similarity index 96% rename from tests/unit/plugins/modules/files/test_archive.py rename to tests/unit/plugins/modules/test_archive.py index 00c16db33c..84a1360f1b 100644 --- a/tests/unit/plugins/modules/files/test_archive.py +++ b/tests/unit/plugins/modules/test_archive.py @@ -11,7 +11,7 @@ import pytest from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.files.archive import get_archive, common_path +from ansible_collections.community.general.plugins.modules.archive import get_archive, common_path class TestArchive(ModuleTestCase): diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py b/tests/unit/plugins/modules/test_bitbucket_access_key.py similarity index 99% rename from tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py rename to tests/unit/plugins/modules/test_bitbucket_access_key.py index be926b55df..71e28f653c 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_access_key.py +++ b/tests/unit/plugins/modules/test_bitbucket_access_key.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper -from ansible_collections.community.general.plugins.modules.source_control.bitbucket import bitbucket_access_key +from ansible_collections.community.general.plugins.modules import bitbucket_access_key from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py b/tests/unit/plugins/modules/test_bitbucket_pipeline_key_pair.py similarity index 98% rename from tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py rename to tests/unit/plugins/modules/test_bitbucket_pipeline_key_pair.py index 050790a426..a1f5478c20 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_key_pair.py +++ b/tests/unit/plugins/modules/test_bitbucket_pipeline_key_pair.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper -from ansible_collections.community.general.plugins.modules.source_control.bitbucket import bitbucket_pipeline_key_pair +from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_key_pair from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py b/tests/unit/plugins/modules/test_bitbucket_pipeline_known_host.py similarity index 97% rename from tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py rename to tests/unit/plugins/modules/test_bitbucket_pipeline_known_host.py index 163cecdf4d..07709f1a86 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_known_host.py +++ b/tests/unit/plugins/modules/test_bitbucket_pipeline_known_host.py @@ -8,8 +8,8 @@ __metaclass__ = type import pytest from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper -from ansible_collections.community.general.plugins.modules.source_control.bitbucket import bitbucket_pipeline_known_host -from ansible_collections.community.general.plugins.modules.source_control.bitbucket.bitbucket_pipeline_known_host import HAS_PARAMIKO +from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_known_host +from ansible_collections.community.general.plugins.modules.bitbucket_pipeline_known_host import HAS_PARAMIKO from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py b/tests/unit/plugins/modules/test_bitbucket_pipeline_variable.py similarity index 99% rename from tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py rename to tests/unit/plugins/modules/test_bitbucket_pipeline_variable.py index 99d3af4f92..6f710189c9 100644 --- a/tests/unit/plugins/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py +++ b/tests/unit/plugins/modules/test_bitbucket_pipeline_variable.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper -from ansible_collections.community.general.plugins.modules.source_control.bitbucket import bitbucket_pipeline_variable +from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_variable from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/notification/test_campfire.py b/tests/unit/plugins/modules/test_campfire.py similarity index 97% rename from tests/unit/plugins/modules/notification/test_campfire.py rename to tests/unit/plugins/modules/test_campfire.py index f05cc239da..ef0dca5ed6 100644 --- a/tests/unit/plugins/modules/notification/test_campfire.py +++ b/tests/unit/plugins/modules/test_campfire.py @@ -7,7 +7,7 @@ __metaclass__ = type import pytest from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.plugins.modules.notification import campfire +from ansible_collections.community.general.plugins.modules import campfire from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py b/tests/unit/plugins/modules/test_circonus_annotation.py similarity index 98% rename from tests/unit/plugins/modules/monitoring/test_circonus_annotation.py rename to tests/unit/plugins/modules/test_circonus_annotation.py index 34f1bc6914..7378e62a27 100644 --- a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py +++ b/tests/unit/plugins/modules/test_circonus_annotation.py @@ -14,7 +14,7 @@ from urllib3.response import HTTPResponse from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils.common.text.converters import to_bytes -from ansible_collections.community.general.plugins.modules.monitoring import circonus_annotation +from ansible_collections.community.general.plugins.modules import circonus_annotation from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/packaging/language/test_cpanm.py b/tests/unit/plugins/modules/test_cpanm.py similarity index 99% rename from tests/unit/plugins/modules/packaging/language/test_cpanm.py rename to tests/unit/plugins/modules/test_cpanm.py index 1426b26d75..4d6ecdbd6e 100644 --- a/tests/unit/plugins/modules/packaging/language/test_cpanm.py +++ b/tests/unit/plugins/modules/test_cpanm.py @@ -13,7 +13,7 @@ __metaclass__ = type import json -from ansible_collections.community.general.plugins.modules.packaging.language import cpanm +from ansible_collections.community.general.plugins.modules import cpanm import pytest diff --git a/tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled b/tests/unit/plugins/modules/test_datadog_downtime.py.disabled similarity index 100% rename from tests/unit/plugins/modules/monitoring/test_datadog_downtime.py.disabled rename to tests/unit/plugins/modules/test_datadog_downtime.py.disabled diff --git a/tests/unit/plugins/modules/notification/test_discord.py b/tests/unit/plugins/modules/test_discord.py similarity index 97% rename from tests/unit/plugins/modules/notification/test_discord.py rename to tests/unit/plugins/modules/test_discord.py index 20f9547d43..007cd0038e 100644 --- a/tests/unit/plugins/modules/notification/test_discord.py +++ b/tests/unit/plugins/modules/test_discord.py @@ -8,7 +8,7 @@ __metaclass__ = type import json import pytest from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch -from ansible_collections.community.general.plugins.modules.notification import discord +from ansible_collections.community.general.plugins.modules import discord from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/net_tools/test_dnsimple.py b/tests/unit/plugins/modules/test_dnsimple.py similarity index 95% rename from tests/unit/plugins/modules/net_tools/test_dnsimple.py rename to tests/unit/plugins/modules/test_dnsimple.py index 2e246e5f66..95a78818d2 100644 --- a/tests/unit/plugins/modules/net_tools/test_dnsimple.py +++ b/tests/unit/plugins/modules/test_dnsimple.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.plugins.modules.net_tools import dnsimple as dnsimple_module +from ansible_collections.community.general.plugins.modules import dnsimple as dnsimple_module from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args from ansible_collections.community.general.tests.unit.compat.mock import patch import pytest diff --git a/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py b/tests/unit/plugins/modules/test_dnsimple_info.py similarity index 97% rename from tests/unit/plugins/modules/net_tools/test_dnsimple_info.py rename to tests/unit/plugins/modules/test_dnsimple_info.py index bd08df4ee5..93d9d929c4 100644 --- a/tests/unit/plugins/modules/net_tools/test_dnsimple_info.py +++ b/tests/unit/plugins/modules/test_dnsimple_info.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.plugins.modules.net_tools import dnsimple_info +from ansible_collections.community.general.plugins.modules import dnsimple_info from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args, AnsibleExitJson from httmock import response from httmock import with_httmock diff --git a/tests/unit/plugins/modules/system/test_gconftool2_info.py b/tests/unit/plugins/modules/test_gconftool2_info.py similarity index 97% rename from tests/unit/plugins/modules/system/test_gconftool2_info.py rename to tests/unit/plugins/modules/test_gconftool2_info.py index 1847dce428..352af6bb0e 100644 --- a/tests/unit/plugins/modules/system/test_gconftool2_info.py +++ b/tests/unit/plugins/modules/test_gconftool2_info.py @@ -8,7 +8,7 @@ __metaclass__ = type import json -from ansible_collections.community.general.plugins.modules.system import gconftool2_info +from ansible_collections.community.general.plugins.modules import gconftool2_info import pytest diff --git a/tests/unit/plugins/modules/packaging/language/test_gem.py b/tests/unit/plugins/modules/test_gem.py similarity index 94% rename from tests/unit/plugins/modules/packaging/language/test_gem.py rename to tests/unit/plugins/modules/test_gem.py index 5e8abe7816..92578e062d 100644 --- a/tests/unit/plugins/modules/packaging/language/test_gem.py +++ b/tests/unit/plugins/modules/test_gem.py @@ -8,7 +8,7 @@ import copy import pytest -from ansible_collections.community.general.plugins.modules.packaging.language import gem +from ansible_collections.community.general.plugins.modules import gem from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args @@ -24,7 +24,7 @@ class TestGem(ModuleTestCase): super(TestGem, self).setUp() self.rubygems_path = ['/usr/bin/gem'] self.mocker.patch( - 'ansible_collections.community.general.plugins.modules.packaging.language.gem.get_rubygems_path', + 'ansible_collections.community.general.plugins.modules.gem.get_rubygems_path', lambda module: copy.deepcopy(self.rubygems_path), ) @@ -35,7 +35,7 @@ class TestGem(ModuleTestCase): def patch_installed_versions(self, versions): """Mocks the versions of the installed package""" - target = 'ansible_collections.community.general.plugins.modules.packaging.language.gem.get_installed_versions' + target = 'ansible_collections.community.general.plugins.modules.gem.get_installed_versions' def new(module, remote=False): return versions @@ -43,7 +43,7 @@ class TestGem(ModuleTestCase): return self.mocker.patch(target, new) def patch_rubygems_version(self, version=None): - target = 'ansible_collections.community.general.plugins.modules.packaging.language.gem.get_rubygems_version' + target = 'ansible_collections.community.general.plugins.modules.gem.get_rubygems_version' def new(module): return version diff --git a/tests/unit/plugins/modules/source_control/github/test_github_repo.py b/tests/unit/plugins/modules/test_github_repo.py similarity index 99% rename from tests/unit/plugins/modules/source_control/github/test_github_repo.py rename to tests/unit/plugins/modules/test_github_repo.py index 2f494f7957..e86179f874 100644 --- a/tests/unit/plugins/modules/source_control/github/test_github_repo.py +++ b/tests/unit/plugins/modules/test_github_repo.py @@ -11,7 +11,7 @@ import json import sys from httmock import with_httmock, urlmatch, response from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.source_control.github import github_repo +from ansible_collections.community.general.plugins.modules import github_repo GITHUB_MINIMUM_PYTHON_VERSION = (2, 7) diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_deploy_key.py b/tests/unit/plugins/modules/test_gitlab_deploy_key.py similarity index 97% rename from tests/unit/plugins/modules/source_control/gitlab/test_gitlab_deploy_key.py rename to tests/unit/plugins/modules/test_gitlab_deploy_key.py index c0e91dbaf9..3e4dc58561 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_deploy_key.py +++ b/tests/unit/plugins/modules/test_gitlab_deploy_key.py @@ -9,7 +9,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.source_control.gitlab.gitlab_deploy_key import GitLabDeployKey +from ansible_collections.community.general.plugins.modules.gitlab_deploy_key import GitLabDeployKey def _dummy(x): diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_group.py b/tests/unit/plugins/modules/test_gitlab_group.py similarity index 97% rename from tests/unit/plugins/modules/source_control/gitlab/test_gitlab_group.py rename to tests/unit/plugins/modules/test_gitlab_group.py index 2dc341d7a7..230c470304 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_group.py +++ b/tests/unit/plugins/modules/test_gitlab_group.py @@ -9,7 +9,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.source_control.gitlab.gitlab_group import GitLabGroup +from ansible_collections.community.general.plugins.modules.gitlab_group import GitLabGroup def _dummy(x): diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_hook.py b/tests/unit/plugins/modules/test_gitlab_hook.py similarity index 96% rename from tests/unit/plugins/modules/source_control/gitlab/test_gitlab_hook.py rename to tests/unit/plugins/modules/test_gitlab_hook.py index e3bf124b1a..b9c72e19e3 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_hook.py +++ b/tests/unit/plugins/modules/test_gitlab_hook.py @@ -9,7 +9,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.source_control.gitlab.gitlab_hook import GitLabHook +from ansible_collections.community.general.plugins.modules.gitlab_hook import GitLabHook def _dummy(x): diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_project.py b/tests/unit/plugins/modules/test_gitlab_project.py similarity index 97% rename from tests/unit/plugins/modules/source_control/gitlab/test_gitlab_project.py rename to tests/unit/plugins/modules/test_gitlab_project.py index c462f5d2cd..397f79bcb4 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_project.py +++ b/tests/unit/plugins/modules/test_gitlab_project.py @@ -9,7 +9,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.source_control.gitlab.gitlab_project import GitLabProject +from ansible_collections.community.general.plugins.modules.gitlab_project import GitLabProject def _dummy(x): diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_protected_branch.py b/tests/unit/plugins/modules/test_gitlab_protected_branch.py similarity index 96% rename from tests/unit/plugins/modules/source_control/gitlab/test_gitlab_protected_branch.py rename to tests/unit/plugins/modules/test_gitlab_protected_branch.py index 16222a8f33..de35a4b28b 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_protected_branch.py +++ b/tests/unit/plugins/modules/test_gitlab_protected_branch.py @@ -11,7 +11,7 @@ import pytest from ansible_collections.community.general.plugins.module_utils.version import LooseVersion -from ansible_collections.community.general.plugins.modules.source_control.gitlab.gitlab_protected_branch import GitlabProtectedBranch +from ansible_collections.community.general.plugins.modules.gitlab_protected_branch import GitlabProtectedBranch def _dummy(x): diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_runner.py b/tests/unit/plugins/modules/test_gitlab_runner.py similarity index 97% rename from tests/unit/plugins/modules/source_control/gitlab/test_gitlab_runner.py rename to tests/unit/plugins/modules/test_gitlab_runner.py index efccaa6b47..a3fb0ecabb 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_runner.py +++ b/tests/unit/plugins/modules/test_gitlab_runner.py @@ -9,7 +9,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.source_control.gitlab.gitlab_runner import GitLabRunner +from ansible_collections.community.general.plugins.modules.gitlab_runner import GitLabRunner def _dummy(x): diff --git a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_user.py b/tests/unit/plugins/modules/test_gitlab_user.py similarity index 98% rename from tests/unit/plugins/modules/source_control/gitlab/test_gitlab_user.py rename to tests/unit/plugins/modules/test_gitlab_user.py index 0d7e184bf0..6dd2fce1d1 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/test_gitlab_user.py +++ b/tests/unit/plugins/modules/test_gitlab_user.py @@ -9,7 +9,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.source_control.gitlab.gitlab_user import GitLabUser +from ansible_collections.community.general.plugins.modules.gitlab_user import GitLabUser def _dummy(x): diff --git a/tests/unit/plugins/modules/database/saphana/test_hana_query.py b/tests/unit/plugins/modules/test_hana_query.py similarity index 97% rename from tests/unit/plugins/modules/database/saphana/test_hana_query.py rename to tests/unit/plugins/modules/test_hana_query.py index f70b3003b8..db06e4cef7 100644 --- a/tests/unit/plugins/modules/database/saphana/test_hana_query.py +++ b/tests/unit/plugins/modules/test_hana_query.py @@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.plugins.modules.database.saphana import hana_query +from ansible_collections.community.general.plugins.modules import hana_query from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, diff --git a/tests/unit/plugins/modules/packaging/os/test_homebrew.py b/tests/unit/plugins/modules/test_homebrew.py similarity index 87% rename from tests/unit/plugins/modules/packaging/os/test_homebrew.py rename to tests/unit/plugins/modules/test_homebrew.py index a1b561906e..f849b433df 100644 --- a/tests/unit/plugins/modules/packaging/os/test_homebrew.py +++ b/tests/unit/plugins/modules/test_homebrew.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.packaging.os.homebrew import Homebrew +from ansible_collections.community.general.plugins.modules.homebrew import Homebrew class TestHomebrewModule(unittest.TestCase): diff --git a/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py b/tests/unit/plugins/modules/test_homebrew_cask.py similarity index 86% rename from tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py rename to tests/unit/plugins/modules/test_homebrew_cask.py index ac872c7b6c..6fcc06d976 100644 --- a/tests/unit/plugins/modules/packaging/os/test_homebrew_cask.py +++ b/tests/unit/plugins/modules/test_homebrew_cask.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.packaging.os.homebrew_cask import HomebrewCask +from ansible_collections.community.general.plugins.modules.homebrew_cask import HomebrewCask class TestHomebrewCaskModule(unittest.TestCase): diff --git a/tests/unit/plugins/modules/monitoring/test_icinga2_feature.py b/tests/unit/plugins/modules/test_icinga2_feature.py similarity index 97% rename from tests/unit/plugins/modules/monitoring/test_icinga2_feature.py rename to tests/unit/plugins/modules/test_icinga2_feature.py index 379071963f..23c94fad58 100644 --- a/tests/unit/plugins/modules/monitoring/test_icinga2_feature.py +++ b/tests/unit/plugins/modules/test_icinga2_feature.py @@ -9,7 +9,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.plugins.modules.monitoring import icinga2_feature +from ansible_collections.community.general.plugins.modules import icinga2_feature from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils import basic diff --git a/tests/unit/plugins/modules/identity/ipa/test_ipa_otpconfig.py b/tests/unit/plugins/modules/test_ipa_otpconfig.py similarity index 99% rename from tests/unit/plugins/modules/identity/ipa/test_ipa_otpconfig.py rename to tests/unit/plugins/modules/test_ipa_otpconfig.py index a13ae32c0f..718359a301 100644 --- a/tests/unit/plugins/modules/identity/ipa/test_ipa_otpconfig.py +++ b/tests/unit/plugins/modules/test_ipa_otpconfig.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.ipa import ipa_otpconfig +from ansible_collections.community.general.plugins.modules import ipa_otpconfig @contextmanager diff --git a/tests/unit/plugins/modules/identity/ipa/test_ipa_otptoken.py b/tests/unit/plugins/modules/test_ipa_otptoken.py similarity index 99% rename from tests/unit/plugins/modules/identity/ipa/test_ipa_otptoken.py rename to tests/unit/plugins/modules/test_ipa_otptoken.py index 4781b242e9..c06e19c3b5 100644 --- a/tests/unit/plugins/modules/identity/ipa/test_ipa_otptoken.py +++ b/tests/unit/plugins/modules/test_ipa_otptoken.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.ipa import ipa_otptoken +from ansible_collections.community.general.plugins.modules import ipa_otptoken @contextmanager diff --git a/tests/unit/plugins/modules/identity/ipa/test_ipa_pwpolicy.py b/tests/unit/plugins/modules/test_ipa_pwpolicy.py similarity index 99% rename from tests/unit/plugins/modules/identity/ipa/test_ipa_pwpolicy.py rename to tests/unit/plugins/modules/test_ipa_pwpolicy.py index 35201a2cbe..b45c566fc2 100644 --- a/tests/unit/plugins/modules/identity/ipa/test_ipa_pwpolicy.py +++ b/tests/unit/plugins/modules/test_ipa_pwpolicy.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.ipa import ipa_pwpolicy +from ansible_collections.community.general.plugins.modules import ipa_pwpolicy @contextmanager diff --git a/tests/unit/plugins/modules/system/test_java_keystore.py b/tests/unit/plugins/modules/test_java_keystore.py similarity index 97% rename from tests/unit/plugins/modules/system/test_java_keystore.py rename to tests/unit/plugins/modules/test_java_keystore.py index 7ebc8e20e4..b2e70404a9 100644 --- a/tests/unit/plugins/modules/system/test_java_keystore.py +++ b/tests/unit/plugins/modules/test_java_keystore.py @@ -15,7 +15,7 @@ from ansible_collections.community.general.tests.unit.plugins.modules.utils impo from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat.mock import Mock from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.modules.system.java_keystore import JavaKeystore +from ansible_collections.community.general.plugins.modules.java_keystore import JavaKeystore module_argument_spec = dict( @@ -44,9 +44,9 @@ class TestCreateJavaKeystore(ModuleTestCase): super(TestCreateJavaKeystore, self).setUp() orig_exists = os.path.exists - self.mock_create_file = patch('ansible_collections.community.general.plugins.modules.system.java_keystore.create_file') - self.mock_create_path = patch('ansible_collections.community.general.plugins.modules.system.java_keystore.create_path') - self.mock_current_type = patch('ansible_collections.community.general.plugins.modules.system.java_keystore.JavaKeystore.current_type') + self.mock_create_file = patch('ansible_collections.community.general.plugins.modules.java_keystore.create_file') + self.mock_create_path = patch('ansible_collections.community.general.plugins.modules.java_keystore.create_path') + self.mock_current_type = patch('ansible_collections.community.general.plugins.modules.java_keystore.JavaKeystore.current_type') self.mock_run_command = patch('ansible.module_utils.basic.AnsibleModule.run_command') self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') self.mock_preserved_copy = patch('ansible.module_utils.basic.AnsibleModule.preserved_copy') @@ -233,8 +233,8 @@ class TestCertChanged(ModuleTestCase): def setUp(self): """Setup.""" super(TestCertChanged, self).setUp() - self.mock_create_file = patch('ansible_collections.community.general.plugins.modules.system.java_keystore.create_file') - self.mock_current_type = patch('ansible_collections.community.general.plugins.modules.system.java_keystore.JavaKeystore.current_type') + self.mock_create_file = patch('ansible_collections.community.general.plugins.modules.java_keystore.create_file') + self.mock_current_type = patch('ansible_collections.community.general.plugins.modules.java_keystore.JavaKeystore.current_type') self.mock_run_command = patch('ansible.module_utils.basic.AnsibleModule.run_command') self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') self.mock_preserved_copy = patch('ansible.module_utils.basic.AnsibleModule.preserved_copy') diff --git a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py b/tests/unit/plugins/modules/test_jenkins_build.py similarity index 89% rename from tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py rename to tests/unit/plugins/modules/test_jenkins_build.py index bf32068897..adee2fce99 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py +++ b/tests/unit/plugins/modules/test_jenkins_build.py @@ -9,7 +9,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils import basic from ansible.module_utils.common.text.converters import to_bytes -from ansible_collections.community.general.plugins.modules.web_infrastructure import jenkins_build +from ansible_collections.community.general.plugins.modules import jenkins_build import json @@ -98,14 +98,14 @@ class TestJenkinsBuild(unittest.TestCase): self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.test_dependencies') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') def test_module_fail_when_required_args_missing(self, test_deps): test_deps.return_value = None with self.assertRaises(AnsibleFailJson): set_module_args({}) jenkins_build.main() - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.test_dependencies') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') def test_module_fail_when_missing_build_number(self, test_deps): test_deps.return_value = None with self.assertRaises(AnsibleFailJson): @@ -115,8 +115,8 @@ class TestJenkinsBuild(unittest.TestCase): }) jenkins_build.main() - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.test_dependencies') - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.JenkinsBuild.get_jenkins_connection') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.JenkinsBuild.get_jenkins_connection') def test_module_create_build(self, jenkins_connection, test_deps): test_deps.return_value = None jenkins_connection.return_value = JenkinsMock() @@ -129,8 +129,8 @@ class TestJenkinsBuild(unittest.TestCase): }) jenkins_build.main() - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.test_dependencies') - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.JenkinsBuild.get_jenkins_connection') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.JenkinsBuild.get_jenkins_connection') def test_module_stop_build(self, jenkins_connection, test_deps): test_deps.return_value = None jenkins_connection.return_value = JenkinsMock() @@ -147,8 +147,8 @@ class TestJenkinsBuild(unittest.TestCase): self.assertTrue(return_json.exception.args[0]['changed']) - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.test_dependencies') - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.JenkinsBuild.get_jenkins_connection') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.JenkinsBuild.get_jenkins_connection') def test_module_stop_build_again(self, jenkins_connection, test_deps): test_deps.return_value = None jenkins_connection.return_value = JenkinsMockIdempotent() @@ -165,8 +165,8 @@ class TestJenkinsBuild(unittest.TestCase): self.assertFalse(return_json.exception.args[0]['changed']) - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.test_dependencies') - @patch('ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_build.JenkinsBuild.get_jenkins_connection') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.JenkinsBuild.get_jenkins_connection') def test_module_delete_build(self, jenkins_connection, test_deps): test_deps.return_value = None jenkins_connection.return_value = JenkinsMock() diff --git a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py b/tests/unit/plugins/modules/test_jenkins_plugin.py similarity index 98% rename from tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py rename to tests/unit/plugins/modules/test_jenkins_plugin.py index f8a65be23e..194cc2d724 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_plugin.py +++ b/tests/unit/plugins/modules/test_jenkins_plugin.py @@ -7,7 +7,7 @@ __metaclass__ = type from io import BytesIO -from ansible_collections.community.general.plugins.modules.web_infrastructure.jenkins_plugin import JenkinsPlugin +from ansible_collections.community.general.plugins.modules.jenkins_plugin import JenkinsPlugin from ansible.module_utils.common._collections_compat import Mapping diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_authentication.py b/tests/unit/plugins/modules/test_keycloak_authentication.py similarity index 99% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_authentication.py rename to tests/unit/plugins/modules/test_keycloak_authentication.py index 226a3bad7c..19bea8ac0e 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_authentication.py +++ b/tests/unit/plugins/modules/test_keycloak_authentication.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_authentication +from ansible_collections.community.general.plugins.modules import keycloak_authentication from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client.py b/tests/unit/plugins/modules/test_keycloak_client.py similarity index 98% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_client.py rename to tests/unit/plugins/modules/test_keycloak_client.py index 1f9fa8bc67..bc71b37327 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client.py +++ b/tests/unit/plugins/modules/test_keycloak_client.py @@ -15,7 +15,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import call, p from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, \ ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_client +from ansible_collections.community.general.plugins.modules import keycloak_client from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py b/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py similarity index 99% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py rename to tests/unit/plugins/modules/test_keycloak_client_rolemapping.py index 72fc7850d5..648d04aa23 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_client_rolemapping.py +++ b/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_client_rolemapping +from ansible_collections.community.general.plugins.modules import keycloak_client_rolemapping from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_clientscope.py b/tests/unit/plugins/modules/test_keycloak_clientscope.py similarity index 99% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_clientscope.py rename to tests/unit/plugins/modules/test_keycloak_clientscope.py index 011d451b4d..2d09496bbf 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_clientscope.py +++ b/tests/unit/plugins/modules/test_keycloak_clientscope.py @@ -15,7 +15,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import call, p from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, \ ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_clientscope +from ansible_collections.community.general.plugins.modules import keycloak_clientscope from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_identity_provider.py b/tests/unit/plugins/modules/test_keycloak_identity_provider.py similarity index 99% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_identity_provider.py rename to tests/unit/plugins/modules/test_keycloak_identity_provider.py index 7bcc4b41a2..ecee7eb9ef 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_identity_provider.py +++ b/tests/unit/plugins/modules/test_keycloak_identity_provider.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_identity_provider +from ansible_collections.community.general.plugins.modules import keycloak_identity_provider from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm.py b/tests/unit/plugins/modules/test_keycloak_realm.py similarity index 99% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm.py rename to tests/unit/plugins/modules/test_keycloak_realm.py index 4158f320ba..1572d79cbd 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm.py +++ b/tests/unit/plugins/modules/test_keycloak_realm.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_realm +from ansible_collections.community.general.plugins.modules import keycloak_realm from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm_info.py b/tests/unit/plugins/modules/test_keycloak_realm_info.py similarity index 97% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm_info.py rename to tests/unit/plugins/modules/test_keycloak_realm_info.py index 7ac381b974..c1860e41ff 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_realm_info.py +++ b/tests/unit/plugins/modules/test_keycloak_realm_info.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_realm_info +from ansible_collections.community.general.plugins.modules import keycloak_realm_info from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_role.py b/tests/unit/plugins/modules/test_keycloak_role.py similarity index 99% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_role.py rename to tests/unit/plugins/modules/test_keycloak_role.py index 4e27bfcae9..74cd7bc9a3 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_role.py +++ b/tests/unit/plugins/modules/test_keycloak_role.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_role +from ansible_collections.community.general.plugins.modules import keycloak_role from itertools import count diff --git a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_user_federation.py b/tests/unit/plugins/modules/test_keycloak_user_federation.py similarity index 99% rename from tests/unit/plugins/modules/identity/keycloak/test_keycloak_user_federation.py rename to tests/unit/plugins/modules/test_keycloak_user_federation.py index 88b61ac559..7b624ef067 100644 --- a/tests/unit/plugins/modules/identity/keycloak/test_keycloak_user_federation.py +++ b/tests/unit/plugins/modules/test_keycloak_user_federation.py @@ -13,7 +13,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.plugins.modules.identity.keycloak import keycloak_user_federation +from ansible_collections.community.general.plugins.modules import keycloak_user_federation from itertools import count diff --git a/tests/unit/plugins/modules/cloud/linode/test_linode.py b/tests/unit/plugins/modules/test_linode.py similarity index 89% rename from tests/unit/plugins/modules/cloud/linode/test_linode.py rename to tests/unit/plugins/modules/test_linode.py index 76aa5a75ce..684a5f0c67 100644 --- a/tests/unit/plugins/modules/cloud/linode/test_linode.py +++ b/tests/unit/plugins/modules/test_linode.py @@ -7,7 +7,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.cloud.linode import linode +from ansible_collections.community.general.plugins.modules import linode from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args from .linode_conftest import api_key, auth diff --git a/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py b/tests/unit/plugins/modules/test_linode_v4.py similarity index 99% rename from tests/unit/plugins/modules/cloud/linode/test_linode_v4.py rename to tests/unit/plugins/modules/test_linode_v4.py index 1060633142..37774bfd44 100644 --- a/tests/unit/plugins/modules/cloud/linode/test_linode_v4.py +++ b/tests/unit/plugins/modules/test_linode_v4.py @@ -20,7 +20,7 @@ mandatory_py_version = pytest.mark.skipif( from linode_api4.errors import ApiError as LinodeApiError from linode_api4 import LinodeClient -from ansible_collections.community.general.plugins.modules.cloud.linode import linode_v4 +from ansible_collections.community.general.plugins.modules import linode_v4 from ansible_collections.community.general.plugins.module_utils.linode import get_user_agent from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args from ansible_collections.community.general.tests.unit.compat import mock diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py b/tests/unit/plugins/modules/test_lxca_cmms.py similarity index 91% rename from tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py rename to tests/unit/plugins/modules/test_lxca_cmms.py index 95e73054a0..efbdad0620 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_cmms.py +++ b/tests/unit/plugins/modules/test_lxca_cmms.py @@ -9,7 +9,7 @@ import json import pytest from ansible_collections.community.general.tests.unit.compat import mock -from ansible_collections.community.general.plugins.modules.remote_management.lxca import lxca_cmms +from ansible_collections.community.general.plugins.modules import lxca_cmms @pytest.fixture(scope='module') @@ -38,7 +38,7 @@ class TestMyModule(): indirect=['patch_ansible_module']) @pytest.mark.usefixtures('patch_ansible_module') @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms.execute_module', autospec=True) + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_cmms.execute_module', autospec=True) def test_without_required_parameters(self, _setup_conn, _execute_module, mocker, capfd, setup_module): """Failure must occurs when all parameters are missing""" @@ -52,8 +52,8 @@ class TestMyModule(): assert 'missing required arguments' in results['msg'] @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms.execute_module', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms.AnsibleModule', autospec=True) + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_cmms.execute_module', autospec=True) + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_cmms.AnsibleModule', autospec=True) def test__argument_spec(self, ansible_mod_cls, _execute_module, _setup_conn, setup_module): expected_arguments_spec = dict( login_user=dict(required=True), @@ -79,9 +79,9 @@ class TestMyModule(): supports_check_mode=False) == ansible_mod_cls.call_args @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms._cmms_by_uuid', + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_cmms._cmms_by_uuid', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms.AnsibleModule', + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_cmms.AnsibleModule', autospec=True) def test__cmms_empty_list(self, ansible_mod_cls, _get_cmms, _setup_conn, setup_module): mod_obj = ansible_mod_cls.return_value diff --git a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py b/tests/unit/plugins/modules/test_lxca_nodes.py similarity index 92% rename from tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py rename to tests/unit/plugins/modules/test_lxca_nodes.py index 4e46547d82..677587f1c4 100644 --- a/tests/unit/plugins/modules/remote_management/lxca/test_lxca_nodes.py +++ b/tests/unit/plugins/modules/test_lxca_nodes.py @@ -9,7 +9,7 @@ import json import pytest from ansible_collections.community.general.tests.unit.compat import mock -from ansible_collections.community.general.plugins.modules.remote_management.lxca import lxca_nodes +from ansible_collections.community.general.plugins.modules import lxca_nodes from ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common import setup_conn from ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common import close_conn @@ -40,7 +40,7 @@ class TestMyModule(): indirect=['patch_ansible_module']) @pytest.mark.usefixtures('patch_ansible_module') @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes.execute_module', autospec=True) + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_nodes.execute_module', autospec=True) def test_without_required_parameters(self, _setup_conn, _execute_module, mocker, capfd, setup_module): """Failure must occurs when all parameters are missing""" @@ -54,8 +54,8 @@ class TestMyModule(): assert 'missing required arguments' in results['msg'] @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes.execute_module', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes.AnsibleModule', autospec=True) + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_nodes.execute_module', autospec=True) + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_nodes.AnsibleModule', autospec=True) def test__argument_spec(self, ansible_mod_cls, _execute_module, _setup_conn, setup_module): expected_arguments_spec = dict( login_user=dict(required=True), @@ -83,9 +83,9 @@ class TestMyModule(): supports_check_mode=False) == ansible_mod_cls.call_args @mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes._nodes_by_uuid', + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_nodes._nodes_by_uuid', autospec=True) - @mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes.AnsibleModule', + @mock.patch('ansible_collections.community.general.plugins.modules.lxca_nodes.AnsibleModule', autospec=True) def test__nodes_empty_list(self, ansible_mod_cls, _get_nodes, _setup_conn, setup_module): mod_obj = ansible_mod_cls.return_value diff --git a/tests/unit/plugins/modules/packaging/os/test_macports.py b/tests/unit/plugins/modules/test_macports.py similarity index 95% rename from tests/unit/plugins/modules/packaging/os/test_macports.py rename to tests/unit/plugins/modules/test_macports.py index 189f9616fe..8fa3942e88 100644 --- a/tests/unit/plugins/modules/packaging/os/test_macports.py +++ b/tests/unit/plugins/modules/test_macports.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils import basic -from ansible_collections.community.general.plugins.modules.packaging.os import macports +from ansible_collections.community.general.plugins.modules import macports import pytest diff --git a/tests/unit/plugins/modules/packaging/language/test_maven_artifact.py b/tests/unit/plugins/modules/test_maven_artifact.py similarity index 92% rename from tests/unit/plugins/modules/packaging/language/test_maven_artifact.py rename to tests/unit/plugins/modules/test_maven_artifact.py index 262aee6e72..7e25574493 100644 --- a/tests/unit/plugins/modules/packaging/language/test_maven_artifact.py +++ b/tests/unit/plugins/modules/test_maven_artifact.py @@ -6,7 +6,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.packaging.language import maven_artifact +from ansible_collections.community.general.plugins.modules import maven_artifact from ansible.module_utils import basic @@ -62,7 +62,7 @@ maven_metadata_example = b""" (None, "[2.0,)", "4.13-beta-2"), ]) def test_find_version_by_spec(mocker, version_by_spec, version_choosed): - _getContent = mocker.patch('ansible_collections.community.general.plugins.modules.packaging.language.maven_artifact.MavenDownloader._getContent') + _getContent = mocker.patch('ansible_collections.community.general.plugins.modules.maven_artifact.MavenDownloader._getContent') _getContent.return_value = maven_metadata_example artifact = maven_artifact.Artifact("junit", "junit", None, version_by_spec, "jar") diff --git a/tests/unit/plugins/modules/system/test_modprobe.py b/tests/unit/plugins/modules/test_modprobe.py similarity index 96% rename from tests/unit/plugins/modules/system/test_modprobe.py rename to tests/unit/plugins/modules/test_modprobe.py index 306399375b..cddbb1b5da 100644 --- a/tests/unit/plugins/modules/system/test_modprobe.py +++ b/tests/unit/plugins/modules/test_modprobe.py @@ -10,7 +10,7 @@ from ansible_collections.community.general.tests.unit.plugins.modules.utils impo from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat.mock import Mock from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.modules.system.modprobe import Modprobe +from ansible_collections.community.general.plugins.modules.modprobe import Modprobe class TestLoadModule(ModuleTestCase): @@ -18,7 +18,7 @@ class TestLoadModule(ModuleTestCase): super(TestLoadModule, self).setUp() self.mock_module_loaded = patch( - 'ansible_collections.community.general.plugins.modules.system.modprobe.Modprobe.module_loaded' + 'ansible_collections.community.general.plugins.modules.modprobe.Modprobe.module_loaded' ) self.mock_run_command = patch('ansible.module_utils.basic.AnsibleModule.run_command') self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') @@ -95,7 +95,7 @@ class TestUnloadModule(ModuleTestCase): super(TestUnloadModule, self).setUp() self.mock_module_loaded = patch( - 'ansible_collections.community.general.plugins.modules.system.modprobe.Modprobe.module_loaded' + 'ansible_collections.community.general.plugins.modules.modprobe.Modprobe.module_loaded' ) self.mock_run_command = patch('ansible.module_utils.basic.AnsibleModule.run_command') self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') diff --git a/tests/unit/plugins/modules/monitoring/test_monit.py b/tests/unit/plugins/modules/test_monit.py similarity index 98% rename from tests/unit/plugins/modules/monitoring/test_monit.py rename to tests/unit/plugins/modules/test_monit.py index 7e5744a10e..7f8f15dd9e 100644 --- a/tests/unit/plugins/modules/monitoring/test_monit.py +++ b/tests/unit/plugins/modules/test_monit.py @@ -9,7 +9,7 @@ import mock import pytest from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.monitoring import monit +from ansible_collections.community.general.plugins.modules import monit from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/test_nmcli.py similarity index 99% rename from tests/unit/plugins/modules/net_tools/test_nmcli.py rename to tests/unit/plugins/modules/test_nmcli.py index 885bdf3a96..c7e0baf7e5 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/test_nmcli.py @@ -10,7 +10,7 @@ import json import pytest from ansible.module_utils.common.text.converters import to_text -from ansible_collections.community.general.plugins.modules.net_tools import nmcli +from ansible_collections.community.general.plugins.modules import nmcli from ansible.module_utils.basic import AnsibleModule pytestmark = pytest.mark.usefixtures('patch_ansible_module') diff --git a/tests/unit/plugins/modules/packaging/language/test_npm.py b/tests/unit/plugins/modules/test_npm.py similarity index 98% rename from tests/unit/plugins/modules/packaging/language/test_npm.py rename to tests/unit/plugins/modules/test_npm.py index e9a8d486fa..6041fcb0cf 100644 --- a/tests/unit/plugins/modules/packaging/language/test_npm.py +++ b/tests/unit/plugins/modules/test_npm.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.plugins.modules.packaging.language import npm +from ansible_collections.community.general.plugins.modules import npm from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args) @@ -17,7 +17,7 @@ class NPMModuleTestCase(ModuleTestCase): def setUp(self): super(NPMModuleTestCase, self).setUp() - ansible_module_path = "ansible_collections.community.general.plugins.modules.packaging.language.npm.AnsibleModule" + ansible_module_path = "ansible_collections.community.general.plugins.modules.npm.AnsibleModule" self.mock_run_command = patch('%s.run_command' % ansible_module_path) self.module_main_command = self.mock_run_command.start() self.mock_get_bin_path = patch('%s.get_bin_path' % ansible_module_path) diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py b/tests/unit/plugins/modules/test_oneview_datacenter_info.py similarity index 95% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py rename to tests/unit/plugins/modules/test_oneview_datacenter_info.py index d2542d159c..1224a8fde7 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_datacenter_info.py +++ b/tests/unit/plugins/modules/test_oneview_datacenter_info.py @@ -10,7 +10,7 @@ import pytest from .hpe_test_utils import FactsParamsTest from .oneview_conftest import mock_ov_client, mock_ansible_module -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_datacenter_info import DatacenterInfoModule +from ansible_collections.community.general.plugins.modules.oneview_datacenter_info import DatacenterInfoModule PARAMS_GET_CONNECTED = dict( config='config.json', diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py b/tests/unit/plugins/modules/test_oneview_enclosure_info.py similarity index 97% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py rename to tests/unit/plugins/modules/test_oneview_enclosure_info.py index 1032d224a6..4356e70e29 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_enclosure_info.py +++ b/tests/unit/plugins/modules/test_oneview_enclosure_info.py @@ -9,7 +9,7 @@ from .hpe_test_utils import FactsParamsTestCase from .oneview_conftest import mock_ov_client, mock_ansible_module from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_enclosure_info import EnclosureInfoModule +from ansible_collections.community.general.plugins.modules.oneview_enclosure_info import EnclosureInfoModule ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py b/tests/unit/plugins/modules/test_oneview_ethernet_network.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network.py rename to tests/unit/plugins/modules/test_oneview_ethernet_network.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py b/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_ethernet_network_info.py rename to tests/unit/plugins/modules/test_oneview_ethernet_network_info.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py b/tests/unit/plugins/modules/test_oneview_fc_network.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network.py rename to tests/unit/plugins/modules/test_oneview_fc_network.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py b/tests/unit/plugins/modules/test_oneview_fc_network_info.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_fc_network_info.py rename to tests/unit/plugins/modules/test_oneview_fc_network_info.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py b/tests/unit/plugins/modules/test_oneview_fcoe_network.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network.py rename to tests/unit/plugins/modules/test_oneview_fcoe_network.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py b/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_fcoe_network_info.py rename to tests/unit/plugins/modules/test_oneview_fcoe_network_info.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py similarity index 98% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py rename to tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py index 597c6953ef..99b4a8bc63 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py +++ b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py @@ -10,7 +10,7 @@ from copy import deepcopy from ansible_collections.community.general.tests.unit.compat import unittest, mock from .hpe_test_utils import OneViewBaseTestCase from .oneview_conftest import mock_ov_client, mock_ansible_module -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group import LogicalInterconnectGroupModule +from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group import LogicalInterconnectGroupModule FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py similarity index 93% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py rename to tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py index 45f72a198b..425aac6ba8 100644 --- a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_logical_interconnect_group_info.py +++ b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py @@ -8,7 +8,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .hpe_test_utils import FactsParamsTestCase from .oneview_conftest import mock_ov_client, mock_ansible_module -from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group_info import ( +from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group_info import ( LogicalInterconnectGroupInfoModule ) diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py b/tests/unit/plugins/modules/test_oneview_network_set.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set.py rename to tests/unit/plugins/modules/test_oneview_network_set.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py b/tests/unit/plugins/modules/test_oneview_network_set_info.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_network_set_info.py rename to tests/unit/plugins/modules/test_oneview_network_set_info.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py b/tests/unit/plugins/modules/test_oneview_san_manager.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager.py rename to tests/unit/plugins/modules/test_oneview_san_manager.py diff --git a/tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py b/tests/unit/plugins/modules/test_oneview_san_manager_info.py similarity index 100% rename from tests/unit/plugins/modules/remote_management/oneview/test_oneview_san_manager_info.py rename to tests/unit/plugins/modules/test_oneview_san_manager_info.py diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman.py b/tests/unit/plugins/modules/test_pacman.py similarity index 99% rename from tests/unit/plugins/modules/packaging/os/test_pacman.py rename to tests/unit/plugins/modules/test_pacman.py index 6826ee81e2..c3e455c034 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman.py +++ b/tests/unit/plugins/modules/test_pacman.py @@ -20,8 +20,8 @@ from ansible_collections.community.general.tests.unit.plugins.modules.utils impo fail_json, ) -from ansible_collections.community.general.plugins.modules.packaging.os import pacman -from ansible_collections.community.general.plugins.modules.packaging.os.pacman import ( +from ansible_collections.community.general.plugins.modules import pacman +from ansible_collections.community.general.plugins.modules.pacman import ( Package, VersionTuple, ) diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman_key.py b/tests/unit/plugins/modules/test_pacman_key.py similarity index 99% rename from tests/unit/plugins/modules/packaging/os/test_pacman_key.py rename to tests/unit/plugins/modules/test_pacman_key.py index fc41e8f86e..ac85708985 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman_key.py +++ b/tests/unit/plugins/modules/test_pacman_key.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.modules.packaging.os import pacman_key +from ansible_collections.community.general.plugins.modules import pacman_key import pytest import json diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty.py b/tests/unit/plugins/modules/test_pagerduty.py similarity index 98% rename from tests/unit/plugins/modules/monitoring/test_pagerduty.py rename to tests/unit/plugins/modules/test_pagerduty.py index 47aae12b3e..d363804bc7 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty.py +++ b/tests/unit/plugins/modules/test_pagerduty.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.monitoring import pagerduty +from ansible_collections.community.general.plugins.modules import pagerduty import json diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py b/tests/unit/plugins/modules/test_pagerduty_alert.py similarity index 95% rename from tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py rename to tests/unit/plugins/modules/test_pagerduty_alert.py index d076bc4f38..3df992b42d 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty_alert.py +++ b/tests/unit/plugins/modules/test_pagerduty_alert.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.monitoring import pagerduty_alert +from ansible_collections.community.general.plugins.modules import pagerduty_alert class PagerDutyAlertsTest(unittest.TestCase): diff --git a/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py b/tests/unit/plugins/modules/test_pagerduty_change.py similarity index 97% rename from tests/unit/plugins/modules/monitoring/test_pagerduty_change.py rename to tests/unit/plugins/modules/test_pagerduty_change.py index d8cd3d5a99..d596d6ab83 100644 --- a/tests/unit/plugins/modules/monitoring/test_pagerduty_change.py +++ b/tests/unit/plugins/modules/test_pagerduty_change.py @@ -8,7 +8,7 @@ __metaclass__ = type import json import pytest from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.plugins.modules.monitoring import pagerduty_change +from ansible_collections.community.general.plugins.modules import pagerduty_change from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/system/test_pamd.py b/tests/unit/plugins/modules/test_pamd.py similarity index 97% rename from tests/unit/plugins/modules/system/test_pamd.py rename to tests/unit/plugins/modules/test_pamd.py index cf89acf5c6..4c49cebed7 100644 --- a/tests/unit/plugins/modules/system/test_pamd.py +++ b/tests/unit/plugins/modules/test_pamd.py @@ -7,11 +7,11 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.system.pamd import PamdRule -from ansible_collections.community.general.plugins.modules.system.pamd import PamdLine -from ansible_collections.community.general.plugins.modules.system.pamd import PamdComment -from ansible_collections.community.general.plugins.modules.system.pamd import PamdInclude -from ansible_collections.community.general.plugins.modules.system.pamd import PamdService +from ansible_collections.community.general.plugins.modules.pamd import PamdRule +from ansible_collections.community.general.plugins.modules.pamd import PamdLine +from ansible_collections.community.general.plugins.modules.pamd import PamdComment +from ansible_collections.community.general.plugins.modules.pamd import PamdInclude +from ansible_collections.community.general.plugins.modules.pamd import PamdService class PamdLineTestCase(unittest.TestCase): diff --git a/tests/unit/plugins/modules/system/test_parted.py b/tests/unit/plugins/modules/test_parted.py similarity index 90% rename from tests/unit/plugins/modules/system/test_parted.py rename to tests/unit/plugins/modules/test_parted.py index bec024f110..1e010343bd 100644 --- a/tests/unit/plugins/modules/system/test_parted.py +++ b/tests/unit/plugins/modules/test_parted.py @@ -6,9 +6,9 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import patch, call -from ansible_collections.community.general.plugins.modules.system import parted as parted_module -from ansible_collections.community.general.plugins.modules.system.parted import parse_parted_version -from ansible_collections.community.general.plugins.modules.system.parted import parse_partition_info +from ansible_collections.community.general.plugins.modules import parted as parted_module +from ansible_collections.community.general.plugins.modules.parted import parse_parted_version +from ansible_collections.community.general.plugins.modules.parted import parse_partition_info from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args # Example of output : parted -s -m /dev/sdb -- unit 'MB' print @@ -133,10 +133,10 @@ class TestParted(ModuleTestCase): super(TestParted, self).setUp() self.module = parted_module - self.mock_check_parted_label = (patch('ansible_collections.community.general.plugins.modules.system.parted.check_parted_label', return_value=False)) + self.mock_check_parted_label = (patch('ansible_collections.community.general.plugins.modules.parted.check_parted_label', return_value=False)) self.check_parted_label = self.mock_check_parted_label.start() - self.mock_parted = (patch('ansible_collections.community.general.plugins.modules.system.parted.parted')) + self.mock_parted = (patch('ansible_collections.community.general.plugins.modules.parted.parted')) self.parted = self.mock_parted.start() self.mock_run_command = (patch('ansible.module_utils.basic.AnsibleModule.run_command')) @@ -192,7 +192,7 @@ class TestParted(ModuleTestCase): 'number': 1, 'state': 'present', }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=False) def test_create_new_partition(self): @@ -201,7 +201,7 @@ class TestParted(ModuleTestCase): 'number': 4, 'state': 'present', }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=True, script='unit KiB mkpart primary 0% 100%') def test_create_new_partition_1G(self): @@ -211,7 +211,7 @@ class TestParted(ModuleTestCase): 'state': 'present', 'part_end': '1GiB', }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=True, script='unit KiB mkpart primary 0% 1GiB') def test_create_new_partition_minus_1G(self): @@ -222,7 +222,7 @@ class TestParted(ModuleTestCase): 'fs_type': 'ext2', 'part_start': '-1GiB', }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=True, script='unit KiB mkpart primary ext2 -1GiB 100%') def test_remove_partition_number_1(self): @@ -231,7 +231,7 @@ class TestParted(ModuleTestCase): 'number': 1, 'state': 'absent', }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=True, script='rm 1') def test_resize_partition(self): @@ -242,7 +242,7 @@ class TestParted(ModuleTestCase): 'part_end': '100%', 'resize': True }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=True, script='resizepart 3 100%') def test_change_flag(self): @@ -258,7 +258,7 @@ class TestParted(ModuleTestCase): '_ansible_check_mode': True, }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.parted.reset_mock() self.execute_module(changed=True) # When using multiple flags: @@ -282,7 +282,7 @@ class TestParted(ModuleTestCase): 'fs_type': 'ext3', '_ansible_check_mode': True, }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=True, script='unit KiB mkpart primary ext3 257GiB 100% unit KiB set 4 boot on') def test_create_label_gpt(self): @@ -298,7 +298,7 @@ class TestParted(ModuleTestCase): 'state': 'present', '_ansible_check_mode': True, }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict2): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict2): self.execute_module(changed=True, script='unit KiB mklabel gpt mkpart primary 0% 100% unit KiB name 1 \'"lvmpartition"\' set 1 lvm on') def test_change_label_gpt(self): @@ -311,7 +311,7 @@ class TestParted(ModuleTestCase): 'label': 'gpt', '_ansible_check_mode': True, }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict1): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict1): self.execute_module(changed=True, script='unit KiB mklabel gpt mkpart primary 0% 100%') def test_check_mode_unchanged(self): @@ -324,7 +324,7 @@ class TestParted(ModuleTestCase): 'flags': ['some_flag'], '_ansible_check_mode': True, }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict3): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict3): self.execute_module(changed=False) def test_check_mode_changed(self): @@ -337,7 +337,7 @@ class TestParted(ModuleTestCase): 'flags': ['other_flag'], '_ansible_check_mode': True, }) - with patch('ansible_collections.community.general.plugins.modules.system.parted.get_device_info', return_value=parted_dict3): + with patch('ansible_collections.community.general.plugins.modules.parted.get_device_info', return_value=parted_dict3): self.execute_module(changed=True) def test_version_info(self): diff --git a/tests/unit/plugins/modules/packaging/os/test_pkgin.py b/tests/unit/plugins/modules/test_pkgin.py similarity index 93% rename from tests/unit/plugins/modules/packaging/os/test_pkgin.py rename to tests/unit/plugins/modules/test_pkgin.py index 4504e46963..d73911e0c3 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pkgin.py +++ b/tests/unit/plugins/modules/test_pkgin.py @@ -8,7 +8,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import mock from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.plugins.modules.packaging.os import pkgin +from ansible_collections.community.general.plugins.modules import pkgin class TestPkginQueryPackage(unittest.TestCase): @@ -16,7 +16,7 @@ class TestPkginQueryPackage(unittest.TestCase): def setUp(self): pkgin.PKGIN_PATH = "" - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_package_without_version_is_present(self, mock_module): # given package = 'py37-conan' @@ -32,7 +32,7 @@ class TestPkginQueryPackage(unittest.TestCase): # then self.assertEquals(command_result, pkgin.PackageState.PRESENT) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_package_with_version_is_present(self, mock_module): # given package = 'py37-conan-1.21.0' @@ -48,7 +48,7 @@ class TestPkginQueryPackage(unittest.TestCase): # then self.assertEquals(command_result, pkgin.PackageState.PRESENT) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_package_found_but_not_installed(self, mock_module): # given package = 'cmake' @@ -64,7 +64,7 @@ class TestPkginQueryPackage(unittest.TestCase): # then self.assertEquals(command_result, pkgin.PackageState.NOT_INSTALLED) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_package_found_outdated(self, mock_module): # given package = 'cmake316' @@ -80,7 +80,7 @@ class TestPkginQueryPackage(unittest.TestCase): # then self.assertEquals(command_result, pkgin.PackageState.OUTDATED) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_package_with_version_found_outdated(self, mock_module): # given package = 'cmake316-3.16.0nb1' @@ -96,7 +96,7 @@ class TestPkginQueryPackage(unittest.TestCase): # then self.assertEquals(command_result, pkgin.PackageState.OUTDATED) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_package_not_found(self, mock_module): # given package = 'cmake320-3.20.0nb1' @@ -112,7 +112,7 @@ class TestPkginQueryPackage(unittest.TestCase): # then self.assertEquals(command_result, pkgin.PackageState.NOT_FOUND) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_with_parseable_flag_supported_package_is_present(self, mock_module): # given package = 'py37-conan' @@ -128,7 +128,7 @@ class TestPkginQueryPackage(unittest.TestCase): # then self.assertEquals(command_result, pkgin.PackageState.PRESENT) - @mock.patch('ansible_collections.community.general.plugins.modules.packaging.os.pkgin.AnsibleModule') + @mock.patch('ansible_collections.community.general.plugins.modules.pkgin.AnsibleModule') def test_with_parseable_flag_not_supported_package_is_present(self, mock_module): # given package = 'py37-conan' diff --git a/tests/unit/plugins/modules/storage/pmem/test_pmem.py b/tests/unit/plugins/modules/test_pmem.py similarity index 95% rename from tests/unit/plugins/modules/storage/pmem/test_pmem.py rename to tests/unit/plugins/modules/test_pmem.py index 116ace745b..cea673da0b 100644 --- a/tests/unit/plugins/modules/storage/pmem/test_pmem.py +++ b/tests/unit/plugins/modules/test_pmem.py @@ -14,7 +14,7 @@ pytest.importorskip('xmltodict') from ansible_collections.community.general.tests.unit.plugins.modules.utils import ModuleTestCase, set_module_args, AnsibleFailJson, AnsibleExitJson from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.plugins.modules.storage.pmem import pmem as pmem_module +from ansible_collections.community.general.plugins.modules import pmem as pmem_module # goal_plain: the mock return value of pmem_run_command with: # impctl create -goal MemoryMode=70 Reserved=20 PersistentMemoryType=AppDirect @@ -276,9 +276,9 @@ class TestPmem(ModuleTestCase): self.get_bin_path = self.mock_get_bin_path.start() self.mock_pmem_is_dcpmm_installed = (patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_is_dcpmm_installed', return_value="")) + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_is_dcpmm_installed', return_value="")) self.mock_pmem_init_env = (patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_init_env', return_value="")) + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_init_env', return_value="")) self.pmem_is_dcpmm_installed = self.mock_pmem_is_dcpmm_installed.start() self.pmem_init_env = self.mock_pmem_init_env.start() @@ -360,7 +360,7 @@ class TestPmem(ModuleTestCase): 'memorymode': 70, }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[goal_plain, goal, dimmlist]): with self.assertRaises(AnsibleExitJson) as result: pmem_module.main() @@ -373,7 +373,7 @@ class TestPmem(ModuleTestCase): 'reserved': 20, }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[goal_plain, goal, dimmlist]): with self.assertRaises(AnsibleExitJson) as result: pmem_module.main() @@ -387,7 +387,7 @@ class TestPmem(ModuleTestCase): 'reserved': 20, }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[goal_plain, goal, dimmlist]): with self.assertRaises(AnsibleExitJson) as result: pmem_module.main() @@ -458,7 +458,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ show_skt, goal_plain_sk0, goal_sk0, dimmlist_sk0, goal_plain_sk1, goal_sk1, dimmlist_sk1]): with self.assertRaises(AnsibleExitJson) as result: @@ -484,7 +484,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ show_skt, goal_plain_sk0, goal_sk0, dimmlist_sk0, goal_plain_sk1, goal_sk1, dimmlist_sk1]): with self.assertRaises(AnsibleExitJson) as result: @@ -511,7 +511,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ show_skt, goal_plain_sk0, goal_sk0, dimmlist_sk0, goal_plain_sk1, goal_sk1, dimmlist_sk1]): with self.assertRaises(AnsibleExitJson) as result: @@ -547,7 +547,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region_empty]): pmem_module.main() @@ -563,7 +563,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region]): pmem_module.main() @@ -584,7 +584,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region]): pmem_module.main() @@ -605,7 +605,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region]): pmem_module.main() @@ -625,7 +625,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region]): pmem_module.main() @@ -646,7 +646,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region]): pmem_module.main() @@ -660,7 +660,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region, ndctl_create_without_size, ndctl_list_N]): with self.assertRaises(AnsibleExitJson) as result: pmem_module.main() @@ -678,7 +678,7 @@ class TestPmem(ModuleTestCase): 'namespace_append': True, }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region, ndctl_create_640M, ndctl_list_N_two_namespaces]): with self.assertRaises(AnsibleExitJson) as result: pmem_module.main() @@ -700,7 +700,7 @@ class TestPmem(ModuleTestCase): ], }) with patch( - 'ansible_collections.community.general.plugins.modules.storage.pmem.pmem.PersistentMemory.pmem_run_command', + 'ansible_collections.community.general.plugins.modules.pmem.PersistentMemory.pmem_run_command', side_effect=[ndctl_region, ndctl_create_1G, ndctl_create_640M, ndctl_list_N_two_namespaces]): with self.assertRaises(AnsibleExitJson) as result: pmem_module.main() diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py b/tests/unit/plugins/modules/test_pritunl_org.py similarity index 98% rename from tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py rename to tests/unit/plugins/modules/test_pritunl_org.py index 308d352517..94809784b1 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py +++ b/tests/unit/plugins/modules/test_pritunl_org.py @@ -9,7 +9,7 @@ import sys from ansible.module_utils.common.dict_transformations import dict_merge from ansible.module_utils.six import iteritems -from ansible_collections.community.general.plugins.modules.net_tools.pritunl import ( +from ansible_collections.community.general.plugins.modules import ( pritunl_org, ) from ansible_collections.community.general.tests.unit.compat.mock import patch diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org_info.py b/tests/unit/plugins/modules/test_pritunl_org_info.py similarity index 98% rename from tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org_info.py rename to tests/unit/plugins/modules/test_pritunl_org_info.py index f82b963220..dc33c3d8c6 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org_info.py +++ b/tests/unit/plugins/modules/test_pritunl_org_info.py @@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function import sys -from ansible_collections.community.general.plugins.modules.net_tools.pritunl import ( +from ansible_collections.community.general.plugins.modules import ( pritunl_org_info, ) from ansible_collections.community.general.tests.unit.compat.mock import patch diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py b/tests/unit/plugins/modules/test_pritunl_user.py similarity index 98% rename from tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py rename to tests/unit/plugins/modules/test_pritunl_user.py index d66cf63711..1120839186 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user.py +++ b/tests/unit/plugins/modules/test_pritunl_user.py @@ -9,7 +9,7 @@ import sys from ansible.module_utils.common.dict_transformations import dict_merge from ansible.module_utils.six import iteritems -from ansible_collections.community.general.plugins.modules.net_tools.pritunl import ( +from ansible_collections.community.general.plugins.modules import ( pritunl_user, ) from ansible_collections.community.general.tests.unit.compat.mock import patch diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user_info.py b/tests/unit/plugins/modules/test_pritunl_user_info.py similarity index 98% rename from tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user_info.py rename to tests/unit/plugins/modules/test_pritunl_user_info.py index 266869884a..5aae15d966 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_user_info.py +++ b/tests/unit/plugins/modules/test_pritunl_user_info.py @@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function import sys -from ansible_collections.community.general.plugins.modules.net_tools.pritunl import ( +from ansible_collections.community.general.plugins.modules import ( pritunl_user_info, ) from ansible_collections.community.general.tests.unit.compat.mock import patch diff --git a/tests/unit/plugins/modules/cloud/misc/test_proxmox_kvm.py b/tests/unit/plugins/modules/test_proxmox_kvm.py similarity index 86% rename from tests/unit/plugins/modules/cloud/misc/test_proxmox_kvm.py rename to tests/unit/plugins/modules/test_proxmox_kvm.py index 489ee8df62..5311851027 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_proxmox_kvm.py +++ b/tests/unit/plugins/modules/test_proxmox_kvm.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.plugins.modules.cloud.misc.proxmox_kvm import parse_dev, parse_mac +from ansible_collections.community.general.plugins.modules.proxmox_kvm import parse_dev, parse_mac def test_parse_mac(): diff --git a/tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py b/tests/unit/plugins/modules/test_proxmox_snap.py similarity index 97% rename from tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py rename to tests/unit/plugins/modules/test_proxmox_snap.py index 3ef121cddd..4bdcaa8b77 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py +++ b/tests/unit/plugins/modules/test_proxmox_snap.py @@ -10,7 +10,7 @@ import json import pytest from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, patch -from ansible_collections.community.general.plugins.modules.cloud.misc import proxmox_snap +from ansible_collections.community.general.plugins.modules import proxmox_snap import ansible_collections.community.general.plugins.module_utils.proxmox as proxmox_utils from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args diff --git a/tests/unit/plugins/modules/cloud/misc/test_proxmox_tasks_info.py b/tests/unit/plugins/modules/test_proxmox_tasks_info.py similarity index 98% rename from tests/unit/plugins/modules/cloud/misc/test_proxmox_tasks_info.py rename to tests/unit/plugins/modules/test_proxmox_tasks_info.py index 9d1bd74e69..aff3fe189a 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_proxmox_tasks_info.py +++ b/tests/unit/plugins/modules/test_proxmox_tasks_info.py @@ -13,7 +13,7 @@ __metaclass__ = type import pytest import json -from ansible_collections.community.general.plugins.modules.cloud.misc import proxmox_tasks_info +from ansible_collections.community.general.plugins.modules import proxmox_tasks_info import ansible_collections.community.general.plugins.module_utils.proxmox as proxmox_utils from ansible_collections.community.general.plugins.module_utils.proxmox import ProxmoxAnsible from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, patch diff --git a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py b/tests/unit/plugins/modules/test_redhat_subscription.py similarity index 99% rename from tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py rename to tests/unit/plugins/modules/test_redhat_subscription.py index 95c02137b9..bf65671419 100644 --- a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/test_redhat_subscription.py @@ -10,7 +10,7 @@ __metaclass__ = type import json from ansible.module_utils import basic -from ansible_collections.community.general.plugins.modules.packaging.os import redhat_subscription +from ansible_collections.community.general.plugins.modules import redhat_subscription import pytest @@ -22,10 +22,10 @@ def patch_redhat_subscription(mocker): """ Function used for mocking some parts of redhat_subscription module """ - mocker.patch('ansible_collections.community.general.plugins.modules.packaging.os.redhat_subscription.RegistrationBase.REDHAT_REPO') - mocker.patch('ansible_collections.community.general.plugins.modules.packaging.os.redhat_subscription.isfile', return_value=False) - mocker.patch('ansible_collections.community.general.plugins.modules.packaging.os.redhat_subscription.unlink', return_value=True) - mocker.patch('ansible_collections.community.general.plugins.modules.packaging.os.redhat_subscription.AnsibleModule.get_bin_path', + mocker.patch('ansible_collections.community.general.plugins.modules.redhat_subscription.RegistrationBase.REDHAT_REPO') + mocker.patch('ansible_collections.community.general.plugins.modules.redhat_subscription.isfile', return_value=False) + mocker.patch('ansible_collections.community.general.plugins.modules.redhat_subscription.unlink', return_value=True) + mocker.patch('ansible_collections.community.general.plugins.modules.redhat_subscription.AnsibleModule.get_bin_path', return_value='/testbin/subscription-manager') diff --git a/tests/unit/plugins/modules/database/misc/test_redis_data.py b/tests/unit/plugins/modules/test_redis_data.py similarity index 99% rename from tests/unit/plugins/modules/database/misc/test_redis_data.py rename to tests/unit/plugins/modules/test_redis_data.py index 16d768e0d8..da195f70a6 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_data.py +++ b/tests/unit/plugins/modules/test_redis_data.py @@ -12,7 +12,7 @@ import pytest import json from redis import __version__ -from ansible_collections.community.general.plugins.modules.database.misc import redis_data +from ansible_collections.community.general.plugins.modules import redis_data from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args HAS_REDIS_USERNAME_OPTION = True diff --git a/tests/unit/plugins/modules/database/misc/test_redis_data_incr.py b/tests/unit/plugins/modules/test_redis_data_incr.py similarity index 98% rename from tests/unit/plugins/modules/database/misc/test_redis_data_incr.py rename to tests/unit/plugins/modules/test_redis_data_incr.py index 496a00313e..24c792adb1 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_data_incr.py +++ b/tests/unit/plugins/modules/test_redis_data_incr.py @@ -13,7 +13,7 @@ import json import redis from redis import __version__ -from ansible_collections.community.general.plugins.modules.database.misc import redis_data_incr +from ansible_collections.community.general.plugins.modules import redis_data_incr from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args diff --git a/tests/unit/plugins/modules/database/misc/test_redis_data_info.py b/tests/unit/plugins/modules/test_redis_data_info.py similarity index 97% rename from tests/unit/plugins/modules/database/misc/test_redis_data_info.py rename to tests/unit/plugins/modules/test_redis_data_info.py index fc16cabe86..302e003bf1 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_data_info.py +++ b/tests/unit/plugins/modules/test_redis_data_info.py @@ -12,7 +12,7 @@ import pytest import json from redis import __version__ -from ansible_collections.community.general.plugins.modules.database.misc import ( +from ansible_collections.community.general.plugins.modules import ( redis_data_info) from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args diff --git a/tests/unit/plugins/modules/database/misc/test_redis_info.py b/tests/unit/plugins/modules/test_redis_info.py similarity index 94% rename from tests/unit/plugins/modules/database/misc/test_redis_info.py rename to tests/unit/plugins/modules/test_redis_info.py index df23964a46..8b30a23166 100644 --- a/tests/unit/plugins/modules/database/misc/test_redis_info.py +++ b/tests/unit/plugins/modules/test_redis_info.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock -from ansible_collections.community.general.plugins.modules.database.misc import redis_info +from ansible_collections.community.general.plugins.modules import redis_info from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args @@ -41,7 +41,7 @@ class TestRedisInfoModule(ModuleTestCase): super(TestRedisInfoModule, self).tearDown() def patch_redis_client(self, **kwds): - return patch('ansible_collections.community.general.plugins.modules.database.misc.redis_info.redis_client', autospec=True, **kwds) + return patch('ansible_collections.community.general.plugins.modules.redis_info.redis_client', autospec=True, **kwds) def test_without_parameters(self): """Test without parameters""" diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py b/tests/unit/plugins/modules/test_rhn_channel.py similarity index 98% rename from tests/unit/plugins/modules/packaging/os/test_rhn_channel.py rename to tests/unit/plugins/modules/test_rhn_channel.py index c30a3488da..cfbb11e118 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_channel.py +++ b/tests/unit/plugins/modules/test_rhn_channel.py @@ -8,7 +8,7 @@ __metaclass__ = type import json -from ansible_collections.community.general.plugins.modules.packaging.os import rhn_channel +from ansible_collections.community.general.plugins.modules import rhn_channel from .rhn_conftest import mock_request diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py b/tests/unit/plugins/modules/test_rhn_register.py similarity index 97% rename from tests/unit/plugins/modules/packaging/os/test_rhn_register.py rename to tests/unit/plugins/modules/test_rhn_register.py index fa3b92d6d2..62d952a428 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py +++ b/tests/unit/plugins/modules/test_rhn_register.py @@ -13,7 +13,7 @@ from ansible.module_utils import basic from ansible.module_utils.common.text.converters import to_native import ansible.module_utils.six from ansible.module_utils.six.moves import xmlrpc_client -from ansible_collections.community.general.plugins.modules.packaging.os import rhn_register +from ansible_collections.community.general.plugins.modules import rhn_register from .rhn_conftest import mock_request @@ -80,7 +80,7 @@ def test_systemid_with_requirements(capfd, mocker, patch_rhn): mocker.patch.object(rhn_register.Rhn, 'enable') mock_isfile = mocker.patch('os.path.isfile', return_value=True) - mocker.patch('ansible_collections.community.general.plugins.modules.packaging.os.rhn_register.open', mock_open(read_data=SYSTEMID), create=True) + mocker.patch('ansible_collections.community.general.plugins.modules.rhn_register.open', mock_open(read_data=SYSTEMID), create=True) rhn = rhn_register.Rhn() assert '123456789' == to_native(rhn.systemid) @@ -91,7 +91,7 @@ def test_systemid_requirements_missing(capfd, mocker, patch_rhn, import_libxml): """Check that missing dependencies are detected""" mocker.patch('os.path.isfile', return_value=True) - mocker.patch('ansible_collections.community.general.plugins.modules.packaging.os.rhn_register.open', mock_open(read_data=SYSTEMID), create=True) + mocker.patch('ansible_collections.community.general.plugins.modules.rhn_register.open', mock_open(read_data=SYSTEMID), create=True) with pytest.raises(SystemExit): rhn_register.main() diff --git a/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py b/tests/unit/plugins/modules/test_rhsm_release.py similarity index 96% rename from tests/unit/plugins/modules/packaging/os/test_rhsm_release.py rename to tests/unit/plugins/modules/test_rhsm_release.py index 54fde2138a..9d371cec03 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhsm_release.py +++ b/tests/unit/plugins/modules/test_rhsm_release.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.plugins.modules.packaging.os import rhsm_release +from ansible_collections.community.general.plugins.modules import rhsm_release from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args) @@ -20,12 +20,12 @@ class RhsmRepositoryReleaseModuleTestCase(ModuleTestCase): # Mainly interested that the subscription-manager calls are right # based on the module args, so patch out run_command in the module. # returns (rc, out, err) structure - self.mock_run_command = patch('ansible_collections.community.general.plugins.modules.packaging.os.rhsm_release.' + self.mock_run_command = patch('ansible_collections.community.general.plugins.modules.rhsm_release.' 'AnsibleModule.run_command') self.module_main_command = self.mock_run_command.start() # Module does a get_bin_path check before every run_command call - self.mock_get_bin_path = patch('ansible_collections.community.general.plugins.modules.packaging.os.rhsm_release.' + self.mock_get_bin_path = patch('ansible_collections.community.general.plugins.modules.rhsm_release.' 'AnsibleModule.get_bin_path') self.get_bin_path = self.mock_get_bin_path.start() self.get_bin_path.return_value = '/testbin/subscription-manager' diff --git a/tests/unit/plugins/modules/packaging/os/test_rpm_ostree_pkg.py b/tests/unit/plugins/modules/test_rpm_ostree_pkg.py similarity index 96% rename from tests/unit/plugins/modules/packaging/os/test_rpm_ostree_pkg.py rename to tests/unit/plugins/modules/test_rpm_ostree_pkg.py index 3f3dd5e017..4888b64027 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rpm_ostree_pkg.py +++ b/tests/unit/plugins/modules/test_rpm_ostree_pkg.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.plugins.modules.packaging.os import rpm_ostree_pkg +from ansible_collections.community.general.plugins.modules import rpm_ostree_pkg from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args) @@ -17,7 +17,7 @@ class RpmOSTreeModuleTestCase(ModuleTestCase): def setUp(self): super(RpmOSTreeModuleTestCase, self).setUp() - ansible_module_path = "ansible_collections.community.general.plugins.modules.packaging.os.rpm_ostree_pkg.AnsibleModule" + ansible_module_path = "ansible_collections.community.general.plugins.modules.rpm_ostree_pkg.AnsibleModule" self.mock_run_command = patch('%s.run_command' % ansible_module_path) self.module_main_command = self.mock_run_command.start() self.mock_get_bin_path = patch('%s.get_bin_path' % ansible_module_path) diff --git a/tests/unit/plugins/modules/system/test_sap_task_list_execute.py b/tests/unit/plugins/modules/test_sap_task_list_execute.py similarity index 97% rename from tests/unit/plugins/modules/system/test_sap_task_list_execute.py rename to tests/unit/plugins/modules/test_sap_task_list_execute.py index fb8bfa9d7f..34c97c4a80 100644 --- a/tests/unit/plugins/modules/system/test_sap_task_list_execute.py +++ b/tests/unit/plugins/modules/test_sap_task_list_execute.py @@ -14,7 +14,7 @@ sys.modules['pyrfc.Connection'] = MagicMock() sys.modules['xmltodict'] = MagicMock() sys.modules['xmltodict.parse'] = MagicMock() -from ansible_collections.community.general.plugins.modules.system import sap_task_list_execute +from ansible_collections.community.general.plugins.modules import sap_task_list_execute class TestSAPRfcModule(ModuleTestCase): diff --git a/tests/unit/plugins/modules/files/test_sapcar_extract.py b/tests/unit/plugins/modules/test_sapcar_extract.py similarity index 96% rename from tests/unit/plugins/modules/files/test_sapcar_extract.py rename to tests/unit/plugins/modules/test_sapcar_extract.py index 58a3b227ee..bec9cf8862 100644 --- a/tests/unit/plugins/modules/files/test_sapcar_extract.py +++ b/tests/unit/plugins/modules/test_sapcar_extract.py @@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.plugins.modules.files import sapcar_extract +from ansible_collections.community.general.plugins.modules import sapcar_extract from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils import basic diff --git a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py b/tests/unit/plugins/modules/test_scaleway_compute_private_network.py similarity index 98% rename from tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py rename to tests/unit/plugins/modules/test_scaleway_compute_private_network.py index 68bc1653d8..df6fd91a4a 100644 --- a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_compute_private_network.py +++ b/tests/unit/plugins/modules/test_scaleway_compute_private_network.py @@ -9,7 +9,7 @@ import json import pytest -from ansible_collections.community.general.plugins.modules.cloud.scaleway import scaleway_compute_private_network +from ansible_collections.community.general.plugins.modules import scaleway_compute_private_network from ansible_collections.community.general.plugins.module_utils.scaleway import Scaleway, Response from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args from ansible_collections.community.general.tests.unit.compat.mock import patch diff --git a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_private_network.py b/tests/unit/plugins/modules/test_scaleway_private_network.py similarity index 98% rename from tests/unit/plugins/modules/cloud/scaleway/test_scaleway_private_network.py rename to tests/unit/plugins/modules/test_scaleway_private_network.py index 9d9a725f12..21805d3db8 100644 --- a/tests/unit/plugins/modules/cloud/scaleway/test_scaleway_private_network.py +++ b/tests/unit/plugins/modules/test_scaleway_private_network.py @@ -10,7 +10,7 @@ import json import pytest -from ansible_collections.community.general.plugins.modules.cloud.scaleway import scaleway_private_network +from ansible_collections.community.general.plugins.modules import scaleway_private_network from ansible_collections.community.general.plugins.module_utils.scaleway import Scaleway, Response from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args from ansible_collections.community.general.tests.unit.compat.mock import patch diff --git a/tests/unit/plugins/modules/notification/test_slack.py b/tests/unit/plugins/modules/test_slack.py similarity index 98% rename from tests/unit/plugins/modules/notification/test_slack.py rename to tests/unit/plugins/modules/test_slack.py index fd6fe0e4bf..352d3f4b94 100644 --- a/tests/unit/plugins/modules/notification/test_slack.py +++ b/tests/unit/plugins/modules/test_slack.py @@ -8,7 +8,7 @@ __metaclass__ = type import json import pytest from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch -from ansible_collections.community.general.plugins.modules.notification import slack +from ansible_collections.community.general.plugins.modules import slack from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/system/test_solaris_zone.py b/tests/unit/plugins/modules/test_solaris_zone.py similarity index 97% rename from tests/unit/plugins/modules/system/test_solaris_zone.py rename to tests/unit/plugins/modules/test_solaris_zone.py index f8be6fc47a..20b550875c 100644 --- a/tests/unit/plugins/modules/system/test_solaris_zone.py +++ b/tests/unit/plugins/modules/test_solaris_zone.py @@ -10,7 +10,7 @@ import platform import pytest from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.modules.system import ( +from ansible_collections.community.general.plugins.modules import ( solaris_zone ) from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( diff --git a/tests/unit/plugins/modules/storage/hpe3par/test_ss_3par_cpg.py b/tests/unit/plugins/modules/test_ss_3par_cpg.py similarity index 94% rename from tests/unit/plugins/modules/storage/hpe3par/test_ss_3par_cpg.py rename to tests/unit/plugins/modules/test_ss_3par_cpg.py index 791ba6aa7b..8e935b8def 100644 --- a/tests/unit/plugins/modules/storage/hpe3par/test_ss_3par_cpg.py +++ b/tests/unit/plugins/modules/test_ss_3par_cpg.py @@ -11,13 +11,13 @@ sys.modules['hpe3par_sdk'] = mock.Mock() sys.modules['hpe3par_sdk.client'] = mock.Mock() sys.modules['hpe3parclient'] = mock.Mock() sys.modules['hpe3parclient.exceptions'] = mock.Mock() -from ansible_collections.community.general.plugins.modules.storage.hpe3par import ss_3par_cpg +from ansible_collections.community.general.plugins.modules import ss_3par_cpg from ansible_collections.community.general.plugins.module_utils.storage.hpe3par import hpe3par -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.client') -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.AnsibleModule') -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.create_cpg') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.client') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.AnsibleModule') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.create_cpg') def test_module_args(mock_create_cpg, mock_module, mock_client): """ hpe3par CPG - test module arguments @@ -52,9 +52,9 @@ def test_module_args(mock_create_cpg, mock_module, mock_client): required_together=[['raid_type', 'set_size']]) -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.client') -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.AnsibleModule') -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.create_cpg') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.client') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.AnsibleModule') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.create_cpg') def test_main_exit_functionality_present_success_without_issue_attr_dict(mock_create_cpg, mock_module, mock_client): """ hpe3par flash cache - success check @@ -94,9 +94,9 @@ def test_main_exit_functionality_present_success_without_issue_attr_dict(mock_cr assert instance.fail_json.call_count == 0 -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.client') -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.AnsibleModule') -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.delete_cpg') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.client') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.AnsibleModule') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.delete_cpg') def test_main_exit_functionality_absent_success_without_issue_attr_dict(mock_delete_cpg, mock_module, mock_client): """ hpe3par flash cache - success check @@ -146,7 +146,7 @@ def test_convert_to_binary_multiple(): assert hpe3par.convert_to_binary_multiple(' 1.5 TiB ') == 1.5 * 1024 * 1024 -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.client') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.client') def test_validate_set_size(mock_client): mock_client.HPE3ParClient.RAID_MAP = {'R0': {'raid_value': 1, 'set_sizes': [1]}, 'R1': {'raid_value': 2, 'set_sizes': [2, 3, 4]}, @@ -164,7 +164,7 @@ def test_validate_set_size(mock_client): assert not ss_3par_cpg.validate_set_size(raid_type, set_size) -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.client') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.client') def test_cpg_ldlayout_map(mock_client): mock_client.HPE3ParClient.PORT = 1 mock_client.HPE3ParClient.RAID_MAP = {'R0': {'raid_value': 1, 'set_sizes': [1]}, @@ -177,7 +177,7 @@ def test_cpg_ldlayout_map(mock_client): 'RAIDType': 4, 'HA': 1} -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.client') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.client') def test_create_cpg(mock_client): ss_3par_cpg.validate_set_size = mock.Mock(return_value=True) ss_3par_cpg.cpg_ldlayout_map = mock.Mock( @@ -227,7 +227,7 @@ def test_create_cpg(mock_client): ) == (False, False, 'Set size 3 not part of RAID set R6') -@mock.patch('ansible_collections.community.general.plugins.modules.storage.hpe3par.ss_3par_cpg.client') +@mock.patch('ansible_collections.community.general.plugins.modules.ss_3par_cpg.client') def test_delete_cpg(mock_client): mock_client.HPE3ParClient.login.return_value = True mock_client.HPE3ParClient.cpgExists.return_value = True diff --git a/tests/unit/plugins/modules/monitoring/test_statsd.py b/tests/unit/plugins/modules/test_statsd.py similarity index 94% rename from tests/unit/plugins/modules/monitoring/test_statsd.py rename to tests/unit/plugins/modules/test_statsd.py index 05613e369b..49aadf2b90 100644 --- a/tests/unit/plugins/modules/monitoring/test_statsd.py +++ b/tests/unit/plugins/modules/test_statsd.py @@ -7,7 +7,7 @@ __metaclass__ = type import pytest -from ansible_collections.community.general.plugins.modules.monitoring import statsd +from ansible_collections.community.general.plugins.modules import statsd from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args @@ -35,10 +35,10 @@ class TestStatsDModule(ModuleTestCase): super(TestStatsDModule, self).tearDown() def patch_udp_statsd_client(self, **kwargs): - return patch('ansible_collections.community.general.plugins.modules.monitoring.statsd.udp_statsd_client', autospec=True, **kwargs) + return patch('ansible_collections.community.general.plugins.modules.statsd.udp_statsd_client', autospec=True, **kwargs) def patch_tcp_statsd_client(self, **kwargs): - return patch('ansible_collections.community.general.plugins.modules.monitoring.statsd.tcp_statsd_client', autospec=True, **kwargs) + return patch('ansible_collections.community.general.plugins.modules.statsd.tcp_statsd_client', autospec=True, **kwargs) def test_udp_without_parameters(self): """Test udp without parameters""" diff --git a/tests/unit/plugins/modules/system/test_sysupgrade.py b/tests/unit/plugins/modules/test_sysupgrade.py similarity index 97% rename from tests/unit/plugins/modules/system/test_sysupgrade.py rename to tests/unit/plugins/modules/test_sysupgrade.py index 4811e686a2..77d1f1cd06 100644 --- a/tests/unit/plugins/modules/system/test_sysupgrade.py +++ b/tests/unit/plugins/modules/test_sysupgrade.py @@ -8,7 +8,7 @@ __metaclass__ = type from ansible.module_utils import basic from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase -from ansible_collections.community.general.plugins.modules.system import sysupgrade +from ansible_collections.community.general.plugins.modules import sysupgrade class TestSysupgradeModule(ModuleTestCase): diff --git a/tests/unit/plugins/modules/cloud/misc/test_terraform.py b/tests/unit/plugins/modules/test_terraform.py similarity index 88% rename from tests/unit/plugins/modules/cloud/misc/test_terraform.py rename to tests/unit/plugins/modules/test_terraform.py index 7b0318dbb3..f6a0593fd3 100644 --- a/tests/unit/plugins/modules/cloud/misc/test_terraform.py +++ b/tests/unit/plugins/modules/test_terraform.py @@ -8,7 +8,7 @@ import json import pytest -from ansible_collections.community.general.plugins.modules.cloud.misc import terraform +from ansible_collections.community.general.plugins.modules import terraform from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args diff --git a/tests/unit/plugins/modules/system/test_ufw.py b/tests/unit/plugins/modules/test_ufw.py similarity index 99% rename from tests/unit/plugins/modules/system/test_ufw.py rename to tests/unit/plugins/modules/test_ufw.py index f7b1ec0da5..da8f0f2c80 100644 --- a/tests/unit/plugins/modules/system/test_ufw.py +++ b/tests/unit/plugins/modules/test_ufw.py @@ -8,7 +8,7 @@ from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils import basic from ansible.module_utils.common.text.converters import to_bytes -import ansible_collections.community.general.plugins.modules.system.ufw as module +import ansible_collections.community.general.plugins.modules.ufw as module import json diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py b/tests/unit/plugins/modules/test_wdc_redfish_command.py similarity index 99% rename from tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py rename to tests/unit/plugins/modules/test_wdc_redfish_command.py index 1b2d3d3420..332b976f70 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_command.py +++ b/tests/unit/plugins/modules/test_wdc_redfish_command.py @@ -15,7 +15,7 @@ import os from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat import unittest from ansible.module_utils import basic -import ansible_collections.community.general.plugins.modules.remote_management.redfish.wdc_redfish_command as module +import ansible_collections.community.general.plugins.modules.wdc_redfish_command as module from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json diff --git a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py b/tests/unit/plugins/modules/test_wdc_redfish_info.py similarity index 98% rename from tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py rename to tests/unit/plugins/modules/test_wdc_redfish_info.py index c9b7cf8a7f..e1dfb4a276 100644 --- a/tests/unit/plugins/modules/remote_management/wdc/test_wdc_redfish_info.py +++ b/tests/unit/plugins/modules/test_wdc_redfish_info.py @@ -9,7 +9,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat import unittest from ansible.module_utils import basic -import ansible_collections.community.general.plugins.modules.remote_management.redfish.wdc_redfish_info as module +import ansible_collections.community.general.plugins.modules.wdc_redfish_info as module from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json diff --git a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py b/tests/unit/plugins/modules/test_xcc_redfish_command.py similarity index 99% rename from tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py rename to tests/unit/plugins/modules/test_xcc_redfish_command.py index 035d4c9852..c4132125cc 100644 --- a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py +++ b/tests/unit/plugins/modules/test_xcc_redfish_command.py @@ -11,7 +11,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat import unittest from ansible.module_utils import basic from ansible.module_utils.common.text.converters import to_bytes -import ansible_collections.community.general.plugins.modules.remote_management.lenovoxcc.xcc_redfish_command as module +import ansible_collections.community.general.plugins.modules.xcc_redfish_command as module from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json diff --git a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py b/tests/unit/plugins/modules/test_xenserver_guest_info.py similarity index 90% rename from tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py rename to tests/unit/plugins/modules/test_xenserver_guest_info.py index 922d34e092..fd669953a8 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_info.py +++ b/tests/unit/plugins/modules/test_xenserver_guest_info.py @@ -55,9 +55,9 @@ def test_xenserver_guest_info(mocker, capfd, XenAPI, xenserver_guest_info): """ fake_vm_facts = {"fake-vm-fact": True} - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_info.get_object_ref', return_value=None) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_info.gather_vm_params', return_value=None) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_info.gather_vm_facts', return_value=fake_vm_facts) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_info.get_object_ref', return_value=None) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_info.gather_vm_params', return_value=None) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_info.gather_vm_facts', return_value=fake_vm_facts) mocked_xenapi = mocker.patch.object(XenAPI.Session, 'xenapi', create=True) diff --git a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py b/tests/unit/plugins/modules/test_xenserver_guest_powerstate.py similarity index 84% rename from tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py rename to tests/unit/plugins/modules/test_xenserver_guest_powerstate.py index ea137628ad..d209ca1600 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/test_xenserver_guest_powerstate.py +++ b/tests/unit/plugins/modules/test_xenserver_guest_powerstate.py @@ -131,12 +131,12 @@ testcase_module_params_wait = { @pytest.mark.parametrize('power_state', testcase_set_powerstate['params'], ids=testcase_set_powerstate['ids']) def test_xenserver_guest_powerstate_set_power_state(mocker, fake_ansible_module, XenAPI, xenserver_guest_powerstate, power_state): """Tests power state change handling.""" - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.get_object_ref', + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.get_object_ref', return_value=fake_xenapi_ref('VM')) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.gather_vm_params', + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.gather_vm_params', return_value={"power_state": "Someoldstate"}) mocked_set_vm_power_state = mocker.patch( - 'ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.set_vm_power_state', + 'ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.set_vm_power_state', return_value=power_state) mocked_xenapi = mocker.patch.object(XenAPI.Session, 'xenapi', create=True) @@ -175,16 +175,16 @@ def test_xenserver_guest_powerstate_present(mocker, patch_ansible_module, capfd, """ fake_vm_facts = {"fake-vm-fact": True} - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.get_object_ref', + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.get_object_ref', return_value=fake_xenapi_ref('VM')) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.gather_vm_params', return_value={}) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.gather_vm_facts', + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.gather_vm_params', return_value={}) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.gather_vm_facts', return_value=fake_vm_facts) mocked_set_vm_power_state = mocker.patch( - 'ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.set_vm_power_state', + 'ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.set_vm_power_state', return_value=(True, "somenewstate")) mocked_wait_for_vm_ip_address = mocker.patch( - 'ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.wait_for_vm_ip_address', + 'ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.wait_for_vm_ip_address', return_value={}) mocked_xenapi = mocker.patch.object(XenAPI.Session, 'xenapi', create=True) @@ -222,15 +222,15 @@ def test_xenserver_guest_powerstate_other(mocker, patch_ansible_module, capfd, X """ fake_vm_facts = {"fake-vm-fact": True} - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.get_object_ref', + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.get_object_ref', return_value=fake_xenapi_ref('VM')) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.gather_vm_params', return_value={}) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.gather_vm_facts', return_value=fake_vm_facts) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.gather_vm_params', return_value={}) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.gather_vm_facts', return_value=fake_vm_facts) mocked_set_vm_power_state = mocker.patch( - 'ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.set_vm_power_state', + 'ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.set_vm_power_state', return_value=(True, "somenewstate")) mocked_wait_for_vm_ip_address = mocker.patch( - 'ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.wait_for_vm_ip_address', + 'ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.wait_for_vm_ip_address', return_value={}) mocked_xenapi = mocker.patch.object(XenAPI.Session, 'xenapi', create=True) @@ -267,15 +267,15 @@ def test_xenserver_guest_powerstate_wait(mocker, patch_ansible_module, capfd, Xe """ fake_vm_facts = {"fake-vm-fact": True} - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.get_object_ref', + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.get_object_ref', return_value=fake_xenapi_ref('VM')) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.gather_vm_params', return_value={}) - mocker.patch('ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.gather_vm_facts', return_value=fake_vm_facts) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.gather_vm_params', return_value={}) + mocker.patch('ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.gather_vm_facts', return_value=fake_vm_facts) mocked_set_vm_power_state = mocker.patch( - 'ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.set_vm_power_state', + 'ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.set_vm_power_state', return_value=(True, "somenewstate")) mocked_wait_for_vm_ip_address = mocker.patch( - 'ansible_collections.community.general.plugins.modules.cloud.xenserver.xenserver_guest_powerstate.wait_for_vm_ip_address', + 'ansible_collections.community.general.plugins.modules.xenserver_guest_powerstate.wait_for_vm_ip_address', return_value={}) mocked_xenapi = mocker.patch.object(XenAPI.Session, 'xenapi', create=True) diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/test_xfconf.py similarity index 99% rename from tests/unit/plugins/modules/system/test_xfconf.py rename to tests/unit/plugins/modules/test_xfconf.py index 14ac62fc6b..c979fd8d24 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/test_xfconf.py @@ -14,7 +14,7 @@ __metaclass__ = type import json -from ansible_collections.community.general.plugins.modules.system import xfconf +from ansible_collections.community.general.plugins.modules import xfconf import pytest diff --git a/tests/unit/plugins/modules/system/test_xfconf_info.py b/tests/unit/plugins/modules/test_xfconf_info.py similarity index 98% rename from tests/unit/plugins/modules/system/test_xfconf_info.py rename to tests/unit/plugins/modules/test_xfconf_info.py index cdb59e81af..dfcd4f33a1 100644 --- a/tests/unit/plugins/modules/system/test_xfconf_info.py +++ b/tests/unit/plugins/modules/test_xfconf_info.py @@ -7,7 +7,7 @@ __metaclass__ = type import json -from ansible_collections.community.general.plugins.modules.system import xfconf_info +from ansible_collections.community.general.plugins.modules import xfconf_info import pytest diff --git a/tests/unit/plugins/modules/cloud/xenserver/xenserver_common.py b/tests/unit/plugins/modules/xenserver_common.py similarity index 100% rename from tests/unit/plugins/modules/cloud/xenserver/xenserver_common.py rename to tests/unit/plugins/modules/xenserver_common.py diff --git a/tests/unit/plugins/modules/cloud/xenserver/xenserver_conftest.py b/tests/unit/plugins/modules/xenserver_conftest.py similarity index 89% rename from tests/unit/plugins/modules/cloud/xenserver/xenserver_conftest.py rename to tests/unit/plugins/modules/xenserver_conftest.py index cb3ce9b076..f003be8b28 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/xenserver_conftest.py +++ b/tests/unit/plugins/modules/xenserver_conftest.py @@ -40,7 +40,7 @@ def XenAPI(): # First we use importlib.import_module() to import the module and assign # it to a local symbol. - fake_xenapi = importlib.import_module('ansible_collections.community.general.tests.unit.plugins.modules.cloud.xenserver.FakeXenAPI') + fake_xenapi = importlib.import_module('ansible_collections.community.general.tests.unit.plugins.modules.FakeXenAPI') # Now we populate Python module cache with imported fake module using the # original module name (XenAPI). That way, any 'import XenAPI' statement @@ -58,7 +58,7 @@ def xenserver_guest_info(XenAPI): # that depend on it have to be imported inside a test function. To make # this easier to handle and remove some code repetition, we wrap the import # of xenserver_guest_info module with a fixture. - from ansible_collections.community.general.plugins.modules.cloud.xenserver import xenserver_guest_info + from ansible_collections.community.general.plugins.modules import xenserver_guest_info return xenserver_guest_info @@ -71,6 +71,6 @@ def xenserver_guest_powerstate(XenAPI): # that depend on it have to be imported inside a test function. To make # this easier to handle and remove some code repetition, we wrap the import # of xenserver_guest_powerstate module with a fixture. - from ansible_collections.community.general.plugins.modules.cloud.xenserver import xenserver_guest_powerstate + from ansible_collections.community.general.plugins.modules import xenserver_guest_powerstate return xenserver_guest_powerstate From 9d34636edc88abc790b64f5b9c94e4e85c8c1f50 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 21:45:27 +0100 Subject: [PATCH 0292/2104] Prepare 6.0.0a1 release. --- changelogs/fragments/6.0.0a1.yml | 4 ++++ galaxy.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/6.0.0a1.yml diff --git a/changelogs/fragments/6.0.0a1.yml b/changelogs/fragments/6.0.0a1.yml new file mode 100644 index 0000000000..e4f19ef577 --- /dev/null +++ b/changelogs/fragments/6.0.0a1.yml @@ -0,0 +1,4 @@ +release_summary: >- + This is a pre-release for the upcoming 6.0.0 major release. The main objective of this + pre-release is to make it possible to test the large stuctural changes by flattening + the directory structure. See the corresponding entry in the changelog for details. diff --git a/galaxy.yml b/galaxy.yml index 0a3fe09b6e..d7e3037146 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.0.0 +version: 6.0.0a1 readme: README.md authors: - Ansible (https://github.com/ansible) From 32ce09504c72f7aabf1e5d04ff4705cdefd39ed0 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 21:47:05 +0100 Subject: [PATCH 0293/2104] Fix version. --- changelogs/fragments/{6.0.0a1.yml => 6.0.0-a1.yml} | 0 galaxy.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename changelogs/fragments/{6.0.0a1.yml => 6.0.0-a1.yml} (100%) diff --git a/changelogs/fragments/6.0.0a1.yml b/changelogs/fragments/6.0.0-a1.yml similarity index 100% rename from changelogs/fragments/6.0.0a1.yml rename to changelogs/fragments/6.0.0-a1.yml diff --git a/galaxy.yml b/galaxy.yml index d7e3037146..b77ecfa020 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.0.0a1 +version: 6.0.0-a1 readme: README.md authors: - Ansible (https://github.com/ansible) From 012896da1864c8bf5550fb4b066b355cfede8f67 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 21:49:29 +0100 Subject: [PATCH 0294/2104] Release 6.0.0-a1. --- CHANGELOG.rst | 231 ++++++++ changelogs/changelog.yaml | 517 +++++++++++++++++- changelogs/fragments/3671-illumos-pfexec.yml | 2 - .../fragments/4175-opentelemetry_logs.yml | 2 - .../4520-xfconf-deprecate-disable-facts.yml | 2 - .../4654-alternatives-add-subcommands.yml | 3 - changelogs/fragments/4674-use-mh-raise.yaml | 6 - ...bility-virtualmedia-resource-location.yaml | 2 - changelogs/fragments/4700-code-changes.yml | 3 - changelogs/fragments/4712-consul-bugfix.yaml | 2 - .../fragments/4719-fix-keycloak-realm.yaml | 2 - .../fragments/4724-proxmox-qemu-extend.yaml | 3 - changelogs/fragments/4726-zfs.yml | 2 - changelogs/fragments/4733-redis-fail.yml | 2 - .../4736-cmd-runner-skip-if-check.yml | 2 - changelogs/fragments/4740-puppet-feature.yaml | 2 - .../fragments/4746-add-vpn-support-nmcli.yaml | 2 - ...4752-ansible-galaxy-install-mh-updates.yml | 2 - .../4755-mhexception-improvement.yml | 2 - .../fragments/4776-xfconf-cmd-runner.yaml | 4 - .../4777-cmd-runner-deprecate-fmt.yaml | 2 - .../4778-gconftool2-deprecate-state-get.yaml | 2 - .../4780-passwordstore-wrapper-compat.yml | 2 - .../fragments/4791-cmd-runner-callable.yaml | 2 - .../fragments/4794-sudoers-validation.yml | 2 - .../4797-terraform-complex-variables.yml | 3 - .../4809-redhat_subscription-unsubscribe.yaml | 2 - .../fragments/4810-alternatives-bug.yml | 2 - .../4812-expose-unredirected-headers.yml | 2 - .../4813-fix-nmcli-convert-list.yaml | 2 - .../4814-sudoers-file-permissions.yml | 2 - .../4816-proxmox-fix-extended-status.yaml | 2 - changelogs/fragments/4836-alternatives.yml | 3 - ...4839-fix-VirtualMediaInsert-Supermicro.yml | 8 - ...password-prompt-support-for-machinectl.yml | 2 - .../fragments/4852-sudoers-state-absent.yml | 2 - .../4886-fix-lxd-inventory-hostname.yml | 2 - ...d-GetManagerInventory-for-redfish_info.yml | 2 - .../4901-fix-redfish-chassispower.yml | 2 - .../fragments/4903-cmdrunner-bugfix.yaml | 2 - .../fragments/4910-fix-for-agent-enabled.yml | 2 - .../fragments/4911-dsv-honor-tld-option.yml | 3 - .../4916-opentelemetry-ini-options.yaml | 2 - .../fragments/4933-fix-rax-clb-nodes.yaml | 2 - .../4945-fix-get_vm-int-parse-handling.yaml | 3 - ...4953-listen-ports-facts-extend-output.yaml | 2 - .../4955-fix-path-detection-for-gopass.yaml | 2 - .../fragments/4956-pacman-install-reason.yaml | 2 - .../4959-pacman-fix-url-packages-name.yaml | 2 - .../fragments/4964-fix-keyring-info.yml | 2 - .../4973-introduce-dig-lookup-argument.yaml | 2 - .../fragments/4975-xfconf-use-do-raise.yaml | 3 - ...k-add-support-for-a-custom-world-file.yaml | 2 - .../fragments/4996-consul-session-ttl.yml | 2 - ...4998-nmcli-fix-int-options-idempotence.yml | 2 - changelogs/fragments/4999-xfconf-bool.yml | 2 - .../fragments/5008-addSetSessionService.yml | 2 - .../5019-slack-support-more-groups.yml | 2 - .../5022-lastpass-lookup-cleanup.yml | 2 - .../5023-http-agent-param-keycloak.yml | 2 - .../5027-fix-returnall-for-gopass.yaml | 2 - .../fragments/5035-mh-base-verbosity.yaml | 2 - .../fragments/5037-xfconf-add-cmd-output.yaml | 2 - ...059-wdc_redfish_command-indicator-leds.yml | 2 - .../fragments/5085-pipx-use-cmd-runner.yaml | 3 - changelogs/fragments/5100-pipx-req-if.yaml | 2 - .../fragments/5105-pipx-state-latest.yaml | 2 - .../5107-proxmox-agent-argument.yaml | 2 - .../5108-proxmox-node-name-condition.yml | 2 - changelogs/fragments/5111-fixes.yml | 7 - .../fragments/5112-fix-nsupdate-ns-entry.yaml | 2 - ...bility-virtualmedia-resource-location.yaml | 2 - .../fragments/5126-nmcli-remove-diffs.yml | 2 - .../fragments/5129-dig-boolean-params-fix.yml | 2 - ...5145-wdc-redfish-enclosure-power-state.yml | 2 - .../5147-terraform-init-no-color.yml | 2 - .../fragments/5149-nmcli-bond-option.yml | 2 - .../5151-add-delinea-support-tss-lookup.yml | 3 - .../fragments/5193-consul-session-token.yaml | 2 - .../5194-fix-proxmox-agent-exception.yaml | 2 - changelogs/fragments/5198-proxmox.yml | 2 - ...ix-environmentError-wrong-indentation.yaml | 2 - .../5203-seport-add-local-argument.yaml | 2 - .../5206-proxmox-conditional-vmid.yml | 3 - ...of-configuration-logic-and-oem-checks.yaml | 2 - .../5224-proxmox-unprivileged-default.yaml | 2 - .../fragments/5228-nmcli-ip-options.yaml | 2 - .../fragments/5239-nagios-refactor.yaml | 2 - changelogs/fragments/5240-unused-imports.yaml | 3 - .../5241-homebrew-add-linux-path.yaml | 2 - .../5243-osx-defaults-expand-user-flags.yml | 2 - .../fragments/5249-add-new-channel-prefix.yml | 2 - changelogs/fragments/5259-gitlab-imports.yaml | 14 - .../fragments/5271-gitlab_hook-refactor.yaml | 2 - ...roxmox-snap-container-with-mountpoints.yml | 3 - .../fragments/5280-lxc_container-py3.yaml | 5 - changelogs/fragments/5282-locale_gen.yaml | 2 - .../5287-machinectl-become-success.yml | 2 - ...-error-when-setting-unset-mac-address.yaml | 2 - .../5297-bitwarden-add-search-field.yml | 2 - .../fragments/5301-netcup_dnsapi-timeout.yml | 2 - .../5306-add-options-for-authentication.yml | 2 - changelogs/fragments/5307-ini_file-lint.yaml | 2 - ...dhat_subscription-idempotency-pool_ids.yml | 2 - .../5341-newrelic-v2-api-changes.yml | 6 - ...lemetry_bug_fix_opentelemetry-api-1.13.yml | 2 - .../5348-fix-vbox-deeply-nested-hostvars.yml | 2 - .../5349-drop-gentoolkit-more-knobs.yml | 3 - .../fragments/5358-lxc-container-refactor.yml | 2 - ...1-nmcli-add-infiniband-transport-mode.yaml | 2 - .../fragments/5367-consul-refactor.yaml | 2 - .../fragments/5369-pkgng-fix-update-all.yaml | 2 - .../5370-mh-cmdmixin-deprecation.yaml | 5 - .../5377-nsupdate-ns-records-with-bind.yml | 2 - changelogs/fragments/5383-xenserver_facts.yml | 2 - ...5385-search_s-based-_is_value_present.yaml | 2 - changelogs/fragments/5393-archive.yml | 2 - .../5400-django-manage-deprecations.yml | 3 - .../5404-django-manage-venv-deprecation.yml | 5 - .../fragments/5436-passwordstore-errors.yml | 2 - changelogs/fragments/5437-proxmox.yml | 2 - changelogs/fragments/5438-linode.yml | 2 - .../5439-dig-return-empty-result.yml | 2 - .../fragments/5444-passwordstore-options.yml | 2 - changelogs/fragments/5457-dnstxt-empty.yml | 2 - changelogs/fragments/6.0.0-a1.yml | 4 - changelogs/fragments/deprecation-removals.yml | 11 - changelogs/fragments/licenses-2.yml | 2 - changelogs/fragments/licenses.yml | 3 - changelogs/fragments/lookup-options.yml | 14 - changelogs/fragments/psf-license.yml | 2 - .../fragments/simplified-bsd-license.yml | 2 - changelogs/fragments/unflatmap.yml | 8 - 133 files changed, 747 insertions(+), 350 deletions(-) delete mode 100644 changelogs/fragments/3671-illumos-pfexec.yml delete mode 100644 changelogs/fragments/4175-opentelemetry_logs.yml delete mode 100644 changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml delete mode 100644 changelogs/fragments/4654-alternatives-add-subcommands.yml delete mode 100644 changelogs/fragments/4674-use-mh-raise.yaml delete mode 100644 changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml delete mode 100644 changelogs/fragments/4700-code-changes.yml delete mode 100644 changelogs/fragments/4712-consul-bugfix.yaml delete mode 100644 changelogs/fragments/4719-fix-keycloak-realm.yaml delete mode 100644 changelogs/fragments/4724-proxmox-qemu-extend.yaml delete mode 100644 changelogs/fragments/4726-zfs.yml delete mode 100644 changelogs/fragments/4733-redis-fail.yml delete mode 100644 changelogs/fragments/4736-cmd-runner-skip-if-check.yml delete mode 100644 changelogs/fragments/4740-puppet-feature.yaml delete mode 100644 changelogs/fragments/4746-add-vpn-support-nmcli.yaml delete mode 100644 changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml delete mode 100644 changelogs/fragments/4755-mhexception-improvement.yml delete mode 100644 changelogs/fragments/4776-xfconf-cmd-runner.yaml delete mode 100644 changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml delete mode 100644 changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml delete mode 100644 changelogs/fragments/4780-passwordstore-wrapper-compat.yml delete mode 100644 changelogs/fragments/4791-cmd-runner-callable.yaml delete mode 100644 changelogs/fragments/4794-sudoers-validation.yml delete mode 100644 changelogs/fragments/4797-terraform-complex-variables.yml delete mode 100644 changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml delete mode 100644 changelogs/fragments/4810-alternatives-bug.yml delete mode 100644 changelogs/fragments/4812-expose-unredirected-headers.yml delete mode 100644 changelogs/fragments/4813-fix-nmcli-convert-list.yaml delete mode 100644 changelogs/fragments/4814-sudoers-file-permissions.yml delete mode 100644 changelogs/fragments/4816-proxmox-fix-extended-status.yaml delete mode 100644 changelogs/fragments/4836-alternatives.yml delete mode 100644 changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml delete mode 100644 changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml delete mode 100644 changelogs/fragments/4852-sudoers-state-absent.yml delete mode 100644 changelogs/fragments/4886-fix-lxd-inventory-hostname.yml delete mode 100644 changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml delete mode 100644 changelogs/fragments/4901-fix-redfish-chassispower.yml delete mode 100644 changelogs/fragments/4903-cmdrunner-bugfix.yaml delete mode 100644 changelogs/fragments/4910-fix-for-agent-enabled.yml delete mode 100644 changelogs/fragments/4911-dsv-honor-tld-option.yml delete mode 100644 changelogs/fragments/4916-opentelemetry-ini-options.yaml delete mode 100644 changelogs/fragments/4933-fix-rax-clb-nodes.yaml delete mode 100644 changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml delete mode 100644 changelogs/fragments/4953-listen-ports-facts-extend-output.yaml delete mode 100644 changelogs/fragments/4955-fix-path-detection-for-gopass.yaml delete mode 100644 changelogs/fragments/4956-pacman-install-reason.yaml delete mode 100644 changelogs/fragments/4959-pacman-fix-url-packages-name.yaml delete mode 100644 changelogs/fragments/4964-fix-keyring-info.yml delete mode 100644 changelogs/fragments/4973-introduce-dig-lookup-argument.yaml delete mode 100644 changelogs/fragments/4975-xfconf-use-do-raise.yaml delete mode 100644 changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml delete mode 100644 changelogs/fragments/4996-consul-session-ttl.yml delete mode 100644 changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml delete mode 100644 changelogs/fragments/4999-xfconf-bool.yml delete mode 100644 changelogs/fragments/5008-addSetSessionService.yml delete mode 100644 changelogs/fragments/5019-slack-support-more-groups.yml delete mode 100644 changelogs/fragments/5022-lastpass-lookup-cleanup.yml delete mode 100644 changelogs/fragments/5023-http-agent-param-keycloak.yml delete mode 100644 changelogs/fragments/5027-fix-returnall-for-gopass.yaml delete mode 100644 changelogs/fragments/5035-mh-base-verbosity.yaml delete mode 100644 changelogs/fragments/5037-xfconf-add-cmd-output.yaml delete mode 100644 changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml delete mode 100644 changelogs/fragments/5085-pipx-use-cmd-runner.yaml delete mode 100644 changelogs/fragments/5100-pipx-req-if.yaml delete mode 100644 changelogs/fragments/5105-pipx-state-latest.yaml delete mode 100644 changelogs/fragments/5107-proxmox-agent-argument.yaml delete mode 100644 changelogs/fragments/5108-proxmox-node-name-condition.yml delete mode 100644 changelogs/fragments/5111-fixes.yml delete mode 100644 changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml delete mode 100644 changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml delete mode 100644 changelogs/fragments/5126-nmcli-remove-diffs.yml delete mode 100644 changelogs/fragments/5129-dig-boolean-params-fix.yml delete mode 100644 changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml delete mode 100644 changelogs/fragments/5147-terraform-init-no-color.yml delete mode 100644 changelogs/fragments/5149-nmcli-bond-option.yml delete mode 100644 changelogs/fragments/5151-add-delinea-support-tss-lookup.yml delete mode 100644 changelogs/fragments/5193-consul-session-token.yaml delete mode 100644 changelogs/fragments/5194-fix-proxmox-agent-exception.yaml delete mode 100644 changelogs/fragments/5198-proxmox.yml delete mode 100644 changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml delete mode 100644 changelogs/fragments/5203-seport-add-local-argument.yaml delete mode 100644 changelogs/fragments/5206-proxmox-conditional-vmid.yml delete mode 100644 changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml delete mode 100644 changelogs/fragments/5224-proxmox-unprivileged-default.yaml delete mode 100644 changelogs/fragments/5228-nmcli-ip-options.yaml delete mode 100644 changelogs/fragments/5239-nagios-refactor.yaml delete mode 100644 changelogs/fragments/5240-unused-imports.yaml delete mode 100644 changelogs/fragments/5241-homebrew-add-linux-path.yaml delete mode 100644 changelogs/fragments/5243-osx-defaults-expand-user-flags.yml delete mode 100644 changelogs/fragments/5249-add-new-channel-prefix.yml delete mode 100644 changelogs/fragments/5259-gitlab-imports.yaml delete mode 100644 changelogs/fragments/5271-gitlab_hook-refactor.yaml delete mode 100644 changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml delete mode 100644 changelogs/fragments/5280-lxc_container-py3.yaml delete mode 100644 changelogs/fragments/5282-locale_gen.yaml delete mode 100644 changelogs/fragments/5287-machinectl-become-success.yml delete mode 100644 changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml delete mode 100644 changelogs/fragments/5297-bitwarden-add-search-field.yml delete mode 100644 changelogs/fragments/5301-netcup_dnsapi-timeout.yml delete mode 100644 changelogs/fragments/5306-add-options-for-authentication.yml delete mode 100644 changelogs/fragments/5307-ini_file-lint.yaml delete mode 100644 changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml delete mode 100644 changelogs/fragments/5341-newrelic-v2-api-changes.yml delete mode 100644 changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml delete mode 100644 changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml delete mode 100644 changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml delete mode 100644 changelogs/fragments/5358-lxc-container-refactor.yml delete mode 100644 changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml delete mode 100644 changelogs/fragments/5367-consul-refactor.yaml delete mode 100644 changelogs/fragments/5369-pkgng-fix-update-all.yaml delete mode 100644 changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml delete mode 100644 changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml delete mode 100644 changelogs/fragments/5383-xenserver_facts.yml delete mode 100644 changelogs/fragments/5385-search_s-based-_is_value_present.yaml delete mode 100644 changelogs/fragments/5393-archive.yml delete mode 100644 changelogs/fragments/5400-django-manage-deprecations.yml delete mode 100644 changelogs/fragments/5404-django-manage-venv-deprecation.yml delete mode 100644 changelogs/fragments/5436-passwordstore-errors.yml delete mode 100644 changelogs/fragments/5437-proxmox.yml delete mode 100644 changelogs/fragments/5438-linode.yml delete mode 100644 changelogs/fragments/5439-dig-return-empty-result.yml delete mode 100644 changelogs/fragments/5444-passwordstore-options.yml delete mode 100644 changelogs/fragments/5457-dnstxt-empty.yml delete mode 100644 changelogs/fragments/6.0.0-a1.yml delete mode 100644 changelogs/fragments/deprecation-removals.yml delete mode 100644 changelogs/fragments/licenses-2.yml delete mode 100644 changelogs/fragments/licenses.yml delete mode 100644 changelogs/fragments/lookup-options.yml delete mode 100644 changelogs/fragments/psf-license.yml delete mode 100644 changelogs/fragments/simplified-bsd-license.yml delete mode 100644 changelogs/fragments/unflatmap.yml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7b796ddb34..3b83faa551 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,3 +3,234 @@ Community General Release Notes =============================== .. contents:: Topics + +This changelog describes changes after version 5.0.0. + +v6.0.0-a1 +========= + +Release Summary +--------------- + +This is a pre-release for the upcoming 6.0.0 major release. The main objective of this pre-release is to make it possible to test the large stuctural changes by flattening the directory structure. See the corresponding entry in the changelog for details. + +Major Changes +------------- + +- The internal structure of the collection was changed for modules and action plugins. These no longer live in a directory hierarchy ordered by topic, but instead are now all in a single (flat) directory. This has no impact on users *assuming they did not use internal FQCNs*. These will still work, but result in deprecation warnings. They were never officially supported and thus the redirects are kept as a courtsey, and this is not labelled as a breaking change. Note that for example the Ansible VScode plugin started recommending these internal names. If you followed its recommendation, you will now have to change back to the short names to avoid deprecation warnings, and potential errors in the future as these redirects will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5461). +- newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341). + +Minor Changes +------------- + +- Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065). +- All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098, https://github.com/ansible-collections/community.general/pull/5106). +- ModuleHelper module utils - added property ``verbosity`` to base class (https://github.com/ansible-collections/community.general/pull/5035). +- ModuleHelper module utils - improved ``ModuleHelperException``, using ``to_native()`` for the exception message (https://github.com/ansible-collections/community.general/pull/4755). +- The collection repository conforms to the `REUSE specification `__ except for the changelog fragments (https://github.com/ansible-collections/community.general/pull/5138). +- ali_instance - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). +- ali_instance_info - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). +- alternatives - add ``state=absent`` to be able to remove an alternative (https://github.com/ansible-collections/community.general/pull/4654). +- alternatives - add ``subcommands`` parameter (https://github.com/ansible-collections/community.general/pull/4654). +- ansible_galaxy_install - minor refactoring using latest ``ModuleHelper`` updates (https://github.com/ansible-collections/community.general/pull/4752). +- apk - add ``world`` parameter for supporting a custom world file (https://github.com/ansible-collections/community.general/pull/4976). +- bitwarden lookup plugin - add option ``search`` to search for other attributes than name (https://github.com/ansible-collections/community.general/pull/5297). +- cartesian lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- cmd_runner module util - added parameters ``check_mode_skip`` and ``check_mode_return`` to ``CmdRunner.context()``, so that the command is not executed when ``check_mode=True`` (https://github.com/ansible-collections/community.general/pull/4736). +- cmd_runner module utils - add ``__call__`` method to invoke context (https://github.com/ansible-collections/community.general/pull/4791). +- consul - adds ``ttl`` parameter for session (https://github.com/ansible-collections/community.general/pull/4996). +- consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367). +- consul_session - adds ``token`` parameter for session (https://github.com/ansible-collections/community.general/pull/5193). +- cpanm - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). +- credstash lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- dependent lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- dig lookup plugin - add option ``fail_on_error`` to allow stopping execution on lookup failures (https://github.com/ansible-collections/community.general/pull/4973). +- dig lookup plugin - start using Ansible's configuration manager to parse options. All documented options can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440). +- dnstxt lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- filetree lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- flattened lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- gitlab module util - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_deploy_key - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_group - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_group_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_group_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_hook - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_hook - minor refactoring (https://github.com/ansible-collections/community.general/pull/5271). +- gitlab_project - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_project_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_project_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_protected_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_runner - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- gitlab_user - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). +- hiera lookup plugin - start using Ansible's configuration manager to parse options. The Hiera executable and config file can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440). +- homebrew, homebrew_tap - added Homebrew on Linux path to defaults (https://github.com/ansible-collections/community.general/pull/5241). +- keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` (https://github.com/ansible-collections/community.general/issues/5023). +- keyring lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). +- linode inventory plugin - simplify option handling (https://github.com/ansible-collections/community.general/pull/5438). +- listen_ports_facts - add new ``include_non_listening`` option which adds ``-a`` option to ``netstat`` and ``ss``. This shows both listening and non-listening (for TCP this means established connections) sockets, and returns ``state`` and ``foreign_address`` (https://github.com/ansible-collections/community.general/issues/4762, https://github.com/ansible-collections/community.general/pull/4953). +- lmdb_kv lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358). +- machinectl become plugin - can now be used with a password from another user than root, if a polkit rule is present (https://github.com/ansible-collections/community.general/pull/4849). +- machinectl become plugin - combine the success command when building the become command to be consistent with other become plugins (https://github.com/ansible-collections/community.general/pull/5287). +- manifold lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). +- maven_artifact - add a new ``unredirected_headers`` option that can be used with ansible-core 2.12 and above. The default value is to not use ``Authorization`` and ``Cookie`` headers on redirects for security reasons. With ansible-core 2.11, all headers are still passed on for redirects (https://github.com/ansible-collections/community.general/pull/4812). +- mksysb - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). +- nagios - minor refactoring on parameter validation for different actions (https://github.com/ansible-collections/community.general/pull/5239). +- netcup_dnsapi - add ``timeout`` parameter (https://github.com/ansible-collections/community.general/pull/5301). +- nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361). +- nmcli - add bond option ``xmit_hash_policy`` to bond options (https://github.com/ansible-collections/community.general/issues/5148). +- nmcli - adds ``vpn`` type and parameter for supporting VPN with service type L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). +- nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228). +- opentelemetry callback plugin - allow configuring opentelementry callback via config file (https://github.com/ansible-collections/community.general/pull/4916). +- opentelemetry callback plugin - send logs. This can be disabled by setting ``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175). +- pacman - added parameters ``reason`` and ``reason_for`` to set/change the install reason of packages (https://github.com/ansible-collections/community.general/pull/4956). +- passwordstore lookup plugin - allow options to be passed lookup options instead of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444). +- passwordstore lookup plugin - allow using alternative password managers by detecting wrapper scripts, allow explicit configuration of pass and gopass backends (https://github.com/ansible-collections/community.general/issues/4766). +- passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436) +- pipx - added state ``latest`` to the module (https://github.com/ansible-collections/community.general/pull/5105). +- pipx - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/5085). +- pipx - module fails faster when ``name`` is missing for states ``upgrade`` and ``reinstall`` (https://github.com/ansible-collections/community.general/pull/5100). +- pipx - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). +- pipx module utils - created new module util ``pipx`` providing a ``cmd_runner`` specific for the ``pipx`` module (https://github.com/ansible-collections/community.general/pull/5085). +- portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options (https://github.com/ansible-collections/community.general/pull/5349). +- portage - use Portage's python module instead of calling gentoolkit-provided program in shell (https://github.com/ansible-collections/community.general/pull/5349). +- proxmox inventory plugin - added new flag ``qemu_extended_statuses`` and new groups ``prelaunch``, ``paused``. They will be populated only when ``want_facts=true``, ``qemu_extended_statuses=true`` and only for ``QEMU`` machines (https://github.com/ansible-collections/community.general/pull/4723). +- proxmox inventory plugin - simplify option handling code (https://github.com/ansible-collections/community.general/pull/5437). +- proxmox module utils, the proxmox* modules - add ``api_task_ok`` helper to standardize API task status checks across all proxmox modules (https://github.com/ansible-collections/community.general/pull/5274). +- proxmox_kvm - allow ``agent`` argument to be a string (https://github.com/ansible-collections/community.general/pull/5107). +- proxmox_snap - add ``unbind`` param to support snapshotting containers with configured mountpoints (https://github.com/ansible-collections/community.general/pull/5274). +- puppet - adds ``confdir`` parameter to configure a custom confir location (https://github.com/ansible-collections/community.general/pull/4740). +- redfish - added new command GetVirtualMedia, VirtualMediaInsert and VirtualMediaEject to Systems category due to Redfish spec changes the virtualMedia resource location from Manager to System (https://github.com/ansible-collections/community.general/pull/5124). +- redfish_config - add ``SetSessionService`` to set default session timeout policy (https://github.com/ansible-collections/community.general/issues/5008). +- redfish_info - add ``GetManagerInventory`` to report list of Manager inventory information (https://github.com/ansible-collections/community.general/issues/4899). +- seport - added new argument ``local`` (https://github.com/ansible-collections/community.general/pull/5203) +- snap - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). +- sudoers - will attempt to validate the proposed sudoers rule using visudo if available, optionally skipped, or required (https://github.com/ansible-collections/community.general/pull/4794, https://github.com/ansible-collections/community.general/issues/4745). +- terraform - adds capability to handle complex variable structures for ``variables`` parameter in the module. This must be enabled with the new ``complex_vars`` parameter (https://github.com/ansible-collections/community.general/pull/4797). +- terraform - run ``terraform init`` with ``-no-color`` not to mess up the stdout of the task (https://github.com/ansible-collections/community.general/pull/5147). +- wdc_redfish_command - add ``IndicatorLedOn`` and ``IndicatorLedOff`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5059). +- wdc_redfish_command - add ``PowerModeLow`` and ``PowerModeNormal`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5145). +- xfconf - add ``stdout``, ``stderr`` and ``cmd`` to the module results (https://github.com/ansible-collections/community.general/pull/5037). +- xfconf - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). +- xfconf - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). +- xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). +- xfconf module utils - created new module util ``xfconf`` providing a ``cmd_runner`` specific for ``xfconf`` modules (https://github.com/ansible-collections/community.general/pull/4776). +- xfconf_info - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). +- xfconf_info - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). +- znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306). + +Breaking Changes / Porting Guide +-------------------------------- + +- newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341). + +Deprecated Features +------------------- + +- ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt`` module util (https://github.com/ansible-collections/community.general/pull/5370). +- CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). +- CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). +- CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). +- cmd_runner module utils - deprecated ``fmt`` in favour of ``cmd_runner_fmt`` as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777). +- django_manage - support for Django releases older than 4.1 has been deprecated and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). +- django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate`` that have been deprecated in Django long time ago will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). +- django_manage - the behavior of "creating the virtual environment when missing" is being deprecated and will be removed in community.general version 9.0.0 (https://github.com/ansible-collections/community.general/pull/5405). +- gconftool2 - deprecates ``state=get`` in favor of using the module ``gconftool2_info`` (https://github.com/ansible-collections/community.general/pull/4778). +- lxc_container - the module will no longer make any effort to support Python 2 (https://github.com/ansible-collections/community.general/pull/5304). +- newrelic_deployment - ``appname`` and ``environment`` are no longer valid options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341). +- proxmox - deprecated the current ``unprivileged`` default value, will be changed to ``true`` in community.general 7.0.0 (https://github.com/pull/5224). +- xfconf - deprecated parameter ``disable_facts``, as since version 4.0.0 it only allows value ``true`` (https://github.com/ansible-collections/community.general/pull/4520). + +Removed Features (previously deprecated) +---------------------------------------- + +- bitbucket* modules - ``username`` is no longer an alias of ``workspace``, but of ``user`` (https://github.com/ansible-collections/community.general/pull/5326). +- gem - the default of the ``norc`` option changed from ``false`` to ``true`` (https://github.com/ansible-collections/community.general/pull/5326). +- gitlab_group_members - ``gitlab_group`` must now always contain the full path, and no longer just the name or path (https://github.com/ansible-collections/community.general/pull/5326). +- keycloak_authentication - the return value ``flow`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326). +- keycloak_group - the return value ``group`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326). +- lxd_container - the default of the ``ignore_volatile_options`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). +- mail callback plugin - the ``sender`` option is now required (https://github.com/ansible-collections/community.general/pull/5326). +- module_helper module utils - remove the ``VarDict`` attribute from ``ModuleHelper``. Import ``VarDict`` from ``ansible_collections.community.general.plugins.module_utils.mh.mixins.vars`` instead (https://github.com/ansible-collections/community.general/pull/5326). +- proxmox inventory plugin - the default of the ``want_proxmox_nodes_ansible_host`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). +- vmadm - the ``debug`` option has been removed. It was not used anyway (https://github.com/ansible-collections/community.general/pull/5326). + +Bugfixes +-------- + +- Include ``PSF-license.txt`` file for ``plugins/module_utils/_mount.py``. +- Include ``simplified_bsd.txt`` license file for various module utils, the ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests. +- alternatives - do not set the priority if the priority was not set by the user (https://github.com/ansible-collections/community.general/pull/4810). +- alternatives - only pass subcommands when they are specified as module arguments (https://github.com/ansible-collections/community.general/issues/4803, https://github.com/ansible-collections/community.general/issues/4804, https://github.com/ansible-collections/community.general/pull/4836). +- alternatives - when ``subcommands`` is specified, ``link`` must be given for every subcommand. This was already mentioned in the documentation, but not enforced by the code (https://github.com/ansible-collections/community.general/pull/4836). +- apache2_mod_proxy - avoid crash when reporting inability to parse balancer_member_page HTML caused by using an undefined variable in the error message (https://github.com/ansible-collections/community.general/pull/5111). +- archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz`` (https://github.com/ansible-collections/community.general/pull/5393). +- cmd_runner module utils - fix bug caused by using the ``command`` variable instead of ``self.command`` when looking for binary path (https://github.com/ansible-collections/community.general/pull/4903). +- consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680). +- credstash lookup plugin - pass plugin options to credstash for all terms, not just for the first (https://github.com/ansible-collections/community.general/pull/5440). +- dig lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5439, https://github.com/ansible-collections/community.general/issues/5428). +- dig lookup plugin - fix evaluation of falsy values for boolean parameters ``fail_on_error`` and ``retry_servfail`` (https://github.com/ansible-collections/community.general/pull/5129). +- dnsimple_info - correctly report missing library as ``requests`` and not ``another_library`` (https://github.com/ansible-collections/community.general/pull/5111). +- dnstxt lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5457, https://github.com/ansible-collections/community.general/issues/5428). +- dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). +- filesystem - handle ``fatresize --info`` output lines without ``:`` (https://github.com/ansible-collections/community.general/pull/4700). +- filesystem - improve error messages when output cannot be parsed by including newlines in escaped form (https://github.com/ansible-collections/community.general/pull/4700). +- funcd connection plugin - fix signature of ``exec_command`` (https://github.com/ansible-collections/community.general/pull/5111). +- ini_file - minor refactor fixing a python lint error (https://github.com/ansible-collections/community.general/pull/5307). +- keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241). +- keyring_info - fix the result from the keyring library never getting returned (https://github.com/ansible-collections/community.general/pull/4964). +- ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute values (https://github.com/ansible-collections/community.general/issues/977, https://github.com/ansible-collections/community.general/pull/5385). +- listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` clause had a wrong indentation. The check is now handled in the ``split_pid_name`` function (https://github.com/ansible-collections/community.general/pull/5202). +- locale_gen - fix support for Ubuntu (https://github.com/ansible-collections/community.general/issues/5281). +- lxc_container - the module has been updated to support Python 3 (https://github.com/ansible-collections/community.general/pull/5304). +- lxd connection plugin - fix incorrect ``inventory_hostname`` in ``remote_addr``. This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/issues/4886). +- manageiq_alert_profiles - avoid crash when reporting unknown profile caused by trying to return an undefined variable (https://github.com/ansible-collections/community.general/pull/5111). +- nmcli - avoid changed status for most cases with VPN connections (https://github.com/ansible-collections/community.general/pull/5126). +- nmcli - fix error caused by adding undefined module arguments for list options (https://github.com/ansible-collections/community.general/issues/4373, https://github.com/ansible-collections/community.general/pull/4813). +- nmcli - fix error when setting previously unset MAC address, ``gsm.apn`` or ``vpn.data``: current values were being normalized without checking if they might be ``None`` (https://github.com/ansible-collections/community.general/pull/5291). +- nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998). +- nsupdate - compatibility with NS records (https://github.com/ansible-collections/community.general/pull/5112). +- nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed DNS zones (https://github.com/ansible-collections/community.general/issues/4657). +- opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342). +- osx_defaults - no longer expand ``~`` in ``value`` to the user's home directory, or expand environment variables (https://github.com/ansible-collections/community.general/issues/5234, https://github.com/ansible-collections/community.general/pull/5243). +- packet_ip_subnet - fix error reporting in case of invalid CIDR prefix lengths (https://github.com/ansible-collections/community.general/pull/5111). +- pacman - fixed name resolution of URL packages (https://github.com/ansible-collections/community.general/pull/4959). +- passwordstore lookup plugin - fix ``returnall`` for gopass (https://github.com/ansible-collections/community.general/pull/5027). +- passwordstore lookup plugin - fix password store path detection for gopass (https://github.com/ansible-collections/community.general/pull/4955). +- pfexec become plugin - remove superflous quotes preventing exe wrap from working as expected (https://github.com/ansible-collections/community.general/issues/3671, https://github.com/ansible-collections/community.general/pull/3889). +- pip_package_info - remove usage of global variable (https://github.com/ansible-collections/community.general/pull/5111). +- pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363). +- proxmox - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). +- proxmox inventory plugin - fix crash when ``enabled=1`` is used in agent config string (https://github.com/ansible-collections/community.general/pull/4910). +- proxmox inventory plugin - fixed extended status detection for qemu (https://github.com/ansible-collections/community.general/pull/4816). +- proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198). +- proxmox_kvm - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). +- proxmox_kvm - fix exception when no ``agent`` argument is specified (https://github.com/ansible-collections/community.general/pull/5194). +- proxmox_kvm - fix wrong condition (https://github.com/ansible-collections/community.general/pull/5108). +- proxmox_kvm - replace new condition with proper condition to allow for using ``vmid`` on update (https://github.com/ansible-collections/community.general/pull/5206). +- rax_clb_nodes - fix code to be compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/4933). +- redfish_command - fix the check if a virtual media is unmounted to just check for ``instered= false`` caused by Supermicro hardware that does not clear the ``ImageName`` (https://github.com/ansible-collections/community.general/pull/4839). +- redfish_command - the Supermicro Redfish implementation only supports the ``image_url`` parameter in the underlying API calls to ``VirtualMediaInsert`` and ``VirtualMediaEject``. Any values set (or the defaults) for ``write_protected`` or ``inserted`` will be ignored (https://github.com/ansible-collections/community.general/pull/4839). +- redfish_info - fix to ``GetChassisPower`` to correctly report power information when multiple chassis exist, but not all chassis report power information (https://github.com/ansible-collections/community.general/issues/4901). +- redfish_utils module utils - centralize payload checking when performing modification requests to a Redfish service (https://github.com/ansible-collections/community.general/issues/5210/). +- redhat_subscription - fix unsubscribing on RHEL 9 (https://github.com/ansible-collections/community.general/issues/4741). +- redhat_subscription - make module idempotent when ``pool_ids`` are used (https://github.com/ansible-collections/community.general/issues/5313). +- redis* modules - fix call to ``module.fail_json`` when failing because of missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733). +- slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). +- slack - fix message update for channels which start with ``CP``. When ``message-id`` was passed it failed for channels which started with ``CP`` because the ``#`` symbol was added before the ``channel_id`` (https://github.com/ansible-collections/community.general/pull/5249). +- sudoers - ensure sudoers config files are created with the permissions requested by sudoers (0440) (https://github.com/ansible-collections/community.general/pull/4814). +- sudoers - fix incorrect handling of ``state: absent`` (https://github.com/ansible-collections/community.general/issues/4852). +- tss lookup plugin - adding support for updated Delinea library (https://github.com/DelineaXPM/python-tss-sdk/issues/9, https://github.com/ansible-collections/community.general/pull/5151). +- virtualbox inventory plugin - skip parsing values with keys that have both a value and nested data. Skip parsing values that are nested more than two keys deep (https://github.com/ansible-collections/community.general/issues/5332, https://github.com/ansible-collections/community.general/pull/5348). +- xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). +- xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module from working at all (https://github.com/ansible-collections/community.general/pull/5383). +- xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, https://github.com/ansible-collections/community.general/pull/5007). +- zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, https://github.com/ansible-collections/community.general/pull/4726). + +New Modules +----------- + +- scaleway_function_namespace - Scaleway Function namespace management +- scaleway_function_namespace_info - Retrieve information on Scaleway Function namespace diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 3ec4909999..b5612b7ccc 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1,2 +1,517 @@ ancestor: 5.0.0 -releases: {} +releases: + 6.0.0-a1: + changes: + breaking_changes: + - newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341). + bugfixes: + - Include ``PSF-license.txt`` file for ``plugins/module_utils/_mount.py``. + - Include ``simplified_bsd.txt`` license file for various module utils, the + ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests. + - alternatives - do not set the priority if the priority was not set by the + user (https://github.com/ansible-collections/community.general/pull/4810). + - alternatives - only pass subcommands when they are specified as module arguments + (https://github.com/ansible-collections/community.general/issues/4803, https://github.com/ansible-collections/community.general/issues/4804, + https://github.com/ansible-collections/community.general/pull/4836). + - alternatives - when ``subcommands`` is specified, ``link`` must be given for + every subcommand. This was already mentioned in the documentation, but not + enforced by the code (https://github.com/ansible-collections/community.general/pull/4836). + - apache2_mod_proxy - avoid crash when reporting inability to parse balancer_member_page + HTML caused by using an undefined variable in the error message (https://github.com/ansible-collections/community.general/pull/5111). + - archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz`` + (https://github.com/ansible-collections/community.general/pull/5393). + - cmd_runner module utils - fix bug caused by using the ``command`` variable + instead of ``self.command`` when looking for binary path (https://github.com/ansible-collections/community.general/pull/4903). + - consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680). + - credstash lookup plugin - pass plugin options to credstash for all terms, + not just for the first (https://github.com/ansible-collections/community.general/pull/5440). + - dig lookup plugin - add option to return empty result without empty strings, + and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5439, + https://github.com/ansible-collections/community.general/issues/5428). + - dig lookup plugin - fix evaluation of falsy values for boolean parameters + ``fail_on_error`` and ``retry_servfail`` (https://github.com/ansible-collections/community.general/pull/5129). + - dnsimple_info - correctly report missing library as ``requests`` and not ``another_library`` + (https://github.com/ansible-collections/community.general/pull/5111). + - dnstxt lookup plugin - add option to return empty result without empty strings, + and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5457, + https://github.com/ansible-collections/community.general/issues/5428). + - dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). + - filesystem - handle ``fatresize --info`` output lines without ``:`` (https://github.com/ansible-collections/community.general/pull/4700). + - filesystem - improve error messages when output cannot be parsed by including + newlines in escaped form (https://github.com/ansible-collections/community.general/pull/4700). + - funcd connection plugin - fix signature of ``exec_command`` (https://github.com/ansible-collections/community.general/pull/5111). + - ini_file - minor refactor fixing a python lint error (https://github.com/ansible-collections/community.general/pull/5307). + - keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241). + - keyring_info - fix the result from the keyring library never getting returned + (https://github.com/ansible-collections/community.general/pull/4964). + - ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute + values (https://github.com/ansible-collections/community.general/issues/977, + https://github.com/ansible-collections/community.general/pull/5385). + - listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` + clause had a wrong indentation. The check is now handled in the ``split_pid_name`` + function (https://github.com/ansible-collections/community.general/pull/5202). + - locale_gen - fix support for Ubuntu (https://github.com/ansible-collections/community.general/issues/5281). + - lxc_container - the module has been updated to support Python 3 (https://github.com/ansible-collections/community.general/pull/5304). + - lxd connection plugin - fix incorrect ``inventory_hostname`` in ``remote_addr``. + This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/issues/4886). + - manageiq_alert_profiles - avoid crash when reporting unknown profile caused + by trying to return an undefined variable (https://github.com/ansible-collections/community.general/pull/5111). + - nmcli - avoid changed status for most cases with VPN connections (https://github.com/ansible-collections/community.general/pull/5126). + - nmcli - fix error caused by adding undefined module arguments for list options + (https://github.com/ansible-collections/community.general/issues/4373, https://github.com/ansible-collections/community.general/pull/4813). + - 'nmcli - fix error when setting previously unset MAC address, ``gsm.apn`` + or ``vpn.data``: current values were being normalized without checking if + they might be ``None`` (https://github.com/ansible-collections/community.general/pull/5291).' + - nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998). + - nsupdate - compatibility with NS records (https://github.com/ansible-collections/community.general/pull/5112). + - nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed + DNS zones (https://github.com/ansible-collections/community.general/issues/4657). + - opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed + support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342). + - osx_defaults - no longer expand ``~`` in ``value`` to the user's home directory, + or expand environment variables (https://github.com/ansible-collections/community.general/issues/5234, + https://github.com/ansible-collections/community.general/pull/5243). + - packet_ip_subnet - fix error reporting in case of invalid CIDR prefix lengths + (https://github.com/ansible-collections/community.general/pull/5111). + - pacman - fixed name resolution of URL packages (https://github.com/ansible-collections/community.general/pull/4959). + - passwordstore lookup plugin - fix ``returnall`` for gopass (https://github.com/ansible-collections/community.general/pull/5027). + - passwordstore lookup plugin - fix password store path detection for gopass + (https://github.com/ansible-collections/community.general/pull/4955). + - pfexec become plugin - remove superflous quotes preventing exe wrap from working + as expected (https://github.com/ansible-collections/community.general/issues/3671, + https://github.com/ansible-collections/community.general/pull/3889). + - pip_package_info - remove usage of global variable (https://github.com/ansible-collections/community.general/pull/5111). + - pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363). + - proxmox - fix error handling when getting VM by name when ``state=absent`` + (https://github.com/ansible-collections/community.general/pull/4945). + - proxmox inventory plugin - fix crash when ``enabled=1`` is used in agent config + string (https://github.com/ansible-collections/community.general/pull/4910). + - proxmox inventory plugin - fixed extended status detection for qemu (https://github.com/ansible-collections/community.general/pull/4816). + - proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198). + - proxmox_kvm - fix error handling when getting VM by name when ``state=absent`` + (https://github.com/ansible-collections/community.general/pull/4945). + - proxmox_kvm - fix exception when no ``agent`` argument is specified (https://github.com/ansible-collections/community.general/pull/5194). + - proxmox_kvm - fix wrong condition (https://github.com/ansible-collections/community.general/pull/5108). + - proxmox_kvm - replace new condition with proper condition to allow for using + ``vmid`` on update (https://github.com/ansible-collections/community.general/pull/5206). + - rax_clb_nodes - fix code to be compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/4933). + - redfish_command - fix the check if a virtual media is unmounted to just check + for ``instered= false`` caused by Supermicro hardware that does not clear + the ``ImageName`` (https://github.com/ansible-collections/community.general/pull/4839). + - redfish_command - the Supermicro Redfish implementation only supports the + ``image_url`` parameter in the underlying API calls to ``VirtualMediaInsert`` + and ``VirtualMediaEject``. Any values set (or the defaults) for ``write_protected`` + or ``inserted`` will be ignored (https://github.com/ansible-collections/community.general/pull/4839). + - redfish_info - fix to ``GetChassisPower`` to correctly report power information + when multiple chassis exist, but not all chassis report power information + (https://github.com/ansible-collections/community.general/issues/4901). + - redfish_utils module utils - centralize payload checking when performing modification + requests to a Redfish service (https://github.com/ansible-collections/community.general/issues/5210/). + - redhat_subscription - fix unsubscribing on RHEL 9 (https://github.com/ansible-collections/community.general/issues/4741). + - redhat_subscription - make module idempotent when ``pool_ids`` are used (https://github.com/ansible-collections/community.general/issues/5313). + - redis* modules - fix call to ``module.fail_json`` when failing because of + missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733). + - slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection + by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). + - slack - fix message update for channels which start with ``CP``. When ``message-id`` + was passed it failed for channels which started with ``CP`` because the ``#`` + symbol was added before the ``channel_id`` (https://github.com/ansible-collections/community.general/pull/5249). + - sudoers - ensure sudoers config files are created with the permissions requested + by sudoers (0440) (https://github.com/ansible-collections/community.general/pull/4814). + - 'sudoers - fix incorrect handling of ``state: absent`` (https://github.com/ansible-collections/community.general/issues/4852).' + - tss lookup plugin - adding support for updated Delinea library (https://github.com/DelineaXPM/python-tss-sdk/issues/9, + https://github.com/ansible-collections/community.general/pull/5151). + - virtualbox inventory plugin - skip parsing values with keys that have both + a value and nested data. Skip parsing values that are nested more than two + keys deep (https://github.com/ansible-collections/community.general/issues/5332, + https://github.com/ansible-collections/community.general/pull/5348). + - xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia + resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). + - xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module + from working at all (https://github.com/ansible-collections/community.general/pull/5383). + - xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, + https://github.com/ansible-collections/community.general/pull/5007). + - zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, + https://github.com/ansible-collections/community.general/pull/4726). + deprecated_features: + - ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt`` + module util (https://github.com/ansible-collections/community.general/pull/5370). + - CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util + (https://github.com/ansible-collections/community.general/pull/5370). + - CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module + util (https://github.com/ansible-collections/community.general/pull/5370). + - CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner`` + module util (https://github.com/ansible-collections/community.general/pull/5370). + - cmd_runner module utils - deprecated ``fmt`` in favour of ``cmd_runner_fmt`` + as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777). + - django_manage - support for Django releases older than 4.1 has been deprecated + and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). + - django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate`` + that have been deprecated in Django long time ago will be removed in community.general + 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). + - django_manage - the behavior of "creating the virtual environment when missing" + is being deprecated and will be removed in community.general version 9.0.0 + (https://github.com/ansible-collections/community.general/pull/5405). + - gconftool2 - deprecates ``state=get`` in favor of using the module ``gconftool2_info`` + (https://github.com/ansible-collections/community.general/pull/4778). + - lxc_container - the module will no longer make any effort to support Python + 2 (https://github.com/ansible-collections/community.general/pull/5304). + - newrelic_deployment - ``appname`` and ``environment`` are no longer valid + options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341). + - proxmox - deprecated the current ``unprivileged`` default value, will be changed + to ``true`` in community.general 7.0.0 (https://github.com/pull/5224). + - xfconf - deprecated parameter ``disable_facts``, as since version 4.0.0 it + only allows value ``true`` (https://github.com/ansible-collections/community.general/pull/4520). + major_changes: + - The internal structure of the collection was changed for modules and action + plugins. These no longer live in a directory hierarchy ordered by topic, but + instead are now all in a single (flat) directory. This has no impact on users + *assuming they did not use internal FQCNs*. These will still work, but result + in deprecation warnings. They were never officially supported and thus the + redirects are kept as a courtsey, and this is not labelled as a breaking change. + Note that for example the Ansible VScode plugin started recommending these + internal names. If you followed its recommendation, you will now have to change + back to the short names to avoid deprecation warnings, and potential errors + in the future as these redirects will be removed in community.general 9.0.0 + (https://github.com/ansible-collections/community.general/pull/5461). + - newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341). + minor_changes: + - Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py + (https://github.com/ansible-collections/community.general/pull/5065). + - All software licenses are now in the ``LICENSES/`` directory of the collection + root (https://github.com/ansible-collections/community.general/pull/5065, + https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, + https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, + https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098, + https://github.com/ansible-collections/community.general/pull/5106). + - ModuleHelper module utils - added property ``verbosity`` to base class (https://github.com/ansible-collections/community.general/pull/5035). + - ModuleHelper module utils - improved ``ModuleHelperException``, using ``to_native()`` + for the exception message (https://github.com/ansible-collections/community.general/pull/4755). + - The collection repository conforms to the `REUSE specification `__ + except for the changelog fragments (https://github.com/ansible-collections/community.general/pull/5138). + - ali_instance - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). + - ali_instance_info - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5240). + - alternatives - add ``state=absent`` to be able to remove an alternative (https://github.com/ansible-collections/community.general/pull/4654). + - alternatives - add ``subcommands`` parameter (https://github.com/ansible-collections/community.general/pull/4654). + - ansible_galaxy_install - minor refactoring using latest ``ModuleHelper`` updates + (https://github.com/ansible-collections/community.general/pull/4752). + - apk - add ``world`` parameter for supporting a custom world file (https://github.com/ansible-collections/community.general/pull/4976). + - bitwarden lookup plugin - add option ``search`` to search for other attributes + than name (https://github.com/ansible-collections/community.general/pull/5297). + - cartesian lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - cmd_runner module util - added parameters ``check_mode_skip`` and ``check_mode_return`` + to ``CmdRunner.context()``, so that the command is not executed when ``check_mode=True`` + (https://github.com/ansible-collections/community.general/pull/4736). + - cmd_runner module utils - add ``__call__`` method to invoke context (https://github.com/ansible-collections/community.general/pull/4791). + - consul - adds ``ttl`` parameter for session (https://github.com/ansible-collections/community.general/pull/4996). + - consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367). + - consul_session - adds ``token`` parameter for session (https://github.com/ansible-collections/community.general/pull/5193). + - cpanm - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived + modules (https://github.com/ansible-collections/community.general/pull/4674). + - credstash lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - dependent lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - dig lookup plugin - add option ``fail_on_error`` to allow stopping execution + on lookup failures (https://github.com/ansible-collections/community.general/pull/4973). + - dig lookup plugin - start using Ansible's configuration manager to parse options. + All documented options can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440). + - dnstxt lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - filetree lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - flattened lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - gitlab module util - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_deploy_key - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_group - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_group_members - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_group_variable - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_hook - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_hook - minor refactoring (https://github.com/ansible-collections/community.general/pull/5271). + - gitlab_project - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_project_members - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_project_variable - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_protected_branch - minor refactor when checking for installed dependency + (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_runner - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - gitlab_user - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). + - hiera lookup plugin - start using Ansible's configuration manager to parse + options. The Hiera executable and config file can now also be passed as lookup + parameters (https://github.com/ansible-collections/community.general/pull/5440). + - homebrew, homebrew_tap - added Homebrew on Linux path to defaults (https://github.com/ansible-collections/community.general/pull/5241). + - keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` + (https://github.com/ansible-collections/community.general/issues/5023). + - keyring lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). + - linode inventory plugin - simplify option handling (https://github.com/ansible-collections/community.general/pull/5438). + - listen_ports_facts - add new ``include_non_listening`` option which adds ``-a`` + option to ``netstat`` and ``ss``. This shows both listening and non-listening + (for TCP this means established connections) sockets, and returns ``state`` + and ``foreign_address`` (https://github.com/ansible-collections/community.general/issues/4762, + https://github.com/ansible-collections/community.general/pull/4953). + - lmdb_kv lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358). + - machinectl become plugin - can now be used with a password from another user + than root, if a polkit rule is present (https://github.com/ansible-collections/community.general/pull/4849). + - machinectl become plugin - combine the success command when building the become + command to be consistent with other become plugins (https://github.com/ansible-collections/community.general/pull/5287). + - manifold lookup plugin - start using Ansible's configuration manager to parse + options (https://github.com/ansible-collections/community.general/pull/5440). + - maven_artifact - add a new ``unredirected_headers`` option that can be used + with ansible-core 2.12 and above. The default value is to not use ``Authorization`` + and ``Cookie`` headers on redirects for security reasons. With ansible-core + 2.11, all headers are still passed on for redirects (https://github.com/ansible-collections/community.general/pull/4812). + - mksysb - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived + modules (https://github.com/ansible-collections/community.general/pull/4674). + - nagios - minor refactoring on parameter validation for different actions (https://github.com/ansible-collections/community.general/pull/5239). + - netcup_dnsapi - add ``timeout`` parameter (https://github.com/ansible-collections/community.general/pull/5301). + - nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361). + - nmcli - add bond option ``xmit_hash_policy`` to bond options (https://github.com/ansible-collections/community.general/issues/5148). + - nmcli - adds ``vpn`` type and parameter for supporting VPN with service type + L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). + - nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228). + - opentelemetry callback plugin - allow configuring opentelementry callback + via config file (https://github.com/ansible-collections/community.general/pull/4916). + - opentelemetry callback plugin - send logs. This can be disabled by setting + ``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175). + - pacman - added parameters ``reason`` and ``reason_for`` to set/change the + install reason of packages (https://github.com/ansible-collections/community.general/pull/4956). + - passwordstore lookup plugin - allow options to be passed lookup options instead + of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444). + - passwordstore lookup plugin - allow using alternative password managers by + detecting wrapper scripts, allow explicit configuration of pass and gopass + backends (https://github.com/ansible-collections/community.general/issues/4766). + - passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436) + - pipx - added state ``latest`` to the module (https://github.com/ansible-collections/community.general/pull/5105). + - pipx - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/5085). + - pipx - module fails faster when ``name`` is missing for states ``upgrade`` + and ``reinstall`` (https://github.com/ansible-collections/community.general/pull/5100). + - pipx - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived + modules (https://github.com/ansible-collections/community.general/pull/4674). + - pipx module utils - created new module util ``pipx`` providing a ``cmd_runner`` + specific for the ``pipx`` module (https://github.com/ansible-collections/community.general/pull/5085). + - portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options + (https://github.com/ansible-collections/community.general/pull/5349). + - portage - use Portage's python module instead of calling gentoolkit-provided + program in shell (https://github.com/ansible-collections/community.general/pull/5349). + - proxmox inventory plugin - added new flag ``qemu_extended_statuses`` and new + groups ``prelaunch``, ``paused``. They will be + populated only when ``want_facts=true``, ``qemu_extended_statuses=true`` and + only for ``QEMU`` machines (https://github.com/ansible-collections/community.general/pull/4723). + - proxmox inventory plugin - simplify option handling code (https://github.com/ansible-collections/community.general/pull/5437). + - proxmox module utils, the proxmox* modules - add ``api_task_ok`` helper to + standardize API task status checks across all proxmox modules (https://github.com/ansible-collections/community.general/pull/5274). + - proxmox_kvm - allow ``agent`` argument to be a string (https://github.com/ansible-collections/community.general/pull/5107). + - proxmox_snap - add ``unbind`` param to support snapshotting containers with + configured mountpoints (https://github.com/ansible-collections/community.general/pull/5274). + - puppet - adds ``confdir`` parameter to configure a custom confir location + (https://github.com/ansible-collections/community.general/pull/4740). + - redfish - added new command GetVirtualMedia, VirtualMediaInsert and VirtualMediaEject + to Systems category due to Redfish spec changes the virtualMedia resource + location from Manager to System (https://github.com/ansible-collections/community.general/pull/5124). + - redfish_config - add ``SetSessionService`` to set default session timeout + policy (https://github.com/ansible-collections/community.general/issues/5008). + - redfish_info - add ``GetManagerInventory`` to report list of Manager inventory + information (https://github.com/ansible-collections/community.general/issues/4899). + - seport - added new argument ``local`` (https://github.com/ansible-collections/community.general/pull/5203) + - snap - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived + modules (https://github.com/ansible-collections/community.general/pull/4674). + - sudoers - will attempt to validate the proposed sudoers rule using visudo + if available, optionally skipped, or required (https://github.com/ansible-collections/community.general/pull/4794, + https://github.com/ansible-collections/community.general/issues/4745). + - terraform - adds capability to handle complex variable structures for ``variables`` + parameter in the module. This must be enabled with the new ``complex_vars`` + parameter (https://github.com/ansible-collections/community.general/pull/4797). + - terraform - run ``terraform init`` with ``-no-color`` not to mess up the stdout + of the task (https://github.com/ansible-collections/community.general/pull/5147). + - wdc_redfish_command - add ``IndicatorLedOn`` and ``IndicatorLedOff`` commands + for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5059). + - wdc_redfish_command - add ``PowerModeLow`` and ``PowerModeNormal`` commands + for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5145). + - xfconf - add ``stdout``, ``stderr`` and ``cmd`` to the module results (https://github.com/ansible-collections/community.general/pull/5037). + - xfconf - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). + - xfconf - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). + - xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived + modules (https://github.com/ansible-collections/community.general/pull/4674). + - xfconf module utils - created new module util ``xfconf`` providing a ``cmd_runner`` + specific for ``xfconf`` modules (https://github.com/ansible-collections/community.general/pull/4776). + - xfconf_info - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). + - xfconf_info - use ``do_raise()`` instead of defining custom exception class + (https://github.com/ansible-collections/community.general/pull/4975). + - znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306). + release_summary: This is a pre-release for the upcoming 6.0.0 major release. + The main objective of this pre-release is to make it possible to test the + large stuctural changes by flattening the directory structure. See the corresponding + entry in the changelog for details. + removed_features: + - bitbucket* modules - ``username`` is no longer an alias of ``workspace``, + but of ``user`` (https://github.com/ansible-collections/community.general/pull/5326). + - gem - the default of the ``norc`` option changed from ``false`` to ``true`` + (https://github.com/ansible-collections/community.general/pull/5326). + - gitlab_group_members - ``gitlab_group`` must now always contain the full path, + and no longer just the name or path (https://github.com/ansible-collections/community.general/pull/5326). + - keycloak_authentication - the return value ``flow`` has been removed. Use + ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326). + - keycloak_group - the return value ``group`` has been removed. Use ``end_state`` + instead (https://github.com/ansible-collections/community.general/pull/5326). + - lxd_container - the default of the ``ignore_volatile_options`` option changed + from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). + - mail callback plugin - the ``sender`` option is now required (https://github.com/ansible-collections/community.general/pull/5326). + - module_helper module utils - remove the ``VarDict`` attribute from ``ModuleHelper``. + Import ``VarDict`` from ``ansible_collections.community.general.plugins.module_utils.mh.mixins.vars`` + instead (https://github.com/ansible-collections/community.general/pull/5326). + - proxmox inventory plugin - the default of the ``want_proxmox_nodes_ansible_host`` + option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). + - vmadm - the ``debug`` option has been removed. It was not used anyway (https://github.com/ansible-collections/community.general/pull/5326). + fragments: + - 3671-illumos-pfexec.yml + - 4175-opentelemetry_logs.yml + - 4520-xfconf-deprecate-disable-facts.yml + - 4654-alternatives-add-subcommands.yml + - 4674-use-mh-raise.yaml + - 4682-compatibility-virtualmedia-resource-location.yaml + - 4700-code-changes.yml + - 4712-consul-bugfix.yaml + - 4719-fix-keycloak-realm.yaml + - 4724-proxmox-qemu-extend.yaml + - 4726-zfs.yml + - 4733-redis-fail.yml + - 4736-cmd-runner-skip-if-check.yml + - 4740-puppet-feature.yaml + - 4746-add-vpn-support-nmcli.yaml + - 4752-ansible-galaxy-install-mh-updates.yml + - 4755-mhexception-improvement.yml + - 4776-xfconf-cmd-runner.yaml + - 4777-cmd-runner-deprecate-fmt.yaml + - 4778-gconftool2-deprecate-state-get.yaml + - 4780-passwordstore-wrapper-compat.yml + - 4791-cmd-runner-callable.yaml + - 4794-sudoers-validation.yml + - 4797-terraform-complex-variables.yml + - 4809-redhat_subscription-unsubscribe.yaml + - 4810-alternatives-bug.yml + - 4812-expose-unredirected-headers.yml + - 4813-fix-nmcli-convert-list.yaml + - 4814-sudoers-file-permissions.yml + - 4816-proxmox-fix-extended-status.yaml + - 4836-alternatives.yml + - 4839-fix-VirtualMediaInsert-Supermicro.yml + - 4849-add-password-prompt-support-for-machinectl.yml + - 4852-sudoers-state-absent.yml + - 4886-fix-lxd-inventory-hostname.yml + - 4899-add-GetManagerInventory-for-redfish_info.yml + - 4901-fix-redfish-chassispower.yml + - 4903-cmdrunner-bugfix.yaml + - 4910-fix-for-agent-enabled.yml + - 4911-dsv-honor-tld-option.yml + - 4916-opentelemetry-ini-options.yaml + - 4933-fix-rax-clb-nodes.yaml + - 4945-fix-get_vm-int-parse-handling.yaml + - 4953-listen-ports-facts-extend-output.yaml + - 4955-fix-path-detection-for-gopass.yaml + - 4956-pacman-install-reason.yaml + - 4959-pacman-fix-url-packages-name.yaml + - 4964-fix-keyring-info.yml + - 4973-introduce-dig-lookup-argument.yaml + - 4975-xfconf-use-do-raise.yaml + - 4976-apk-add-support-for-a-custom-world-file.yaml + - 4996-consul-session-ttl.yml + - 4998-nmcli-fix-int-options-idempotence.yml + - 4999-xfconf-bool.yml + - 5008-addSetSessionService.yml + - 5019-slack-support-more-groups.yml + - 5022-lastpass-lookup-cleanup.yml + - 5023-http-agent-param-keycloak.yml + - 5027-fix-returnall-for-gopass.yaml + - 5035-mh-base-verbosity.yaml + - 5037-xfconf-add-cmd-output.yaml + - 5059-wdc_redfish_command-indicator-leds.yml + - 5085-pipx-use-cmd-runner.yaml + - 5100-pipx-req-if.yaml + - 5105-pipx-state-latest.yaml + - 5107-proxmox-agent-argument.yaml + - 5108-proxmox-node-name-condition.yml + - 5111-fixes.yml + - 5112-fix-nsupdate-ns-entry.yaml + - 5124-compatibility-virtualmedia-resource-location.yaml + - 5126-nmcli-remove-diffs.yml + - 5129-dig-boolean-params-fix.yml + - 5145-wdc-redfish-enclosure-power-state.yml + - 5147-terraform-init-no-color.yml + - 5149-nmcli-bond-option.yml + - 5151-add-delinea-support-tss-lookup.yml + - 5193-consul-session-token.yaml + - 5194-fix-proxmox-agent-exception.yaml + - 5198-proxmox.yml + - 5202-bugfix-environmentError-wrong-indentation.yaml + - 5203-seport-add-local-argument.yaml + - 5206-proxmox-conditional-vmid.yml + - 5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml + - 5224-proxmox-unprivileged-default.yaml + - 5228-nmcli-ip-options.yaml + - 5239-nagios-refactor.yaml + - 5240-unused-imports.yaml + - 5241-homebrew-add-linux-path.yaml + - 5243-osx-defaults-expand-user-flags.yml + - 5249-add-new-channel-prefix.yml + - 5259-gitlab-imports.yaml + - 5271-gitlab_hook-refactor.yaml + - 5274-proxmox-snap-container-with-mountpoints.yml + - 5280-lxc_container-py3.yaml + - 5282-locale_gen.yaml + - 5287-machinectl-become-success.yml + - 5291-fix-nmcli-error-when-setting-unset-mac-address.yaml + - 5297-bitwarden-add-search-field.yml + - 5301-netcup_dnsapi-timeout.yml + - 5306-add-options-for-authentication.yml + - 5307-ini_file-lint.yaml + - 5313-fix-redhat_subscription-idempotency-pool_ids.yml + - 5341-newrelic-v2-api-changes.yml + - 5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml + - 5348-fix-vbox-deeply-nested-hostvars.yml + - 5349-drop-gentoolkit-more-knobs.yml + - 5358-lxc-container-refactor.yml + - 5361-nmcli-add-infiniband-transport-mode.yaml + - 5367-consul-refactor.yaml + - 5369-pkgng-fix-update-all.yaml + - 5370-mh-cmdmixin-deprecation.yaml + - 5377-nsupdate-ns-records-with-bind.yml + - 5383-xenserver_facts.yml + - 5385-search_s-based-_is_value_present.yaml + - 5393-archive.yml + - 5400-django-manage-deprecations.yml + - 5404-django-manage-venv-deprecation.yml + - 5436-passwordstore-errors.yml + - 5437-proxmox.yml + - 5438-linode.yml + - 5439-dig-return-empty-result.yml + - 5444-passwordstore-options.yml + - 5457-dnstxt-empty.yml + - 6.0.0-a1.yml + - deprecation-removals.yml + - licenses-2.yml + - licenses.yml + - lookup-options.yml + - psf-license.yml + - simplified-bsd-license.yml + - unflatmap.yml + modules: + - description: Scaleway Function namespace management + name: scaleway_function_namespace + namespace: '' + - description: Retrieve information on Scaleway Function namespace + name: scaleway_function_namespace_info + namespace: '' + release_date: '2022-11-02' diff --git a/changelogs/fragments/3671-illumos-pfexec.yml b/changelogs/fragments/3671-illumos-pfexec.yml deleted file mode 100644 index 4c82ebc2e5..0000000000 --- a/changelogs/fragments/3671-illumos-pfexec.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "pfexec become plugin - remove superflous quotes preventing exe wrap from working as expected (https://github.com/ansible-collections/community.general/issues/3671, https://github.com/ansible-collections/community.general/pull/3889)." diff --git a/changelogs/fragments/4175-opentelemetry_logs.yml b/changelogs/fragments/4175-opentelemetry_logs.yml deleted file mode 100644 index 8f18f83178..0000000000 --- a/changelogs/fragments/4175-opentelemetry_logs.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - opentelemetry callback plugin - send logs. This can be disabled by setting ``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175). diff --git a/changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml b/changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml deleted file mode 100644 index d2af2bc9df..0000000000 --- a/changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml +++ /dev/null @@ -1,2 +0,0 @@ -deprecated_features: - - xfconf - deprecated parameter ``disable_facts``, as since version 4.0.0 it only allows value ``true`` (https://github.com/ansible-collections/community.general/pull/4520). diff --git a/changelogs/fragments/4654-alternatives-add-subcommands.yml b/changelogs/fragments/4654-alternatives-add-subcommands.yml deleted file mode 100644 index f771e9b51c..0000000000 --- a/changelogs/fragments/4654-alternatives-add-subcommands.yml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - alternatives - add ``subcommands`` parameter (https://github.com/ansible-collections/community.general/pull/4654). - - alternatives - add ``state=absent`` to be able to remove an alternative (https://github.com/ansible-collections/community.general/pull/4654). diff --git a/changelogs/fragments/4674-use-mh-raise.yaml b/changelogs/fragments/4674-use-mh-raise.yaml deleted file mode 100644 index 3e8ad13975..0000000000 --- a/changelogs/fragments/4674-use-mh-raise.yaml +++ /dev/null @@ -1,6 +0,0 @@ -minor_changes: - - cpanm - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). - - pipx - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). - - snap - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). - - mksysb - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). - - xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). diff --git a/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml b/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml deleted file mode 100644 index 7549ee2eea..0000000000 --- a/changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). diff --git a/changelogs/fragments/4700-code-changes.yml b/changelogs/fragments/4700-code-changes.yml deleted file mode 100644 index d1b281d876..0000000000 --- a/changelogs/fragments/4700-code-changes.yml +++ /dev/null @@ -1,3 +0,0 @@ -bugfixes: - - "filesystem - improve error messages when output cannot be parsed by including newlines in escaped form (https://github.com/ansible-collections/community.general/pull/4700)." - - "filesystem - handle ``fatresize --info`` output lines without ``:`` (https://github.com/ansible-collections/community.general/pull/4700)." diff --git a/changelogs/fragments/4712-consul-bugfix.yaml b/changelogs/fragments/4712-consul-bugfix.yaml deleted file mode 100644 index bc63999b11..0000000000 --- a/changelogs/fragments/4712-consul-bugfix.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680). diff --git a/changelogs/fragments/4719-fix-keycloak-realm.yaml b/changelogs/fragments/4719-fix-keycloak-realm.yaml deleted file mode 100644 index 31c3f8c887..0000000000 --- a/changelogs/fragments/4719-fix-keycloak-realm.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241)." diff --git a/changelogs/fragments/4724-proxmox-qemu-extend.yaml b/changelogs/fragments/4724-proxmox-qemu-extend.yaml deleted file mode 100644 index 4b705bf9a9..0000000000 --- a/changelogs/fragments/4724-proxmox-qemu-extend.yaml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - proxmox inventory plugin - added new flag ``qemu_extended_statuses`` and new groups ``prelaunch``, ``paused``. They will be populated only when ``want_facts=true``, ``qemu_extended_statuses=true`` and only for ``QEMU`` machines - (https://github.com/ansible-collections/community.general/pull/4723). diff --git a/changelogs/fragments/4726-zfs.yml b/changelogs/fragments/4726-zfs.yml deleted file mode 100644 index c785e2ba11..0000000000 --- a/changelogs/fragments/4726-zfs.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, https://github.com/ansible-collections/community.general/pull/4726)." diff --git a/changelogs/fragments/4733-redis-fail.yml b/changelogs/fragments/4733-redis-fail.yml deleted file mode 100644 index f8a6e14d9a..0000000000 --- a/changelogs/fragments/4733-redis-fail.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "redis* modules - fix call to ``module.fail_json`` when failing because of missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733)." diff --git a/changelogs/fragments/4736-cmd-runner-skip-if-check.yml b/changelogs/fragments/4736-cmd-runner-skip-if-check.yml deleted file mode 100644 index 3c626b2feb..0000000000 --- a/changelogs/fragments/4736-cmd-runner-skip-if-check.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - cmd_runner module util - added parameters ``check_mode_skip`` and ``check_mode_return`` to ``CmdRunner.context()``, so that the command is not executed when ``check_mode=True`` (https://github.com/ansible-collections/community.general/pull/4736). diff --git a/changelogs/fragments/4740-puppet-feature.yaml b/changelogs/fragments/4740-puppet-feature.yaml deleted file mode 100644 index a4341f42b8..0000000000 --- a/changelogs/fragments/4740-puppet-feature.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- puppet - adds ``confdir`` parameter to configure a custom confir location (https://github.com/ansible-collections/community.general/pull/4740). diff --git a/changelogs/fragments/4746-add-vpn-support-nmcli.yaml b/changelogs/fragments/4746-add-vpn-support-nmcli.yaml deleted file mode 100644 index 5f5a1c847e..0000000000 --- a/changelogs/fragments/4746-add-vpn-support-nmcli.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - nmcli - adds ``vpn`` type and parameter for supporting VPN with service type L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). diff --git a/changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml b/changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml deleted file mode 100644 index b93d885ed4..0000000000 --- a/changelogs/fragments/4752-ansible-galaxy-install-mh-updates.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ansible_galaxy_install - minor refactoring using latest ``ModuleHelper`` updates (https://github.com/ansible-collections/community.general/pull/4752). diff --git a/changelogs/fragments/4755-mhexception-improvement.yml b/changelogs/fragments/4755-mhexception-improvement.yml deleted file mode 100644 index ebadb98bc5..0000000000 --- a/changelogs/fragments/4755-mhexception-improvement.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ModuleHelper module utils - improved ``ModuleHelperException``, using ``to_native()`` for the exception message (https://github.com/ansible-collections/community.general/pull/4755). diff --git a/changelogs/fragments/4776-xfconf-cmd-runner.yaml b/changelogs/fragments/4776-xfconf-cmd-runner.yaml deleted file mode 100644 index a45cf51c31..0000000000 --- a/changelogs/fragments/4776-xfconf-cmd-runner.yaml +++ /dev/null @@ -1,4 +0,0 @@ -minor_changes: - - xfconf module utils - created new module util ``xfconf`` providing a ``cmd_runner`` specific for ``xfconf`` modules (https://github.com/ansible-collections/community.general/pull/4776). - - xfconf - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). - - xfconf_info - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). diff --git a/changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml b/changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml deleted file mode 100644 index 6057cf38e8..0000000000 --- a/changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml +++ /dev/null @@ -1,2 +0,0 @@ -deprecated_features: - - cmd_runner module utils - deprecated ``fmt`` in favour of ``cmd_runner_fmt`` as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777). diff --git a/changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml b/changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml deleted file mode 100644 index 55d8869936..0000000000 --- a/changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml +++ /dev/null @@ -1,2 +0,0 @@ -deprecated_features: - - gconftool2 - deprecates ``state=get`` in favor of using the module ``gconftool2_info`` (https://github.com/ansible-collections/community.general/pull/4778). diff --git a/changelogs/fragments/4780-passwordstore-wrapper-compat.yml b/changelogs/fragments/4780-passwordstore-wrapper-compat.yml deleted file mode 100644 index ace74bcb3e..0000000000 --- a/changelogs/fragments/4780-passwordstore-wrapper-compat.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - passwordstore lookup plugin - allow using alternative password managers by detecting wrapper scripts, allow explicit configuration of pass and gopass backends (https://github.com/ansible-collections/community.general/issues/4766). diff --git a/changelogs/fragments/4791-cmd-runner-callable.yaml b/changelogs/fragments/4791-cmd-runner-callable.yaml deleted file mode 100644 index 142ad90f83..0000000000 --- a/changelogs/fragments/4791-cmd-runner-callable.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - cmd_runner module utils - add ``__call__`` method to invoke context (https://github.com/ansible-collections/community.general/pull/4791). diff --git a/changelogs/fragments/4794-sudoers-validation.yml b/changelogs/fragments/4794-sudoers-validation.yml deleted file mode 100644 index 32caacdc36..0000000000 --- a/changelogs/fragments/4794-sudoers-validation.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - sudoers - will attempt to validate the proposed sudoers rule using visudo if available, optionally skipped, or required (https://github.com/ansible-collections/community.general/pull/4794, https://github.com/ansible-collections/community.general/issues/4745). diff --git a/changelogs/fragments/4797-terraform-complex-variables.yml b/changelogs/fragments/4797-terraform-complex-variables.yml deleted file mode 100644 index f872210a4d..0000000000 --- a/changelogs/fragments/4797-terraform-complex-variables.yml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - terraform - adds capability to handle complex variable structures for ``variables`` parameter in the module. - This must be enabled with the new ``complex_vars`` parameter (https://github.com/ansible-collections/community.general/pull/4797). diff --git a/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml b/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml deleted file mode 100644 index 39a364d007..0000000000 --- a/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - redhat_subscription - fix unsubscribing on RHEL 9 (https://github.com/ansible-collections/community.general/issues/4741). diff --git a/changelogs/fragments/4810-alternatives-bug.yml b/changelogs/fragments/4810-alternatives-bug.yml deleted file mode 100644 index d4c1ea2742..0000000000 --- a/changelogs/fragments/4810-alternatives-bug.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "alternatives - do not set the priority if the priority was not set by the user (https://github.com/ansible-collections/community.general/pull/4810)." diff --git a/changelogs/fragments/4812-expose-unredirected-headers.yml b/changelogs/fragments/4812-expose-unredirected-headers.yml deleted file mode 100644 index c0bfe536b8..0000000000 --- a/changelogs/fragments/4812-expose-unredirected-headers.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - maven_artifact - add a new ``unredirected_headers`` option that can be used with ansible-core 2.12 and above. The default value is to not use ``Authorization`` and ``Cookie`` headers on redirects for security reasons. With ansible-core 2.11, all headers are still passed on for redirects (https://github.com/ansible-collections/community.general/pull/4812). diff --git a/changelogs/fragments/4813-fix-nmcli-convert-list.yaml b/changelogs/fragments/4813-fix-nmcli-convert-list.yaml deleted file mode 100644 index 5035a9e584..0000000000 --- a/changelogs/fragments/4813-fix-nmcli-convert-list.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - nmcli - fix error caused by adding undefined module arguments for list options (https://github.com/ansible-collections/community.general/issues/4373, https://github.com/ansible-collections/community.general/pull/4813). diff --git a/changelogs/fragments/4814-sudoers-file-permissions.yml b/changelogs/fragments/4814-sudoers-file-permissions.yml deleted file mode 100644 index be24e12e6e..0000000000 --- a/changelogs/fragments/4814-sudoers-file-permissions.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - sudoers - ensure sudoers config files are created with the permissions requested by sudoers (0440) (https://github.com/ansible-collections/community.general/pull/4814). diff --git a/changelogs/fragments/4816-proxmox-fix-extended-status.yaml b/changelogs/fragments/4816-proxmox-fix-extended-status.yaml deleted file mode 100644 index 496de40ab0..0000000000 --- a/changelogs/fragments/4816-proxmox-fix-extended-status.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - proxmox inventory plugin - fixed extended status detection for qemu (https://github.com/ansible-collections/community.general/pull/4816). diff --git a/changelogs/fragments/4836-alternatives.yml b/changelogs/fragments/4836-alternatives.yml deleted file mode 100644 index d627ddf1ad..0000000000 --- a/changelogs/fragments/4836-alternatives.yml +++ /dev/null @@ -1,3 +0,0 @@ -bugfixes: - - "alternatives - only pass subcommands when they are specified as module arguments (https://github.com/ansible-collections/community.general/issues/4803, https://github.com/ansible-collections/community.general/issues/4804, https://github.com/ansible-collections/community.general/pull/4836)." - - "alternatives - when ``subcommands`` is specified, ``link`` must be given for every subcommand. This was already mentioned in the documentation, but not enforced by the code (https://github.com/ansible-collections/community.general/pull/4836)." diff --git a/changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml b/changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml deleted file mode 100644 index cd0aeeeb5b..0000000000 --- a/changelogs/fragments/4839-fix-VirtualMediaInsert-Supermicro.yml +++ /dev/null @@ -1,8 +0,0 @@ -bugfixes: - - redfish_command - fix the check if a virtual media is unmounted to just check for ``instered= false`` - caused by Supermicro hardware that does not clear the ``ImageName`` - (https://github.com/ansible-collections/community.general/pull/4839). - - redfish_command - the Supermicro Redfish implementation only supports the ``image_url`` parameter in - the underlying API calls to ``VirtualMediaInsert`` and ``VirtualMediaEject``. Any values set - (or the defaults) for ``write_protected`` or ``inserted`` will be ignored - (https://github.com/ansible-collections/community.general/pull/4839). diff --git a/changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml b/changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml deleted file mode 100644 index db6a4ffd20..0000000000 --- a/changelogs/fragments/4849-add-password-prompt-support-for-machinectl.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - machinectl become plugin - can now be used with a password from another user than root, if a polkit rule is present (https://github.com/ansible-collections/community.general/pull/4849). diff --git a/changelogs/fragments/4852-sudoers-state-absent.yml b/changelogs/fragments/4852-sudoers-state-absent.yml deleted file mode 100644 index 013041a15f..0000000000 --- a/changelogs/fragments/4852-sudoers-state-absent.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "sudoers - fix incorrect handling of ``state: absent`` (https://github.com/ansible-collections/community.general/issues/4852)." diff --git a/changelogs/fragments/4886-fix-lxd-inventory-hostname.yml b/changelogs/fragments/4886-fix-lxd-inventory-hostname.yml deleted file mode 100644 index c4faa085eb..0000000000 --- a/changelogs/fragments/4886-fix-lxd-inventory-hostname.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "lxd connection plugin - fix incorrect ``inventory_hostname`` in ``remote_addr``. This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/issues/4886)." diff --git a/changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml b/changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml deleted file mode 100644 index 68c056c485..0000000000 --- a/changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - redfish_info - add ``GetManagerInventory`` to report list of Manager inventory information (https://github.com/ansible-collections/community.general/issues/4899). diff --git a/changelogs/fragments/4901-fix-redfish-chassispower.yml b/changelogs/fragments/4901-fix-redfish-chassispower.yml deleted file mode 100644 index 71a8b321eb..0000000000 --- a/changelogs/fragments/4901-fix-redfish-chassispower.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - redfish_info - fix to ``GetChassisPower`` to correctly report power information when multiple chassis exist, but not all chassis report power information (https://github.com/ansible-collections/community.general/issues/4901). diff --git a/changelogs/fragments/4903-cmdrunner-bugfix.yaml b/changelogs/fragments/4903-cmdrunner-bugfix.yaml deleted file mode 100644 index 6ed2ec9fa2..0000000000 --- a/changelogs/fragments/4903-cmdrunner-bugfix.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - cmd_runner module utils - fix bug caused by using the ``command`` variable instead of ``self.command`` when looking for binary path (https://github.com/ansible-collections/community.general/pull/4903). diff --git a/changelogs/fragments/4910-fix-for-agent-enabled.yml b/changelogs/fragments/4910-fix-for-agent-enabled.yml deleted file mode 100644 index 5ceb5a1e8f..0000000000 --- a/changelogs/fragments/4910-fix-for-agent-enabled.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - proxmox inventory plugin - fix crash when ``enabled=1`` is used in agent config string (https://github.com/ansible-collections/community.general/pull/4910). diff --git a/changelogs/fragments/4911-dsv-honor-tld-option.yml b/changelogs/fragments/4911-dsv-honor-tld-option.yml deleted file mode 100644 index 2831d7ea46..0000000000 --- a/changelogs/fragments/4911-dsv-honor-tld-option.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). diff --git a/changelogs/fragments/4916-opentelemetry-ini-options.yaml b/changelogs/fragments/4916-opentelemetry-ini-options.yaml deleted file mode 100644 index 5a20d7652a..0000000000 --- a/changelogs/fragments/4916-opentelemetry-ini-options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - opentelemetry callback plugin - allow configuring opentelementry callback via config file (https://github.com/ansible-collections/community.general/pull/4916). diff --git a/changelogs/fragments/4933-fix-rax-clb-nodes.yaml b/changelogs/fragments/4933-fix-rax-clb-nodes.yaml deleted file mode 100644 index 8d8c1f2e40..0000000000 --- a/changelogs/fragments/4933-fix-rax-clb-nodes.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - rax_clb_nodes - fix code to be compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/4933). diff --git a/changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml b/changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml deleted file mode 100644 index 1a563f6c93..0000000000 --- a/changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml +++ /dev/null @@ -1,3 +0,0 @@ -bugfixes: - - proxmox - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). - - proxmox_kvm - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). diff --git a/changelogs/fragments/4953-listen-ports-facts-extend-output.yaml b/changelogs/fragments/4953-listen-ports-facts-extend-output.yaml deleted file mode 100644 index c008b0f356..0000000000 --- a/changelogs/fragments/4953-listen-ports-facts-extend-output.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - listen_ports_facts - add new ``include_non_listening`` option which adds ``-a`` option to ``netstat`` and ``ss``. This shows both listening and non-listening (for TCP this means established connections) sockets, and returns ``state`` and ``foreign_address`` (https://github.com/ansible-collections/community.general/issues/4762, https://github.com/ansible-collections/community.general/pull/4953). diff --git a/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml b/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml deleted file mode 100644 index eddfa7397d..0000000000 --- a/changelogs/fragments/4955-fix-path-detection-for-gopass.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - passwordstore lookup plugin - fix password store path detection for gopass (https://github.com/ansible-collections/community.general/pull/4955). diff --git a/changelogs/fragments/4956-pacman-install-reason.yaml b/changelogs/fragments/4956-pacman-install-reason.yaml deleted file mode 100644 index e22c56e7bc..0000000000 --- a/changelogs/fragments/4956-pacman-install-reason.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - pacman - added parameters ``reason`` and ``reason_for`` to set/change the install reason of packages (https://github.com/ansible-collections/community.general/pull/4956). diff --git a/changelogs/fragments/4959-pacman-fix-url-packages-name.yaml b/changelogs/fragments/4959-pacman-fix-url-packages-name.yaml deleted file mode 100644 index 3d912c15d4..0000000000 --- a/changelogs/fragments/4959-pacman-fix-url-packages-name.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - pacman - fixed name resolution of URL packages (https://github.com/ansible-collections/community.general/pull/4959). diff --git a/changelogs/fragments/4964-fix-keyring-info.yml b/changelogs/fragments/4964-fix-keyring-info.yml deleted file mode 100644 index b10e8cc7cf..0000000000 --- a/changelogs/fragments/4964-fix-keyring-info.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "keyring_info - fix the result from the keyring library never getting returned (https://github.com/ansible-collections/community.general/pull/4964)." diff --git a/changelogs/fragments/4973-introduce-dig-lookup-argument.yaml b/changelogs/fragments/4973-introduce-dig-lookup-argument.yaml deleted file mode 100644 index 6dcaa26000..0000000000 --- a/changelogs/fragments/4973-introduce-dig-lookup-argument.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - dig lookup plugin - add option ``fail_on_error`` to allow stopping execution on lookup failures (https://github.com/ansible-collections/community.general/pull/4973). diff --git a/changelogs/fragments/4975-xfconf-use-do-raise.yaml b/changelogs/fragments/4975-xfconf-use-do-raise.yaml deleted file mode 100644 index 9334795321..0000000000 --- a/changelogs/fragments/4975-xfconf-use-do-raise.yaml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - xfconf - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). - - xfconf_info - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). diff --git a/changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml b/changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml deleted file mode 100644 index 74536ddcab..0000000000 --- a/changelogs/fragments/4976-apk-add-support-for-a-custom-world-file.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - apk - add ``world`` parameter for supporting a custom world file (https://github.com/ansible-collections/community.general/pull/4976). diff --git a/changelogs/fragments/4996-consul-session-ttl.yml b/changelogs/fragments/4996-consul-session-ttl.yml deleted file mode 100644 index 99b7c27e9e..0000000000 --- a/changelogs/fragments/4996-consul-session-ttl.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - consul - adds ``ttl`` parameter for session (https://github.com/ansible-collections/community.general/pull/4996). diff --git a/changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml b/changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml deleted file mode 100644 index 823b894982..0000000000 --- a/changelogs/fragments/4998-nmcli-fix-int-options-idempotence.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998). diff --git a/changelogs/fragments/4999-xfconf-bool.yml b/changelogs/fragments/4999-xfconf-bool.yml deleted file mode 100644 index 8fcf27144e..0000000000 --- a/changelogs/fragments/4999-xfconf-bool.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, https://github.com/ansible-collections/community.general/pull/5007)." diff --git a/changelogs/fragments/5008-addSetSessionService.yml b/changelogs/fragments/5008-addSetSessionService.yml deleted file mode 100644 index b2b124c48b..0000000000 --- a/changelogs/fragments/5008-addSetSessionService.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - redfish_config - add ``SetSessionService`` to set default session timeout policy (https://github.com/ansible-collections/community.general/issues/5008). diff --git a/changelogs/fragments/5019-slack-support-more-groups.yml b/changelogs/fragments/5019-slack-support-more-groups.yml deleted file mode 100644 index 99356af94e..0000000000 --- a/changelogs/fragments/5019-slack-support-more-groups.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). diff --git a/changelogs/fragments/5022-lastpass-lookup-cleanup.yml b/changelogs/fragments/5022-lastpass-lookup-cleanup.yml deleted file mode 100644 index e737318251..0000000000 --- a/changelogs/fragments/5022-lastpass-lookup-cleanup.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). diff --git a/changelogs/fragments/5023-http-agent-param-keycloak.yml b/changelogs/fragments/5023-http-agent-param-keycloak.yml deleted file mode 100644 index 121a310ae7..0000000000 --- a/changelogs/fragments/5023-http-agent-param-keycloak.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` (https://github.com/ansible-collections/community.general/issues/5023). diff --git a/changelogs/fragments/5027-fix-returnall-for-gopass.yaml b/changelogs/fragments/5027-fix-returnall-for-gopass.yaml deleted file mode 100644 index 766f87e91a..0000000000 --- a/changelogs/fragments/5027-fix-returnall-for-gopass.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - passwordstore lookup plugin - fix ``returnall`` for gopass (https://github.com/ansible-collections/community.general/pull/5027). diff --git a/changelogs/fragments/5035-mh-base-verbosity.yaml b/changelogs/fragments/5035-mh-base-verbosity.yaml deleted file mode 100644 index e6ea5a9198..0000000000 --- a/changelogs/fragments/5035-mh-base-verbosity.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ModuleHelper module utils - added property ``verbosity`` to base class (https://github.com/ansible-collections/community.general/pull/5035). diff --git a/changelogs/fragments/5037-xfconf-add-cmd-output.yaml b/changelogs/fragments/5037-xfconf-add-cmd-output.yaml deleted file mode 100644 index f32926c711..0000000000 --- a/changelogs/fragments/5037-xfconf-add-cmd-output.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - xfconf - add ``stdout``, ``stderr`` and ``cmd`` to the module results (https://github.com/ansible-collections/community.general/pull/5037). diff --git a/changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml b/changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml deleted file mode 100644 index 0a00b44e73..0000000000 --- a/changelogs/fragments/5059-wdc_redfish_command-indicator-leds.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - wdc_redfish_command - add ``IndicatorLedOn`` and ``IndicatorLedOff`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5059). diff --git a/changelogs/fragments/5085-pipx-use-cmd-runner.yaml b/changelogs/fragments/5085-pipx-use-cmd-runner.yaml deleted file mode 100644 index f4963e2bea..0000000000 --- a/changelogs/fragments/5085-pipx-use-cmd-runner.yaml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - pipx module utils - created new module util ``pipx`` providing a ``cmd_runner`` specific for the ``pipx`` module (https://github.com/ansible-collections/community.general/pull/5085). - - pipx - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/5085). diff --git a/changelogs/fragments/5100-pipx-req-if.yaml b/changelogs/fragments/5100-pipx-req-if.yaml deleted file mode 100644 index 8986503eb7..0000000000 --- a/changelogs/fragments/5100-pipx-req-if.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - pipx - module fails faster when ``name`` is missing for states ``upgrade`` and ``reinstall`` (https://github.com/ansible-collections/community.general/pull/5100). diff --git a/changelogs/fragments/5105-pipx-state-latest.yaml b/changelogs/fragments/5105-pipx-state-latest.yaml deleted file mode 100644 index 999e5c3748..0000000000 --- a/changelogs/fragments/5105-pipx-state-latest.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - pipx - added state ``latest`` to the module (https://github.com/ansible-collections/community.general/pull/5105). diff --git a/changelogs/fragments/5107-proxmox-agent-argument.yaml b/changelogs/fragments/5107-proxmox-agent-argument.yaml deleted file mode 100644 index 78e7927da1..0000000000 --- a/changelogs/fragments/5107-proxmox-agent-argument.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - proxmox_kvm - allow ``agent`` argument to be a string (https://github.com/ansible-collections/community.general/pull/5107). diff --git a/changelogs/fragments/5108-proxmox-node-name-condition.yml b/changelogs/fragments/5108-proxmox-node-name-condition.yml deleted file mode 100644 index e5d2aef89a..0000000000 --- a/changelogs/fragments/5108-proxmox-node-name-condition.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - proxmox_kvm - fix wrong condition (https://github.com/ansible-collections/community.general/pull/5108). diff --git a/changelogs/fragments/5111-fixes.yml b/changelogs/fragments/5111-fixes.yml deleted file mode 100644 index 88bde345cd..0000000000 --- a/changelogs/fragments/5111-fixes.yml +++ /dev/null @@ -1,7 +0,0 @@ -bugfixes: - - "funcd connection plugin - fix signature of ``exec_command`` (https://github.com/ansible-collections/community.general/pull/5111)." - - "packet_ip_subnet - fix error reporting in case of invalid CIDR prefix lengths (https://github.com/ansible-collections/community.general/pull/5111)." - - "dnsimple_info - correctly report missing library as ``requests`` and not ``another_library`` (https://github.com/ansible-collections/community.general/pull/5111)." - - "pip_package_info - remove usage of global variable (https://github.com/ansible-collections/community.general/pull/5111)." - - "manageiq_alert_profiles - avoid crash when reporting unknown profile caused by trying to return an undefined variable (https://github.com/ansible-collections/community.general/pull/5111)." - - "apache2_mod_proxy - avoid crash when reporting inability to parse balancer_member_page HTML caused by using an undefined variable in the error message (https://github.com/ansible-collections/community.general/pull/5111)." diff --git a/changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml b/changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml deleted file mode 100644 index c5f8653fd6..0000000000 --- a/changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - nsupdate - compatibility with NS records (https://github.com/ansible-collections/community.general/pull/5112). diff --git a/changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml b/changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml deleted file mode 100644 index 8aacacaed4..0000000000 --- a/changelogs/fragments/5124-compatibility-virtualmedia-resource-location.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - redfish - added new command GetVirtualMedia, VirtualMediaInsert and VirtualMediaEject to Systems category due to Redfish spec changes the virtualMedia resource location from Manager to System (https://github.com/ansible-collections/community.general/pull/5124). \ No newline at end of file diff --git a/changelogs/fragments/5126-nmcli-remove-diffs.yml b/changelogs/fragments/5126-nmcli-remove-diffs.yml deleted file mode 100644 index d857b146e8..0000000000 --- a/changelogs/fragments/5126-nmcli-remove-diffs.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "nmcli - avoid changed status for most cases with VPN connections (https://github.com/ansible-collections/community.general/pull/5126)." diff --git a/changelogs/fragments/5129-dig-boolean-params-fix.yml b/changelogs/fragments/5129-dig-boolean-params-fix.yml deleted file mode 100644 index 2e302f07b1..0000000000 --- a/changelogs/fragments/5129-dig-boolean-params-fix.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - dig lookup plugin - fix evaluation of falsy values for boolean parameters ``fail_on_error`` and ``retry_servfail`` (https://github.com/ansible-collections/community.general/pull/5129). diff --git a/changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml b/changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml deleted file mode 100644 index 738590c194..0000000000 --- a/changelogs/fragments/5145-wdc-redfish-enclosure-power-state.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - wdc_redfish_command - add ``PowerModeLow`` and ``PowerModeNormal`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5145). diff --git a/changelogs/fragments/5147-terraform-init-no-color.yml b/changelogs/fragments/5147-terraform-init-no-color.yml deleted file mode 100644 index 6f0e805ea3..0000000000 --- a/changelogs/fragments/5147-terraform-init-no-color.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - terraform - run ``terraform init`` with ``-no-color`` not to mess up the stdout of the task (https://github.com/ansible-collections/community.general/pull/5147). diff --git a/changelogs/fragments/5149-nmcli-bond-option.yml b/changelogs/fragments/5149-nmcli-bond-option.yml deleted file mode 100644 index 2d168f8544..0000000000 --- a/changelogs/fragments/5149-nmcli-bond-option.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - nmcli - add bond option ``xmit_hash_policy`` to bond options (https://github.com/ansible-collections/community.general/issues/5148). diff --git a/changelogs/fragments/5151-add-delinea-support-tss-lookup.yml b/changelogs/fragments/5151-add-delinea-support-tss-lookup.yml deleted file mode 100644 index 38d9c9e593..0000000000 --- a/changelogs/fragments/5151-add-delinea-support-tss-lookup.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - tss lookup plugin - adding support for updated Delinea library (https://github.com/DelineaXPM/python-tss-sdk/issues/9, https://github.com/ansible-collections/community.general/pull/5151). diff --git a/changelogs/fragments/5193-consul-session-token.yaml b/changelogs/fragments/5193-consul-session-token.yaml deleted file mode 100644 index f58ded12f0..0000000000 --- a/changelogs/fragments/5193-consul-session-token.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - consul_session - adds ``token`` parameter for session (https://github.com/ansible-collections/community.general/pull/5193). diff --git a/changelogs/fragments/5194-fix-proxmox-agent-exception.yaml b/changelogs/fragments/5194-fix-proxmox-agent-exception.yaml deleted file mode 100644 index 53a96ce89a..0000000000 --- a/changelogs/fragments/5194-fix-proxmox-agent-exception.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "proxmox_kvm - fix exception when no ``agent`` argument is specified (https://github.com/ansible-collections/community.general/pull/5194)." diff --git a/changelogs/fragments/5198-proxmox.yml b/changelogs/fragments/5198-proxmox.yml deleted file mode 100644 index b5d7c88094..0000000000 --- a/changelogs/fragments/5198-proxmox.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198)." diff --git a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml deleted file mode 100644 index 1553983144..0000000000 --- a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` clause had a wrong indentation. The check is now handled in the ``split_pid_name`` function (https://github.com/ansible-collections/community.general/pull/5202). \ No newline at end of file diff --git a/changelogs/fragments/5203-seport-add-local-argument.yaml b/changelogs/fragments/5203-seport-add-local-argument.yaml deleted file mode 100644 index 63ef32a7f4..0000000000 --- a/changelogs/fragments/5203-seport-add-local-argument.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - seport - added new argument ``local`` (https://github.com/ansible-collections/community.general/pull/5203) diff --git a/changelogs/fragments/5206-proxmox-conditional-vmid.yml b/changelogs/fragments/5206-proxmox-conditional-vmid.yml deleted file mode 100644 index b558d137c3..0000000000 --- a/changelogs/fragments/5206-proxmox-conditional-vmid.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - proxmox_kvm - replace new condition with proper condition to allow for using ``vmid`` on update (https://github.com/ansible-collections/community.general/pull/5206). diff --git a/changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml b/changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml deleted file mode 100644 index ec21dd22f9..0000000000 --- a/changelogs/fragments/5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - redfish_utils module utils - centralize payload checking when performing modification requests to a Redfish service (https://github.com/ansible-collections/community.general/issues/5210/). diff --git a/changelogs/fragments/5224-proxmox-unprivileged-default.yaml b/changelogs/fragments/5224-proxmox-unprivileged-default.yaml deleted file mode 100644 index d716ff285f..0000000000 --- a/changelogs/fragments/5224-proxmox-unprivileged-default.yaml +++ /dev/null @@ -1,2 +0,0 @@ -deprecated_features: - - proxmox - deprecated the current ``unprivileged`` default value, will be changed to ``true`` in community.general 7.0.0 (https://github.com/pull/5224). diff --git a/changelogs/fragments/5228-nmcli-ip-options.yaml b/changelogs/fragments/5228-nmcli-ip-options.yaml deleted file mode 100644 index 03901795d7..0000000000 --- a/changelogs/fragments/5228-nmcli-ip-options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228)." diff --git a/changelogs/fragments/5239-nagios-refactor.yaml b/changelogs/fragments/5239-nagios-refactor.yaml deleted file mode 100644 index 3f61642083..0000000000 --- a/changelogs/fragments/5239-nagios-refactor.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - nagios - minor refactoring on parameter validation for different actions (https://github.com/ansible-collections/community.general/pull/5239). diff --git a/changelogs/fragments/5240-unused-imports.yaml b/changelogs/fragments/5240-unused-imports.yaml deleted file mode 100644 index b615b0c6a3..0000000000 --- a/changelogs/fragments/5240-unused-imports.yaml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - ali_instance - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). - - ali_instance_info - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). diff --git a/changelogs/fragments/5241-homebrew-add-linux-path.yaml b/changelogs/fragments/5241-homebrew-add-linux-path.yaml deleted file mode 100644 index 3a954c6a4f..0000000000 --- a/changelogs/fragments/5241-homebrew-add-linux-path.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - homebrew, homebrew_tap - added Homebrew on Linux path to defaults (https://github.com/ansible-collections/community.general/pull/5241). diff --git a/changelogs/fragments/5243-osx-defaults-expand-user-flags.yml b/changelogs/fragments/5243-osx-defaults-expand-user-flags.yml deleted file mode 100644 index c7e17fb8ca..0000000000 --- a/changelogs/fragments/5243-osx-defaults-expand-user-flags.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - osx_defaults - no longer expand ``~`` in ``value`` to the user's home directory, or expand environment variables (https://github.com/ansible-collections/community.general/issues/5234, https://github.com/ansible-collections/community.general/pull/5243). \ No newline at end of file diff --git a/changelogs/fragments/5249-add-new-channel-prefix.yml b/changelogs/fragments/5249-add-new-channel-prefix.yml deleted file mode 100644 index 9740e3a186..0000000000 --- a/changelogs/fragments/5249-add-new-channel-prefix.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - slack - fix message update for channels which start with ``CP``. When ``message-id`` was passed it failed for channels which started with ``CP`` because the ``#`` symbol was added before the ``channel_id`` (https://github.com/ansible-collections/community.general/pull/5249). diff --git a/changelogs/fragments/5259-gitlab-imports.yaml b/changelogs/fragments/5259-gitlab-imports.yaml deleted file mode 100644 index b927036a17..0000000000 --- a/changelogs/fragments/5259-gitlab-imports.yaml +++ /dev/null @@ -1,14 +0,0 @@ -minor_changes: - - gitlab module util - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_deploy_key - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_group - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_group_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_group_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_hook - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_project - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_project_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_project_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_protected_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_runner - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_user - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). diff --git a/changelogs/fragments/5271-gitlab_hook-refactor.yaml b/changelogs/fragments/5271-gitlab_hook-refactor.yaml deleted file mode 100644 index c846e1b04f..0000000000 --- a/changelogs/fragments/5271-gitlab_hook-refactor.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - gitlab_hook - minor refactoring (https://github.com/ansible-collections/community.general/pull/5271). diff --git a/changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml b/changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml deleted file mode 100644 index 9e64e37663..0000000000 --- a/changelogs/fragments/5274-proxmox-snap-container-with-mountpoints.yml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - proxmox_snap - add ``unbind`` param to support snapshotting containers with configured mountpoints (https://github.com/ansible-collections/community.general/pull/5274). - - proxmox module utils, the proxmox* modules - add ``api_task_ok`` helper to standardize API task status checks across all proxmox modules (https://github.com/ansible-collections/community.general/pull/5274). diff --git a/changelogs/fragments/5280-lxc_container-py3.yaml b/changelogs/fragments/5280-lxc_container-py3.yaml deleted file mode 100644 index 0a37738122..0000000000 --- a/changelogs/fragments/5280-lxc_container-py3.yaml +++ /dev/null @@ -1,5 +0,0 @@ -bugfixes: - - lxc_container - the module has been updated to support Python 3 (https://github.com/ansible-collections/community.general/pull/5304). - -deprecated_features: - - lxc_container - the module will no longer make any effort to support Python 2 (https://github.com/ansible-collections/community.general/pull/5304). diff --git a/changelogs/fragments/5282-locale_gen.yaml b/changelogs/fragments/5282-locale_gen.yaml deleted file mode 100644 index 07cc13a72f..0000000000 --- a/changelogs/fragments/5282-locale_gen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "locale_gen - fix support for Ubuntu (https://github.com/ansible-collections/community.general/issues/5281)." diff --git a/changelogs/fragments/5287-machinectl-become-success.yml b/changelogs/fragments/5287-machinectl-become-success.yml deleted file mode 100644 index 3f71831e29..0000000000 --- a/changelogs/fragments/5287-machinectl-become-success.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - machinectl become plugin - combine the success command when building the become command to be consistent with other become plugins (https://github.com/ansible-collections/community.general/pull/5287). diff --git a/changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml b/changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml deleted file mode 100644 index b58db74bcf..0000000000 --- a/changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "nmcli - fix error when setting previously unset MAC address, ``gsm.apn`` or ``vpn.data``: current values were being normalized without checking if they might be ``None`` (https://github.com/ansible-collections/community.general/pull/5291)." diff --git a/changelogs/fragments/5297-bitwarden-add-search-field.yml b/changelogs/fragments/5297-bitwarden-add-search-field.yml deleted file mode 100644 index 9b5d147b02..0000000000 --- a/changelogs/fragments/5297-bitwarden-add-search-field.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - bitwarden lookup plugin - add option ``search`` to search for other attributes than name (https://github.com/ansible-collections/community.general/pull/5297). diff --git a/changelogs/fragments/5301-netcup_dnsapi-timeout.yml b/changelogs/fragments/5301-netcup_dnsapi-timeout.yml deleted file mode 100644 index e7afd5b283..0000000000 --- a/changelogs/fragments/5301-netcup_dnsapi-timeout.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - netcup_dnsapi - add ``timeout`` parameter (https://github.com/ansible-collections/community.general/pull/5301). diff --git a/changelogs/fragments/5306-add-options-for-authentication.yml b/changelogs/fragments/5306-add-options-for-authentication.yml deleted file mode 100644 index ba179a72b7..0000000000 --- a/changelogs/fragments/5306-add-options-for-authentication.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306). \ No newline at end of file diff --git a/changelogs/fragments/5307-ini_file-lint.yaml b/changelogs/fragments/5307-ini_file-lint.yaml deleted file mode 100644 index a1eb642356..0000000000 --- a/changelogs/fragments/5307-ini_file-lint.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - ini_file - minor refactor fixing a python lint error (https://github.com/ansible-collections/community.general/pull/5307). diff --git a/changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml b/changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml deleted file mode 100644 index 1432dd95bd..0000000000 --- a/changelogs/fragments/5313-fix-redhat_subscription-idempotency-pool_ids.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - redhat_subscription - make module idempotent when ``pool_ids`` are used (https://github.com/ansible-collections/community.general/issues/5313). diff --git a/changelogs/fragments/5341-newrelic-v2-api-changes.yml b/changelogs/fragments/5341-newrelic-v2-api-changes.yml deleted file mode 100644 index af47cc8cf3..0000000000 --- a/changelogs/fragments/5341-newrelic-v2-api-changes.yml +++ /dev/null @@ -1,6 +0,0 @@ -major_changes: - - newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341). -breaking_changes: - - newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341). -deprecated_features: - - newrelic_deployment - ``appname`` and ``environment`` are no longer valid options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341). diff --git a/changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml b/changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml deleted file mode 100644 index e5fa7958ac..0000000000 --- a/changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342). diff --git a/changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml b/changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml deleted file mode 100644 index f8084d6345..0000000000 --- a/changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - virtualbox inventory plugin - skip parsing values with keys that have both a value and nested data. Skip parsing values that are nested more than two keys deep (https://github.com/ansible-collections/community.general/issues/5332, https://github.com/ansible-collections/community.general/pull/5348). diff --git a/changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml b/changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml deleted file mode 100644 index bc2d79e7eb..0000000000 --- a/changelogs/fragments/5349-drop-gentoolkit-more-knobs.yml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - portage - use Portage's python module instead of calling gentoolkit-provided program in shell (https://github.com/ansible-collections/community.general/pull/5349). - - portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options (https://github.com/ansible-collections/community.general/pull/5349). diff --git a/changelogs/fragments/5358-lxc-container-refactor.yml b/changelogs/fragments/5358-lxc-container-refactor.yml deleted file mode 100644 index 46beee907d..0000000000 --- a/changelogs/fragments/5358-lxc-container-refactor.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358). diff --git a/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml b/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml deleted file mode 100644 index 370d124663..0000000000 --- a/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361)." diff --git a/changelogs/fragments/5367-consul-refactor.yaml b/changelogs/fragments/5367-consul-refactor.yaml deleted file mode 100644 index 2012d69cc5..0000000000 --- a/changelogs/fragments/5367-consul-refactor.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367). diff --git a/changelogs/fragments/5369-pkgng-fix-update-all.yaml b/changelogs/fragments/5369-pkgng-fix-update-all.yaml deleted file mode 100644 index 783d461a9e..0000000000 --- a/changelogs/fragments/5369-pkgng-fix-update-all.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363). diff --git a/changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml b/changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml deleted file mode 100644 index 4c4273358a..0000000000 --- a/changelogs/fragments/5370-mh-cmdmixin-deprecation.yaml +++ /dev/null @@ -1,5 +0,0 @@ -deprecated_features: - - CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). - - CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). - - CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). - - ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt`` module util (https://github.com/ansible-collections/community.general/pull/5370). diff --git a/changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml b/changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml deleted file mode 100644 index c414ddc4bf..0000000000 --- a/changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed DNS zones (https://github.com/ansible-collections/community.general/issues/4657). diff --git a/changelogs/fragments/5383-xenserver_facts.yml b/changelogs/fragments/5383-xenserver_facts.yml deleted file mode 100644 index 2fee2c8751..0000000000 --- a/changelogs/fragments/5383-xenserver_facts.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module from working at all (https://github.com/ansible-collections/community.general/pull/5383)." diff --git a/changelogs/fragments/5385-search_s-based-_is_value_present.yaml b/changelogs/fragments/5385-search_s-based-_is_value_present.yaml deleted file mode 100644 index a3a3ba047c..0000000000 --- a/changelogs/fragments/5385-search_s-based-_is_value_present.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute values (https://github.com/ansible-collections/community.general/issues/977, https://github.com/ansible-collections/community.general/pull/5385). diff --git a/changelogs/fragments/5393-archive.yml b/changelogs/fragments/5393-archive.yml deleted file mode 100644 index a589c935ec..0000000000 --- a/changelogs/fragments/5393-archive.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz`` (https://github.com/ansible-collections/community.general/pull/5393)." diff --git a/changelogs/fragments/5400-django-manage-deprecations.yml b/changelogs/fragments/5400-django-manage-deprecations.yml deleted file mode 100644 index c2d7639da6..0000000000 --- a/changelogs/fragments/5400-django-manage-deprecations.yml +++ /dev/null @@ -1,3 +0,0 @@ -deprecated_features: - - django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate`` that have been deprecated in Django long time ago will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). - - django_manage - support for Django releases older than 4.1 has been deprecated and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). diff --git a/changelogs/fragments/5404-django-manage-venv-deprecation.yml b/changelogs/fragments/5404-django-manage-venv-deprecation.yml deleted file mode 100644 index f6a8e6e01e..0000000000 --- a/changelogs/fragments/5404-django-manage-venv-deprecation.yml +++ /dev/null @@ -1,5 +0,0 @@ -deprecated_features: - - >- - django_manage - the behavior of "creating the virtual environment when missing" - is being deprecated and will be removed in community.general version 9.0.0 - (https://github.com/ansible-collections/community.general/pull/5405). diff --git a/changelogs/fragments/5436-passwordstore-errors.yml b/changelogs/fragments/5436-passwordstore-errors.yml deleted file mode 100644 index 86c9e06b36..0000000000 --- a/changelogs/fragments/5436-passwordstore-errors.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436) diff --git a/changelogs/fragments/5437-proxmox.yml b/changelogs/fragments/5437-proxmox.yml deleted file mode 100644 index 072c9d97b2..0000000000 --- a/changelogs/fragments/5437-proxmox.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "proxmox inventory plugin - simplify option handling code (https://github.com/ansible-collections/community.general/pull/5437)." diff --git a/changelogs/fragments/5438-linode.yml b/changelogs/fragments/5438-linode.yml deleted file mode 100644 index ce2aeadcf3..0000000000 --- a/changelogs/fragments/5438-linode.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "linode inventory plugin - simplify option handling (https://github.com/ansible-collections/community.general/pull/5438)." diff --git a/changelogs/fragments/5439-dig-return-empty-result.yml b/changelogs/fragments/5439-dig-return-empty-result.yml deleted file mode 100644 index 8d7d2090df..0000000000 --- a/changelogs/fragments/5439-dig-return-empty-result.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - dig lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5439, https://github.com/ansible-collections/community.general/issues/5428). diff --git a/changelogs/fragments/5444-passwordstore-options.yml b/changelogs/fragments/5444-passwordstore-options.yml deleted file mode 100644 index a25c9a2fef..0000000000 --- a/changelogs/fragments/5444-passwordstore-options.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "passwordstore lookup plugin - allow options to be passed lookup options instead of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444)." diff --git a/changelogs/fragments/5457-dnstxt-empty.yml b/changelogs/fragments/5457-dnstxt-empty.yml deleted file mode 100644 index db4b87bca4..0000000000 --- a/changelogs/fragments/5457-dnstxt-empty.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - dnstxt lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5457, https://github.com/ansible-collections/community.general/issues/5428). diff --git a/changelogs/fragments/6.0.0-a1.yml b/changelogs/fragments/6.0.0-a1.yml deleted file mode 100644 index e4f19ef577..0000000000 --- a/changelogs/fragments/6.0.0-a1.yml +++ /dev/null @@ -1,4 +0,0 @@ -release_summary: >- - This is a pre-release for the upcoming 6.0.0 major release. The main objective of this - pre-release is to make it possible to test the large stuctural changes by flattening - the directory structure. See the corresponding entry in the changelog for details. diff --git a/changelogs/fragments/deprecation-removals.yml b/changelogs/fragments/deprecation-removals.yml deleted file mode 100644 index a7744bbc40..0000000000 --- a/changelogs/fragments/deprecation-removals.yml +++ /dev/null @@ -1,11 +0,0 @@ -removed_features: - - "mail callback plugin - the ``sender`` option is now required (https://github.com/ansible-collections/community.general/pull/5326)." - - "proxmox inventory plugin - the default of the ``want_proxmox_nodes_ansible_host`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326)." - - "bitbucket* modules - ``username`` is no longer an alias of ``workspace``, but of ``user`` (https://github.com/ansible-collections/community.general/pull/5326)." - - "keycloak_group - the return value ``group`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326)." - - "keycloak_authentication - the return value ``flow`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326)." - - "vmadm - the ``debug`` option has been removed. It was not used anyway (https://github.com/ansible-collections/community.general/pull/5326)." - - "lxd_container - the default of the ``ignore_volatile_options`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326)." - - "gitlab_group_members - ``gitlab_group`` must now always contain the full path, and no longer just the name or path (https://github.com/ansible-collections/community.general/pull/5326)." - - "gem - the default of the ``norc`` option changed from ``false`` to ``true`` (https://github.com/ansible-collections/community.general/pull/5326)." - - "module_helper module utils - remove the ``VarDict`` attribute from ``ModuleHelper``. Import ``VarDict`` from ``ansible_collections.community.general.plugins.module_utils.mh.mixins.vars`` instead (https://github.com/ansible-collections/community.general/pull/5326)." diff --git a/changelogs/fragments/licenses-2.yml b/changelogs/fragments/licenses-2.yml deleted file mode 100644 index 1515dabfc5..0000000000 --- a/changelogs/fragments/licenses-2.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "The collection repository conforms to the `REUSE specification `__ except for the changelog fragments (https://github.com/ansible-collections/community.general/pull/5138)." diff --git a/changelogs/fragments/licenses.yml b/changelogs/fragments/licenses.yml deleted file mode 100644 index 8ab3dbe42e..0000000000 --- a/changelogs/fragments/licenses.yml +++ /dev/null @@ -1,3 +0,0 @@ -minor_changes: - - "All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098, https://github.com/ansible-collections/community.general/pull/5106)." - - "Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065)." diff --git a/changelogs/fragments/lookup-options.yml b/changelogs/fragments/lookup-options.yml deleted file mode 100644 index 1fb406a383..0000000000 --- a/changelogs/fragments/lookup-options.yml +++ /dev/null @@ -1,14 +0,0 @@ -minor_changes: - - "cartesian lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "credstash lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "dependent lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "dig lookup plugin - start using Ansible's configuration manager to parse options. All documented options can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440)." - - "dnstxt lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "filetree lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "flattened lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "hiera lookup plugin - start using Ansible's configuration manager to parse options. The Hiera executable and config file can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440)." - - "keyring lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "lmdb_kv lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." - - "manifold lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440)." -bugfixes: - - "credstash lookup plugin - pass plugin options to credstash for all terms, not just for the first (https://github.com/ansible-collections/community.general/pull/5440)." diff --git a/changelogs/fragments/psf-license.yml b/changelogs/fragments/psf-license.yml deleted file mode 100644 index 6e0cf7ad7a..0000000000 --- a/changelogs/fragments/psf-license.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - "Include ``PSF-license.txt`` file for ``plugins/module_utils/_mount.py``." diff --git a/changelogs/fragments/simplified-bsd-license.yml b/changelogs/fragments/simplified-bsd-license.yml deleted file mode 100644 index 86fe37f4ff..0000000000 --- a/changelogs/fragments/simplified-bsd-license.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - Include ``simplified_bsd.txt`` license file for various module utils, the ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests. diff --git a/changelogs/fragments/unflatmap.yml b/changelogs/fragments/unflatmap.yml deleted file mode 100644 index a75ff2f31f..0000000000 --- a/changelogs/fragments/unflatmap.yml +++ /dev/null @@ -1,8 +0,0 @@ -major_changes: - - "The internal structure of the collection was changed for modules and action plugins. - These no longer live in a directory hierarchy ordered by topic, but instead are now all in a single (flat) directory. - This has no impact on users *assuming they did not use internal FQCNs*. These will still work, but result in deprecation warnings. - They were never officially supported and thus the redirects are kept as a courtsey, and this is not labelled as a breaking change. - Note that for example the Ansible VScode plugin started recommending these internal names. If you followed its recommendation, - you will now have to change back to the short names to avoid deprecation warnings, and potential errors in the future as - these redirects will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5461)." From 524fdf234bcf34874b70b40fa2f787f72d0d8c98 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 22:30:02 +0100 Subject: [PATCH 0295/2104] The next expected release is 6.0.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index b77ecfa020..0a3fe09b6e 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.0.0-a1 +version: 6.0.0 readme: README.md authors: - Ansible (https://github.com/ansible) From c181f2dd08ed7711cbac620b868ec3f1ec7584e0 Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Thu, 3 Nov 2022 06:45:37 +0100 Subject: [PATCH 0296/2104] [Scaleway] Fix function namespace integration tests assertions (#5464) Signed-off-by: Lunik Signed-off-by: Lunik --- .../targets/scaleway_function_namespace/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/targets/scaleway_function_namespace/tasks/main.yml b/tests/integration/targets/scaleway_function_namespace/tasks/main.yml index e760a4c7fa..78b7c95757 100644 --- a/tests/integration/targets/scaleway_function_namespace/tasks/main.yml +++ b/tests/integration/targets/scaleway_function_namespace/tasks/main.yml @@ -145,7 +145,7 @@ name: '{{ name }}' region: '{{ scaleway_region }}' project_id: '{{ scw_project }}' - description: '{{ description }}' + description: '{{ updated_description }}' environment_variables: '{{ environment_variables }}' secret_environment_variables: '{{ updated_secret_environment_variables }}' register: fn_update_secret_check_task @@ -165,7 +165,7 @@ name: '{{ name }}' region: '{{ scaleway_region }}' project_id: '{{ scw_project }}' - description: '{{ description }}' + description: '{{ updated_description }}' environment_variables: '{{ environment_variables }}' secret_environment_variables: '{{ updated_secret_environment_variables }}' register: fn_update_secret_task @@ -179,7 +179,7 @@ - fn_update_secret_task is success - fn_update_secret_task is changed - fn_update_secret_task.function_namespace.status == "ready" - - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + - "'hashed_value' in fn_update_secret_task.function_namespace.secret_environment_variables[0]" - name: Update function namespace secret variables (Confirmation) community.general.scaleway_function_namespace: @@ -187,7 +187,7 @@ name: '{{ name }}' region: '{{ scaleway_region }}' project_id: '{{ scw_project }}' - description: '{{ description }}' + description: '{{ updated_description }}' environment_variables: '{{ environment_variables }}' secret_environment_variables: '{{ updated_secret_environment_variables }}' register: fn_update_secret_confirmation_task @@ -201,7 +201,7 @@ - fn_update_secret_confirmation_task is success - fn_update_secret_confirmation_task is not changed - fn_update_secret_confirmation_task.function_namespace.status == "ready" - - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" + - "'hashed_value' in fn_update_secret_confirmation_task.function_namespace.secret_environment_variables[0]" - name: Delete function namespace (Check) check_mode: yes From 1a97ca1a6f77cabca78d18bfd8a9f46939f11f8a Mon Sep 17 00:00:00 2001 From: Reto Kupferschmid Date: Fri, 4 Nov 2022 07:07:06 +0100 Subject: [PATCH 0297/2104] ldap_attrs: escape ldap search filter (#5435) * escape ldap search filter * move escape to separate line * add changelog fragment * Update changelogs/fragments/5435-escape-ldap-param.yml Co-authored-by: Felix Fontein * fix encoding * fixup! fix encoding Co-authored-by: Felix Fontein --- changelogs/fragments/5435-escape-ldap-param.yml | 2 ++ plugins/modules/ldap_attrs.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5435-escape-ldap-param.yml diff --git a/changelogs/fragments/5435-escape-ldap-param.yml b/changelogs/fragments/5435-escape-ldap-param.yml new file mode 100644 index 0000000000..3f22f61759 --- /dev/null +++ b/changelogs/fragments/5435-escape-ldap-param.yml @@ -0,0 +1,2 @@ +bugfixes: + - ldap_attrs - fix bug which caused a ``Bad search filter`` error. The error was occuring when the ldap attribute value contained special characters such as ``(`` or ``*`` (https://github.com/ansible-collections/community.general/issues/5434, https://github.com/ansible-collections/community.general/pull/5435). diff --git a/plugins/modules/ldap_attrs.py b/plugins/modules/ldap_attrs.py index 97275c45d5..61ae291956 100644 --- a/plugins/modules/ldap_attrs.py +++ b/plugins/modules/ldap_attrs.py @@ -168,7 +168,7 @@ modlist: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils.common.text.converters import to_native, to_bytes +from ansible.module_utils.common.text.converters import to_native, to_bytes, to_text from ansible_collections.community.general.plugins.module_utils.ldap import LdapGeneric, gen_specs import re @@ -176,6 +176,7 @@ import re LDAP_IMP_ERR = None try: import ldap + import ldap.filter HAS_LDAP = True except ImportError: @@ -264,7 +265,8 @@ class LdapAttrs(LdapGeneric): def _is_value_present(self, name, value): """ True if the target attribute has the given value. """ try: - filterstr = "(%s=%s)" % (name, value.decode()) + escaped_value = ldap.filter.escape_filter_chars(to_text(value)) + filterstr = "(%s=%s)" % (name, escaped_value) dns = self.connection.search_s(self.dn, ldap.SCOPE_BASE, filterstr) is_present = len(dns) == 1 except ldap.NO_SUCH_OBJECT: From 8dc82b18900619977f3f873fafaa0d940aad7039 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 5 Nov 2022 23:35:39 +1300 Subject: [PATCH 0298/2104] sorted content of sanity/ignore-*.txt files (#5473) --- tests/sanity/ignore-2.11.txt | 38 +++++++++++++++++----------------- tests/sanity/ignore-2.12.txt | 36 ++++++++++++++++---------------- tests/sanity/ignore-2.13.txt | 36 ++++++++++++++++---------------- tests/sanity/ignore-2.14.txt | 40 ++++++++++++++++++------------------ tests/sanity/ignore-2.15.txt | 40 ++++++++++++++++++------------------ 5 files changed, 95 insertions(+), 95 deletions(-) diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 7c555b4722..603981df04 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -1,41 +1,41 @@ -.azure-pipelines/scripts/publish-codecov.py replace-urlopen .azure-pipelines/scripts/publish-codecov.py compile-2.6!skip # Uses Python 3.6+ syntax .azure-pipelines/scripts/publish-codecov.py compile-2.7!skip # Uses Python 3.6+ syntax .azure-pipelines/scripts/publish-codecov.py compile-3.5!skip # Uses Python 3.6+ syntax .azure-pipelines/scripts/publish-codecov.py future-import-boilerplate .azure-pipelines/scripts/publish-codecov.py metaclass-boilerplate -plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements +.azure-pipelines/scripts/publish-codecov.py replace-urlopen plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/yarn.py use-argspec-type-path -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py use-argspec-type-path plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/yarn.py use-argspec-type-path tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.7 # django generated code diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 53d2d47bd4..778f25ae53 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -1,34 +1,34 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/yarn.py use-argspec-type-path -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py use-argspec-type-path plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 53d2d47bd4..778f25ae53 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -1,34 +1,34 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/yarn.py use-argspec-type-path -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py use-argspec-type-path plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 9d9d74bcb4..20f87d1af2 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -1,36 +1,36 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/yarn.py use-argspec-type-path -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py use-argspec-type-path plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 9d9d74bcb4..20f87d1af2 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -1,36 +1,36 @@ .azure-pipelines/scripts/publish-codecov.py replace-urlopen -plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants -plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/yarn.py use-argspec-type-path -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/iptables_state.py validate-modules:undocumented-parameter +plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen +plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice -plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py use-argspec-type-path plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/rax_files_objects.py use-argspec-type-path +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice +plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values +plugins/modules/redhat_subscription.py validate-modules:return-syntax-error +plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice +plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements +plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path +plugins/modules/udm_share.py validate-modules:parameter-list-no-elements +plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' +plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/jenkins_plugin.py use-argspec-type-path +plugins/modules/yarn.py use-argspec-type-path From ee39fd5c90ea07980bd9f9cc50d6be9da7ab82a4 Mon Sep 17 00:00:00 2001 From: Martin Date: Sat, 5 Nov 2022 12:43:28 +0100 Subject: [PATCH 0299/2104] Allow for DN's to have {x} prefix on first RDN (#5450) * Allow for DN's to have {x} prefix on first RDN * Update changelogs/fragments/5450-allow-for-xordered-dns.yaml Co-authored-by: Felix Fontein * Assign attrs to throw-away var * Update plugins/module_utils/ldap.py Co-authored-by: Felix Fontein * Escape DN before creating filter Co-authored-by: Felix Fontein --- .../5450-allow-for-xordered-dns.yaml | 2 ++ plugins/module_utils/ldap.py | 24 ++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5450-allow-for-xordered-dns.yaml diff --git a/changelogs/fragments/5450-allow-for-xordered-dns.yaml b/changelogs/fragments/5450-allow-for-xordered-dns.yaml new file mode 100644 index 0000000000..1bb1d9c761 --- /dev/null +++ b/changelogs/fragments/5450-allow-for-xordered-dns.yaml @@ -0,0 +1,2 @@ +minor_changes: + - ldap_attrs - allow for DNs to have ``{x}`` prefix on first RDN (https://github.com/ansible-collections/community.general/issues/977, https://github.com/ansible-collections/community.general/pull/5450). diff --git a/plugins/module_utils/ldap.py b/plugins/module_utils/ldap.py index daf89f16d1..03acaa58c5 100644 --- a/plugins/module_utils/ldap.py +++ b/plugins/module_utils/ldap.py @@ -15,6 +15,8 @@ from ansible.module_utils.common.text.converters import to_native try: import ldap + import ldap.dn + import ldap.filter import ldap.sasl HAS_LDAP = True @@ -48,7 +50,6 @@ class LdapGeneric(object): self.module = module self.bind_dn = self.module.params['bind_dn'] self.bind_pw = self.module.params['bind_pw'] - self.dn = self.module.params['dn'] self.referrals_chasing = self.module.params['referrals_chasing'] self.server_uri = self.module.params['server_uri'] self.start_tls = self.module.params['start_tls'] @@ -58,6 +59,9 @@ class LdapGeneric(object): # Establish connection self.connection = self._connect_to_ldap() + # Try to find the X_ORDERed version of the DN + self.dn = self._find_dn() + def fail(self, msg, exn): self.module.fail_json( msg=msg, @@ -65,6 +69,24 @@ class LdapGeneric(object): exception=traceback.format_exc() ) + def _find_dn(self): + dn = self.module.params['dn'] + + explode_dn = ldap.dn.explode_dn(dn) + + if len(explode_dn) > 1: + try: + escaped_value = ldap.filter.escape_filter_chars(explode_dn[0]) + filterstr = "(%s)" % escaped_value + dns = self.connection.search_s(','.join(explode_dn[1:]), + ldap.SCOPE_ONELEVEL, filterstr) + if len(dns) == 1: + dn, dummy = dns[0] + except Exception: + pass + + return dn + def _connect_to_ldap(self): if not self.verify_cert: ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER) From db7e5f12f5065a9da850dd9a785b2e30910fced2 Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Sat, 5 Nov 2022 21:43:47 +0100 Subject: [PATCH 0300/2104] [Scaleway] Add module to manage functions (#5463) * [Scaleway] Add module to manage function Signed-off-by: Lunik * fix integration tests assertions Signed-off-by: Lunik * Update plugins/modules/scaleway_function.py Co-authored-by: Felix Fontein Signed-off-by: Lunik Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 4 + plugins/modules/scaleway_function.py | 387 ++++++++++++++++++ plugins/modules/scaleway_function_info.py | 153 +++++++ .../targets/scaleway_function/aliases | 6 + .../scaleway_function/defaults/main.yml | 17 + .../targets/scaleway_function/tasks/main.yml | 284 +++++++++++++ .../targets/scaleway_function_info/aliases | 6 + .../scaleway_function_info/defaults/main.yml | 15 + .../scaleway_function_info/tasks/main.yml | 62 +++ 9 files changed, 934 insertions(+) create mode 100644 plugins/modules/scaleway_function.py create mode 100644 plugins/modules/scaleway_function_info.py create mode 100644 tests/integration/targets/scaleway_function/aliases create mode 100644 tests/integration/targets/scaleway_function/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_function/tasks/main.yml create mode 100644 tests/integration/targets/scaleway_function_info/aliases create mode 100644 tests/integration/targets/scaleway_function_info/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_function_info/tasks/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 559689d6fe..2ba562440b 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -472,6 +472,10 @@ files: maintainers: Lunik $modules/scaleway_function_namespace_info.py: maintainers: Lunik + $modules/scaleway_function.py: + maintainers: Lunik + $modules/scaleway_function_info.py: + maintainers: Lunik $modules/scaleway_image_info.py: maintainers: Spredzy $modules/scaleway_ip_info.py: diff --git a/plugins/modules/scaleway_function.py b/plugins/modules/scaleway_function.py new file mode 100644 index 0000000000..b54091c6ab --- /dev/null +++ b/plugins/modules/scaleway_function.py @@ -0,0 +1,387 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless function management module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_function +short_description: Scaleway Function management +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module manages function on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + - community.general.scaleway_waitable_resource +requirements: + - passlib[argon2] >= 1.7.4 + +options: + state: + type: str + description: + - Indicate desired state of the function. + default: present + choices: + - present + - absent + + namespace_id: + type: str + description: + - Function namespace identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the function. + required: true + + description: + description: + - Description of the function. + type: str + default: '' + + min_scale: + description: + - Minimum number of replicas for the function. + type: int + + max_scale: + description: + - Maximum number of replicas for the function. + type: int + + environment_variables: + description: + - Environment variables of the function. + - Injected in function at runtime. + type: dict + default: {} + + secret_environment_variables: + description: + - Secret environment variables of the function. + - Updating thoses values will not output a C(changed) state in Ansible. + - Injected in function at runtime. + type: dict + default: {} + + runtime: + description: + - Runtime of the function + - See U(https://www.scaleway.com/en/docs/compute/functions/reference-content/functions-lifecycle/) for all available runtimes + type: str + required: true + + memory_limit: + description: + - Resources define performance characteristics of your function. + - They are allocated to your function at runtime. + type: int + + function_timeout: + description: + - The length of time your handler can spend processing a request before being stopped. + type: str + + handler: + description: + - The C(module-name.export) value in your function. + type: str + + privacy: + description: + - Privacy policies define whether a function can be executed anonymously. + - Choose C(public) to enable anonymous execution, or C(private) to protect your function with an authentication mechanism provided by the Scaleway API. + type: str + default: public + choices: + - public + - private + + redeploy: + description: + - Redeploy the function if update is required. + type: bool + default: false +''' + +EXAMPLES = ''' +- name: Create a function + community.general.scaleway_function: + namespace_id: '{{ scw_function_namespace }}' + region: fr-par + state: present + name: my-awesome-function + runtime: python3 + environment_variables: + MY_VAR: my_value + secret_environment_variables: + MY_SECRET_VAR: my_secret_value + register: function_creation_task + +- name: Make sure function is deleted + community.general.scaleway_function: + namespace_id: '{{ scw_function_namespace }}' + region: fr-par + state: absent + name: my-awesome-function +''' + +RETURN = ''' +function: + description: The function information. + returned: when I(state=present) + type: dict + sample: + cpu_limit: 140 + description: Function used for testing scaleway_function ansible module + domain_name: fnansibletestfxamabuc-fn-ansible-test.functions.fnc.fr-par.scw.cloud + environment_variables: + MY_VAR: my_value + error_message: null + handler: handler.handle + http_option: "" + id: ceb64dc4-4464-4196-8e20-ecef705475d3 + max_scale: 5 + memory_limit: 256 + min_scale: 0 + name: fn-ansible-test + namespace_id: 82737d8d-0ebb-4d89-b0ad-625876eca50d + privacy: public + region: fr-par + runtime: python310 + runtime_message: "" + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg + status: created + timeout: 300s +''' + +from copy import deepcopy + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed, + SecretVariables +) +from ansible.module_utils.basic import AnsibleModule + +STABLE_STATES = ( + "ready", + "created", + "absent" +) + +VERIFIABLE_MUTABLE_ATTRIBUTES = ( + "description", + "min_scale", + "max_scale", + "environment_variables", + "runtime", + "memory_limit", + "timeout", + "handler", + "privacy", + "secret_environment_variables" +) + +MUTABLE_ATTRIBUTES = VERIFIABLE_MUTABLE_ATTRIBUTES + ( + "redeploy", +) + + +def payload_from_wished_fn(wished_fn): + payload = { + "namespace_id": wished_fn["namespace_id"], + "name": wished_fn["name"], + "description": wished_fn["description"], + "min_scale": wished_fn["min_scale"], + "max_scale": wished_fn["max_scale"], + "runtime": wished_fn["runtime"], + "memory_limit": wished_fn["memory_limit"], + "timeout": wished_fn["timeout"], + "handler": wished_fn["handler"], + "privacy": wished_fn["privacy"], + "redeploy": wished_fn["redeploy"], + "environment_variables": wished_fn["environment_variables"], + "secret_environment_variables": SecretVariables.dict_to_list(wished_fn["secret_environment_variables"]) + } + + return payload + + +def absent_strategy(api, wished_fn): + changed = False + + fn_list = api.fetch_all_resources("functions") + fn_lookup = dict((fn["name"], fn) + for fn in fn_list) + + if wished_fn["name"] not in fn_lookup: + return changed, {} + + target_fn = fn_lookup[wished_fn["name"]] + changed = True + if api.module.check_mode: + return changed, {"status": "Function would be destroyed"} + + api.wait_to_complete_state_transition(resource=target_fn, stable_states=STABLE_STATES, force_wait=True) + response = api.delete(path=api.api_path + "/%s" % target_fn["id"]) + if not response.ok: + api.module.fail_json(msg='Error deleting function [{0}: {1}]'.format( + response.status_code, response.json)) + + api.wait_to_complete_state_transition(resource=target_fn, stable_states=STABLE_STATES) + return changed, response.json + + +def present_strategy(api, wished_fn): + changed = False + + fn_list = api.fetch_all_resources("functions") + fn_lookup = dict((fn["name"], fn) + for fn in fn_list) + + payload_fn = payload_from_wished_fn(wished_fn) + + if wished_fn["name"] not in fn_lookup: + changed = True + if api.module.check_mode: + return changed, {"status": "A function would be created."} + + # Creation doesn't support `redeploy` parameter + del payload_fn["redeploy"] + + # Create function + api.warn(payload_fn) + creation_response = api.post(path=api.api_path, + data=payload_fn) + + if not creation_response.ok: + msg = "Error during function creation: %s: '%s' (%s)" % (creation_response.info['msg'], + creation_response.json['message'], + creation_response.json) + api.module.fail_json(msg=msg) + + api.wait_to_complete_state_transition(resource=creation_response.json, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % creation_response.json["id"]) + return changed, response.json + + target_fn = fn_lookup[wished_fn["name"]] + decoded_target_fn = deepcopy(target_fn) + decoded_target_fn["secret_environment_variables"] = SecretVariables.decode(decoded_target_fn["secret_environment_variables"], + payload_fn["secret_environment_variables"]) + + patch_payload = resource_attributes_should_be_changed(target=decoded_target_fn, + wished=payload_fn, + verifiable_mutable_attributes=VERIFIABLE_MUTABLE_ATTRIBUTES, + mutable_attributes=MUTABLE_ATTRIBUTES) + + if not patch_payload: + return changed, target_fn + + changed = True + if api.module.check_mode: + return changed, {"status": "Function attributes would be changed."} + + fn_patch_response = api.patch(path=api.api_path + "/%s" % target_fn["id"], + data=patch_payload) + + if not fn_patch_response.ok: + api.module.fail_json(msg='Error during function attributes update: [{0}: {1}]'.format( + fn_patch_response.status_code, fn_patch_response.json['message'])) + + api.wait_to_complete_state_transition(resource=target_fn, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % target_fn["id"]) + return changed, response.json + + +state_strategy = { + "present": present_strategy, + "absent": absent_strategy +} + + +def core(module): + SecretVariables.ensure_scaleway_secret_package(module) + + region = module.params["region"] + wished_function = { + "state": module.params["state"], + "namespace_id": module.params["namespace_id"], + "name": module.params["name"], + "description": module.params['description'], + "min_scale": module.params['min_scale'], + "max_scale": module.params['max_scale'], + "runtime": module.params["runtime"], + "memory_limit": module.params["memory_limit"], + "timeout": module.params["function_timeout"], + "handler": module.params["handler"], + "privacy": module.params["privacy"], + "redeploy": module.params["redeploy"], + "environment_variables": module.params['environment_variables'], + "secret_environment_variables": module.params['secret_environment_variables'] + } + + api = Scaleway(module=module) + api.api_path = "functions/v1beta1/regions/%s/functions" % region + + changed, summary = state_strategy[wished_function["state"]](api=api, wished_fn=wished_function) + + module.exit_json(changed=changed, function=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(scaleway_waitable_resource_argument_spec()) + argument_spec.update(dict( + state=dict(type='str', default='present', choices=['absent', 'present']), + namespace_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True), + description=dict(type='str', default=''), + min_scale=dict(type='int'), + max_scale=dict(type='int'), + runtime=dict(type='str', required=True), + memory_limit=dict(type='int'), + function_timeout=dict(type='str'), + handler=dict(type='str'), + privacy=dict(type='str', default='public', choices=['public', 'private']), + redeploy=dict(type='bool', default=False), + environment_variables=dict(type='dict', default={}), + secret_environment_variables=dict(type='dict', default={}, no_log=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/scaleway_function_info.py b/plugins/modules/scaleway_function_info.py new file mode 100644 index 0000000000..b6f2eefa71 --- /dev/null +++ b/plugins/modules/scaleway_function_info.py @@ -0,0 +1,153 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless function info module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_function_info +short_description: Retrieve information on Scaleway Function +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module return information about a function on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + + +options: + namespace_id: + type: str + description: + - Container namespace identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the function. + required: true +''' + +EXAMPLES = ''' +- name: Get a function info + community.general.scaleway_function_info: + namespace_id: '{{ scw_function_namespace }}' + region: fr-par + name: my-awesome-function + register: function_info_task +''' + +RETURN = ''' +function: + description: The function information. + returned: always + type: dict + sample: + cpu_limit: 140 + description: Function used for testing scaleway_function ansible module + domain_name: fnansibletestfxamabuc-fn-ansible-test.functions.fnc.fr-par.scw.cloud + environment_variables: + MY_VAR: my_value + error_message: null + handler: handler.handle + http_option: "" + id: ceb64dc4-4464-4196-8e20-ecef705475d3 + max_scale: 5 + memory_limit: 256 + min_scale: 0 + name: fn-ansible-test + namespace_id: 82737d8d-0ebb-4d89-b0ad-625876eca50d + privacy: public + region: fr-par + runtime: python310 + runtime_message: "" + secret_environment_variables: SENSITIVE_VALUE + status: created + timeout: 300s +''' + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + filter_sensitive_attributes +) +from ansible.module_utils.basic import AnsibleModule + +SENSITIVE_ATTRIBUTES = ( + "secret_environment_variables", +) + + +def info_strategy(api, wished_fn): + fn_list = api.fetch_all_resources("functions") + fn_lookup = dict((fn["name"], fn) + for fn in fn_list) + + if wished_fn["name"] not in fn_lookup: + msg = "Error during function lookup: Unable to find function named '%s' in namespace '%s'" % (wished_fn["name"], + wished_fn["namespace_id"]) + + api.module.fail_json(msg=msg) + + target_fn = fn_lookup[wished_fn["name"]] + + response = api.get(path=api.api_path + "/%s" % target_fn["id"]) + if not response.ok: + msg = "Error during function lookup: %s: '%s' (%s)" % (response.info['msg'], + response.json['message'], + response.json) + api.module.fail_json(msg=msg) + + return response.json + + +def core(module): + region = module.params["region"] + wished_function = { + "namespace_id": module.params["namespace_id"], + "name": module.params["name"] + } + + api = Scaleway(module=module) + api.api_path = "functions/v1beta1/regions/%s/functions" % region + + summary = info_strategy(api=api, wished_fn=wished_function) + + module.exit_json(changed=False, function=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES)) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(dict( + namespace_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/scaleway_function/aliases b/tests/integration/targets/scaleway_function/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_function/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_function/defaults/main.yml b/tests/integration/targets/scaleway_function/defaults/main.yml new file mode 100644 index 0000000000..df02a4665f --- /dev/null +++ b/tests/integration/targets/scaleway_function/defaults/main.yml @@ -0,0 +1,17 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +function_namespace_name: fn-ansible-test +name: fn-ansible-test +description: Function used for testing scaleway_function_infoansible module +updated_description: Function used for testing scaleway_function_info ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value +updated_secret_environment_variables: + MY_SECRET_VAR: my_other_secret_value +runtime: python310 diff --git a/tests/integration/targets/scaleway_function/tasks/main.yml b/tests/integration/targets/scaleway_function/tasks/main.yml new file mode 100644 index 0000000000..92ebfb8f7d --- /dev/null +++ b/tests/integration/targets/scaleway_function/tasks/main.yml @@ -0,0 +1,284 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create function_namespace + community.general.scaleway_function_namespace: + state: present + name: '{{ function_namespace_name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + register: integration_function_namespace + +- name: Create a function (Check) + check_mode: yes + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_creation_check_task + +- ansible.builtin.debug: + var: fn_creation_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_creation_check_task is success + - fn_creation_check_task is changed + +- name: Create function + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_creation_task + +- ansible.builtin.debug: + var: fn_creation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_creation_task is success + - fn_creation_task is changed + - fn_creation_task.function.status in ["created", "ready"] + +- name: Create function (Confirmation) + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_creation_confirmation_task + +- ansible.builtin.debug: + var: fn_creation_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_creation_confirmation_task is success + - fn_creation_confirmation_task is not changed + - fn_creation_confirmation_task.function.status in ["created", "ready"] + +- name: Update function (Check) + check_mode: yes + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_update_check_task + +- ansible.builtin.debug: + var: fn_update_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_check_task is success + - fn_update_check_task is changed + +- name: Update function + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_update_task + +- ansible.builtin.debug: + var: fn_update_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_task is success + - fn_update_task is changed + - fn_update_task.function.status in ["created", "ready"] + +- name: Update function (Confirmation) + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: fn_update_confirmation_task + +- ansible.builtin.debug: + var: fn_update_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_confirmation_task is success + - fn_update_confirmation_task is not changed + - fn_update_confirmation_task.function.status in ["created", "ready"] + +- name: Update function secret variables (Check) + check_mode: yes + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: fn_update_secret_check_task + +- ansible.builtin.debug: + var: fn_update_secret_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_secret_check_task is success + - fn_update_secret_check_task is changed + +- name: Update function secret variables + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: fn_update_secret_task + +- ansible.builtin.debug: + var: fn_update_secret_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_secret_task is success + - fn_update_secret_task is changed + - fn_update_secret_task.function.status in ["created", "ready"] + - "'hashed_value' in fn_update_secret_task.function.secret_environment_variables[0]" + +- name: Update function secret variables (Confirmation) + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: fn_update_secret_confirmation_task + +- ansible.builtin.debug: + var: fn_update_secret_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_update_secret_confirmation_task is success + - fn_update_secret_confirmation_task is not changed + - fn_update_secret_confirmation_task.function.status in ["created", "ready"] + - "'hashed_value' in fn_update_secret_confirmation_task.function.secret_environment_variables[0]" + +- name: Delete function (Check) + check_mode: yes + community.general.scaleway_function: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + register: fn_deletion_check_task + +- ansible.builtin.debug: + var: fn_deletion_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_deletion_check_task is success + - fn_deletion_check_task is changed + +- name: Delete function + community.general.scaleway_function: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + register: fn_deletion_task + +- ansible.builtin.debug: + var: fn_deletion_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_deletion_task is success + - fn_deletion_task is changed + +- name: Delete function (Confirmation) + community.general.scaleway_function: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + register: fn_deletion_confirmation_task + +- ansible.builtin.debug: + var: fn_deletion_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_deletion_confirmation_task is success + - fn_deletion_confirmation_task is not changed + +- name: Delete function namespace + community.general.scaleway_function_namespace: + state: absent + name: '{{ function_namespace_name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' diff --git a/tests/integration/targets/scaleway_function_info/aliases b/tests/integration/targets/scaleway_function_info/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_function_info/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_function_info/defaults/main.yml b/tests/integration/targets/scaleway_function_info/defaults/main.yml new file mode 100644 index 0000000000..71d2fe7803 --- /dev/null +++ b/tests/integration/targets/scaleway_function_info/defaults/main.yml @@ -0,0 +1,15 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +function_namespace_name: fn-ansible-test +name: fn-ansible-test +description: Container used for testing scaleway_function_info ansible module +updated_description: Container used for testing scaleway_function_info ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value +runtime: python310 diff --git a/tests/integration/targets/scaleway_function_info/tasks/main.yml b/tests/integration/targets/scaleway_function_info/tasks/main.yml new file mode 100644 index 0000000000..17b07f5f97 --- /dev/null +++ b/tests/integration/targets/scaleway_function_info/tasks/main.yml @@ -0,0 +1,62 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create function_namespace + community.general.scaleway_function_namespace: + state: present + name: '{{ function_namespace_name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + register: integration_function_namespace + +- name: Create function + community.general.scaleway_function: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + +- name: Get function info + community.general.scaleway_function_info: + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + register: fn_info_task + +- ansible.builtin.debug: + var: fn_info_task + +- name: Check module call result + ansible.builtin.assert: + that: + - fn_info_task is success + - fn_info_task is not changed + +- name: Delete function + community.general.scaleway_function: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_function_namespace.function_namespace.id }}' + runtime: '{{ runtime }}' + +- name: Delete function namespace + community.general.scaleway_function_namespace: + state: absent + name: '{{ function_namespace_name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' From 1e17ec13b88c697751708d7166304674713e04c8 Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Sat, 5 Nov 2022 21:44:33 +0100 Subject: [PATCH 0301/2104] [Scaleway] Add module to manage container namespaces (#5416) * [Scaleway] Add module to manage container namespaces Signed-off-by: Lunik * Fix CI Signed-off-by: Lunik * fix botmeta Signed-off-by: Lunik * fix typo in loop var name Signed-off-by: Lunik * Add missing required lib check Signed-off-by: Lunik * fix integration tests assertions Signed-off-by: Lunik Signed-off-by: Lunik --- .github/BOTMETA.yml | 4 + .../modules/scaleway_container_namespace.py | 289 ++++++++++++++++++ .../scaleway_container_namespace_info.py | 145 +++++++++ .../scaleway_container_namespace/aliases | 6 + .../defaults/main.yml | 15 + .../tasks/main.yml | 255 ++++++++++++++++ .../scaleway_container_namespace_info/aliases | 6 + .../defaults/main.yml | 13 + .../tasks/main.yml | 41 +++ 9 files changed, 774 insertions(+) create mode 100644 plugins/modules/scaleway_container_namespace.py create mode 100644 plugins/modules/scaleway_container_namespace_info.py create mode 100644 tests/integration/targets/scaleway_container_namespace/aliases create mode 100644 tests/integration/targets/scaleway_container_namespace/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_container_namespace/tasks/main.yml create mode 100644 tests/integration/targets/scaleway_container_namespace_info/aliases create mode 100644 tests/integration/targets/scaleway_container_namespace_info/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_container_namespace_info/tasks/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 2ba562440b..1844ce49f1 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -462,6 +462,10 @@ files: maintainers: $team_scaleway $modules/scaleway_compute_private_network.py: maintainers: pastral + $modules/scaleway_container_namespace.py: + maintainers: Lunik + $modules/scaleway_container_namespace_info.py: + maintainers: Lunik $modules/scaleway_container_registry.py: maintainers: Lunik $modules/scaleway_container_registry_info.py: diff --git a/plugins/modules/scaleway_container_namespace.py b/plugins/modules/scaleway_container_namespace.py new file mode 100644 index 0000000000..4cfde73542 --- /dev/null +++ b/plugins/modules/scaleway_container_namespace.py @@ -0,0 +1,289 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless container namespace management module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_container_namespace +short_description: Scaleway Container namespace management +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module manages container namespaces on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + - community.general.scaleway_waitable_resource +requirements: + - passlib[argon2] >= 1.7.4 + +options: + state: + type: str + description: + - Indicate desired state of the container namespace. + default: present + choices: + - present + - absent + + project_id: + type: str + description: + - Project identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the container namespace. + required: true + + description: + description: + - Description of the container namespace. + type: str + default: '' + + environment_variables: + description: + - Environment variables of the container namespace. + - Injected in containers at runtime. + type: dict + default: {} + + secret_environment_variables: + description: + - Secret environment variables of the container namespace. + - Updating thoses values will not output a C(changed) state in Ansible. + - Injected in containers at runtime. + type: dict + default: {} +''' + +EXAMPLES = ''' +- name: Create a container namespace + community.general.scaleway_container_namespace: + project_id: '{{ scw_project }}' + state: present + region: fr-par + name: my-awesome-container-namespace + environment_variables: + MY_VAR: my_value + secret_environment_variables: + MY_SECRET_VAR: my_secret_value + register: container_namespace_creation_task + +- name: Make sure container namespace is deleted + community.general.scaleway_container_namespace: + project_id: '{{ scw_project }}' + state: absent + region: fr-par + name: my-awesome-container-namespace +''' + +RETURN = ''' +container_namespace: + description: The container namespace information. + returned: when I(state=present) + type: dict + sample: + description: "" + environment_variables: + MY_VAR: my_value + error_message: null + id: 531a1fd7-98d2-4a74-ad77-d398324304b8 + name: my-awesome-container-namespace + organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0 + project_id: d44cea58-dcb7-4c95-bff1-1105acb60a98 + region: fr-par + registry_endpoint: "" + registry_namespace_id: "" + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg + status: pending +''' + +from copy import deepcopy + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + scaleway_waitable_resource_argument_spec, + resource_attributes_should_be_changed, SecretVariables +) +from ansible.module_utils.basic import AnsibleModule + +STABLE_STATES = ( + "ready", + "absent" +) + +MUTABLE_ATTRIBUTES = ( + "description", + "environment_variables", + "secret_environment_variables" +) + + +def payload_from_wished_cn(wished_cn): + payload = { + "project_id": wished_cn["project_id"], + "name": wished_cn["name"], + "description": wished_cn["description"], + "environment_variables": wished_cn["environment_variables"], + "secret_environment_variables": SecretVariables.dict_to_list(wished_cn["secret_environment_variables"]) + } + + return payload + + +def absent_strategy(api, wished_cn): + changed = False + + cn_list = api.fetch_all_resources("namespaces") + cn_lookup = dict((cn["name"], cn) + for cn in cn_list) + + if wished_cn["name"] not in cn_lookup: + return changed, {} + + target_cn = cn_lookup[wished_cn["name"]] + changed = True + if api.module.check_mode: + return changed, {"status": "Container namespace would be destroyed"} + + api.wait_to_complete_state_transition(resource=target_cn, stable_states=STABLE_STATES, force_wait=True) + response = api.delete(path=api.api_path + "/%s" % target_cn["id"]) + if not response.ok: + api.module.fail_json(msg='Error deleting container namespace [{0}: {1}]'.format( + response.status_code, response.json)) + + api.wait_to_complete_state_transition(resource=target_cn, stable_states=STABLE_STATES) + return changed, response.json + + +def present_strategy(api, wished_cn): + changed = False + + cn_list = api.fetch_all_resources("namespaces") + cn_lookup = dict((cn["name"], cn) + for cn in cn_list) + + payload_cn = payload_from_wished_cn(wished_cn) + + if wished_cn["name"] not in cn_lookup: + changed = True + if api.module.check_mode: + return changed, {"status": "A container namespace would be created."} + + # Create container namespace + api.warn(payload_cn) + creation_response = api.post(path=api.api_path, + data=payload_cn) + + if not creation_response.ok: + msg = "Error during container namespace creation: %s: '%s' (%s)" % (creation_response.info['msg'], + creation_response.json['message'], + creation_response.json) + api.module.fail_json(msg=msg) + + api.wait_to_complete_state_transition(resource=creation_response.json, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % creation_response.json["id"]) + return changed, response.json + + target_cn = cn_lookup[wished_cn["name"]] + decoded_target_cn = deepcopy(target_cn) + decoded_target_cn["secret_environment_variables"] = SecretVariables.decode(decoded_target_cn["secret_environment_variables"], + payload_cn["secret_environment_variables"]) + patch_payload = resource_attributes_should_be_changed(target=decoded_target_cn, + wished=payload_cn, + verifiable_mutable_attributes=MUTABLE_ATTRIBUTES, + mutable_attributes=MUTABLE_ATTRIBUTES) + + if not patch_payload: + return changed, target_cn + + changed = True + if api.module.check_mode: + return changed, {"status": "Container namespace attributes would be changed."} + + cn_patch_response = api.patch(path=api.api_path + "/%s" % target_cn["id"], + data=patch_payload) + + if not cn_patch_response.ok: + api.module.fail_json(msg='Error during container namespace attributes update: [{0}: {1}]'.format( + cn_patch_response.status_code, cn_patch_response.json['message'])) + + api.wait_to_complete_state_transition(resource=target_cn, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % target_cn["id"]) + return changed, cn_patch_response.json + + +state_strategy = { + "present": present_strategy, + "absent": absent_strategy +} + + +def core(module): + SecretVariables.ensure_scaleway_secret_package(module) + + region = module.params["region"] + wished_container_namespace = { + "state": module.params["state"], + "project_id": module.params["project_id"], + "name": module.params["name"], + "description": module.params['description'], + "environment_variables": module.params['environment_variables'], + "secret_environment_variables": module.params['secret_environment_variables'] + } + + api = Scaleway(module=module) + api.api_path = "containers/v1beta1/regions/%s/namespaces" % region + + changed, summary = state_strategy[wished_container_namespace["state"]](api=api, wished_cn=wished_container_namespace) + + module.exit_json(changed=changed, container_namespace=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(scaleway_waitable_resource_argument_spec()) + argument_spec.update(dict( + state=dict(type='str', default='present', choices=['absent', 'present']), + project_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True), + description=dict(type='str', default=''), + environment_variables=dict(type='dict', default={}), + secret_environment_variables=dict(type='dict', default={}, no_log=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/scaleway_container_namespace_info.py b/plugins/modules/scaleway_container_namespace_info.py new file mode 100644 index 0000000000..daf5d7b1d6 --- /dev/null +++ b/plugins/modules/scaleway_container_namespace_info.py @@ -0,0 +1,145 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless container namespace info module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_container_namespace_info +short_description: Retrieve information on Scaleway Container namespace +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module return information about a container namespace on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + + +options: + project_id: + type: str + description: + - Project identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the container namespace. + required: true +''' + +EXAMPLES = ''' +- name: Get a container namespace info + community.general.scaleway_container_namespace_info: + project_id: '{{ scw_project }}' + region: fr-par + name: my-awesome-container-namespace + register: container_namespace_info_task +''' + +RETURN = ''' +container_namespace: + description: The container namespace information. + returned: always + type: dict + sample: + description: "" + environment_variables: + MY_VAR: my_value + error_message: null + id: 531a1fd7-98d2-4a74-ad77-d398324304b8 + name: my-awesome-container-namespace + organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0 + project_id: d44cea58-dcb7-4c95-bff1-1105acb60a98 + region: fr-par + registry_endpoint: "" + registry_namespace_id: "" + secret_environment_variables: SENSITIVE_VALUE + status: pending +''' + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + filter_sensitive_attributes +) +from ansible.module_utils.basic import AnsibleModule + +SENSITIVE_ATTRIBUTES = ( + "secret_environment_variables", +) + + +def info_strategy(api, wished_cn): + cn_list = api.fetch_all_resources("namespaces") + cn_lookup = dict((fn["name"], fn) + for fn in cn_list) + + if wished_cn["name"] not in cn_lookup: + msg = "Error during container namespace lookup: Unable to find container namespace named '%s' in project '%s'" % (wished_cn["name"], + wished_cn["project_id"]) + + api.module.fail_json(msg=msg) + + target_cn = cn_lookup[wished_cn["name"]] + + response = api.get(path=api.api_path + "/%s" % target_cn["id"]) + if not response.ok: + msg = "Error during container namespace lookup: %s: '%s' (%s)" % (response.info['msg'], + response.json['message'], + response.json) + api.module.fail_json(msg=msg) + + return response.json + + +def core(module): + region = module.params["region"] + wished_container_namespace = { + "project_id": module.params["project_id"], + "name": module.params["name"] + } + + api = Scaleway(module=module) + api.api_path = "containers/v1beta1/regions/%s/namespaces" % region + + summary = info_strategy(api=api, wished_cn=wished_container_namespace) + + module.exit_json(changed=False, container_namespace=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES)) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(dict( + project_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/scaleway_container_namespace/aliases b/tests/integration/targets/scaleway_container_namespace/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_container_namespace/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_container_namespace/defaults/main.yml b/tests/integration/targets/scaleway_container_namespace/defaults/main.yml new file mode 100644 index 0000000000..876f8b7a63 --- /dev/null +++ b/tests/integration/targets/scaleway_container_namespace/defaults/main.yml @@ -0,0 +1,15 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +name: cn-ansible-test +description: Container namespace used for testing scaleway_container_namespace ansible module +updated_description: Container namespace used for testing scaleway_container_namespace ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value +updated_secret_environment_variables: + MY_SECRET_VAR: my_other_secret_value \ No newline at end of file diff --git a/tests/integration/targets/scaleway_container_namespace/tasks/main.yml b/tests/integration/targets/scaleway_container_namespace/tasks/main.yml new file mode 100644 index 0000000000..bab42ee13f --- /dev/null +++ b/tests/integration/targets/scaleway_container_namespace/tasks/main.yml @@ -0,0 +1,255 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create a container namespace (Check) + check_mode: yes + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: cn_creation_check_task + +- ansible.builtin.debug: + var: cn_creation_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_creation_check_task is success + - cn_creation_check_task is changed + +- name: Create container_namespace + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: cn_creation_task + +- ansible.builtin.debug: + var: cn_creation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_creation_task is success + - cn_creation_task is changed + - cn_creation_task.container_namespace.status == "ready" + +- name: Create container namespace (Confirmation) + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: cn_creation_confirmation_task + +- ansible.builtin.debug: + var: cn_creation_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_creation_confirmation_task is success + - cn_creation_confirmation_task is not changed + - cn_creation_confirmation_task.container_namespace.status == "ready" + +- name: Update container namespace (Check) + check_mode: yes + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: cn_update_check_task + +- ansible.builtin.debug: + var: cn_update_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_check_task is success + - cn_update_check_task is changed + +- name: Update container namespace + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: cn_update_task + +- ansible.builtin.debug: + var: cn_update_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_task is success + - cn_update_task is changed + - cn_update_task.container_namespace.status == "ready" + +- name: Update container namespace (Confirmation) + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + register: cn_update_confirmation_task + +- ansible.builtin.debug: + var: cn_update_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_confirmation_task is success + - cn_update_confirmation_task is not changed + - cn_update_confirmation_task.container_namespace.status == "ready" + +- name: Update container namespace secret variables (Check) + check_mode: yes + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: cn_update_secret_check_task + +- ansible.builtin.debug: + var: cn_update_secret_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_secret_check_task is success + - cn_update_secret_check_task is changed + +- name: Update container namespace secret variables + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: cn_update_secret_task + +- ansible.builtin.debug: + var: cn_update_secret_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_secret_task is success + - cn_update_secret_task is changed + - cn_update_secret_task.container_namespace.status == "ready" + - "'hashed_value' in cn_update_secret_task.container_namespace.secret_environment_variables[0]" + +- name: Update container namespace secret variables (Confirmation) + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + register: cn_update_secret_congfirmation_task + +- ansible.builtin.debug: + var: cn_update_secret_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_secret_confirmation_task is success + - cn_update_secret_confirmation_task is not changed + - cn_update_secret_confirmation_task.container_namespace.status == "ready" + - "'hashed_value' in cn_update_secret_confirmation_task.container_namespace.secret_environment_variables[0]" + +- name: Delete container namespace (Check) + check_mode: yes + community.general.scaleway_container_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: cn_deletion_check_task + +- ansible.builtin.debug: + var: cn_deletion_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_deletion_check_task is success + - cn_deletion_check_task is changed + +- name: Delete container namespace + community.general.scaleway_container_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: cn_deletion_task + +- ansible.builtin.debug: + var: cn_deletion_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_deletion_task is success + - cn_deletion_task is changed + +- name: Delete container namespace (Confirmation) + community.general.scaleway_container_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' + register: cn_deletion_confirmation_task + +- ansible.builtin.debug: + var: cn_deletion_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_deletion_confirmation_task is success + - cn_deletion_confirmation_task is not changed diff --git a/tests/integration/targets/scaleway_container_namespace_info/aliases b/tests/integration/targets/scaleway_container_namespace_info/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_container_namespace_info/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_container_namespace_info/defaults/main.yml b/tests/integration/targets/scaleway_container_namespace_info/defaults/main.yml new file mode 100644 index 0000000000..238f79fe55 --- /dev/null +++ b/tests/integration/targets/scaleway_container_namespace_info/defaults/main.yml @@ -0,0 +1,13 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +name: cn-ansible-test +description: Container namespace used for testing scaleway_container_namespace_info ansible module +updated_description: Container namespace used for testing scaleway_container_namespace_info ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value diff --git a/tests/integration/targets/scaleway_container_namespace_info/tasks/main.yml b/tests/integration/targets/scaleway_container_namespace_info/tasks/main.yml new file mode 100644 index 0000000000..17ac07e81c --- /dev/null +++ b/tests/integration/targets/scaleway_container_namespace_info/tasks/main.yml @@ -0,0 +1,41 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create container_namespace + community.general.scaleway_container_namespace: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + +- name: Get container namespace info + community.general.scaleway_container_namespace_info: + name: '{{ name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + register: cn_info_task + +- ansible.builtin.debug: + var: cn_info_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_info_task is success + - cn_info_task is not changed + +- name: Delete container namespace + community.general.scaleway_container_namespace: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' From 5af84e57e4d7d720fe0248fcc7a14afb7fd54adb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 5 Nov 2022 22:31:39 +0100 Subject: [PATCH 0302/2104] Sort BOTMETA. (#5474) --- .github/BOTMETA.yml | 1790 +++++++++++++++++++++---------------------- 1 file changed, 895 insertions(+), 895 deletions(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 1844ce49f1..4975f30c0e 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -55,15 +55,15 @@ files: $callbacks/diy.py: maintainers: theque5t $callbacks/elastic.py: - maintainers: v1v keywords: apm observability + maintainers: v1v $callbacks/hipchat.py: {} $callbacks/jabber.py: {} + $callbacks/log_plays.py: {} $callbacks/loganalytics.py: maintainers: zhcli $callbacks/logdna.py: {} $callbacks/logentries.py: {} - $callbacks/log_plays.py: {} $callbacks/logstash.py: maintainers: ujenmr $callbacks/mail.py: @@ -72,24 +72,24 @@ files: maintainers: rverchere $callbacks/null.py: {} $callbacks/opentelemetry.py: - maintainers: v1v keywords: opentelemetry observability + maintainers: v1v $callbacks/say.py: - notify: chris-short - maintainers: $team_macos - labels: macos say keywords: brew cask darwin homebrew macosx macports osx + labels: macos say + maintainers: $team_macos + notify: chris-short $callbacks/selective.py: {} $callbacks/slack.py: {} $callbacks/splunk.py: {} $callbacks/sumologic.py: - maintainers: ryancurrah labels: sumologic + maintainers: ryancurrah $callbacks/syslog_json.py: maintainers: imjoseangel $callbacks/unixy.py: - maintainers: akatch labels: unixy + maintainers: akatch $callbacks/yaml.py: {} $connections/: labels: connections @@ -101,28 +101,28 @@ files: maintainers: $team_ansible_core $connections/lxc.py: {} $connections/lxd.py: - maintainers: mattclay labels: lxd + maintainers: mattclay $connections/qubes.py: maintainers: kushaldas $connections/saltstack.py: - maintainers: mscherer labels: saltstack + maintainers: mscherer $connections/zone.py: maintainers: $team_ansible_core $doc_fragments/: labels: docs_fragments $doc_fragments/hpe3par.py: - maintainers: farhan7500 gautamphegde labels: hpe3par + maintainers: farhan7500 gautamphegde $doc_fragments/hwc.py: - maintainers: $team_huawei labels: hwc + maintainers: $team_huawei $doc_fragments/nomad.py: maintainers: chris93111 $doc_fragments/xenserver.py: - maintainers: bvitnik labels: xenserver + maintainers: bvitnik $filters/counter.py: maintainers: keilr $filters/crc32.py: @@ -149,8 +149,6 @@ files: $filters/random_mac.py: {} $filters/time.py: maintainers: resmo - $filters/unicode_normalize.py: - maintainers: Ajpantuso $filters/to_days.yml: maintainers: resmo $filters/to_hours.yml: @@ -169,6 +167,8 @@ files: maintainers: resmo $filters/to_years.yml: maintainers: resmo + $filters/unicode_normalize.py: + maintainers: Ajpantuso $filters/version_sort.py: maintainers: ericzolf $inventories/: @@ -177,31 +177,31 @@ files: maintainers: opoplawski $inventories/gitlab_runners.py: maintainers: morph027 + $inventories/icinga2.py: + maintainers: BongoEADGC6 $inventories/linode.py: - maintainers: $team_linode - labels: cloud linode keywords: linode dynamic inventory script + labels: cloud linode + maintainers: $team_linode $inventories/lxd.py: maintainers: conloos $inventories/nmap.py: {} $inventories/online.py: maintainers: remyleone $inventories/opennebula.py: - maintainers: feldsam - labels: cloud opennebula keywords: opennebula dynamic inventory script + labels: cloud opennebula + maintainers: feldsam $inventories/proxmox.py: maintainers: $team_virt ilijamt - $inventories/xen_orchestra.py: - maintainers: ddelnano shinuza - $inventories/icinga2.py: - maintainers: BongoEADGC6 $inventories/scaleway.py: - maintainers: $team_scaleway labels: cloud scaleway + maintainers: $team_scaleway $inventories/stackpath_compute.py: maintainers: shayrybak $inventories/virtualbox.py: {} + $inventories/xen_orchestra.py: + maintainers: ddelnano shinuza $lookups/: labels: lookups $lookups/bitwarden.py: @@ -213,22 +213,22 @@ files: $lookups/consul_kv.py: {} $lookups/credstash.py: {} $lookups/cyberarkpassword.py: - notify: cyberark-bizdev labels: cyberarkpassword + notify: cyberark-bizdev $lookups/dependent.py: maintainers: felixfontein $lookups/dig.py: - maintainers: jpmens labels: dig + maintainers: jpmens $lookups/dnstxt.py: maintainers: jpmens $lookups/dsv.py: - maintainers: delineaKrehl tylerezimmerman ignore: amigus - $lookups/etcd3.py: - maintainers: eric-belhomme + maintainers: delineaKrehl tylerezimmerman $lookups/etcd.py: maintainers: jpmens + $lookups/etcd3.py: + maintainers: eric-belhomme $lookups/filetree.py: maintainers: dagwieers $lookups/flattened.py: {} @@ -239,11 +239,11 @@ files: $lookups/lmdb_kv.py: maintainers: jpmens $lookups/manifold.py: - maintainers: galanoff labels: manifold + maintainers: galanoff $lookups/onepass: - maintainers: samdoran labels: onepassword + maintainers: samdoran $lookups/onepassword.py: maintainers: azenk scottsb $lookups/onepassword_raw.py: @@ -261,177 +261,733 @@ files: maintainers: RevBits $lookups/shelvefile.py: {} $lookups/tss.py: - maintainers: delineaKrehl tylerezimmerman ignore: amigus + maintainers: delineaKrehl tylerezimmerman $module_utils/: labels: module_utils $module_utils/gconftool2.py: - maintainers: russoz labels: gconftool2 + maintainers: russoz $module_utils/gitlab.py: - notify: jlozadad - maintainers: $team_gitlab - labels: gitlab keywords: gitlab source_control + labels: gitlab + maintainers: $team_gitlab + notify: jlozadad $module_utils/hwc_utils.py: - maintainers: $team_huawei - labels: huawei hwc_utils networking keywords: cloud huawei hwc + labels: huawei hwc_utils networking + maintainers: $team_huawei $module_utils/identity/keycloak/keycloak.py: maintainers: $team_keycloak $module_utils/ipa.py: - maintainers: $team_ipa labels: ipa + maintainers: $team_ipa $module_utils/manageiq.py: - maintainers: $team_manageiq labels: manageiq + maintainers: $team_manageiq $module_utils/memset.py: - maintainers: glitchcrab labels: cloud memset + maintainers: glitchcrab $module_utils/mh/: - maintainers: russoz labels: module_helper + maintainers: russoz $module_utils/module_helper.py: - maintainers: russoz labels: module_helper + maintainers: russoz $module_utils/net_tools/pritunl/: maintainers: Lowess $module_utils/oracle/oci_utils.py: - maintainers: $team_oracle labels: cloud + maintainers: $team_oracle $module_utils/pipx.py: - maintainers: russoz labels: pipx + maintainers: russoz $module_utils/pure.py: - maintainers: $team_purestorage labels: pure pure_storage + maintainers: $team_purestorage $module_utils/redfish_utils.py: - maintainers: $team_redfish labels: redfish_utils + maintainers: $team_redfish $module_utils/remote_management/lxca/common.py: maintainers: navalkp prabhosa $module_utils/scaleway.py: - maintainers: $team_scaleway labels: cloud scaleway + maintainers: $team_scaleway $module_utils/storage/hpe3par/hpe3par.py: maintainers: farhan7500 gautamphegde $module_utils/utm_utils.py: - maintainers: $team_e_spirit labels: utm_utils + maintainers: $team_e_spirit $module_utils/wdc_redfish_utils.py: - maintainers: $team_wdc labels: wdc_redfish_utils + maintainers: $team_wdc $module_utils/xenserver.py: - maintainers: bvitnik labels: xenserver + maintainers: bvitnik $module_utils/xfconf.py: - maintainers: russoz labels: xfconf + maintainers: russoz + $modules/aerospike_migrations.py: + maintainers: Alb0t + $modules/airbrake_deployment.py: + ignore: bpennypacker + labels: airbrake_deployment + maintainers: phumpal + $modules/aix: + keywords: aix efix lpar wpar + labels: aix + maintainers: $team_aix + $modules/aix_lvol.py: + maintainers: adejoux + $modules/alerta_customer.py: + maintainers: cwollinger $modules/ali_: maintainers: xiaozhu36 - $modules/atomic_container.py: - maintainers: giuseppe krsacme + $modules/alternatives.py: + ignore: DavidWittman jiuka + labels: alternatives + maintainers: mulby + $modules/ansible_galaxy_install.py: + maintainers: russoz + $modules/apache2_mod_proxy.py: + maintainers: oboukili + $modules/apache2_module.py: + ignore: robinro + maintainers: berendt n0trax + $modules/apk.py: + ignore: kbrebanov + labels: apk + maintainers: tdtrask + $modules/apt_repo.py: + maintainers: obirvalger + $modules/apt_rpm.py: + maintainers: evgkrsk + $modules/archive.py: + maintainers: bendoh $modules/atomic_: maintainers: krsacme + $modules/atomic_container.py: + maintainers: giuseppe krsacme + $modules/awall.py: + maintainers: tdtrask + $modules/beadm.py: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: beadm solaris + maintainers: $team_solaris + $modules/bearychat.py: + maintainers: tonyseek + $modules/bigpanda.py: + maintainers: hkariti + $modules/bitbucket_: + maintainers: catcombo + $modules/bower.py: + maintainers: mwarkentin + $modules/bundler.py: + maintainers: thoiberg + $modules/bzr.py: + maintainers: andreparames + $modules/campfire.py: + maintainers: fabulops + $modules/capabilities.py: + maintainers: natefoo + $modules/cargo.py: + maintainers: radek-sprta + $modules/catapult.py: + maintainers: Jmainguy + $modules/circonus_annotation.py: + maintainers: NickatEpic + $modules/cisco_webex.py: + maintainers: drew-russell $modules/clc_: maintainers: clc-runner + $modules/cloud_init_data_facts.py: + maintainers: resmo + $modules/cloudflare_dns.py: + labels: cloudflare_dns + maintainers: mgruener + $modules/cobbler_: + maintainers: dagwieers + $modules/composer.py: + ignore: resmo + maintainers: dmtrs + $modules/consul: + ignore: colin-nolan + maintainers: $team_consul + $modules/copr.py: + maintainers: schlupov + $modules/cpanm.py: + maintainers: fcuny russoz + $modules/cronvar.py: + maintainers: dougluce + $modules/crypttab.py: + maintainers: groks + $modules/datadog_downtime.py: + maintainers: Datadog + $modules/datadog_event.py: + ignore: arturaz + labels: datadog_event + maintainers: n0ts + $modules/datadog_monitor.py: + maintainers: skornehl + $modules/dconf.py: + maintainers: azaghal + $modules/deploy_helper.py: + maintainers: ramondelafuente $modules/dimensiondata_network.py: - maintainers: aimonb tintoy labels: dimensiondata_network + maintainers: aimonb tintoy $modules/dimensiondata_vlan.py: maintainers: tintoy + $modules/discord.py: + maintainers: cwollinger + $modules/django_manage.py: + ignore: scottanderson42 tastychutney + labels: django_manage + maintainers: russoz + $modules/dnf_versionlock.py: + maintainers: moreda + $modules/dnsimple.py: + maintainers: drcapulet + $modules/dnsimple_info.py: + maintainers: edhilgendorf + $modules/dnsmadeeasy.py: + maintainers: briceburg + $modules/dpkg_divert.py: + maintainers: quidame + $modules/easy_install.py: + maintainers: mattupstate + $modules/ejabberd_user.py: + maintainers: privateip + $modules/elasticsearch_plugin.py: + maintainers: ThePixelDeveloper samdoran + $modules/emc_vnx_sg_member.py: + maintainers: remixtj + $modules/etcd3.py: + ignore: vfauth + maintainers: evrardjp + $modules/facter.py: + labels: facter + maintainers: $team_ansible_core gamethis + $modules/filesize.py: + maintainers: quidame + $modules/filesystem.py: + labels: filesystem + maintainers: pilou- abulimov quidame + $modules/flatpak.py: + maintainers: $team_flatpak + $modules/flatpak_remote.py: + maintainers: $team_flatpak + $modules/flowdock.py: + ignore: mcodd + $modules/gandi_livedns.py: + maintainers: gthiemonge + $modules/gconftool2.py: + labels: gconftool2 + maintainers: Akasurde kevensen + $modules/gconftool2_info.py: + labels: gconftool2 + maintainers: russoz + $modules/gem.py: + labels: gem + maintainers: $team_ansible_core johanwiren + $modules/git_config.py: + maintainers: djmattyg007 mgedmin + $modules/github_: + maintainers: stpierre + $modules/github_deploy_key.py: + maintainers: bincyber + $modules/github_issue.py: + maintainers: Akasurde + $modules/github_key.py: + ignore: erydo + labels: github_key + maintainers: erydo + $modules/github_release.py: + maintainers: adrianmoisey + $modules/github_repo.py: + maintainers: atorrescogollo + $modules/gitlab_: + keywords: gitlab source_control + maintainers: $team_gitlab + notify: jlozadad + $modules/gitlab_branch.py: + maintainers: paytroff + $modules/gitlab_project_variable.py: + maintainers: markuman + $modules/gitlab_runner.py: + maintainers: SamyCoenen + $modules/gitlab_user.py: + maintainers: LennertMertens stgrace + $modules/grove.py: + maintainers: zimbatm + $modules/gunicorn.py: + maintainers: agmezr + $modules/hana_query.py: + maintainers: rainerleber + $modules/haproxy.py: + maintainers: ravibhure Normo $modules/heroku_collaborator.py: maintainers: marns93 + $modules/hg.py: + maintainers: yeukhon + $modules/hipchat.py: + maintainers: pb8226 shirou + $modules/homebrew.py: + ignore: ryansb + keywords: brew cask darwin homebrew macosx macports osx + labels: homebrew macos + maintainers: $team_macos andrew-d + notify: chris-short + $modules/homebrew_cask.py: + ignore: ryansb + keywords: brew cask darwin homebrew macosx macports osx + labels: homebrew_ macos + maintainers: $team_macos enriclluelles + notify: chris-short + $modules/homebrew_tap.py: + ignore: ryansb + keywords: brew cask darwin homebrew macosx macports osx + labels: homebrew_ macos + maintainers: $team_macos + notify: chris-short + $modules/homectl.py: + maintainers: jameslivulpi + $modules/honeybadger_deployment.py: + maintainers: stympy + $modules/hpilo_: + ignore: dagwieers + maintainers: haad + $modules/hponcfg.py: + ignore: dagwieers + maintainers: haad + $modules/htpasswd.py: + labels: htpasswd + maintainers: $team_ansible_core $modules/hwc_: - maintainers: $team_huawei huaweicloud keywords: cloud huawei hwc + maintainers: $team_huawei huaweicloud + $modules/ibm_sa_: + maintainers: tzure + $modules/icinga2_feature.py: + maintainers: nerzhul + $modules/icinga2_host.py: + maintainers: t794104 + $modules/idrac_: + ignore: jose-delarosa + maintainers: $team_redfish + $modules/ilo_: + ignore: jose-delarosa + maintainers: $team_redfish + $modules/imc_rest.py: + labels: cisco + maintainers: dagwieers + $modules/imgadm.py: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: solaris + maintainers: $team_solaris + $modules/infinity.py: + maintainers: MeganLiu + $modules/influxdb_: + maintainers: kamsz + $modules/influxdb_query.py: + maintainers: resmo + $modules/influxdb_user.py: + maintainers: zhhuta + $modules/influxdb_write.py: + maintainers: resmo + $modules/ini_file.py: + maintainers: jpmens noseka1 + $modules/installp.py: + keywords: aix efix lpar wpar + labels: aix installp + maintainers: $team_aix kairoaraujo + $modules/interfaces_file.py: + labels: interfaces_file + maintainers: obourdon hryamzik + $modules/ip_netns.py: + maintainers: bregman-arie + $modules/ipa_: + maintainers: $team_ipa + $modules/ipa_pwpolicy.py: + maintainers: adralioh + $modules/ipa_service.py: + maintainers: cprh + $modules/ipa_vault.py: + maintainers: jparrill + $modules/ipify_facts.py: + maintainers: resmo + $modules/ipinfoio_facts.py: + maintainers: akostyuk + $modules/ipmi_: + maintainers: bgaifullin cloudnull + $modules/iptables_state.py: + maintainers: quidame + $modules/ipwcli_dns.py: + maintainers: cwollinger + $modules/irc.py: + maintainers: jpmens sivel + $modules/iso_create.py: + maintainers: Tomorrow9 + $modules/iso_customize.py: + maintainers: ZouYuhua + $modules/iso_extract.py: + maintainers: dagwieers jhoekx ribbons + $modules/jabber.py: + maintainers: bcoca + $modules/java_cert.py: + maintainers: haad absynth76 + $modules/java_keystore.py: + maintainers: Mogztter quidame + $modules/jboss.py: + labels: jboss + maintainers: $team_jboss jhoekx + $modules/jenkins_build.py: + maintainers: brettmilford unnecessary-username + $modules/jenkins_job.py: + maintainers: sermilrod + $modules/jenkins_job_info.py: + maintainers: stpierre + $modules/jenkins_plugin.py: + maintainers: jtyr + $modules/jenkins_script.py: + maintainers: hogarthj + $modules/jira.py: + ignore: DWSR + labels: jira + maintainers: Slezhuk tarka pertoft + $modules/kernel_blacklist.py: + maintainers: matze + $modules/keycloak_: + maintainers: $team_keycloak + $modules/keycloak_authentication.py: + maintainers: elfelip Gaetan2907 + $modules/keycloak_client_rolemapping.py: + maintainers: Gaetan2907 + $modules/keycloak_clientscope.py: + maintainers: Gaetan2907 + $modules/keycloak_group.py: + maintainers: adamgoossens + $modules/keycloak_identity_provider.py: + maintainers: laurpaum + $modules/keycloak_realm.py: + maintainers: kris2kris + $modules/keycloak_realm_info.py: + maintainers: fynncfchen + $modules/keycloak_role.py: + maintainers: laurpaum + $modules/keycloak_user_federation.py: + maintainers: laurpaum + $modules/keycloak_user_rolemapping.py: + maintainers: bratwurzt + $modules/keyring.py: + maintainers: ahussey-redhat + $modules/keyring_info.py: + maintainers: ahussey-redhat + $modules/kibana_plugin.py: + maintainers: barryib + $modules/launchd.py: + maintainers: martinm82 + $modules/layman.py: + maintainers: jirutka + $modules/lbu.py: + maintainers: kunkku + $modules/ldap_attrs.py: + maintainers: drybjed jtyr noles + $modules/ldap_entry.py: + maintainers: jtyr + $modules/ldap_passwd.py: + maintainers: KellerFuchs jtyr + $modules/ldap_search.py: + maintainers: eryx12o45 jtyr + $modules/librato_annotation.py: + maintainers: Sedward $modules/linode: maintainers: $team_linode $modules/linode.py: maintainers: zbal + $modules/listen_ports_facts.py: + maintainers: ndavison + $modules/lldp.py: + ignore: andyhky + labels: lldp + $modules/locale_gen.py: + maintainers: AugustusKling + $modules/logentries.py: + ignore: ivanvanderbyl + labels: logentries + $modules/logentries_msg.py: + maintainers: jcftang + $modules/logstash_plugin.py: + maintainers: nerzhul + $modules/lvg.py: + maintainers: abulimov + $modules/lvol.py: + maintainers: abulimov jhoekx zigaSRC unkaputtbar112 $modules/lxc_container.py: maintainers: cloudnull + $modules/lxca_: + maintainers: navalkp prabhosa $modules/lxd_: ignore: hnakamur $modules/lxd_profile.py: maintainers: conloos $modules/lxd_project.py: maintainers: we10710aa + $modules/macports.py: + ignore: ryansb + keywords: brew cask darwin homebrew macosx macports osx + labels: macos macports + maintainers: $team_macos jcftang + notify: chris-short + $modules/mail.py: + maintainers: dagwieers + $modules/make.py: + maintainers: LinusU + $modules/manageiq_: + labels: manageiq + maintainers: $team_manageiq + $modules/manageiq_alert_profiles.py: + maintainers: elad661 + $modules/manageiq_alerts.py: + maintainers: elad661 + $modules/manageiq_group.py: + maintainers: evertmulder + $modules/manageiq_policies_info.py: + maintainers: russoz $team_manageiq + $modules/manageiq_tags_info.py: + maintainers: russoz $team_manageiq + $modules/manageiq_tenant.py: + maintainers: evertmulder + $modules/mas.py: + maintainers: lukasbestle mheap + $modules/matrix.py: + maintainers: jcgruenhage + $modules/mattermost.py: + maintainers: bjolivot + $modules/maven_artifact.py: + ignore: chrisisbeef + labels: maven_artifact + maintainers: tumbl3w33d turb $modules/memset_: maintainers: glitchcrab - $modules/cloud_init_data_facts.py: + $modules/mksysb.py: + labels: aix mksysb + maintainers: $team_aix + $modules/modprobe.py: + ignore: stygstra + labels: modprobe + maintainers: jdauphant mattjeffery + $modules/monit.py: + labels: monit + maintainers: dstoflet brian-brazil snopoke + $modules/mqtt.py: + maintainers: jpmens + $modules/mssql_db.py: + labels: mssql_db + maintainers: vedit Jmainguy kenichi-ogawa-1988 + $modules/mssql_script.py: + labels: mssql_script + maintainers: kbudde + $modules/nagios.py: + maintainers: tbielawa tgoetheyn + $modules/netcup_dns.py: + maintainers: nbuchwitz + $modules/newrelic_deployment.py: + ignore: mcodd + $modules/nexmo.py: + maintainers: sivel + $modules/nginx_status_info.py: maintainers: resmo + $modules/nictagadm.py: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: solaris + maintainers: $team_solaris SmithX10 + $modules/nmcli.py: + maintainers: alcamie101 + $modules/nomad_: + maintainers: chris93111 + $modules/nosh.py: + maintainers: tacatac + $modules/npm.py: + ignore: chrishoffman + labels: npm + maintainers: shane-walker xcambar + $modules/nsupdate.py: + maintainers: nerzhul + $modules/oci_vcn.py: + maintainers: $team_oracle rohitChaware + $modules/odbc.py: + maintainers: john-westcott-iv + $modules/office_365_connector_card.py: + maintainers: marc-sensenich + $modules/ohai.py: + labels: ohai + maintainers: $team_ansible_core mpdehaan + $modules/omapi_host.py: + maintainers: amasolov nerzhul + $modules/one_: + maintainers: $team_opennebula + $modules/one_host.py: + maintainers: rvalle + $modules/oneandone_: + maintainers: aajdinov edevenport + $modules/onepassword_info.py: + maintainers: Rylon + $modules/oneview_: + maintainers: adriane-cardozo fgbulsoni tmiotto + $modules/oneview_datacenter_info.py: + maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr + $modules/oneview_fc_network.py: + maintainers: fgbulsoni + $modules/oneview_fcoe_network.py: + maintainers: fgbulsoni + $modules/online_: + maintainers: remyleone + $modules/open_iscsi.py: + maintainers: srvg + $modules/openbsd_pkg.py: + ignore: ryansb + keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense + labels: bsd openbsd_pkg + maintainers: $team_bsd eest + $modules/opendj_backendprop.py: + maintainers: dj-wasabi + $modules/openwrt_init.py: + maintainers: agaffney + $modules/opkg.py: + maintainers: skinp + $modules/osx_defaults.py: + keywords: brew cask darwin homebrew macosx macports osx + labels: macos osx_defaults + maintainers: $team_macos notok + notify: chris-short + $modules/ovh_: + maintainers: pascalheraud + $modules/ovh_monthly_billing.py: + maintainers: fraff + $modules/pacemaker_cluster.py: + maintainers: matbu + $modules/packet_: + maintainers: nurfet-becirevic t0mk + $modules/packet_device.py: + maintainers: baldwinSPC t0mk teebes + $modules/packet_sshkey.py: + maintainers: t0mk + $modules/pacman.py: + ignore: elasticdog + labels: pacman + maintainers: elasticdog indrajitr tchernomax jraby + $modules/pacman_key.py: + labels: pacman + maintainers: grawlinson + $modules/pagerduty.py: + ignore: bpennypacker + labels: pagerduty + maintainers: suprememoocow thaumos + $modules/pagerduty_alert.py: + maintainers: ApsOps + $modules/pagerduty_change.py: + maintainers: adamvaughan + $modules/pagerduty_user.py: + maintainers: zanssa + $modules/pam_limits.py: + ignore: usawa + labels: pam_limits + maintainers: giovannisciortino + $modules/pamd.py: + maintainers: kevensen + $modules/parted.py: + maintainers: ColOfAbRiX rosowiecki jake2184 + $modules/pear.py: + ignore: jle64 + labels: pear + $modules/pids.py: + maintainers: saranyasridharan + $modules/pingdom.py: + maintainers: thaumos + $modules/pip_package_info.py: + maintainers: bcoca matburt maxamillion + $modules/pipx.py: + maintainers: russoz + $modules/pipx_info.py: + maintainers: russoz + $modules/pkg5: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: pkg5 solaris + maintainers: $team_solaris mavit + $modules/pkgin.py: + labels: pkgin solaris + maintainers: $team_solaris L2G jasperla szinck martinm82 + $modules/pkgng.py: + ignore: bleader + keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense + labels: bsd pkgng + maintainers: $team_bsd bleader + $modules/pkgutil.py: + labels: pkgutil solaris + maintainers: $team_solaris dermute + $modules/pmem.py: + maintainers: mizumm + $modules/portage.py: + ignore: sayap + labels: portage + maintainers: Tatsh wltjr + $modules/portinstall.py: + ignore: ryansb + keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense + labels: bsd portinstall + maintainers: $team_bsd berenddeboer + $modules/pritunl_: + maintainers: Lowess + $modules/profitbricks: + maintainers: baldwinSPC $modules/proxmox: - maintainers: $team_virt - labels: proxmox virt keywords: kvm libvirt proxmox qemu + labels: proxmox virt + maintainers: $team_virt $modules/proxmox.py: + ignore: skvidal maintainers: UnderGreen - ignore: skvidal + $modules/proxmox_disk.py: + maintainers: castorsky $modules/proxmox_kvm.py: - maintainers: helldorado ignore: skvidal + maintainers: helldorado $modules/proxmox_nic.py: maintainers: Kogelvis $modules/proxmox_tasks_info: maintainers: paginabianca $modules/proxmox_template.py: + ignore: skvidal maintainers: UnderGreen - ignore: skvidal - $modules/proxmox_disk.py: - maintainers: castorsky - $modules/rhevm.py: - maintainers: $team_virt TimothyVandenbrande - labels: rhevm virt - ignore: skvidal - keywords: kvm libvirt proxmox qemu - $modules/serverless.py: - ignore: ryansb - $modules/terraform.py: - maintainers: m-yosefpor rainerleber - ignore: ryansb - $modules/xenserver_facts.py: - maintainers: caphrim007 cheese - labels: xenserver_facts - ignore: andyhky ryansb - $modules/oneandone_: - maintainers: aajdinov edevenport - $modules/online_: - maintainers: remyleone - $modules/one_: - maintainers: $team_opennebula - $modules/one_host.py: - maintainers: rvalle - $modules/oci_vcn.py: - maintainers: $team_oracle rohitChaware - $modules/ovh_: - maintainers: pascalheraud - $modules/ovh_monthly_billing.py: - maintainers: fraff - $modules/packet_device.py: - maintainers: baldwinSPC t0mk teebes - $modules/packet_: - maintainers: nurfet-becirevic t0mk - $modules/packet_sshkey.py: - maintainers: t0mk - $modules/profitbricks: - maintainers: baldwinSPC $modules/pubnub_blocks.py: maintainers: parfeon pubnub - $modules/rax.py: - maintainers: omgjlk sivel + $modules/pulp_repo.py: + maintainers: sysadmind + $modules/puppet.py: + labels: puppet + maintainers: nibalizer emonty + $modules/pushbullet.py: + maintainers: willybarro + $modules/pushover.py: + maintainers: weaselkeeper wopfel + $modules/python_requirements_info.py: + ignore: ryansb + maintainers: willthames $modules/rax: ignore: ryansb sivel + $modules/rax.py: + maintainers: omgjlk sivel $modules/rax_cbs.py: maintainers: claco $modules/rax_cbs_attachments.py: maintainers: claco $modules/rax_cdb.py: maintainers: jails - $modules/rax_cdb_user.py: - maintainers: jails $modules/rax_cdb_database.py: maintainers: jails + $modules/rax_cdb_user.py: + maintainers: jails $modules/rax_clb.py: maintainers: claco $modules/rax_clb_nodes.py: @@ -444,8 +1000,6 @@ files: maintainers: angstwad $modules/rax_identity.py: maintainers: claco - $modules/rax_network.py: - maintainers: claco omgjlk $modules/rax_mon_alarm.py: maintainers: smashwilson $modules/rax_mon_check.py: @@ -456,30 +1010,91 @@ files: maintainers: smashwilson $modules/rax_mon_notification_plan.py: maintainers: smashwilson + $modules/rax_network.py: + maintainers: claco omgjlk $modules/rax_queue.py: maintainers: claco + $modules/read_csv.py: + maintainers: dagwieers + $modules/redfish_: + ignore: jose-delarosa + maintainers: $team_redfish + $modules/redhat_subscription.py: + labels: redhat_subscription + maintainers: barnabycourt alikins kahowell + $modules/redis.py: + maintainers: slok + $modules/redis_data.py: + maintainers: paginabianca + $modules/redis_data_incr.py: + maintainers: paginabianca + $modules/redis_data_info.py: + maintainers: paginabianca + $modules/redis_info.py: + maintainers: levonet + $modules/rhevm.py: + ignore: skvidal + keywords: kvm libvirt proxmox qemu + labels: rhevm virt + maintainers: $team_virt TimothyVandenbrande + $modules/rhn_channel.py: + labels: rhn_channel + maintainers: vincentvdk alikins $team_rhn + $modules/rhn_register.py: + labels: rhn_register + maintainers: jlaska $team_rhn + $modules/rhsm_release.py: + maintainers: seandst + $modules/rhsm_repository.py: + maintainers: giovannisciortino + $modules/riak.py: + maintainers: drewkerrigan jsmartin + $modules/rocketchat.py: + ignore: ramondelafuente + labels: rocketchat + maintainers: Deepakkothandan + $modules/rollbar_deployment.py: + maintainers: kavu + $modules/rpm_ostree_pkg.py: + maintainers: dustymabe Akasurde + $modules/rundeck_acl_policy.py: + maintainers: nerzhul + $modules/rundeck_job_executions_info.py: + maintainers: phsmith + $modules/rundeck_job_run.py: + maintainers: phsmith + $modules/rundeck_project.py: + maintainers: nerzhul + $modules/runit.py: + maintainers: jsumners + $modules/sap_task_list_execute: + maintainers: rainerleber + $modules/sapcar_extract.py: + maintainers: RainerLeber + $modules/say.py: + maintainers: $team_ansible_core mpdehaan $modules/scaleway_: maintainers: $team_scaleway $modules/scaleway_compute_private_network.py: maintainers: pastral $modules/scaleway_container_namespace.py: - maintainers: Lunik + maintainers: Lunik $modules/scaleway_container_namespace_info.py: - maintainers: Lunik + maintainers: Lunik $modules/scaleway_container_registry.py: - maintainers: Lunik + maintainers: Lunik $modules/scaleway_container_registry_info.py: - maintainers: Lunik + maintainers: Lunik $modules/scaleway_database_backup.py: maintainers: guillaume_ro_fr - $modules/scaleway_function_namespace.py: - maintainers: Lunik - $modules/scaleway_function_namespace_info.py: - maintainers: Lunik $modules/scaleway_function.py: - maintainers: Lunik + maintainers: Lunik $modules/scaleway_function_info.py: - maintainers: Lunik + maintainers: Lunik + $modules/scaleway_function_namespace.py: + maintainers: Lunik + $modules/scaleway_function_namespace_info.py: + maintainers: Lunik $modules/scaleway_image_info.py: maintainers: Spredzy $modules/scaleway_ip_info.py: @@ -499,195 +1114,18 @@ files: $modules/scaleway_snapshot_info.py: maintainers: Spredzy $modules/scaleway_volume.py: - labels: scaleway_volume ignore: hekonsek + labels: scaleway_volume $modules/scaleway_volume_info.py: maintainers: Spredzy - $modules/imgadm.py: - maintainers: $team_solaris - labels: solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/nictagadm.py: - maintainers: $team_solaris SmithX10 - labels: solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/smartos_image_info.py: - maintainers: $team_solaris - labels: solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/vmadm.py: - maintainers: $team_solaris - labels: solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/sl_vm.py: - maintainers: mcltn - $modules/spotinst_aws_elastigroup.py: - maintainers: talzur - $modules/udm_: - maintainers: keachi - $modules/webfaction_: - maintainers: quentinsf - $modules/xenserver_: - maintainers: bvitnik - $modules/consul: - maintainers: $team_consul - ignore: colin-nolan - $modules/etcd3.py: - maintainers: evrardjp - ignore: vfauth - $modules/nomad_: - maintainers: chris93111 - $modules/pacemaker_cluster.py: - maintainers: matbu - $modules/znode.py: - maintainers: treyperry - $modules/aerospike_migrations.py: - maintainers: Alb0t - $modules/influxdb_: - maintainers: kamsz - $modules/influxdb_query.py: - maintainers: resmo - $modules/influxdb_user.py: - maintainers: zhhuta - $modules/influxdb_write.py: - maintainers: resmo - $modules/elasticsearch_plugin.py: - maintainers: ThePixelDeveloper samdoran - $modules/kibana_plugin.py: - maintainers: barryib - $modules/odbc.py: - maintainers: john-westcott-iv - $modules/redis.py: - maintainers: slok - $modules/redis_info.py: - maintainers: levonet - $modules/redis_data_info.py: - maintainers: paginabianca - $modules/redis_data.py: - maintainers: paginabianca - $modules/redis_data_incr.py: - maintainers: paginabianca - $modules/riak.py: - maintainers: drewkerrigan jsmartin - $modules/mssql_db.py: - maintainers: vedit Jmainguy kenichi-ogawa-1988 - labels: mssql_db - $modules/mssql_script.py: - maintainers: kbudde - labels: mssql_script - $modules/hana_query.py: - maintainers: rainerleber - $modules/vertica_: - maintainers: dareko - $modules/archive.py: - maintainers: bendoh - $modules/filesize.py: - maintainers: quidame - $modules/ini_file.py: - maintainers: jpmens noseka1 - $modules/iso_create.py: - maintainers: Tomorrow9 - $modules/iso_customize.py: - maintainers: ZouYuhua - $modules/iso_extract.py: - maintainers: dagwieers jhoekx ribbons - $modules/read_csv.py: + $modules/sefcontext.py: maintainers: dagwieers - $modules/sapcar_extract.py: - maintainers: RainerLeber - $modules/xattr.py: - maintainers: bcoca - labels: xattr - $modules/xml.py: - maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0 - labels: m:xml xml - ignore: magnus919 - $modules/ipa_: - maintainers: $team_ipa - $modules/ipa_pwpolicy.py: - maintainers: adralioh - $modules/ipa_service.py: - maintainers: cprh - $modules/ipa_vault.py: - maintainers: jparrill - $modules/keycloak_: - maintainers: $team_keycloak - $modules/keycloak_authentication.py: - maintainers: elfelip Gaetan2907 - $modules/keycloak_clientscope.py: - maintainers: Gaetan2907 - $modules/keycloak_client_rolemapping.py: - maintainers: Gaetan2907 - $modules/keycloak_user_rolemapping.py: - maintainers: bratwurzt - $modules/keycloak_group.py: - maintainers: adamgoossens - $modules/keycloak_identity_provider.py: - maintainers: laurpaum - $modules/keycloak_realm_info.py: - maintainers: fynncfchen - $modules/keycloak_realm.py: - maintainers: kris2kris - $modules/keycloak_role.py: - maintainers: laurpaum - $modules/keycloak_user_federation.py: - maintainers: laurpaum - $modules/onepassword_info.py: - maintainers: Rylon - $modules/opendj_backendprop.py: - maintainers: dj-wasabi - $modules/airbrake_deployment.py: - maintainers: phumpal - labels: airbrake_deployment - ignore: bpennypacker - $modules/alerta_customer.py: - maintainers: cwollinger - $modules/bigpanda.py: - maintainers: hkariti - $modules/circonus_annotation.py: - maintainers: NickatEpic - $modules/datadog_event.py: - maintainers: n0ts - labels: datadog_event - ignore: arturaz - $modules/datadog_downtime.py: - maintainers: Datadog - $modules/datadog_monitor.py: - maintainers: skornehl - $modules/honeybadger_deployment.py: - maintainers: stympy - $modules/icinga2_feature.py: - maintainers: nerzhul - $modules/icinga2_host.py: - maintainers: t794104 - $modules/librato_annotation.py: - maintainers: Sedward - $modules/logentries.py: - labels: logentries - ignore: ivanvanderbyl - $modules/logstash_plugin.py: - maintainers: nerzhul - $modules/monit.py: - maintainers: dstoflet brian-brazil snopoke - labels: monit - $modules/nagios.py: - maintainers: tbielawa tgoetheyn - $modules/newrelic_deployment.py: - ignore: mcodd - $modules/pagerduty.py: - maintainers: suprememoocow thaumos - labels: pagerduty - ignore: bpennypacker - $modules/pagerduty_alert.py: - maintainers: ApsOps - $modules/pagerduty_change.py: - maintainers: adamvaughan - $modules/pagerduty_user.py: - maintainers: zanssa - $modules/pingdom.py: - maintainers: thaumos - $modules/rollbar_deployment.py: - maintainers: kavu + $modules/selinux_permissive.py: + maintainers: mscherer + $modules/selogin.py: + maintainers: bachradsusi dankeder jamescassell + $modules/sendgrid.py: + maintainers: makaimc $modules/sensu_: maintainers: dmsimard $modules/sensu_check.py: @@ -696,617 +1134,105 @@ files: maintainers: smbambling $modules/sensu_subscription.py: maintainers: andsens + $modules/seport.py: + maintainers: dankeder + $modules/serverless.py: + ignore: ryansb + $modules/shutdown.py: + maintainers: nitzmahone samdoran aminvakil + $modules/sl_vm.py: + maintainers: mcltn + $modules/slack.py: + maintainers: ramondelafuente + $modules/slackpkg.py: + maintainers: KimNorgaard + $modules/smartos_image_info.py: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: solaris + maintainers: $team_solaris + $modules/snap.py: + labels: snap + maintainers: angristan vcarceler + $modules/snap_alias.py: + labels: snap + maintainers: russoz + $modules/snmp_facts.py: + maintainers: ogenstad ujwalkomarla + $modules/solaris_zone.py: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: solaris + maintainers: $team_solaris pmarkham + $modules/sorcery.py: + maintainers: vaygr $modules/spectrum_device.py: maintainers: orgito $modules/spectrum_model_attrs.py: maintainers: tgates81 + $modules/spotinst_aws_elastigroup.py: + maintainers: talzur + $modules/ss_3par_cpg.py: + maintainers: farhan7500 gautamphegde + $modules/ssh_config.py: + maintainers: gaqzi Akasurde $modules/stackdriver.py: maintainers: bwhaley + $modules/stacki_host.py: + labels: stacki_host + maintainers: bsanders bbyhuy $modules/statsd.py: maintainers: mamercad $modules/statusio_maintenance.py: maintainers: bhcopeland - $modules/uptimerobot.py: - maintainers: nate-kingsley - $modules/cloudflare_dns.py: - maintainers: mgruener - labels: cloudflare_dns - $modules/dnsimple.py: - maintainers: drcapulet - $modules/dnsimple_info.py: - maintainers: edhilgendorf - $modules/dnsmadeeasy.py: - maintainers: briceburg - $modules/gandi_livedns.py: - maintainers: gthiemonge - $modules/haproxy.py: - maintainers: ravibhure Normo - $modules/infinity.py: - maintainers: MeganLiu - $modules/ip_netns.py: - maintainers: bregman-arie - $modules/ipify_facts.py: - maintainers: resmo - $modules/ipinfoio_facts.py: - maintainers: akostyuk - $modules/ipwcli_dns.py: - maintainers: cwollinger - $modules/ldap_attrs.py: - maintainers: drybjed jtyr noles - $modules/ldap_entry.py: - maintainers: jtyr - $modules/ldap_passwd.py: - maintainers: KellerFuchs jtyr - $modules/ldap_search.py: - maintainers: eryx12o45 jtyr - $modules/lldp.py: - labels: lldp - ignore: andyhky - $modules/netcup_dns.py: - maintainers: nbuchwitz - $modules/nsupdate.py: - maintainers: nerzhul - $modules/omapi_host.py: - maintainers: amasolov nerzhul - $modules/pritunl_: - maintainers: Lowess - $modules/nmcli.py: - maintainers: alcamie101 - $modules/snmp_facts.py: - maintainers: ogenstad ujwalkomarla - $modules/bearychat.py: - maintainers: tonyseek - $modules/campfire.py: - maintainers: fabulops - $modules/catapult.py: - maintainers: Jmainguy - $modules/cisco_webex.py: - maintainers: drew-russell - $modules/discord.py: - maintainers: cwollinger - $modules/flowdock.py: - ignore: mcodd - $modules/grove.py: - maintainers: zimbatm - $modules/hipchat.py: - maintainers: pb8226 shirou - $modules/irc.py: - maintainers: jpmens sivel - $modules/jabber.py: - maintainers: bcoca - $modules/logentries_msg.py: - maintainers: jcftang - $modules/mail.py: - maintainers: dagwieers - $modules/matrix.py: - maintainers: jcgruenhage - $modules/mattermost.py: - maintainers: bjolivot - $modules/mqtt.py: - maintainers: jpmens - $modules/nexmo.py: - maintainers: sivel - $modules/office_365_connector_card.py: - maintainers: marc-sensenich - $modules/pushbullet.py: - maintainers: willybarro - $modules/pushover.py: - maintainers: weaselkeeper wopfel - $modules/rocketchat.py: - maintainers: Deepakkothandan - labels: rocketchat - ignore: ramondelafuente - $modules/say.py: - maintainers: $team_ansible_core mpdehaan - $modules/sendgrid.py: - maintainers: makaimc - $modules/slack.py: - maintainers: ramondelafuente - $modules/syslogger.py: - maintainers: garbled1 - $modules/telegram.py: - maintainers: tyouxa loms lomserman - $modules/twilio.py: - maintainers: makaimc - $modules/typetalk.py: - maintainers: tksmd - $modules/ansible_galaxy_install.py: - maintainers: russoz - $modules/bower.py: - maintainers: mwarkentin - $modules/bundler.py: - maintainers: thoiberg - $modules/cargo.py: - maintainers: radek-sprta - $modules/composer.py: - maintainers: dmtrs - ignore: resmo - $modules/cpanm.py: - maintainers: fcuny russoz - $modules/easy_install.py: - maintainers: mattupstate - $modules/gem.py: - maintainers: $team_ansible_core johanwiren - labels: gem - $modules/maven_artifact.py: - maintainers: tumbl3w33d turb - labels: maven_artifact - ignore: chrisisbeef - $modules/npm.py: - maintainers: shane-walker xcambar - labels: npm - ignore: chrishoffman - $modules/pear.py: - labels: pear - ignore: jle64 - $modules/pip_package_info.py: - maintainers: bcoca matburt maxamillion - $modules/pipx.py: - maintainers: russoz - $modules/pipx_info.py: - maintainers: russoz - $modules/yarn.py: - maintainers: chrishoffman verkaufer - $modules/apk.py: - maintainers: tdtrask - labels: apk - ignore: kbrebanov - $modules/apt_repo.py: - maintainers: obirvalger - $modules/apt_rpm.py: - maintainers: evgkrsk - $modules/copr.py: - maintainers: schlupov - $modules/dnf_versionlock.py: - maintainers: moreda - $modules/flatpak.py: - maintainers: $team_flatpak - $modules/flatpak_remote.py: - maintainers: $team_flatpak - $modules/pkg5: - maintainers: $team_solaris mavit - labels: pkg5 solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/homebrew.py: - notify: chris-short - maintainers: $team_macos andrew-d - labels: homebrew macos - ignore: ryansb - keywords: brew cask darwin homebrew macosx macports osx - $modules/homebrew_cask.py: - notify: chris-short - maintainers: $team_macos enriclluelles - labels: homebrew_ macos - ignore: ryansb - keywords: brew cask darwin homebrew macosx macports osx - $modules/homebrew_tap.py: - notify: chris-short - maintainers: $team_macos - labels: homebrew_ macos - ignore: ryansb - keywords: brew cask darwin homebrew macosx macports osx - $modules/installp.py: - maintainers: $team_aix kairoaraujo - labels: aix installp - keywords: aix efix lpar wpar - $modules/layman.py: - maintainers: jirutka - $modules/macports.py: - notify: chris-short - maintainers: $team_macos jcftang - labels: macos macports - ignore: ryansb - keywords: brew cask darwin homebrew macosx macports osx - $modules/mas.py: - maintainers: lukasbestle mheap - $modules/openbsd_pkg.py: - maintainers: $team_bsd eest - labels: bsd openbsd_pkg - ignore: ryansb - keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense - $modules/opkg.py: - maintainers: skinp - $modules/pacman.py: - maintainers: elasticdog indrajitr tchernomax jraby - labels: pacman - ignore: elasticdog - $modules/pacman_key.py: - maintainers: grawlinson - labels: pacman - $modules/pkgin.py: - maintainers: $team_solaris L2G jasperla szinck martinm82 - labels: pkgin solaris - $modules/pkgng.py: - maintainers: $team_bsd bleader - labels: bsd pkgng - ignore: bleader - keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense - $modules/pkgutil.py: - maintainers: $team_solaris dermute - labels: pkgutil solaris - $modules/portage.py: - maintainers: Tatsh wltjr - labels: portage - ignore: sayap - $modules/portinstall.py: - maintainers: $team_bsd berenddeboer - labels: bsd portinstall - ignore: ryansb - keywords: doas dragonfly freebsd iocage jail netbsd openbsd opnsense pfsense - $modules/pulp_repo.py: - maintainers: sysadmind - $modules/redhat_subscription.py: - maintainers: barnabycourt alikins kahowell - labels: redhat_subscription - $modules/rhn_channel.py: - maintainers: vincentvdk alikins $team_rhn - labels: rhn_channel - $modules/rhn_register.py: - maintainers: jlaska $team_rhn - labels: rhn_register - $modules/rhsm_release.py: - maintainers: seandst - $modules/rhsm_repository.py: - maintainers: giovannisciortino - $modules/rpm_ostree_pkg.py: - maintainers: dustymabe Akasurde - $modules/slackpkg.py: - maintainers: KimNorgaard - $modules/snap.py: - maintainers: angristan vcarceler - labels: snap - $modules/snap_alias.py: - maintainers: russoz - labels: snap - $modules/sorcery.py: - maintainers: vaygr - $modules/svr4pkg.py: - maintainers: $team_solaris brontitall - labels: solaris svr4pkg - $modules/swdepot.py: - maintainers: $team_hpux melodous - labels: hpux swdepot - keywords: hp-ux - $modules/swupd.py: - maintainers: hnanni albertomurillo - labels: swupd - $modules/urpmi.py: - maintainers: pmakowski - $modules/xbps.py: - maintainers: dinoocch the-maldridge - $modules/yum_versionlock.py: - maintainers: gyptazy aminvakil - $modules/zypper.py: - maintainers: $team_suse - labels: zypper - ignore: dirtyharrycallahan robinro - $modules/zypper_repository.py: - maintainers: $team_suse - labels: zypper - ignore: matze - $modules/cobbler_: - maintainers: dagwieers - $modules/hpilo_: - maintainers: haad - ignore: dagwieers - $modules/hponcfg.py: - maintainers: haad - ignore: dagwieers - $modules/imc_rest.py: - maintainers: dagwieers - labels: cisco - $modules/ipmi_: - maintainers: bgaifullin cloudnull - $modules/xcc_: - maintainers: panyy3 renxulei - $modules/lxca_: - maintainers: navalkp prabhosa - $modules/manageiq_: - labels: manageiq - maintainers: $team_manageiq - $modules/manageiq_alert_profiles.py: - maintainers: elad661 - $modules/manageiq_alerts.py: - maintainers: elad661 - $modules/manageiq_group.py: - maintainers: evertmulder - $modules/manageiq_policies_info.py: - maintainers: russoz $team_manageiq - $modules/manageiq_tags_info.py: - maintainers: russoz $team_manageiq - $modules/manageiq_tenant.py: - maintainers: evertmulder - $modules/oneview_: - maintainers: adriane-cardozo fgbulsoni tmiotto - $modules/oneview_datacenter_info.py: - maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr - $modules/oneview_fc_network.py: - maintainers: fgbulsoni - $modules/oneview_fcoe_network.py: - maintainers: fgbulsoni - $modules/idrac_: - maintainers: $team_redfish - ignore: jose-delarosa - $modules/ilo_: - maintainers: $team_redfish - ignore: jose-delarosa - $modules/redfish_: - maintainers: $team_redfish - ignore: jose-delarosa - $modules/wdc_: - maintainers: $team_redfish - ignore: jose-delarosa - $modules/wdc_redfish_command.py: - maintainers: $team_wdc - $modules/wdc_redfish_info.py: - maintainers: $team_wdc - $modules/stacki_host.py: - maintainers: bsanders bbyhuy - labels: stacki_host - $modules/wakeonlan.py: - maintainers: dagwieers - $modules/bitbucket_: - maintainers: catcombo - $modules/bzr.py: - maintainers: andreparames - $modules/git_config.py: - maintainers: djmattyg007 mgedmin - $modules/github_deploy_key.py: - maintainers: bincyber - $modules/github_issue.py: - maintainers: Akasurde - $modules/github_key.py: - maintainers: erydo - labels: github_key - ignore: erydo - $modules/github_release.py: - maintainers: adrianmoisey - $modules/github_repo.py: - maintainers: atorrescogollo - $modules/github_: - maintainers: stpierre - $modules/gitlab_: - notify: jlozadad - maintainers: $team_gitlab - keywords: gitlab source_control - $modules/gitlab_project_variable.py: - maintainers: markuman - $modules/gitlab_runner.py: - maintainers: SamyCoenen - $modules/gitlab_user.py: - maintainers: LennertMertens stgrace - $modules/gitlab_branch.py: - maintainers: paytroff - $modules/hg.py: - maintainers: yeukhon - $modules/emc_vnx_sg_member.py: - maintainers: remixtj - $modules/ss_3par_cpg.py: - maintainers: farhan7500 gautamphegde - $modules/ibm_sa_: - maintainers: tzure - $modules/pmem.py: - maintainers: mizumm - $modules/vexata_: - maintainers: vexata - $modules/zfs: - maintainers: $team_solaris - labels: solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/zfs.py: - maintainers: johanwiren - $modules/zfs_delegate_admin.py: - maintainers: natefoo - $modules/zpool_facts: - maintainers: $team_solaris - labels: solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/aix: - maintainers: $team_aix - labels: aix - keywords: aix efix lpar wpar - $modules/alternatives.py: - maintainers: mulby - labels: alternatives - ignore: DavidWittman jiuka - $modules/aix_lvol.py: - maintainers: adejoux - $modules/awall.py: - maintainers: tdtrask - $modules/beadm.py: - maintainers: $team_solaris - labels: beadm solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/capabilities.py: - maintainers: natefoo - $modules/cronvar.py: - maintainers: dougluce - $modules/crypttab.py: - maintainers: groks - $modules/dconf.py: - maintainers: azaghal - $modules/dpkg_divert.py: - maintainers: quidame - $modules/facter.py: - maintainers: $team_ansible_core gamethis - labels: facter - $modules/filesystem.py: - maintainers: pilou- abulimov quidame - labels: filesystem - $modules/gconftool2.py: - maintainers: Akasurde kevensen - labels: gconftool2 - $modules/gconftool2_info.py: - maintainers: russoz - labels: gconftool2 - $modules/homectl.py: - maintainers: jameslivulpi - $modules/interfaces_file.py: - maintainers: obourdon hryamzik - labels: interfaces_file - $modules/iptables_state.py: - maintainers: quidame - $modules/keyring.py: - maintainers: ahussey-redhat - $modules/keyring_info.py: - maintainers: ahussey-redhat - $modules/shutdown.py: - maintainers: nitzmahone samdoran aminvakil - $modules/java_cert.py: - maintainers: haad absynth76 - $modules/java_keystore.py: - maintainers: Mogztter quidame - $modules/kernel_blacklist.py: - maintainers: matze - $modules/launchd.py: - maintainers: martinm82 - $modules/lbu.py: - maintainers: kunkku - $modules/listen_ports_facts.py: - maintainers: ndavison - $modules/locale_gen.py: - maintainers: AugustusKling - $modules/lvg.py: - maintainers: abulimov - $modules/lvol.py: - maintainers: abulimov jhoekx zigaSRC unkaputtbar112 - $modules/make.py: - maintainers: LinusU - $modules/mksysb.py: - maintainers: $team_aix - labels: aix mksysb - $modules/modprobe.py: - maintainers: jdauphant mattjeffery - labels: modprobe - ignore: stygstra - $modules/nosh.py: - maintainers: tacatac - $modules/ohai.py: - maintainers: $team_ansible_core mpdehaan - labels: ohai - $modules/open_iscsi.py: - maintainers: srvg - $modules/openwrt_init.py: - maintainers: agaffney - $modules/osx_defaults.py: - notify: chris-short - maintainers: $team_macos notok - labels: macos osx_defaults - keywords: brew cask darwin homebrew macosx macports osx - $modules/pam_limits.py: - maintainers: giovannisciortino - labels: pam_limits - ignore: usawa - $modules/pamd.py: - maintainers: kevensen - $modules/parted.py: - maintainers: ColOfAbRiX rosowiecki jake2184 - $modules/pids.py: - maintainers: saranyasridharan - $modules/puppet.py: - maintainers: nibalizer emonty - labels: puppet - $modules/python_requirements_info.py: - maintainers: willthames - ignore: ryansb - $modules/runit.py: - maintainers: jsumners - $modules/sap_task_list_execute: - maintainers: rainerleber - $modules/sefcontext.py: - maintainers: dagwieers - $modules/selinux_permissive.py: - maintainers: mscherer - $modules/selogin.py: - maintainers: bachradsusi dankeder jamescassell - $modules/seport.py: - maintainers: dankeder - $modules/solaris_zone.py: - maintainers: $team_solaris pmarkham - labels: solaris - keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool - $modules/ssh_config.py: - maintainers: gaqzi Akasurde $modules/sudoers.py: maintainers: JonEllis + $modules/supervisorctl.py: + maintainers: inetfuture mattupstate $modules/svc.py: maintainers: bcoca + $modules/svr4pkg.py: + labels: solaris svr4pkg + maintainers: $team_solaris brontitall + $modules/swdepot.py: + keywords: hp-ux + labels: hpux swdepot + maintainers: $team_hpux melodous + $modules/swupd.py: + labels: swupd + maintainers: hnanni albertomurillo + $modules/syslogger.py: + maintainers: garbled1 $modules/syspatch.py: maintainers: precurse $modules/sysrc.py: maintainers: dlundgren $modules/sysupgrade.py: maintainers: precurse + $modules/taiga_issue.py: + maintainers: lekum + $modules/telegram.py: + maintainers: tyouxa loms lomserman + $modules/terraform.py: + ignore: ryansb + maintainers: m-yosefpor rainerleber $modules/timezone.py: maintainers: indrajitr jasperla tmshn + $modules/twilio.py: + maintainers: makaimc + $modules/typetalk.py: + maintainers: tksmd + $modules/udm_: + maintainers: keachi $modules/ufw.py: - notify: felixfontein - maintainers: ahtik ovcharenko pyykkis labels: ufw - $modules/vdo.py: - maintainers: rhawalsh bgurney-rh - $modules/xfconf.py: - maintainers: russoz jbenden - labels: xfconf - $modules/xfconf_info.py: - maintainers: russoz - labels: xfconf - $modules/xfs_quota.py: - maintainers: bushvin - $modules/apache2_mod_proxy.py: - maintainers: oboukili - $modules/apache2_module.py: - maintainers: berendt n0trax - ignore: robinro - $modules/deploy_helper.py: - maintainers: ramondelafuente - $modules/django_manage.py: - maintainers: russoz - ignore: scottanderson42 tastychutney - labels: django_manage - $modules/ejabberd_user.py: - maintainers: privateip - $modules/gunicorn.py: - maintainers: agmezr - $modules/htpasswd.py: - maintainers: $team_ansible_core - labels: htpasswd - $modules/jboss.py: - maintainers: $team_jboss jhoekx - labels: jboss - $modules/jenkins_build.py: - maintainers: brettmilford unnecessary-username - $modules/jenkins_job.py: - maintainers: sermilrod - $modules/jenkins_job_info.py: - maintainers: stpierre - $modules/jenkins_plugin.py: - maintainers: jtyr - $modules/jenkins_script.py: - maintainers: hogarthj - $modules/jira.py: - maintainers: Slezhuk tarka pertoft - ignore: DWSR - labels: jira - $modules/nginx_status_info.py: - maintainers: resmo - $modules/rundeck_acl_policy.py: - maintainers: nerzhul - $modules/rundeck_project.py: - maintainers: nerzhul - $modules/rundeck_job_run.py: - maintainers: phsmith - $modules/rundeck_job_executions_info.py: - maintainers: phsmith + maintainers: ahtik ovcharenko pyykkis + notify: felixfontein + $modules/uptimerobot.py: + maintainers: nate-kingsley + $modules/urpmi.py: + maintainers: pmakowski $modules/utm_: + keywords: sophos utm maintainers: $team_e_spirit - keywords: sophos utm - $modules/utm_proxy_auth_profile.py: - maintainers: $team_e_spirit stearz - keywords: sophos utm - $modules/utm_proxy_exception.py: - maintainers: $team_e_spirit RickS-C137 - keywords: sophos utm $modules/utm_ca_host_key_cert.py: maintainers: stearz $modules/utm_ca_host_key_cert_info.py: @@ -1315,24 +1241,98 @@ files: maintainers: steamx $modules/utm_network_interface_address_info.py: maintainers: steamx - $modules/supervisorctl.py: - maintainers: inetfuture mattupstate - $modules/taiga_issue.py: - maintainers: lekum + $modules/utm_proxy_auth_profile.py: + keywords: sophos utm + maintainers: $team_e_spirit stearz + $modules/utm_proxy_exception.py: + keywords: sophos utm + maintainers: $team_e_spirit RickS-C137 + $modules/vdo.py: + maintainers: rhawalsh bgurney-rh + $modules/vertica_: + maintainers: dareko + $modules/vexata_: + maintainers: vexata + $modules/vmadm.py: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: solaris + maintainers: $team_solaris + $modules/wakeonlan.py: + maintainers: dagwieers + $modules/wdc_: + ignore: jose-delarosa + maintainers: $team_redfish + $modules/wdc_redfish_command.py: + maintainers: $team_wdc + $modules/wdc_redfish_info.py: + maintainers: $team_wdc + $modules/webfaction_: + maintainers: quentinsf + $modules/xattr.py: + labels: xattr + maintainers: bcoca + $modules/xbps.py: + maintainers: dinoocch the-maldridge + $modules/xcc_: + maintainers: panyy3 renxulei + $modules/xenserver_: + maintainers: bvitnik + $modules/xenserver_facts.py: + ignore: andyhky ryansb + labels: xenserver_facts + maintainers: caphrim007 cheese + $modules/xfconf.py: + labels: xfconf + maintainers: russoz jbenden + $modules/xfconf_info.py: + labels: xfconf + maintainers: russoz + $modules/xfs_quota.py: + maintainers: bushvin + $modules/xml.py: + ignore: magnus919 + labels: m:xml xml + maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0 + $modules/yarn.py: + maintainers: chrishoffman verkaufer + $modules/yum_versionlock.py: + maintainers: gyptazy aminvakil + $modules/zfs: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: solaris + maintainers: $team_solaris + $modules/zfs.py: + maintainers: johanwiren + $modules/zfs_delegate_admin.py: + maintainers: natefoo + $modules/znode.py: + maintainers: treyperry + $modules/zpool_facts: + keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool + labels: solaris + maintainers: $team_solaris + $modules/zypper.py: + ignore: dirtyharrycallahan robinro + labels: zypper + maintainers: $team_suse + $modules/zypper_repository.py: + ignore: matze + labels: zypper + maintainers: $team_suse $tests/a_module.py: maintainers: felixfontein ######################### tests/: labels: tests - tests/unit/: - labels: unit - support: community tests/integration: labels: integration support: community - tests/utils/: - maintainers: gundalow + tests/unit/: labels: unit + support: community + tests/utils/: + labels: unit + maintainers: gundalow macros: actions: plugins/action becomes: plugins/become From be0b5e5f8c363791403246ca5e49f1a63adf4446 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Sun, 6 Nov 2022 05:32:35 -0500 Subject: [PATCH 0303/2104] onepassword - Support v2 (#4728) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Begin building out separate classes to support different op cli versions Create separet base classes for each major version. Define the main interface in the base class. Create methods for getting the current version and instantiating the appropriate class based on the found version. * First pass at mostly working CLI version classes * Correct mismathched parameters * Update _run() method to allow updating enviroment This allows passing in the app secret as an env var, which is more secure than using a command line arg. * Continuing to improve the interface * Tear existing tests down to the studs These tests were based off of the LastPass unit tests. I’m going to just start from scratch given the new plugin code is vastly diffenent. * Fix sanity test * CLI config file path can be None * Improve required param checking - only report missing params - use proper grammer based on number of missing params * Change assert_logged_in() method return value Return a boolean value indicating whether or not account is signed in * Improve full login for v2 Have to do a bit of a dance to avoid hitting the interactive prompt if there are no accounts configured. * Remove unused methods * Add some tests * Fix linting errors * Move fixtures to separate file * Restructure mock test data and add more tests * Add boilerplate * Add test scenario for op v2 and increase coverage * Fix up copyright statements * Test v1 and v2 in all cases * Use a more descriptive variable name * Use docstrings rather than pass in abstract class This adds coverage to abstract methods with the least amount of hackery. * Increase test coverage for CLI classes * Sort test parameters to avoid collection errors * Update version tested in docs * Revere test parameter sorting for now The parameters need to be sorted to avoid the issue in older Python versions in CI, but I’m having trouble working out how to do that currently. * Allow passing kwargs to the lookup module under test * Favor label over id for v2 when looking for values Add tests * Display a warning for section on op v2 or greater There is no “value” in section fields. If we wanted to support sections in v2, we would also have to allow specifying the field name in order to override “value”. * Move test cases to their own file Getting a bit unwieldy having it in the test file * Move output into JSON files fore easier reuse * Switch to using get_options() * Add licenses for fixture files * Use get_option() since get_options() was added in Ansible Core 2.12 * Rearrange fixtures * Add changelog * Move common classes to module_utils * Move common classes back to lookup The plugin relies on AnsibleLookupError() quite a bit which is not available in module code. Remove use of display for errors since section isn’t actually deprecated. * Properly handle sections Still room for improvement, but this is at least a start. * Remove some comments that won’t be addressed * Make test gathering more deterministic to avoid failures * Update changelog fragment * Simple fix for making tests reliable --- changelogs/fragments/4728-onepassword-v2.yml | 2 + plugins/lookup/onepassword.py | 533 ++++++++++++++---- plugins/lookup/onepassword_raw.py | 17 +- .../plugins/lookup/onepassword/__init__.py | 0 .../unit/plugins/lookup/onepassword/common.py | 85 +++ .../plugins/lookup/onepassword/conftest.py | 39 ++ .../onepassword/fixtures/v1_out_01.json | 18 + .../fixtures/v1_out_01.json.license | 3 + .../onepassword/fixtures/v1_out_02.json | 18 + .../fixtures/v1_out_02.json.license | 3 + .../onepassword/fixtures/v1_out_03.json | 20 + .../fixtures/v1_out_03.json.license | 3 + .../onepassword/fixtures/v2_out_01.json | 35 ++ .../fixtures/v2_out_01.json.license | 3 + .../onepassword/fixtures/v2_out_02.json | 85 +++ .../fixtures/v2_out_02.json.license | 3 + .../onepassword/fixtures/v2_out_03.json | 103 ++++ .../fixtures/v2_out_03.json.license | 3 + .../lookup/onepassword/test_onepassword.py | 182 ++++++ .../onepassword/test_onepassword_cli_v1.py | 50 ++ .../onepassword/test_onepassword_cli_v2.py | 52 ++ tests/unit/plugins/lookup/test_onepassword.py | 322 ----------- .../plugins/module_utils/test_onepassword.py | 44 ++ 23 files changed, 1196 insertions(+), 427 deletions(-) create mode 100644 changelogs/fragments/4728-onepassword-v2.yml create mode 100644 tests/unit/plugins/lookup/onepassword/__init__.py create mode 100644 tests/unit/plugins/lookup/onepassword/common.py create mode 100644 tests/unit/plugins/lookup/onepassword/conftest.py create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json.license create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json.license create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json.license create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json.license create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json.license create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json create mode 100644 tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json.license create mode 100644 tests/unit/plugins/lookup/onepassword/test_onepassword.py create mode 100644 tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py create mode 100644 tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py delete mode 100644 tests/unit/plugins/lookup/test_onepassword.py create mode 100644 tests/unit/plugins/module_utils/test_onepassword.py diff --git a/changelogs/fragments/4728-onepassword-v2.yml b/changelogs/fragments/4728-onepassword-v2.yml new file mode 100644 index 0000000000..fbec3aa60d --- /dev/null +++ b/changelogs/fragments/4728-onepassword-v2.yml @@ -0,0 +1,2 @@ +minor_changes: + - onepassword - support version 2 of the OnePassword CLI (https://github.com/ansible-collections/community.general/pull/4728) diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index 42e07e9cbf..bbd11d6645 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -55,7 +55,7 @@ DOCUMENTATION = ''' - This lookup stores potentially sensitive data from 1Password as Ansible facts. Facts are subject to caching if enabled, which means this data could be stored in clear text on disk or in a database. - - Tested with C(op) version 0.5.3 + - Tested with C(op) version 2.7.2 ''' EXAMPLES = """ @@ -96,106 +96,123 @@ RETURN = """ elements: str """ -import errno -import json +import abc import os - -from subprocess import Popen, PIPE +import json +import subprocess from ansible.plugins.lookup import LookupBase from ansible.errors import AnsibleLookupError +from ansible.module_utils.common.process import get_bin_path from ansible.module_utils.common.text.converters import to_bytes, to_text +from ansible.module_utils.six import with_metaclass from ansible_collections.community.general.plugins.module_utils.onepassword import OnePasswordConfig -class OnePass(object): - def __init__(self, path='op'): - self.cli_path = path - self.logged_in = False - self.token = None - self.subdomain = None - self.domain = None - self.username = None - self.secret_key = None - self.master_password = None +class OnePassCLIBase(with_metaclass(abc.ABCMeta, object)): + bin = "op" - self._config = OnePasswordConfig() + def __init__(self, subdomain=None, domain="1password.com", username=None, secret_key=None, master_password=None): + self.subdomain = subdomain + self.domain = domain + self.username = username + self.master_password = master_password + self.secret_key = secret_key - def get_token(self): - # If the config file exists, assume an initial signin has taken place and try basic sign in - if os.path.isfile(self._config.config_file_path): + self._path = None + self._version = None - if not self.master_password: - raise AnsibleLookupError('Unable to sign in to 1Password. master_password is required.') + def _check_required_params(self, required_params): + non_empty_attrs = dict((param, getattr(self, param, None)) for param in required_params if getattr(self, param, None)) + missing = set(required_params).difference(non_empty_attrs) + if missing: + prefix = "Unable to sign in to 1Password. Missing required parameter" + plural = "" + suffix = ": {params}.".format(params=", ".join(missing)) + if len(missing) > 1: + plural = "s" - try: - args = ['signin', '--output=raw'] + msg = "{prefix}{plural}{suffix}".format(prefix=prefix, plural=plural, suffix=suffix) + raise AnsibleLookupError(msg) - if self.subdomain: - args = ['signin', self.subdomain, '--output=raw'] + @abc.abstractmethod + def _parse_field(self, data_json, field_name, section_title): + """Main method for parsing data returned from the op command line tool""" - rc, out, err = self._run(args, command_input=to_bytes(self.master_password)) - self.token = out.strip() + def _run(self, args, expected_rc=0, command_input=None, ignore_errors=False, environment_update=None): + command = [self.path] + args + call_kwargs = { + "stdout": subprocess.PIPE, + "stderr": subprocess.PIPE, + "stdin": subprocess.PIPE, + } - except AnsibleLookupError: - self.full_login() + if environment_update: + env = os.environ.copy() + env.update(environment_update) + call_kwargs["env"] = env - else: - # Attempt a full sign in since there appears to be no existing sign in - self.full_login() - - def assert_logged_in(self): - try: - rc, out, err = self._run(['get', 'account'], ignore_errors=True) - if rc == 0: - self.logged_in = True - if not self.logged_in: - self.get_token() - except OSError as e: - if e.errno == errno.ENOENT: - raise AnsibleLookupError("1Password CLI tool '%s' not installed in path on control machine" % self.cli_path) - raise e - - def get_raw(self, item_id, vault=None): - args = ["get", "item", item_id] - if vault is not None: - args += ['--vault={0}'.format(vault)] - if not self.logged_in: - args += [to_bytes('--session=') + self.token] - rc, output, dummy = self._run(args) - return output - - def get_field(self, item_id, field, section=None, vault=None): - output = self.get_raw(item_id, vault) - return self._parse_field(output, field, section) if output != '' else '' - - def full_login(self): - if None in [self.subdomain, self.username, self.secret_key, self.master_password]: - raise AnsibleLookupError('Unable to perform initial sign in to 1Password. ' - 'subdomain, username, secret_key, and master_password are required to perform initial sign in.') - - args = [ - 'signin', - '{0}.{1}'.format(self.subdomain, self.domain), - to_bytes(self.username), - to_bytes(self.secret_key), - '--output=raw', - ] - - rc, out, err = self._run(args, command_input=to_bytes(self.master_password)) - self.token = out.strip() - - def _run(self, args, expected_rc=0, command_input=None, ignore_errors=False): - command = [self.cli_path] + args - p = Popen(command, stdout=PIPE, stderr=PIPE, stdin=PIPE) + p = subprocess.Popen(command, **call_kwargs) out, err = p.communicate(input=command_input) rc = p.wait() + if not ignore_errors and rc != expected_rc: raise AnsibleLookupError(to_text(err)) + return rc, out, err - def _parse_field(self, data_json, field_name, section_title=None): + @abc.abstractmethod + def assert_logged_in(self): + """Check whether a login session exists""" + + @abc.abstractmethod + def full_signin(self): + """Performa full login""" + + @abc.abstractmethod + def get_raw(self, item_id, vault=None, token=None): + """Gets the specified item from the vault""" + + @abc.abstractmethod + def signin(self): + """Sign in using the master password""" + + @property + def path(self): + if self._path is None: + self._path = get_bin_path(self.bin) + + return self._path + + @property + def version(self): + if self._version is None: + self._version = self.get_current_version() + + return self._version + + @classmethod + def get_current_version(cls): + """Standalone method to get the op CLI version. Useful when determining which class to load + based on the current version.""" + try: + bin_path = get_bin_path(cls.bin) + except ValueError: + raise AnsibleLookupError("Unable to locate '%s' command line tool" % cls.bin) + + try: + b_out = subprocess.check_output([bin_path, "--version"], stderr=subprocess.PIPE) + except subprocess.CalledProcessError as cpe: + raise AnsibleLookupError("Unable to get the op version: %s" % cpe) + + return to_text(b_out).strip() + + +class OnePassCLIv1(OnePassCLIBase): + supports_version = "1" + + def _parse_field(self, data_json, field_name, section_title): """ Retrieves the desired field from the `op` response payload @@ -249,36 +266,356 @@ class OnePass(object): # check the details dictionary for `field_name` and return it immediately if it exists # when the entry is a "password" instead of a "login" item, the password field is a key # in the `details` dictionary: - if field_name in data['details']: - return data['details'][field_name] + if field_name in data["details"]: + return data["details"][field_name] # when the field is not found above, iterate through the fields list in the object details - for field_data in data['details'].get('fields', []): - if field_data.get('name', '').lower() == field_name.lower(): - return field_data.get('value', '') - for section_data in data['details'].get('sections', []): - if section_title is not None and section_title.lower() != section_data['title'].lower(): + for field_data in data["details"].get("fields", []): + if field_data.get("name", "").lower() == field_name.lower(): + return field_data.get("value", "") + + for section_data in data["details"].get("sections", []): + if section_title is not None and section_title.lower() != section_data["title"].lower(): continue - for field_data in section_data.get('fields', []): - if field_data.get('t', '').lower() == field_name.lower(): - return field_data.get('v', '') - return '' + + for field_data in section_data.get("fields", []): + if field_data.get("t", "").lower() == field_name.lower(): + return field_data.get("v", "") + + return "" + + def assert_logged_in(self): + args = ["get", "account"] + if self.subdomain: + account = "{subdomain}.{domain}".format(subdomain=self.subdomain, domain=self.domain) + args.extend(["--account", account]) + + rc, out, err = self._run(args, ignore_errors=True) + + return not bool(rc) + + def full_signin(self): + required_params = [ + "subdomain", + "username", + "secret_key", + "master_password", + ] + self._check_required_params(required_params) + + args = [ + "signin", + "{0}.{1}".format(self.subdomain, self.domain), + to_bytes(self.username), + to_bytes(self.secret_key), + "--raw", + ] + + return self._run(args, command_input=to_bytes(self.master_password)) + + def get_raw(self, item_id, vault=None, token=None): + args = ["get", "item", item_id] + if vault is not None: + args += ["--vault={0}".format(vault)] + + if token is not None: + args += [to_bytes("--session=") + token] + + return self._run(args) + + def signin(self): + self._check_required_params(['master_password']) + + args = ["signin", "--raw"] + if self.subdomain: + args.append(self.subdomain) + + return self._run(args, command_input=to_bytes(self.master_password)) + + +class OnePassCLIv2(OnePassCLIBase): + """ + CLIv2 Syntax Reference: https://developer.1password.com/docs/cli/upgrade#step-2-update-your-scripts + """ + supports_version = "2" + + def _parse_field(self, data_json, field_name, section_title=None): + """ + Schema reference: https://developer.1password.com/docs/cli/item-template-json + + Example Data: + + # Password item + { + "id": "ywvdbojsguzgrgnokmcxtydgdv", + "title": "Authy Backup", + "version": 1, + "vault": { + "id": "bcqxysvcnejjrwzoqrwzcqjqxc", + "name": "Personal" + }, + "category": "PASSWORD", + "last_edited_by": "7FUPZ8ZNE02KSHMAIMKHIVUE17", + "created_at": "2015-01-18T13:13:38Z", + "updated_at": "2016-02-20T16:23:54Z", + "additional_information": "Jan 18, 2015, 08:13:38", + "fields": [ + { + "id": "password", + "type": "CONCEALED", + "purpose": "PASSWORD", + "label": "password", + "value": "OctoberPoppyNuttyDraperySabbath", + "reference": "op://Personal/Authy Backup/password", + "password_details": { + "strength": "FANTASTIC" + } + }, + { + "id": "notesPlain", + "type": "STRING", + "purpose": "NOTES", + "label": "notesPlain", + "value": "Backup password to restore Authy", + "reference": "op://Personal/Authy Backup/notesPlain" + } + ] + } + + # Login item + { + "id": "awk4s2u44fhnrgppszcsvc663i", + "title": "Dummy Login", + "version": 2, + "vault": { + "id": "stpebbaccrq72xulgouxsk4p7y", + "name": "Personal" + }, + "category": "LOGIN", + "last_edited_by": "LSGPJERUYBH7BFPHMZ2KKGL6AU", + "created_at": "2018-04-25T21:55:19Z", + "updated_at": "2018-04-25T21:56:06Z", + "additional_information": "agent.smith", + "urls": [ + { + "primary": true, + "href": "https://acme.com" + } + ], + "sections": [ + { + "id": "linked items", + "label": "Related Items" + } + ], + "fields": [ + { + "id": "username", + "type": "STRING", + "purpose": "USERNAME", + "label": "username", + "value": "agent.smith", + "reference": "op://Personal/Dummy Login/username" + }, + { + "id": "password", + "type": "CONCEALED", + "purpose": "PASSWORD", + "label": "password", + "value": "Q7vFwTJcqwxKmTU]Dzx7NW*wrNPXmj", + "entropy": 159.6083697084228, + "reference": "op://Personal/Dummy Login/password", + "password_details": { + "entropy": 159, + "generated": true, + "strength": "FANTASTIC" + } + }, + { + "id": "notesPlain", + "type": "STRING", + "purpose": "NOTES", + "label": "notesPlain", + "reference": "op://Personal/Dummy Login/notesPlain" + } + ] + } + """ + data = json.loads(data_json) + for field in data.get("fields", []): + if section_title is None: + # If the field name exists in the section, return that value + if field.get(field_name): + return field.get(field_name) + + # If the field name doesn't exist in the section, match on the value of "label" + # then "id" and return "value" + if field.get("label") == field_name: + return field["value"] + + if field.get("id") == field_name: + return field["value"] + + # Look at the section data and get an indentifier. The value of 'id' is either a unique ID + # or a human-readable string. If a 'label' field exists, prefer that since + # it is the value visible in the 1Password UI when both 'id' and 'label' exist. + section = field.get("section", {}) + current_section_title = section.get("label", section.get("id")) + if section_title == current_section_title: + # In the correct section. Check "label" then "id" for the desired field_name + if field.get("label") == field_name: + return field["value"] + + if field.get("id") == field_name: + return field["value"] + + return "" + + def assert_logged_in(self): + args = ["account", "list"] + if self.subdomain: + account = "{subdomain}.{domain}".format(subdomain=self.subdomain, domain=self.domain) + args.extend(["--account", account]) + + rc, out, err = self._run(args) + + if out: + # Running 'op account get' if there are no accounts configured on the system drops into + # an interactive prompt. Only run 'op account get' after first listing accounts to see + # if there are any previously configured accounts. + args = ["account", "get"] + if self.subdomain: + account = "{subdomain}.{domain}".format(subdomain=self.subdomain, domain=self.domain) + args.extend(["--account", account]) + + rc, out, err = self._run(args) + + return not bool(rc) + + return False + + def full_signin(self): + required_params = [ + "subdomain", + "username", + "secret_key", + "master_password", + ] + self._check_required_params(required_params) + + args = [ + "account", "add", "--raw", + "--address", "{0}.{1}".format(self.subdomain, self.domain), + "--email", to_bytes(self.username), + "--signin", + ] + + environment_update = {"OP_SECRET_KEY": self.secret_key} + return self._run(args, command_input=to_bytes(self.master_password), environment_update=environment_update) + + def get_raw(self, item_id, vault=None, token=None): + args = ["item", "get", item_id, "--format", "json"] + if vault is not None: + args += ["--vault={0}".format(vault)] + if token is not None: + args += [to_bytes("--session=") + token] + + return self._run(args) + + def signin(self): + self._check_required_params(['master_password']) + + args = ["signin", "--raw"] + if self.subdomain: + args.extend(["--account", self.subdomain]) + + return self._run(args, command_input=to_bytes(self.master_password)) + + +class OnePass(object): + def __init__(self, subdomain=None, domain="1password.com", username=None, secret_key=None, master_password=None): + self.subdomain = subdomain + self.domain = domain + self.username = username + self.secret_key = secret_key + self.master_password = master_password + + self.logged_in = False + self.token = None + + self._config = OnePasswordConfig() + self._cli = self._get_cli_class() + + def _get_cli_class(self): + version = OnePassCLIBase.get_current_version() + for cls in OnePassCLIBase.__subclasses__(): + if cls.supports_version == version.split(".")[0]: + try: + return cls(self.subdomain, self.domain, self.username, self.secret_key, self.master_password) + except TypeError as e: + raise AnsibleLookupError(e) + + raise AnsibleLookupError("op version %s is unsupported" % version) + + def set_token(self): + if self._config.config_file_path and os.path.isfile(self._config.config_file_path): + # If the config file exists, assume an initial sign in has taken place and try basic sign in + try: + rc, out, err = self._cli.signin() + except AnsibleLookupError as exc: + test_strings = ( + "missing required parameters", + "unauthorized", + ) + if any(string in exc.message.lower() for string in test_strings): + # A required parameter is missing, or a bad master password was supplied + # so don't bother attempting a full signin + raise + + rc, out, err = self._cli.full_signin() + + self.token = out.strip() + + else: + # Attempt a full signin since there appears to be no existing signin + rc, out, err = self._cli.full_signin() + self.token = out.strip() + + def assert_logged_in(self): + logged_in = self._cli.assert_logged_in() + if logged_in: + self.logged_in = logged_in + pass + else: + self.set_token() + + def get_raw(self, item_id, vault=None): + rc, out, err = self._cli.get_raw(item_id, vault, self.token) + return out + + def get_field(self, item_id, field, section=None, vault=None): + output = self.get_raw(item_id, vault) + if output: + return self._cli._parse_field(output, field, section) + + return "" class LookupModule(LookupBase): def run(self, terms, variables=None, **kwargs): - op = OnePass() + self.set_options(var_options=variables, direct=kwargs) - field = kwargs.get('field', 'password') - section = kwargs.get('section') - vault = kwargs.get('vault') - op.subdomain = kwargs.get('subdomain') - op.domain = kwargs.get('domain', '1password.com') - op.username = kwargs.get('username') - op.secret_key = kwargs.get('secret_key') - op.master_password = kwargs.get('master_password', kwargs.get('vault_password')) + field = self.get_option("field") + section = self.get_option("section") + vault = self.get_option("vault") + subdomain = self.get_option("subdomain") + domain = self.get_option("domain") + username = self.get_option("username") + secret_key = self.get_option("secret_key") + master_password = self.get_option("master_password") + op = OnePass(subdomain, domain, username, secret_key, master_password) op.assert_logged_in() values = [] diff --git a/plugins/lookup/onepassword_raw.py b/plugins/lookup/onepassword_raw.py index 9a1e0741a0..c7b9332953 100644 --- a/plugins/lookup/onepassword_raw.py +++ b/plugins/lookup/onepassword_raw.py @@ -47,7 +47,7 @@ DOCUMENTATION = ''' - This lookup stores potentially sensitive data from 1Password as Ansible facts. Facts are subject to caching if enabled, which means this data could be stored in clear text on disk or in a database. - - Tested with C(op) version 0.5.3 + - Tested with C(op) version 2.7.0 ''' EXAMPLES = """ @@ -76,18 +76,21 @@ from ansible.plugins.lookup import LookupBase class LookupModule(LookupBase): def run(self, terms, variables=None, **kwargs): - op = OnePass() + self.set_options(var_options=variables, direct=kwargs) - vault = kwargs.get('vault') - op.subdomain = kwargs.get('subdomain') - op.username = kwargs.get('username') - op.secret_key = kwargs.get('secret_key') - op.master_password = kwargs.get('master_password', kwargs.get('vault_password')) + vault = self.get_option("vault") + subdomain = self.get_option("subdomain") + domain = self.get_option("domain", "1password.com") + username = self.get_option("username") + secret_key = self.get_option("secret_key") + master_password = self.get_option("master_password") + op = OnePass(subdomain, domain, username, secret_key, master_password) op.assert_logged_in() values = [] for term in terms: data = json.loads(op.get_raw(term, vault)) values.append(data) + return values diff --git a/tests/unit/plugins/lookup/onepassword/__init__.py b/tests/unit/plugins/lookup/onepassword/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/plugins/lookup/onepassword/common.py b/tests/unit/plugins/lookup/onepassword/common.py new file mode 100644 index 0000000000..141aea91a3 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/common.py @@ -0,0 +1,85 @@ +# Copyright (c) 2022 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import json + +from ansible_collections.community.general.plugins.lookup.onepassword import ( + OnePassCLIv1, + OnePassCLIv2, +) + + +def load_file(file): + with open((os.path.join(os.path.dirname(__file__), "fixtures", file)), "r") as f: + return json.loads(f.read()) + + +# Intentionally excludes metadata leaf nodes that would exist in real output if not relevant. +MOCK_ENTRIES = { + OnePassCLIv1: [ + { + 'vault_name': 'Acme "Quot\'d" Servers', + 'queries': [ + '0123456789', + 'Mock "Quot\'d" Server' + ], + 'expected': ['t0pS3cret', 't0pS3cret'], + 'output': load_file("v1_out_01.json"), + }, + { + 'vault_name': 'Acme Logins', + 'queries': [ + '9876543210', + 'Mock Website', + 'acme.com' + ], + 'expected': ['t0pS3cret', 't0pS3cret', 't0pS3cret'], + 'output': load_file("v1_out_02.json"), + }, + { + 'vault_name': 'Acme Logins', + 'queries': [ + '864201357' + ], + 'expected': ['vauxhall'], + 'output': load_file("v1_out_03.json"), + }, + ], + OnePassCLIv2: [ + { + "vault_name": "Test Vault", + "queries": [ + "ywvdbojsguzgrgnokmcxtydgdv", + "Authy Backup", + ], + "expected": ["OctoberPoppyNuttyDraperySabbath", "OctoberPoppyNuttyDraperySabbath"], + "output": load_file("v2_out_01.json"), + }, + { + # Request a custom field where ID and label are different + "vault_name": "Test Vault", + "queries": ["Dummy Login"], + "kwargs": { + "field": "password1", + }, + "expected": ["data in custom field"], + "output": load_file("v2_out_02.json") + }, + { + # Request data from a custom section + "vault_name": "Test Vault", + "queries": ["Duplicate Sections"], + "kwargs": { + "field": "s2 text", + "section": "Section 2", + }, + "expected": ["first value"], + "output": load_file("v2_out_03.json") + }, + ], +} diff --git a/tests/unit/plugins/lookup/onepassword/conftest.py b/tests/unit/plugins/lookup/onepassword/conftest.py new file mode 100644 index 0000000000..18afae1a33 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/conftest.py @@ -0,0 +1,39 @@ +# Copyright (c) 2020 Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest + +from ansible_collections.community.general.plugins.lookup.onepassword import OnePass + + +OP_VERSION_FIXTURES = [ + "opv1", + "opv2" +] + + +@pytest.fixture +def fake_op(mocker): + def _fake_op(version): + mocker.patch("ansible_collections.community.general.plugins.lookup.onepassword.OnePassCLIBase.get_current_version", return_value=version) + op = OnePass(None, None, None, None, None) + op._config._config_file_path = "/home/jin/.op/config" + mocker.patch.object(op._cli, "_run") + + return op + + return _fake_op + + +@pytest.fixture +def opv1(fake_op): + return fake_op("1.17.2") + + +@pytest.fixture +def opv2(fake_op): + return fake_op("2.27.2") diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json new file mode 100644 index 0000000000..57eab09c54 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json @@ -0,0 +1,18 @@ +{ + "uuid": "0123456789", + "vaultUuid": "2468", + "overview": { + "title": "Mock \"Quot'd\" Server" + }, + "details": { + "sections": [{ + "title": "", + "fields": [ + {"t": "username", "v": "jamesbond"}, + {"t": "password", "v": "t0pS3cret"}, + {"t": "notes", "v": "Test note with\nmultiple lines and trailing space.\n\n"}, + {"t": "tricksy \"quot'd\" field\\", "v": "\"quot'd\" value"} + ] + }] + } +} diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json.license b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json.license new file mode 100644 index 0000000000..969b956c2e --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2022, Ansible Project diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json new file mode 100644 index 0000000000..da133fe59e --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json @@ -0,0 +1,18 @@ +{ + "uuid": "9876543210", + "vaultUuid": "1357", + "overview": { + "title": "Mock Website", + "URLs": [ + {"l": "website", "u": "https://acme.com/login"} + ] + }, + "details": { + "sections": [{ + "title": "", + "fields": [ + {"t": "password", "v": "t0pS3cret"} + ] + }] + } +} diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json.license b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json.license new file mode 100644 index 0000000000..969b956c2e --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2022, Ansible Project diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json new file mode 100644 index 0000000000..57c7d0f3d6 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json @@ -0,0 +1,20 @@ +{ + "uuid": "864201357", + "vaultUuid": "1357", + "overview": { + "title": "Mock Something" + }, + "details": { + "fields": [ + { + "value": "jbond@mi6.gov.uk", + "name": "emailAddress" + }, + { + "name": "password", + "value": "vauxhall" + }, + {} + ] + } +} diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json.license b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json.license new file mode 100644 index 0000000000..969b956c2e --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2022, Ansible Project diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json new file mode 100644 index 0000000000..7ef0bb0c23 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json @@ -0,0 +1,35 @@ +{ + "id": "ywvdbojsguzgrgnokmcxtydgdv", + "title": "Authy Backup", + "version": 1, + "vault": { + "id": "bcqxysvcnejjrwzoqrwzcqjqxc", + "name": "test vault" + }, + "category": "PASSWORD", + "last_edited_by": "7FUPZ8ZNE02KSHMAIMKHIVUE17", + "created_at": "2015-01-18T13:13:38Z", + "updated_at": "2016-02-20T16:23:54Z", + "additional_information": "Jan 18, 2015, 08:13:38", + "fields": [ + { + "id": "password", + "type": "CONCEALED", + "purpose": "PASSWORD", + "label": "password", + "value": "OctoberPoppyNuttyDraperySabbath", + "reference": "op://Test Vault/Authy Backup/password", + "password_details": { + "strength": "FANTASTIC" + } + }, + { + "id": "notesPlain", + "type": "STRING", + "purpose": "NOTES", + "label": "notesPlain", + "value": "Backup password to restore Authy", + "reference": "op://Test Vault/Authy Backup/notesPlain" + } + ] +} diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json.license b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json.license new file mode 100644 index 0000000000..969b956c2e --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2022, Ansible Project diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json new file mode 100644 index 0000000000..5da2a16d12 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json @@ -0,0 +1,85 @@ +{ + "id": "awk4s2u44fhnrgppszcsvc663i", + "title": "Dummy Login", + "version": 4, + "vault": { + "id": "stpebbaccrq72xulgouxsk4p7y", + "name": "Personal" + }, + "category": "LOGIN", + "last_edited_by": "LSGPJERUYBH7BFPHMZ2KKGL6AU", + "created_at": "2018-04-25T21:55:19Z", + "updated_at": "2022-09-02T17:51:21Z", + "additional_information": "agent.smith", + "urls": [ + { + "primary": true, + "href": "https://acme.com" + } + ], + "sections": [ + { + "id": "add more" + }, + { + "id": "gafaeg7vnqmgrklw5r6yrufyxy", + "label": "COMMANDS" + }, + { + "id": "linked items", + "label": "Related Items" + } + ], + "fields": [ + { + "id": "username", + "type": "STRING", + "purpose": "USERNAME", + "label": "username", + "value": "agent.smith", + "reference": "op://Personal/Dummy Login/username" + }, + { + "id": "password", + "type": "CONCEALED", + "purpose": "PASSWORD", + "label": "password", + "value": "FootworkDegreeReverence", + "entropy": 159.60836791992188, + "reference": "op://Personal/Dummy Login/password", + "password_details": { + "entropy": 159, + "generated": true, + "strength": "FANTASTIC" + } + }, + { + "id": "notesPlain", + "type": "STRING", + "purpose": "NOTES", + "label": "notesPlain", + "reference": "op://Personal/Dummy Login/notesPlain" + }, + { + "id": "7gyjekelk24ghgd4rvafspjbli", + "section": { + "id": "add more" + }, + "type": "STRING", + "label": "title", + "value": "value of the field", + "reference": "op://Personal/Dummy Login/add more/title" + }, + { + "id": "fx4wpzokrxn7tlb3uwpdjfptgm", + "section": { + "id": "gafaeg7vnqmgrklw5r6yrufyxy", + "label": "COMMANDS" + }, + "type": "CONCEALED", + "label": "password1", + "value": "data in custom field", + "reference": "op://Personal/Dummy Login/COMMANDS/password1" + } + ] +} diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json.license b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json.license new file mode 100644 index 0000000000..969b956c2e --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2022, Ansible Project diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json new file mode 100644 index 0000000000..22fbc3f293 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json @@ -0,0 +1,103 @@ +{ + "id": "7t7qu2r35qyvqj3crujd4dqxmy", + "title": "Duplicate Sections", + "version": 3, + "vault": { + "id": "stpebbaccrq72xulgouxsk4p7y", + "name": "Personal" + }, + "category": "LOGIN", + "last_edited_by": "LSGPJERUYBH7BFPHMZ2KKGL6AU", + "created_at": "2022-11-04T17:09:18Z", + "updated_at": "2022-11-04T17:22:19Z", + "additional_information": "flora", + "urls": [ + { + "label": "website", + "primary": true, + "href": "https://acme.com/login" + } + ], + "sections": [ + { + "id": "add more" + }, + { + "id": "7osqcvd43i75teocdzbb6d7mie", + "label": "Section 2" + } + ], + "fields": [ + { + "id": "username", + "type": "STRING", + "purpose": "USERNAME", + "label": "username", + "value": "flora", + "reference": "op://Personal/Duplicate Sections/username" + }, + { + "id": "password", + "type": "CONCEALED", + "purpose": "PASSWORD", + "label": "password", + "value": "PtZGFLAibx-erTo7ywywEvh-n4syas97n-tuF2D.b8DdqA2vCjrvRGkNQxj!Gi9R", + "entropy": 379.564697265625, + "reference": "op://Personal/Duplicate Sections/password", + "password_details": { + "entropy": 379, + "generated": true, + "strength": "FANTASTIC" + } + }, + { + "id": "notesPlain", + "type": "STRING", + "purpose": "NOTES", + "label": "notesPlain", + "reference": "op://Personal/Duplicate Sections/notesPlain" + }, + { + "id": "4saaazkb7arwisj6ysctb4jmm4", + "section": { + "id": "add more" + }, + "type": "STRING", + "label": "text", + "value": "text field the first", + "reference": "op://Personal/Duplicate Sections/add more/text" + }, + { + "id": "4vtfkj4bwcmg7d5uf62wnpkp3a", + "section": { + "id": "add more" + }, + "type": "STRING", + "label": "text", + "value": "text field the second", + "reference": "op://Personal/Duplicate Sections/add more/text" + }, + { + "id": "wbrjnowkrgavpooomtht36gjqu", + "section": { + "id": "7osqcvd43i75teocdzbb6d7mie", + "label": "Section 2" + }, + "type": "STRING", + "label": "s2 text", + "value": "first value", + "reference": "op://Personal/Duplicate Sections/Section 2/s2 text" + }, + { + "id": "bddlz2fj2pebmtfhksbmcexy7m", + "section": { + "id": "7osqcvd43i75teocdzbb6d7mie", + "label": "Section 2" + }, + "type": "STRING", + "label": "s2 text", + "value": "second value", + "reference": "op://Personal/Duplicate Sections/Section 2/s2 text" + } + ] +} diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json.license b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json.license new file mode 100644 index 0000000000..969b956c2e --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2022, Ansible Project diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword.py b/tests/unit/plugins/lookup/onepassword/test_onepassword.py new file mode 100644 index 0000000000..9e943dbfa0 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/test_onepassword.py @@ -0,0 +1,182 @@ +# Copyright (c) 2020 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import itertools +import json +import pytest + +from .conftest import OP_VERSION_FIXTURES +from .common import MOCK_ENTRIES + +from ansible.errors import AnsibleLookupError +from ansible.plugins.loader import lookup_loader +from ansible_collections.community.general.plugins.lookup.onepassword import ( + OnePassCLIv1, + OnePassCLIv2, +) + + +@pytest.mark.parametrize( + ("version", "version_class"), + ( + ("1.17.2", OnePassCLIv1), + ("2.27.4", OnePassCLIv2), + ) +) +def test_op_correct_cli_class(fake_op, version, version_class): + op = fake_op(version) + assert op._cli.version == version + assert isinstance(op._cli, version_class) + + +def test_op_unsupported_cli_version(fake_op): + with pytest.raises(AnsibleLookupError, match="is unsupported"): + fake_op("99.77.77") + + +@pytest.mark.parametrize("op_fixture", OP_VERSION_FIXTURES) +def test_op_set_token_with_config(op_fixture, mocker, request): + op = request.getfixturevalue(op_fixture) + token = "F5417F77529B41B595D7F9D6F76EC057" + mocker.patch("os.path.isfile", return_value=True) + mocker.patch.object(op._cli, "signin", return_value=(0, token + "\n", "")) + + op.set_token() + + assert op.token == token + + +@pytest.mark.parametrize( + ("op_fixture", "message"), + [ + (op, value) + for op in OP_VERSION_FIXTURES + for value in + ( + "Missing required parameters", + "The operation is unauthorized", + ) + ] +) +def test_op_set_token_with_config_missing_args(op_fixture, message, request, mocker): + op = request.getfixturevalue(op_fixture) + mocker.patch("os.path.isfile", return_value=True) + mocker.patch.object(op._cli, "signin", return_value=(99, "", ""), side_effect=AnsibleLookupError(message)) + mocker.patch.object(op._cli, "full_signin", return_value=(0, "", "")) + + with pytest.raises(AnsibleLookupError, match=message): + op.set_token() + + op._cli.full_signin.assert_not_called() + + +@pytest.mark.parametrize("op_fixture", OP_VERSION_FIXTURES) +def test_op_set_token_with_config_full_signin(op_fixture, request, mocker): + op = request.getfixturevalue(op_fixture) + mocker.patch("os.path.isfile", return_value=True) + mocker.patch.object(op._cli, "signin", return_value=(99, "", ""), side_effect=AnsibleLookupError("Raised intentionally")) + mocker.patch.object(op._cli, "full_signin", return_value=(0, "", "")) + + op.set_token() + + op._cli.full_signin.assert_called() + + +@pytest.mark.parametrize("op_fixture", OP_VERSION_FIXTURES) +def test_op_set_token_without_config(op_fixture, request, mocker): + op = request.getfixturevalue(op_fixture) + token = "B988E8A2680A4A348962751A96861FA1" + mocker.patch("os.path.isfile", return_value=False) + mocker.patch.object(op._cli, "signin", return_value=(99, "", "")) + mocker.patch.object(op._cli, "full_signin", return_value=(0, token + "\n", "")) + + op.set_token() + + op._cli.signin.assert_not_called() + assert op.token == token + + +@pytest.mark.parametrize( + ("op_fixture", "login_status"), + [(op, value) for op in OP_VERSION_FIXTURES for value in [False, True]] +) +def test_op_assert_logged_in(mocker, login_status, op_fixture, request): + op = request.getfixturevalue(op_fixture) + mocker.patch.object(op._cli, "assert_logged_in", return_value=login_status) + mocker.patch.object(op, "set_token") + + op.assert_logged_in() + + op._cli.assert_logged_in.assert_called_once() + assert op.logged_in == login_status + + if not login_status: + op.set_token.assert_called_once() + + +@pytest.mark.parametrize("op_fixture", OP_VERSION_FIXTURES) +def test_op_get_raw_v1(mocker, op_fixture, request): + op = request.getfixturevalue(op_fixture) + mocker.patch.object(op._cli, "get_raw", return_value=[99, "RAW OUTPUT", ""]) + + result = op.get_raw("some item") + + assert result == "RAW OUTPUT" + op._cli.get_raw.assert_called_once() + + +@pytest.mark.parametrize( + ("op_fixture", "output", "expected"), + ( + list(itertools.chain([op], d)) + for op in OP_VERSION_FIXTURES + for d in [ + ("RAW OUTPUT", "RAW OUTPUT"), + (None, ""), + ("", ""), + ] + ) +) +def test_op_get_field(mocker, op_fixture, output, expected, request): + op = request.getfixturevalue(op_fixture) + mocker.patch.object(op, "get_raw", return_value=output) + mocker.patch.object(op._cli, "_parse_field", return_value=output) + + result = op.get_field("some item", "some field") + + assert result == expected + + +# This test sometimes fails on older Python versions because the gathered tests mismatch. +# Sort the fixture data to make this reliable +# https://github.com/pytest-dev/pytest-xdist/issues/432 +@pytest.mark.parametrize( + ("cli_class", "vault", "queries", "kwargs", "output", "expected"), + ( + (_cli_class, item["vault_name"], item["queries"], item.get("kwargs", {}), item["output"], item["expected"]) + for _cli_class in MOCK_ENTRIES + for item in MOCK_ENTRIES[_cli_class] + ) +) +def test_op_lookup(mocker, cli_class, vault, queries, kwargs, output, expected): + mocker.patch("ansible_collections.community.general.plugins.lookup.onepassword.OnePass._get_cli_class", cli_class) + mocker.patch("ansible_collections.community.general.plugins.lookup.onepassword.OnePass.assert_logged_in", return_value=True) + mocker.patch("ansible_collections.community.general.plugins.lookup.onepassword.OnePassCLIBase._run", return_value=(0, json.dumps(output), "")) + + op_lookup = lookup_loader.get("community.general.onepassword") + result = op_lookup.run(queries, vault=vault, **kwargs) + + assert result == expected + + +@pytest.mark.parametrize("op_fixture", OP_VERSION_FIXTURES) +def test_signin(op_fixture, request): + op = request.getfixturevalue(op_fixture) + op._cli.master_password = "master_pass" + op._cli.signin() + print(op._cli.version) + op._cli._run.assert_called_once_with(['signin', '--raw'], command_input=b"master_pass") diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py new file mode 100644 index 0000000000..dc9b44af66 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py @@ -0,0 +1,50 @@ +# Copyright (c) 2022 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest + + +from ansible_collections.community.general.plugins.lookup.onepassword import OnePassCLIv1 + + +@pytest.mark.parametrize( + ("args", "rc", "expected_call_args", "expected_call_kwargs", "expected"), + ( + ([], 0, ["get", "account"], {"ignore_errors": True}, True,), + ([], 1, ["get", "account"], {"ignore_errors": True}, False,), + (["acme"], 1, ["get", "account", "--account", "acme.1password.com"], {"ignore_errors": True}, False,), + ) +) +def test_assert_logged_in(mocker, args, rc, expected_call_args, expected_call_kwargs, expected): + mocker.patch.object(OnePassCLIv1, "_run", return_value=[rc, "", ""]) + + op_cli = OnePassCLIv1(*args) + result = op_cli.assert_logged_in() + + op_cli._run.assert_called_with(expected_call_args, **expected_call_kwargs) + assert result == expected + + +def test_full_signin(mocker): + mocker.patch.object(OnePassCLIv1, "_run", return_value=[0, "", ""]) + + op_cli = OnePassCLIv1( + subdomain="acme", + username="bob@acme.com", + secret_key="SECRET", + master_password="ONEKEYTORULETHEMALL", + ) + result = op_cli.full_signin() + + op_cli._run.assert_called_with([ + "signin", + "acme.1password.com", + b"bob@acme.com", + b"SECRET", + "--raw", + ], command_input=b"ONEKEYTORULETHEMALL") + assert result == [0, "", ""] diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py new file mode 100644 index 0000000000..d1a5eac5d3 --- /dev/null +++ b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py @@ -0,0 +1,52 @@ +# Copyright (c) 2022 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest + + +from ansible_collections.community.general.plugins.lookup.onepassword import OnePassCLIv2 + + +@pytest.mark.parametrize( + ("args", "out", "expected_call_args", "expected"), + ( + ([], "list of accounts", ["account", "get"], True,), + (["acme"], "list of accounts", ["account", "get", "--account", "acme.1password.com"], True,), + ([], "", ["account", "list"], False,), + ) +) +def test_assert_logged_in(mocker, args, out, expected_call_args, expected): + mocker.patch.object(OnePassCLIv2, "_run", return_value=[0, out, ""]) + op_cli = OnePassCLIv2(*args) + result = op_cli.assert_logged_in() + + op_cli._run.assert_called_with(expected_call_args) + assert result == expected + + +def test_full_signin(mocker): + mocker.patch.object(OnePassCLIv2, "_run", return_value=[0, "", ""]) + + op_cli = OnePassCLIv2( + subdomain="acme", + username="bob@acme.com", + secret_key="SECRET", + master_password="ONEKEYTORULETHEMALL", + ) + result = op_cli.full_signin() + + op_cli._run.assert_called_with( + [ + "account", "add", "--raw", + "--address", "acme.1password.com", + "--email", b"bob@acme.com", + "--signin", + ], + command_input=b"ONEKEYTORULETHEMALL", + environment_update={'OP_SECRET_KEY': 'SECRET'}, + ) + assert result == [0, "", ""] diff --git a/tests/unit/plugins/lookup/test_onepassword.py b/tests/unit/plugins/lookup/test_onepassword.py deleted file mode 100644 index e639dcddbe..0000000000 --- a/tests/unit/plugins/lookup/test_onepassword.py +++ /dev/null @@ -1,322 +0,0 @@ -# Copyright (c) 2018, Scott Buchanan -# Copyright (c) 2016, Andrew Zenk (test_lastpass.py used as starting point) -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import json -import datetime - -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse - -from argparse import ArgumentParser - - -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible.errors import AnsibleError -from ansible_collections.community.general.plugins.lookup.onepassword import OnePass, LookupModule -from ansible_collections.community.general.plugins.lookup.onepassword_raw import LookupModule as OnePasswordRawLookup - - -# Intentionally excludes metadata leaf nodes that would exist in real output if not relevant. -MOCK_ENTRIES = [ - { - 'vault_name': 'Acme "Quot\'d" Servers', - 'queries': [ - '0123456789', - 'Mock "Quot\'d" Server' - ], - 'output': { - 'uuid': '0123456789', - 'vaultUuid': '2468', - 'overview': { - 'title': 'Mock "Quot\'d" Server' - }, - 'details': { - 'sections': [{ - 'title': '', - 'fields': [ - {'t': 'username', 'v': 'jamesbond'}, - {'t': 'password', 'v': 't0pS3cret'}, - {'t': 'notes', 'v': 'Test note with\nmultiple lines and trailing space.\n\n'}, - {'t': 'tricksy "quot\'d" field\\', 'v': '"quot\'d" value'} - ] - }] - } - } - }, - { - 'vault_name': 'Acme Logins', - 'queries': [ - '9876543210', - 'Mock Website', - 'acme.com' - ], - 'output': { - 'uuid': '9876543210', - 'vaultUuid': '1357', - 'overview': { - 'title': 'Mock Website', - 'URLs': [ - {'l': 'website', 'u': 'https://acme.com/login'} - ] - }, - 'details': { - 'sections': [{ - 'title': '', - 'fields': [ - {'t': 'password', 'v': 't0pS3cret'} - ] - }] - } - } - }, - { - 'vault_name': 'Acme Logins', - 'queries': [ - '864201357' - ], - 'output': { - 'uuid': '864201357', - 'vaultUuid': '1357', - 'overview': { - 'title': 'Mock Something' - }, - 'details': { - 'fields': [ - { - 'value': 'jbond@mi6.gov.uk', - 'name': 'emailAddress' - }, - { - 'name': 'password', - 'value': 'vauxhall' - }, - {}, - ] - } - } - }, -] - - -def get_mock_query_generator(require_field=None): - def _process_field(field, section_title=None): - field_name = field.get('name', field.get('t', '')) - field_value = field.get('value', field.get('v', '')) - - if require_field is None or field_name == require_field: - return entry, query, section_title, field_name, field_value - - for entry in MOCK_ENTRIES: - for query in entry['queries']: - for field in entry['output']['details'].get('fields', []): - fixture = _process_field(field) - if fixture: - yield fixture - for section in entry['output']['details'].get('sections', []): - for field in section['fields']: - fixture = _process_field(field, section['title']) - if fixture: - yield fixture - - -def get_one_mock_query(require_field=None): - generator = get_mock_query_generator(require_field) - return next(generator) - - -class MockOnePass(OnePass): - - _mock_logged_out = False - _mock_timed_out = False - - def _lookup_mock_entry(self, key, vault=None): - for entry in MOCK_ENTRIES: - if vault is not None and vault.lower() != entry['vault_name'].lower() and vault.lower() != entry['output']['vaultUuid'].lower(): - continue - - match_fields = [ - entry['output']['uuid'], - entry['output']['overview']['title'] - ] - - # Note that exactly how 1Password matches on domains in non-trivial cases is neither documented - # nor obvious, so this may not precisely match the real behavior. - urls = entry['output']['overview'].get('URLs') - if urls is not None: - match_fields += [urlparse(url['u']).netloc for url in urls] - - if key in match_fields: - return entry['output'] - - def _run(self, args, expected_rc=0, command_input=None, ignore_errors=False): - parser = ArgumentParser() - - command_parser = parser.add_subparsers(dest='command') - - get_parser = command_parser.add_parser('get') - get_options = ArgumentParser(add_help=False) - get_options.add_argument('--vault') - get_type_parser = get_parser.add_subparsers(dest='object_type') - get_type_parser.add_parser('account', parents=[get_options]) - get_item_parser = get_type_parser.add_parser('item', parents=[get_options]) - get_item_parser.add_argument('item_id') - - args = parser.parse_args(args) - - def mock_exit(output='', error='', rc=0): - if rc != expected_rc: - raise AnsibleError(error) - if error != '': - now = datetime.date.today() - error = '[LOG] {0} (ERROR) {1}'.format(now.strftime('%Y/%m/%d %H:$M:$S'), error) - return rc, output, error - - if args.command == 'get': - if self._mock_logged_out: - return mock_exit(error='You are not currently signed in. Please run `op signin --help` for instructions', rc=1) - - if self._mock_timed_out: - return mock_exit(error='401: Authentication required.', rc=1) - - if args.object_type == 'item': - mock_entry = self._lookup_mock_entry(args.item_id, args.vault) - - if mock_entry is None: - return mock_exit(error='Item {0} not found'.format(args.item_id)) - - return mock_exit(output=json.dumps(mock_entry)) - - if args.object_type == 'account': - # Since we don't actually ever use this output, don't bother mocking output. - return mock_exit() - - raise AnsibleError('Unsupported command string passed to OnePass mock: {0}'.format(args)) - - -class LoggedOutMockOnePass(MockOnePass): - - _mock_logged_out = True - - -class TimedOutMockOnePass(MockOnePass): - - _mock_timed_out = True - - -class TestOnePass(unittest.TestCase): - - def test_onepassword_cli_path(self): - op = MockOnePass(path='/dev/null') - self.assertEqual('/dev/null', op.cli_path) - - def test_onepassword_logged_in(self): - op = MockOnePass() - try: - op.assert_logged_in() - except Exception: - self.fail() - - def test_onepassword_logged_out(self): - op = LoggedOutMockOnePass() - with self.assertRaises(AnsibleError): - op.assert_logged_in() - - def test_onepassword_timed_out(self): - op = TimedOutMockOnePass() - with self.assertRaises(AnsibleError): - op.assert_logged_in() - - def test_onepassword_get(self): - op = MockOnePass() - op.logged_in = True - query_generator = get_mock_query_generator() - for dummy, query, dummy, field_name, field_value in query_generator: - self.assertEqual(field_value, op.get_field(query, field_name)) - - def test_onepassword_get_raw(self): - op = MockOnePass() - op.logged_in = True - for entry in MOCK_ENTRIES: - for query in entry['queries']: - self.assertEqual(json.dumps(entry['output']), op.get_raw(query)) - - def test_onepassword_get_not_found(self): - op = MockOnePass() - op.logged_in = True - self.assertEqual('', op.get_field('a fake query', 'a fake field')) - - def test_onepassword_get_with_section(self): - op = MockOnePass() - op.logged_in = True - dummy, query, section_title, field_name, field_value = get_one_mock_query() - self.assertEqual(field_value, op.get_field(query, field_name, section=section_title)) - - def test_onepassword_get_with_vault(self): - op = MockOnePass() - op.logged_in = True - entry, query, dummy, field_name, field_value = get_one_mock_query() - for vault_query in [entry['vault_name'], entry['output']['vaultUuid']]: - self.assertEqual(field_value, op.get_field(query, field_name, vault=vault_query)) - - def test_onepassword_get_with_wrong_vault(self): - op = MockOnePass() - op.logged_in = True - dummy, query, dummy, field_name, dummy = get_one_mock_query() - self.assertEqual('', op.get_field(query, field_name, vault='a fake vault')) - - def test_onepassword_get_diff_case(self): - op = MockOnePass() - op.logged_in = True - entry, query, section_title, field_name, field_value = get_one_mock_query() - self.assertEqual( - field_value, - op.get_field( - query, - field_name.upper(), - vault=entry['vault_name'].upper(), - section=section_title.upper() - ) - ) - - -@patch('ansible_collections.community.general.plugins.lookup.onepassword.OnePass', MockOnePass) -class TestLookupModule(unittest.TestCase): - - def test_onepassword_plugin_multiple(self): - lookup_plugin = LookupModule() - - entry = MOCK_ENTRIES[0] - field = entry['output']['details']['sections'][0]['fields'][0] - - self.assertEqual( - [field['v']] * len(entry['queries']), - lookup_plugin.run(entry['queries'], field=field['t']) - ) - - def test_onepassword_plugin_default_field(self): - lookup_plugin = LookupModule() - - dummy, query, dummy, dummy, field_value = get_one_mock_query('password') - self.assertEqual([field_value], lookup_plugin.run([query])) - - -@patch('ansible_collections.community.general.plugins.lookup.onepassword_raw.OnePass', MockOnePass) -class TestOnePasswordRawLookup(unittest.TestCase): - - def test_onepassword_raw_plugin_multiple(self): - raw_lookup_plugin = OnePasswordRawLookup() - - entry = MOCK_ENTRIES[0] - raw_value = entry['output'] - - self.assertEqual( - [raw_value] * len(entry['queries']), - raw_lookup_plugin.run(entry['queries']) - ) diff --git a/tests/unit/plugins/module_utils/test_onepassword.py b/tests/unit/plugins/module_utils/test_onepassword.py new file mode 100644 index 0000000000..dbe3918358 --- /dev/null +++ b/tests/unit/plugins/module_utils/test_onepassword.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2022 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os + +import pytest + +from ansible_collections.community.general.plugins.module_utils.onepassword import OnePasswordConfig + + +@pytest.fixture +def os_expanduser(mocker): + def _os_expanduser(path): + return path.replace("~", "/home/testuser") + + mocker.patch("os.path.expanduser", side_effect=_os_expanduser) + + +@pytest.fixture +def exists(mocker): + def _exists(path): + if "op/" in path: + return True + + return os.path.exists(path) + + +def test_op_config(mocker, os_expanduser): + mocker.patch("os.path.exists", side_effect=[False, True]) + op_config = OnePasswordConfig() + + assert "/home/testuser/.config/op/config" == op_config.config_file_path + + +def test_op_no_config(mocker, os_expanduser): + mocker.patch("os.path.exists", return_value=False) + op_config = OnePasswordConfig() + + assert op_config.config_file_path is None From fc817601bc177386fe84a557d881b20a24c9dd7f Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 6 Nov 2022 23:38:38 +1300 Subject: [PATCH 0304/2104] django_manage: add extra tests (#5476) --- .../base_test/simple_project/p1/p1/settings.py | 5 +++++ .../targets/django_manage/tasks/main.yaml | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py index 1b98a0dbff..86b3ae64c6 100644 --- a/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py +++ b/tests/integration/targets/django_manage/files/base_test/simple_project/p1/p1/settings.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -17,6 +18,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ +import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -126,3 +128,6 @@ USE_TZ = True STATIC_URL = '/static/' STATIC_ROOT = '/tmp/django-static' + +if "DJANGO_ANSIBLE_RAISE" in os.environ: + raise ValueError("DJANGO_ANSIBLE_RAISE={0}".format(os.environ["DJANGO_ANSIBLE_RAISE"])) diff --git a/tests/integration/targets/django_manage/tasks/main.yaml b/tests/integration/targets/django_manage/tasks/main.yaml index 0d8c8acbef..c07b538938 100644 --- a/tests/integration/targets/django_manage/tasks/main.yaml +++ b/tests/integration/targets/django_manage/tasks/main.yaml @@ -67,3 +67,18 @@ project_path: "{{ tmp_django_root.path }}/simple_project/p1" command: collectstatic --noinput virtualenv: "{{ tmp_django_root.path }}/venv" + +- name: Trigger exception with environment variable + community.general.django_manage: + project_path: "{{ tmp_django_root.path }}/simple_project/p1" + command: collectstatic --noinput + virtualenv: "{{ tmp_django_root.path }}/venv" + environment: + DJANGO_ANSIBLE_RAISE: blah + ignore_errors: true + register: env_raise + +- name: Check env variable reached manage.py + ansible.builtin.assert: + that: + - "'ValueError: DJANGO_ANSIBLE_RAISE=blah' in env_raise.msg" From fb90b5cbe8a2a11d7df81613feb2630eb4754441 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 6 Nov 2022 23:40:30 +1300 Subject: [PATCH 0305/2104] ansible_galaxy_install: using CmdRunner (#5477) * ansible_galaxy_install: using CmdRunner * fix sanity checks * add changelog fragment --- ...5477-ansible-galaxy-install-cmd-runner.yml | 2 + plugins/modules/ansible_galaxy_install.py | 89 ++++++++++--------- 2 files changed, 47 insertions(+), 44 deletions(-) create mode 100644 changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml diff --git a/changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml b/changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml new file mode 100644 index 0000000000..f480456953 --- /dev/null +++ b/changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible_galaxy_install - refactored module to use ``CmdRunner`` to execute ``ansible-galaxy`` (https://github.com/ansible-collections/community.general/pull/5477). diff --git a/plugins/modules/ansible_galaxy_install.py b/plugins/modules/ansible_galaxy_install.py index 3964cdab9f..5e5ec54eb0 100644 --- a/plugins/modules/ansible_galaxy_install.py +++ b/plugins/modules/ansible_galaxy_install.py @@ -184,10 +184,11 @@ RETURN = """ import re -from ansible_collections.community.general.plugins.module_utils.module_helper import CmdModuleHelper, ArgFormat +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper -class AnsibleGalaxyInstall(CmdModuleHelper): +class AnsibleGalaxyInstall(ModuleHelper): _RE_GALAXY_VERSION = re.compile(r'^ansible-galaxy(?: \[core)? (?P\d+\.\d+\.\d+)(?:\.\w+)?(?:\])?') _RE_LIST_PATH = re.compile(r'^# (?P.*)$') _RE_LIST_COLL = re.compile(r'^(?P\w+\.\w+)\s+(?P[\d\.]+)\s*$') @@ -216,28 +217,33 @@ class AnsibleGalaxyInstall(CmdModuleHelper): command = 'ansible-galaxy' command_args_formats = dict( - type=dict(fmt=lambda v: [] if v == 'both' else [v]), - galaxy_cmd=dict(), - requirements_file=dict(fmt=('-r', '{0}'),), - dest=dict(fmt=('-p', '{0}'),), - force=dict(fmt="--force", style=ArgFormat.BOOLEAN), - no_deps=dict(fmt="--no-deps", style=ArgFormat.BOOLEAN), + type=fmt.as_func(lambda v: [] if v == 'both' else [v]), + galaxy_cmd=fmt.as_list(), + requirements_file=fmt.as_opt_val('-r'), + dest=fmt.as_opt_val('-p'), + force=fmt.as_bool("--force"), + no_deps=fmt.as_bool("--no-deps"), + version=fmt.as_bool("--version"), + name=fmt.as_list(), ) force_lang = "en_US.UTF-8" check_rc = True def _get_ansible_galaxy_version(self): - ansible_galaxy = self.get_bin_path("ansible-galaxy", required=True) - dummy, out, dummy = self.module.run_command([ansible_galaxy, "--version"], check_rc=True) - line = out.splitlines()[0] - match = self._RE_GALAXY_VERSION.match(line) - if not match: - raise RuntimeError("Unable to determine ansible-galaxy version from: {0}".format(line)) - version = match.group("version") - version = tuple(int(x) for x in version.split('.')[:3]) - return version + def process(rc, out, err): + line = out.splitlines()[0] + match = self._RE_GALAXY_VERSION.match(line) + if not match: + self.do_raise("Unable to determine ansible-galaxy version from: {0}".format(line)) + version = match.group("version") + version = tuple(int(x) for x in version.split('.')[:3]) + return version + + with self.runner("version", check_rc=True, output_process=process) as ctx: + return ctx.run(version=True) def __init_module__(self): + self.runner = CmdRunner(self.module, command=self.command, arg_formats=self.command_args_formats, force_lang=self.force_lang) self.ansible_version = self._get_ansible_galaxy_version() if self.ansible_version < (2, 11) and not self.vars.ack_min_ansiblecore211: self.module.deprecate( @@ -260,18 +266,13 @@ class AnsibleGalaxyInstall(CmdModuleHelper): r'|- (?P\w+\.\w+) \((?P[\d\.]+)\))' r' was installed successfully$') - @staticmethod - def _process_output_list(*args): - if "None of the provided paths were usable" in args[1]: - return [] - return args[1].splitlines() - def _list_element(self, _type, path_re, elem_re): - params = ({'type': _type}, {'galaxy_cmd': 'list'}, 'dest') - elems = self.run_command(params=params, - publish_rc=False, publish_out=False, publish_err=False, publish_cmd=False, - process_output=self._process_output_list, - check_rc=False) + def process(rc, out, err): + return [] if "None of the provided paths were usable" in out else out.splitlines() + + with self.runner('type galaxy_cmd dest', output_process=process, check_rc=False) as ctx: + elems = ctx.run(type=_type, galaxy_cmd='list') + elems_dict = {} current_path = None for line in elems: @@ -316,28 +317,28 @@ class AnsibleGalaxyInstall(CmdModuleHelper): self.vars.installed_collections = self._list_collections() def __run__(self): + def process(rc, out, err): + for line in out.splitlines(): + match = self._RE_INSTALL_OUTPUT.match(line) + if not match: + continue + if match.group("collection"): + self.vars.new_collections[match.group("collection")] = match.group("cversion") + if self.is_ansible29: + self.vars.ansible29_change = True + elif match.group("role"): + self.vars.new_roles[match.group("role")] = match.group("rversion") + if self.is_ansible29: + self.vars.ansible29_change = True + if self.is_ansible29: if self.vars.type == 'both': raise ValueError("Type 'both' not supported in Ansible 2.9") self._setup29() else: self._setup210plus() - params = ('type', {'galaxy_cmd': 'install'}, 'force', 'no_deps', 'dest', 'requirements_file', 'name') - self.run_command(params=params) - - def process_command_output(self, rc, out, err): - for line in out.splitlines(): - match = self._RE_INSTALL_OUTPUT.match(line) - if not match: - continue - if match.group("collection"): - self.vars.new_collections[match.group("collection")] = match.group("cversion") - if self.is_ansible29: - self.vars.ansible29_change = True - elif match.group("role"): - self.vars.new_roles[match.group("role")] = match.group("rversion") - if self.is_ansible29: - self.vars.ansible29_change = True + with self.runner("type galaxy_cmd force no_deps dest requirements_file name", output_process=process) as ctx: + ctx.run(galaxy_cmd="install") def main(): From 8fb2228125113782b6d87da03a016a9e01079f06 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 6 Nov 2022 23:41:11 +1300 Subject: [PATCH 0306/2104] snap: fix regex to support option values with whitespaces (#5475) * snap: fix regex to support option values with whitespaces * add changelog fragment --- changelogs/fragments/5475-snap-option-value-whitespace.yml | 2 ++ plugins/modules/snap.py | 4 ++-- tests/integration/targets/snap/tasks/main.yml | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5475-snap-option-value-whitespace.yml diff --git a/changelogs/fragments/5475-snap-option-value-whitespace.yml b/changelogs/fragments/5475-snap-option-value-whitespace.yml new file mode 100644 index 0000000000..c41c70da38 --- /dev/null +++ b/changelogs/fragments/5475-snap-option-value-whitespace.yml @@ -0,0 +1,2 @@ +bugfixes: + - snap - allow values in the ``options`` parameter to contain whitespaces (https://github.com/ansible-collections/community.general/pull/5475). diff --git a/plugins/modules/snap.py b/plugins/modules/snap.py index c50e789c85..a432504472 100644 --- a/plugins/modules/snap.py +++ b/plugins/modules/snap.py @@ -170,7 +170,7 @@ def _state_map(value): class Snap(CmdStateModuleHelper): __disable_re = re.compile(r'(?:\S+\s+){5}(?P\S+)') - __set_param_re = re.compile(r'(?P\S+:)?(?P\S+)=(?P\S+)') + __set_param_re = re.compile(r'(?P\S+:)?(?P\S+)\s*=\s*(?P.+)') module = dict( argument_spec={ 'name': dict(type='list', elements='str', required=True), @@ -342,7 +342,7 @@ class Snap(CmdStateModuleHelper): if selected_snap_name is None or (snap_name is not None and snap_name == selected_snap_name): key = match.group("key") - value = match.group("value") + value = match.group("value").strip() if key not in option_map or key in option_map and option_map[key] != value: option_without_prefix = key + "=" + value diff --git a/tests/integration/targets/snap/tasks/main.yml b/tests/integration/targets/snap/tasks/main.yml index 367376202a..906d741127 100644 --- a/tests/integration/targets/snap/tasks/main.yml +++ b/tests/integration/targets/snap/tasks/main.yml @@ -8,7 +8,9 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- block: +- name: Has-snap block + when: has_snap + block: - name: Make sure package is not installed (hello-world) community.general.snap: name: hello-world @@ -189,5 +191,3 @@ - "'uhttpd:document-root-dir=/tmp' in install_with_option_changed.options_changed" - "'uhttpd:listening-port=8080' not in install_with_option_changed.options_changed" - remove is changed - - when: has_snap From f4bad50bbb9222a057368ba1708ea8bfeb81740f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 6 Nov 2022 11:48:14 +0100 Subject: [PATCH 0307/2104] Prepare 6.0.0 release. --- changelogs/fragments/6.0.0.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/6.0.0.yml diff --git a/changelogs/fragments/6.0.0.yml b/changelogs/fragments/6.0.0.yml new file mode 100644 index 0000000000..347d16861c --- /dev/null +++ b/changelogs/fragments/6.0.0.yml @@ -0,0 +1,3 @@ +release_summary: >- + New major release of community.general with lots of bugfixes, new features, some removed deprecated features, and some other breaking changes. + Please check the coresponding sections of the changelog for more details. From 90ac53d150aabb4301f5e6dde29188d80a70e0be Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 6 Nov 2022 12:52:45 +0100 Subject: [PATCH 0308/2104] Drop stable-3 from weekly CI; migrate stable-4 from nightly to weekly. --- .azure-pipelines/azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index e590812264..52eaf65069 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -30,13 +30,12 @@ schedules: branches: include: - stable-5 - - stable-4 - cron: 0 11 * * 0 displayName: Weekly (old stable branches) always: true branches: include: - - stable-3 + - stable-4 variables: - name: checkoutPath From 8de0221ae63bb7cf78f3c696fabef3e1c71ce6f5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 6 Nov 2022 20:28:56 +0100 Subject: [PATCH 0309/2104] Convert copyright docstings to proper copyright comments (#5480) * Drop stable-3 from weekly CI; migrate stable-4 from nightly to weekly. * Convert copyright docstings to proper copyright comments. --- plugins/modules/one_image.py | 21 +-------------------- plugins/modules/one_image_info.py | 21 +-------------------- plugins/modules/one_service.py | 21 +-------------------- plugins/modules/one_vm.py | 23 ++--------------------- 4 files changed, 5 insertions(+), 81 deletions(-) diff --git a/plugins/modules/one_image.py b/plugins/modules/one_image.py index 04a6b57083..fb255dc590 100644 --- a/plugins/modules/one_image.py +++ b/plugins/modules/one_image.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright (c) Ansible Project +# Copyright (c) 2018, Milan Ilic # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -8,25 +8,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -""" -(c) 2018, Milan Ilic - -This file is part of Ansible - -Ansible is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Ansible is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a clone of the GNU General Public License -along with Ansible. If not, see . -""" - DOCUMENTATION = ''' --- module: one_image diff --git a/plugins/modules/one_image_info.py b/plugins/modules/one_image_info.py index 08521a7acd..a908b46776 100644 --- a/plugins/modules/one_image_info.py +++ b/plugins/modules/one_image_info.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright (c) Ansible Project +# Copyright (c) 2018, Milan Ilic # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -8,25 +8,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -""" -(c) 2018, Milan Ilic - -This file is part of Ansible - -Ansible is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Ansible is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a clone of the GNU General Public License -along with Ansible. If not, see . -""" - DOCUMENTATION = ''' --- module: one_image_info diff --git a/plugins/modules/one_service.py b/plugins/modules/one_service.py index 96f200a39e..6bc3137cc3 100644 --- a/plugins/modules/one_service.py +++ b/plugins/modules/one_service.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright (c) Ansible Project +# Copyright (c) 2017, Milan Ilic # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -8,25 +8,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -""" -(c) 2017, Milan Ilic - -This file is part of Ansible - -Ansible is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Ansible is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Ansible. If not, see . -""" - DOCUMENTATION = ''' --- module: one_service diff --git a/plugins/modules/one_vm.py b/plugins/modules/one_vm.py index dca65d6db3..6bfc793603 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright (c) Ansible Project +# Copyright (c) 2017, Milan Ilic +# Copyright (c) 2019, Jan Meerkamp # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -8,26 +9,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -""" -(c) 2017, Milan Ilic -(c) 2019, Jan Meerkamp - -This file is part of Ansible - -Ansible is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Ansible is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Ansible. If not, see . -""" - DOCUMENTATION = ''' --- module: one_vm From ac6ac732764d16ed9a96f7b92c6ad68c15bbe655 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 6 Nov 2022 21:16:43 +0100 Subject: [PATCH 0310/2104] Document attributes (_info and _facts modules for now) (#5481) * Add attributes docs fragment. * Use attributes for _info and _facts modules. --- plugins/doc_fragments/attributes.py | 89 +++++++++++++++++++ plugins/modules/ali_instance_info.py | 2 + plugins/modules/cloud_init_data_facts.py | 4 + plugins/modules/dnsimple_info.py | 4 + plugins/modules/gconftool2_info.py | 3 + plugins/modules/github_webhook_info.py | 3 + plugins/modules/hpilo_info.py | 3 + plugins/modules/idrac_redfish_info.py | 3 + plugins/modules/ilo_redfish_info.py | 3 + plugins/modules/ipify_facts.py | 4 + plugins/modules/ipinfoio_facts.py | 4 + plugins/modules/jenkins_job_info.py | 3 + plugins/modules/keycloak_realm_info.py | 4 + plugins/modules/keyring_info.py | 3 + plugins/modules/listen_ports_facts.py | 4 + plugins/modules/manageiq_policies_info.py | 2 + plugins/modules/manageiq_tags_info.py | 4 +- plugins/modules/memset_memstore_info.py | 3 + plugins/modules/memset_server_info.py | 3 + plugins/modules/nginx_status_info.py | 3 + plugins/modules/nomad_job_info.py | 2 + plugins/modules/one_image_info.py | 3 + plugins/modules/onepassword_info.py | 3 + plugins/modules/oneview_datacenter_info.py | 6 +- plugins/modules/oneview_enclosure_info.py | 6 +- .../modules/oneview_ethernet_network_info.py | 6 +- plugins/modules/oneview_fc_network_info.py | 6 +- plugins/modules/oneview_fcoe_network_info.py | 6 +- ...oneview_logical_interconnect_group_info.py | 6 +- plugins/modules/oneview_network_set_info.py | 6 +- plugins/modules/oneview_san_manager_info.py | 4 +- plugins/modules/online_server_info.py | 4 +- plugins/modules/online_user_info.py | 4 +- plugins/modules/pip_package_info.py | 5 +- plugins/modules/pipx_info.py | 3 + plugins/modules/pritunl_org_info.py | 2 + plugins/modules/pritunl_user_info.py | 2 + plugins/modules/proxmox_domain_info.py | 5 +- plugins/modules/proxmox_group_info.py | 5 +- plugins/modules/proxmox_storage_info.py | 5 +- plugins/modules/proxmox_tasks_info.py | 2 + plugins/modules/proxmox_user_info.py | 5 +- plugins/modules/python_requirements_info.py | 3 + plugins/modules/rax_facts.py | 7 +- plugins/modules/redfish_info.py | 3 + plugins/modules/redis_data_info.py | 2 + plugins/modules/redis_info.py | 3 + .../modules/rundeck_job_executions_info.py | 2 + .../scaleway_container_namespace_info.py | 3 +- .../scaleway_container_registry_info.py | 3 +- plugins/modules/scaleway_function_info.py | 3 +- .../scaleway_function_namespace_info.py | 3 +- plugins/modules/scaleway_image_info.py | 4 +- plugins/modules/scaleway_ip_info.py | 4 +- plugins/modules/scaleway_organization_info.py | 4 +- .../modules/scaleway_security_group_info.py | 4 +- plugins/modules/scaleway_server_info.py | 4 +- plugins/modules/scaleway_snapshot_info.py | 4 +- plugins/modules/scaleway_volume_info.py | 4 +- plugins/modules/smartos_image_info.py | 3 + plugins/modules/snmp_facts.py | 4 + plugins/modules/utm_aaa_group_info.py | 4 +- plugins/modules/utm_ca_host_key_cert_info.py | 5 +- .../utm_network_interface_address_info.py | 5 +- plugins/modules/utm_proxy_frontend_info.py | 5 +- plugins/modules/utm_proxy_location_info.py | 5 +- plugins/modules/vertica_info.py | 3 + plugins/modules/wdc_redfish_info.py | 3 + plugins/modules/xenserver_facts.py | 10 ++- plugins/modules/xenserver_guest_info.py | 3 +- plugins/modules/xfconf_info.py | 3 + plugins/modules/zfs_facts.py | 4 + plugins/modules/zpool_facts.py | 4 + 73 files changed, 319 insertions(+), 49 deletions(-) create mode 100644 plugins/doc_fragments/attributes.py diff --git a/plugins/doc_fragments/attributes.py b/plugins/doc_fragments/attributes.py new file mode 100644 index 0000000000..da089dff21 --- /dev/null +++ b/plugins/doc_fragments/attributes.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Standard documentation fragment + DOCUMENTATION = r''' +options: {} +attributes: + check_mode: + description: Can run in C(check_mode) and return changed status prediction without modifying target. + diff_mode: + description: Will return details on what has changed (or possibly needs changing in C(check_mode)), when in diff mode. +''' + +# platform: +# description: Target OS/families that can be operated against. +# support: N/A + + # Should be used together with the standard fragment + INFO_MODULE = r''' +options: {} +attributes: + check_mode: + support: full + details: + - This action does not modify state. + diff_mode: + support: N/A + details: + - This action does not modify state. +''' + + CONN = r''' +options: {} +attributes: + become: + description: Is usable alongside C(become) keywords. + connection: + description: Uses the target's configured connection information to execute code on it. + delegation: + description: Can be used in conjunction with C(delegate_to) and related keywords. +''' + + FACTS = r''' +options: {} +attributes: + facts: + description: Action returns an C(ansible_facts) dictionary that will update existing host facts. +''' + + # Should be used together with the standard fragment and the FACTS fragment + FACTS_MODULE = r''' +options: {} +attributes: + check_mode: + support: full + details: + - This action does not modify state. + diff_mode: + support: N/A + details: + - This action does not modify state. + facts: + support: full +''' + + FILES = r''' +options: {} +attributes: + safe_file_operations: + description: Uses Ansible's strict file operation functions to ensure proper permissions and avoid data corruption. +''' + + FLOW = r''' +options: {} +attributes: + action: + description: Indicates this has a corresponding action plugin so some parts of the options can be executed on the controller. + async: + description: Supports being used with the C(async) keyword. +''' diff --git a/plugins/modules/ali_instance_info.py b/plugins/modules/ali_instance_info.py index 4b758477a3..ea7bcc8d4a 100644 --- a/plugins/modules/ali_instance_info.py +++ b/plugins/modules/ali_instance_info.py @@ -60,6 +60,8 @@ requirements: - "footmark >= 1.13.0" extends_documentation_fragment: - community.general.alicloud + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = ''' diff --git a/plugins/modules/cloud_init_data_facts.py b/plugins/modules/cloud_init_data_facts.py index d02fd2301d..df2f77148e 100644 --- a/plugins/modules/cloud_init_data_facts.py +++ b/plugins/modules/cloud_init_data_facts.py @@ -15,6 +15,10 @@ short_description: Retrieve facts of cloud-init. description: - Gathers facts by reading the status.json and result.json of cloud-init. author: René Moser (@resmo) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: filter: description: diff --git a/plugins/modules/dnsimple_info.py b/plugins/modules/dnsimple_info.py index f4a68f509d..959bacbbe8 100644 --- a/plugins/modules/dnsimple_info.py +++ b/plugins/modules/dnsimple_info.py @@ -19,6 +19,10 @@ version_added: "4.2.0" description: Retrieve existing records and domains from DNSimple API. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module + options: name: description: diff --git a/plugins/modules/gconftool2_info.py b/plugins/modules/gconftool2_info.py index acebb44013..f9231104d4 100644 --- a/plugins/modules/gconftool2_info.py +++ b/plugins/modules/gconftool2_info.py @@ -15,6 +15,9 @@ short_description: Retrieve GConf configurations version_added: 5.1.0 description: - This module allows retrieving application preferences from the GConf database, with the help of C(gconftool-2). +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: key: description: diff --git a/plugins/modules/github_webhook_info.py b/plugins/modules/github_webhook_info.py index bc3d3c90fa..a6f7c3e52c 100644 --- a/plugins/modules/github_webhook_info.py +++ b/plugins/modules/github_webhook_info.py @@ -17,6 +17,9 @@ description: - This module was called C(github_webhook_facts) before Ansible 2.9. The usage did not change. requirements: - "PyGithub >= 1.3.5" +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: repository: description: diff --git a/plugins/modules/hpilo_info.py b/plugins/modules/hpilo_info.py index 219885cf41..cef6597e48 100644 --- a/plugins/modules/hpilo_info.py +++ b/plugins/modules/hpilo_info.py @@ -21,6 +21,9 @@ description: - This module requires the C(hpilo) python module. - This module was called C(hpilo_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(community.general.hpilo_info) module no longer returns C(ansible_facts)! +extends_documentation_fragment: +- community.general.attributes +- community.general.attributes.info_module options: host: description: diff --git a/plugins/modules/idrac_redfish_info.py b/plugins/modules/idrac_redfish_info.py index 91e57de14d..cb44a75961 100644 --- a/plugins/modules/idrac_redfish_info.py +++ b/plugins/modules/idrac_redfish_info.py @@ -18,6 +18,9 @@ description: - For use with Dell EMC iDRAC operations that require Redfish OEM extensions. - This module was called C(idrac_redfish_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(community.general.idrac_redfish_info) module no longer returns C(ansible_facts)! +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: category: required: true diff --git a/plugins/modules/ilo_redfish_info.py b/plugins/modules/ilo_redfish_info.py index 4611e620d5..90cafb8ec6 100644 --- a/plugins/modules/ilo_redfish_info.py +++ b/plugins/modules/ilo_redfish_info.py @@ -15,6 +15,9 @@ description: - Builds Redfish URIs locally and sends them to iLO to get information back. - For use with HPE iLO operations that require Redfish OEM extensions. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: category: required: true diff --git a/plugins/modules/ipify_facts.py b/plugins/modules/ipify_facts.py index 8953c02940..ab96d7e949 100644 --- a/plugins/modules/ipify_facts.py +++ b/plugins/modules/ipify_facts.py @@ -17,6 +17,10 @@ description: - If behind NAT and need to know the public IP of your internet gateway. author: - René Moser (@resmo) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: api_url: description: diff --git a/plugins/modules/ipinfoio_facts.py b/plugins/modules/ipinfoio_facts.py index a10b54ecce..676e88d84d 100644 --- a/plugins/modules/ipinfoio_facts.py +++ b/plugins/modules/ipinfoio_facts.py @@ -16,6 +16,10 @@ short_description: "Retrieve IP geolocation facts of a host's IP address" description: - "Gather IP geolocation facts of a host's IP address using ipinfo.io API" author: "Aleksei Kostiuk (@akostyuk)" +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: timeout: description: diff --git a/plugins/modules/jenkins_job_info.py b/plugins/modules/jenkins_job_info.py index 1195a3e03d..ba6a531179 100644 --- a/plugins/modules/jenkins_job_info.py +++ b/plugins/modules/jenkins_job_info.py @@ -18,6 +18,9 @@ description: - This module was called C(jenkins_job_info) before Ansible 2.9. The usage did not change. requirements: - "python-jenkins >= 0.4.12" +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: name: type: str diff --git a/plugins/modules/keycloak_realm_info.py b/plugins/modules/keycloak_realm_info.py index 0956f1b525..5c2ebb4c9e 100644 --- a/plugins/modules/keycloak_realm_info.py +++ b/plugins/modules/keycloak_realm_info.py @@ -26,6 +26,10 @@ description: be returned that way by this module. You may pass single values for attributes when calling the module, and this will be translated into a list suitable for the API. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module + options: auth_keycloak_url: description: diff --git a/plugins/modules/keyring_info.py b/plugins/modules/keyring_info.py index e0c33ce724..5c41ecc4d0 100644 --- a/plugins/modules/keyring_info.py +++ b/plugins/modules/keyring_info.py @@ -26,6 +26,9 @@ requirements: - keyring (Python library) - gnome-keyring (application - required for headless Linux keyring access) - dbus-run-session (application - required for headless Linux keyring access) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: service: description: The name of the service. diff --git a/plugins/modules/listen_ports_facts.py b/plugins/modules/listen_ports_facts.py index fc4afa6d7b..eb1ba09237 100644 --- a/plugins/modules/listen_ports_facts.py +++ b/plugins/modules/listen_ports_facts.py @@ -23,6 +23,10 @@ notes: - | C(ss) returns all processes for each listen address and port. This plugin will return each of them, so multiple entries for the same listen address and port are likely in results. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: command: description: diff --git a/plugins/modules/manageiq_policies_info.py b/plugins/modules/manageiq_policies_info.py index cdf4cafdaf..c10ee95327 100644 --- a/plugins/modules/manageiq_policies_info.py +++ b/plugins/modules/manageiq_policies_info.py @@ -18,6 +18,8 @@ version_added: 5.8.0 short_description: Listing of resource policy_profiles in ManageIQ extends_documentation_fragment: - community.general.manageiq + - community.general.attributes + - community.general.attributes.info_module author: Alexei Znamensky (@russoz) description: diff --git a/plugins/modules/manageiq_tags_info.py b/plugins/modules/manageiq_tags_info.py index 0cdcd5184d..af71e150cb 100644 --- a/plugins/modules/manageiq_tags_info.py +++ b/plugins/modules/manageiq_tags_info.py @@ -15,7 +15,9 @@ module: manageiq_tags_info version_added: 5.8.0 short_description: Retrieve resource tags in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes + - community.general.attributes.info_module author: Alexei Znamensky (@russoz) description: diff --git a/plugins/modules/memset_memstore_info.py b/plugins/modules/memset_memstore_info.py index 1247085ab9..4de803f991 100644 --- a/plugins/modules/memset_memstore_info.py +++ b/plugins/modules/memset_memstore_info.py @@ -19,6 +19,9 @@ notes: description: - Retrieve Memstore product usage information. - This module was called C(memset_memstore_facts) before Ansible 2.9. The usage did not change. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: api_key: required: true diff --git a/plugins/modules/memset_server_info.py b/plugins/modules/memset_server_info.py index b756a8338e..44aa0d8442 100644 --- a/plugins/modules/memset_server_info.py +++ b/plugins/modules/memset_server_info.py @@ -19,6 +19,9 @@ notes: description: - Retrieve server information. - This module was called C(memset_server_facts) before Ansible 2.9. The usage did not change. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: api_key: required: true diff --git a/plugins/modules/nginx_status_info.py b/plugins/modules/nginx_status_info.py index 1c99fb2370..1e1bb10495 100644 --- a/plugins/modules/nginx_status_info.py +++ b/plugins/modules/nginx_status_info.py @@ -16,6 +16,9 @@ short_description: Retrieve information on nginx status. description: - Gathers information from nginx from an URL having C(stub_status) enabled. author: "René Moser (@resmo)" +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: url: type: str diff --git a/plugins/modules/nomad_job_info.py b/plugins/modules/nomad_job_info.py index 5130fd1b60..5ee25a57a4 100644 --- a/plugins/modules/nomad_job_info.py +++ b/plugins/modules/nomad_job_info.py @@ -21,6 +21,8 @@ requirements: - python-nomad extends_documentation_fragment: - community.general.nomad + - community.general.attributes + - community.general.attributes.info_module options: name: description: diff --git a/plugins/modules/one_image_info.py b/plugins/modules/one_image_info.py index a908b46776..938f0ef2a4 100644 --- a/plugins/modules/one_image_info.py +++ b/plugins/modules/one_image_info.py @@ -17,6 +17,9 @@ description: - This module was called C(one_image_facts) before Ansible 2.9. The usage did not change. requirements: - pyone +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: api_url: description: diff --git a/plugins/modules/onepassword_info.py b/plugins/modules/onepassword_info.py index ddf8579cb1..bb814c4439 100644 --- a/plugins/modules/onepassword_info.py +++ b/plugins/modules/onepassword_info.py @@ -29,6 +29,9 @@ description: - This module was called C(onepassword_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(community.general.onepassword_info) module no longer returns C(ansible_facts)! You must now use the C(register) option to use the facts in other tasks. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: search_terms: type: list diff --git a/plugins/modules/oneview_datacenter_info.py b/plugins/modules/oneview_datacenter_info.py index 0d78c2483a..76e752f399 100644 --- a/plugins/modules/oneview_datacenter_info.py +++ b/plugins/modules/oneview_datacenter_info.py @@ -34,8 +34,10 @@ options: elements: str extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.factsparams + - community.general.oneview + - community.general.oneview.factsparams + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/oneview_enclosure_info.py b/plugins/modules/oneview_enclosure_info.py index 1c19d36860..dfef893542 100644 --- a/plugins/modules/oneview_enclosure_info.py +++ b/plugins/modules/oneview_enclosure_info.py @@ -36,8 +36,10 @@ options: elements: raw extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.factsparams + - community.general.oneview + - community.general.oneview.factsparams + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/oneview_ethernet_network_info.py b/plugins/modules/oneview_ethernet_network_info.py index 94b87ff24b..cb58575a3b 100644 --- a/plugins/modules/oneview_ethernet_network_info.py +++ b/plugins/modules/oneview_ethernet_network_info.py @@ -33,8 +33,10 @@ options: type: list elements: str extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.factsparams + - community.general.oneview + - community.general.oneview.factsparams + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/oneview_fc_network_info.py b/plugins/modules/oneview_fc_network_info.py index 2b6377fb35..6927ba438c 100644 --- a/plugins/modules/oneview_fc_network_info.py +++ b/plugins/modules/oneview_fc_network_info.py @@ -28,8 +28,10 @@ options: type: str extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.factsparams + - community.general.oneview + - community.general.oneview.factsparams + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/oneview_fcoe_network_info.py b/plugins/modules/oneview_fcoe_network_info.py index db5c5a59b0..52bcb12c89 100644 --- a/plugins/modules/oneview_fcoe_network_info.py +++ b/plugins/modules/oneview_fcoe_network_info.py @@ -27,8 +27,10 @@ options: - FCoE Network name. type: str extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.factsparams + - community.general.oneview + - community.general.oneview.factsparams + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/oneview_logical_interconnect_group_info.py b/plugins/modules/oneview_logical_interconnect_group_info.py index f0962a996a..8d355cdaa0 100644 --- a/plugins/modules/oneview_logical_interconnect_group_info.py +++ b/plugins/modules/oneview_logical_interconnect_group_info.py @@ -28,8 +28,10 @@ options: - Logical Interconnect Group name. type: str extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.factsparams + - community.general.oneview + - community.general.oneview.factsparams + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/oneview_network_set_info.py b/plugins/modules/oneview_network_set_info.py index caff260220..1c793dbfb5 100644 --- a/plugins/modules/oneview_network_set_info.py +++ b/plugins/modules/oneview_network_set_info.py @@ -36,8 +36,10 @@ options: elements: str extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.factsparams + - community.general.oneview + - community.general.oneview.factsparams + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/oneview_san_manager_info.py b/plugins/modules/oneview_san_manager_info.py index 95497ed8aa..87b3c0534f 100644 --- a/plugins/modules/oneview_san_manager_info.py +++ b/plugins/modules/oneview_san_manager_info.py @@ -36,7 +36,9 @@ options: - C(sort): The sort order of the returned data set." type: dict extends_documentation_fragment: -- community.general.oneview + - community.general.oneview + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/online_server_info.py b/plugins/modules/online_server_info.py index 6ba3e4aa4f..533e0453f9 100644 --- a/plugins/modules/online_server_info.py +++ b/plugins/modules/online_server_info.py @@ -18,7 +18,9 @@ description: author: - "Remy Leone (@remyleone)" extends_documentation_fragment: -- community.general.online + - community.general.online + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/online_user_info.py b/plugins/modules/online_user_info.py index 1086502040..17cbc7d662 100644 --- a/plugins/modules/online_user_info.py +++ b/plugins/modules/online_user_info.py @@ -15,7 +15,9 @@ description: author: - "Remy Leone (@remyleone)" extends_documentation_fragment: -- community.general.online + - community.general.online + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = r''' diff --git a/plugins/modules/pip_package_info.py b/plugins/modules/pip_package_info.py index 6931366c87..c89e47014e 100644 --- a/plugins/modules/pip_package_info.py +++ b/plugins/modules/pip_package_info.py @@ -14,6 +14,9 @@ module: pip_package_info short_description: pip package information description: - Return information about installed pip packages +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: clients: description: @@ -24,7 +27,7 @@ options: type: list elements: path requirements: - - The requested pip executables must be installed on the target. + - The requested pip executables must be installed on the target. author: - Matthew Jones (@matburt) - Brian Coca (@bcoca) diff --git a/plugins/modules/pipx_info.py b/plugins/modules/pipx_info.py index 05b9db1b2d..ff9698e31d 100644 --- a/plugins/modules/pipx_info.py +++ b/plugins/modules/pipx_info.py @@ -16,6 +16,9 @@ short_description: Rretrieves information about applications installed with pipx version_added: 5.6.0 description: - Retrieve details about Python applications installed in isolated virtualenvs using pipx. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: name: description: diff --git a/plugins/modules/pritunl_org_info.py b/plugins/modules/pritunl_org_info.py index 1529239ad9..7f3974e0e5 100644 --- a/plugins/modules/pritunl_org_info.py +++ b/plugins/modules/pritunl_org_info.py @@ -18,6 +18,8 @@ description: - A module to list Pritunl organizations using the Pritunl API. extends_documentation_fragment: - community.general.pritunl + - community.general.attributes + - community.general.attributes.info_module options: organization: type: str diff --git a/plugins/modules/pritunl_user_info.py b/plugins/modules/pritunl_user_info.py index 3a5343f6b6..d4c68ca6e0 100644 --- a/plugins/modules/pritunl_user_info.py +++ b/plugins/modules/pritunl_user_info.py @@ -18,6 +18,8 @@ description: - A module to list Pritunl users using the Pritunl API. extends_documentation_fragment: - community.general.pritunl + - community.general.attributes + - community.general.attributes.info_module options: organization: type: str diff --git a/plugins/modules/proxmox_domain_info.py b/plugins/modules/proxmox_domain_info.py index 2cabf5b3c7..7435695a91 100644 --- a/plugins/modules/proxmox_domain_info.py +++ b/plugins/modules/proxmox_domain_info.py @@ -23,7 +23,10 @@ options: aliases: ['realm', 'name'] type: str author: Tristan Le Guern (@tleguern) -extends_documentation_fragment: community.general.proxmox.documentation +extends_documentation_fragment: + - community.general.proxmox.documentation + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/proxmox_group_info.py b/plugins/modules/proxmox_group_info.py index d2d4491ce2..531a9dae7a 100644 --- a/plugins/modules/proxmox_group_info.py +++ b/plugins/modules/proxmox_group_info.py @@ -23,7 +23,10 @@ options: aliases: ['groupid', 'name'] type: str author: Tristan Le Guern (@tleguern) -extends_documentation_fragment: community.general.proxmox.documentation +extends_documentation_fragment: + - community.general.proxmox.documentation + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/proxmox_storage_info.py b/plugins/modules/proxmox_storage_info.py index a98d3794a9..fd3759364b 100644 --- a/plugins/modules/proxmox_storage_info.py +++ b/plugins/modules/proxmox_storage_info.py @@ -27,7 +27,10 @@ options: - Filter on a specifc storage type. type: str author: Tristan Le Guern (@tleguern) -extends_documentation_fragment: community.general.proxmox.documentation +extends_documentation_fragment: + - community.general.proxmox.documentation + - community.general.attributes + - community.general.attributes.info_module notes: - Storage specific options can be returned by this module, please look at the documentation at U(https://pve.proxmox.com/wiki/Storage). ''' diff --git a/plugins/modules/proxmox_tasks_info.py b/plugins/modules/proxmox_tasks_info.py index c0a3dc6886..183fb3bf0f 100644 --- a/plugins/modules/proxmox_tasks_info.py +++ b/plugins/modules/proxmox_tasks_info.py @@ -30,6 +30,8 @@ options: type: str extends_documentation_fragment: - community.general.proxmox.documentation + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/proxmox_user_info.py b/plugins/modules/proxmox_user_info.py index f1b3b881c9..a515f2b453 100644 --- a/plugins/modules/proxmox_user_info.py +++ b/plugins/modules/proxmox_user_info.py @@ -32,7 +32,10 @@ options: - Restrict results to a specific user ID, which is a concatenation of a user and domain parts. type: str author: Tristan Le Guern (@tleguern) -extends_documentation_fragment: community.general.proxmox.documentation +extends_documentation_fragment: + - community.general.proxmox.documentation + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = ''' diff --git a/plugins/modules/python_requirements_info.py b/plugins/modules/python_requirements_info.py index d96787c7d0..231114a1db 100644 --- a/plugins/modules/python_requirements_info.py +++ b/plugins/modules/python_requirements_info.py @@ -13,6 +13,9 @@ short_description: Show python path and assert dependency versions description: - Get info about available Python requirements on the target host, including listing required libraries and gathering versions. - This module was called C(python_requirements_facts) before Ansible 2.9. The usage did not change. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: dependencies: type: list diff --git a/plugins/modules/rax_facts.py b/plugins/modules/rax_facts.py index 560f05e56a..53657f3c9a 100644 --- a/plugins/modules/rax_facts.py +++ b/plugins/modules/rax_facts.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' module: rax_facts short_description: Gather facts for Rackspace Cloud Servers description: - - Gather facts for Rackspace Cloud Servers. + - Gather facts for Rackspace Cloud Servers. options: address: type: str @@ -30,7 +30,10 @@ options: - Server name to retrieve facts for author: "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module ''' diff --git a/plugins/modules/redfish_info.py b/plugins/modules/redfish_info.py index 4cb42711ad..fd81695368 100644 --- a/plugins/modules/redfish_info.py +++ b/plugins/modules/redfish_info.py @@ -18,6 +18,9 @@ description: - Information retrieved is placed in a location specified by the user. - This module was called C(redfish_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(community.general.redfish_info) module no longer returns C(ansible_facts)! +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: category: required: false diff --git a/plugins/modules/redis_data_info.py b/plugins/modules/redis_data_info.py index c4186ff358..c0af619057 100644 --- a/plugins/modules/redis_data_info.py +++ b/plugins/modules/redis_data_info.py @@ -25,6 +25,8 @@ options: extends_documentation_fragment: - community.general.redis + - community.general.attributes + - community.general.attributes.info_module seealso: - module: community.general.redis_data diff --git a/plugins/modules/redis_info.py b/plugins/modules/redis_info.py index 25b1d80035..b9900a7caf 100644 --- a/plugins/modules/redis_info.py +++ b/plugins/modules/redis_info.py @@ -16,6 +16,9 @@ short_description: Gather information about Redis servers version_added: '0.2.0' description: - Gathers information and statistics about Redis servers. +extends_documentation_fragment: +- community.general.attributes +- community.general.attributes.info_module options: login_host: description: diff --git a/plugins/modules/rundeck_job_executions_info.py b/plugins/modules/rundeck_job_executions_info.py index 2af6eb1d5f..818bde83c0 100644 --- a/plugins/modules/rundeck_job_executions_info.py +++ b/plugins/modules/rundeck_job_executions_info.py @@ -41,6 +41,8 @@ options: extends_documentation_fragment: - community.general.rundeck - url + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = ''' diff --git a/plugins/modules/scaleway_container_namespace_info.py b/plugins/modules/scaleway_container_namespace_info.py index daf5d7b1d6..20ec25d96a 100644 --- a/plugins/modules/scaleway_container_namespace_info.py +++ b/plugins/modules/scaleway_container_namespace_info.py @@ -21,7 +21,8 @@ description: - This module return information about a container namespace on Scaleway account. extends_documentation_fragment: - community.general.scaleway - + - community.general.attributes + - community.general.attributes.info_module options: project_id: diff --git a/plugins/modules/scaleway_container_registry_info.py b/plugins/modules/scaleway_container_registry_info.py index c53e405780..d2a5e61e93 100644 --- a/plugins/modules/scaleway_container_registry_info.py +++ b/plugins/modules/scaleway_container_registry_info.py @@ -21,7 +21,8 @@ description: - This module return information about a container registry on Scaleway account. extends_documentation_fragment: - community.general.scaleway - + - community.general.attributes + - community.general.attributes.info_module options: project_id: diff --git a/plugins/modules/scaleway_function_info.py b/plugins/modules/scaleway_function_info.py index b6f2eefa71..47eca48614 100644 --- a/plugins/modules/scaleway_function_info.py +++ b/plugins/modules/scaleway_function_info.py @@ -21,7 +21,8 @@ description: - This module return information about a function on Scaleway account. extends_documentation_fragment: - community.general.scaleway - + - community.general.attributes + - community.general.attributes.info_module options: namespace_id: diff --git a/plugins/modules/scaleway_function_namespace_info.py b/plugins/modules/scaleway_function_namespace_info.py index 7e02e8e42d..bb0b7fa9df 100644 --- a/plugins/modules/scaleway_function_namespace_info.py +++ b/plugins/modules/scaleway_function_namespace_info.py @@ -21,7 +21,8 @@ description: - This module return information about a function namespace on Scaleway account. extends_documentation_fragment: - community.general.scaleway - + - community.general.attributes + - community.general.attributes.info_module options: project_id: diff --git a/plugins/modules/scaleway_image_info.py b/plugins/modules/scaleway_image_info.py index c68cc99684..ee0134a52a 100644 --- a/plugins/modules/scaleway_image_info.py +++ b/plugins/modules/scaleway_image_info.py @@ -18,7 +18,9 @@ author: - "Yanis Guenane (@Spredzy)" - "Remy Leone (@remyleone)" extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes + - community.general.attributes.info_module options: region: diff --git a/plugins/modules/scaleway_ip_info.py b/plugins/modules/scaleway_ip_info.py index c65c7e6ab9..d8725894e6 100644 --- a/plugins/modules/scaleway_ip_info.py +++ b/plugins/modules/scaleway_ip_info.py @@ -18,7 +18,9 @@ author: - "Yanis Guenane (@Spredzy)" - "Remy Leone (@remyleone)" extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes + - community.general.attributes.info_module options: region: diff --git a/plugins/modules/scaleway_organization_info.py b/plugins/modules/scaleway_organization_info.py index 542b8d4603..aca8a0c43f 100644 --- a/plugins/modules/scaleway_organization_info.py +++ b/plugins/modules/scaleway_organization_info.py @@ -24,7 +24,9 @@ options: default: 'https://account.scaleway.com' aliases: ['base_url'] extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/scaleway_security_group_info.py b/plugins/modules/scaleway_security_group_info.py index 5e2cc95a1c..7fd96fd067 100644 --- a/plugins/modules/scaleway_security_group_info.py +++ b/plugins/modules/scaleway_security_group_info.py @@ -33,7 +33,9 @@ options: - waw1 - EMEA-PL-WAW1 extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/scaleway_server_info.py b/plugins/modules/scaleway_server_info.py index 087be54d24..7a31882ef7 100644 --- a/plugins/modules/scaleway_server_info.py +++ b/plugins/modules/scaleway_server_info.py @@ -18,7 +18,9 @@ author: - "Yanis Guenane (@Spredzy)" - "Remy Leone (@remyleone)" extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes + - community.general.attributes.info_module options: region: diff --git a/plugins/modules/scaleway_snapshot_info.py b/plugins/modules/scaleway_snapshot_info.py index bebf27395c..47cd14cee8 100644 --- a/plugins/modules/scaleway_snapshot_info.py +++ b/plugins/modules/scaleway_snapshot_info.py @@ -18,7 +18,9 @@ author: - "Yanis Guenane (@Spredzy)" - "Remy Leone (@remyleone)" extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes + - community.general.attributes.info_module options: region: diff --git a/plugins/modules/scaleway_volume_info.py b/plugins/modules/scaleway_volume_info.py index 14a8c96884..369fadbe64 100644 --- a/plugins/modules/scaleway_volume_info.py +++ b/plugins/modules/scaleway_volume_info.py @@ -18,7 +18,9 @@ author: - "Yanis Guenane (@Spredzy)" - "Remy Leone (@remyleone)" extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes + - community.general.attributes.info_module options: region: diff --git a/plugins/modules/smartos_image_info.py b/plugins/modules/smartos_image_info.py index fb8c782317..0b5117fc45 100644 --- a/plugins/modules/smartos_image_info.py +++ b/plugins/modules/smartos_image_info.py @@ -18,6 +18,9 @@ description: - This module was called C(smartos_image_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(community.general.smartos_image_info) module no longer returns C(ansible_facts)! author: Adam Števko (@xen0l) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: filters: description: diff --git a/plugins/modules/snmp_facts.py b/plugins/modules/snmp_facts.py index 7683d7308b..71821faaa8 100644 --- a/plugins/modules/snmp_facts.py +++ b/plugins/modules/snmp_facts.py @@ -20,6 +20,10 @@ description: inserted to the ansible_facts key. requirements: - pysnmp +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: host: description: diff --git a/plugins/modules/utm_aaa_group_info.py b/plugins/modules/utm_aaa_group_info.py index 26d06cebfe..a01dad92ac 100644 --- a/plugins/modules/utm_aaa_group_info.py +++ b/plugins/modules/utm_aaa_group_info.py @@ -31,7 +31,9 @@ options: required: true extends_documentation_fragment: -- community.general.utm + - community.general.utm + - community.general.attributes + - community.general.attributes.info_module ''' diff --git a/plugins/modules/utm_ca_host_key_cert_info.py b/plugins/modules/utm_ca_host_key_cert_info.py index f67960eeef..e5de74cd4c 100644 --- a/plugins/modules/utm_ca_host_key_cert_info.py +++ b/plugins/modules/utm_ca_host_key_cert_info.py @@ -30,8 +30,9 @@ options: required: true extends_documentation_fragment: -- community.general.utm - + - community.general.utm + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = """ diff --git a/plugins/modules/utm_network_interface_address_info.py b/plugins/modules/utm_network_interface_address_info.py index d7910e73e4..736ea501ef 100644 --- a/plugins/modules/utm_network_interface_address_info.py +++ b/plugins/modules/utm_network_interface_address_info.py @@ -29,8 +29,9 @@ options: required: true extends_documentation_fragment: -- community.general.utm - + - community.general.utm + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = """ diff --git a/plugins/modules/utm_proxy_frontend_info.py b/plugins/modules/utm_proxy_frontend_info.py index 27a71a013e..0b8e124379 100644 --- a/plugins/modules/utm_proxy_frontend_info.py +++ b/plugins/modules/utm_proxy_frontend_info.py @@ -31,8 +31,9 @@ options: required: true extends_documentation_fragment: -- community.general.utm - + - community.general.utm + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = """ diff --git a/plugins/modules/utm_proxy_location_info.py b/plugins/modules/utm_proxy_location_info.py index b46603f8f1..0e7b165903 100644 --- a/plugins/modules/utm_proxy_location_info.py +++ b/plugins/modules/utm_proxy_location_info.py @@ -31,8 +31,9 @@ options: required: true extends_documentation_fragment: -- community.general.utm - + - community.general.utm + - community.general.attributes + - community.general.attributes.info_module ''' EXAMPLES = """ diff --git a/plugins/modules/vertica_info.py b/plugins/modules/vertica_info.py index 825006ad71..a51187de1d 100644 --- a/plugins/modules/vertica_info.py +++ b/plugins/modules/vertica_info.py @@ -17,6 +17,9 @@ description: - Gathers Vertica database information. - This module was called C(vertica_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(community.general.vertica_info) module no longer returns C(ansible_facts)! +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: cluster: description: diff --git a/plugins/modules/wdc_redfish_info.py b/plugins/modules/wdc_redfish_info.py index 7ba9263b55..038e1a72db 100644 --- a/plugins/modules/wdc_redfish_info.py +++ b/plugins/modules/wdc_redfish_info.py @@ -16,6 +16,9 @@ version_added: 5.4.0 description: - Builds Redfish URIs locally and sends them to remote OOB controllers to get information back. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: category: required: true diff --git a/plugins/modules/xenserver_facts.py b/plugins/modules/xenserver_facts.py index 567aa07adb..10ec3cd50f 100644 --- a/plugins/modules/xenserver_facts.py +++ b/plugins/modules/xenserver_facts.py @@ -16,9 +16,13 @@ short_description: get facts reported on xenserver description: - Reads data out of XenAPI, can be used instead of multiple xe commands. author: - - Andy Hill (@andyhky) - - Tim Rupp (@caphrim007) - - Robin Lee (@cheese) + - Andy Hill (@andyhky) + - Tim Rupp (@caphrim007) + - Robin Lee (@cheese) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: {} ''' diff --git a/plugins/modules/xenserver_guest_info.py b/plugins/modules/xenserver_guest_info.py index 750cc3a84f..5cdd52fc56 100644 --- a/plugins/modules/xenserver_guest_info.py +++ b/plugins/modules/xenserver_guest_info.py @@ -47,7 +47,8 @@ options: type: str extends_documentation_fragment: - community.general.xenserver.documentation - +- community.general.attributes +- community.general.attributes.info_module ''' EXAMPLES = r''' diff --git a/plugins/modules/xfconf_info.py b/plugins/modules/xfconf_info.py index 2bdb745393..149325ebac 100644 --- a/plugins/modules/xfconf_info.py +++ b/plugins/modules/xfconf_info.py @@ -15,6 +15,9 @@ short_description: Retrieve XFCE4 configurations version_added: 3.5.0 description: - This module allows retrieving Xfce 4 configurations with the help of C(xfconf-query). +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: channel: description: diff --git a/plugins/modules/zfs_facts.py b/plugins/modules/zfs_facts.py index 15eef706e5..734659a7ea 100644 --- a/plugins/modules/zfs_facts.py +++ b/plugins/modules/zfs_facts.py @@ -16,6 +16,10 @@ short_description: Gather facts about ZFS datasets. description: - Gather facts from ZFS dataset properties. author: Adam Števko (@xen0l) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: name: description: diff --git a/plugins/modules/zpool_facts.py b/plugins/modules/zpool_facts.py index a749438659..ec5fdc4442 100644 --- a/plugins/modules/zpool_facts.py +++ b/plugins/modules/zpool_facts.py @@ -16,6 +16,10 @@ short_description: Gather facts about ZFS pools. description: - Gather facts from ZFS pool properties. author: Adam Števko (@xen0l) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.facts + - community.general.attributes.facts_module options: name: description: From 7a9af2b601075d546ecb7ccd3860495a0421c6ba Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 7 Nov 2022 18:43:21 +1300 Subject: [PATCH 0311/2104] hponcfg: using CmdRunner (#5483) * hponcfg: using CmdRunner * add changelog fragment --- .../fragments/5483-hponcfg-cmd-runner.yml | 2 ++ plugins/modules/hponcfg.py | 30 ++++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 changelogs/fragments/5483-hponcfg-cmd-runner.yml diff --git a/changelogs/fragments/5483-hponcfg-cmd-runner.yml b/changelogs/fragments/5483-hponcfg-cmd-runner.yml new file mode 100644 index 0000000000..9d6c0eb8a9 --- /dev/null +++ b/changelogs/fragments/5483-hponcfg-cmd-runner.yml @@ -0,0 +1,2 @@ +minor_changes: + - hponcfg - refactored module to use ``CmdRunner`` to execute ``hponcfg`` (https://github.com/ansible-collections/community.general/pull/5483). diff --git a/plugins/modules/hponcfg.py b/plugins/modules/hponcfg.py index 9d2afc0ab1..65e40c46ed 100644 --- a/plugins/modules/hponcfg.py +++ b/plugins/modules/hponcfg.py @@ -73,12 +73,11 @@ EXAMPLES = r''' executable: /opt/hp/tools/hponcfg ''' -from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdModuleHelper, ArgFormat -) +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper -class HPOnCfg(CmdModuleHelper): +class HPOnCfg(ModuleHelper): module = dict( argument_spec=dict( src=dict(type='path', required=True, aliases=['path']), @@ -88,19 +87,22 @@ class HPOnCfg(CmdModuleHelper): ) ) command_args_formats = dict( - src=dict(fmt=["-f", "{0}"]), - verbose=dict(fmt="-v", style=ArgFormat.BOOLEAN), - minfw=dict(fmt=["-m", "{0}"]), + src=cmd_runner_fmt.as_opt_val("-f"), + verbose=cmd_runner_fmt.as_bool("-v"), + minfw=cmd_runner_fmt.as_opt_val("-m"), ) - check_rc = True - - def __init_module__(self): - self.command = self.vars.executable - # Consider every action a change (not idempotent yet!) - self.changed = True def __run__(self): - self.run_command(params=['src', 'verbose', 'minfw']) + runner = CmdRunner( + self.module, + self.vars.executable, + self.command_args_formats, + check_rc=True, + ) + runner(['src', 'verbose', 'minfw']).run() + + # Consider every action a change (not idempotent yet!) + self.changed = True def main(): From c757e20d108963c65de789c501d53a4f74dffd1f Mon Sep 17 00:00:00 2001 From: Yuhua Zou <41054978+ZouYuhua@users.noreply.github.com> Date: Mon, 7 Nov 2022 14:00:55 +0800 Subject: [PATCH 0312/2104] fix the issue#5275: iso_create doesn't add folders (#5468) * fix the issue * add changelog * add changelog file * Update changelogs/fragments/5468-iso-create-not-add-folders.yml Co-authored-by: Felix Fontein --- changelogs/fragments/5468-iso-create-not-add-folders.yml | 2 ++ plugins/modules/iso_create.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5468-iso-create-not-add-folders.yml diff --git a/changelogs/fragments/5468-iso-create-not-add-folders.yml b/changelogs/fragments/5468-iso-create-not-add-folders.yml new file mode 100644 index 0000000000..5bbe48f579 --- /dev/null +++ b/changelogs/fragments/5468-iso-create-not-add-folders.yml @@ -0,0 +1,2 @@ +bugfixes: + - iso_create - the module somtimes failed to add folders for Joliet and UDF formats (https://github.com/ansible-collections/community.general/issues/5275). diff --git a/plugins/modules/iso_create.py b/plugins/modules/iso_create.py index d729f222a2..c457f5a412 100644 --- a/plugins/modules/iso_create.py +++ b/plugins/modules/iso_create.py @@ -188,9 +188,9 @@ def add_directory(module, iso_file=None, dir_path=None, rock_ridge=None, use_jol if rock_ridge: rr_name = os.path.basename(dir_path) if use_joliet: - joliet_path = iso_dir_path + joliet_path = dir_path if use_udf: - udf_path = iso_dir_path + udf_path = dir_path try: iso_file.add_directory(iso_path=iso_dir_path, rr_name=rr_name, joliet_path=joliet_path, udf_path=udf_path) except Exception as err: @@ -254,7 +254,7 @@ def main(): udf=use_udf ) if not module.check_mode: - iso_file = pycdlib.PyCdlib() + iso_file = pycdlib.PyCdlib(always_consistent=True) iso_file.new(interchange_level=inter_level, vol_ident=volume_id, rock_ridge=rock_ridge, joliet=use_joliet, udf=use_udf) for src_file in src_file_list: From 8758f6a43f1bcd9ae227dd41237bc07df3f10731 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 8 Nov 2022 08:02:10 +1300 Subject: [PATCH 0313/2104] mksysb: using CmdRunner (#5484) * mksysb: using CmdRunner * add changelog fragment * adjust code when check_mode true * Update plugins/modules/mksysb.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/5484-mksysb-cmd-runner.yml | 2 + plugins/modules/mksysb.py | 54 ++++++++++--------- 2 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 changelogs/fragments/5484-mksysb-cmd-runner.yml diff --git a/changelogs/fragments/5484-mksysb-cmd-runner.yml b/changelogs/fragments/5484-mksysb-cmd-runner.yml new file mode 100644 index 0000000000..89f4d0dac8 --- /dev/null +++ b/changelogs/fragments/5484-mksysb-cmd-runner.yml @@ -0,0 +1,2 @@ +minor_changes: + - mksysb - refactored module to use ``CmdRunner`` to execute ``mksysb`` (https://github.com/ansible-collections/community.general/pull/5484). diff --git a/plugins/modules/mksysb.py b/plugins/modules/mksysb.py index a2e3f4e6c8..a466bd9df6 100644 --- a/plugins/modules/mksysb.py +++ b/plugins/modules/mksysb.py @@ -98,12 +98,15 @@ msg: import os +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper + from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdModuleHelper, ArgFormat + ArgFormat ) -class MkSysB(CmdModuleHelper): +class MkSysB(ModuleHelper): module = dict( argument_spec=dict( backup_crypt_files=dict(type='bool', default=True), @@ -120,18 +123,17 @@ class MkSysB(CmdModuleHelper): ), supports_check_mode=True, ) - command = ['mksysb', '-X'] command_args_formats = dict( - create_map_files=dict(fmt="-m", style=ArgFormat.BOOLEAN), - use_snapshot=dict(fmt="-T", style=ArgFormat.BOOLEAN), - exclude_files=dict(fmt="-e", style=ArgFormat.BOOLEAN), - exclude_wpar_files=dict(fmt="-G", style=ArgFormat.BOOLEAN), - new_image_data=dict(fmt="-i", style=ArgFormat.BOOLEAN), - software_packing=dict(fmt="-p", style=ArgFormat.BOOLEAN_NOT), - extended_attrs=dict(fmt="-a", style=ArgFormat.BOOLEAN), - backup_crypt_files=dict(fmt="-Z", style=ArgFormat.BOOLEAN_NOT), - backup_dmapi_fs=dict(fmt="-A", style=ArgFormat.BOOLEAN), - combined_path=dict(fmt=lambda p, n: ["%s/%s" % (p, n)], stars=1) + create_map_files=cmd_runner_fmt.as_bool("-m"), + use_snapshot=cmd_runner_fmt.as_bool("-T"), + exclude_files=cmd_runner_fmt.as_bool("-e"), + exclude_wpar_files=cmd_runner_fmt.as_bool("-G"), + new_image_data=cmd_runner_fmt.as_bool("-i"), + software_packing=cmd_runner_fmt.as_bool_not("-p"), + extended_attrs=cmd_runner_fmt.as_bool("-a"), + backup_crypt_files=cmd_runner_fmt.as_bool_not("-Z"), + backup_dmapi_fs=cmd_runner_fmt.as_bool("-A"), + combined_path=cmd_runner_fmt.as_func(cmd_runner_fmt.unpack_args(lambda p, n: ["%s/%s" % (p, n)])), ) def __init_module__(self): @@ -139,18 +141,22 @@ class MkSysB(CmdModuleHelper): self.do_raise("Storage path %s is not valid." % self.vars.storage_path) def __run__(self): - if not self.module.check_mode: - self.run_command(params=[ - 'create_map_files', 'use_snapshot', 'exclude_files', 'exclude_wpar_files', 'software_packing', - 'extended_attrs', 'backup_crypt_files', 'backup_dmapi_fs', 'new_image_data', - {'combined_path': [self.vars.storage_path, self.vars.name]}, - ]) - self._changed = True + def process(rc, out, err): + if rc != 0: + self.do_raise("mksysb failed.") + self.vars.msg = out - def process_command_output(self, rc, out, err): - if rc != 0: - self.do_raise("mksysb failed.") - self.vars.msg = out + runner = CmdRunner( + self.module, + ['mksysb', '-X'], + self.command_args_formats, + ) + with runner(['create_map_files', 'use_snapshot', 'exclude_files', 'exclude_wpar_files', 'software_packing', + 'extended_attrs', 'backup_crypt_files', 'backup_dmapi_fs', 'new_image_data', 'combined_path'], + output_process=process, check_mode_skip=True) as ctx: + ctx.run(combined_path=[self.vars.storage_path, self.vars.name]) + + self.changed = True def main(): From b696aa72b2cdbebb81223150d98cceb0640e7ffb Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 8 Nov 2022 08:15:00 +1300 Subject: [PATCH 0314/2104] cpanm: using CmdRunner (#5485) * cpanm: using CmdRunner * add changelog fragment --- .../fragments/5485-cpanm-cmd-runner.yml | 2 + plugins/modules/cpanm.py | 48 +++++++++---------- tests/unit/plugins/modules/test_cpanm.py | 11 +++-- 3 files changed, 32 insertions(+), 29 deletions(-) create mode 100644 changelogs/fragments/5485-cpanm-cmd-runner.yml diff --git a/changelogs/fragments/5485-cpanm-cmd-runner.yml b/changelogs/fragments/5485-cpanm-cmd-runner.yml new file mode 100644 index 0000000000..508f261762 --- /dev/null +++ b/changelogs/fragments/5485-cpanm-cmd-runner.yml @@ -0,0 +1,2 @@ +minor_changes: + - cpanm - refactored module to use ``CmdRunner`` to execute ``cpanm`` (https://github.com/ansible-collections/community.general/pull/5485). diff --git a/plugins/modules/cpanm.py b/plugins/modules/cpanm.py index aba4e9d56e..7ac8429bda 100644 --- a/plugins/modules/cpanm.py +++ b/plugins/modules/cpanm.py @@ -134,12 +134,11 @@ EXAMPLES = ''' import os -from ansible_collections.community.general.plugins.module_utils.module_helper import ( - ModuleHelper, CmdMixin, ArgFormat -) +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper -class CPANMinus(CmdMixin, ModuleHelper): +class CPANMinus(ModuleHelper): output_params = ['name', 'version'] module = dict( argument_spec=dict( @@ -160,13 +159,13 @@ class CPANMinus(CmdMixin, ModuleHelper): ) command = 'cpanm' command_args_formats = dict( - notest=dict(fmt="--notest", style=ArgFormat.BOOLEAN), - locallib=dict(fmt=('--local-lib', '{0}'),), - mirror=dict(fmt=('--mirror', '{0}'),), - mirror_only=dict(fmt="--mirror-only", style=ArgFormat.BOOLEAN), - installdeps=dict(fmt="--installdeps", style=ArgFormat.BOOLEAN), + notest=cmd_runner_fmt.as_bool("--notest"), + locallib=cmd_runner_fmt.as_opt_val('--local-lib'), + mirror=cmd_runner_fmt.as_opt_val('--mirror'), + mirror_only=cmd_runner_fmt.as_bool("--mirror-only"), + installdeps=cmd_runner_fmt.as_bool("--installdeps"), + pkg_spec=cmd_runner_fmt.as_list(), ) - check_rc = True def __init_module__(self): v = self.vars @@ -181,15 +180,17 @@ class CPANMinus(CmdMixin, ModuleHelper): self.vars.set("binary", self.command) def _is_package_installed(self, name, locallib, version): + def process(rc, out, err): + return rc == 0 + if name is None or name.endswith('.tar.gz'): return False version = "" if version is None else " " + version env = {"PERL5LIB": "%s/lib/perl5" % locallib} if locallib else {} - cmd = ['perl', '-le', 'use %s%s;' % (name, version)] - rc, out, err = self.module.run_command(cmd, check_rc=False, environ_update=env) - - return rc == 0 + runner = CmdRunner(self.module, ["perl", "-le"], {"mod": cmd_runner_fmt.as_list()}, check_rc=False, environ_update=env) + with runner("mod", output_process=process) as ctx: + return ctx.run(mod='use %s%s;' % (name, version)) def sanitize_pkg_spec_version(self, pkg_spec, version): if version is None: @@ -207,6 +208,13 @@ class CPANMinus(CmdMixin, ModuleHelper): return pkg_spec + version def __run__(self): + def process(rc, out, err): + if self.vars.mode == "compatibility" and rc != 0: + self.do_raise(msg=err, cmd=self.vars.cmd_args) + return 'is up to date' not in err and 'is up to date' not in out + + runner = CmdRunner(self.module, self.command, self.command_args_formats, check_rc=True) + v = self.vars pkg_param = 'from_path' if v.from_path else 'name' @@ -214,22 +222,14 @@ class CPANMinus(CmdMixin, ModuleHelper): if self._is_package_installed(v.name, v.locallib, v.version): return pkg_spec = v[pkg_param] - self.changed = self.run_command( - params=['notest', 'locallib', 'mirror', 'mirror_only', 'installdeps', {'name': pkg_spec}], - ) else: installed = self._is_package_installed(v.name_check, v.locallib, v.version) if v.name_check else False if installed: return pkg_spec = self.sanitize_pkg_spec_version(v[pkg_param], v.version) - self.changed = self.run_command( - params=['notest', 'locallib', 'mirror', 'mirror_only', 'installdeps', {'name': pkg_spec}], - ) - def process_command_output(self, rc, out, err): - if self.vars.mode == "compatibility" and rc != 0: - self.do_raise(msg=err, cmd=self.vars.cmd_args) - return 'is up to date' not in err and 'is up to date' not in out + with runner(['notest', 'locallib', 'mirror', 'mirror_only', 'installdeps', 'pkg_spec'], output_process=process) as ctx: + self.changed = ctx.run(pkg_spec=pkg_spec) def main(): diff --git a/tests/unit/plugins/modules/test_cpanm.py b/tests/unit/plugins/modules/test_cpanm.py index 4d6ecdbd6e..5367a1fab8 100644 --- a/tests/unit/plugins/modules/test_cpanm.py +++ b/tests/unit/plugins/modules/test_cpanm.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Author: Alexei Znamensky (russoz@gmail.com) # Largely adapted from test_redhat_subscription by # Jiri Hnidek (jhnidek@redhat.com) @@ -25,7 +26,7 @@ def patch_cpanm(mocker): """ Function used for mocking some parts of redhat_subscription module """ - mocker.patch('ansible_collections.community.general.plugins.module_utils.module_helper.AnsibleModule.get_bin_path', + mocker.patch('ansible.module_utils.basic.AnsibleModule.get_bin_path', return_value='/testbin/cpanm') @@ -36,8 +37,8 @@ TEST_CASES = [ 'id': 'install_dancer_compatibility', 'run_command.calls': [ ( - ['perl', '-le', 'use Dancer;'], - {'environ_update': {}, 'check_rc': False}, + ['/testbin/cpanm', '-le', 'use Dancer;'], + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, (2, '', 'error, not installed',), # output rc, out, err ), ( @@ -55,8 +56,8 @@ TEST_CASES = [ 'id': 'install_dancer_already_installed_compatibility', 'run_command.calls': [ ( - ['perl', '-le', 'use Dancer;'], - {'environ_update': {}, 'check_rc': False}, + ['/testbin/cpanm', '-le', 'use Dancer;'], + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, (0, '', '',), # output rc, out, err ), ], From bc7e7f8fcb9ded6ec30eda029b5de8bf7062dc70 Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Mon, 7 Nov 2022 20:57:33 +0100 Subject: [PATCH 0315/2104] [Scaleway] Remove unused sensitive values filtering (#5497) * [Scaleway] Remove unused sensitive values filtering Signed-off-by: Lunik * Try adding function back. Maybe that works aound the bug in pylint. (Also it won't be a breaking change anymore.) Signed-off-by: Lunik Co-authored-by: Felix Fontein --- .../modules/scaleway_container_namespace_info.py | 13 +++++-------- plugins/modules/scaleway_container_registry_info.py | 9 ++------- plugins/modules/scaleway_function_info.py | 13 +++++-------- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/plugins/modules/scaleway_container_namespace_info.py b/plugins/modules/scaleway_container_namespace_info.py index 20ec25d96a..fea2d8474b 100644 --- a/plugins/modules/scaleway_container_namespace_info.py +++ b/plugins/modules/scaleway_container_namespace_info.py @@ -74,20 +74,17 @@ container_namespace: region: fr-par registry_endpoint: "" registry_namespace_id: "" - secret_environment_variables: SENSITIVE_VALUE + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg status: pending ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, - filter_sensitive_attributes + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway ) from ansible.module_utils.basic import AnsibleModule -SENSITIVE_ATTRIBUTES = ( - "secret_environment_variables", -) - def info_strategy(api, wished_cn): cn_list = api.fetch_all_resources("namespaces") @@ -124,7 +121,7 @@ def core(module): summary = info_strategy(api=api, wished_cn=wished_container_namespace) - module.exit_json(changed=False, container_namespace=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES)) + module.exit_json(changed=False, container_namespace=summary) def main(): diff --git a/plugins/modules/scaleway_container_registry_info.py b/plugins/modules/scaleway_container_registry_info.py index d2a5e61e93..c0682cefbe 100644 --- a/plugins/modules/scaleway_container_registry_info.py +++ b/plugins/modules/scaleway_container_registry_info.py @@ -80,15 +80,10 @@ container_registry: ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, - filter_sensitive_attributes + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway ) from ansible.module_utils.basic import AnsibleModule -SENSITIVE_ATTRIBUTES = ( - "secret_environment_variables", -) - def info_strategy(api, wished_cn): cn_list = api.fetch_all_resources("namespaces") @@ -125,7 +120,7 @@ def core(module): summary = info_strategy(api=api, wished_cn=wished_container_namespace) - module.exit_json(changed=False, container_registry=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES)) + module.exit_json(changed=False, container_registry=summary) def main(): diff --git a/plugins/modules/scaleway_function_info.py b/plugins/modules/scaleway_function_info.py index 47eca48614..14a4cd6289 100644 --- a/plugins/modules/scaleway_function_info.py +++ b/plugins/modules/scaleway_function_info.py @@ -81,21 +81,18 @@ function: region: fr-par runtime: python310 runtime_message: "" - secret_environment_variables: SENSITIVE_VALUE + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg status: created timeout: 300s ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, - filter_sensitive_attributes + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway ) from ansible.module_utils.basic import AnsibleModule -SENSITIVE_ATTRIBUTES = ( - "secret_environment_variables", -) - def info_strategy(api, wished_fn): fn_list = api.fetch_all_resources("functions") @@ -132,7 +129,7 @@ def core(module): summary = info_strategy(api=api, wished_fn=wished_function) - module.exit_json(changed=False, function=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES)) + module.exit_json(changed=False, function=summary) def main(): From 4fed0e13db5e30e5762faade9f8c38cd1d8abcd0 Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Mon, 7 Nov 2022 21:04:55 +0100 Subject: [PATCH 0316/2104] [Scaleway] Add module to manage containers (#5496) Signed-off-by: Lunik Signed-off-by: Lunik --- .github/BOTMETA.yml | 4 + plugins/modules/scaleway_container.py | 406 ++++++++++++++++++ plugins/modules/scaleway_container_info.py | 151 +++++++ .../targets/scaleway_container/aliases | 6 + .../scaleway_container/defaults/main.yml | 18 + .../targets/scaleway_container/tasks/main.yml | 290 +++++++++++++ .../targets/scaleway_container_info/aliases | 6 + .../scaleway_container_info/defaults/main.yml | 16 + .../scaleway_container_info/tasks/main.yml | 63 +++ 9 files changed, 960 insertions(+) create mode 100644 plugins/modules/scaleway_container.py create mode 100644 plugins/modules/scaleway_container_info.py create mode 100644 tests/integration/targets/scaleway_container/aliases create mode 100644 tests/integration/targets/scaleway_container/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_container/tasks/main.yml create mode 100644 tests/integration/targets/scaleway_container_info/aliases create mode 100644 tests/integration/targets/scaleway_container_info/defaults/main.yml create mode 100644 tests/integration/targets/scaleway_container_info/tasks/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 4975f30c0e..dfacfbecfb 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1077,6 +1077,10 @@ files: maintainers: $team_scaleway $modules/scaleway_compute_private_network.py: maintainers: pastral + $modules/scaleway_container.py: + maintainers: Lunik + $modules/scaleway_container_info.py: + maintainers: Lunik $modules/scaleway_container_namespace.py: maintainers: Lunik $modules/scaleway_container_namespace_info.py: diff --git a/plugins/modules/scaleway_container.py b/plugins/modules/scaleway_container.py new file mode 100644 index 0000000000..6bc237ee39 --- /dev/null +++ b/plugins/modules/scaleway_container.py @@ -0,0 +1,406 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless container management module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_container +short_description: Scaleway Container management +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module manages container on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + - community.general.scaleway_waitable_resource +requirements: + - passlib[argon2] >= 1.7.4 + + +options: + state: + type: str + description: + - Indicate desired state of the container. + default: present + choices: + - present + - absent + + namespace_id: + type: str + description: + - Container namespace identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the container namespace. + required: true + + description: + description: + - Description of the container namespace. + type: str + default: '' + + min_scale: + description: + - Minimum number of replicas for the container. + type: int + + max_scale: + description: + - Maximum number of replicas for the container. + type: int + + environment_variables: + description: + - Environment variables of the container namespace. + - Injected in container at runtime. + type: dict + default: {} + + secret_environment_variables: + description: + - Secret environment variables of the container namespace. + - Updating thoses values will not output a C(changed) state in Ansible. + - Injected in container at runtime. + type: dict + default: {} + + memory_limit: + description: + - Resources define performance characteristics of your container. + - They are allocated to your container at runtime. + type: int + + container_timeout: + description: + - The length of time your handler can spend processing a request before being stopped. + type: str + + privacy: + description: + - Privacy policies define whether a container can be executed anonymously. + - Choose C(public) to enable anonymous execution, or C(private) to protect your container with an authentication mechanism provided by the Scaleway API. + type: str + default: public + choices: + - public + - private + + registry_image: + description: + - The name of image used for the container. + type: str + required: true + + max_concurrency: + description: + - Maximum number of connections per container. + - This parameter will be used to trigger autoscaling. + type: int + + protocol: + description: + - Communication protocol of the container. + type: str + default: http1 + choices: + - http1 + - h2c + + port: + description: + - Listen port used to expose the container. + type: int + + redeploy: + description: + - Redeploy the container if update is required. + type: bool + default: false +''' + +EXAMPLES = ''' +- name: Create a container + community.general.scaleway_container: + namespace_id: '{{ scw_container_namespace }}' + state: present + region: fr-par + name: my-awesome-container + registry_image: rg.fr-par.scw.cloud/funcscwtestrgy2f9zw/nginx:latest + environment_variables: + MY_VAR: my_value + secret_environment_variables: + MY_SECRET_VAR: my_secret_value + register: container_creation_task + +- name: Make sure container is deleted + community.general.scaleway_container: + namespace_id: '{{ scw_container_namespace }}' + state: absent + region: fr-par + name: my-awesome-container +''' + +RETURN = ''' +container: + description: The container information. + returned: when I(state=present) + type: dict + sample: + cpu_limit: 140 + description: Container used for testing scaleway_container ansible module + domain_name: cnansibletestgfogtjod-cn-ansible-test.functions.fnc.fr-par.scw.cloud + environment_variables: + MY_VAR: my_value + error_message: null + http_option: "" + id: c9070eb0-d7a4-48dd-9af3-4fb139890721 + max_concurrency: 50 + max_scale: 5 + memory_limit: 256 + min_scale: 0 + name: cn-ansible-test + namespace_id: 75e299f1-d1e5-4e6b-bc6e-4fb51cfe1e69 + port: 80 + privacy: public + protocol: http1 + region: fr-par + registry_image: rg.fr-par.scw.cloud/namespace-ansible-ci/nginx:latest + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg + status: created + timeout: 300s +''' + +from copy import deepcopy + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed, + SecretVariables +) +from ansible.module_utils.basic import AnsibleModule + +STABLE_STATES = ( + "ready", + "created", + "absent" +) + +MUTABLE_ATTRIBUTES = ( + "description", + "min_scale", + "max_scale", + "environment_variables", + "memory_limit", + "timeout", + "privacy", + "registry_image", + "max_concurrency", + "protocol", + "port", + "secret_environment_variables" +) + + +def payload_from_wished_cn(wished_cn): + payload = { + "namespace_id": wished_cn["namespace_id"], + "name": wished_cn["name"], + "description": wished_cn["description"], + "min_scale": wished_cn["min_scale"], + "max_scale": wished_cn["max_scale"], + "environment_variables": wished_cn["environment_variables"], + "secret_environment_variables": SecretVariables.dict_to_list(wished_cn["secret_environment_variables"]), + "memory_limit": wished_cn["memory_limit"], + "timeout": wished_cn["timeout"], + "privacy": wished_cn["privacy"], + "registry_image": wished_cn["registry_image"], + "max_concurrency": wished_cn["max_concurrency"], + "protocol": wished_cn["protocol"], + "port": wished_cn["port"], + "redeploy": wished_cn["redeploy"] + } + + return payload + + +def absent_strategy(api, wished_cn): + changed = False + + cn_list = api.fetch_all_resources("containers") + cn_lookup = dict((cn["name"], cn) + for cn in cn_list) + + if wished_cn["name"] not in cn_lookup: + return changed, {} + + target_cn = cn_lookup[wished_cn["name"]] + changed = True + if api.module.check_mode: + return changed, {"status": "Container would be destroyed"} + + api.wait_to_complete_state_transition(resource=target_cn, stable_states=STABLE_STATES, force_wait=True) + response = api.delete(path=api.api_path + "/%s" % target_cn["id"]) + if not response.ok: + api.module.fail_json(msg='Error deleting container [{0}: {1}]'.format( + response.status_code, response.json)) + + api.wait_to_complete_state_transition(resource=target_cn, stable_states=STABLE_STATES) + return changed, response.json + + +def present_strategy(api, wished_cn): + changed = False + + cn_list = api.fetch_all_resources("containers") + cn_lookup = dict((cn["name"], cn) + for cn in cn_list) + + payload_cn = payload_from_wished_cn(wished_cn) + + if wished_cn["name"] not in cn_lookup: + changed = True + if api.module.check_mode: + return changed, {"status": "A container would be created."} + + # Creation doesn't support `redeploy` parameter + del payload_cn["redeploy"] + + # Create container + api.warn(payload_cn) + creation_response = api.post(path=api.api_path, + data=payload_cn) + + if not creation_response.ok: + msg = "Error during container creation: %s: '%s' (%s)" % (creation_response.info['msg'], + creation_response.json['message'], + creation_response.json) + api.module.fail_json(msg=msg) + + api.wait_to_complete_state_transition(resource=creation_response.json, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % creation_response.json["id"]) + return changed, response.json + + target_cn = cn_lookup[wished_cn["name"]] + decoded_target_cn = deepcopy(target_cn) + decoded_target_cn["secret_environment_variables"] = SecretVariables.decode(decoded_target_cn["secret_environment_variables"], + payload_cn["secret_environment_variables"]) + patch_payload = resource_attributes_should_be_changed(target=decoded_target_cn, + wished=payload_cn, + verifiable_mutable_attributes=MUTABLE_ATTRIBUTES, + mutable_attributes=MUTABLE_ATTRIBUTES) + + if not patch_payload: + return changed, target_cn + + changed = True + if api.module.check_mode: + return changed, {"status": "Container attributes would be changed."} + + cn_patch_response = api.patch(path=api.api_path + "/%s" % target_cn["id"], + data=patch_payload) + + if not cn_patch_response.ok: + api.module.fail_json(msg='Error during container attributes update: [{0}: {1}]'.format( + cn_patch_response.status_code, cn_patch_response.json['message'])) + + api.wait_to_complete_state_transition(resource=target_cn, stable_states=STABLE_STATES) + response = api.get(path=api.api_path + "/%s" % target_cn["id"]) + return changed, response.json + + +state_strategy = { + "present": present_strategy, + "absent": absent_strategy +} + + +def core(module): + SecretVariables.ensure_scaleway_secret_package(module) + + region = module.params["region"] + wished_container = { + "state": module.params["state"], + "namespace_id": module.params["namespace_id"], + "name": module.params["name"], + "description": module.params['description'], + "min_scale": module.params["min_scale"], + "max_scale": module.params["max_scale"], + "environment_variables": module.params['environment_variables'], + "secret_environment_variables": module.params['secret_environment_variables'], + "memory_limit": module.params["memory_limit"], + "timeout": module.params["container_timeout"], + "privacy": module.params["privacy"], + "registry_image": module.params["registry_image"], + "max_concurrency": module.params["max_concurrency"], + "protocol": module.params["protocol"], + "port": module.params["port"], + "redeploy": module.params["redeploy"] + } + + api = Scaleway(module=module) + api.api_path = "containers/v1beta1/regions/%s/containers" % region + + changed, summary = state_strategy[wished_container["state"]](api=api, wished_cn=wished_container) + + module.exit_json(changed=changed, container=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(scaleway_waitable_resource_argument_spec()) + argument_spec.update(dict( + state=dict(type='str', default='present', choices=['absent', 'present']), + namespace_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True), + description=dict(type='str', default=''), + min_scale=dict(type='int'), + max_scale=dict(type='int'), + memory_limit=dict(type='int'), + container_timeout=dict(type='str'), + privacy=dict(type='str', default='public', choices=['public', 'private']), + registry_image=dict(type='str', required=True), + max_concurrency=dict(type='int'), + protocol=dict(type='str', default='http1', choices=['http1', 'h2c']), + port=dict(type='int'), + redeploy=dict(type='bool', default=False), + environment_variables=dict(type='dict', default={}), + secret_environment_variables=dict(type='dict', default={}, no_log=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/scaleway_container_info.py b/plugins/modules/scaleway_container_info.py new file mode 100644 index 0000000000..993919c7ee --- /dev/null +++ b/plugins/modules/scaleway_container_info.py @@ -0,0 +1,151 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Scaleway Serverless container info module +# +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: scaleway_container_info +short_description: Retrieve information on Scaleway Container +version_added: 6.0.0 +author: Guillaume MARTINEZ (@Lunik) +description: + - This module return information about a container on Scaleway account. +extends_documentation_fragment: + - community.general.scaleway + + +options: + namespace_id: + type: str + description: + - Container namespace identifier. + required: true + + region: + type: str + description: + - Scaleway region to use (for example C(fr-par)). + required: true + choices: + - fr-par + - nl-ams + - pl-waw + + name: + type: str + description: + - Name of the container. + required: true +''' + +EXAMPLES = ''' +- name: Get a container info + community.general.scaleway_container_info: + namespace_id: '{{ scw_container_namespace }}' + region: fr-par + name: my-awesome-container + register: container_info_task +''' + +RETURN = ''' +container: + description: The container information. + returned: always + type: dict + sample: + cpu_limit: 140 + description: Container used for testing scaleway_container ansible module + domain_name: cnansibletestgfogtjod-cn-ansible-test.functions.fnc.fr-par.scw.cloud + environment_variables: + MY_VAR: my_value + error_message: null + http_option: "" + id: c9070eb0-d7a4-48dd-9af3-4fb139890721 + max_concurrency: 50 + max_scale: 5 + memory_limit: 256 + min_scale: 0 + name: cn-ansible-test + namespace_id: 75e299f1-d1e5-4e6b-bc6e-4fb51cfe1e69 + port: 80 + privacy: public + protocol: http1 + region: fr-par + registry_image: rg.fr-par.scw.cloud/namespace-ansible-ci/nginx:latest + secret_environment_variables: + - key: MY_SECRET_VAR + value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg + status: created + timeout: 300s +''' + +from ansible_collections.community.general.plugins.module_utils.scaleway import ( + SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway +) +from ansible.module_utils.basic import AnsibleModule + + +def info_strategy(api, wished_cn): + cn_list = api.fetch_all_resources("containers") + cn_lookup = dict((fn["name"], fn) + for fn in cn_list) + + if wished_cn["name"] not in cn_lookup: + msg = "Error during container lookup: Unable to find container named '%s' in namespace '%s'" % (wished_cn["name"], + wished_cn["namespace_id"]) + + api.module.fail_json(msg=msg) + + target_cn = cn_lookup[wished_cn["name"]] + + response = api.get(path=api.api_path + "/%s" % target_cn["id"]) + if not response.ok: + msg = "Error during container lookup: %s: '%s' (%s)" % (response.info['msg'], + response.json['message'], + response.json) + api.module.fail_json(msg=msg) + + return response.json + + +def core(module): + region = module.params["region"] + wished_container = { + "namespace_id": module.params["namespace_id"], + "name": module.params["name"] + } + + api = Scaleway(module=module) + api.api_path = "containers/v1beta1/regions/%s/containers" % region + + summary = info_strategy(api=api, wished_cn=wished_container) + + module.exit_json(changed=False, container=summary) + + +def main(): + argument_spec = scaleway_argument_spec() + argument_spec.update(dict( + namespace_id=dict(type='str', required=True), + region=dict(type='str', required=True, choices=SCALEWAY_REGIONS), + name=dict(type='str', required=True) + )) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/scaleway_container/aliases b/tests/integration/targets/scaleway_container/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_container/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_container/defaults/main.yml b/tests/integration/targets/scaleway_container/defaults/main.yml new file mode 100644 index 0000000000..01b8719fc5 --- /dev/null +++ b/tests/integration/targets/scaleway_container/defaults/main.yml @@ -0,0 +1,18 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +container_namespace_name: cn-ansible-test +name: cn-ansible-test +description: Container used for testing scaleway_container ansible module +updated_description: Container used for testing scaleway_container ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value +updated_secret_environment_variables: + MY_SECRET_VAR: my_other_secret_value +image: rg.fr-par.scw.cloud/namespace-ansible-ci/nginx:latest +port: 80 diff --git a/tests/integration/targets/scaleway_container/tasks/main.yml b/tests/integration/targets/scaleway_container/tasks/main.yml new file mode 100644 index 0000000000..1ac5bf1768 --- /dev/null +++ b/tests/integration/targets/scaleway_container/tasks/main.yml @@ -0,0 +1,290 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create container_namespace + community.general.scaleway_container_namespace: + state: present + name: '{{ container_namespace_name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + register: integration_container_namespace + +- name: Create a container (Check) + check_mode: yes + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + port: '{{ port }}' + register: cn_creation_check_task + +- ansible.builtin.debug: + var: cn_creation_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_creation_check_task is success + - cn_creation_check_task is changed + +- name: Create container + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + port: '{{ port }}' + register: cn_creation_task + +- ansible.builtin.debug: + var: cn_creation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_creation_task is success + - cn_creation_task is changed + - cn_creation_task.container.status in ["created", "ready"] + +- name: Create container (Confirmation) + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + port: '{{ port }}' + register: cn_creation_confirmation_task + +- ansible.builtin.debug: + var: cn_creation_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_creation_confirmation_task is success + - cn_creation_confirmation_task is not changed + - cn_creation_confirmation_task.container.status in ["created", "ready"] + +- name: Update container (Check) + check_mode: yes + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + port: '{{ port }}' + register: cn_update_check_task + +- ansible.builtin.debug: + var: cn_update_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_check_task is success + - cn_update_check_task is changed + +- name: Update container + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + port: '{{ port }}' + register: cn_update_task + +- ansible.builtin.debug: + var: cn_update_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_task is success + - cn_update_task is changed + - cn_update_task.container.status in ["created", "ready"] + +- name: Update container (Confirmation) + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + port: '{{ port }}' + register: cn_update_confirmation_task + +- ansible.builtin.debug: + var: cn_update_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_confirmation_task is success + - cn_update_confirmation_task is not changed + - cn_update_confirmation_task.container.status in ["created", "ready"] + +- name: Update container secret variables (Check) + check_mode: yes + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + port: '{{ port }}' + register: cn_update_secret_check_task + +- ansible.builtin.debug: + var: cn_update_secret_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_secret_check_task is success + - cn_update_secret_check_task is changed + +- name: Update container secret variables + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + port: '{{ port }}' + register: cn_update_secret_task + +- ansible.builtin.debug: + var: cn_update_secret_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_secret_task is success + - cn_update_secret_task is changed + - cn_update_secret_task.container.status in ["created", "ready"] + - "'hashed_value' in cn_update_secret_task.container.secret_environment_variables[0]" + +- name: Update container secret variables (Confirmation) + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ updated_description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ updated_secret_environment_variables }}' + port: '{{ port }}' + register: cn_update_secret_confirmation_task + +- ansible.builtin.debug: + var: cn_update_secret_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_update_secret_confirmation_task is success + - cn_update_secret_confirmation_task is not changed + - cn_update_secret_confirmation_task.container.status == "ready" + - "'hashed_value' in cn_update_secret_confirmation_task.container.secret_environment_variables[0]" + +- name: Delete container (Check) + check_mode: yes + community.general.scaleway_container: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + register: cn_deletion_check_task + +- ansible.builtin.debug: + var: cn_deletion_check_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_deletion_check_task is success + - cn_deletion_check_task is changed + +- name: Delete container + community.general.scaleway_container: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + register: cn_deletion_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_deletion_task is success + - cn_deletion_task is changed + +- name: Delete container (Confirmation) + community.general.scaleway_container: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + register: cn_deletion_confirmation_task + +- ansible.builtin.debug: + var: cn_deletion_confirmation_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_deletion_confirmation_task is success + - cn_deletion_confirmation_task is not changed + +- name: Delete container namespace + community.general.scaleway_container_namespace: + state: absent + name: '{{ container_namespace_name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' diff --git a/tests/integration/targets/scaleway_container_info/aliases b/tests/integration/targets/scaleway_container_info/aliases new file mode 100644 index 0000000000..a5ac5181f0 --- /dev/null +++ b/tests/integration/targets/scaleway_container_info/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +cloud/scaleway +unsupported diff --git a/tests/integration/targets/scaleway_container_info/defaults/main.yml b/tests/integration/targets/scaleway_container_info/defaults/main.yml new file mode 100644 index 0000000000..f3dadf71a8 --- /dev/null +++ b/tests/integration/targets/scaleway_container_info/defaults/main.yml @@ -0,0 +1,16 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +scaleway_region: fr-par +container_namespace_name: cn-ansible-test +name: cn-ansible-test +description: Container used for testing scaleway_container_info ansible module +updated_description: Container used for testing scaleway_container_info ansible module (Updated description) +environment_variables: + MY_VAR: my_value +secret_environment_variables: + MY_SECRET_VAR: my_secret_value +image: rg.fr-par.scw.cloud/namespace-ansible-ci/nginx:latest +port: 80 diff --git a/tests/integration/targets/scaleway_container_info/tasks/main.yml b/tests/integration/targets/scaleway_container_info/tasks/main.yml new file mode 100644 index 0000000000..9f9fe401ca --- /dev/null +++ b/tests/integration/targets/scaleway_container_info/tasks/main.yml @@ -0,0 +1,63 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create container_namespace + community.general.scaleway_container_namespace: + state: present + name: '{{ container_namespace_name }}' + region: '{{ scaleway_region }}' + project_id: '{{ scw_project }}' + description: '{{ description }}' + register: integration_container_namespace + +- name: Create container + community.general.scaleway_container: + state: present + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + description: '{{ description }}' + environment_variables: '{{ environment_variables }}' + secret_environment_variables: '{{ secret_environment_variables }}' + port: '{{ port }}' + +- name: Get container info + community.general.scaleway_container_info: + name: '{{ name }}' + region: '{{ scaleway_region }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + register: cn_info_task + +- ansible.builtin.debug: + var: cn_info_task + +- name: Check module call result + ansible.builtin.assert: + that: + - cn_info_task is success + - cn_info_task is not changed + +- name: Delete container + community.general.scaleway_container: + state: absent + name: '{{ name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + namespace_id: '{{ integration_container_namespace.container_namespace.id }}' + registry_image: '{{ image }}' + +- name: Delete container namespace + community.general.scaleway_container_namespace: + state: absent + name: '{{ container_namespace_name }}' + region: '{{ scaleway_region }}' + description: '{{ description }}' + project_id: '{{ scw_project }}' From 16cd2ae76eed3786e4f3346093e10f62671350e5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 7 Nov 2022 21:33:42 +0100 Subject: [PATCH 0317/2104] Next expected release will be 6.1.0. --- changelogs/changelog.yaml | 519 +----------------- changelogs/fragments/4728-onepassword-v2.yml | 2 - .../fragments/5435-escape-ldap-param.yml | 2 - .../5450-allow-for-xordered-dns.yaml | 2 - .../5468-iso-create-not-add-folders.yml | 2 - .../5475-snap-option-value-whitespace.yml | 2 - ...5477-ansible-galaxy-install-cmd-runner.yml | 2 - .../fragments/5483-hponcfg-cmd-runner.yml | 2 - .../fragments/5484-mksysb-cmd-runner.yml | 2 - .../fragments/5485-cpanm-cmd-runner.yml | 2 - changelogs/fragments/6.0.0.yml | 3 - galaxy.yml | 2 +- 12 files changed, 3 insertions(+), 539 deletions(-) delete mode 100644 changelogs/fragments/4728-onepassword-v2.yml delete mode 100644 changelogs/fragments/5435-escape-ldap-param.yml delete mode 100644 changelogs/fragments/5450-allow-for-xordered-dns.yaml delete mode 100644 changelogs/fragments/5468-iso-create-not-add-folders.yml delete mode 100644 changelogs/fragments/5475-snap-option-value-whitespace.yml delete mode 100644 changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml delete mode 100644 changelogs/fragments/5483-hponcfg-cmd-runner.yml delete mode 100644 changelogs/fragments/5484-mksysb-cmd-runner.yml delete mode 100644 changelogs/fragments/5485-cpanm-cmd-runner.yml delete mode 100644 changelogs/fragments/6.0.0.yml diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index b5612b7ccc..28411f7413 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1,517 +1,2 @@ -ancestor: 5.0.0 -releases: - 6.0.0-a1: - changes: - breaking_changes: - - newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341). - bugfixes: - - Include ``PSF-license.txt`` file for ``plugins/module_utils/_mount.py``. - - Include ``simplified_bsd.txt`` license file for various module utils, the - ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests. - - alternatives - do not set the priority if the priority was not set by the - user (https://github.com/ansible-collections/community.general/pull/4810). - - alternatives - only pass subcommands when they are specified as module arguments - (https://github.com/ansible-collections/community.general/issues/4803, https://github.com/ansible-collections/community.general/issues/4804, - https://github.com/ansible-collections/community.general/pull/4836). - - alternatives - when ``subcommands`` is specified, ``link`` must be given for - every subcommand. This was already mentioned in the documentation, but not - enforced by the code (https://github.com/ansible-collections/community.general/pull/4836). - - apache2_mod_proxy - avoid crash when reporting inability to parse balancer_member_page - HTML caused by using an undefined variable in the error message (https://github.com/ansible-collections/community.general/pull/5111). - - archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz`` - (https://github.com/ansible-collections/community.general/pull/5393). - - cmd_runner module utils - fix bug caused by using the ``command`` variable - instead of ``self.command`` when looking for binary path (https://github.com/ansible-collections/community.general/pull/4903). - - consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680). - - credstash lookup plugin - pass plugin options to credstash for all terms, - not just for the first (https://github.com/ansible-collections/community.general/pull/5440). - - dig lookup plugin - add option to return empty result without empty strings, - and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5439, - https://github.com/ansible-collections/community.general/issues/5428). - - dig lookup plugin - fix evaluation of falsy values for boolean parameters - ``fail_on_error`` and ``retry_servfail`` (https://github.com/ansible-collections/community.general/pull/5129). - - dnsimple_info - correctly report missing library as ``requests`` and not ``another_library`` - (https://github.com/ansible-collections/community.general/pull/5111). - - dnstxt lookup plugin - add option to return empty result without empty strings, - and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5457, - https://github.com/ansible-collections/community.general/issues/5428). - - dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). - - filesystem - handle ``fatresize --info`` output lines without ``:`` (https://github.com/ansible-collections/community.general/pull/4700). - - filesystem - improve error messages when output cannot be parsed by including - newlines in escaped form (https://github.com/ansible-collections/community.general/pull/4700). - - funcd connection plugin - fix signature of ``exec_command`` (https://github.com/ansible-collections/community.general/pull/5111). - - ini_file - minor refactor fixing a python lint error (https://github.com/ansible-collections/community.general/pull/5307). - - keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241). - - keyring_info - fix the result from the keyring library never getting returned - (https://github.com/ansible-collections/community.general/pull/4964). - - ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute - values (https://github.com/ansible-collections/community.general/issues/977, - https://github.com/ansible-collections/community.general/pull/5385). - - listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` - clause had a wrong indentation. The check is now handled in the ``split_pid_name`` - function (https://github.com/ansible-collections/community.general/pull/5202). - - locale_gen - fix support for Ubuntu (https://github.com/ansible-collections/community.general/issues/5281). - - lxc_container - the module has been updated to support Python 3 (https://github.com/ansible-collections/community.general/pull/5304). - - lxd connection plugin - fix incorrect ``inventory_hostname`` in ``remote_addr``. - This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/issues/4886). - - manageiq_alert_profiles - avoid crash when reporting unknown profile caused - by trying to return an undefined variable (https://github.com/ansible-collections/community.general/pull/5111). - - nmcli - avoid changed status for most cases with VPN connections (https://github.com/ansible-collections/community.general/pull/5126). - - nmcli - fix error caused by adding undefined module arguments for list options - (https://github.com/ansible-collections/community.general/issues/4373, https://github.com/ansible-collections/community.general/pull/4813). - - 'nmcli - fix error when setting previously unset MAC address, ``gsm.apn`` - or ``vpn.data``: current values were being normalized without checking if - they might be ``None`` (https://github.com/ansible-collections/community.general/pull/5291).' - - nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998). - - nsupdate - compatibility with NS records (https://github.com/ansible-collections/community.general/pull/5112). - - nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed - DNS zones (https://github.com/ansible-collections/community.general/issues/4657). - - opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed - support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342). - - osx_defaults - no longer expand ``~`` in ``value`` to the user's home directory, - or expand environment variables (https://github.com/ansible-collections/community.general/issues/5234, - https://github.com/ansible-collections/community.general/pull/5243). - - packet_ip_subnet - fix error reporting in case of invalid CIDR prefix lengths - (https://github.com/ansible-collections/community.general/pull/5111). - - pacman - fixed name resolution of URL packages (https://github.com/ansible-collections/community.general/pull/4959). - - passwordstore lookup plugin - fix ``returnall`` for gopass (https://github.com/ansible-collections/community.general/pull/5027). - - passwordstore lookup plugin - fix password store path detection for gopass - (https://github.com/ansible-collections/community.general/pull/4955). - - pfexec become plugin - remove superflous quotes preventing exe wrap from working - as expected (https://github.com/ansible-collections/community.general/issues/3671, - https://github.com/ansible-collections/community.general/pull/3889). - - pip_package_info - remove usage of global variable (https://github.com/ansible-collections/community.general/pull/5111). - - pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363). - - proxmox - fix error handling when getting VM by name when ``state=absent`` - (https://github.com/ansible-collections/community.general/pull/4945). - - proxmox inventory plugin - fix crash when ``enabled=1`` is used in agent config - string (https://github.com/ansible-collections/community.general/pull/4910). - - proxmox inventory plugin - fixed extended status detection for qemu (https://github.com/ansible-collections/community.general/pull/4816). - - proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198). - - proxmox_kvm - fix error handling when getting VM by name when ``state=absent`` - (https://github.com/ansible-collections/community.general/pull/4945). - - proxmox_kvm - fix exception when no ``agent`` argument is specified (https://github.com/ansible-collections/community.general/pull/5194). - - proxmox_kvm - fix wrong condition (https://github.com/ansible-collections/community.general/pull/5108). - - proxmox_kvm - replace new condition with proper condition to allow for using - ``vmid`` on update (https://github.com/ansible-collections/community.general/pull/5206). - - rax_clb_nodes - fix code to be compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/4933). - - redfish_command - fix the check if a virtual media is unmounted to just check - for ``instered= false`` caused by Supermicro hardware that does not clear - the ``ImageName`` (https://github.com/ansible-collections/community.general/pull/4839). - - redfish_command - the Supermicro Redfish implementation only supports the - ``image_url`` parameter in the underlying API calls to ``VirtualMediaInsert`` - and ``VirtualMediaEject``. Any values set (or the defaults) for ``write_protected`` - or ``inserted`` will be ignored (https://github.com/ansible-collections/community.general/pull/4839). - - redfish_info - fix to ``GetChassisPower`` to correctly report power information - when multiple chassis exist, but not all chassis report power information - (https://github.com/ansible-collections/community.general/issues/4901). - - redfish_utils module utils - centralize payload checking when performing modification - requests to a Redfish service (https://github.com/ansible-collections/community.general/issues/5210/). - - redhat_subscription - fix unsubscribing on RHEL 9 (https://github.com/ansible-collections/community.general/issues/4741). - - redhat_subscription - make module idempotent when ``pool_ids`` are used (https://github.com/ansible-collections/community.general/issues/5313). - - redis* modules - fix call to ``module.fail_json`` when failing because of - missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733). - - slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection - by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). - - slack - fix message update for channels which start with ``CP``. When ``message-id`` - was passed it failed for channels which started with ``CP`` because the ``#`` - symbol was added before the ``channel_id`` (https://github.com/ansible-collections/community.general/pull/5249). - - sudoers - ensure sudoers config files are created with the permissions requested - by sudoers (0440) (https://github.com/ansible-collections/community.general/pull/4814). - - 'sudoers - fix incorrect handling of ``state: absent`` (https://github.com/ansible-collections/community.general/issues/4852).' - - tss lookup plugin - adding support for updated Delinea library (https://github.com/DelineaXPM/python-tss-sdk/issues/9, - https://github.com/ansible-collections/community.general/pull/5151). - - virtualbox inventory plugin - skip parsing values with keys that have both - a value and nested data. Skip parsing values that are nested more than two - keys deep (https://github.com/ansible-collections/community.general/issues/5332, - https://github.com/ansible-collections/community.general/pull/5348). - - xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia - resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). - - xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module - from working at all (https://github.com/ansible-collections/community.general/pull/5383). - - xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, - https://github.com/ansible-collections/community.general/pull/5007). - - zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, - https://github.com/ansible-collections/community.general/pull/4726). - deprecated_features: - - ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt`` - module util (https://github.com/ansible-collections/community.general/pull/5370). - - CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util - (https://github.com/ansible-collections/community.general/pull/5370). - - CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module - util (https://github.com/ansible-collections/community.general/pull/5370). - - CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner`` - module util (https://github.com/ansible-collections/community.general/pull/5370). - - cmd_runner module utils - deprecated ``fmt`` in favour of ``cmd_runner_fmt`` - as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777). - - django_manage - support for Django releases older than 4.1 has been deprecated - and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). - - django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate`` - that have been deprecated in Django long time ago will be removed in community.general - 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). - - django_manage - the behavior of "creating the virtual environment when missing" - is being deprecated and will be removed in community.general version 9.0.0 - (https://github.com/ansible-collections/community.general/pull/5405). - - gconftool2 - deprecates ``state=get`` in favor of using the module ``gconftool2_info`` - (https://github.com/ansible-collections/community.general/pull/4778). - - lxc_container - the module will no longer make any effort to support Python - 2 (https://github.com/ansible-collections/community.general/pull/5304). - - newrelic_deployment - ``appname`` and ``environment`` are no longer valid - options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341). - - proxmox - deprecated the current ``unprivileged`` default value, will be changed - to ``true`` in community.general 7.0.0 (https://github.com/pull/5224). - - xfconf - deprecated parameter ``disable_facts``, as since version 4.0.0 it - only allows value ``true`` (https://github.com/ansible-collections/community.general/pull/4520). - major_changes: - - The internal structure of the collection was changed for modules and action - plugins. These no longer live in a directory hierarchy ordered by topic, but - instead are now all in a single (flat) directory. This has no impact on users - *assuming they did not use internal FQCNs*. These will still work, but result - in deprecation warnings. They were never officially supported and thus the - redirects are kept as a courtsey, and this is not labelled as a breaking change. - Note that for example the Ansible VScode plugin started recommending these - internal names. If you followed its recommendation, you will now have to change - back to the short names to avoid deprecation warnings, and potential errors - in the future as these redirects will be removed in community.general 9.0.0 - (https://github.com/ansible-collections/community.general/pull/5461). - - newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341). - minor_changes: - - Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py - (https://github.com/ansible-collections/community.general/pull/5065). - - All software licenses are now in the ``LICENSES/`` directory of the collection - root (https://github.com/ansible-collections/community.general/pull/5065, - https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, - https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, - https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098, - https://github.com/ansible-collections/community.general/pull/5106). - - ModuleHelper module utils - added property ``verbosity`` to base class (https://github.com/ansible-collections/community.general/pull/5035). - - ModuleHelper module utils - improved ``ModuleHelperException``, using ``to_native()`` - for the exception message (https://github.com/ansible-collections/community.general/pull/4755). - - The collection repository conforms to the `REUSE specification `__ - except for the changelog fragments (https://github.com/ansible-collections/community.general/pull/5138). - - ali_instance - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). - - ali_instance_info - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5240). - - alternatives - add ``state=absent`` to be able to remove an alternative (https://github.com/ansible-collections/community.general/pull/4654). - - alternatives - add ``subcommands`` parameter (https://github.com/ansible-collections/community.general/pull/4654). - - ansible_galaxy_install - minor refactoring using latest ``ModuleHelper`` updates - (https://github.com/ansible-collections/community.general/pull/4752). - - apk - add ``world`` parameter for supporting a custom world file (https://github.com/ansible-collections/community.general/pull/4976). - - bitwarden lookup plugin - add option ``search`` to search for other attributes - than name (https://github.com/ansible-collections/community.general/pull/5297). - - cartesian lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - cmd_runner module util - added parameters ``check_mode_skip`` and ``check_mode_return`` - to ``CmdRunner.context()``, so that the command is not executed when ``check_mode=True`` - (https://github.com/ansible-collections/community.general/pull/4736). - - cmd_runner module utils - add ``__call__`` method to invoke context (https://github.com/ansible-collections/community.general/pull/4791). - - consul - adds ``ttl`` parameter for session (https://github.com/ansible-collections/community.general/pull/4996). - - consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367). - - consul_session - adds ``token`` parameter for session (https://github.com/ansible-collections/community.general/pull/5193). - - cpanm - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived - modules (https://github.com/ansible-collections/community.general/pull/4674). - - credstash lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - dependent lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - dig lookup plugin - add option ``fail_on_error`` to allow stopping execution - on lookup failures (https://github.com/ansible-collections/community.general/pull/4973). - - dig lookup plugin - start using Ansible's configuration manager to parse options. - All documented options can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440). - - dnstxt lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - filetree lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - flattened lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - gitlab module util - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_deploy_key - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_group - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_group_members - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_group_variable - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_hook - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_hook - minor refactoring (https://github.com/ansible-collections/community.general/pull/5271). - - gitlab_project - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_project_members - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_project_variable - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_protected_branch - minor refactor when checking for installed dependency - (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_runner - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - gitlab_user - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). - - hiera lookup plugin - start using Ansible's configuration manager to parse - options. The Hiera executable and config file can now also be passed as lookup - parameters (https://github.com/ansible-collections/community.general/pull/5440). - - homebrew, homebrew_tap - added Homebrew on Linux path to defaults (https://github.com/ansible-collections/community.general/pull/5241). - - keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` - (https://github.com/ansible-collections/community.general/issues/5023). - - keyring lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). - - linode inventory plugin - simplify option handling (https://github.com/ansible-collections/community.general/pull/5438). - - listen_ports_facts - add new ``include_non_listening`` option which adds ``-a`` - option to ``netstat`` and ``ss``. This shows both listening and non-listening - (for TCP this means established connections) sockets, and returns ``state`` - and ``foreign_address`` (https://github.com/ansible-collections/community.general/issues/4762, - https://github.com/ansible-collections/community.general/pull/4953). - - lmdb_kv lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358). - - machinectl become plugin - can now be used with a password from another user - than root, if a polkit rule is present (https://github.com/ansible-collections/community.general/pull/4849). - - machinectl become plugin - combine the success command when building the become - command to be consistent with other become plugins (https://github.com/ansible-collections/community.general/pull/5287). - - manifold lookup plugin - start using Ansible's configuration manager to parse - options (https://github.com/ansible-collections/community.general/pull/5440). - - maven_artifact - add a new ``unredirected_headers`` option that can be used - with ansible-core 2.12 and above. The default value is to not use ``Authorization`` - and ``Cookie`` headers on redirects for security reasons. With ansible-core - 2.11, all headers are still passed on for redirects (https://github.com/ansible-collections/community.general/pull/4812). - - mksysb - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived - modules (https://github.com/ansible-collections/community.general/pull/4674). - - nagios - minor refactoring on parameter validation for different actions (https://github.com/ansible-collections/community.general/pull/5239). - - netcup_dnsapi - add ``timeout`` parameter (https://github.com/ansible-collections/community.general/pull/5301). - - nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361). - - nmcli - add bond option ``xmit_hash_policy`` to bond options (https://github.com/ansible-collections/community.general/issues/5148). - - nmcli - adds ``vpn`` type and parameter for supporting VPN with service type - L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). - - nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228). - - opentelemetry callback plugin - allow configuring opentelementry callback - via config file (https://github.com/ansible-collections/community.general/pull/4916). - - opentelemetry callback plugin - send logs. This can be disabled by setting - ``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175). - - pacman - added parameters ``reason`` and ``reason_for`` to set/change the - install reason of packages (https://github.com/ansible-collections/community.general/pull/4956). - - passwordstore lookup plugin - allow options to be passed lookup options instead - of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444). - - passwordstore lookup plugin - allow using alternative password managers by - detecting wrapper scripts, allow explicit configuration of pass and gopass - backends (https://github.com/ansible-collections/community.general/issues/4766). - - passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436) - - pipx - added state ``latest`` to the module (https://github.com/ansible-collections/community.general/pull/5105). - - pipx - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/5085). - - pipx - module fails faster when ``name`` is missing for states ``upgrade`` - and ``reinstall`` (https://github.com/ansible-collections/community.general/pull/5100). - - pipx - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived - modules (https://github.com/ansible-collections/community.general/pull/4674). - - pipx module utils - created new module util ``pipx`` providing a ``cmd_runner`` - specific for the ``pipx`` module (https://github.com/ansible-collections/community.general/pull/5085). - - portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options - (https://github.com/ansible-collections/community.general/pull/5349). - - portage - use Portage's python module instead of calling gentoolkit-provided - program in shell (https://github.com/ansible-collections/community.general/pull/5349). - - proxmox inventory plugin - added new flag ``qemu_extended_statuses`` and new - groups ``prelaunch``, ``paused``. They will be - populated only when ``want_facts=true``, ``qemu_extended_statuses=true`` and - only for ``QEMU`` machines (https://github.com/ansible-collections/community.general/pull/4723). - - proxmox inventory plugin - simplify option handling code (https://github.com/ansible-collections/community.general/pull/5437). - - proxmox module utils, the proxmox* modules - add ``api_task_ok`` helper to - standardize API task status checks across all proxmox modules (https://github.com/ansible-collections/community.general/pull/5274). - - proxmox_kvm - allow ``agent`` argument to be a string (https://github.com/ansible-collections/community.general/pull/5107). - - proxmox_snap - add ``unbind`` param to support snapshotting containers with - configured mountpoints (https://github.com/ansible-collections/community.general/pull/5274). - - puppet - adds ``confdir`` parameter to configure a custom confir location - (https://github.com/ansible-collections/community.general/pull/4740). - - redfish - added new command GetVirtualMedia, VirtualMediaInsert and VirtualMediaEject - to Systems category due to Redfish spec changes the virtualMedia resource - location from Manager to System (https://github.com/ansible-collections/community.general/pull/5124). - - redfish_config - add ``SetSessionService`` to set default session timeout - policy (https://github.com/ansible-collections/community.general/issues/5008). - - redfish_info - add ``GetManagerInventory`` to report list of Manager inventory - information (https://github.com/ansible-collections/community.general/issues/4899). - - seport - added new argument ``local`` (https://github.com/ansible-collections/community.general/pull/5203) - - snap - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived - modules (https://github.com/ansible-collections/community.general/pull/4674). - - sudoers - will attempt to validate the proposed sudoers rule using visudo - if available, optionally skipped, or required (https://github.com/ansible-collections/community.general/pull/4794, - https://github.com/ansible-collections/community.general/issues/4745). - - terraform - adds capability to handle complex variable structures for ``variables`` - parameter in the module. This must be enabled with the new ``complex_vars`` - parameter (https://github.com/ansible-collections/community.general/pull/4797). - - terraform - run ``terraform init`` with ``-no-color`` not to mess up the stdout - of the task (https://github.com/ansible-collections/community.general/pull/5147). - - wdc_redfish_command - add ``IndicatorLedOn`` and ``IndicatorLedOff`` commands - for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5059). - - wdc_redfish_command - add ``PowerModeLow`` and ``PowerModeNormal`` commands - for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5145). - - xfconf - add ``stdout``, ``stderr`` and ``cmd`` to the module results (https://github.com/ansible-collections/community.general/pull/5037). - - xfconf - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). - - xfconf - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). - - xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived - modules (https://github.com/ansible-collections/community.general/pull/4674). - - xfconf module utils - created new module util ``xfconf`` providing a ``cmd_runner`` - specific for ``xfconf`` modules (https://github.com/ansible-collections/community.general/pull/4776). - - xfconf_info - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). - - xfconf_info - use ``do_raise()`` instead of defining custom exception class - (https://github.com/ansible-collections/community.general/pull/4975). - - znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306). - release_summary: This is a pre-release for the upcoming 6.0.0 major release. - The main objective of this pre-release is to make it possible to test the - large stuctural changes by flattening the directory structure. See the corresponding - entry in the changelog for details. - removed_features: - - bitbucket* modules - ``username`` is no longer an alias of ``workspace``, - but of ``user`` (https://github.com/ansible-collections/community.general/pull/5326). - - gem - the default of the ``norc`` option changed from ``false`` to ``true`` - (https://github.com/ansible-collections/community.general/pull/5326). - - gitlab_group_members - ``gitlab_group`` must now always contain the full path, - and no longer just the name or path (https://github.com/ansible-collections/community.general/pull/5326). - - keycloak_authentication - the return value ``flow`` has been removed. Use - ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326). - - keycloak_group - the return value ``group`` has been removed. Use ``end_state`` - instead (https://github.com/ansible-collections/community.general/pull/5326). - - lxd_container - the default of the ``ignore_volatile_options`` option changed - from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). - - mail callback plugin - the ``sender`` option is now required (https://github.com/ansible-collections/community.general/pull/5326). - - module_helper module utils - remove the ``VarDict`` attribute from ``ModuleHelper``. - Import ``VarDict`` from ``ansible_collections.community.general.plugins.module_utils.mh.mixins.vars`` - instead (https://github.com/ansible-collections/community.general/pull/5326). - - proxmox inventory plugin - the default of the ``want_proxmox_nodes_ansible_host`` - option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). - - vmadm - the ``debug`` option has been removed. It was not used anyway (https://github.com/ansible-collections/community.general/pull/5326). - fragments: - - 3671-illumos-pfexec.yml - - 4175-opentelemetry_logs.yml - - 4520-xfconf-deprecate-disable-facts.yml - - 4654-alternatives-add-subcommands.yml - - 4674-use-mh-raise.yaml - - 4682-compatibility-virtualmedia-resource-location.yaml - - 4700-code-changes.yml - - 4712-consul-bugfix.yaml - - 4719-fix-keycloak-realm.yaml - - 4724-proxmox-qemu-extend.yaml - - 4726-zfs.yml - - 4733-redis-fail.yml - - 4736-cmd-runner-skip-if-check.yml - - 4740-puppet-feature.yaml - - 4746-add-vpn-support-nmcli.yaml - - 4752-ansible-galaxy-install-mh-updates.yml - - 4755-mhexception-improvement.yml - - 4776-xfconf-cmd-runner.yaml - - 4777-cmd-runner-deprecate-fmt.yaml - - 4778-gconftool2-deprecate-state-get.yaml - - 4780-passwordstore-wrapper-compat.yml - - 4791-cmd-runner-callable.yaml - - 4794-sudoers-validation.yml - - 4797-terraform-complex-variables.yml - - 4809-redhat_subscription-unsubscribe.yaml - - 4810-alternatives-bug.yml - - 4812-expose-unredirected-headers.yml - - 4813-fix-nmcli-convert-list.yaml - - 4814-sudoers-file-permissions.yml - - 4816-proxmox-fix-extended-status.yaml - - 4836-alternatives.yml - - 4839-fix-VirtualMediaInsert-Supermicro.yml - - 4849-add-password-prompt-support-for-machinectl.yml - - 4852-sudoers-state-absent.yml - - 4886-fix-lxd-inventory-hostname.yml - - 4899-add-GetManagerInventory-for-redfish_info.yml - - 4901-fix-redfish-chassispower.yml - - 4903-cmdrunner-bugfix.yaml - - 4910-fix-for-agent-enabled.yml - - 4911-dsv-honor-tld-option.yml - - 4916-opentelemetry-ini-options.yaml - - 4933-fix-rax-clb-nodes.yaml - - 4945-fix-get_vm-int-parse-handling.yaml - - 4953-listen-ports-facts-extend-output.yaml - - 4955-fix-path-detection-for-gopass.yaml - - 4956-pacman-install-reason.yaml - - 4959-pacman-fix-url-packages-name.yaml - - 4964-fix-keyring-info.yml - - 4973-introduce-dig-lookup-argument.yaml - - 4975-xfconf-use-do-raise.yaml - - 4976-apk-add-support-for-a-custom-world-file.yaml - - 4996-consul-session-ttl.yml - - 4998-nmcli-fix-int-options-idempotence.yml - - 4999-xfconf-bool.yml - - 5008-addSetSessionService.yml - - 5019-slack-support-more-groups.yml - - 5022-lastpass-lookup-cleanup.yml - - 5023-http-agent-param-keycloak.yml - - 5027-fix-returnall-for-gopass.yaml - - 5035-mh-base-verbosity.yaml - - 5037-xfconf-add-cmd-output.yaml - - 5059-wdc_redfish_command-indicator-leds.yml - - 5085-pipx-use-cmd-runner.yaml - - 5100-pipx-req-if.yaml - - 5105-pipx-state-latest.yaml - - 5107-proxmox-agent-argument.yaml - - 5108-proxmox-node-name-condition.yml - - 5111-fixes.yml - - 5112-fix-nsupdate-ns-entry.yaml - - 5124-compatibility-virtualmedia-resource-location.yaml - - 5126-nmcli-remove-diffs.yml - - 5129-dig-boolean-params-fix.yml - - 5145-wdc-redfish-enclosure-power-state.yml - - 5147-terraform-init-no-color.yml - - 5149-nmcli-bond-option.yml - - 5151-add-delinea-support-tss-lookup.yml - - 5193-consul-session-token.yaml - - 5194-fix-proxmox-agent-exception.yaml - - 5198-proxmox.yml - - 5202-bugfix-environmentError-wrong-indentation.yaml - - 5203-seport-add-local-argument.yaml - - 5206-proxmox-conditional-vmid.yml - - 5210-redfish_utils-cleanup-of-configuration-logic-and-oem-checks.yaml - - 5224-proxmox-unprivileged-default.yaml - - 5228-nmcli-ip-options.yaml - - 5239-nagios-refactor.yaml - - 5240-unused-imports.yaml - - 5241-homebrew-add-linux-path.yaml - - 5243-osx-defaults-expand-user-flags.yml - - 5249-add-new-channel-prefix.yml - - 5259-gitlab-imports.yaml - - 5271-gitlab_hook-refactor.yaml - - 5274-proxmox-snap-container-with-mountpoints.yml - - 5280-lxc_container-py3.yaml - - 5282-locale_gen.yaml - - 5287-machinectl-become-success.yml - - 5291-fix-nmcli-error-when-setting-unset-mac-address.yaml - - 5297-bitwarden-add-search-field.yml - - 5301-netcup_dnsapi-timeout.yml - - 5306-add-options-for-authentication.yml - - 5307-ini_file-lint.yaml - - 5313-fix-redhat_subscription-idempotency-pool_ids.yml - - 5341-newrelic-v2-api-changes.yml - - 5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml - - 5348-fix-vbox-deeply-nested-hostvars.yml - - 5349-drop-gentoolkit-more-knobs.yml - - 5358-lxc-container-refactor.yml - - 5361-nmcli-add-infiniband-transport-mode.yaml - - 5367-consul-refactor.yaml - - 5369-pkgng-fix-update-all.yaml - - 5370-mh-cmdmixin-deprecation.yaml - - 5377-nsupdate-ns-records-with-bind.yml - - 5383-xenserver_facts.yml - - 5385-search_s-based-_is_value_present.yaml - - 5393-archive.yml - - 5400-django-manage-deprecations.yml - - 5404-django-manage-venv-deprecation.yml - - 5436-passwordstore-errors.yml - - 5437-proxmox.yml - - 5438-linode.yml - - 5439-dig-return-empty-result.yml - - 5444-passwordstore-options.yml - - 5457-dnstxt-empty.yml - - 6.0.0-a1.yml - - deprecation-removals.yml - - licenses-2.yml - - licenses.yml - - lookup-options.yml - - psf-license.yml - - simplified-bsd-license.yml - - unflatmap.yml - modules: - - description: Scaleway Function namespace management - name: scaleway_function_namespace - namespace: '' - - description: Retrieve information on Scaleway Function namespace - name: scaleway_function_namespace_info - namespace: '' - release_date: '2022-11-02' +ancestor: 6.0.0 +releases: {} diff --git a/changelogs/fragments/4728-onepassword-v2.yml b/changelogs/fragments/4728-onepassword-v2.yml deleted file mode 100644 index fbec3aa60d..0000000000 --- a/changelogs/fragments/4728-onepassword-v2.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - onepassword - support version 2 of the OnePassword CLI (https://github.com/ansible-collections/community.general/pull/4728) diff --git a/changelogs/fragments/5435-escape-ldap-param.yml b/changelogs/fragments/5435-escape-ldap-param.yml deleted file mode 100644 index 3f22f61759..0000000000 --- a/changelogs/fragments/5435-escape-ldap-param.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - ldap_attrs - fix bug which caused a ``Bad search filter`` error. The error was occuring when the ldap attribute value contained special characters such as ``(`` or ``*`` (https://github.com/ansible-collections/community.general/issues/5434, https://github.com/ansible-collections/community.general/pull/5435). diff --git a/changelogs/fragments/5450-allow-for-xordered-dns.yaml b/changelogs/fragments/5450-allow-for-xordered-dns.yaml deleted file mode 100644 index 1bb1d9c761..0000000000 --- a/changelogs/fragments/5450-allow-for-xordered-dns.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ldap_attrs - allow for DNs to have ``{x}`` prefix on first RDN (https://github.com/ansible-collections/community.general/issues/977, https://github.com/ansible-collections/community.general/pull/5450). diff --git a/changelogs/fragments/5468-iso-create-not-add-folders.yml b/changelogs/fragments/5468-iso-create-not-add-folders.yml deleted file mode 100644 index 5bbe48f579..0000000000 --- a/changelogs/fragments/5468-iso-create-not-add-folders.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - iso_create - the module somtimes failed to add folders for Joliet and UDF formats (https://github.com/ansible-collections/community.general/issues/5275). diff --git a/changelogs/fragments/5475-snap-option-value-whitespace.yml b/changelogs/fragments/5475-snap-option-value-whitespace.yml deleted file mode 100644 index c41c70da38..0000000000 --- a/changelogs/fragments/5475-snap-option-value-whitespace.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - snap - allow values in the ``options`` parameter to contain whitespaces (https://github.com/ansible-collections/community.general/pull/5475). diff --git a/changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml b/changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml deleted file mode 100644 index f480456953..0000000000 --- a/changelogs/fragments/5477-ansible-galaxy-install-cmd-runner.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ansible_galaxy_install - refactored module to use ``CmdRunner`` to execute ``ansible-galaxy`` (https://github.com/ansible-collections/community.general/pull/5477). diff --git a/changelogs/fragments/5483-hponcfg-cmd-runner.yml b/changelogs/fragments/5483-hponcfg-cmd-runner.yml deleted file mode 100644 index 9d6c0eb8a9..0000000000 --- a/changelogs/fragments/5483-hponcfg-cmd-runner.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - hponcfg - refactored module to use ``CmdRunner`` to execute ``hponcfg`` (https://github.com/ansible-collections/community.general/pull/5483). diff --git a/changelogs/fragments/5484-mksysb-cmd-runner.yml b/changelogs/fragments/5484-mksysb-cmd-runner.yml deleted file mode 100644 index 89f4d0dac8..0000000000 --- a/changelogs/fragments/5484-mksysb-cmd-runner.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - mksysb - refactored module to use ``CmdRunner`` to execute ``mksysb`` (https://github.com/ansible-collections/community.general/pull/5484). diff --git a/changelogs/fragments/5485-cpanm-cmd-runner.yml b/changelogs/fragments/5485-cpanm-cmd-runner.yml deleted file mode 100644 index 508f261762..0000000000 --- a/changelogs/fragments/5485-cpanm-cmd-runner.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - cpanm - refactored module to use ``CmdRunner`` to execute ``cpanm`` (https://github.com/ansible-collections/community.general/pull/5485). diff --git a/changelogs/fragments/6.0.0.yml b/changelogs/fragments/6.0.0.yml deleted file mode 100644 index 347d16861c..0000000000 --- a/changelogs/fragments/6.0.0.yml +++ /dev/null @@ -1,3 +0,0 @@ -release_summary: >- - New major release of community.general with lots of bugfixes, new features, some removed deprecated features, and some other breaking changes. - Please check the coresponding sections of the changelog for more details. diff --git a/galaxy.yml b/galaxy.yml index 0a3fe09b6e..1c300da904 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.0.0 +version: 6.1.0 readme: README.md authors: - Ansible (https://github.com/ansible) From df9c5d1d356da2612650cbf0adf65f9871c3b4fe Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 7 Nov 2022 21:51:24 +0100 Subject: [PATCH 0318/2104] Add stable-6 to nightlies. --- .azure-pipelines/azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 52eaf65069..c39a855dd0 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -29,6 +29,7 @@ schedules: always: true branches: include: + - stable-6 - stable-5 - cron: 0 11 * * 0 displayName: Weekly (old stable branches) From 858eaac50089490e782b9a25754d21524eb7638c Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 9 Nov 2022 02:03:07 +1300 Subject: [PATCH 0319/2104] minor docs update (#5501) --- plugins/modules/xfconf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/modules/xfconf.py b/plugins/modules/xfconf.py index aaf80d4db2..c231a47484 100644 --- a/plugins/modules/xfconf.py +++ b/plugins/modules/xfconf.py @@ -16,9 +16,9 @@ author: short_description: Edit XFCE4 Configurations description: - This module allows for the manipulation of Xfce 4 Configuration with the help of - xfconf-query. Please see the xfconf-query(1) man pages for more details. + xfconf-query. Please see the xfconf-query(1) man page for more details. seealso: - - name: C(xfconf-query) man page + - name: xfconf-query(1) man page description: Manual page of the C(xfconf-query) tool at the XFCE documentation site. link: 'https://docs.xfce.org/xfce/xfconf/xfconf-query' @@ -70,7 +70,7 @@ options: default: "present" force_array: description: - - Force array even if only one element + - Force array even if only one element. type: bool default: false aliases: ['array'] From 27827cbea4e752cd73afa85ac09ce91ea7ab8af9 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 8 Nov 2022 19:06:59 +0000 Subject: [PATCH 0320/2104] Clarification to use underscores instead of dashes in parser name (#5500) * Clarification to use underscores instead of dashes in parser name * Update plugins/filter/jc.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/filter/jc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index 879647a04d..6708f573d3 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -26,6 +26,7 @@ DOCUMENTATION = ''' description: - The correct parser for the input data. - For example C(ifconfig). + - "Note: use underscores instead of dashes (if any) in the parser module name." - See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers. type: string required: true From 621fb6a619fce1d45a72dc2b46bdbc3fb64d86d5 Mon Sep 17 00:00:00 2001 From: wh1t3 r4bb1t <16529603+d34d5p4rr0w@users.noreply.github.com> Date: Wed, 9 Nov 2022 00:00:05 +0200 Subject: [PATCH 0321/2104] one_vm: fix for 'NoneType' object has no attribute 'split' in get_vm_labels_and_attributes_dict (#5489) * Fix for 'NoneType' object has no attribute 'split' * Added changelog to fix * Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml Co-authored-by: Felix Fontein * Fix line ending in changelog Co-authored-by: Felix Fontein --- changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml | 2 ++ plugins/modules/one_vm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml diff --git a/changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml b/changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml new file mode 100644 index 0000000000..8b0d92ec40 --- /dev/null +++ b/changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml @@ -0,0 +1,2 @@ +bugfixes: + - one_vm - avoid splitting labels that are ``None`` (https://github.com/ansible-collections/community.general/pull/5489). \ No newline at end of file diff --git a/plugins/modules/one_vm.py b/plugins/modules/one_vm.py index 6bfc793603..7122907d38 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -970,7 +970,7 @@ def get_vm_labels_and_attributes_dict(client, vm_id): if key != 'LABELS': attrs_dict[key] = value else: - if key is not None: + if key is not None and value is not None: labels_list = value.split(',') return labels_list, attrs_dict From 97b584e2617bcd7437ffc184acccb2e12be45206 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 9 Nov 2022 19:18:40 +1300 Subject: [PATCH 0322/2104] Short descriptions (batch1) - massive fix on Capitalization and trailing period (#5503) * short_description fix batch 1 * Update plugins/modules/ali_instance.py Co-authored-by: Felix Fontein * Update plugins/modules/apt_rpm.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/modules/ali_instance.py | 2 +- plugins/modules/ali_instance_info.py | 2 +- plugins/modules/apache2_module.py | 2 +- plugins/modules/apt_rpm.py | 2 +- plugins/modules/beadm.py | 2 +- plugins/modules/circonus_annotation.py | 2 +- plugins/modules/clc_aa_policy.py | 2 +- plugins/modules/clc_alert_policy.py | 2 +- plugins/modules/clc_blueprint_package.py | 2 +- plugins/modules/clc_loadbalancer.py | 2 +- plugins/modules/clc_modify_server.py | 2 +- plugins/modules/clc_publicip.py | 2 +- plugins/modules/clc_server.py | 2 +- plugins/modules/clc_server_snapshot.py | 2 +- plugins/modules/cloud_init_data_facts.py | 2 +- plugins/modules/consul.py | 2 +- plugins/modules/cpanm.py | 2 +- plugins/modules/deploy_helper.py | 2 +- plugins/modules/dimensiondata_vlan.py | 2 +- plugins/modules/dnsmadeeasy.py | 2 +- plugins/modules/github_deploy_key.py | 2 +- plugins/modules/github_issue.py | 2 +- plugins/modules/github_key.py | 2 +- plugins/modules/gitlab_deploy_key.py | 2 +- plugins/modules/gitlab_hook.py | 2 +- plugins/modules/gitlab_runner.py | 2 +- plugins/modules/gunicorn.py | 2 +- plugins/modules/hipchat.py | 2 +- plugins/modules/homebrew_tap.py | 2 +- plugins/modules/htpasswd.py | 2 +- plugins/modules/ibm_sa_host.py | 2 +- plugins/modules/ibm_sa_host_ports.py | 2 +- plugins/modules/ibm_sa_pool.py | 2 +- plugins/modules/ibm_sa_vol.py | 2 +- plugins/modules/ibm_sa_vol_map.py | 2 +- plugins/modules/ipa_subca.py | 2 +- plugins/modules/jira.py | 2 +- plugins/modules/ldap_entry.py | 2 +- plugins/modules/ldap_passwd.py | 2 +- plugins/modules/librato_annotation.py | 2 +- plugins/modules/linode_v4.py | 2 +- plugins/modules/listen_ports_facts.py | 2 +- plugins/modules/lldp.py | 2 +- plugins/modules/logentries_msg.py | 2 +- plugins/modules/manageiq_group.py | 2 +- plugins/modules/manageiq_policies.py | 2 +- plugins/modules/manageiq_provider.py | 2 +- plugins/modules/manageiq_tags.py | 2 +- plugins/modules/manageiq_tenant.py | 2 +- plugins/modules/manageiq_user.py | 2 +- 50 files changed, 50 insertions(+), 50 deletions(-) diff --git a/plugins/modules/ali_instance.py b/plugins/modules/ali_instance.py index 4acec0a109..96a042f5ca 100644 --- a/plugins/modules/ali_instance.py +++ b/plugins/modules/ali_instance.py @@ -27,7 +27,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ali_instance -short_description: Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group. +short_description: Create, Start, Stop, Restart or Terminate an Instance in ECS; Add or Remove Instance to/from a Security Group description: - Create, start, stop, restart, modify or terminate ecs instances. - Add or remove ecs instances to/from security group. diff --git a/plugins/modules/ali_instance_info.py b/plugins/modules/ali_instance_info.py index ea7bcc8d4a..f489f96372 100644 --- a/plugins/modules/ali_instance_info.py +++ b/plugins/modules/ali_instance_info.py @@ -27,7 +27,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ali_instance_info -short_description: Gather information on instances of Alibaba Cloud ECS. +short_description: Gather information on instances of Alibaba Cloud ECS description: - This module fetches data from the Open API in Alicloud. The module must be called from within the ECS instance itself. diff --git a/plugins/modules/apache2_module.py b/plugins/modules/apache2_module.py index 65d2f689bf..a58c0f0c54 100644 --- a/plugins/modules/apache2_module.py +++ b/plugins/modules/apache2_module.py @@ -16,7 +16,7 @@ author: - Christian Berendt (@berendt) - Ralf Hertel (@n0trax) - Robin Roth (@robinro) -short_description: Enables/disables a module of the Apache2 webserver. +short_description: Enables/disables a module of the Apache2 webserver description: - Enables or disables a specified module of the Apache2 webserver. options: diff --git a/plugins/modules/apt_rpm.py b/plugins/modules/apt_rpm.py index 2b6bf3e8a2..d949a61e68 100644 --- a/plugins/modules/apt_rpm.py +++ b/plugins/modules/apt_rpm.py @@ -14,7 +14,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: apt_rpm -short_description: apt_rpm package manager +short_description: APT-RPM package manager description: - Manages packages with I(apt-rpm). Both low-level (I(rpm)) and high-level (I(apt-get)) package manager binaries required. options: diff --git a/plugins/modules/beadm.py b/plugins/modules/beadm.py index 8cb43c6cbb..7a84997089 100644 --- a/plugins/modules/beadm.py +++ b/plugins/modules/beadm.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: beadm -short_description: Manage ZFS boot environments on FreeBSD/Solaris/illumos systems. +short_description: Manage ZFS boot environments on FreeBSD/Solaris/illumos systems description: - Create, delete or activate ZFS boot environments. - Mount and unmount ZFS boot environments. diff --git a/plugins/modules/circonus_annotation.py b/plugins/modules/circonus_annotation.py index 6248fd2f55..661c854e6d 100644 --- a/plugins/modules/circonus_annotation.py +++ b/plugins/modules/circonus_annotation.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: circonus_annotation -short_description: create an annotation in circonus +short_description: Create an annotation in circonus description: - Create an annotation event with a given category, title and description. Optionally start, end or durations can be provided author: "Nick Harring (@NickatEpic)" diff --git a/plugins/modules/clc_aa_policy.py b/plugins/modules/clc_aa_policy.py index d5d56b2a65..d1fba2429a 100644 --- a/plugins/modules/clc_aa_policy.py +++ b/plugins/modules/clc_aa_policy.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_aa_policy -short_description: Create or Delete Anti Affinity Policies at CenturyLink Cloud. +short_description: Create or Delete Anti Affinity Policies at CenturyLink Cloud description: - An Ansible module to Create or Delete Anti Affinity Policies at CenturyLink Cloud. options: diff --git a/plugins/modules/clc_alert_policy.py b/plugins/modules/clc_alert_policy.py index c7f02c2ffa..1d733013d2 100644 --- a/plugins/modules/clc_alert_policy.py +++ b/plugins/modules/clc_alert_policy.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_alert_policy -short_description: Create or Delete Alert Policies at CenturyLink Cloud. +short_description: Create or Delete Alert Policies at CenturyLink Cloud description: - An Ansible module to Create or Delete Alert Policies at CenturyLink Cloud. options: diff --git a/plugins/modules/clc_blueprint_package.py b/plugins/modules/clc_blueprint_package.py index 0dc29b0ce0..cb23df852b 100644 --- a/plugins/modules/clc_blueprint_package.py +++ b/plugins/modules/clc_blueprint_package.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_blueprint_package -short_description: deploys a blue print package on a set of servers in CenturyLink Cloud. +short_description: Deploys a blue print package on a set of servers in CenturyLink Cloud description: - An Ansible module to deploy blue print package on a set of servers in CenturyLink Cloud. options: diff --git a/plugins/modules/clc_loadbalancer.py b/plugins/modules/clc_loadbalancer.py index d13c2d76ce..ab6d866fb6 100644 --- a/plugins/modules/clc_loadbalancer.py +++ b/plugins/modules/clc_loadbalancer.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_loadbalancer -short_description: Create, Delete shared loadbalancers in CenturyLink Cloud. +short_description: Create, Delete shared loadbalancers in CenturyLink Cloud description: - An Ansible module to Create, Delete shared loadbalancers in CenturyLink Cloud. options: diff --git a/plugins/modules/clc_modify_server.py b/plugins/modules/clc_modify_server.py index ff0611e3f8..786cdf2ae4 100644 --- a/plugins/modules/clc_modify_server.py +++ b/plugins/modules/clc_modify_server.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_modify_server -short_description: modify servers in CenturyLink Cloud. +short_description: Modify servers in CenturyLink Cloud description: - An Ansible module to modify servers in CenturyLink Cloud. options: diff --git a/plugins/modules/clc_publicip.py b/plugins/modules/clc_publicip.py index 98d392adf9..5111b3cf19 100644 --- a/plugins/modules/clc_publicip.py +++ b/plugins/modules/clc_publicip.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_publicip -short_description: Add and Delete public ips on servers in CenturyLink Cloud. +short_description: Add and Delete public ips on servers in CenturyLink Cloud description: - An Ansible module to add or delete public ip addresses on an existing server or servers in CenturyLink Cloud. options: diff --git a/plugins/modules/clc_server.py b/plugins/modules/clc_server.py index 062c5ea411..d8e4f16217 100644 --- a/plugins/modules/clc_server.py +++ b/plugins/modules/clc_server.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_server -short_description: Create, Delete, Start and Stop servers in CenturyLink Cloud. +short_description: Create, Delete, Start and Stop servers in CenturyLink Cloud description: - An Ansible module to Create, Delete, Start and Stop servers in CenturyLink Cloud. options: diff --git a/plugins/modules/clc_server_snapshot.py b/plugins/modules/clc_server_snapshot.py index 44f52ece64..096abfe29b 100644 --- a/plugins/modules/clc_server_snapshot.py +++ b/plugins/modules/clc_server_snapshot.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: clc_server_snapshot -short_description: Create, Delete and Restore server snapshots in CenturyLink Cloud. +short_description: Create, Delete and Restore server snapshots in CenturyLink Cloud description: - An Ansible module to Create, Delete and Restore server snapshots in CenturyLink Cloud. options: diff --git a/plugins/modules/cloud_init_data_facts.py b/plugins/modules/cloud_init_data_facts.py index df2f77148e..d8209cc61a 100644 --- a/plugins/modules/cloud_init_data_facts.py +++ b/plugins/modules/cloud_init_data_facts.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: cloud_init_data_facts -short_description: Retrieve facts of cloud-init. +short_description: Retrieve facts of cloud-init description: - Gathers facts by reading the status.json and result.json of cloud-init. author: René Moser (@resmo) diff --git a/plugins/modules/consul.py b/plugins/modules/consul.py index 0d75bde2eb..a7cefc9865 100644 --- a/plugins/modules/consul.py +++ b/plugins/modules/consul.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: consul -short_description: "Add, modify & delete services within a consul cluster." +short_description: "Add, modify & delete services within a consul cluster" description: - Registers services and checks for an agent with a consul cluster. A service is some process running on the agent node that should be advertised by diff --git a/plugins/modules/cpanm.py b/plugins/modules/cpanm.py index 7ac8429bda..98f37d573e 100644 --- a/plugins/modules/cpanm.py +++ b/plugins/modules/cpanm.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: cpanm -short_description: Manages Perl library dependencies. +short_description: Manages Perl library dependencies description: - Manage Perl library dependencies using cpanminus. options: diff --git a/plugins/modules/deploy_helper.py b/plugins/modules/deploy_helper.py index 3d3fe08f28..afa63cba19 100644 --- a/plugins/modules/deploy_helper.py +++ b/plugins/modules/deploy_helper.py @@ -15,7 +15,7 @@ DOCUMENTATION = ''' --- module: deploy_helper author: "Ramon de la Fuente (@ramondelafuente)" -short_description: Manages some of the steps common in deploying projects. +short_description: Manages some of the steps common in deploying projects description: - The Deploy Helper manages some of the steps common in deploying software. It creates a folder structure, manages a symlink for the current release diff --git a/plugins/modules/dimensiondata_vlan.py b/plugins/modules/dimensiondata_vlan.py index ca25374dcb..86db5e5057 100644 --- a/plugins/modules/dimensiondata_vlan.py +++ b/plugins/modules/dimensiondata_vlan.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: dimensiondata_vlan -short_description: Manage a VLAN in a Cloud Control network domain. +short_description: Manage a VLAN in a Cloud Control network domain extends_documentation_fragment: - community.general.dimensiondata - community.general.dimensiondata_wait diff --git a/plugins/modules/dnsmadeeasy.py b/plugins/modules/dnsmadeeasy.py index cb27a5a68a..b775f24ab0 100644 --- a/plugins/modules/dnsmadeeasy.py +++ b/plugins/modules/dnsmadeeasy.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: dnsmadeeasy -short_description: Interface with dnsmadeeasy.com (a DNS hosting service). +short_description: Interface with dnsmadeeasy.com (a DNS hosting service) description: - > Manages DNS records via the v2 REST API of the DNS Made Easy service. It handles records only; there is no manipulation of domains or diff --git a/plugins/modules/github_deploy_key.py b/plugins/modules/github_deploy_key.py index 97e7a1ac7f..bd32438b0a 100644 --- a/plugins/modules/github_deploy_key.py +++ b/plugins/modules/github_deploy_key.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' --- module: github_deploy_key author: "Ali (@bincyber)" -short_description: Manages deploy keys for GitHub repositories. +short_description: Manages deploy keys for GitHub repositories description: - "Adds or removes deploy keys for GitHub repositories. Supports authentication using username and password, username and password and 2-factor authentication code (OTP), OAuth2 token, or personal access token. Admin diff --git a/plugins/modules/github_issue.py b/plugins/modules/github_issue.py index 4f8f2363cc..d49837499a 100644 --- a/plugins/modules/github_issue.py +++ b/plugins/modules/github_issue.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: github_issue -short_description: View GitHub issue. +short_description: View GitHub issue description: - View GitHub issue for a given repository and organization. options: diff --git a/plugins/modules/github_key.py b/plugins/modules/github_key.py index 5dfd694275..3c7ee7bd7b 100644 --- a/plugins/modules/github_key.py +++ b/plugins/modules/github_key.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: github_key -short_description: Manage GitHub access keys. +short_description: Manage GitHub access keys description: - Creates, removes, or updates GitHub access keys. options: diff --git a/plugins/modules/gitlab_deploy_key.py b/plugins/modules/gitlab_deploy_key.py index 1b77801ec4..3ed2b2d7a5 100644 --- a/plugins/modules/gitlab_deploy_key.py +++ b/plugins/modules/gitlab_deploy_key.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: gitlab_deploy_key -short_description: Manages GitLab project deploy keys. +short_description: Manages GitLab project deploy keys description: - Adds, updates and removes project deploy keys author: diff --git a/plugins/modules/gitlab_hook.py b/plugins/modules/gitlab_hook.py index c10cb45324..70864207ed 100644 --- a/plugins/modules/gitlab_hook.py +++ b/plugins/modules/gitlab_hook.py @@ -14,7 +14,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: gitlab_hook -short_description: Manages GitLab project hooks. +short_description: Manages GitLab project hooks description: - Adds, updates and removes project hook author: diff --git a/plugins/modules/gitlab_runner.py b/plugins/modules/gitlab_runner.py index 67d998f12f..1094df9424 100644 --- a/plugins/modules/gitlab_runner.py +++ b/plugins/modules/gitlab_runner.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: gitlab_runner -short_description: Create, modify and delete GitLab Runners. +short_description: Create, modify and delete GitLab Runners description: - Register, update and delete runners with the GitLab API. - All operations are performed using the GitLab API v4. diff --git a/plugins/modules/gunicorn.py b/plugins/modules/gunicorn.py index 9ed903dfd5..ff88cead7c 100644 --- a/plugins/modules/gunicorn.py +++ b/plugins/modules/gunicorn.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: gunicorn -short_description: Run gunicorn with various settings. +short_description: Run gunicorn with various settings description: - Starts gunicorn with the parameters specified. Common settings for gunicorn configuration are supported. For additional configuration use a config file diff --git a/plugins/modules/hipchat.py b/plugins/modules/hipchat.py index 1871bd23ae..a5aa150f32 100644 --- a/plugins/modules/hipchat.py +++ b/plugins/modules/hipchat.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: hipchat -short_description: Send a message to Hipchat. +short_description: Send a message to Hipchat description: - Send a message to a Hipchat room, with options to control the formatting. options: diff --git a/plugins/modules/homebrew_tap.py b/plugins/modules/homebrew_tap.py index 0cc5b23ce8..7099773b21 100644 --- a/plugins/modules/homebrew_tap.py +++ b/plugins/modules/homebrew_tap.py @@ -19,7 +19,7 @@ module: homebrew_tap author: - "Indrajit Raychaudhuri (@indrajitr)" - "Daniel Jaouen (@danieljaouen)" -short_description: Tap a Homebrew repository. +short_description: Tap a Homebrew repository description: - Tap external Homebrew repositories. options: diff --git a/plugins/modules/htpasswd.py b/plugins/modules/htpasswd.py index 4f05d21b0d..f24eaa0087 100644 --- a/plugins/modules/htpasswd.py +++ b/plugins/modules/htpasswd.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: htpasswd -short_description: manage user files for basic authentication +short_description: Manage user files for basic authentication description: - Add and remove username/password entries in a password file using htpasswd. - This is used by web servers such as Apache and Nginx for basic authentication. diff --git a/plugins/modules/ibm_sa_host.py b/plugins/modules/ibm_sa_host.py index 2902a02028..961e1bba19 100644 --- a/plugins/modules/ibm_sa_host.py +++ b/plugins/modules/ibm_sa_host.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ibm_sa_host -short_description: Adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems. +short_description: Adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems description: - "This module adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems." diff --git a/plugins/modules/ibm_sa_host_ports.py b/plugins/modules/ibm_sa_host_ports.py index 147c434344..fc543053a7 100644 --- a/plugins/modules/ibm_sa_host_ports.py +++ b/plugins/modules/ibm_sa_host_ports.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ibm_sa_host_ports -short_description: Add host ports on IBM Spectrum Accelerate Family storage systems. +short_description: Add host ports on IBM Spectrum Accelerate Family storage systems description: - "This module adds ports to or removes them from the hosts diff --git a/plugins/modules/ibm_sa_pool.py b/plugins/modules/ibm_sa_pool.py index 6393a70686..998f3f74be 100644 --- a/plugins/modules/ibm_sa_pool.py +++ b/plugins/modules/ibm_sa_pool.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ibm_sa_pool -short_description: Handles pools on IBM Spectrum Accelerate Family storage systems. +short_description: Handles pools on IBM Spectrum Accelerate Family storage systems description: - "This module creates or deletes pools to be used on IBM Spectrum Accelerate Family storage systems" diff --git a/plugins/modules/ibm_sa_vol.py b/plugins/modules/ibm_sa_vol.py index 6e28fcfd05..115ac9169f 100644 --- a/plugins/modules/ibm_sa_vol.py +++ b/plugins/modules/ibm_sa_vol.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ibm_sa_vol -short_description: Handle volumes on IBM Spectrum Accelerate Family storage systems. +short_description: Handle volumes on IBM Spectrum Accelerate Family storage systems description: - "This module creates or deletes volumes to be used on IBM Spectrum Accelerate Family storage systems." diff --git a/plugins/modules/ibm_sa_vol_map.py b/plugins/modules/ibm_sa_vol_map.py index 72de7d8c07..f493a2d979 100644 --- a/plugins/modules/ibm_sa_vol_map.py +++ b/plugins/modules/ibm_sa_vol_map.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ibm_sa_vol_map -short_description: Handles volume mapping on IBM Spectrum Accelerate Family storage systems. +short_description: Handles volume mapping on IBM Spectrum Accelerate Family storage systems description: - "This module maps volumes to or unmaps them from the hosts on diff --git a/plugins/modules/ipa_subca.py b/plugins/modules/ipa_subca.py index ef9f74ed87..b470be6aef 100644 --- a/plugins/modules/ipa_subca.py +++ b/plugins/modules/ipa_subca.py @@ -11,7 +11,7 @@ DOCUMENTATION = r''' --- module: ipa_subca author: Abhijeet Kasurde (@Akasurde) -short_description: Manage FreeIPA Lightweight Sub Certificate Authorities. +short_description: Manage FreeIPA Lightweight Sub Certificate Authorities description: - Add, modify, enable, disable and delete an IPA Lightweight Sub Certificate Authorities using IPA API. options: diff --git a/plugins/modules/jira.py b/plugins/modules/jira.py index 3b006a55bb..5e0a55119c 100644 --- a/plugins/modules/jira.py +++ b/plugins/modules/jira.py @@ -16,7 +16,7 @@ __metaclass__ = type DOCUMENTATION = r""" module: jira -short_description: create and modify issues in a JIRA instance +short_description: Create and modify issues in a JIRA instance description: - Create and modify issues in a JIRA instance. diff --git a/plugins/modules/ldap_entry.py b/plugins/modules/ldap_entry.py index d15b31f6d3..8cacbc42c1 100644 --- a/plugins/modules/ldap_entry.py +++ b/plugins/modules/ldap_entry.py @@ -14,7 +14,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ldap_entry -short_description: Add or remove LDAP entries. +short_description: Add or remove LDAP entries description: - Add or remove LDAP entries. This module only asserts the existence or non-existence of an LDAP entry, not its attributes. To assert the diff --git a/plugins/modules/ldap_passwd.py b/plugins/modules/ldap_passwd.py index 5ffd5e12ca..029b5df252 100644 --- a/plugins/modules/ldap_passwd.py +++ b/plugins/modules/ldap_passwd.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ldap_passwd -short_description: Set passwords in LDAP. +short_description: Set passwords in LDAP description: - Set a password for an LDAP entry. This module only asserts that a given password is valid for a given entry. To assert the diff --git a/plugins/modules/librato_annotation.py b/plugins/modules/librato_annotation.py index 4ca2e7204a..70e17cfef4 100644 --- a/plugins/modules/librato_annotation.py +++ b/plugins/modules/librato_annotation.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: librato_annotation -short_description: create an annotation in librato +short_description: Create an annotation in librato description: - Create an annotation event on the given annotation stream :name. If the annotation stream does not exist, it will be created automatically author: "Seth Edwards (@Sedward)" diff --git a/plugins/modules/linode_v4.py b/plugins/modules/linode_v4.py index 6ef8786af8..3613fc7b50 100644 --- a/plugins/modules/linode_v4.py +++ b/plugins/modules/linode_v4.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: linode_v4 -short_description: Manage instances on the Linode cloud. +short_description: Manage instances on the Linode cloud description: Manage instances on the Linode cloud. requirements: - python >= 2.7 diff --git a/plugins/modules/listen_ports_facts.py b/plugins/modules/listen_ports_facts.py index eb1ba09237..bc630e1d2e 100644 --- a/plugins/modules/listen_ports_facts.py +++ b/plugins/modules/listen_ports_facts.py @@ -18,7 +18,7 @@ description: - This module currently supports Linux only. requirements: - netstat or ss -short_description: Gather facts on processes listening on TCP and UDP ports. +short_description: Gather facts on processes listening on TCP and UDP ports notes: - | C(ss) returns all processes for each listen address and port. diff --git a/plugins/modules/lldp.py b/plugins/modules/lldp.py index 9a74f37f37..3a050ae29e 100644 --- a/plugins/modules/lldp.py +++ b/plugins/modules/lldp.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' --- module: lldp requirements: [ lldpctl ] -short_description: get details reported by lldp +short_description: Get details reported by lldp description: - Reads data out of lldpctl options: {} diff --git a/plugins/modules/logentries_msg.py b/plugins/modules/logentries_msg.py index b1b77e1d62..723273165f 100644 --- a/plugins/modules/logentries_msg.py +++ b/plugins/modules/logentries_msg.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: logentries_msg -short_description: Send a message to logentries. +short_description: Send a message to logentries description: - Send a message to logentries requirements: diff --git a/plugins/modules/manageiq_group.py b/plugins/modules/manageiq_group.py index 509de77e21..5772c19a7e 100644 --- a/plugins/modules/manageiq_group.py +++ b/plugins/modules/manageiq_group.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' module: manageiq_group -short_description: Management of groups in ManageIQ. +short_description: Management of groups in ManageIQ extends_documentation_fragment: - community.general.manageiq diff --git a/plugins/modules/manageiq_policies.py b/plugins/modules/manageiq_policies.py index ae36094768..c5b2d88287 100644 --- a/plugins/modules/manageiq_policies.py +++ b/plugins/modules/manageiq_policies.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' module: manageiq_policies -short_description: Management of resource policy_profiles in ManageIQ. +short_description: Management of resource policy_profiles in ManageIQ extends_documentation_fragment: - community.general.manageiq diff --git a/plugins/modules/manageiq_provider.py b/plugins/modules/manageiq_provider.py index 951e9bb07c..5eb6d779ac 100644 --- a/plugins/modules/manageiq_provider.py +++ b/plugins/modules/manageiq_provider.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: manageiq_provider -short_description: Management of provider in ManageIQ. +short_description: Management of provider in ManageIQ extends_documentation_fragment: - community.general.manageiq diff --git a/plugins/modules/manageiq_tags.py b/plugins/modules/manageiq_tags.py index 209fb5ea9d..9d051a5aa1 100644 --- a/plugins/modules/manageiq_tags.py +++ b/plugins/modules/manageiq_tags.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' module: manageiq_tags -short_description: Management of resource tags in ManageIQ. +short_description: Management of resource tags in ManageIQ extends_documentation_fragment: - community.general.manageiq diff --git a/plugins/modules/manageiq_tenant.py b/plugins/modules/manageiq_tenant.py index 0f4473092b..f3700d2492 100644 --- a/plugins/modules/manageiq_tenant.py +++ b/plugins/modules/manageiq_tenant.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' module: manageiq_tenant -short_description: Management of tenants in ManageIQ. +short_description: Management of tenants in ManageIQ extends_documentation_fragment: - community.general.manageiq diff --git a/plugins/modules/manageiq_user.py b/plugins/modules/manageiq_user.py index b9b69182cb..9910e092e0 100644 --- a/plugins/modules/manageiq_user.py +++ b/plugins/modules/manageiq_user.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' module: manageiq_user -short_description: Management of users in ManageIQ. +short_description: Management of users in ManageIQ extends_documentation_fragment: - community.general.manageiq From eae33c20f6eb8e7616064b8ffee17165c5656b56 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Wed, 9 Nov 2022 01:28:14 -0500 Subject: [PATCH 0323/2104] Actually sort the fixtures (#5510) * Actually sort the fixtures I removed my more complicated fix but failed to actually put the sorted() call back in. * Sort by class name --- tests/unit/plugins/lookup/onepassword/test_onepassword.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword.py b/tests/unit/plugins/lookup/onepassword/test_onepassword.py index 9e943dbfa0..e9f8f42c96 100644 --- a/tests/unit/plugins/lookup/onepassword/test_onepassword.py +++ b/tests/unit/plugins/lookup/onepassword/test_onepassword.py @@ -5,6 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +import operator import itertools import json import pytest @@ -158,7 +159,7 @@ def test_op_get_field(mocker, op_fixture, output, expected, request): ("cli_class", "vault", "queries", "kwargs", "output", "expected"), ( (_cli_class, item["vault_name"], item["queries"], item.get("kwargs", {}), item["output"], item["expected"]) - for _cli_class in MOCK_ENTRIES + for _cli_class in sorted(MOCK_ENTRIES, key=operator.attrgetter("__name__")) for item in MOCK_ENTRIES[_cli_class] ) ) From c604cc5ba901574697b99bd31236d99e0e6cd1a3 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Wed, 9 Nov 2022 01:28:49 -0500 Subject: [PATCH 0324/2104] onepassword_raw - Add missing parameter to doc string (#5511) * onepassword_raw - Add missing parameter to doc string * Remove redundant mention of default value * Update changelogs/fragments/5506-onepassword_raw-missing-param.yml Co-authored-by: Felix Fontein --- changelogs/fragments/5506-onepassword_raw-missing-param.yml | 2 ++ plugins/lookup/onepassword.py | 2 +- plugins/lookup/onepassword_raw.py | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5506-onepassword_raw-missing-param.yml diff --git a/changelogs/fragments/5506-onepassword_raw-missing-param.yml b/changelogs/fragments/5506-onepassword_raw-missing-param.yml new file mode 100644 index 0000000000..f10ff28d28 --- /dev/null +++ b/changelogs/fragments/5506-onepassword_raw-missing-param.yml @@ -0,0 +1,2 @@ +bugfixes: + - onepassword_raw - add missing parameter to plugin documentation (https://github.com/ansible-collections/community.general/issues/5506). diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index bbd11d6645..5e9549c2b7 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -32,7 +32,7 @@ DOCUMENTATION = ''' section: description: Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section. domain: - description: Domain of 1Password. Default is U(1password.com). + description: Domain of 1Password. version_added: 3.2.0 default: '1password.com' type: str diff --git a/plugins/lookup/onepassword_raw.py b/plugins/lookup/onepassword_raw.py index c7b9332953..9b87a3f619 100644 --- a/plugins/lookup/onepassword_raw.py +++ b/plugins/lookup/onepassword_raw.py @@ -30,6 +30,11 @@ DOCUMENTATION = ''' description: Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section. subdomain: description: The 1Password subdomain to authenticate against. + domain: + description: Domain of 1Password. + version_added: 6.0.0 + default: '1password.com' + type: str username: description: The username used to sign in. secret_key: From f683d6a05dd57deb4347755cf26064fd65bf8efc Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 10 Nov 2022 01:57:41 +1300 Subject: [PATCH 0325/2104] short_description fix batch 2 (#5520) --- plugins/modules/consul.py | 2 +- plugins/modules/etcd3.py | 2 +- plugins/modules/gitlab_protected_branch.py | 4 ++-- plugins/modules/heroku_collaborator.py | 2 +- plugins/modules/ipinfoio_facts.py | 2 +- plugins/modules/launchd.py | 2 +- plugins/modules/memset_memstore_info.py | 2 +- plugins/modules/memset_server_info.py | 2 +- plugins/modules/memset_zone.py | 2 +- plugins/modules/memset_zone_domain.py | 2 +- plugins/modules/memset_zone_record.py | 2 +- plugins/modules/mksysb.py | 2 +- plugins/modules/mssql_db.py | 2 +- plugins/modules/nagios.py | 2 +- plugins/modules/netcup_dns.py | 2 +- plugins/modules/nginx_status_info.py | 2 +- plugins/modules/nosh.py | 2 +- plugins/modules/nsupdate.py | 2 +- plugins/modules/omapi_host.py | 2 +- plugins/modules/oneandone_firewall_policy.py | 2 +- plugins/modules/oneandone_load_balancer.py | 2 +- plugins/modules/oneandone_monitoring_policy.py | 2 +- plugins/modules/oneandone_private_network.py | 2 +- plugins/modules/oneandone_public_ip.py | 2 +- plugins/modules/oneandone_server.py | 2 +- plugins/modules/oneview_fc_network.py | 2 +- plugins/modules/online_server_info.py | 2 +- plugins/modules/online_user_info.py | 2 +- plugins/modules/opendj_backendprop.py | 2 +- plugins/modules/openwrt_init.py | 2 +- plugins/modules/packet_device.py | 2 +- plugins/modules/packet_ip_subnet.py | 2 +- plugins/modules/packet_project.py | 2 +- plugins/modules/packet_sshkey.py | 2 +- plugins/modules/packet_volume.py | 2 +- plugins/modules/packet_volume_attachment.py | 2 +- plugins/modules/pids.py | 2 +- plugins/modules/pip_package_info.py | 2 +- plugins/modules/pkgin.py | 2 +- plugins/modules/profitbricks.py | 2 +- plugins/modules/profitbricks_datacenter.py | 2 +- plugins/modules/profitbricks_nic.py | 2 +- plugins/modules/profitbricks_volume.py | 2 +- plugins/modules/profitbricks_volume_attachments.py | 2 +- plugins/modules/proxmox.py | 2 +- plugins/modules/proxmox_disk.py | 2 +- plugins/modules/proxmox_kvm.py | 2 +- plugins/modules/proxmox_nic.py | 2 +- plugins/modules/proxmox_template.py | 2 +- plugins/modules/pubnub_blocks.py | 2 +- 50 files changed, 51 insertions(+), 51 deletions(-) diff --git a/plugins/modules/consul.py b/plugins/modules/consul.py index a7cefc9865..aabc1bd4b7 100644 --- a/plugins/modules/consul.py +++ b/plugins/modules/consul.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: consul -short_description: "Add, modify & delete services within a consul cluster" +short_description: Add, modify & delete services within a consul cluster description: - Registers services and checks for an agent with a consul cluster. A service is some process running on the agent node that should be advertised by diff --git a/plugins/modules/etcd3.py b/plugins/modules/etcd3.py index e67227cc19..2a89c71968 100644 --- a/plugins/modules/etcd3.py +++ b/plugins/modules/etcd3.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: etcd3 -short_description: "Set or delete key value pairs from an etcd3 cluster" +short_description: Set or delete key value pairs from an etcd3 cluster requirements: - etcd3 description: diff --git a/plugins/modules/gitlab_protected_branch.py b/plugins/modules/gitlab_protected_branch.py index bddf175f0f..335e1445a2 100644 --- a/plugins/modules/gitlab_protected_branch.py +++ b/plugins/modules/gitlab_protected_branch.py @@ -9,7 +9,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: gitlab_protected_branch -short_description: (un)Marking existing branches for protection +short_description: Manage protection of existing branches version_added: 3.4.0 description: - (un)Marking existing branches for protection. @@ -25,7 +25,7 @@ extends_documentation_fragment: options: state: description: - - Create or delete proteced branch. + - Create or delete protected branch. default: present type: str choices: ["present", "absent"] diff --git a/plugins/modules/heroku_collaborator.py b/plugins/modules/heroku_collaborator.py index e29439ca2f..d76b2b6507 100644 --- a/plugins/modules/heroku_collaborator.py +++ b/plugins/modules/heroku_collaborator.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: heroku_collaborator -short_description: "Add or delete app collaborators on Heroku" +short_description: Add or delete app collaborators on Heroku description: - Manages collaborators for Heroku apps. - If set to C(present) and heroku user is already collaborator, then do nothing. diff --git a/plugins/modules/ipinfoio_facts.py b/plugins/modules/ipinfoio_facts.py index 676e88d84d..f29b3cbf4c 100644 --- a/plugins/modules/ipinfoio_facts.py +++ b/plugins/modules/ipinfoio_facts.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: ipinfoio_facts -short_description: "Retrieve IP geolocation facts of a host's IP address" +short_description: Retrieve IP geolocation facts of a host's IP address description: - "Gather IP geolocation facts of a host's IP address using ipinfo.io API" author: "Aleksei Kostiuk (@akostyuk)" diff --git a/plugins/modules/launchd.py b/plugins/modules/launchd.py index 6e14e4c10c..250bbffb9e 100644 --- a/plugins/modules/launchd.py +++ b/plugins/modules/launchd.py @@ -13,7 +13,7 @@ DOCUMENTATION = r''' module: launchd author: - Martin Migasiewicz (@martinm82) -short_description: Manage macOS services +short_description: Manage macOS services version_added: 1.0.0 description: - Manage launchd services on target macOS hosts. diff --git a/plugins/modules/memset_memstore_info.py b/plugins/modules/memset_memstore_info.py index 4de803f991..8ce3d5b05a 100644 --- a/plugins/modules/memset_memstore_info.py +++ b/plugins/modules/memset_memstore_info.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' --- module: memset_memstore_info author: "Simon Weald (@glitchcrab)" -short_description: Retrieve Memstore product usage information. +short_description: Retrieve Memstore product usage information notes: - An API key generated via the Memset customer control panel is needed with the following minimum scope - I(memstore.usage). diff --git a/plugins/modules/memset_server_info.py b/plugins/modules/memset_server_info.py index 44aa0d8442..0c78f2bd1d 100644 --- a/plugins/modules/memset_server_info.py +++ b/plugins/modules/memset_server_info.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' --- module: memset_server_info author: "Simon Weald (@glitchcrab)" -short_description: Retrieve server information. +short_description: Retrieve server information notes: - An API key generated via the Memset customer control panel is needed with the following minimum scope - I(server.info). diff --git a/plugins/modules/memset_zone.py b/plugins/modules/memset_zone.py index 9731e3a943..02b5fd28f0 100644 --- a/plugins/modules/memset_zone.py +++ b/plugins/modules/memset_zone.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' --- module: memset_zone author: "Simon Weald (@glitchcrab)" -short_description: Creates and deletes Memset DNS zones. +short_description: Creates and deletes Memset DNS zones notes: - Zones can be thought of as a logical group of domains, all of which share the same DNS records (i.e. they point to the same IP). An API key generated via the diff --git a/plugins/modules/memset_zone_domain.py b/plugins/modules/memset_zone_domain.py index 995c7bc8d3..1e18a984b6 100644 --- a/plugins/modules/memset_zone_domain.py +++ b/plugins/modules/memset_zone_domain.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' --- module: memset_zone_domain author: "Simon Weald (@glitchcrab)" -short_description: Create and delete domains in Memset DNS zones. +short_description: Create and delete domains in Memset DNS zones notes: - Zone domains can be thought of as a collection of domains, all of which share the same DNS records (i.e. they point to the same IP). An API key generated via the diff --git a/plugins/modules/memset_zone_record.py b/plugins/modules/memset_zone_record.py index c114532f90..925a034c56 100644 --- a/plugins/modules/memset_zone_record.py +++ b/plugins/modules/memset_zone_record.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' --- module: memset_zone_record author: "Simon Weald (@glitchcrab)" -short_description: Create and delete records in Memset DNS zones. +short_description: Create and delete records in Memset DNS zones notes: - Zones can be thought of as a logical group of domains, all of which share the same DNS records (i.e. they point to the same IP). An API key generated via the diff --git a/plugins/modules/mksysb.py b/plugins/modules/mksysb.py index a466bd9df6..15b6ad9442 100644 --- a/plugins/modules/mksysb.py +++ b/plugins/modules/mksysb.py @@ -14,7 +14,7 @@ DOCUMENTATION = ''' --- author: Kairo Araujo (@kairoaraujo) module: mksysb -short_description: Generates AIX mksysb rootvg backups. +short_description: Generates AIX mksysb rootvg backups description: - This module manages a basic AIX mksysb (image) of rootvg. options: diff --git a/plugins/modules/mssql_db.py b/plugins/modules/mssql_db.py index a7d16b2710..58a8c4dea9 100644 --- a/plugins/modules/mssql_db.py +++ b/plugins/modules/mssql_db.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: mssql_db -short_description: Add or remove MSSQL databases from a remote host. +short_description: Add or remove MSSQL databases from a remote host description: - Add or remove MSSQL databases from a remote host. options: diff --git a/plugins/modules/nagios.py b/plugins/modules/nagios.py index 4fb2a9ff45..ec526a3959 100644 --- a/plugins/modules/nagios.py +++ b/plugins/modules/nagios.py @@ -17,7 +17,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: nagios -short_description: Perform common tasks in Nagios related to downtime and notifications. +short_description: Perform common tasks in Nagios related to downtime and notifications description: - "The C(nagios) module has two basic functions: scheduling downtime and toggling alerts for services or hosts." - The C(nagios) module is not idempotent. diff --git a/plugins/modules/netcup_dns.py b/plugins/modules/netcup_dns.py index 5d082c2980..4c3c015ebd 100644 --- a/plugins/modules/netcup_dns.py +++ b/plugins/modules/netcup_dns.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' --- module: netcup_dns notes: [] -short_description: manage Netcup DNS records +short_description: Manage Netcup DNS records description: - "Manages DNS records via the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php)." options: diff --git a/plugins/modules/nginx_status_info.py b/plugins/modules/nginx_status_info.py index 1e1bb10495..6bbea078b0 100644 --- a/plugins/modules/nginx_status_info.py +++ b/plugins/modules/nginx_status_info.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: nginx_status_info -short_description: Retrieve information on nginx status. +short_description: Retrieve information on nginx status description: - Gathers information from nginx from an URL having C(stub_status) enabled. author: "René Moser (@resmo)" diff --git a/plugins/modules/nosh.py b/plugins/modules/nosh.py index 756f5fed42..432990a4d2 100644 --- a/plugins/modules/nosh.py +++ b/plugins/modules/nosh.py @@ -14,7 +14,7 @@ DOCUMENTATION = ''' module: nosh author: - "Thomas Caravia (@tacatac)" -short_description: Manage services with nosh +short_description: Manage services with nosh description: - Control running and enabled state for system-wide or user services. - BSD and Linux systems are supported. diff --git a/plugins/modules/nsupdate.py b/plugins/modules/nsupdate.py index 43b951fe61..2be4863b68 100644 --- a/plugins/modules/nsupdate.py +++ b/plugins/modules/nsupdate.py @@ -18,7 +18,7 @@ DOCUMENTATION = ''' --- module: nsupdate -short_description: Manage DNS records. +short_description: Manage DNS records description: - Create, update and remove DNS records using DDNS updates requirements: diff --git a/plugins/modules/omapi_host.py b/plugins/modules/omapi_host.py index 7d1897ca55..4e3a6247d6 100644 --- a/plugins/modules/omapi_host.py +++ b/plugins/modules/omapi_host.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: omapi_host -short_description: Setup OMAPI hosts. +short_description: Setup OMAPI hosts description: Manage OMAPI hosts into compatible DHCPd servers requirements: - pypureomapi diff --git a/plugins/modules/oneandone_firewall_policy.py b/plugins/modules/oneandone_firewall_policy.py index 23203e8d05..5cceffa812 100644 --- a/plugins/modules/oneandone_firewall_policy.py +++ b/plugins/modules/oneandone_firewall_policy.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: oneandone_firewall_policy -short_description: Configure 1&1 firewall policy. +short_description: Configure 1&1 firewall policy description: - Create, remove, reconfigure, update firewall policies. This module has a dependency on 1and1 >= 1.0 diff --git a/plugins/modules/oneandone_load_balancer.py b/plugins/modules/oneandone_load_balancer.py index 04aefde63a..432fc456b1 100644 --- a/plugins/modules/oneandone_load_balancer.py +++ b/plugins/modules/oneandone_load_balancer.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: oneandone_load_balancer -short_description: Configure 1&1 load balancer. +short_description: Configure 1&1 load balancer description: - Create, remove, update load balancers. This module has a dependency on 1and1 >= 1.0 diff --git a/plugins/modules/oneandone_monitoring_policy.py b/plugins/modules/oneandone_monitoring_policy.py index 46c68e86e0..04e9c67570 100644 --- a/plugins/modules/oneandone_monitoring_policy.py +++ b/plugins/modules/oneandone_monitoring_policy.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: oneandone_monitoring_policy -short_description: Configure 1&1 monitoring policy. +short_description: Configure 1&1 monitoring policy description: - Create, remove, update monitoring policies (and add/remove ports, processes, and servers). diff --git a/plugins/modules/oneandone_private_network.py b/plugins/modules/oneandone_private_network.py index a6db23310a..4a912a0f35 100644 --- a/plugins/modules/oneandone_private_network.py +++ b/plugins/modules/oneandone_private_network.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: oneandone_private_network -short_description: Configure 1&1 private networking. +short_description: Configure 1&1 private networking description: - Create, remove, reconfigure, update a private network. This module has a dependency on 1and1 >= 1.0 diff --git a/plugins/modules/oneandone_public_ip.py b/plugins/modules/oneandone_public_ip.py index a5970735ce..31ed082c74 100644 --- a/plugins/modules/oneandone_public_ip.py +++ b/plugins/modules/oneandone_public_ip.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: oneandone_public_ip -short_description: Configure 1&1 public IPs. +short_description: Configure 1&1 public IPs description: - Create, update, and remove public IPs. This module has a dependency on 1and1 >= 1.0 diff --git a/plugins/modules/oneandone_server.py b/plugins/modules/oneandone_server.py index 22b4b9dd69..e0f1b0eb03 100644 --- a/plugins/modules/oneandone_server.py +++ b/plugins/modules/oneandone_server.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: oneandone_server -short_description: Create, destroy, start, stop, and reboot a 1&1 Host server. +short_description: Create, destroy, start, stop, and reboot a 1&1 Host server description: - Create, destroy, update, start, stop, and reboot a 1&1 Host server. When the server is created it can optionally wait for it to be 'running' before returning. diff --git a/plugins/modules/oneview_fc_network.py b/plugins/modules/oneview_fc_network.py index e4b1a17339..2898447c0b 100644 --- a/plugins/modules/oneview_fc_network.py +++ b/plugins/modules/oneview_fc_network.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: oneview_fc_network -short_description: Manage OneView Fibre Channel Network resources. +short_description: Manage OneView Fibre Channel Network resources description: - Provides an interface to manage Fibre Channel Network resources. Can create, update, and delete. requirements: diff --git a/plugins/modules/online_server_info.py b/plugins/modules/online_server_info.py index 533e0453f9..f6d03cb275 100644 --- a/plugins/modules/online_server_info.py +++ b/plugins/modules/online_server_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: online_server_info -short_description: Gather information about Online servers. +short_description: Gather information about Online servers description: - Gather information about the servers. - U(https://www.online.net/en/dedicated-server) diff --git a/plugins/modules/online_user_info.py b/plugins/modules/online_user_info.py index 17cbc7d662..1d91418caf 100644 --- a/plugins/modules/online_user_info.py +++ b/plugins/modules/online_user_info.py @@ -9,7 +9,7 @@ __metaclass__ = type DOCUMENTATION = r''' module: online_user_info -short_description: Gather information about Online user. +short_description: Gather information about Online user description: - Gather information about the user. author: diff --git a/plugins/modules/opendj_backendprop.py b/plugins/modules/opendj_backendprop.py index dfdf6a903a..7e620c4305 100644 --- a/plugins/modules/opendj_backendprop.py +++ b/plugins/modules/opendj_backendprop.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: opendj_backendprop -short_description: Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command. +short_description: Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command description: - This module will update settings for OpenDJ with the command set-backend-prop. - It will check first via de get-backend-prop if configuration needs to be applied. diff --git a/plugins/modules/openwrt_init.py b/plugins/modules/openwrt_init.py index be7031791e..978a6bec35 100644 --- a/plugins/modules/openwrt_init.py +++ b/plugins/modules/openwrt_init.py @@ -12,7 +12,7 @@ DOCUMENTATION = ''' module: openwrt_init author: - "Andrew Gaffney (@agaffney)" -short_description: Manage services on OpenWrt. +short_description: Manage services on OpenWrt description: - Controls OpenWrt services on remote hosts. options: diff --git a/plugins/modules/packet_device.py b/plugins/modules/packet_device.py index 6b78406a6e..500a400273 100644 --- a/plugins/modules/packet_device.py +++ b/plugins/modules/packet_device.py @@ -14,7 +14,7 @@ DOCUMENTATION = ''' --- module: packet_device -short_description: Manage a bare metal server in the Packet Host. +short_description: Manage a bare metal server in the Packet Host description: - Manage a bare metal server in the Packet Host (a "device" in the API terms). diff --git a/plugins/modules/packet_ip_subnet.py b/plugins/modules/packet_ip_subnet.py index 79f93a6413..63790e1c6a 100644 --- a/plugins/modules/packet_ip_subnet.py +++ b/plugins/modules/packet_ip_subnet.py @@ -14,7 +14,7 @@ DOCUMENTATION = ''' --- module: packet_ip_subnet -short_description: Assign IP subnet to a bare metal server. +short_description: Assign IP subnet to a bare metal server description: - Assign or unassign IPv4 or IPv6 subnets to or from a device in the Packet host. diff --git a/plugins/modules/packet_project.py b/plugins/modules/packet_project.py index 18b6f73f99..9a82c2ec72 100644 --- a/plugins/modules/packet_project.py +++ b/plugins/modules/packet_project.py @@ -14,7 +14,7 @@ DOCUMENTATION = ''' --- module: packet_project -short_description: Create/delete a project in Packet host. +short_description: Create/delete a project in Packet host description: - Create/delete a project in Packet host. diff --git a/plugins/modules/packet_sshkey.py b/plugins/modules/packet_sshkey.py index d39e419747..87beb01aa8 100644 --- a/plugins/modules/packet_sshkey.py +++ b/plugins/modules/packet_sshkey.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: packet_sshkey -short_description: Create/delete an SSH key in Packet host. +short_description: Create/delete an SSH key in Packet host description: - Create/delete an SSH key in Packet host. - API is documented at U(https://www.packet.net/help/api/#page:ssh-keys,header:ssh-keys-ssh-keys-post). diff --git a/plugins/modules/packet_volume.py b/plugins/modules/packet_volume.py index f0508c5891..b06e57b56c 100644 --- a/plugins/modules/packet_volume.py +++ b/plugins/modules/packet_volume.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' --- module: packet_volume -short_description: Create/delete a volume in Packet host. +short_description: Create/delete a volume in Packet host description: - Create/delete a volume in Packet host. diff --git a/plugins/modules/packet_volume_attachment.py b/plugins/modules/packet_volume_attachment.py index 4f55d60cfa..74b42ab479 100644 --- a/plugins/modules/packet_volume_attachment.py +++ b/plugins/modules/packet_volume_attachment.py @@ -14,7 +14,7 @@ DOCUMENTATION = ''' --- module: packet_volume_attachment -short_description: Attach/detach a volume to a device in the Packet host. +short_description: Attach/detach a volume to a device in the Packet host description: - Attach/detach a volume to a device in the Packet host. diff --git a/plugins/modules/pids.py b/plugins/modules/pids.py index 072a2bb7a4..eaaf7f9437 100644 --- a/plugins/modules/pids.py +++ b/plugins/modules/pids.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: pids description: "Retrieves a list of PIDs of given process name in Ansible controller/controlled machines.Returns an empty list if no process in that name exists." -short_description: "Retrieves process IDs list if the process is running otherwise return empty list" +short_description: Retrieves process IDs list if the process is running otherwise return empty list author: - Saranya Sridharan (@saranyasridharan) requirements: diff --git a/plugins/modules/pip_package_info.py b/plugins/modules/pip_package_info.py index c89e47014e..2cde7218d4 100644 --- a/plugins/modules/pip_package_info.py +++ b/plugins/modules/pip_package_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: pip_package_info -short_description: pip package information +short_description: Pip package information description: - Return information about installed pip packages extends_documentation_fragment: diff --git a/plugins/modules/pkgin.py b/plugins/modules/pkgin.py index 477460e0e3..0da06e0502 100644 --- a/plugins/modules/pkgin.py +++ b/plugins/modules/pkgin.py @@ -19,7 +19,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: pkgin -short_description: Package manager for SmartOS, NetBSD, et al. +short_description: Package manager for SmartOS, NetBSD, et al description: - "The standard package manager for SmartOS, but also usable on NetBSD or any OS that uses C(pkgsrc). (Home: U(http://pkgin.net/))" diff --git a/plugins/modules/profitbricks.py b/plugins/modules/profitbricks.py index cb41491464..6b0134cb99 100644 --- a/plugins/modules/profitbricks.py +++ b/plugins/modules/profitbricks.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: profitbricks -short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtual machine. +short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtual machine description: - Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait for it to be 'running' before returning. This module has a dependency on profitbricks >= 1.0.0 diff --git a/plugins/modules/profitbricks_datacenter.py b/plugins/modules/profitbricks_datacenter.py index cc3184320d..a11d12bfd9 100644 --- a/plugins/modules/profitbricks_datacenter.py +++ b/plugins/modules/profitbricks_datacenter.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: profitbricks_datacenter -short_description: Create or destroy a ProfitBricks Virtual Datacenter. +short_description: Create or destroy a ProfitBricks Virtual Datacenter description: - This is a simple module that supports creating or removing vDCs. A vDC is required before you can create servers. This module has a dependency on profitbricks >= 1.0.0 diff --git a/plugins/modules/profitbricks_nic.py b/plugins/modules/profitbricks_nic.py index facb146b60..c6239f5ef5 100644 --- a/plugins/modules/profitbricks_nic.py +++ b/plugins/modules/profitbricks_nic.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: profitbricks_nic -short_description: Create or Remove a NIC. +short_description: Create or Remove a NIC description: - This module allows you to create or restore a volume snapshot. This module has a dependency on profitbricks >= 1.0.0 options: diff --git a/plugins/modules/profitbricks_volume.py b/plugins/modules/profitbricks_volume.py index 2d449fd92a..1d21897715 100644 --- a/plugins/modules/profitbricks_volume.py +++ b/plugins/modules/profitbricks_volume.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: profitbricks_volume -short_description: Create or destroy a volume. +short_description: Create or destroy a volume description: - Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0 options: diff --git a/plugins/modules/profitbricks_volume_attachments.py b/plugins/modules/profitbricks_volume_attachments.py index 5637aca67f..49b418362b 100644 --- a/plugins/modules/profitbricks_volume_attachments.py +++ b/plugins/modules/profitbricks_volume_attachments.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: profitbricks_volume_attachments -short_description: Attach or detach a volume. +short_description: Attach or detach a volume description: - Allows you to attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0 options: diff --git a/plugins/modules/proxmox.py b/plugins/modules/proxmox.py index 5a89ee7796..89706655f2 100644 --- a/plugins/modules/proxmox.py +++ b/plugins/modules/proxmox.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: proxmox -short_description: management of instances in Proxmox VE cluster +short_description: Management of instances in Proxmox VE cluster description: - allows you to create/delete/stop instances in Proxmox VE cluster - Starting in Ansible 2.1, it automatically detects containerization type (lxc for PVE 4, openvz for older) diff --git a/plugins/modules/proxmox_disk.py b/plugins/modules/proxmox_disk.py index 182a0d25f2..7a39d38d05 100644 --- a/plugins/modules/proxmox_disk.py +++ b/plugins/modules/proxmox_disk.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: proxmox_disk -short_description: Management of a disk of a Qemu(KVM) VM in a Proxmox VE cluster. +short_description: Management of a disk of a Qemu(KVM) VM in a Proxmox VE cluster version_added: 5.7.0 description: - Allows you to perform some supported operations on a disk in Qemu(KVM) Virtual Machines in a Proxmox VE cluster. diff --git a/plugins/modules/proxmox_kvm.py b/plugins/modules/proxmox_kvm.py index 92aaf6a904..25e252bee9 100644 --- a/plugins/modules/proxmox_kvm.py +++ b/plugins/modules/proxmox_kvm.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: proxmox_kvm -short_description: Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster. +short_description: Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster description: - Allows you to create/delete/stop Qemu(KVM) Virtual Machines in Proxmox VE cluster. - Since community.general 4.0.0 on, there are no more default values, see I(proxmox_default_behavior). diff --git a/plugins/modules/proxmox_nic.py b/plugins/modules/proxmox_nic.py index 49f7f91bcd..bcc56de57e 100644 --- a/plugins/modules/proxmox_nic.py +++ b/plugins/modules/proxmox_nic.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: proxmox_nic -short_description: Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster. +short_description: Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster version_added: 3.1.0 description: - Allows you to create/update/delete a NIC on Qemu(KVM) Virtual Machines in a Proxmox VE cluster. diff --git a/plugins/modules/proxmox_template.py b/plugins/modules/proxmox_template.py index 24a6c87d31..a09af2f2a3 100644 --- a/plugins/modules/proxmox_template.py +++ b/plugins/modules/proxmox_template.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: proxmox_template -short_description: management of OS templates in Proxmox VE cluster +short_description: Management of OS templates in Proxmox VE cluster description: - allows you to upload/delete templates in Proxmox VE cluster options: diff --git a/plugins/modules/pubnub_blocks.py b/plugins/modules/pubnub_blocks.py index 9942c57134..28b17b5431 100644 --- a/plugins/modules/pubnub_blocks.py +++ b/plugins/modules/pubnub_blocks.py @@ -17,7 +17,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: pubnub_blocks -short_description: PubNub blocks management module. +short_description: PubNub blocks management module description: - "This module allows Ansible to interface with the PubNub BLOCKS infrastructure by providing the following operations: create / remove, From 0e9cd5e6b6ae33b0d0781c0d81413b0bb52d2dbb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 9 Nov 2022 18:37:43 +0100 Subject: [PATCH 0326/2104] Ignore mpdehaan in BOTMETA. (#5524) --- .github/BOTMETA.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index dfacfbecfb..c56720cb0d 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -822,7 +822,8 @@ files: maintainers: marc-sensenich $modules/ohai.py: labels: ohai - maintainers: $team_ansible_core mpdehaan + maintainers: $team_ansible_core + ignore: mpdehaan $modules/omapi_host.py: maintainers: amasolov nerzhul $modules/one_: @@ -1072,7 +1073,8 @@ files: $modules/sapcar_extract.py: maintainers: RainerLeber $modules/say.py: - maintainers: $team_ansible_core mpdehaan + maintainers: $team_ansible_core + ignore: mpdehaan $modules/scaleway_: maintainers: $team_scaleway $modules/scaleway_compute_private_network.py: From 6b20572ea17da272be87d74e3abf52153a3b33f1 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 10 Nov 2022 09:09:09 +1300 Subject: [PATCH 0327/2104] Short descriptions (batch3) - massive fix on Capitalization and trailing period (#5521) * short_description fix batch 3 * Update plugins/modules/telegram.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/modules/pulp_repo.py | 2 +- plugins/modules/rax.py | 2 +- plugins/modules/rax_cdb.py | 2 +- plugins/modules/rax_cdb_database.py | 2 +- plugins/modules/rax_cdb_user.py | 2 +- plugins/modules/rax_clb.py | 2 +- plugins/modules/rax_clb_nodes.py | 2 +- plugins/modules/rax_clb_ssl.py | 2 +- plugins/modules/rax_mon_alarm.py | 2 +- plugins/modules/rax_mon_notification.py | 2 +- plugins/modules/rax_network.py | 2 +- plugins/modules/rax_queue.py | 2 +- plugins/modules/rundeck_acl_policy.py | 2 +- plugins/modules/rundeck_project.py | 2 +- plugins/modules/say.py | 2 +- plugins/modules/scaleway_image_info.py | 2 +- plugins/modules/scaleway_ip_info.py | 2 +- plugins/modules/scaleway_organization_info.py | 2 +- plugins/modules/scaleway_security_group_info.py | 2 +- plugins/modules/scaleway_server_info.py | 2 +- plugins/modules/scaleway_snapshot_info.py | 2 +- plugins/modules/scaleway_volume_info.py | 2 +- plugins/modules/sl_vm.py | 2 +- plugins/modules/smartos_image_info.py | 2 +- plugins/modules/spectrum_device.py | 2 +- plugins/modules/spectrum_model_attrs.py | 2 +- plugins/modules/svc.py | 2 +- plugins/modules/swupd.py | 2 +- plugins/modules/telegram.py | 2 +- plugins/modules/twilio.py | 2 +- plugins/modules/utm_aaa_group.py | 2 +- plugins/modules/utm_aaa_group_info.py | 2 +- plugins/modules/utm_ca_host_key_cert.py | 2 +- plugins/modules/utm_dns_host.py | 2 +- plugins/modules/utm_proxy_auth_profile.py | 2 +- plugins/modules/utm_proxy_frontend.py | 2 +- plugins/modules/utm_proxy_frontend_info.py | 2 +- plugins/modules/utm_proxy_location.py | 2 +- plugins/modules/utm_proxy_location_info.py | 2 +- plugins/modules/vertica_configuration.py | 2 +- plugins/modules/vertica_info.py | 2 +- plugins/modules/vertica_role.py | 2 +- plugins/modules/vertica_schema.py | 2 +- plugins/modules/vertica_user.py | 2 +- plugins/modules/vmadm.py | 2 +- plugins/modules/xenserver_facts.py | 2 +- plugins/modules/zfs_facts.py | 2 +- plugins/modules/zpool_facts.py | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) diff --git a/plugins/modules/pulp_repo.py b/plugins/modules/pulp_repo.py index 030d2fd9af..9e100ba93e 100644 --- a/plugins/modules/pulp_repo.py +++ b/plugins/modules/pulp_repo.py @@ -14,7 +14,7 @@ DOCUMENTATION = ''' --- module: pulp_repo author: "Joe Adams (@sysadmind)" -short_description: Add or remove Pulp repos from a remote host. +short_description: Add or remove Pulp repos from a remote host description: - Add or remove Pulp repos from a remote host. - Note, this is for Pulp 2 only. diff --git a/plugins/modules/rax.py b/plugins/modules/rax.py index b35384173a..fa929f7971 100644 --- a/plugins/modules/rax.py +++ b/plugins/modules/rax.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax -short_description: create / delete an instance in Rackspace Public Cloud +short_description: Create / delete an instance in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud instance and optionally waits for it to be 'running'. diff --git a/plugins/modules/rax_cdb.py b/plugins/modules/rax_cdb.py index 6703a8dd4b..3fb6194d9d 100644 --- a/plugins/modules/rax_cdb.py +++ b/plugins/modules/rax_cdb.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_cdb -short_description: create/delete or resize a Rackspace Cloud Databases instance +short_description: Create/delete or resize a Rackspace Cloud Databases instance description: - creates / deletes or resize a Rackspace Cloud Databases instance and optionally waits for it to be 'running'. The name option needs to be diff --git a/plugins/modules/rax_cdb_database.py b/plugins/modules/rax_cdb_database.py index 5b5ebc6e29..6e0e8411c2 100644 --- a/plugins/modules/rax_cdb_database.py +++ b/plugins/modules/rax_cdb_database.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: rax_cdb_database -short_description: 'create / delete a database in the Cloud Databases' +short_description: Create / delete a database in the Cloud Databases description: - create / delete a database in the Cloud Databases. options: diff --git a/plugins/modules/rax_cdb_user.py b/plugins/modules/rax_cdb_user.py index ccc3e677a5..63cb00b608 100644 --- a/plugins/modules/rax_cdb_user.py +++ b/plugins/modules/rax_cdb_user.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_cdb_user -short_description: create / delete a Rackspace Cloud Database +short_description: Create / delete a Rackspace Cloud Database description: - create / delete a database in the Cloud Databases. options: diff --git a/plugins/modules/rax_clb.py b/plugins/modules/rax_clb.py index 7d45c865f0..8355a42921 100644 --- a/plugins/modules/rax_clb.py +++ b/plugins/modules/rax_clb.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_clb -short_description: create / delete a load balancer in Rackspace Public Cloud +short_description: Create / delete a load balancer in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud load balancer. options: diff --git a/plugins/modules/rax_clb_nodes.py b/plugins/modules/rax_clb_nodes.py index 04341f7ceb..e6d050de46 100644 --- a/plugins/modules/rax_clb_nodes.py +++ b/plugins/modules/rax_clb_nodes.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_clb_nodes -short_description: add, modify and remove nodes from a Rackspace Cloud Load Balancer +short_description: Add, modify and remove nodes from a Rackspace Cloud Load Balancer description: - Adds, modifies and removes nodes from a Rackspace Cloud Load Balancer options: diff --git a/plugins/modules/rax_clb_ssl.py b/plugins/modules/rax_clb_ssl.py index db192368b4..85110d3390 100644 --- a/plugins/modules/rax_clb_ssl.py +++ b/plugins/modules/rax_clb_ssl.py @@ -10,7 +10,7 @@ __metaclass__ = type DOCUMENTATION = ''' module: rax_clb_ssl -short_description: Manage SSL termination for a Rackspace Cloud Load Balancer. +short_description: Manage SSL termination for a Rackspace Cloud Load Balancer description: - Set up, reconfigure, or remove SSL termination for an existing load balancer. options: diff --git a/plugins/modules/rax_mon_alarm.py b/plugins/modules/rax_mon_alarm.py index dd971f7243..d167420341 100644 --- a/plugins/modules/rax_mon_alarm.py +++ b/plugins/modules/rax_mon_alarm.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_mon_alarm -short_description: Create or delete a Rackspace Cloud Monitoring alarm. +short_description: Create or delete a Rackspace Cloud Monitoring alarm description: - Create or delete a Rackspace Cloud Monitoring alarm that associates an existing rax_mon_entity, rax_mon_check, and rax_mon_notification_plan with diff --git a/plugins/modules/rax_mon_notification.py b/plugins/modules/rax_mon_notification.py index c26b0315db..73bfd1a78f 100644 --- a/plugins/modules/rax_mon_notification.py +++ b/plugins/modules/rax_mon_notification.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_mon_notification -short_description: Create or delete a Rackspace Cloud Monitoring notification. +short_description: Create or delete a Rackspace Cloud Monitoring notification description: - Create or delete a Rackspace Cloud Monitoring notification that specifies a channel that can be used to communicate alarms, such as email, webhooks, or diff --git a/plugins/modules/rax_network.py b/plugins/modules/rax_network.py index 02de3ce011..edb7773b72 100644 --- a/plugins/modules/rax_network.py +++ b/plugins/modules/rax_network.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_network -short_description: create / delete an isolated network in Rackspace Public Cloud +short_description: Create / delete an isolated network in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud isolated network. options: diff --git a/plugins/modules/rax_queue.py b/plugins/modules/rax_queue.py index 366c1c77e3..e053f3266d 100644 --- a/plugins/modules/rax_queue.py +++ b/plugins/modules/rax_queue.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: rax_queue -short_description: create / delete a queue in Rackspace Public Cloud +short_description: Create / delete a queue in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud queue. options: diff --git a/plugins/modules/rundeck_acl_policy.py b/plugins/modules/rundeck_acl_policy.py index 6168cb5b64..4830c44784 100644 --- a/plugins/modules/rundeck_acl_policy.py +++ b/plugins/modules/rundeck_acl_policy.py @@ -15,7 +15,7 @@ DOCUMENTATION = ''' --- module: rundeck_acl_policy -short_description: Manage Rundeck ACL policies. +short_description: Manage Rundeck ACL policies description: - Create, update and remove Rundeck ACL policies through HTTP API. author: "Loic Blot (@nerzhul)" diff --git a/plugins/modules/rundeck_project.py b/plugins/modules/rundeck_project.py index 88f4a78100..2039a00a02 100644 --- a/plugins/modules/rundeck_project.py +++ b/plugins/modules/rundeck_project.py @@ -17,7 +17,7 @@ DOCUMENTATION = ''' --- module: rundeck_project -short_description: Manage Rundeck projects. +short_description: Manage Rundeck projects description: - Create and remove Rundeck projects through HTTP API. author: "Loic Blot (@nerzhul)" diff --git a/plugins/modules/say.py b/plugins/modules/say.py index fe36b02d15..04b5027cae 100644 --- a/plugins/modules/say.py +++ b/plugins/modules/say.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: say -short_description: Makes a computer to speak. +short_description: Makes a computer to speak description: - makes a computer speak! Amuse your friends, annoy your coworkers! notes: diff --git a/plugins/modules/scaleway_image_info.py b/plugins/modules/scaleway_image_info.py index ee0134a52a..56ca689c38 100644 --- a/plugins/modules/scaleway_image_info.py +++ b/plugins/modules/scaleway_image_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: scaleway_image_info -short_description: Gather information about the Scaleway images available. +short_description: Gather information about the Scaleway images available description: - Gather information about the Scaleway images available. author: diff --git a/plugins/modules/scaleway_ip_info.py b/plugins/modules/scaleway_ip_info.py index d8725894e6..1fd4be5898 100644 --- a/plugins/modules/scaleway_ip_info.py +++ b/plugins/modules/scaleway_ip_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: scaleway_ip_info -short_description: Gather information about the Scaleway ips available. +short_description: Gather information about the Scaleway ips available description: - Gather information about the Scaleway ips available. author: diff --git a/plugins/modules/scaleway_organization_info.py b/plugins/modules/scaleway_organization_info.py index aca8a0c43f..6e1f8df388 100644 --- a/plugins/modules/scaleway_organization_info.py +++ b/plugins/modules/scaleway_organization_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: scaleway_organization_info -short_description: Gather information about the Scaleway organizations available. +short_description: Gather information about the Scaleway organizations available description: - Gather information about the Scaleway organizations available. author: diff --git a/plugins/modules/scaleway_security_group_info.py b/plugins/modules/scaleway_security_group_info.py index 7fd96fd067..fb28e87740 100644 --- a/plugins/modules/scaleway_security_group_info.py +++ b/plugins/modules/scaleway_security_group_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: scaleway_security_group_info -short_description: Gather information about the Scaleway security groups available. +short_description: Gather information about the Scaleway security groups available description: - Gather information about the Scaleway security groups available. author: diff --git a/plugins/modules/scaleway_server_info.py b/plugins/modules/scaleway_server_info.py index 7a31882ef7..01e9410da8 100644 --- a/plugins/modules/scaleway_server_info.py +++ b/plugins/modules/scaleway_server_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: scaleway_server_info -short_description: Gather information about the Scaleway servers available. +short_description: Gather information about the Scaleway servers available description: - Gather information about the Scaleway servers available. author: diff --git a/plugins/modules/scaleway_snapshot_info.py b/plugins/modules/scaleway_snapshot_info.py index 47cd14cee8..687f43c85b 100644 --- a/plugins/modules/scaleway_snapshot_info.py +++ b/plugins/modules/scaleway_snapshot_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: scaleway_snapshot_info -short_description: Gather information about the Scaleway snapshots available. +short_description: Gather information about the Scaleway snapshots available description: - Gather information about the Scaleway snapshot available. author: diff --git a/plugins/modules/scaleway_volume_info.py b/plugins/modules/scaleway_volume_info.py index 369fadbe64..471845c43e 100644 --- a/plugins/modules/scaleway_volume_info.py +++ b/plugins/modules/scaleway_volume_info.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: scaleway_volume_info -short_description: Gather information about the Scaleway volumes available. +short_description: Gather information about the Scaleway volumes available description: - Gather information about the Scaleway volumes available. author: diff --git a/plugins/modules/sl_vm.py b/plugins/modules/sl_vm.py index 56b3ccdd39..ca925c345f 100644 --- a/plugins/modules/sl_vm.py +++ b/plugins/modules/sl_vm.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: sl_vm -short_description: create or cancel a virtual instance in SoftLayer +short_description: Create or cancel a virtual instance in SoftLayer description: - Creates or cancels SoftLayer instances. - When created, optionally waits for it to be 'running'. diff --git a/plugins/modules/smartos_image_info.py b/plugins/modules/smartos_image_info.py index 0b5117fc45..37267d115a 100644 --- a/plugins/modules/smartos_image_info.py +++ b/plugins/modules/smartos_image_info.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: smartos_image_info -short_description: Get SmartOS image details. +short_description: Get SmartOS image details description: - Retrieve information about all installed images on SmartOS. - This module was called C(smartos_image_facts) before Ansible 2.9, returning C(ansible_facts). diff --git a/plugins/modules/spectrum_device.py b/plugins/modules/spectrum_device.py index c2bab55016..40093aa3a9 100644 --- a/plugins/modules/spectrum_device.py +++ b/plugins/modules/spectrum_device.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: spectrum_device -short_description: Creates/deletes devices in CA Spectrum. +short_description: Creates/deletes devices in CA Spectrum description: - This module allows you to create and delete devices in CA Spectrum U(https://www.ca.com/us/products/ca-spectrum.html). - Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1 diff --git a/plugins/modules/spectrum_model_attrs.py b/plugins/modules/spectrum_model_attrs.py index 5a92802f5f..de771b0ad3 100644 --- a/plugins/modules/spectrum_model_attrs.py +++ b/plugins/modules/spectrum_model_attrs.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = r''' --- module: spectrum_model_attrs -short_description: Enforce a model's attributes in CA Spectrum. +short_description: Enforce a model's attributes in CA Spectrum description: - This module can be used to enforce a model's attributes in CA Spectrum. version_added: 2.5.0 diff --git a/plugins/modules/svc.py b/plugins/modules/svc.py index 2800c9d2bf..4d92892ce3 100644 --- a/plugins/modules/svc.py +++ b/plugins/modules/svc.py @@ -13,7 +13,7 @@ DOCUMENTATION = ''' module: svc author: - Brian Coca (@bcoca) -short_description: Manage daemontools services +short_description: Manage daemontools services description: - Controls daemontools services on remote hosts using the svc utility. options: diff --git a/plugins/modules/swupd.py b/plugins/modules/swupd.py index 4567709f48..a47dd667ae 100644 --- a/plugins/modules/swupd.py +++ b/plugins/modules/swupd.py @@ -13,7 +13,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: swupd -short_description: Manages updates and bundles in ClearLinux systems. +short_description: Manages updates and bundles in ClearLinux systems description: - Manages updates and bundles with the swupd bundle manager, which is used by the Clear Linux Project for Intel Architecture. diff --git a/plugins/modules/telegram.py b/plugins/modules/telegram.py index 499af4ef1a..4e89825120 100644 --- a/plugins/modules/telegram.py +++ b/plugins/modules/telegram.py @@ -16,7 +16,7 @@ author: - "Artem Feofanov (@tyouxa)" - "Nikolai Lomov (@lomserman)" -short_description: module for sending notifications via telegram +short_description: Send notifications via telegram description: - Send notifications via telegram bot, to a verified group or user. diff --git a/plugins/modules/twilio.py b/plugins/modules/twilio.py index 1934820fe3..6d22563d1c 100644 --- a/plugins/modules/twilio.py +++ b/plugins/modules/twilio.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: twilio -short_description: Sends a text message to a mobile phone through Twilio. +short_description: Sends a text message to a mobile phone through Twilio description: - Sends a text message to a phone number through the Twilio messaging API. notes: diff --git a/plugins/modules/utm_aaa_group.py b/plugins/modules/utm_aaa_group.py index cff1834c93..3d5cbc2007 100644 --- a/plugins/modules/utm_aaa_group.py +++ b/plugins/modules/utm_aaa_group.py @@ -15,7 +15,7 @@ module: utm_aaa_group author: - Johannes Brunswicker (@MatrixCrawler) -short_description: Create, update or destroy an aaa group object in Sophos UTM. +short_description: Create, update or destroy an aaa group object in Sophos UTM description: - Create, update or destroy an aaa group object in Sophos UTM. diff --git a/plugins/modules/utm_aaa_group_info.py b/plugins/modules/utm_aaa_group_info.py index a01dad92ac..8798fda7f3 100644 --- a/plugins/modules/utm_aaa_group_info.py +++ b/plugins/modules/utm_aaa_group_info.py @@ -17,7 +17,7 @@ module: utm_aaa_group_info author: - Johannes Brunswicker (@MatrixCrawler) -short_description: get info for reverse_proxy frontend entry in Sophos UTM +short_description: Get info for reverse_proxy frontend entry in Sophos UTM description: - get info for a reverse_proxy frontend entry in SOPHOS UTM. diff --git a/plugins/modules/utm_ca_host_key_cert.py b/plugins/modules/utm_ca_host_key_cert.py index 693f25964a..318bc1fd31 100644 --- a/plugins/modules/utm_ca_host_key_cert.py +++ b/plugins/modules/utm_ca_host_key_cert.py @@ -16,7 +16,7 @@ module: utm_ca_host_key_cert author: - Stephan Schwarz (@stearz) -short_description: create, update or destroy ca host_key_cert entry in Sophos UTM +short_description: Create, update or destroy ca host_key_cert entry in Sophos UTM description: - Create, update or destroy a ca host_key_cert entry in SOPHOS UTM. diff --git a/plugins/modules/utm_dns_host.py b/plugins/modules/utm_dns_host.py index af91e2433b..3a1744651a 100644 --- a/plugins/modules/utm_dns_host.py +++ b/plugins/modules/utm_dns_host.py @@ -15,7 +15,7 @@ module: utm_dns_host author: - Johannes Brunswicker (@MatrixCrawler) -short_description: create, update or destroy dns entry in Sophos UTM +short_description: Create, update or destroy dns entry in Sophos UTM description: - Create, update or destroy a dns entry in SOPHOS UTM. diff --git a/plugins/modules/utm_proxy_auth_profile.py b/plugins/modules/utm_proxy_auth_profile.py index aab426cc03..0c53a92380 100644 --- a/plugins/modules/utm_proxy_auth_profile.py +++ b/plugins/modules/utm_proxy_auth_profile.py @@ -16,7 +16,7 @@ module: utm_proxy_auth_profile author: - Stephan Schwarz (@stearz) -short_description: create, update or destroy reverse_proxy auth_profile entry in Sophos UTM +short_description: Create, update or destroy reverse_proxy auth_profile entry in Sophos UTM description: - Create, update or destroy a reverse_proxy auth_profile entry in SOPHOS UTM. diff --git a/plugins/modules/utm_proxy_frontend.py b/plugins/modules/utm_proxy_frontend.py index 8f5a1e8686..127c7d4d43 100644 --- a/plugins/modules/utm_proxy_frontend.py +++ b/plugins/modules/utm_proxy_frontend.py @@ -16,7 +16,7 @@ module: utm_proxy_frontend author: - Johannes Brunswicker (@MatrixCrawler) -short_description: create, update or destroy reverse_proxy frontend entry in Sophos UTM +short_description: Create, update or destroy reverse_proxy frontend entry in Sophos UTM description: - Create, update or destroy a reverse_proxy frontend entry in Sophos UTM. diff --git a/plugins/modules/utm_proxy_frontend_info.py b/plugins/modules/utm_proxy_frontend_info.py index 0b8e124379..65faecfbc8 100644 --- a/plugins/modules/utm_proxy_frontend_info.py +++ b/plugins/modules/utm_proxy_frontend_info.py @@ -16,7 +16,7 @@ module: utm_proxy_frontend_info author: - Johannes Brunswicker (@MatrixCrawler) -short_description: create, update or destroy reverse_proxy frontend entry in Sophos UTM +short_description: Create, update or destroy reverse_proxy frontend entry in Sophos UTM description: - Create, update or destroy a reverse_proxy frontend entry in SOPHOS UTM. diff --git a/plugins/modules/utm_proxy_location.py b/plugins/modules/utm_proxy_location.py index c6ff1bd26b..0efeea5a27 100644 --- a/plugins/modules/utm_proxy_location.py +++ b/plugins/modules/utm_proxy_location.py @@ -16,7 +16,7 @@ module: utm_proxy_location author: - Johannes Brunswicker (@MatrixCrawler) -short_description: create, update or destroy reverse_proxy location entry in Sophos UTM +short_description: Create, update or destroy reverse_proxy location entry in Sophos UTM description: - Create, update or destroy a reverse_proxy location entry in SOPHOS UTM. diff --git a/plugins/modules/utm_proxy_location_info.py b/plugins/modules/utm_proxy_location_info.py index 0e7b165903..4b502df296 100644 --- a/plugins/modules/utm_proxy_location_info.py +++ b/plugins/modules/utm_proxy_location_info.py @@ -16,7 +16,7 @@ module: utm_proxy_location_info author: - Johannes Brunswicker (@MatrixCrawler) -short_description: create, update or destroy reverse_proxy location entry in Sophos UTM +short_description: Create, update or destroy reverse_proxy location entry in Sophos UTM description: - Create, update or destroy a reverse_proxy location entry in SOPHOS UTM. diff --git a/plugins/modules/vertica_configuration.py b/plugins/modules/vertica_configuration.py index f3ac067d0f..553630da39 100644 --- a/plugins/modules/vertica_configuration.py +++ b/plugins/modules/vertica_configuration.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: vertica_configuration -short_description: Updates Vertica configuration parameters. +short_description: Updates Vertica configuration parameters description: - Updates Vertica configuration parameters. options: diff --git a/plugins/modules/vertica_info.py b/plugins/modules/vertica_info.py index a51187de1d..3106be3b38 100644 --- a/plugins/modules/vertica_info.py +++ b/plugins/modules/vertica_info.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: vertica_info -short_description: Gathers Vertica database facts. +short_description: Gathers Vertica database facts description: - Gathers Vertica database information. - This module was called C(vertica_facts) before Ansible 2.9, returning C(ansible_facts). diff --git a/plugins/modules/vertica_role.py b/plugins/modules/vertica_role.py index e9f2ef34df..dde9919511 100644 --- a/plugins/modules/vertica_role.py +++ b/plugins/modules/vertica_role.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: vertica_role -short_description: Adds or removes Vertica database roles and assigns roles to them. +short_description: Adds or removes Vertica database roles and assigns roles to them description: - Adds or removes Vertica database role and, optionally, assign other roles. options: diff --git a/plugins/modules/vertica_schema.py b/plugins/modules/vertica_schema.py index b1bdf944b9..3c4071473a 100644 --- a/plugins/modules/vertica_schema.py +++ b/plugins/modules/vertica_schema.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: vertica_schema -short_description: Adds or removes Vertica database schema and roles. +short_description: Adds or removes Vertica database schema and roles description: - Adds or removes Vertica database schema and, optionally, roles with schema access privileges. diff --git a/plugins/modules/vertica_user.py b/plugins/modules/vertica_user.py index ff2f02d0cc..89f1cb92a3 100644 --- a/plugins/modules/vertica_user.py +++ b/plugins/modules/vertica_user.py @@ -11,7 +11,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: vertica_user -short_description: Adds or removes Vertica database users and assigns roles. +short_description: Adds or removes Vertica database users and assigns roles description: - Adds or removes Vertica database user and, optionally, assigns roles. - A user will not be removed until all the dependencies have been dropped. diff --git a/plugins/modules/vmadm.py b/plugins/modules/vmadm.py index 3bc016d679..6b4490ca57 100644 --- a/plugins/modules/vmadm.py +++ b/plugins/modules/vmadm.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: vmadm -short_description: Manage SmartOS virtual machines and zones. +short_description: Manage SmartOS virtual machines and zones description: - Manage SmartOS virtual machines through vmadm(1M). author: Jasper Lievisse Adriaanse (@jasperla) diff --git a/plugins/modules/xenserver_facts.py b/plugins/modules/xenserver_facts.py index 10ec3cd50f..59c457c7f7 100644 --- a/plugins/modules/xenserver_facts.py +++ b/plugins/modules/xenserver_facts.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: xenserver_facts -short_description: get facts reported on xenserver +short_description: Get facts reported on xenserver description: - Reads data out of XenAPI, can be used instead of multiple xe commands. author: diff --git a/plugins/modules/zfs_facts.py b/plugins/modules/zfs_facts.py index 734659a7ea..bb4530c473 100644 --- a/plugins/modules/zfs_facts.py +++ b/plugins/modules/zfs_facts.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: zfs_facts -short_description: Gather facts about ZFS datasets. +short_description: Gather facts about ZFS datasets description: - Gather facts from ZFS dataset properties. author: Adam Števko (@xen0l) diff --git a/plugins/modules/zpool_facts.py b/plugins/modules/zpool_facts.py index ec5fdc4442..2477a920b0 100644 --- a/plugins/modules/zpool_facts.py +++ b/plugins/modules/zpool_facts.py @@ -12,7 +12,7 @@ __metaclass__ = type DOCUMENTATION = ''' --- module: zpool_facts -short_description: Gather facts about ZFS pools. +short_description: Gather facts about ZFS pools description: - Gather facts from ZFS pool properties. author: Adam Števko (@xen0l) From 7610501c66a704214091aa0ba89065a53719f9cd Mon Sep 17 00:00:00 2001 From: Tong He <68936428+unnecessary-username@users.noreply.github.com> Date: Fri, 11 Nov 2022 04:18:01 +0800 Subject: [PATCH 0328/2104] Fix a logical flaw when deleting a build in the jenkins_build module (#5514) * Fix the logical flaw when deleting a build in the jenkins_build module. * Fix the logical flaw when deleting a Jenkins build in the jenkins_build module. * Adding changelogs. * Update tests/unit/plugins/modules/test_jenkins_build.py Co-authored-by: Felix Fontein * Attempt to mock the exception classes. * Remedy the CI issues when mocking the exception classes. * Assuming a way to mock the get_build_status function. * Near to the feasible approach. * Calls the correct class when unit testing. * Fix sending wrong arguments when unit testing. * Directly assign the argument value in the unit testing. * Fix errors calling different classes. Co-authored-by: Felix Fontein --- ...gical-flaw-when-deleting-jenkins-build.yml | 2 + plugins/modules/jenkins_build.py | 10 +++- .../plugins/modules/test_jenkins_build.py | 48 +++++++++++++++++-- 3 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5514-fix-logical-flaw-when-deleting-jenkins-build.yml diff --git a/changelogs/fragments/5514-fix-logical-flaw-when-deleting-jenkins-build.yml b/changelogs/fragments/5514-fix-logical-flaw-when-deleting-jenkins-build.yml new file mode 100644 index 0000000000..818ee95146 --- /dev/null +++ b/changelogs/fragments/5514-fix-logical-flaw-when-deleting-jenkins-build.yml @@ -0,0 +1,2 @@ +bugfixes: + - jenkins_build - fix the logical flaw when deleting a Jenkins build (https://github.com/ansible-collections/community.general/pull/5514). \ No newline at end of file diff --git a/plugins/modules/jenkins_build.py b/plugins/modules/jenkins_build.py index 09304ccfbc..b02027f229 100644 --- a/plugins/modules/jenkins_build.py +++ b/plugins/modules/jenkins_build.py @@ -183,7 +183,10 @@ class JenkinsBuild: try: response = self.server.get_build_info(self.name, self.build_number) return response - + except jenkins.JenkinsException as e: + response = {} + response["result"] = "ABSENT" + return response except Exception as e: self.module.fail_json(msg='Unable to fetch build information, %s' % to_native(e), exception=traceback.format_exc()) @@ -231,7 +234,10 @@ class JenkinsBuild: if self.state == "stopped" and build_status['result'] == "ABORTED": result['changed'] = True result['build_info'] = build_status - elif build_status['result'] == "SUCCESS": + elif self.state == "absent" and build_status['result'] == "ABSENT": + result['changed'] = True + result['build_info'] = build_status + elif self.state != "absent" and build_status['result'] == "SUCCESS": result['changed'] = True result['build_info'] = build_status else: diff --git a/tests/unit/plugins/modules/test_jenkins_build.py b/tests/unit/plugins/modules/test_jenkins_build.py index adee2fce99..44c6307ac9 100644 --- a/tests/unit/plugins/modules/test_jenkins_build.py +++ b/tests/unit/plugins/modules/test_jenkins_build.py @@ -43,6 +43,28 @@ def fail_json(*args, **kwargs): raise AnsibleFailJson(kwargs) +class jenkins: + class JenkinsException(Exception): + pass + + class NotFoundException(JenkinsException): + pass + + +class JenkinsBuildMock(): + def get_build_status(self): + try: + instance = JenkinsMock() + response = JenkinsMock.get_build_info(instance, 'host-delete', 1234) + return response + except jenkins.JenkinsException as e: + response = {} + response["result"] = "ABSENT" + return response + except Exception as e: + fail_json(msg='Unable to fetch build information, {0}'.format(e)) + + class JenkinsMock(): def get_job_info(self, name): @@ -51,6 +73,8 @@ class JenkinsMock(): } def get_build_info(self, name, build_number): + if name == "host-delete": + raise jenkins.JenkinsException("job {0} number {1} does not exist".format(name, build_number)) return { "building": True, "result": "SUCCESS" @@ -83,7 +107,7 @@ class JenkinsMockIdempotent(): return None def delete_build(self, name, build_number): - return None + raise jenkins.NotFoundException("job {0} number {1} does not exist".format(name, build_number)) def stop_build(self, name, build_number): return None @@ -167,13 +191,31 @@ class TestJenkinsBuild(unittest.TestCase): @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') @patch('ansible_collections.community.general.plugins.modules.jenkins_build.JenkinsBuild.get_jenkins_connection') - def test_module_delete_build(self, jenkins_connection, test_deps): + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.JenkinsBuild.get_build_status') + def test_module_delete_build(self, build_status, jenkins_connection, test_deps): test_deps.return_value = None jenkins_connection.return_value = JenkinsMock() + build_status.return_value = JenkinsBuildMock().get_build_status() with self.assertRaises(AnsibleExitJson): set_module_args({ - "name": "host-check", + "name": "host-delete", + "build_number": "1234", + "state": "absent", + "user": "abc", + "token": "xyz" + }) + jenkins_build.main() + + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.test_dependencies') + @patch('ansible_collections.community.general.plugins.modules.jenkins_build.JenkinsBuild.get_jenkins_connection') + def test_module_delete_build_again(self, jenkins_connection, test_deps): + test_deps.return_value = None + jenkins_connection.return_value = JenkinsMockIdempotent() + + with self.assertRaises(AnsibleFailJson): + set_module_args({ + "name": "host-delete", "build_number": "1234", "state": "absent", "user": "abc", From bc0f99386b509ca2a6bb5ddae5ef79bf0e4b3e8d Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 11 Nov 2022 09:18:52 +1300 Subject: [PATCH 0329/2104] xfconf: prune deprecated facts-generation code (#5502) * xfconf: prune deprecated facts-generatin code * add changelog fragment * adjust changelog fragment * Update changelogs/fragments/5502-xfconf-facts-deprecation.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5502-xfconf-facts-deprecation.yml | 6 ++++++ plugins/modules/xfconf.py | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5502-xfconf-facts-deprecation.yml diff --git a/changelogs/fragments/5502-xfconf-facts-deprecation.yml b/changelogs/fragments/5502-xfconf-facts-deprecation.yml new file mode 100644 index 0000000000..776d852700 --- /dev/null +++ b/changelogs/fragments/5502-xfconf-facts-deprecation.yml @@ -0,0 +1,6 @@ +removed_features: + - > + xfconf - generating facts was deprecated in community.general 3.0.0, + however two factoids, ``previous_value`` and ``type`` continued to be generated by mistake. This behaviour + has been removed and ``xfconf`` generate no facts whatsoever + (https://github.com/ansible-collections/community.general/pull/5502). diff --git a/plugins/modules/xfconf.py b/plugins/modules/xfconf.py index c231a47484..6776ef888e 100644 --- a/plugins/modules/xfconf.py +++ b/plugins/modules/xfconf.py @@ -195,15 +195,12 @@ class XFConfProperty(StateModuleHelper): default_state = 'present' - def update_xfconf_output(self, **kwargs): - self.update_vars(meta={"output": True, "fact": True}, **kwargs) - def __init_module__(self): self.runner = xfconf_runner(self.module) self.does_not = 'Property "{0}" does not exist on channel "{1}".'.format(self.vars.property, self.vars.channel) - self.vars.set('previous_value', self._get(), fact=True) - self.vars.set('type', self.vars.value_type, fact=True) + self.vars.set('previous_value', self._get()) + self.vars.set('type', self.vars.value_type) self.vars.meta('value').set(initial_value=self.vars.previous_value) if self.vars.disable_facts is False: From 27a4ffc2931e5ccdd3a2d4d09260351d1050c4f9 Mon Sep 17 00:00:00 2001 From: Doc_Tiebeau Date: Sun, 13 Nov 2022 21:03:30 +0100 Subject: [PATCH 0330/2104] Fix: Duplicate vmid in proxmox_disk module #5492 (#5493) https://github.com/ansible-collections/community.general/issues/5492 --- plugins/modules/proxmox_disk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/proxmox_disk.py b/plugins/modules/proxmox_disk.py index 7a39d38d05..8f55e2d130 100644 --- a/plugins/modules/proxmox_disk.py +++ b/plugins/modules/proxmox_disk.py @@ -725,7 +725,7 @@ def main(): actual_size = disk_config['size'] if size == actual_size: module.exit_json(changed=False, vmid=vmid, msg="Disk %s is already %s size" % (disk, size)) - proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(vmid=vmid, disk=disk, size=size) + proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(disk=disk, size=size) module.exit_json(changed=True, vmid=vmid, msg="Disk %s resized in VM %s" % (disk, vmid)) except Exception as e: module.fail_json(msg="Failed to resize disk %s in VM %s with exception: %s" % (disk, vmid, str(e))) From 672385309ce68912201ed1bd34bf74bc0cd25112 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 13 Nov 2022 21:06:11 +0100 Subject: [PATCH 0331/2104] Add changelog fragment. --- changelogs/fragments/5493-proxmox.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/5493-proxmox.yml diff --git a/changelogs/fragments/5493-proxmox.yml b/changelogs/fragments/5493-proxmox.yml new file mode 100644 index 0000000000..a14b7767e6 --- /dev/null +++ b/changelogs/fragments/5493-proxmox.yml @@ -0,0 +1,2 @@ +bugfixes: + - "proxmox_disk - avoid duplicate ``vmid`` reference (https://github.com/ansible-collections/community.general/issues/5492, https://github.com/ansible-collections/community.general/pull/5493)." From 60c8b9a67fe0788c770db69641ca6552beb2f522 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 15 Nov 2022 08:12:09 +0100 Subject: [PATCH 0332/2104] dependent lookup: prevent deprecation warning with ansible-core 2.14 (#5543) * Prevent deprecation warning. * Improve naming and add comment. --- changelogs/fragments/5543-dependent-template.yml | 2 ++ plugins/lookup/dependent.py | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5543-dependent-template.yml diff --git a/changelogs/fragments/5543-dependent-template.yml b/changelogs/fragments/5543-dependent-template.yml new file mode 100644 index 0000000000..63e8f67d63 --- /dev/null +++ b/changelogs/fragments/5543-dependent-template.yml @@ -0,0 +1,2 @@ +bugfixes: + - "dependent lookup plugin - avoid warning on deprecated parameter for ``Templar.template()`` (https://github.com/ansible-collections/community.general/pull/5543)." diff --git a/plugins/lookup/dependent.py b/plugins/lookup/dependent.py index b44a9208af..54714344eb 100644 --- a/plugins/lookup/dependent.py +++ b/plugins/lookup/dependent.py @@ -125,8 +125,16 @@ from ansible.errors import AnsibleLookupError from ansible.module_utils.common._collections_compat import Mapping, Sequence from ansible.module_utils.six import string_types from ansible.plugins.lookup import LookupBase +from ansible.release import __version__ as ansible_version from ansible.template import Templar +from ansible_collections.community.general.plugins.module_utils.version import LooseVersion + + +# Whether Templar has a cache, which can be controlled by Templar.template()'s cache option. +# The cache was removed for ansible-core 2.14 (https://github.com/ansible/ansible/pull/78419) +_TEMPLAR_HAS_TEMPLATE_CACHE = LooseVersion(ansible_version) < LooseVersion('2.14.0') + class LookupModule(LookupBase): def __evaluate(self, expression, templar, variables): @@ -136,7 +144,10 @@ class LookupModule(LookupBase): ``variables`` are the variables to use. """ templar.available_variables = variables or {} - return templar.template("{0}{1}{2}".format("{{", expression, "}}"), cache=False) + expression = "{0}{1}{2}".format("{{", expression, "}}") + if _TEMPLAR_HAS_TEMPLATE_CACHE: + return templar.template(expression, cache=False) + return templar.template(expression) def __process(self, result, terms, index, current, templar, variables): """Fills ``result`` list with evaluated items. From 6a6bbb65770571d17ceab304c44b41eb6ef98052 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 15 Nov 2022 08:13:00 +0100 Subject: [PATCH 0333/2104] Clean up code-scanning workflow. (#5546) --- .github/workflows/codeql-analysis.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f7ab9450cc..2d93f5efef 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,15 +24,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -41,21 +32,5 @@ jobs: # with: # languages: go, javascript, csharp, python, cpp, java - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 6c7e9116e1abba6c125e7f05cf7fd0e8042a1f43 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 16 Nov 2022 09:02:45 +1300 Subject: [PATCH 0334/2104] gconftool2: refactored to use ModuleHelper + CmdRunner (#5545) * gconftool2: refactored to use ModuleHelper + CmdRunner * add changelog fragment * removed old code commented out --- .../fragments/5545-gconftool-cmd-runner.yml | 2 + plugins/module_utils/gconftool2.py | 23 ++- plugins/modules/gconftool2.py | 173 +++++------------- plugins/modules/gconftool2_info.py | 4 +- tests/sanity/ignore-2.11.txt | 2 +- tests/sanity/ignore-2.12.txt | 2 +- tests/sanity/ignore-2.13.txt | 2 +- tests/sanity/ignore-2.14.txt | 2 +- tests/sanity/ignore-2.15.txt | 2 +- tests/unit/plugins/modules/test_gconftool2.py | 116 ++++++++++++ 10 files changed, 186 insertions(+), 142 deletions(-) create mode 100644 changelogs/fragments/5545-gconftool-cmd-runner.yml create mode 100644 tests/unit/plugins/modules/test_gconftool2.py diff --git a/changelogs/fragments/5545-gconftool-cmd-runner.yml b/changelogs/fragments/5545-gconftool-cmd-runner.yml new file mode 100644 index 0000000000..a41d5c3657 --- /dev/null +++ b/changelogs/fragments/5545-gconftool-cmd-runner.yml @@ -0,0 +1,2 @@ +minor_changes: + - gconftool2 - refactor using ``ModuleHelper`` and ``CmdRunner`` (https://github.com/ansible-collections/community.general/pull/5545). diff --git a/plugins/module_utils/gconftool2.py b/plugins/module_utils/gconftool2.py index cd9de57695..e90c3fb2cb 100644 --- a/plugins/module_utils/gconftool2.py +++ b/plugins/module_utils/gconftool2.py @@ -6,7 +6,14 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt + + +_state_map = { + "present": "--set", + "absent": "--unset", + "get": "--get", +} def gconftool2_runner(module, **kwargs): @@ -14,14 +21,12 @@ def gconftool2_runner(module, **kwargs): module, command='gconftool-2', arg_formats=dict( - key=fmt.as_list(), - value_type=fmt.as_opt_val("--type"), - value=fmt.as_list(), - direct=fmt.as_bool("--direct"), - config_source=fmt.as_opt_val("--config-source"), - get=fmt.as_bool("--get"), - set_arg=fmt.as_bool("--set"), - unset=fmt.as_bool("--unset"), + state=cmd_runner_fmt.as_map(_state_map), + key=cmd_runner_fmt.as_list(), + value_type=cmd_runner_fmt.as_opt_val("--type"), + value=cmd_runner_fmt.as_list(), + direct=cmd_runner_fmt.as_bool("--direct"), + config_source=cmd_runner_fmt.as_opt_val("--config-source"), ), **kwargs ) diff --git a/plugins/modules/gconftool2.py b/plugins/modules/gconftool2.py index 931b43d76c..a3ac8bb8f1 100644 --- a/plugins/modules/gconftool2.py +++ b/plugins/modules/gconftool2.py @@ -83,75 +83,17 @@ RETURN = ''' ... ''' -from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper +from ansible_collections.community.general.plugins.module_utils.gconftool2 import gconftool2_runner -class GConf2Preference(object): - def __init__(self, ansible, key, value_type, value, - direct=False, config_source=""): - self.ansible = ansible - self.key = key - self.value_type = value_type - self.value = value - self.config_source = config_source - self.direct = direct - - def value_already_set(self): - return False - - def call(self, call_type, fail_onerr=True): - """ Helper function to perform gconftool-2 operations """ - config_source = [] - direct = [] - changed = False - out = '' - - # If the configuration source is different from the default, create - # the argument - if self.config_source is not None and len(self.config_source) > 0: - config_source = ["--config-source", self.config_source] - - # If direct is true, create the argument - if self.direct: - direct = ["--direct"] - - # Execute the call - cmd = ["gconftool-2"] - try: - # If the call is "get", then we don't need as many parameters and - # we can ignore some - if call_type == 'get': - self.ansible.deprecate( - msg="State 'get' is deprecated. Please use the module community.general.gconftool2_info instead", - version="8.0.0", collection_name="community.general" - ) - cmd.extend(["--get", self.key]) - # Otherwise, we will use all relevant parameters - elif call_type == 'set': - cmd.extend(direct) - cmd.extend(config_source) - cmd.extend(["--type", self.value_type, "--{3}".format(call_type), self.key, self.value]) - elif call_type == 'unset': - cmd.extend(["--unset", self.key]) - - # Start external command - rc, out, err = self.ansible.run_command(cmd) - - if err and fail_onerr: - self.ansible.fail_json(msg='gconftool-2 failed with ' - 'error: %s' % (str(err))) - else: - changed = True - - except OSError as exception: - self.ansible.fail_json(msg='gconftool-2 failed with exception: ' - '%s' % exception) - return changed, out.rstrip() - - -def main(): - # Setup the Ansible module - module = AnsibleModule( +class GConftool(StateModuleHelper): + change_params = 'value', + diff_params = 'value', + output_params = ('key', 'value_type') + facts_params = ('key', 'value_type') + facts_name = 'gconftool2' + module = dict( argument_spec=dict( key=dict(type='str', required=True, no_log=False), value_type=dict(type='str', choices=['bool', 'float', 'int', 'string']), @@ -160,75 +102,54 @@ def main(): direct=dict(type='bool', default=False), config_source=dict(type='str'), ), - supports_check_mode=True + required_if=[ + ('state', 'present', ['value', 'value_type']), + ('state', 'absent', ['value']), + ('direct', True, ['config_source']), + ], + supports_check_mode=True, ) - state_values = {"present": "set", "absent": "unset", "get": "get"} + def __init_module__(self): + self.runner = gconftool2_runner(self.module, check_rc=True) + if self.vars.state != "get": + if not self.vars.direct and self.vars.config_source is not None: + self.module.fail_json(msg='If the "config_source" is specified then "direct" must be "true"') - # Assign module values to dictionary values - key = module.params['key'] - value_type = module.params['value_type'] - if module.params['value'].lower() == "true": - value = "true" - elif module.params['value'] == "false": - value = "false" - else: - value = module.params['value'] + self.vars.set('previous_value', self._get(), fact=True) + self.vars.set('value_type', self.vars.value_type) + self.vars.set_meta('value', initial_value=self.vars.previous_value) + self.vars.set('playbook_value', self.vars.value, fact=True) - state = state_values[module.params['state']] - direct = module.params['direct'] - config_source = module.params['config_source'] + def _make_process(self, fail_on_err): + def process(rc, out, err): + if err and fail_on_err: + self.ansible.fail_json(msg='gconftool-2 failed with error: %s' % (str(err))) + self.vars.value = out.rstrip() + return self.vars.value + return process - # Initialize some variables for later - change = False - new_value = '' + def _get(self): + return self.runner("state key", output_process=self._make_process(False)).run(state="get") - if state != "get": - if value is None or value == "": - module.fail_json(msg='State %s requires "value" to be set' - % str(state)) - elif value_type is None or value_type == "": - module.fail_json(msg='State %s requires "value_type" to be set' - % str(state)) + def state_get(self): + self.deprecate( + msg="State 'get' is deprecated. Please use the module community.general.gconftool2_info instead", + version="8.0.0", collection_name="community.general" + ) - if direct and config_source is None: - module.fail_json(msg='If "direct" is "true" then the ' + - '"config_source" must be specified') - elif not direct and config_source is not None: - module.fail_json(msg='If the "config_source" is specified ' + - 'then "direct" must be "true"') + def state_absent(self): + with self.runner("state key", output_process=self._make_process(False)) as ctx: + ctx.run() + self.vars.set('new_value', None, fact=True) - # Create a gconf2 preference - gconf_pref = GConf2Preference(module, key, value_type, - value, direct, config_source) - # Now we get the current value, if not found don't fail - dummy, current_value = gconf_pref.call("get", fail_onerr=False) + def state_present(self): + with self.runner("direct config_source value_type state key value", output_process=self._make_process(True)) as ctx: + self.vars.set('new_value', ctx.run(), fact=True) - # Check if the current value equals the value we want to set. If not, make - # a change - if current_value != value: - # If check mode, we know a change would have occurred. - if module.check_mode: - # So we will set the change to True - change = True - # And set the new_value to the value that would have been set - new_value = value - # If not check mode make the change. - else: - change, new_value = gconf_pref.call(state) - # If the value we want to set is the same as the current_value, we will - # set the new_value to the current_value for reporting - else: - new_value = current_value - facts = dict(gconftool2={'changed': change, - 'key': key, - 'value_type': value_type, - 'new_value': new_value, - 'previous_value': current_value, - 'playbook_value': module.params['value']}) - - module.exit_json(changed=change, ansible_facts=facts) +def main(): + GConftool.execute() if __name__ == '__main__': diff --git a/plugins/modules/gconftool2_info.py b/plugins/modules/gconftool2_info.py index f9231104d4..282065b95e 100644 --- a/plugins/modules/gconftool2_info.py +++ b/plugins/modules/gconftool2_info.py @@ -65,8 +65,8 @@ class GConftoolInfo(ModuleHelper): self.runner = gconftool2_runner(self.module, check_rc=True) def __run__(self): - with self.runner.context(args_order=["get", "key"]) as ctx: - rc, out, err = ctx.run(get=True) + with self.runner.context(args_order=["state", "key"]) as ctx: + rc, out, err = ctx.run(state="get") self.vars.value = None if err and not out else out.rstrip() diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 603981df04..f8efbcfbee 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -7,7 +7,7 @@ plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 778f25ae53..adb6d868a9 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -2,7 +2,7 @@ plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 778f25ae53..adb6d868a9 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -2,7 +2,7 @@ plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 20f87d1af2..d670fe2282 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -2,7 +2,7 @@ plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 20f87d1af2..d670fe2282 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -2,7 +2,7 @@ plugins/modules/consul.py validate-modules:doc-missing-type plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice +plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path diff --git a/tests/unit/plugins/modules/test_gconftool2.py b/tests/unit/plugins/modules/test_gconftool2.py new file mode 100644 index 0000000000..f01f15ef82 --- /dev/null +++ b/tests/unit/plugins/modules/test_gconftool2.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +from ansible_collections.community.general.plugins.modules import gconftool2 + +import pytest + +TESTED_MODULE = gconftool2.__name__ + + +@pytest.fixture +def patch_gconftool2(mocker): + """ + Function used for mocking some parts of redhat_subscription module + """ + mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', + return_value='/testbin/gconftool-2') + + +TEST_CASES = [ + [ + {'state': 'get', 'key': '/desktop/gnome/background/picture_filename'}, + { + 'id': 'test_simple_element_get', + 'run_command.calls': [ + ( + ['/testbin/gconftool-2', '--get', '/desktop/gnome/background/picture_filename'], + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': True}, + (0, '100\n', '',), + ), + ], + 'new_value': '100', + } + ], + [ + {'state': 'get', 'key': '/desktop/gnome/background/picture_filename'}, + { + 'id': 'test_simple_element_get_not_found', + 'run_command.calls': [ + ( + ['/testbin/gconftool-2', '--get', '/desktop/gnome/background/picture_filename'], + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': True}, + (0, '', "No value set for `/desktop/gnome/background/picture_filename'\n",), + ), + ], + 'new_value': None, + } + ], + [ + {'state': 'present', 'key': '/desktop/gnome/background/picture_filename', 'value': '200', 'value_type': 'int'}, + { + 'id': 'test_simple_element_set', + 'run_command.calls': [ + ( + ['/testbin/gconftool-2', '--get', '/desktop/gnome/background/picture_filename'], + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': True}, + (0, '100\n', '',), + ), + ( + ['/testbin/gconftool-2', '--type', 'int', '--set', '/desktop/gnome/background/picture_filename', '200'], + {'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': True}, + (0, '200\n', '',), + ), + ], + 'new_value': '200', + } + ], +] +TEST_CASES_IDS = [item[1]['id'] for item in TEST_CASES] + + +@pytest.mark.parametrize('patch_ansible_module, testcase', + TEST_CASES, + ids=TEST_CASES_IDS, + indirect=['patch_ansible_module']) +@pytest.mark.usefixtures('patch_ansible_module') +def test_gconftool2(mocker, capfd, patch_gconftool2, testcase): + """ + Run unit tests for test cases listen in TEST_CASES + """ + + # Mock function used for running commands first + call_results = [item[2] for item in testcase['run_command.calls']] + mock_run_command = mocker.patch( + 'ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.run_command', + side_effect=call_results) + + # Try to run test case + with pytest.raises(SystemExit): + gconftool2.main() + + out, err = capfd.readouterr() + results = json.loads(out) + print("testcase =\n%s" % testcase) + print("results =\n%s" % results) + + for conditional_test_result in ('value',): + if conditional_test_result in testcase: + assert conditional_test_result in results, "'{0}' not found in {1}".format(conditional_test_result, results) + assert results[conditional_test_result] == testcase[conditional_test_result], \ + "'{0}': '{1}' != '{2}'".format(conditional_test_result, results[conditional_test_result], testcase[conditional_test_result]) + + assert mock_run_command.call_count == len(testcase['run_command.calls']) + if mock_run_command.call_count: + call_args_list = [(item[0][0], item[1]) for item in mock_run_command.call_args_list] + expected_call_args_list = [(item[0], item[1]) for item in testcase['run_command.calls']] + print("call args list =\n%s" % call_args_list) + print("expected args list =\n%s" % expected_call_args_list) + assert call_args_list == expected_call_args_list From 9874462abb10a079cc45b88e778e33160a737253 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 16 Nov 2022 09:04:29 +1300 Subject: [PATCH 0335/2104] lxd_project: refactored os.path.expanduser() to module utils (#5549) * lxd_project: refactored os.path.expanduser() to module utils * add changelog fragment --- changelogs/fragments/5549-lxd-project-sanity.yml | 2 ++ plugins/module_utils/lxd.py | 12 ++++++++++-- plugins/modules/lxd_project.py | 8 +++++--- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 8 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5549-lxd-project-sanity.yml diff --git a/changelogs/fragments/5549-lxd-project-sanity.yml b/changelogs/fragments/5549-lxd-project-sanity.yml new file mode 100644 index 0000000000..0a5e328e1c --- /dev/null +++ b/changelogs/fragments/5549-lxd-project-sanity.yml @@ -0,0 +1,2 @@ +minor_changes: + - lxd_project - refactored code out to module utils to clear sanity check (https://github.com/ansible-collections/community.general/pull/5549). diff --git a/plugins/module_utils/lxd.py b/plugins/module_utils/lxd.py index bdf026313a..007de4d8db 100644 --- a/plugins/module_utils/lxd.py +++ b/plugins/module_utils/lxd.py @@ -8,8 +8,10 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +import os import socket import ssl +import json from ansible.module_utils.urls import generic_urlparse from ansible.module_utils.six.moves.urllib.parse import urlparse @@ -20,8 +22,6 @@ from ansible.module_utils.common.text.converters import to_text HTTPConnection = http_client.HTTPConnection HTTPSConnection = http_client.HTTPSConnection -import json - class UnixHTTPConnection(HTTPConnection): def __init__(self, path): @@ -124,3 +124,11 @@ class LXDClient(object): if err is None: err = resp_json.get('error', None) return err + + +def default_key_file(): + return os.path.expanduser('~/.config/lxc/client.key') + + +def default_cert_file(): + return os.path.expanduser('~/.config/lxc/client.crt') diff --git a/plugins/modules/lxd_project.py b/plugins/modules/lxd_project.py index f0aa4058e7..ad6019c2ec 100644 --- a/plugins/modules/lxd_project.py +++ b/plugins/modules/lxd_project.py @@ -178,7 +178,9 @@ actions: sample: ["create"] ''' -from ansible_collections.community.general.plugins.module_utils.lxd import LXDClient, LXDClientException +from ansible_collections.community.general.plugins.module_utils.lxd import ( + LXDClient, LXDClientException, default_key_file, default_cert_file +) from ansible.module_utils.basic import AnsibleModule import os @@ -211,10 +213,10 @@ class LXDProjectManagement(object): self.key_file = self.module.params.get('client_key') if self.key_file is None: - self.key_file = os.path.expanduser('~/.config/lxc/client.key') + self.key_file = default_key_file() self.cert_file = self.module.params.get('client_cert') if self.cert_file is None: - self.cert_file = os.path.expanduser('~/.config/lxc/client.crt') + self.cert_file = default_cert_file() self.debug = self.module._verbosity >= 4 try: diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index f8efbcfbee..5b8f3a4393 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -11,7 +11,6 @@ plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index adb6d868a9..2ff7c01e0a 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -6,7 +6,6 @@ plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index adb6d868a9..2ff7c01e0a 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -6,7 +6,6 @@ plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index d670fe2282..5cd667f8d7 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -7,7 +7,6 @@ plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index d670fe2282..5cd667f8d7 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -7,7 +7,6 @@ plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/lxd_project.py use-argspec-type-path # expanduser() applied to constants plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions From 270dc133b3f4b030886d343f65694aa6bcd33457 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:37:48 +1300 Subject: [PATCH 0336/2104] spotinst_aws_elasticgroup: sanity checks (#5553) * spotinst_aws_elastigroup: add elements to parameter do_not_update * spotinst_aws_elastigroup: add docs for parameter token * add missing docs * add changelog fragment * Update plugins/modules/spotinst_aws_elastigroup.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../5553-spotinst-aws-elasticgroup-sanity.yml | 2 ++ plugins/modules/spotinst_aws_elastigroup.py | 28 +++++++++++++++++-- tests/sanity/ignore-2.11.txt | 3 -- tests/sanity/ignore-2.12.txt | 3 -- tests/sanity/ignore-2.13.txt | 3 -- tests/sanity/ignore-2.14.txt | 3 -- tests/sanity/ignore-2.15.txt | 3 -- 7 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 changelogs/fragments/5553-spotinst-aws-elasticgroup-sanity.yml diff --git a/changelogs/fragments/5553-spotinst-aws-elasticgroup-sanity.yml b/changelogs/fragments/5553-spotinst-aws-elasticgroup-sanity.yml new file mode 100644 index 0000000000..1213f5412a --- /dev/null +++ b/changelogs/fragments/5553-spotinst-aws-elasticgroup-sanity.yml @@ -0,0 +1,2 @@ +minor_changes: + - spotinst_aws_elastigroup - add ``elements`` attribute when missing in ``list`` parameters (https://github.com/ansible-collections/community.general/pull/5553). diff --git a/plugins/modules/spotinst_aws_elastigroup.py b/plugins/modules/spotinst_aws_elastigroup.py index df2b8d84db..481ba70cb9 100644 --- a/plugins/modules/spotinst_aws_elastigroup.py +++ b/plugins/modules/spotinst_aws_elastigroup.py @@ -35,6 +35,13 @@ options: By default this is retrieved from the credentials path. type: str + token: + description: + - A Personal API Access Token issued by Spotinst. + - >- + When not specified, the module will try to obtain it, in that order, from: environment variable C(SPOTINST_TOKEN), or from the credentials path. + type: str + availability_vs_cost: description: - The strategy orientation. @@ -507,8 +514,25 @@ options: description: - TODO document. type: list + elements: str default: [] + multai_token: + description: + - Token used for Multai configuration. + type: str + + multai_load_balancers: + description: + - Configuration parameters for Multai load balancers. + type: list + elements: dict + + elastic_beanstalk: + description: + - Placeholder parameter for future implementation of Elastic Beanstalk configurations. + type: dict + ''' EXAMPLES = ''' # Basic configuration YAML example @@ -1455,7 +1479,7 @@ def main(): block_device_mappings=dict(type='list', elements='dict'), chef=dict(type='dict'), credentials_path=dict(type='path', default="~/.spotinst/credentials"), - do_not_update=dict(default=[], type='list'), + do_not_update=dict(default=[], type='list', elements='str'), down_scaling_policies=dict(type='list', elements='dict'), draining_timeout=dict(type='int'), ebs_optimized=dict(type='bool'), @@ -1479,7 +1503,7 @@ def main(): mesosphere=dict(type='dict'), min_size=dict(type='int', required=True), monitoring=dict(type='str'), - multai_load_balancers=dict(type='list'), + multai_load_balancers=dict(type='list', elements='dict'), multai_token=dict(type='str', no_log=True), name=dict(type='str', required=True), network_interfaces=dict(type='list', elements='dict'), diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 5b8f3a4393..ddb02bb888 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -28,9 +28,6 @@ plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expand plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 2ff7c01e0a..3949640c51 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -23,9 +23,6 @@ plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expand plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 2ff7c01e0a..3949640c51 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -23,9 +23,6 @@ plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expand plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 5cd667f8d7..3bae2ac329 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -24,9 +24,6 @@ plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expand plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 5cd667f8d7..3bae2ac329 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -24,9 +24,6 @@ plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expand plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements -plugins/modules/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc -plugins/modules/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' From 801e3d86ef4f71bd99a6ffc1696b3b8fe7b89223 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 16 Nov 2022 18:44:18 +1300 Subject: [PATCH 0337/2104] redhat_subscription: fix sanity check (#5555) * redhat_subscription: fix sanity check * removed ignore lines --- plugins/modules/redhat_subscription.py | 2 +- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index 69aa550c5d..997d1e5153 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -264,7 +264,7 @@ RETURN = ''' subscribed_pool_ids: description: List of pool IDs to which system is now subscribed returned: success - type: complex + type: dict sample: { "8a85f9815ab905d3015ab928c7005de4": "1" } diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index ddb02bb888..2f6bf480c0 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -25,7 +25,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 3949640c51..6499478916 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -20,7 +20,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 3949640c51..6499478916 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -20,7 +20,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 3bae2ac329..ce92542bd1 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -21,7 +21,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 3bae2ac329..ce92542bd1 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -21,7 +21,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values -plugins/modules/redhat_subscription.py validate-modules:return-syntax-error plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path From e87ca10b61275a4c679f7e945116b8c11090504e Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 16 Nov 2022 18:44:40 +1300 Subject: [PATCH 0338/2104] cmd_runner module utils: fix case for as_fixed() format (#5538) * cmd_runner module utils: fix case for as_fixed() format * add changelog fragment * simplified test_cmd_runner * fix handling empty default for `as_map()` * add changelog fragment * MissingArgumentValue is reraised in run() --- .../fragments/5538-cmd-runner-as-fixed.yml | 3 + plugins/module_utils/cmd_runner.py | 19 ++- .../plugins/module_utils/test_cmd_runner.py | 124 +++++++++--------- 3 files changed, 77 insertions(+), 69 deletions(-) create mode 100644 changelogs/fragments/5538-cmd-runner-as-fixed.yml diff --git a/changelogs/fragments/5538-cmd-runner-as-fixed.yml b/changelogs/fragments/5538-cmd-runner-as-fixed.yml new file mode 100644 index 0000000000..714564b09f --- /dev/null +++ b/changelogs/fragments/5538-cmd-runner-as-fixed.yml @@ -0,0 +1,3 @@ +bugfixes: + - cmd_runner module utils - formatting arguments ``cmd_runner_fmt.as_fixed()`` was expecting an non-existing argument (https://github.com/ansible-collections/community.general/pull/5538). + - cmd_runner module utils - fixed bug when handling default cases in ``cmd_runner_fmt.as_map()`` (https://github.com/ansible-collections/community.general/pull/5538). diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index 141a6be9b2..38daac6716 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -88,9 +88,10 @@ class FormatError(CmdRunnerException): class _ArgFormat(object): - def __init__(self, func, ignore_none=None): + def __init__(self, func, ignore_none=None, ignore_missing_value=False): self.func = func self.ignore_none = ignore_none + self.ignore_missing_value = ignore_missing_value def __call__(self, value, ctx_ignore_none): ignore_none = self.ignore_none if self.ignore_none is not None else ctx_ignore_none @@ -127,7 +128,7 @@ class _Format(object): @staticmethod def as_fixed(args): - return _ArgFormat(lambda value: _ensure_list(args), ignore_none=False) + return _ArgFormat(lambda value: _ensure_list(args), ignore_none=False, ignore_missing_value=True) @staticmethod def as_func(func, ignore_none=None): @@ -135,14 +136,15 @@ class _Format(object): @staticmethod def as_map(_map, default=None, ignore_none=None): + if default is None: + default = [] return _ArgFormat(lambda value: _ensure_list(_map.get(value, default)), ignore_none=ignore_none) @staticmethod def as_default_type(_type, arg="", ignore_none=None): fmt = _Format if _type == "dict": - return fmt.as_func(lambda d: ["--{0}={1}".format(*a) for a in iteritems(d)], - ignore_none=ignore_none) + return fmt.as_func(lambda d: ["--{0}={1}".format(*a) for a in iteritems(d)], ignore_none=ignore_none) if _type == "list": return fmt.as_func(lambda value: ["--{0}".format(x) for x in value], ignore_none=ignore_none) if _type == "bool": @@ -261,10 +263,13 @@ class _CmdRunnerContext(object): for arg_name in self.args_order: value = None try: - value = named_args[arg_name] + if arg_name in named_args: + value = named_args[arg_name] + elif not runner.arg_formats[arg_name].ignore_missing_value: + raise MissingArgumentValue(self.args_order, arg_name) self.cmd.extend(runner.arg_formats[arg_name](value, ctx_ignore_none=self.ignore_value_none)) - except KeyError: - raise MissingArgumentValue(self.args_order, arg_name) + except MissingArgumentValue: + raise except Exception as e: raise FormatError(arg_name, value, runner.arg_formats[arg_name], e) diff --git a/tests/unit/plugins/module_utils/test_cmd_runner.py b/tests/unit/plugins/module_utils/test_cmd_runner.py index 5fdc5fb5fc..f1c3e25a9b 100644 --- a/tests/unit/plugins/module_utils/test_cmd_runner.py +++ b/tests/unit/plugins/module_utils/test_cmd_runner.py @@ -240,6 +240,60 @@ TC_RUNNER = dict( ), ), ), + aa_bb_fixed=( + dict( + args_bundle=dict( + aa=dict(type="int", value=11, fmt_func=fmt.as_opt_eq_val, fmt_arg="--answer"), + bb=dict(fmt_func=fmt.as_fixed, fmt_arg=["fixed", "args"]), + ), + runner_init_args=dict(), + runner_ctx_args=dict(args_order=['aa', 'bb']), + ), + dict(runner_ctx_run_args=dict(), rc=0, out="", err=""), + dict( + run_info=dict( + cmd=['/mock/bin/testing', '--answer=11', 'fixed', 'args'], + environ_update={'LANGUAGE': 'C', 'LC_ALL': 'C'}, + args_order=('aa', 'bb'), + ), + ), + ), + aa_bb_map=( + dict( + args_bundle=dict( + aa=dict(type="int", value=11, fmt_func=fmt.as_opt_eq_val, fmt_arg="--answer"), + bb=dict(fmt_func=fmt.as_map, fmt_arg={"v1": 111, "v2": 222}), + ), + runner_init_args=dict(), + runner_ctx_args=dict(args_order=['aa', 'bb']), + ), + dict(runner_ctx_run_args=dict(bb="v2"), rc=0, out="", err=""), + dict( + run_info=dict( + cmd=['/mock/bin/testing', '--answer=11', '222'], + environ_update={'LANGUAGE': 'C', 'LC_ALL': 'C'}, + args_order=('aa', 'bb'), + ), + ), + ), + aa_bb_map_default=( + dict( + args_bundle=dict( + aa=dict(type="int", value=11, fmt_func=fmt.as_opt_eq_val, fmt_arg="--answer"), + bb=dict(fmt_func=fmt.as_map, fmt_arg={"v1": 111, "v2": 222}), + ), + runner_init_args=dict(), + runner_ctx_args=dict(args_order=['aa', 'bb']), + ), + dict(runner_ctx_run_args=dict(bb="v123456789"), rc=0, out="", err=""), + dict( + run_info=dict( + cmd=['/mock/bin/testing', '--answer=11'], + environ_update={'LANGUAGE': 'C', 'LC_ALL': 'C'}, + args_order=('aa', 'bb'), + ), + ), + ), ) TC_RUNNER_IDS = sorted(TC_RUNNER.keys()) @@ -301,70 +355,16 @@ def test_runner_context(runner_input, cmd_execution, expected): results = ctx.run(**cmd_execution['runner_ctx_run_args']) _assert_run(runner_input, cmd_execution, expected, ctx, results) + with pytest.raises(exc): + with runner(**runner_input['runner_ctx_args']) as ctx2: + results2 = ctx2.run(**cmd_execution['runner_ctx_run_args']) + _assert_run(runner_input, cmd_execution, expected, ctx2, results2) + else: with runner.context(**runner_input['runner_ctx_args']) as ctx: results = ctx.run(**cmd_execution['runner_ctx_run_args']) _assert_run(runner_input, cmd_execution, expected, ctx, results) - -@pytest.mark.parametrize('runner_input, cmd_execution, expected', - (TC_RUNNER[tc] for tc in TC_RUNNER_IDS), - ids=TC_RUNNER_IDS) -def test_runner_callable(runner_input, cmd_execution, expected): - arg_spec = {} - params = {} - arg_formats = {} - for k, v in runner_input['args_bundle'].items(): - try: - arg_spec[k] = {'type': v['type']} - except KeyError: - pass - try: - params[k] = v['value'] - except KeyError: - pass - try: - arg_formats[k] = v['fmt_func'](v['fmt_arg']) - except KeyError: - pass - - orig_results = tuple(cmd_execution[x] for x in ('rc', 'out', 'err')) - - print("arg_spec={0}\nparams={1}\narg_formats={2}\n".format( - arg_spec, - params, - arg_formats, - )) - - module = MagicMock() - type(module).argument_spec = PropertyMock(return_value=arg_spec) - type(module).params = PropertyMock(return_value=params) - module.get_bin_path.return_value = '/mock/bin/testing' - module.run_command.return_value = orig_results - - runner = CmdRunner( - module=module, - command="testing", - arg_formats=arg_formats, - **runner_input['runner_init_args'] - ) - - def _assert_run_info(actual, expected): - reduced = dict((k, actual[k]) for k in expected.keys()) - assert reduced == expected, "{0}".format(reduced) - - def _assert_run(runner_input, cmd_execution, expected, ctx, results): - _assert_run_info(ctx.run_info, expected['run_info']) - assert results == expected.get('results', orig_results) - - exc = expected.get("exc") - if exc: - with pytest.raises(exc): - with runner(**runner_input['runner_ctx_args']) as ctx: - results = ctx.run(**cmd_execution['runner_ctx_run_args']) - _assert_run(runner_input, cmd_execution, expected, ctx, results) - - else: - with runner(**runner_input['runner_ctx_args']) as ctx: - results = ctx.run(**cmd_execution['runner_ctx_run_args']) - _assert_run(runner_input, cmd_execution, expected, ctx, results) + with runner(**runner_input['runner_ctx_args']) as ctx2: + results2 = ctx2.run(**cmd_execution['runner_ctx_run_args']) + _assert_run(runner_input, cmd_execution, expected, ctx2, results2) From 6a03108609cba48b88b57d2bf43eb238fc13f229 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:58:55 +1300 Subject: [PATCH 0339/2104] rax_scaling_group: fix sanity check (#5563) * rax_scaling_group: fix sanity check * add changelog fragment * added missing call to expanduser() --- .../5563-rax-scaling-group-sanity.yml | 2 ++ plugins/module_utils/rax.py | 18 ++++++++++++++++ plugins/modules/rax_scaling_group.py | 21 ++++++------------- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 8 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 changelogs/fragments/5563-rax-scaling-group-sanity.yml diff --git a/changelogs/fragments/5563-rax-scaling-group-sanity.yml b/changelogs/fragments/5563-rax-scaling-group-sanity.yml new file mode 100644 index 0000000000..310257f293 --- /dev/null +++ b/changelogs/fragments/5563-rax-scaling-group-sanity.yml @@ -0,0 +1,2 @@ +minor_changes: + - rax_scaling_group - refactored out code to the ``rax`` module utils to clear the sanity check (https://github.com/ansible-collections/community.general/pull/5563). diff --git a/plugins/module_utils/rax.py b/plugins/module_utils/rax.py index 2372088033..6331c0d1be 100644 --- a/plugins/module_utils/rax.py +++ b/plugins/module_utils/rax.py @@ -314,3 +314,21 @@ def setup_rax_module(module, rax_module, region_required=True): (region, ','.join(rax_module.regions))) return rax_module + + +def rax_scaling_group_personality_file(module, files): + if not files: + return [] + + results = [] + for rpath, lpath in files.items(): + lpath = os.path.expanduser(lpath) + try: + with open(lpath, 'r') as f: + results.append({ + 'path': rpath, + 'contents': f.read(), + }) + except Exception as e: + module.fail_json(msg='Failed to load %s: %s' % (lpath, str(e))) + return results diff --git a/plugins/modules/rax_scaling_group.py b/plugins/modules/rax_scaling_group.py index ef31cbb031..ed974ef0f9 100644 --- a/plugins/modules/rax_scaling_group.py +++ b/plugins/modules/rax_scaling_group.py @@ -161,8 +161,11 @@ except ImportError: HAS_PYRAX = False from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.rax import (rax_argument_spec, rax_find_image, rax_find_network, - rax_required_together, rax_to_dict, setup_rax_module) +from ansible_collections.community.general.plugins.module_utils.rax import ( + rax_argument_spec, rax_find_image, rax_find_network, + rax_required_together, rax_to_dict, setup_rax_module, + rax_scaling_group_personality_file, +) from ansible.module_utils.six import string_types @@ -223,19 +226,7 @@ def rax_asg(module, cooldown=300, disk_config=None, files=None, flavor=None, del nic['net-id'] # Handle the file contents - personality = [] - if files: - for rpath in files.keys(): - lpath = os.path.expanduser(files[rpath]) - try: - f = open(lpath, 'r') - personality.append({ - 'path': rpath, - 'contents': f.read() - }) - f.close() - except Exception as e: - module.fail_json(msg='Failed to load %s' % lpath) + personality = rax_scaling_group_personality_file(module, files) lbs = [] if loadbalancers: diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 2f6bf480c0..8ca3e163da 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -24,7 +24,6 @@ plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 6499478916..9c1ccbf433 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -19,7 +19,6 @@ plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 6499478916..9c1ccbf433 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -19,7 +19,6 @@ plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index ce92542bd1..edf15c5cfc 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -20,7 +20,6 @@ plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index ce92542bd1..edf15c5cfc 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -20,7 +20,6 @@ plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed -plugins/modules/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path From 5e5af458fb431d742a22b1ba8642e30a75765667 Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Wed, 16 Nov 2022 23:53:46 -0600 Subject: [PATCH 0340/2104] chroot plugin fix inventory_hostname var for remote_addr (#5570) * Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13 * fix changelog fragment --- .../5570-chroot-plugin-fix-default-inventory_hostname.yml | 2 ++ plugins/connection/chroot.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname.yml diff --git a/changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname.yml b/changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname.yml new file mode 100644 index 0000000000..fc0c074f84 --- /dev/null +++ b/changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname.yml @@ -0,0 +1,2 @@ +bugfixes: + - "chroot connection plugin - add ``inventory_hostname`` to vars under ``remote_addr``. This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/pull/5570)." \ No newline at end of file diff --git a/plugins/connection/chroot.py b/plugins/connection/chroot.py index cbbf9612e9..ef6d5566d3 100644 --- a/plugins/connection/chroot.py +++ b/plugins/connection/chroot.py @@ -22,6 +22,7 @@ DOCUMENTATION = ''' - The path of the chroot you want to access. default: inventory_hostname vars: + - name: inventory_hostname - name: ansible_host executable: description: From 0624951e177466912f4bda642b72dd2d9c54c1cd Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:55:00 +1300 Subject: [PATCH 0341/2104] add dependency manager (#5535) * add dependency manager * add plugins/module_utils/deps.py to BOTMETA * ditch usng OrderedDict to keep compatibility with Python 2.6 * Update plugins/module_utils/deps.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 + plugins/module_utils/deps.py | 90 +++++++++++++++++++++++++++++++ plugins/modules/dnsimple_info.py | 16 ++---- plugins/modules/iso_customize.py | 19 +++---- plugins/modules/pagerduty_user.py | 27 ++-------- plugins/modules/pids.py | 15 +++--- plugins/modules/snmp_facts.py | 17 ++---- 7 files changed, 117 insertions(+), 69 deletions(-) create mode 100644 plugins/module_utils/deps.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index c56720cb0d..2fbbf64f65 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -265,6 +265,8 @@ files: maintainers: delineaKrehl tylerezimmerman $module_utils/: labels: module_utils + $module_utils/deps.py: + maintainers: russoz $module_utils/gconftool2.py: labels: gconftool2 maintainers: russoz diff --git a/plugins/module_utils/deps.py b/plugins/module_utils/deps.py new file mode 100644 index 0000000000..bfb94cbc09 --- /dev/null +++ b/plugins/module_utils/deps.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +# (c) 2022, Alexei Znamensky +# Copyright (c) 2022, Ansible Project +# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause) +# SPDX-License-Identifier: BSD-2-Clause + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +import traceback +from contextlib import contextmanager + +from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.basic import missing_required_lib + + +_deps = dict() + + +class _Dependency(object): + _states = ["pending", "failure", "success"] + + def __init__(self, name, reason=None, url=None, msg=None): + self.name = name + self.reason = reason + self.url = url + self.msg = msg + + self.state = 0 + self.trace = None + self.exc = None + + def succeed(self): + self.state = 2 + + def fail(self, exc, trace): + self.state = 1 + self.exc = exc + self.trace = trace + + @property + def message(self): + if self.msg: + return to_native(self.msg) + else: + return missing_required_lib(self.name, reason=self.reason, url=self.url) + + @property + def failed(self): + return self.state == 1 + + def verify(self, module): + if self.failed: + module.fail_json(msg=self.message, exception=self.trace) + + def __str__(self): + return "".format(self.name, self._states[self.state]) + + +@contextmanager +def declare(name, *args, **kwargs): + dep = _Dependency(name, *args, **kwargs) + try: + yield dep + except Exception as e: + dep.fail(e, traceback.format_exc()) + else: + dep.succeed() + finally: + _deps[name] = dep + + +def validate(module, spec=None): + dep_names = sorted(_deps) + + if spec is not None: + if spec.startswith("-"): + spec_split = spec[1:].split(":") + for d in spec_split: + dep_names.remove(d) + else: + spec_split = spec[1:].split(":") + dep_names = [] + for d in spec_split: + _deps[d] # ensure it exists + dep_names.append(d) + + for dep in dep_names: + _deps[dep].verify(module) diff --git a/plugins/modules/dnsimple_info.py b/plugins/modules/dnsimple_info.py index 959bacbbe8..52fd53303f 100644 --- a/plugins/modules/dnsimple_info.py +++ b/plugins/modules/dnsimple_info.py @@ -230,18 +230,11 @@ dnsimple_record_info: type: str ''' -import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.basic import missing_required_lib +from ansible_collections.community.general.plugins.module_utils import deps -try: +with deps.declare("requests"): from requests import Request, Session -except ImportError: - HAS_REQUESTS = False - REQUESTS_IMPORT_ERROR = traceback.format_exc() -else: - HAS_REQUESTS = True - REQUESTS_IMPORT_ERROR = None def build_url(account, key, is_sandbox): @@ -310,10 +303,7 @@ def main(): params['api_key'], params['sandbox']) - if not HAS_REQUESTS: - module.exit_json( - msg=missing_required_lib('requests'), - exception=REQUESTS_IMPORT_ERROR) + deps.validate(module) # At minimum we need account and key if params['account_id'] and params['api_key']: diff --git a/plugins/modules/iso_customize.py b/plugins/modules/iso_customize.py index c3a2ae2651..4f902f47e4 100644 --- a/plugins/modules/iso_customize.py +++ b/plugins/modules/iso_customize.py @@ -97,19 +97,14 @@ dest_iso: ''' import os -import traceback -PYCDLIB_IMP_ERR = None -try: - import pycdlib - HAS_PYCDLIB = True -except ImportError: - PYCDLIB_IMP_ERR = traceback.format_exc() - HAS_PYCDLIB = False - -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible_collections.community.general.plugins.module_utils import deps +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native +with deps.declare("pycdlib"): + import pycdlib + # The upper dir exist, we only add subdirectoy def iso_add_dir(module, opened_iso, iso_type, dir_path): @@ -306,9 +301,7 @@ def main(): required_one_of=[('delete_files', 'add_files'), ], supports_check_mode=True, ) - if not HAS_PYCDLIB: - module.fail_json( - missing_required_lib('pycdlib'), exception=PYCDLIB_IMP_ERR) + deps.validate(module) src_iso = module.params['src_iso'] if not os.path.exists(src_iso): diff --git a/plugins/modules/pagerduty_user.py b/plugins/modules/pagerduty_user.py index 4d8e32248f..e16fe59e76 100644 --- a/plugins/modules/pagerduty_user.py +++ b/plugins/modules/pagerduty_user.py @@ -80,25 +80,12 @@ EXAMPLES = r''' RETURN = r''' # ''' -from ansible.module_utils.basic import AnsibleModule, missing_required_lib -import traceback from os import path +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils import deps -try: - from pdpyras import APISession - HAS_PD_PY = True - PD_IMPORT_ERR = None -except ImportError: - HAS_PD_PY = False - PD_IMPORT_ERR = traceback.format_exc() - -try: - from pdpyras import PDClientError - HAS_PD_CLIENT_ERR = True - PD_CLIENT_ERR_IMPORT_ERR = None -except ImportError: - HAS_PD_CLIENT_ERR = False - PD_CLIENT_ERR_IMPORT_ERR = traceback.format_exc() +with deps.declare("pdpyras", url="https://github.com/PagerDuty/pdpyras"): + from pdpyras import APISession, PDClientError class PagerDutyUser(object): @@ -202,11 +189,7 @@ def main(): supports_check_mode=True, ) - if not HAS_PD_PY: - module.fail_json(msg=missing_required_lib('pdpyras', url='https://github.com/PagerDuty/pdpyras'), exception=PD_IMPORT_ERR) - - if not HAS_PD_CLIENT_ERR: - module.fail_json(msg=missing_required_lib('PDClientError', url='https://github.com/PagerDuty/pdpyras'), exception=PD_CLIENT_ERR_IMPORT_ERR) + deps.validate(module) access_token = module.params['access_token'] pd_user = module.params['pd_user'] diff --git a/plugins/modules/pids.py b/plugins/modules/pids.py index eaaf7f9437..2fe2a6b8ac 100644 --- a/plugins/modules/pids.py +++ b/plugins/modules/pids.py @@ -3,8 +3,8 @@ # Copyright (c) 2019, Saranya Sridharan # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -from __future__ import (absolute_import, division, print_function) +from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' @@ -60,18 +60,15 @@ import re from os.path import basename from ansible.module_utils import six -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils import deps from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.version import LooseVersion -try: +with deps.declare("psutil"): import psutil - HAS_PSUTIL = True -except ImportError: - HAS_PSUTIL = False - class PSAdapterError(Exception): pass @@ -177,8 +174,8 @@ def compare_lower(a, b): class Pids(object): def __init__(self, module): - if not HAS_PSUTIL: - module.fail_json(msg=missing_required_lib('psutil')) + + deps.validate(module) self._ps = PSAdapter.from_package(psutil) diff --git a/plugins/modules/snmp_facts.py b/plugins/modules/snmp_facts.py index 71821faaa8..0242bc6dde 100644 --- a/plugins/modules/snmp_facts.py +++ b/plugins/modules/snmp_facts.py @@ -183,20 +183,14 @@ ansible_interfaces: ''' import binascii -import traceback from collections import defaultdict +from ansible_collections.community.general.plugins.module_utils import deps +from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.common.text.converters import to_text -PYSNMP_IMP_ERR = None -try: +with deps.declare("pysnmp"): from pysnmp.entity.rfc3413.oneliner import cmdgen from pysnmp.proto.rfc1905 import EndOfMibView - HAS_PYSNMP = True -except Exception: - PYSNMP_IMP_ERR = traceback.format_exc() - HAS_PYSNMP = False - -from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils.common.text.converters import to_text class DefineOid(object): @@ -299,8 +293,7 @@ def main(): m_args = module.params - if not HAS_PYSNMP: - module.fail_json(msg=missing_required_lib('pysnmp'), exception=PYSNMP_IMP_ERR) + deps.validate(module) cmdGen = cmdgen.CommandGenerator() transport_opts = dict((k, m_args[k]) for k in ('timeout', 'retries') if m_args[k] is not None) From 8ad43fd77484f85bedc114dbedaee04168d6c8ee Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:55:46 +1300 Subject: [PATCH 0342/2104] jenkins_plugin: fix sanity checks (#5565) * jenkins_plugin: fix sanity checks * update BOTMETA * add changelog fragment * fix copyright * Update plugins/module_utils/jenkins.py Co-authored-by: Felix Fontein * Update plugins/module_utils/jenkins.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 3 + .../fragments/5565-jenkins-plugin-sanity.yml | 2 + plugins/module_utils/jenkins.py | 35 ++++++++ plugins/modules/jenkins_plugin.py | 85 +++++++------------ tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 9 files changed, 71 insertions(+), 59 deletions(-) create mode 100644 changelogs/fragments/5565-jenkins-plugin-sanity.yml create mode 100644 plugins/module_utils/jenkins.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 2fbbf64f65..6aacdc9cad 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -284,6 +284,9 @@ files: $module_utils/ipa.py: labels: ipa maintainers: $team_ipa + $module_utils/jenkins.py: + labels: jenkins + maintainers: russoz $module_utils/manageiq.py: labels: manageiq maintainers: $team_manageiq diff --git a/changelogs/fragments/5565-jenkins-plugin-sanity.yml b/changelogs/fragments/5565-jenkins-plugin-sanity.yml new file mode 100644 index 0000000000..ea72d90615 --- /dev/null +++ b/changelogs/fragments/5565-jenkins-plugin-sanity.yml @@ -0,0 +1,2 @@ +minor_changes: + - jenkins_plugin - refactor code to module util to fix sanity check (https://github.com/ansible-collections/community.general/pull/5565). diff --git a/plugins/module_utils/jenkins.py b/plugins/module_utils/jenkins.py new file mode 100644 index 0000000000..c742b364b7 --- /dev/null +++ b/plugins/module_utils/jenkins.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2022, Alexei Znamensky +# +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +import os +import time + + +def download_updates_file(updates_expiration): + updates_filename = 'jenkins-plugin-cache.json' + updates_dir = os.path.expanduser('~/.ansible/tmp') + updates_file = os.path.join(updates_dir, updates_filename) + download_updates = True + + # Make sure the destination directory exists + if not os.path.isdir(updates_dir): + os.makedirs(updates_dir, 0o700) + + # Check if we need to download new updates file + if os.path.isfile(updates_file): + # Get timestamp when the file was changed last time + ts_file = os.stat(updates_file).st_mtime + ts_now = time.time() + + if ts_now - ts_file < updates_expiration: + download_updates = False + + return updates_file, download_updates diff --git a/plugins/modules/jenkins_plugin.py b/plugins/modules/jenkins_plugin.py index 27261bf815..c4e1b7fb66 100644 --- a/plugins/modules/jenkins_plugin.py +++ b/plugins/modules/jenkins_plugin.py @@ -290,12 +290,6 @@ state: sample: "present" ''' -from ansible.module_utils.basic import AnsibleModule, to_bytes -from ansible.module_utils.six.moves import http_cookiejar as cookiejar -from ansible.module_utils.six.moves.urllib.parse import urlencode -from ansible.module_utils.urls import fetch_url, url_argument_spec -from ansible.module_utils.six import text_type, binary_type -from ansible.module_utils.common.text.converters import to_native import hashlib import io import json @@ -303,6 +297,15 @@ import os import tempfile import time +from ansible.module_utils.basic import AnsibleModule, to_bytes +from ansible.module_utils.six.moves import http_cookiejar as cookiejar +from ansible.module_utils.six.moves.urllib.parse import urlencode +from ansible.module_utils.urls import fetch_url, url_argument_spec +from ansible.module_utils.six import text_type, binary_type +from ansible.module_utils.common.text.converters import to_native + +from ansible_collections.community.general.plugins.module_utils.jenkins import download_updates_file + class FailedInstallingWithPluginManager(Exception): pass @@ -605,21 +608,12 @@ class JenkinsPlugin(object): return urls def _download_updates(self): - updates_filename = 'jenkins-plugin-cache.json' - updates_dir = os.path.expanduser('~/.ansible/tmp') - updates_file = "%s/%s" % (updates_dir, updates_filename) - download_updates = True - - # Check if we need to download new updates file - if os.path.isfile(updates_file): - # Get timestamp when the file was changed last time - ts_file = os.stat(updates_file).st_mtime - ts_now = time.time() - - if ts_now - ts_file < self.params['updates_expiration']: - download_updates = False - - updates_file_orig = updates_file + try: + updates_file, download_updates = download_updates_file(self.params['updates_expiration']) + except OSError as e: + self.module.fail_json( + msg="Cannot create temporal directory.", + details=to_native(e)) # Download the updates file if needed if download_updates: @@ -632,56 +626,39 @@ class JenkinsPlugin(object): msg_exception="Updates download failed.") # Write the updates file - update_fd, updates_file = tempfile.mkstemp() - os.write(update_fd, r.read()) + tmp_update_fd, tmp_updates_file = tempfile.mkstemp() + os.write(tmp_update_fd, r.read()) try: - os.close(update_fd) + os.close(tmp_update_fd) except IOError as e: self.module.fail_json( - msg="Cannot close the tmp updates file %s." % updates_file, + msg="Cannot close the tmp updates file %s." % tmp_updates_file, details=to_native(e)) # Open the updates file try: - f = io.open(updates_file, encoding='utf-8') + f = io.open(tmp_updates_file, encoding='utf-8') + + # Read only the second line + dummy = f.readline() + data = json.loads(f.readline()) except IOError as e: self.module.fail_json( msg="Cannot open temporal updates file.", details=to_native(e)) - - i = 0 - for line in f: - # Read only the second line - if i == 1: - try: - data = json.loads(line) - except Exception as e: - self.module.fail_json( - msg="Cannot load JSON data from the tmp updates file.", - details=to_native(e)) - - break - - i += 1 + except Exception as e: + self.module.fail_json( + msg="Cannot load JSON data from the tmp updates file.", + details=to_native(e)) # Move the updates file to the right place if we could read it if download_updates: - # Make sure the destination directory exists - if not os.path.isdir(updates_dir): - try: - os.makedirs(updates_dir, int('0700', 8)) - except OSError as e: - self.module.fail_json( - msg="Cannot create temporal directory.", - details=to_native(e)) - - self.module.atomic_move(updates_file, updates_file_orig) + self.module.atomic_move(tmp_updates_file, updates_file) # Check if we have the plugin data available - if 'plugins' not in data or self.params['name'] not in data['plugins']: - self.module.fail_json( - msg="Cannot find plugin data in the updates file.") + if not data.get('plugins', {}).get(self.params['name']): + self.module.fail_json(msg="Cannot find plugin data in the updates file.") return data['plugins'][self.params['name']] diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 8ca3e163da..8dd9768f91 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -9,7 +9,6 @@ plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 9c1ccbf433..22b506c3ce 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -4,7 +4,6 @@ plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 9c1ccbf433..22b506c3ce 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -4,7 +4,6 @@ plugins/modules/consul.py validate-modules:undocumented-parameter plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index edf15c5cfc..5b788a517c 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -5,7 +5,6 @@ plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choic plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index edf15c5cfc..5b788a517c 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -5,7 +5,6 @@ plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choic plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter -plugins/modules/jenkins_plugin.py use-argspec-type-path plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions From 52c28494ca903642aa4278afb580321302d119c9 Mon Sep 17 00:00:00 2001 From: David Stuart Date: Thu, 17 Nov 2022 05:56:21 +0000 Subject: [PATCH 0343/2104] Add additional flags to nmap.py (#5566) * Adding extra flag options for NMAP scaning udp_scan, icmp_timestamp and dns_resolve * Update nmap.py * Update plugins/inventory/nmap.py Co-authored-by: Felix Fontein * Updates as per felixfontein suggestions * Updates as per felixfontein suggestions * Update plugins/inventory/nmap.py Co-authored-by: Felix Fontein * Update plugins/inventory/nmap.py Co-authored-by: Felix Fontein * Update nmap.py * Update changelogs/fragments/5566-additional-flags-nmap.yml Co-authored-by: Felix Fontein * Update changelogs/fragments/5566-additional-flags-nmap.yml Co-authored-by: Felix Fontein * Update 5566-additional-flags-nmap.yml * Update nmap.py Co-authored-by: Axis12 <3225945+axistwelve@users.noreply.github.com> Co-authored-by: Felix Fontein --- .../fragments/5566-additional-flags-nmap.yml | 3 ++ plugins/inventory/nmap.py | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 changelogs/fragments/5566-additional-flags-nmap.yml diff --git a/changelogs/fragments/5566-additional-flags-nmap.yml b/changelogs/fragments/5566-additional-flags-nmap.yml new file mode 100644 index 0000000000..d42f3a4695 --- /dev/null +++ b/changelogs/fragments/5566-additional-flags-nmap.yml @@ -0,0 +1,3 @@ +minor_changes: + - nmap inventory plugin - add new options ``udp_scan``, ``icmp_timestamp``, and ``dns_resolve`` for different types of scans (https://github.com/ansible-collections/community.general/pull/5566). + diff --git a/plugins/inventory/nmap.py b/plugins/inventory/nmap.py index 01a5fa04ba..f0fa50e3b3 100644 --- a/plugins/inventory/nmap.py +++ b/plugins/inventory/nmap.py @@ -46,6 +46,25 @@ DOCUMENTATION = ''' description: use IPv6 type addresses type: boolean default: true + udp_scan: + description: + - Scan via UDP. + - Depending on your system you might need I(sudo=true) for this to work. + type: boolean + default: false + version_added: 6.1.0 + icmp_timestamp: + description: + - Scan via ICMP Timestamp (C(-PP)). + - Depending on your system you might need I(sudo=true) for this to work. + type: boolean + default: false + version_added: 6.1.0 + dns_resolve: + description: Whether to always (C(true)) or never (C(false)) do DNS resolution. + type: boolean + default: false + version_added: 6.1.0 notes: - At least one of ipv4 or ipv6 is required to be True, both can be True, but they cannot both be False. - 'TODO: add OS fingerprinting' @@ -166,6 +185,15 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): cmd.append('--exclude') cmd.append(','.join(self._options['exclude'])) + if self._options['dns_resolve']: + cmd.append('-n') + + if self._options['udp_scan']: + cmd.append('-sU') + + if self._options['icmp_timestamp']: + cmd.append('-PP') + cmd.append(self._options['address']) try: # execute From 83ff4429e887c89edfb7f6c494d2a755fd75a3fd Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 17 Nov 2022 19:19:30 +1300 Subject: [PATCH 0344/2104] scaleway_organization_info: sanity checks (#5571) * scaleway_organization_info: fix sanity checks * remove lines from ignore files * Update plugins/modules/scaleway_organization_info.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/modules/scaleway_organization_info.py | 3 ++- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 6 files changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/modules/scaleway_organization_info.py b/plugins/modules/scaleway_organization_info.py index 6e1f8df388..717c47db19 100644 --- a/plugins/modules/scaleway_organization_info.py +++ b/plugins/modules/scaleway_organization_info.py @@ -44,7 +44,8 @@ RETURN = r''' scaleway_organization_info: description: Response from Scaleway API returned: success - type: complex + type: list + elements: dict sample: "scaleway_organization_info": [ { diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 8dd9768f91..86d7f6a9e2 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -24,7 +24,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 22b506c3ce..45772005a3 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -19,7 +19,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 22b506c3ce..45772005a3 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -19,7 +19,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 5b788a517c..49c2eb1bb2 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -20,7 +20,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 5b788a517c..49c2eb1bb2 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -20,7 +20,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/scaleway_organization_info.py validate-modules:return-syntax-error plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' From c7481c5c96536a6bb8a0c32639706bada10346bb Mon Sep 17 00:00:00 2001 From: Guillaume MARTINEZ Date: Fri, 18 Nov 2022 23:49:25 +0100 Subject: [PATCH 0345/2104] [GitLab] Add modules to manager project badges (#5534) * [GitLab] Add modules to manager project badges Signed-off-by: Lunik * first review Signed-off-by: Lunik * Update plugins/modules/gitlab_project_badge.py Co-authored-by: Felix Fontein Signed-off-by: Lunik Co-authored-by: Felix Fontein --- plugins/modules/gitlab_project_badge.py | 216 ++++++++++++++++++ .../targets/gitlab_project_badge/aliases | 6 + .../gitlab_project_badge/defaults/main.yml | 11 + .../gitlab_project_badge/tasks/main.yml | 214 +++++++++++++++++ 4 files changed, 447 insertions(+) create mode 100644 plugins/modules/gitlab_project_badge.py create mode 100644 tests/integration/targets/gitlab_project_badge/aliases create mode 100644 tests/integration/targets/gitlab_project_badge/defaults/main.yml create mode 100644 tests/integration/targets/gitlab_project_badge/tasks/main.yml diff --git a/plugins/modules/gitlab_project_badge.py b/plugins/modules/gitlab_project_badge.py new file mode 100644 index 0000000000..5b1a8d3f1c --- /dev/null +++ b/plugins/modules/gitlab_project_badge.py @@ -0,0 +1,216 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022, Guillaume MARTINEZ (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = r''' +--- +module: gitlab_project_badge +short_description: Manage project badges on GitLab Server +version_added: 6.1.0 +description: + - This module allows to add and remove badges to/from a project. +author: Guillaume MARTINEZ (@Lunik) +requirements: + - C(owner) or C(maintainer) rights to project on the GitLab server +extends_documentation_fragment: + - community.general.auth_basic + - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + +options: + project: + description: + - The name (or full path) of the GitLab project the badge is added to/removed from. + required: true + type: str + + state: + description: + - State of the badge in the project. + - On C(present), it adds a badge to a GitLab project. + - On C(absent), it removes a badge from a GitLab project. + choices: ['present', 'absent'] + default: 'present' + type: str + + link_url: + description: + - The URL associated with the badge. + required: true + type: str + + image_url: + description: + - The image URL of the badge. + - A badge is identified by this URL. + required: true + type: str +''' + +EXAMPLES = r''' +- name: Add a badge to a GitLab Project + community.general.gitlab_project_badge: + api_url: 'https://example.gitlab.com' + api_token: 'Your-Private-Token' + project: projectname + state: present + link_url: 'https://example.gitlab.com/%{project_path}' + image_url: 'https://example.gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg' + +- name: Remove a badge from a GitLab Project + community.general.gitlab_project_badge: + api_url: 'https://example.gitlab.com' + api_token: 'Your-Private-Token' + project: projectname + state: absent + link_url: 'https://example.gitlab.com/%{project_path}' + image_url: 'https://example.gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg' +''' + +RETURN = ''' +badge: + description: The badge information. + returned: when I(state=present) + type: dict + sample: + id: 1 + link_url: 'http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}' + image_url: 'https://shields.io/my/badge' + rendered_link_url: 'http://example.com/ci_status.svg?project=example-org/example-project&ref=master' + rendered_image_url: 'https://shields.io/my/badge' + kind: project +''' + +from ansible.module_utils.api import basic_auth_argument_spec +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.general.plugins.module_utils.gitlab import ( + auth_argument_spec, gitlab_authentication, find_project, ensure_gitlab_package +) + + +def present_strategy(module, gl, project, wished_badge): + changed = False + + existing_badge = None + for badge in project.badges.list(iterator=True): + if badge.image_url == wished_badge["image_url"]: + existing_badge = badge + break + + if not existing_badge: + changed = True + if module.check_mode: + return changed, {"status": "A project badge would be created."} + + badge = project.badges.create(wished_badge) + return changed, badge.attributes + + if existing_badge.link_url != wished_badge["link_url"]: + changed = True + existing_badge.link_url = wished_badge["link_url"] + + if changed: + if module.check_mode: + return changed, {"status": "Project badge attributes would be changed."} + + existing_badge.save() + + return changed, existing_badge.attributes + + +def absent_strategy(module, gl, project, wished_badge): + changed = False + + existing_badge = None + for badge in project.badges.list(iterator=True): + if badge.image_url == wished_badge["image_url"]: + existing_badge = badge + break + + if not existing_badge: + return changed, None + + changed = True + if module.check_mode: + return changed, {"status": "Project badge would be destroyed."} + + existing_badge.delete() + + return changed, None + + +state_strategy = { + "present": present_strategy, + "absent": absent_strategy +} + + +def core(module): + ensure_gitlab_package(module) + + gitlab_project = module.params['project'] + state = module.params['state'] + + gl = gitlab_authentication(module) + + project = find_project(gl, gitlab_project) + # project doesn't exist + if not project: + module.fail_json(msg="project '%s' not found." % gitlab_project) + + wished_badge = { + "link_url": module.params["link_url"], + "image_url": module.params["image_url"], + } + + changed, summary = state_strategy[state](module=module, gl=gl, project=project, wished_badge=wished_badge) + + module.exit_json(changed=changed, badge=summary) + + +def main(): + argument_spec = basic_auth_argument_spec() + argument_spec.update(auth_argument_spec()) + argument_spec.update(dict( + project=dict(type='str', required=True), + state=dict(type='str', default='present', choices=['present', 'absent']), + link_url=dict(type='str', required=True), + image_url=dict(type='str', required=True), + )) + + module = AnsibleModule( + argument_spec=argument_spec, + mutually_exclusive=[ + ['api_username', 'api_token'], + ['api_username', 'api_oauth_token'], + ['api_username', 'api_job_token'], + ['api_token', 'api_oauth_token'], + ['api_token', 'api_job_token'], + ], + required_together=[ + ['api_username', 'api_password'], + ], + required_one_of=[ + ['api_username', 'api_token', 'api_oauth_token', 'api_job_token'], + ], + supports_check_mode=True, + ) + + core(module) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/gitlab_project_badge/aliases b/tests/integration/targets/gitlab_project_badge/aliases new file mode 100644 index 0000000000..9f72f37111 --- /dev/null +++ b/tests/integration/targets/gitlab_project_badge/aliases @@ -0,0 +1,6 @@ +# Copyright (c) 2022, Guillaume MARTINEZ (lunik@tiwabbit.fr) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +gitlab/ci +disabled diff --git a/tests/integration/targets/gitlab_project_badge/defaults/main.yml b/tests/integration/targets/gitlab_project_badge/defaults/main.yml new file mode 100644 index 0000000000..bf84a4751a --- /dev/null +++ b/tests/integration/targets/gitlab_project_badge/defaults/main.yml @@ -0,0 +1,11 @@ +--- +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +gitlab_api_token: glpat-XXXXXXXXXXXXXXXXXXXX +gitlab_api_url: https://gitlab.com +gitlab_project_name: ansible_test_project +gitlab_badge_link_url: 'https://example.gitlab.com/%{project_path}' +updated_gitlab_badge_link_url: 'https://test.gitlab.com/%{project_path}' +gitlab_badge_image_url: 'https://example.gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg' \ No newline at end of file diff --git a/tests/integration/targets/gitlab_project_badge/tasks/main.yml b/tests/integration/targets/gitlab_project_badge/tasks/main.yml new file mode 100644 index 0000000000..fa8a806efe --- /dev/null +++ b/tests/integration/targets/gitlab_project_badge/tasks/main.yml @@ -0,0 +1,214 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) 2022, Guillaume MARTINEZ +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Install required libs + pip: + name: python-gitlab + state: present + +- name: Create {{ gitlab_project_name }} + gitlab_project: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + name: "{{ gitlab_project_name }}" + initialize_with_readme: True + state: present + +- name: Create Badge (check) + check_mode: yes + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: present + link_url: "{{ gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_create_check_task + +- ansible.builtin.debug: + var: gitlab_badge_create_check_task + +- name: Check module call result + assert: + that: + - gitlab_badge_create_check_task.changed + - not gitlab_badge_create_check_task.failed + +- name: Create Badge + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: present + link_url: "{{ gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_create_task + +- ansible.builtin.debug: + var: gitlab_badge_create_task + +- name: Check module call result + assert: + that: + - gitlab_badge_create_task.changed + - not gitlab_badge_create_task.failed + +- name: Create Badge (confirmation) + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: present + link_url: "{{ gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_create_confirmation_task + +- ansible.builtin.debug: + var: gitlab_badge_create_confirmation_task + +- name: Check module call result + assert: + that: + - not gitlab_badge_create_confirmation_task.changed + - not gitlab_badge_create_confirmation_task.failed + +- name: Update Badge (check) + check_mode: yes + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: present + link_url: "{{ updated_gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_update_check_task + +- ansible.builtin.debug: + var: gitlab_badge_update_check_task + +- name: Check module call result + assert: + that: + - gitlab_badge_update_check_task.changed + - not gitlab_badge_update_check_task.failed + +- name: Update Badge + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: present + link_url: "{{ updated_gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_update_task + +- ansible.builtin.debug: + var: gitlab_badge_update_task + +- name: Check module call result + assert: + that: + - gitlab_badge_update_task.changed + - not gitlab_badge_update_task.failed + +- name: Update Badge (confirmation) + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: present + link_url: "{{ updated_gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_update_confirmation_task + +- ansible.builtin.debug: + var: gitlab_badge_update_confirmation_task + +- name: Check module call result + assert: + that: + - not gitlab_badge_update_confirmation_task.changed + - not gitlab_badge_update_confirmation_task.failed + +- name: Delete Badge (check) + check_mode: yes + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: absent + link_url: "{{ updated_gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_delete_check_task + +- ansible.builtin.debug: + var: gitlab_badge_delete_check_task + +- name: Check module call result + assert: + that: + - gitlab_badge_delete_check_task.changed + - not gitlab_badge_delete_check_task.failed + +- name: Delete Badge + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: absent + link_url: "{{ updated_gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_delete_task + +- ansible.builtin.debug: + var: gitlab_badge_delete_task + +- name: Check module call result + assert: + that: + - gitlab_badge_delete_task.changed + - not gitlab_badge_delete_task.failed + +- name: Delete Badge (confirmation) + gitlab_project_badge: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + project: "{{ gitlab_project_name }}" + state: absent + link_url: "{{ updated_gitlab_badge_link_url }}" + image_url: "{{ gitlab_badge_image_url }}" + register: gitlab_badge_delete_confirmation_task + +- ansible.builtin.debug: + var: gitlab_badge_delete_confirmation_task + +- name: Check module call result + assert: + that: + - not gitlab_badge_delete_confirmation_task.changed + - not gitlab_badge_delete_confirmation_task.failed + +- name: Clean up {{ gitlab_project_name }} + gitlab_project: + api_url: "{{ gitlab_api_url }}" + validate_certs: False + api_token: "{{ gitlab_api_token }}" + name: "{{ gitlab_project_name }}" + state: absent From f2a420ead5d14055b500215689b4b517c031f67e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 22 Nov 2022 12:50:21 +0100 Subject: [PATCH 0346/2104] Another try: fix languages to check. (#5587) --- .github/workflows/codeql-analysis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2d93f5efef..4b11b4fd9e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -28,9 +28,8 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 - # Override language selection by uncommenting this and choosing your languages - # with: - # languages: go, javascript, csharp, python, cpp, java + with: + languages: python - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 3bf3d6bff44934a5dcd654180cc95a74552f3ae4 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 22 Nov 2022 12:51:25 +0100 Subject: [PATCH 0347/2104] Allow to trigger manual code scanning run. --- .github/workflows/codeql-analysis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4b11b4fd9e..620de35af5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,6 +8,7 @@ name: "Code scanning - action" on: schedule: - cron: '26 19 * * 1' + workflow_dispatch: permissions: contents: read From 5c1c8152ec1c392e11fe1242dbbb24fe8ea3fdb8 Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Wed, 23 Nov 2022 01:46:39 -0500 Subject: [PATCH 0348/2104] Redfish: Expanded SimpleUpdate command to allow for users to monitor the progress of an update and perform follow-up operations (#5580) * Redfish: Expanded SimpleUpdate command to allow for users to monitor the progress of an update and perform follow-up operations * Update changelogs/fragments/3910-redfish-add-operation-apply-time-to-simple-update.yml Co-authored-by: Felix Fontein * Update plugins/modules/redfish_command.py Co-authored-by: Felix Fontein * Update changelogs/fragments/4276-redfish-command-updates-for-full-simple-update-workflow.yml Co-authored-by: Felix Fontein * Updated based on feedback and CI results * Update plugins/modules/redfish_command.py Co-authored-by: Felix Fontein * Update plugins/modules/redfish_command.py Co-authored-by: Felix Fontein * Update plugins/modules/redfish_info.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...-operation-apply-time-to-simple-update.yml | 2 + ...pdates-for-full-simple-update-workflow.yml | 4 + plugins/module_utils/redfish_utils.py | 136 +++++++++++++++++- plugins/modules/redfish_command.py | 58 +++++++- plugins/modules/redfish_info.py | 26 +++- 5 files changed, 218 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/3910-redfish-add-operation-apply-time-to-simple-update.yml create mode 100644 changelogs/fragments/4276-redfish-command-updates-for-full-simple-update-workflow.yml diff --git a/changelogs/fragments/3910-redfish-add-operation-apply-time-to-simple-update.yml b/changelogs/fragments/3910-redfish-add-operation-apply-time-to-simple-update.yml new file mode 100644 index 0000000000..d52438ca45 --- /dev/null +++ b/changelogs/fragments/3910-redfish-add-operation-apply-time-to-simple-update.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_command - add ``update_apply_time`` to ``SimpleUpdate`` command (https://github.com/ansible-collections/community.general/issues/3910). diff --git a/changelogs/fragments/4276-redfish-command-updates-for-full-simple-update-workflow.yml b/changelogs/fragments/4276-redfish-command-updates-for-full-simple-update-workflow.yml new file mode 100644 index 0000000000..2f5da1467b --- /dev/null +++ b/changelogs/fragments/4276-redfish-command-updates-for-full-simple-update-workflow.yml @@ -0,0 +1,4 @@ +minor_changes: + - redfish_command - add ``update_status`` to output of ``SimpleUpdate`` command to allow a user monitor the update in progress (https://github.com/ansible-collections/community.general/issues/4276). + - redfish_info - add ``GetUpdateStatus`` command to check the progress of a previous update request (https://github.com/ansible-collections/community.general/issues/4276). + - redfish_command - add ``PerformRequestedOperations`` command to perform any operations necessary to continue the update flow (https://github.com/ansible-collections/community.general/issues/4276). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 3bd3d73676..a86baa1066 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -143,7 +143,7 @@ class RedfishUtils(object): except Exception as e: return {'ret': False, 'msg': "Failed GET request to '%s': '%s'" % (uri, to_text(e))} - return {'ret': True, 'data': data, 'headers': headers} + return {'ret': True, 'data': data, 'headers': headers, 'resp': resp} def post_request(self, uri, pyld): req_headers = dict(POST_HEADERS) @@ -155,6 +155,11 @@ class RedfishUtils(object): force_basic_auth=basic_auth, validate_certs=False, follow_redirects='all', use_proxy=True, timeout=self.timeout) + try: + data = json.loads(to_native(resp.read())) + except Exception as e: + # No response data; this is okay in many cases + data = None headers = dict((k.lower(), v) for (k, v) in resp.info().items()) except HTTPError as e: msg = self._get_extended_message(e) @@ -169,7 +174,7 @@ class RedfishUtils(object): except Exception as e: return {'ret': False, 'msg': "Failed POST request to '%s': '%s'" % (uri, to_text(e))} - return {'ret': True, 'headers': headers, 'resp': resp} + return {'ret': True, 'data': data, 'headers': headers, 'resp': resp} def patch_request(self, uri, pyld, check_pyld=False): req_headers = dict(PATCH_HEADERS) @@ -1384,11 +1389,82 @@ class RedfishUtils(object): else: return self._software_inventory(self.software_uri) + def _operation_results(self, response, data, handle=None): + """ + Builds the results for an operation from task, job, or action response. + + :param response: HTTP response object + :param data: HTTP response data + :param handle: The task or job handle that was last used + :return: dict containing operation results + """ + + operation_results = {'status': None, 'messages': [], 'handle': None, 'ret': True, + 'resets_requested': []} + + if response.status == 204: + # No content; successful, but nothing to return + # Use the Redfish "Completed" enum from TaskState for the operation status + operation_results['status'] = 'Completed' + else: + # Parse the response body for details + + # Determine the next handle, if any + operation_results['handle'] = handle + if response.status == 202: + # Task generated; get the task monitor URI + operation_results['handle'] = response.getheader('Location', handle) + + # Pull out the status and messages based on the body format + if data is not None: + response_type = data.get('@odata.type', '') + if response_type.startswith('#Task.') or response_type.startswith('#Job.'): + # Task and Job have similar enough structures to treat the same + operation_results['status'] = data.get('TaskState', data.get('JobState')) + operation_results['messages'] = data.get('Messages', []) + else: + # Error response body, which is a bit of a misnomer since it's used in successful action responses + operation_results['status'] = 'Completed' + if response.status >= 400: + operation_results['status'] = 'Exception' + operation_results['messages'] = data.get('error', {}).get('@Message.ExtendedInfo', []) + else: + # No response body (or malformed); build based on status code + operation_results['status'] = 'Completed' + if response.status == 202: + operation_results['status'] = 'New' + elif response.status >= 400: + operation_results['status'] = 'Exception' + + # Clear out the handle if the operation is complete + if operation_results['status'] in ['Completed', 'Cancelled', 'Exception', 'Killed']: + operation_results['handle'] = None + + # Scan the messages to see if next steps are needed + for message in operation_results['messages']: + message_id = message['MessageId'] + + if message_id.startswith('Update.1.') and message_id.endswith('.OperationTransitionedToJob'): + # Operation rerouted to a job; update the status and handle + operation_results['status'] = 'New' + operation_results['handle'] = message['MessageArgs'][0] + operation_results['resets_requested'] = [] + # No need to process other messages in this case + break + + if message_id.startswith('Base.1.') and message_id.endswith('.ResetRequired'): + # A reset to some device is needed to continue the update + reset = {'uri': message['MessageArgs'][0], 'type': message['MessageArgs'][1]} + operation_results['resets_requested'].append(reset) + + return operation_results + def simple_update(self, update_opts): image_uri = update_opts.get('update_image_uri') protocol = update_opts.get('update_protocol') targets = update_opts.get('update_targets') creds = update_opts.get('update_creds') + apply_time = update_opts.get('update_apply_time') if not image_uri: return {'ret': False, 'msg': @@ -1439,11 +1515,65 @@ class RedfishUtils(object): payload["Username"] = creds.get('username') if creds.get('password'): payload["Password"] = creds.get('password') + if apply_time: + payload["@Redfish.OperationApplyTime"] = apply_time response = self.post_request(self.root_uri + update_uri, payload) if response['ret'] is False: return response return {'ret': True, 'changed': True, - 'msg': "SimpleUpdate requested"} + 'msg': "SimpleUpdate requested", + 'update_status': self._operation_results(response['resp'], response['data'])} + + def get_update_status(self, update_handle): + """ + Gets the status of an update operation. + + :param handle: The task or job handle tracking the update + :return: dict containing the response of the update status + """ + + if not update_handle: + return {'ret': False, 'msg': 'Must provide a handle tracking the update.'} + + # Get the task or job tracking the update + response = self.get_request(self.root_uri + update_handle) + if response['ret'] is False: + return response + + # Inspect the response to build the update status + return self._operation_results(response['resp'], response['data'], update_handle) + + def perform_requested_update_operations(self, update_handle): + """ + Performs requested operations to allow the update to continue. + + :param handle: The task or job handle tracking the update + :return: dict containing the result of the operations + """ + + # Get the current update status + update_status = self.get_update_status(update_handle) + if update_status['ret'] is False: + return update_status + + changed = False + + # Perform any requested updates + for reset in update_status['resets_requested']: + resp = self.post_request(self.root_uri + reset['uri'], {'ResetType': reset['type']}) + if resp['ret'] is False: + # Override the 'changed' indicator since other resets may have + # been successful + resp['changed'] = changed + return resp + changed = True + + msg = 'No operations required for the update' + if changed: + # Will need to consider finetuning this message if the scope of the + # requested operations grow over time + msg = 'One or more components reset to continue the update' + return {'ret': True, 'changed': changed, 'msg': msg} def get_bios_attributes(self, systems_uri): result = {} diff --git a/plugins/modules/redfish_command.py b/plugins/modules/redfish_command.py index 43443cf38e..9d5640996a 100644 --- a/plugins/modules/redfish_command.py +++ b/plugins/modules/redfish_command.py @@ -161,6 +161,24 @@ options: description: - Password for retrieving the update image. type: str + update_apply_time: + required: false + description: + - Time when to apply the update. + type: str + choices: + - Immediate + - OnReset + - AtMaintenanceWindowStart + - InMaintenanceWindowOnReset + - OnStartUpdateRequest + version_added: '6.1.0' + update_handle: + required: false + description: + - Handle to check the status of an update in progress. + type: str + version_added: '6.1.0' virtual_media: required: false description: @@ -508,6 +526,15 @@ EXAMPLES = ''' username: operator password: supersecretpwd + - name: Perform requested operations to continue the update + community.general.redfish_command: + category: Update + command: PerformRequestedOperations + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + update_handle: /redfish/v1/TaskService/TaskMonitors/735 + - name: Insert Virtual Media community.general.redfish_command: category: Systems @@ -610,6 +637,20 @@ msg: returned: always type: str sample: "Action was successful" +return_values: + description: Dictionary containing command-specific response data from the action. + returned: on success + type: dict + version_added: 6.1.0 + sample: { + "update_status": { + "handle": "/redfish/v1/TaskService/TaskMonitors/735", + "messages": [], + "resets_requested": [], + "ret": true, + "status": "New" + } + } ''' from ansible.module_utils.basic import AnsibleModule @@ -630,12 +671,13 @@ CATEGORY_COMMANDS_ALL = { "Manager": ["GracefulRestart", "ClearLogs", "VirtualMediaInsert", "VirtualMediaEject", "PowerOn", "PowerForceOff", "PowerForceRestart", "PowerGracefulRestart", "PowerGracefulShutdown", "PowerReboot"], - "Update": ["SimpleUpdate"] + "Update": ["SimpleUpdate", "PerformRequestedOperations"], } def main(): result = {} + return_values = {} module = AnsibleModule( argument_spec=dict( category=dict(required=True), @@ -667,6 +709,9 @@ def main(): password=dict(no_log=True) ) ), + update_apply_time=dict(choices=['Immediate', 'OnReset', 'AtMaintenanceWindowStart', + 'InMaintenanceWindowOnReset', 'OnStartUpdateRequest']), + update_handle=dict(), virtual_media=dict( type='dict', options=dict( @@ -721,7 +766,9 @@ def main(): 'update_image_uri': module.params['update_image_uri'], 'update_protocol': module.params['update_protocol'], 'update_targets': module.params['update_targets'], - 'update_creds': module.params['update_creds'] + 'update_creds': module.params['update_creds'], + 'update_apply_time': module.params['update_apply_time'], + 'update_handle': module.params['update_handle'], } # Boot override options @@ -859,6 +906,10 @@ def main(): for command in command_list: if command == "SimpleUpdate": result = rf_utils.simple_update(update_opts) + if 'update_status' in result: + return_values['update_status'] = result['update_status'] + elif command == "PerformRequestedOperations": + result = rf_utils.perform_requested_update_operations(update_opts['update_handle']) # Return data back or fail with proper message if result['ret'] is True: @@ -866,7 +917,8 @@ def main(): changed = result.get('changed', True) session = result.get('session', dict()) module.exit_json(changed=changed, session=session, - msg='Action was successful') + msg='Action was successful', + return_values=return_values) else: module.fail_json(msg=to_native(result['msg'])) diff --git a/plugins/modules/redfish_info.py b/plugins/modules/redfish_info.py index fd81695368..e6df4813ad 100644 --- a/plugins/modules/redfish_info.py +++ b/plugins/modules/redfish_info.py @@ -58,6 +58,12 @@ options: - Timeout in seconds for HTTP requests to OOB controller. default: 10 type: int + update_handle: + required: false + description: + - Handle to check the status of an update in progress. + type: str + version_added: '6.1.0' author: "Jose Delarosa (@jose-delarosa)" ''' @@ -247,6 +253,15 @@ EXAMPLES = ''' username: "{{ username }}" password: "{{ password }}" + - name: Get the status of an update operation + community.general.redfish_info: + category: Update + command: GetUpdateStatus + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + update_handle: /redfish/v1/TaskService/TaskMonitors/735 + - name: Get Manager Services community.general.redfish_info: category: Manager @@ -324,7 +339,8 @@ CATEGORY_COMMANDS_ALL = { "GetChassisThermals", "GetChassisInventory", "GetHealthReport"], "Accounts": ["ListUsers"], "Sessions": ["GetSessions"], - "Update": ["GetFirmwareInventory", "GetFirmwareUpdateCapabilities", "GetSoftwareInventory"], + "Update": ["GetFirmwareInventory", "GetFirmwareUpdateCapabilities", "GetSoftwareInventory", + "GetUpdateStatus"], "Manager": ["GetManagerNicInventory", "GetVirtualMedia", "GetLogs", "GetNetworkProtocols", "GetHealthReport", "GetHostInterfaces", "GetManagerInventory"], } @@ -350,7 +366,8 @@ def main(): username=dict(), password=dict(no_log=True), auth_token=dict(no_log=True), - timeout=dict(type='int', default=10) + timeout=dict(type='int', default=10), + update_handle=dict(), ), required_together=[ ('username', 'password'), @@ -372,6 +389,9 @@ def main(): # timeout timeout = module.params['timeout'] + # update handle + update_handle = module.params['update_handle'] + # Build root URI root_uri = "https://" + module.params['baseuri'] rf_utils = RedfishUtils(creds, root_uri, timeout, module) @@ -482,6 +502,8 @@ def main(): result["software"] = rf_utils.get_software_inventory() elif command == "GetFirmwareUpdateCapabilities": result["firmware_update_capabilities"] = rf_utils.get_firmware_update_capabilities() + elif command == "GetUpdateStatus": + result["update_status"] = rf_utils.get_update_status(update_handle) elif category == "Sessions": # execute only if we find SessionService resources From 79929830c401b5f127d95be71e4b81edf0f61986 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 24 Nov 2022 06:43:58 +1300 Subject: [PATCH 0349/2104] udm_user: sanity (#5559) * fix parameter email * fix parameter groups * fix parameters home_telephone_number, mail_alternative_address, mobile_telephone_number, pager_telephonenumber * fix parameter phone * fix parameter samba_privileges * fix parameter samba_user_workstations * fix parameter secretary * fix parameter serviceprovider * remove lines from ignore files * add changelog fragment --- changelogs/fragments/5559-udm-user-sanity.yml | 2 ++ plugins/modules/udm_user.py | 32 ++++++++++++++++--- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 7 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5559-udm-user-sanity.yml diff --git a/changelogs/fragments/5559-udm-user-sanity.yml b/changelogs/fragments/5559-udm-user-sanity.yml new file mode 100644 index 0000000000..1501591f81 --- /dev/null +++ b/changelogs/fragments/5559-udm-user-sanity.yml @@ -0,0 +1,2 @@ +minor_changes: + - udm_user - add ``elements`` attribute when missing in ``list`` parameters (https://github.com/ansible-collections/community.general/pull/5559). diff --git a/plugins/modules/udm_user.py b/plugins/modules/udm_user.py index d5b26fbb28..96bbdfbc10 100644 --- a/plugins/modules/udm_user.py +++ b/plugins/modules/udm_user.py @@ -78,6 +78,7 @@ options: description: - A list of e-mail addresses. type: list + elements: str employee_number: description: - Employee number @@ -99,6 +100,7 @@ options: LDAP filter for each group as $GROUP: C((&(objectClass=posixGroup)(cn=$GROUP)))." type: list + elements: str home_share: description: - "Home NFS share. Must be a LDAP DN, e.g. @@ -116,6 +118,7 @@ options: - List of private telephone numbers. aliases: [ homeTelephoneNumber ] type: list + elements: str homedrive: description: - Windows home drive, e.g. C("H:"). @@ -126,6 +129,7 @@ options: - List of alternative e-mail addresses. aliases: [ mailAlternativeAddress ] type: list + elements: str mail_home_server: description: - FQDN of mail server @@ -142,6 +146,7 @@ options: - Mobile phone number aliases: [ mobileTelephoneNumber ] type: list + elements: str organisation: description: - Organisation @@ -165,10 +170,12 @@ options: - List of pager telephone numbers. aliases: [ pagerTelephonenumber ] type: list + elements: str phone: description: - List of telephone numbers. type: list + elements: str default: [] postcode: description: @@ -201,12 +208,14 @@ options: join." aliases: [ sambaPrivileges ] type: list + elements: str default: [] samba_user_workstations: description: - Allow the authentication only on this Microsoft Windows host. aliases: [ sambaUserWorkstations ] type: list + elements: str default: [] sambahome: description: @@ -221,11 +230,13 @@ options: description: - A list of superiors as LDAP DNs. type: list + elements: str serviceprovider: default: [''] description: - Enable user for the following service providers. type: list + elements: str shell: default: '/bin/bash' description: @@ -333,7 +344,8 @@ def main(): display_name=dict(type='str', aliases=['displayName']), email=dict(default=[''], - type='list'), + type='list', + elements='str'), employee_number=dict(type='str', aliases=['employeeNumber']), employee_type=dict(type='str', @@ -341,18 +353,21 @@ def main(): firstname=dict(type='str'), gecos=dict(type='str'), groups=dict(default=[], - type='list'), + type='list', + elements='str'), home_share=dict(type='str', aliases=['homeShare']), home_share_path=dict(type='str', aliases=['homeSharePath']), home_telephone_number=dict(default=[], type='list', + elements='str', aliases=['homeTelephoneNumber']), homedrive=dict(type='str'), lastname=dict(type='str'), mail_alternative_address=dict(default=[], type='list', + elements='str', aliases=['mailAlternativeAddress']), mail_home_server=dict(type='str', aliases=['mailHomeServer']), @@ -360,6 +375,7 @@ def main(): aliases=['mailPrimaryAddress']), mobile_telephone_number=dict(default=[], type='list', + elements='str', aliases=['mobileTelephoneNumber']), organisation=dict(type='str', aliases=['organization']), @@ -371,11 +387,13 @@ def main(): aliases=['override_pw_length']), pager_telephonenumber=dict(default=[], type='list', + elements='str', aliases=['pagerTelephonenumber']), password=dict(type='str', no_log=True), phone=dict(default=[], - type='list'), + type='list', + elements='str'), postcode=dict(type='str'), primary_group=dict(type='str', aliases=['primaryGroup']), @@ -387,16 +405,20 @@ def main(): aliases=['roomNumber']), samba_privileges=dict(default=[], type='list', + elements='str', aliases=['sambaPrivileges']), samba_user_workstations=dict(default=[], type='list', + elements='str', aliases=['sambaUserWorkstations']), sambahome=dict(type='str'), scriptpath=dict(type='str'), secretary=dict(default=[], - type='list'), + type='list', + elements='str'), serviceprovider=dict(default=[''], - type='list'), + type='list', + elements='str'), shell=dict(default='/bin/bash', type='str'), street=dict(type='str'), diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 86d7f6a9e2..1b89dae547 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -26,7 +26,6 @@ plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 45772005a3..29e8927103 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -21,6 +21,5 @@ plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 45772005a3..29e8927103 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -21,6 +21,5 @@ plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 49c2eb1bb2..9c667f3d7b 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -23,6 +23,5 @@ plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 49c2eb1bb2..9c667f3d7b 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -23,6 +23,5 @@ plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' -plugins/modules/udm_user.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path From 11e1423f60e6cdad13de0da1707e57688ebe82e8 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 23 Nov 2022 19:34:48 +0100 Subject: [PATCH 0350/2104] Temporarily disable copr tests. (#5594) --- tests/integration/targets/copr/aliases | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/targets/copr/aliases b/tests/integration/targets/copr/aliases index ed3c1af00d..c9fc0e0a2f 100644 --- a/tests/integration/targets/copr/aliases +++ b/tests/integration/targets/copr/aliases @@ -7,3 +7,5 @@ needs/root skip/macos skip/osx skip/freebsd + +disabled # FIXME tests are currently failing From 911769d2f3478e67daad411a1b87f1803bbbe143 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 26 Nov 2022 18:37:58 +0100 Subject: [PATCH 0351/2104] redhat_subscription: improve wording wrt Satellite (#5581) Do not mention an explicit version of Satellite for an environment to use; future versions of Satellite will support that, and older versions are long EOL. Also mention Katello next to Red Hat Satellite. --- plugins/modules/redhat_subscription.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index 997d1e5153..aaf39d6d3f 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -34,15 +34,15 @@ options: type: str username: description: - - access.redhat.com or Sat6 username + - access.redhat.com or Red Hat Satellite or Katello username type: str password: description: - - access.redhat.com or Sat6 password + - access.redhat.com or Red Hat Satellite or Katello password type: str server_hostname: description: - - Specify an alternative Red Hat Subscription Management or Sat6 server + - Specify an alternative Red Hat Subscription Management or Red Hat Satellite or Katello server type: str server_insecure: description: @@ -50,12 +50,12 @@ options: type: str server_prefix: description: - - Specify the prefix when registering to the Red Hat Subscription Management or Sat6 server. + - Specify the prefix when registering to the Red Hat Subscription Management or Red Hat Satellite or Katello server. type: str version_added: 3.3.0 server_port: description: - - Specify the port when registering to the Red Hat Subscription Management or Sat6 server. + - Specify the port when registering to the Red Hat Subscription Management or Red Hat Satellite or Katello server. type: str version_added: 3.3.0 rhsm_baseurl: @@ -98,7 +98,7 @@ options: type: str environment: description: - - Register with a specific environment in the destination org. Used with Red Hat Satellite 6.x or Katello + - Register with a specific environment in the destination org. Used with Red Hat Satellite or Katello type: str pool: description: @@ -229,7 +229,7 @@ EXAMPLES = ''' org_id: 222333444 pool: '^Red Hat Enterprise Server$' -- name: Register as user credentials into given environment (against Red Hat Satellite 6.x), and auto-subscribe. +- name: Register as user credentials into given environment (against Red Hat Satellite or Katello), and auto-subscribe. community.general.redhat_subscription: state: present username: joe_user @@ -397,7 +397,9 @@ class Rhsm(RegistrationBase): rhsm_baseurl, server_insecure, server_hostname, server_proxy_hostname, server_proxy_port, server_proxy_user, server_proxy_password, release): ''' - Register the current system to the provided RHSM or Sat6 server + Register the current system to the provided RHSM or Red Hat Satellite + or Katello server + Raises: * Exception - if error occurs while running command ''' From a3b748a15ed9250d67d812c8929fd1ec3cf7ae3b Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 27 Nov 2022 06:41:45 +1300 Subject: [PATCH 0352/2104] udm_share: fix sanity checks (#5557) * udm_share: fix sanity checks * add changelog fragment --- changelogs/fragments/5557-udm-share-sanity.yml | 2 ++ plugins/modules/udm_share.py | 10 ++++++++++ tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 7 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5557-udm-share-sanity.yml diff --git a/changelogs/fragments/5557-udm-share-sanity.yml b/changelogs/fragments/5557-udm-share-sanity.yml new file mode 100644 index 0000000000..12bd3d026e --- /dev/null +++ b/changelogs/fragments/5557-udm-share-sanity.yml @@ -0,0 +1,2 @@ +minor_changes: + - udm_share - added ``elements`` attribute to ``list`` type parameters (https://github.com/ansible-collections/community.general/pull/5557). diff --git a/plugins/modules/udm_share.py b/plugins/modules/udm_share.py index b1d7e13287..8120df1b00 100644 --- a/plugins/modules/udm_share.py +++ b/plugins/modules/udm_share.py @@ -125,6 +125,7 @@ options: description: - Option name in smb.conf and its value. type: list + elements: dict aliases: [ samba_custom_settings ] sambaDirectoryMode: default: '0755' @@ -200,12 +201,14 @@ options: description: - Allowed host/network. type: list + elements: str aliases: [ samba_hosts_allow ] sambaHostsDeny: default: [] description: - Denied host/network. type: list + elements: str aliases: [ samba_hosts_deny ] sambaInheritAcls: default: true @@ -314,11 +317,13 @@ options: description: - Only allow access for this host, IP address or network. type: list + elements: str nfsCustomSettings: default: [] description: - Option name in exports file. type: list + elements: str aliases: [ nfs_custom_settings ] ''' @@ -382,6 +387,7 @@ def main(): aliases=['samba_csc_policy'], default='manual'), sambaCustomSettings=dict(type='list', + elements='dict', aliases=['samba_custom_settings'], default=[]), sambaDirectoryMode=dict(type='str', @@ -418,9 +424,11 @@ def main(): aliases=['samba_hide_unreadable'], default=False), sambaHostsAllow=dict(type='list', + elements='str', aliases=['samba_hosts_allow'], default=[]), sambaHostsDeny=dict(type='list', + elements='str', aliases=['samba_hosts_deny'], default=[]), sambaInheritAcls=dict(type='bool', @@ -474,8 +482,10 @@ def main(): aliases=['samba_writeable'], default=True), nfs_hosts=dict(type='list', + elements='str', default=[]), nfsCustomSettings=dict(type='list', + elements='str', aliases=['nfs_custom_settings'], default=[]), state=dict(default='present', diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 1b89dae547..d12199993a 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -25,7 +25,6 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 29e8927103..d5dd72b549 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -20,6 +20,5 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 29e8927103..d5dd72b549 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -20,6 +20,5 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 9c667f3d7b..b54479472b 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -21,7 +21,6 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 9c667f3d7b..b54479472b 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -21,7 +21,6 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path -plugins/modules/udm_share.py validate-modules:parameter-list-no-elements plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path From b1094d840ffc2b20a77904fd1bd5e2537047ce5a Mon Sep 17 00:00:00 2001 From: Rainer Leber <39616583+rainerleber@users.noreply.github.com> Date: Sun, 27 Nov 2022 13:59:29 +0100 Subject: [PATCH 0353/2104] Redirect and Remove sap modules (#5592) * redirect and remove sap modules * remove botmeta redirect * add changelog fragment * revert runtime.yml changes and add new entries * Update meta/runtime.yml Co-authored-by: Felix Fontein * Update changelogs/fragments/5592-redirect-remove-sap-modules.yml Co-authored-by: Felix Fontein * Update changelogs/fragments/5592-redirect-remove-sap-modules.yml Co-authored-by: Felix Fontein * Update 5592-redirect-remove-sap-modules.yml Fix indentation * Fix RST syntax. * Update meta/runtime.yml Co-authored-by: Felix Fontein * Update meta/runtime.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 6 - .../5592-redirect-remove-sap-modules.yml | 13 + meta/runtime.yml | 6 + plugins/modules/hana_query.py | 214 ----------- plugins/modules/sap_task_list_execute.py | 343 ------------------ plugins/modules/sapcar_extract.py | 221 ----------- tests/unit/plugins/modules/test_hana_query.py | 103 ------ .../modules/test_sap_task_list_execute.py | 91 ----- .../plugins/modules/test_sapcar_extract.py | 54 --- 9 files changed, 19 insertions(+), 1032 deletions(-) create mode 100644 changelogs/fragments/5592-redirect-remove-sap-modules.yml delete mode 100644 plugins/modules/hana_query.py delete mode 100644 plugins/modules/sap_task_list_execute.py delete mode 100644 plugins/modules/sapcar_extract.py delete mode 100644 tests/unit/plugins/modules/test_hana_query.py delete mode 100644 tests/unit/plugins/modules/test_sap_task_list_execute.py delete mode 100644 tests/unit/plugins/modules/test_sapcar_extract.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 6aacdc9cad..c8e19d0b13 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -527,8 +527,6 @@ files: maintainers: zimbatm $modules/gunicorn.py: maintainers: agmezr - $modules/hana_query.py: - maintainers: rainerleber $modules/haproxy.py: maintainers: ravibhure Normo $modules/heroku_collaborator.py: @@ -1073,10 +1071,6 @@ files: maintainers: nerzhul $modules/runit.py: maintainers: jsumners - $modules/sap_task_list_execute: - maintainers: rainerleber - $modules/sapcar_extract.py: - maintainers: RainerLeber $modules/say.py: maintainers: $team_ansible_core ignore: mpdehaan diff --git a/changelogs/fragments/5592-redirect-remove-sap-modules.yml b/changelogs/fragments/5592-redirect-remove-sap-modules.yml new file mode 100644 index 0000000000..0d6cc2bf39 --- /dev/null +++ b/changelogs/fragments/5592-redirect-remove-sap-modules.yml @@ -0,0 +1,13 @@ +removed_features: + - | + All ``sap`` modules have been removed from this collection. + They have been migrated to the `community.sap_libs `_ collection. + Redirections have been provided. + Following modules are affected: + - sapcar_extract + - sap_task_list_execute + - hana_query +breaking_changes: + - | + If you are not using this collection as part of Ansible, but installed (and/or upgraded) community.general manually, you need to make sure to also install ``community.sap_libs`` if you are using any of the ``sapcar_extract``, ``sap_task_list_execute``, and ``hana_query`` modules. + Without that collection installed, the redirects for these modules do not work. diff --git a/meta/runtime.yml b/meta/runtime.yml index 98a46f62dc..9d15860ac4 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -972,6 +972,8 @@ plugin_routing: warning_text: You are using an internal name to access the community.general.heroku_collaborator modules. This has never been supported or documented, and will stop working in community.general 9.0.0. + hana_query: + redirect: community.sap_libs.sap_hdbsql hetzner_failover_ip: redirect: community.hrobot.failover_ip hetzner_failover_ip_info: @@ -3389,6 +3391,10 @@ plugin_routing: warning_text: You are using an internal name to access the community.general.redfish_info modules. This has never been supported or documented, and will stop working in community.general 9.0.0. + sapcar_extract: + redirect: community.sap_libs.sapcar_extract + sap_task_list_execute: + redirect: community.sap_libs.sap_task_list_execute packaging.os.redhat_subscription: redirect: community.general.redhat_subscription deprecation: diff --git a/plugins/modules/hana_query.py b/plugins/modules/hana_query.py deleted file mode 100644 index 746b2a3f44..0000000000 --- a/plugins/modules/hana_query.py +++ /dev/null @@ -1,214 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2021, Rainer Leber -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -DOCUMENTATION = r''' ---- -module: hana_query -short_description: Execute SQL on HANA -version_added: 3.2.0 -description: This module executes SQL statements on HANA with hdbsql. -options: - sid: - description: The system ID. - type: str - required: true - instance: - description: The instance number. - type: str - required: true - user: - description: A dedicated username. The user could be also in hdbuserstore. Defaults to C(SYSTEM). - type: str - default: SYSTEM - userstore: - description: If C(true) the user must be in hdbuserstore. - type: bool - default: false - version_added: 3.5.0 - password: - description: - - The password to connect to the database. - - "B(Note:) Since the passwords have to be passed as command line arguments, I(userstore=true) should - be used whenever possible, as command line arguments can be seen by other users - on the same machine." - type: str - autocommit: - description: Autocommit the statement. - type: bool - default: true - host: - description: The Host IP address. The port can be defined as well. - type: str - database: - description: Define the database on which to connect. - type: str - encrypted: - description: Use encrypted connection. Defaults to C(false). - type: bool - default: false - filepath: - description: - - One or more files each containing one SQL query to run. - - Must be a string or list containing strings. - type: list - elements: path - query: - description: - - SQL query to run. - - Must be a string or list containing strings. Please note that if you supply a string, it will be split by commas (C(,)) to a list. - It is better to supply a one-element list instead to avoid mangled input. - type: list - elements: str -notes: - - Does not support C(check_mode). -author: - - Rainer Leber (@rainerleber) -''' - -EXAMPLES = r''' -- name: Simple select query - community.general.hana_query: - sid: "hdb" - instance: "01" - password: "Test123" - query: "select user_name from users" - -- name: Run several queries - community.general.hana_query: - sid: "hdb" - instance: "01" - password: "Test123" - query: - - "select user_name from users;" - - select * from SYSTEM; - host: "localhost" - autocommit: false - -- name: Run several queries from file - community.general.hana_query: - sid: "hdb" - instance: "01" - password: "Test123" - filepath: - - /tmp/HANA_CPU_UtilizationPerCore_2.00.020+.txt - - /tmp/HANA.txt - host: "localhost" - -- name: Run several queries from user store - community.general.hana_query: - sid: "hdb" - instance: "01" - user: hdbstoreuser - userstore: true - query: - - "select user_name from users;" - - select * from users; - autocommit: false -''' - -RETURN = r''' -query_result: - description: List containing results of all queries executed (one sublist for every query). - returned: on success - type: list - elements: list - sample: [[{"Column": "Value1"}, {"Column": "Value2"}], [{"Column": "Value1"}, {"Column": "Value2"}]] -''' - -import csv -from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.six import StringIO -from ansible.module_utils.common.text.converters import to_native - - -def csv_to_list(rawcsv): - reader_raw = csv.DictReader(StringIO(rawcsv)) - reader = [dict((k, v.strip()) for k, v in row.items()) for row in reader_raw] - return list(reader) - - -def main(): - module = AnsibleModule( - argument_spec=dict( - sid=dict(type='str', required=True), - instance=dict(type='str', required=True), - encrypted=dict(type='bool', default=False), - host=dict(type='str', required=False), - user=dict(type='str', default="SYSTEM"), - userstore=dict(type='bool', default=False), - password=dict(type='str', no_log=True), - database=dict(type='str', required=False), - query=dict(type='list', elements='str', required=False), - filepath=dict(type='list', elements='path', required=False), - autocommit=dict(type='bool', default=True), - ), - required_one_of=[('query', 'filepath')], - required_if=[('userstore', False, ['password'])], - supports_check_mode=False, - ) - rc, out, err, out_raw = [0, [], "", ""] - - params = module.params - - sid = (params['sid']).upper() - instance = params['instance'] - user = params['user'] - userstore = params['userstore'] - password = params['password'] - autocommit = params['autocommit'] - host = params['host'] - database = params['database'] - encrypted = params['encrypted'] - - filepath = params['filepath'] - query = params['query'] - - bin_path = "/usr/sap/{sid}/HDB{instance}/exe/hdbsql".format(sid=sid, instance=instance) - - try: - command = [module.get_bin_path(bin_path, required=True)] - except Exception as e: - module.fail_json(msg='Failed to find hdbsql at the expected path "{0}". Please check SID and instance number: "{1}"'.format(bin_path, to_native(e))) - - if encrypted is True: - command.extend(['-attemptencrypt']) - if autocommit is False: - command.extend(['-z']) - if host is not None: - command.extend(['-n', host]) - if database is not None: - command.extend(['-d', database]) - # -x Suppresses additional output, such as the number of selected rows in a result set. - if userstore: - command.extend(['-x', '-U', user]) - else: - command.extend(['-x', '-i', instance, '-u', user, '-p', password]) - - if filepath is not None: - command.extend(['-I']) - for p in filepath: - # makes a command like hdbsql -i 01 -u SYSTEM -p secret123# -I /tmp/HANA_CPU_UtilizationPerCore_2.00.020+.txt, - # iterates through files and append the output to var out. - query_command = command + [p] - (rc, out_raw, err) = module.run_command(query_command) - out.append(csv_to_list(out_raw)) - if query is not None: - for q in query: - # makes a command like hdbsql -i 01 -u SYSTEM -p secret123# "select user_name from users", - # iterates through multiple commands and append the output to var out. - query_command = command + [q] - (rc, out_raw, err) = module.run_command(query_command) - out.append(csv_to_list(out_raw)) - changed = True - - module.exit_json(changed=changed, rc=rc, query_result=out, stderr=err) - - -if __name__ == '__main__': - main() diff --git a/plugins/modules/sap_task_list_execute.py b/plugins/modules/sap_task_list_execute.py deleted file mode 100644 index 29936b8483..0000000000 --- a/plugins/modules/sap_task_list_execute.py +++ /dev/null @@ -1,343 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2021, Rainer Leber -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -DOCUMENTATION = r''' ---- -module: sap_task_list_execute -short_description: Perform SAP Task list execution -version_added: "3.5.0" -description: - - The C(sap_task_list_execute) module depends on C(pyrfc) Python library (version 2.4.0 and upwards). - Depending on distribution you are using, you may need to install additional packages to - have these available. - - Tasks in the task list which requires manual activities will be confirmed automatically. - - This module will use the RFC package C(STC_TM_API). - -requirements: - - pyrfc >= 2.4.0 - - xmltodict - -options: - conn_username: - description: The required username for the SAP system. - required: true - type: str - conn_password: - description: The required password for the SAP system. - required: true - type: str - host: - description: The required host for the SAP system. Can be either an FQDN or IP Address. - required: true - type: str - sysnr: - description: - - The system number of the SAP system. - - You must quote the value to ensure retaining the leading zeros. - default: '00' - type: str - client: - description: - - The client number to connect to. - - You must quote the value to ensure retaining the leading zeros. - default: '000' - type: str - task_to_execute: - description: The task list which will be executed. - required: true - type: str - task_parameters: - description: - - The tasks and the parameters for execution. - - If the task list do not need any parameters. This could be empty. - - If only specific tasks from the task list should be executed. - The tasks even when no parameter is needed must be provided. - Alongside with the module parameter I(task_skip=true). - type: list - elements: dict - suboptions: - TASKNAME: - description: The name of the task in the task list. - type: str - required: true - FIELDNAME: - description: The name of the field of the task. - type: str - VALUE: - description: The value which have to be set. - type: raw - task_settings: - description: - - Setting for the execution of the task list. This can be the following as in TCODE SE80 described. - Check Mode C(CHECKRUN), Background Processing Active C(BATCH) (this is the default value), - Asynchronous Execution C(ASYNC), Trace Mode C(TRACE), Server Name C(BATCH_TARGET). - default: ['BATCH'] - type: list - elements: str - task_skip: - description: - - If this parameter is C(true) not defined tasks in I(task_parameters) are skipped. - - This could be the case when only certain tasks should run from the task list. - default: false - type: bool - -notes: - - Does not support C(check_mode). -author: - - Rainer Leber (@rainerleber) -''' - -EXAMPLES = r''' -# Pass in a message -- name: Test task execution - community.general.sap_task_list_execute: - conn_username: DDIC - conn_password: Passwd1234 - host: 10.1.8.10 - sysnr: '01' - client: '000' - task_to_execute: SAP_BASIS_SSL_CHECK - task_settings: batch - -- name: Pass in input parameters - community.general.sap_task_list_execute: - conn_username: DDIC - conn_password: Passwd1234 - host: 10.1.8.10 - sysnr: '00' - client: '000' - task_to_execute: SAP_BASIS_SSL_CHECK - task_parameters : - - { 'TASKNAME': 'CL_STCT_CHECK_SEC_CRYPTO', 'FIELDNAME': 'P_OPT2', 'VALUE': 'X' } - - TASKNAME: CL_STCT_CHECK_SEC_CRYPTO - FIELDNAME: P_OPT3 - VALUE: X - task_settings: batch - -# Exported environement variables. -- name: Hint if module will fail with error message like ImportError libsapnwrfc.so... - community.general.sap_task_list_execute: - conn_username: DDIC - conn_password: Passwd1234 - host: 10.1.8.10 - sysnr: '00' - client: '000' - task_to_execute: SAP_BASIS_SSL_CHECK - task_settings: batch - environment: - SAPNWRFC_HOME: /usr/local/sap/nwrfcsdk - LD_LIBRARY_PATH: /usr/local/sap/nwrfcsdk/lib -''' - -RETURN = r''' -msg: - description: A small execution description. - type: str - returned: always - sample: 'Successful' -out: - description: A complete description of the executed tasks. If this is available. - type: list - elements: dict - returned: on success - sample: [...,{ - "LOG": { - "STCTM_S_LOG": [ - { - "ACTIVITY": "U_CONFIG", - "ACTIVITY_DESCR": "Configuration changed", - "DETAILS": null, - "EXEC_ID": "20210728184903.815739", - "FIELD": null, - "ID": "STC_TASK", - "LOG_MSG_NO": "000000", - "LOG_NO": null, - "MESSAGE": "For radiobutton group ICM too many options are set; choose only one option", - "MESSAGE_V1": "ICM", - "MESSAGE_V2": null, - "MESSAGE_V3": null, - "MESSAGE_V4": null, - "NUMBER": "048", - "PARAMETER": null, - "PERIOD": "M", - "PERIOD_DESCR": "Maintenance", - "ROW": "0", - "SRC_LINE": "170", - "SRC_OBJECT": "CL_STCTM_REPORT_UI IF_STCTM_UI_TASK~SET_PARAMETERS", - "SYSTEM": null, - "TIMESTMP": "20210728184903", - "TSTPNM": "DDIC", - "TYPE": "E" - },... - ]}}] -''' - -from ansible.module_utils.basic import AnsibleModule, missing_required_lib -import traceback -try: - from pyrfc import Connection -except ImportError: - HAS_PYRFC_LIBRARY = False - PYRFC_LIBRARY_IMPORT_ERROR = traceback.format_exc() -else: - HAS_PYRFC_LIBRARY = True - PYRFC_LIBRARY_IMPORT_ERROR = None -try: - import xmltodict -except ImportError: - HAS_XMLTODICT_LIBRARY = False - XMLTODICT_LIBRARY_IMPORT_ERROR = traceback.format_exc() -else: - HAS_XMLTODICT_LIBRARY = True - XMLTODICT_LIBRARY_IMPORT_ERROR = None - - -def call_rfc_method(connection, method_name, kwargs): - # PyRFC call function - return connection.call(method_name, **kwargs) - - -def process_exec_settings(task_settings): - # processes task settings to objects - exec_settings = {} - for settings in task_settings: - temp_dict = {settings.upper(): 'X'} - for key, value in temp_dict.items(): - exec_settings[key] = value - return exec_settings - - -def xml_to_dict(xml_raw): - try: - xml_parsed = xmltodict.parse(xml_raw, dict_constructor=dict) - xml_dict = xml_parsed['asx:abap']['asx:values']['SESSION']['TASKLIST'] - except KeyError: - xml_dict = "No logs available." - return xml_dict - - -def run_module(): - - params_spec = dict( - TASKNAME=dict(type='str', required=True), - FIELDNAME=dict(type='str'), - VALUE=dict(type='raw'), - ) - - # define available arguments/parameters a user can pass to the module - module = AnsibleModule( - argument_spec=dict( - # values for connection - conn_username=dict(type='str', required=True), - conn_password=dict(type='str', required=True, no_log=True), - host=dict(type='str', required=True), - sysnr=dict(type='str', default="00"), - client=dict(type='str', default="000"), - # values for execution tasks - task_to_execute=dict(type='str', required=True), - task_parameters=dict(type='list', elements='dict', options=params_spec), - task_settings=dict(type='list', elements='str', default=['BATCH']), - task_skip=dict(type='bool', default=False), - ), - supports_check_mode=False, - ) - result = dict(changed=False, msg='', out={}) - - params = module.params - - username = params['conn_username'].upper() - password = params['conn_password'] - host = params['host'] - sysnr = params['sysnr'] - client = params['client'] - - task_parameters = params['task_parameters'] - task_to_execute = params['task_to_execute'] - task_settings = params['task_settings'] - task_skip = params['task_skip'] - - if not HAS_PYRFC_LIBRARY: - module.fail_json( - msg=missing_required_lib('pyrfc'), - exception=PYRFC_LIBRARY_IMPORT_ERROR) - - if not HAS_XMLTODICT_LIBRARY: - module.fail_json( - msg=missing_required_lib('xmltodict'), - exception=XMLTODICT_LIBRARY_IMPORT_ERROR) - - # basic RFC connection with pyrfc - try: - conn = Connection(user=username, passwd=password, ashost=host, sysnr=sysnr, client=client) - except Exception as err: - result['error'] = str(err) - result['msg'] = 'Something went wrong connecting to the SAP system.' - module.fail_json(**result) - - try: - raw_params = call_rfc_method(conn, 'STC_TM_SCENARIO_GET_PARAMETERS', - {'I_SCENARIO_ID': task_to_execute}) - except Exception as err: - result['error'] = str(err) - result['msg'] = 'The task list does not exsist.' - module.fail_json(**result) - exec_settings = process_exec_settings(task_settings) - # initialize session task - session_init = call_rfc_method(conn, 'STC_TM_SESSION_BEGIN', - {'I_SCENARIO_ID': task_to_execute, - 'I_INIT_ONLY': 'X'}) - # Confirm Tasks which requires manual activities from Task List Run - for task in raw_params['ET_PARAMETER']: - call_rfc_method(conn, 'STC_TM_TASK_CONFIRM', - {'I_SESSION_ID': session_init['E_SESSION_ID'], - 'I_TASKNAME': task['TASKNAME']}) - if task_skip: - for task in raw_params['ET_PARAMETER']: - call_rfc_method(conn, 'STC_TM_TASK_SKIP', - {'I_SESSION_ID': session_init['E_SESSION_ID'], - 'I_TASKNAME': task['TASKNAME'], 'I_SKIP_DEP_TASKS': 'X'}) - # unskip defined tasks and set parameters - if task_parameters is not None: - for task in task_parameters: - call_rfc_method(conn, 'STC_TM_TASK_UNSKIP', - {'I_SESSION_ID': session_init['E_SESSION_ID'], - 'I_TASKNAME': task['TASKNAME'], 'I_UNSKIP_DEP_TASKS': 'X'}) - - call_rfc_method(conn, 'STC_TM_SESSION_SET_PARAMETERS', - {'I_SESSION_ID': session_init['E_SESSION_ID'], - 'IT_PARAMETER': task_parameters}) - # start the task - try: - session_start = call_rfc_method(conn, 'STC_TM_SESSION_RESUME', - {'I_SESSION_ID': session_init['E_SESSION_ID'], - 'IS_EXEC_SETTINGS': exec_settings}) - except Exception as err: - result['error'] = str(err) - result['msg'] = 'Something went wrong. See error.' - module.fail_json(**result) - # get task logs because the execution may successfully but the tasks shows errors or warnings - # returned value is ABAPXML https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/abenabap_xslt_asxml_general.htm - session_log = call_rfc_method(conn, 'STC_TM_SESSION_GET_LOG', - {'I_SESSION_ID': session_init['E_SESSION_ID']}) - - task_list = xml_to_dict(session_log['E_LOG']) - - result['changed'] = True - result['msg'] = session_start['E_STATUS_DESCR'] - result['out'] = task_list - - module.exit_json(**result) - - -def main(): - run_module() - - -if __name__ == '__main__': - main() diff --git a/plugins/modules/sapcar_extract.py b/plugins/modules/sapcar_extract.py deleted file mode 100644 index 57ede47616..0000000000 --- a/plugins/modules/sapcar_extract.py +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2021, Rainer Leber -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -DOCUMENTATION = ''' ---- -module: sapcar_extract -short_description: Manages SAP SAPCAR archives -version_added: "3.2.0" -description: - - Provides support for unpacking C(sar)/C(car) files with the SAPCAR binary from SAP and pulling - information back into Ansible. -options: - path: - description: The path to the SAR/CAR file. - type: path - required: true - dest: - description: - - The destination where SAPCAR extracts the SAR file. Missing folders will be created. - If this parameter is not provided it will unpack in the same folder as the SAR file. - type: path - binary_path: - description: - - The path to the SAPCAR binary, for example, C(/home/dummy/sapcar) or C(https://myserver/SAPCAR). - If this parameter is not provided the module will look in C(PATH). - type: path - signature: - description: - - If C(true) the signature will be extracted. - default: false - type: bool - security_library: - description: - - The path to the security library, for example, C(/usr/sap/hostctrl/exe/libsapcrytp.so), for signature operations. - type: path - manifest: - description: - - The name of the manifest. - default: "SIGNATURE.SMF" - type: str - remove: - description: - - If C(true) the SAR/CAR file will be removed. B(This should be used with caution!) - default: false - type: bool -author: - - Rainer Leber (@RainerLeber) -notes: - - Always returns C(changed=true) in C(check_mode). -''' - -EXAMPLES = """ -- name: Extract SAR file - community.general.sapcar_extract: - path: "~/source/hana.sar" - -- name: Extract SAR file with destination - community.general.sapcar_extract: - path: "~/source/hana.sar" - dest: "~/test/" - -- name: Extract SAR file with destination and download from webserver can be a fileshare as well - community.general.sapcar_extract: - path: "~/source/hana.sar" - dest: "~/dest/" - binary_path: "https://myserver/SAPCAR" - -- name: Extract SAR file and delete SAR after extract - community.general.sapcar_extract: - path: "~/source/hana.sar" - remove: true - -- name: Extract SAR file with manifest - community.general.sapcar_extract: - path: "~/source/hana.sar" - signature: true - -- name: Extract SAR file with manifest and rename it - community.general.sapcar_extract: - path: "~/source/hana.sar" - manifest: "MyNewSignature.SMF" - signature: true -""" - -import os -from tempfile import NamedTemporaryFile -from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.urls import open_url -from ansible.module_utils.common.text.converters import to_native - - -def get_list_of_files(dir_name): - # create a list of file and directories - # names in the given directory - list_of_file = os.listdir(dir_name) - allFiles = list() - # Iterate over all the entries - for entry in list_of_file: - # Create full path - fullPath = os.path.join(dir_name, entry) - # If entry is a directory then get the list of files in this directory - if os.path.isdir(fullPath): - allFiles = allFiles + [fullPath] - allFiles = allFiles + get_list_of_files(fullPath) - else: - allFiles.append(fullPath) - return allFiles - - -def download_SAPCAR(binary_path, module): - bin_path = None - # download sapcar binary if url is provided otherwise path is returned - if binary_path is not None: - if binary_path.startswith('https://') or binary_path.startswith('http://'): - random_file = NamedTemporaryFile(delete=False) - with open_url(binary_path) as response: - with random_file as out_file: - data = response.read() - out_file.write(data) - os.chmod(out_file.name, 0o700) - bin_path = out_file.name - module.add_cleanup_file(bin_path) - else: - bin_path = binary_path - return bin_path - - -def check_if_present(command, path, dest, signature, manifest, module): - # manipuliating output from SAR file for compare with already extracted files - iter_command = [command, '-tvf', path] - sar_out = module.run_command(iter_command)[1] - sar_raw = sar_out.split("\n")[1:] - if dest[-1] != "/": - dest = dest + "/" - sar_files = [dest + x.split(" ")[-1] for x in sar_raw if x] - # remove any SIGNATURE.SMF from list because it will not unpacked if signature is false - if not signature: - sar_files = [item for item in sar_files if '.SMF' not in item] - # if signature is renamed manipulate files in list of sar file for compare. - if manifest != "SIGNATURE.SMF": - sar_files = [item for item in sar_files if '.SMF' not in item] - sar_files = sar_files + [manifest] - # get extracted files if present - files_extracted = get_list_of_files(dest) - # compare extracted files with files in sar file - present = all(elem in files_extracted for elem in sar_files) - return present - - -def main(): - module = AnsibleModule( - argument_spec=dict( - path=dict(type='path', required=True), - dest=dict(type='path'), - binary_path=dict(type='path'), - signature=dict(type='bool', default=False), - security_library=dict(type='path'), - manifest=dict(type='str', default="SIGNATURE.SMF"), - remove=dict(type='bool', default=False), - ), - supports_check_mode=True, - ) - rc, out, err = [0, "", ""] - params = module.params - check_mode = module.check_mode - - path = params['path'] - dest = params['dest'] - signature = params['signature'] - security_library = params['security_library'] - manifest = params['manifest'] - remove = params['remove'] - - bin_path = download_SAPCAR(params['binary_path'], module) - - if dest is None: - dest_head_tail = os.path.split(path) - dest = dest_head_tail[0] + '/' - else: - if not os.path.exists(dest): - os.makedirs(dest, 0o755) - - if bin_path is not None: - command = [module.get_bin_path(bin_path, required=True)] - else: - try: - command = [module.get_bin_path('sapcar', required=True)] - except Exception as e: - module.fail_json(msg='Failed to find SAPCAR at the expected path or URL "{0}". Please check whether it is available: {1}' - .format(bin_path, to_native(e))) - - present = check_if_present(command[0], path, dest, signature, manifest, module) - - if not present: - command.extend(['-xvf', path, '-R', dest]) - if security_library: - command.extend(['-L', security_library]) - if signature: - command.extend(['-manifest', manifest]) - if not check_mode: - (rc, out, err) = module.run_command(command, check_rc=True) - changed = True - else: - changed = False - out = "already unpacked" - - if remove: - os.remove(path) - - module.exit_json(changed=changed, message=rc, stdout=out, - stderr=err, command=' '.join(command)) - - -if __name__ == '__main__': - main() diff --git a/tests/unit/plugins/modules/test_hana_query.py b/tests/unit/plugins/modules/test_hana_query.py deleted file mode 100644 index db06e4cef7..0000000000 --- a/tests/unit/plugins/modules/test_hana_query.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2021, Rainer Leber (@rainerleber) -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import absolute_import, division, print_function -__metaclass__ = type - -from ansible_collections.community.general.plugins.modules import hana_query -from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( - AnsibleExitJson, - AnsibleFailJson, - ModuleTestCase, - set_module_args, -) -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible.module_utils import basic - - -def get_bin_path(*args, **kwargs): - """Function to return path of hdbsql""" - return "/usr/sap/HDB/HDB01/exe/hdbsql" - - -class Testhana_query(ModuleTestCase): - """Main class for testing hana_query module.""" - - def setUp(self): - """Setup.""" - super(Testhana_query, self).setUp() - self.module = hana_query - self.mock_get_bin_path = patch.object(basic.AnsibleModule, 'get_bin_path', get_bin_path) - self.mock_get_bin_path.start() - self.addCleanup(self.mock_get_bin_path.stop) # ensure that the patching is 'undone' - - def tearDown(self): - """Teardown.""" - super(Testhana_query, self).tearDown() - - def test_without_required_parameters(self): - """Failure must occurs when all parameters are missing.""" - with self.assertRaises(AnsibleFailJson): - set_module_args({}) - self.module.main() - - def test_hana_query(self): - """Check that result is processed.""" - set_module_args({ - 'sid': "HDB", - 'instance': "01", - 'encrypted': False, - 'host': "localhost", - 'user': "SYSTEM", - 'password': "1234Qwer", - 'database': "HDB", - 'query': "SELECT * FROM users;" - }) - with patch.object(basic.AnsibleModule, 'run_command') as run_command: - run_command.return_value = 0, 'username,name\n testuser,test user \n myuser, my user \n', '' - with self.assertRaises(AnsibleExitJson) as result: - hana_query.main() - self.assertEqual(result.exception.args[0]['query_result'], [[ - {'username': 'testuser', 'name': 'test user'}, - {'username': 'myuser', 'name': 'my user'}, - ]]) - self.assertEqual(run_command.call_count, 1) - - def test_hana_userstore_query(self): - """Check that result is processed with userstore.""" - set_module_args({ - 'sid': "HDB", - 'instance': "01", - 'encrypted': False, - 'host': "localhost", - 'user': "SYSTEM", - 'userstore': True, - 'database': "HDB", - 'query': "SELECT * FROM users;" - }) - with patch.object(basic.AnsibleModule, 'run_command') as run_command: - run_command.return_value = 0, 'username,name\n testuser,test user \n myuser, my user \n', '' - with self.assertRaises(AnsibleExitJson) as result: - hana_query.main() - self.assertEqual(result.exception.args[0]['query_result'], [[ - {'username': 'testuser', 'name': 'test user'}, - {'username': 'myuser', 'name': 'my user'}, - ]]) - self.assertEqual(run_command.call_count, 1) - - def test_hana_failed_no_passwd(self): - """Check that result is failed with no password.""" - with self.assertRaises(AnsibleFailJson): - set_module_args({ - 'sid': "HDB", - 'instance': "01", - 'encrypted': False, - 'host': "localhost", - 'user': "SYSTEM", - 'database': "HDB", - 'query': "SELECT * FROM users;" - }) - self.module.main() diff --git a/tests/unit/plugins/modules/test_sap_task_list_execute.py b/tests/unit/plugins/modules/test_sap_task_list_execute.py deleted file mode 100644 index 34c97c4a80..0000000000 --- a/tests/unit/plugins/modules/test_sap_task_list_execute.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (c) Ansible project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import sys -from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args - -sys.modules['pyrfc'] = MagicMock() -sys.modules['pyrfc.Connection'] = MagicMock() -sys.modules['xmltodict'] = MagicMock() -sys.modules['xmltodict.parse'] = MagicMock() - -from ansible_collections.community.general.plugins.modules import sap_task_list_execute - - -class TestSAPRfcModule(ModuleTestCase): - - def setUp(self): - super(TestSAPRfcModule, self).setUp() - self.module = sap_task_list_execute - - def tearDown(self): - super(TestSAPRfcModule, self).tearDown() - - def define_rfc_connect(self, mocker): - return mocker.patch(self.module.call_rfc_method) - - def test_without_required_parameters(self): - """Failure must occurs when all parameters are missing""" - with self.assertRaises(AnsibleFailJson): - set_module_args({}) - self.module.main() - - def test_error_no_task_list(self): - """tests fail to exec task list""" - - set_module_args({ - "conn_username": "DDIC", - "conn_password": "Test1234", - "host": "10.1.8.9", - "task_to_execute": "SAP_BASIS_SSL_CHECK" - }) - - with patch.object(self.module, 'Connection') as conn: - conn.return_value = '' - with self.assertRaises(AnsibleFailJson) as result: - self.module.main() - self.assertEqual(result.exception.args[0]['msg'], 'The task list does not exsist.') - - def test_success(self): - """test execute task list success""" - - set_module_args({ - "conn_username": "DDIC", - "conn_password": "Test1234", - "host": "10.1.8.9", - "task_to_execute": "SAP_BASIS_SSL_CHECK" - }) - with patch.object(self.module, 'xml_to_dict') as XML: - XML.return_value = {'item': [{'TASK': {'CHECK_STATUS_DESCR': 'Check successfully', - 'STATUS_DESCR': 'Executed successfully', 'TASKNAME': 'CL_STCT_CHECK_SEC_CRYPTO', - 'LNR': '1', 'DESCRIPTION': 'Check SAP Cryptographic Library', 'DOCU_EXIST': 'X', - 'LOG_EXIST': 'X', 'ACTION_SKIP': None, 'ACTION_UNSKIP': None, 'ACTION_CONFIRM': None, - 'ACTION_MAINTAIN': None}}]} - - with self.assertRaises(AnsibleExitJson) as result: - sap_task_list_execute.main() - self.assertEqual(result.exception.args[0]['out'], {'item': [{'TASK': {'CHECK_STATUS_DESCR': 'Check successfully', - 'STATUS_DESCR': 'Executed successfully', 'TASKNAME': 'CL_STCT_CHECK_SEC_CRYPTO', - 'LNR': '1', 'DESCRIPTION': 'Check SAP Cryptographic Library', 'DOCU_EXIST': 'X', - 'LOG_EXIST': 'X', 'ACTION_SKIP': None, 'ACTION_UNSKIP': None, - 'ACTION_CONFIRM': None, 'ACTION_MAINTAIN': None}}]}) - - def test_success_no_log(self): - """test execute task list success without logs""" - - set_module_args({ - "conn_username": "DDIC", - "conn_password": "Test1234", - "host": "10.1.8.9", - "task_to_execute": "SAP_BASIS_SSL_CHECK" - }) - with patch.object(self.module, 'xml_to_dict') as XML: - XML.return_value = "No logs available." - with self.assertRaises(AnsibleExitJson) as result: - sap_task_list_execute.main() - self.assertEqual(result.exception.args[0]['out'], 'No logs available.') diff --git a/tests/unit/plugins/modules/test_sapcar_extract.py b/tests/unit/plugins/modules/test_sapcar_extract.py deleted file mode 100644 index bec9cf8862..0000000000 --- a/tests/unit/plugins/modules/test_sapcar_extract.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2021, Rainer Leber (@rainerleber) -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import absolute_import, division, print_function -__metaclass__ = type - -from ansible_collections.community.general.plugins.modules import sapcar_extract -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible.module_utils import basic - - -def get_bin_path(*args, **kwargs): - """Function to return path of SAPCAR""" - return "/tmp/sapcar" - - -class Testsapcar_extract(ModuleTestCase): - """Main class for testing sapcar_extract module.""" - - def setUp(self): - """Setup.""" - super(Testsapcar_extract, self).setUp() - self.module = sapcar_extract - self.mock_get_bin_path = patch.object(basic.AnsibleModule, 'get_bin_path', get_bin_path) - self.mock_get_bin_path.start() - self.addCleanup(self.mock_get_bin_path.stop) # ensure that the patching is 'undone' - - def tearDown(self): - """Teardown.""" - super(Testsapcar_extract, self).tearDown() - - def test_without_required_parameters(self): - """Failure must occurs when all parameters are missing.""" - with self.assertRaises(AnsibleFailJson): - set_module_args({}) - self.module.main() - - def test_sapcar_extract(self): - """Check that result is changed.""" - set_module_args({ - 'path': "/tmp/HANA_CLIENT_REV2_00_053_00_LINUX_X86_64.SAR", - 'dest': "/tmp/test2", - 'binary_path': "/tmp/sapcar" - }) - with patch.object(basic.AnsibleModule, 'run_command') as run_command: - run_command.return_value = 0, '', '' # successful execution, no output - with self.assertRaises(AnsibleExitJson) as result: - sapcar_extract.main() - self.assertTrue(result.exception.args[0]['changed']) - self.assertEqual(run_command.call_count, 1) From 3f80aa3c636f0ccd0f84dfca1954048699737f52 Mon Sep 17 00:00:00 2001 From: "Fabian P. Schmidt" Date: Mon, 28 Nov 2022 20:52:06 +0100 Subject: [PATCH 0354/2104] contributing: Modify link anchor to changelog fragments docs (#5618) The hmtl anchor linked now points to the parent section ("Creating changelog fragments"). Previously new contributors were linked to the subsection "Creating a changelog fragment", just to be immediately be guided by the second paragraph to jump to the previous section. Signed-off-by: Fabian P. Schmidt Signed-off-by: Fabian P. Schmidt --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4236778dc6..358daa5e91 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ Also, consider taking up a valuable, reviewed, but abandoned pull request which * Try committing your changes with an informative but short commit message. * Do not squash your commits and force-push to your branch if not needed. Reviews of your pull request are much easier with individual commits to comprehend the pull request history. All commits of your pull request branch will be squashed into one commit by GitHub upon merge. * Do not add merge commits to your PR. The bot will complain and you will have to rebase ([instructions for rebasing](https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html)) to remove them before your PR can be merged. To avoid that git automatically does merges during pulls, you can configure it to do rebases instead by running `git config pull.rebase true` inside the repository checkout. -* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#changelogs-how-to). (You must not include a fragment for new modules or new plugins, except for test and filter plugins. Also you shouldn't include one for docs-only changes. If you're not sure, simply don't include one, we'll tell you whether one is needed or not :) ) +* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#creating-changelog-fragments). (You must not include a fragment for new modules or new plugins, except for test and filter plugins. Also you shouldn't include one for docs-only changes. If you're not sure, simply don't include one, we'll tell you whether one is needed or not :) ) * Avoid reformatting unrelated parts of the codebase in your PR. These types of changes will likely be requested for reversion, create additional work for reviewers, and may cause approval to be delayed. You can also read [our Quick-start development guide](https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst). From 1ca775248f6e8df679ec57e710582f2b7131cc66 Mon Sep 17 00:00:00 2001 From: Naewis Date: Mon, 28 Nov 2022 22:44:24 +0100 Subject: [PATCH 0355/2104] java_certs : Not enough info on error (#5550) * java_certs : Not enough info on error Just bumped into an issue when the message was "Internal module failure, cannot extract public certificate from pkcs12, error: " Seems that the issue #2560 doesn't cover all cases. To make debugging easier, I propose to add error output on json return instead of only expose standard output. * java_certs - add missing fragment message * Word-smithing. Co-authored-by: Felix Fontein --- .../fragments/5550-java_certs-not-enough-info-on-error.yml | 2 ++ plugins/modules/java_cert.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5550-java_certs-not-enough-info-on-error.yml diff --git a/changelogs/fragments/5550-java_certs-not-enough-info-on-error.yml b/changelogs/fragments/5550-java_certs-not-enough-info-on-error.yml new file mode 100644 index 0000000000..c2b2be0418 --- /dev/null +++ b/changelogs/fragments/5550-java_certs-not-enough-info-on-error.yml @@ -0,0 +1,2 @@ +minor_changes: + - java_certs - add more detailed error output when extracting certificate from PKCS12 fails (https://github.com/ansible-collections/community.general/pull/5550). diff --git a/plugins/modules/java_cert.py b/plugins/modules/java_cert.py index 1d1327ed71..461f365a72 100644 --- a/plugins/modules/java_cert.py +++ b/plugins/modules/java_cert.py @@ -281,7 +281,8 @@ def _export_public_cert_from_pkcs12(module, executable, pkcs_file, alias, passwo (export_rc, export_stdout, export_err) = module.run_command(export_cmd, data=password, check_rc=False) if export_rc != 0: - module.fail_json(msg="Internal module failure, cannot extract public certificate from pkcs12, error: %s" % export_stdout, + module.fail_json(msg="Internal module failure, cannot extract public certificate from PKCS12, message: %s" % export_stdout, + stderr=export_err, rc=export_rc) with open(dest, 'w') as f: From 53da86c1a5efc8c8e397c73776fae8bd993854d7 Mon Sep 17 00:00:00 2001 From: "Fabian P. Schmidt" Date: Mon, 28 Nov 2022 22:51:23 +0100 Subject: [PATCH 0356/2104] unixy Callback: Use Ansible's config manager (#5601) * unixy Callback: Use Ansible's config manager In ansible-core 2.14 deprecated support was removed[1] for accessing options of the DefaultCallback via class attributes. Use the "new" config system instead. [1]: https://github.com/ansible/ansible/commit/dbdbfe845adac977a78c6484da1c5923754d83a2 Fixes #5600. Signed-off-by: Fabian P. Schmidt * Update changelog fragment. Signed-off-by: Fabian P. Schmidt Co-authored-by: Felix Fontein --- .../5601-unixy-callback-use-config-manager.yml | 2 ++ plugins/callback/unixy.py | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5601-unixy-callback-use-config-manager.yml diff --git a/changelogs/fragments/5601-unixy-callback-use-config-manager.yml b/changelogs/fragments/5601-unixy-callback-use-config-manager.yml new file mode 100644 index 0000000000..f3d0362f8f --- /dev/null +++ b/changelogs/fragments/5601-unixy-callback-use-config-manager.yml @@ -0,0 +1,2 @@ +bugfixes: + - unixy callback plugin - fix plugin to work with ansible-core 2.14 by using Ansible's configuration manager for handling options (https://github.com/ansible-collections/community.general/issues/5600). diff --git a/plugins/callback/unixy.py b/plugins/callback/unixy.py index fa26be8238..55f46afd32 100644 --- a/plugins/callback/unixy.py +++ b/plugins/callback/unixy.py @@ -63,7 +63,7 @@ class CallbackModule(CallbackModule_default): def _preprocess_result(self, result): self.delegated_vars = result._result.get('_ansible_delegated_vars', None) - self._handle_exception(result._result, use_stderr=self.display_failed_stderr) + self._handle_exception(result._result, use_stderr=self.get_option('display_failed_stderr')) self._handle_warnings(result._result) def _process_result_output(self, result, msg): @@ -109,7 +109,7 @@ class CallbackModule(CallbackModule_default): self._display.display(msg) def v2_runner_on_skipped(self, result, ignore_errors=False): - if self.display_skipped_hosts: + if self.get_option('display_skipped_hosts'): self._preprocess_result(result) display_color = C.COLOR_SKIP msg = "skipped" @@ -128,7 +128,7 @@ class CallbackModule(CallbackModule_default): msg += " | item: %s" % (item_value,) task_result = self._process_result_output(result, msg) - self._display.display(" " + task_result, display_color, stderr=self.display_failed_stderr) + self._display.display(" " + task_result, display_color, stderr=self.get_option('display_failed_stderr')) def v2_runner_on_ok(self, result, msg="ok", display_color=C.COLOR_OK): self._preprocess_result(result) @@ -142,7 +142,7 @@ class CallbackModule(CallbackModule_default): display_color = C.COLOR_CHANGED task_result = self._process_result_output(result, msg) self._display.display(" " + task_result, display_color) - elif self.display_ok_hosts: + elif self.get('display_ok_hosts'): task_result = self._process_result_output(result, msg) self._display.display(" " + task_result, display_color) @@ -162,7 +162,7 @@ class CallbackModule(CallbackModule_default): display_color = C.COLOR_UNREACHABLE task_result = self._process_result_output(result, msg) - self._display.display(" " + task_result, display_color, stderr=self.display_failed_stderr) + self._display.display(" " + task_result, display_color, stderr=self.get_option('display_failed_stderr')) def v2_on_file_diff(self, result): if result._task.loop and 'results' in result._result: @@ -205,7 +205,7 @@ class CallbackModule(CallbackModule_default): colorize(u'ignored', t['ignored'], None)), log_only=True ) - if stats.custom and self.show_custom_stats: + if stats.custom and self.get_option('show_custom_stats'): self._display.banner("CUSTOM STATS: ") # per host # TODO: come up with 'pretty format' From 101c957631445dc3902eb71f74b0f52708cc8050 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 29 Nov 2022 13:07:08 +0100 Subject: [PATCH 0357/2104] redhat_subscription: drop unneeded args to Rhsm.register() (#5583) Stop passing all the "rhsm_", and "server_" module arguments to "Rhsm.register()", and thus as arguments for "subscription-manager register": - right before calling "Rhsm.register()", "Rhsm.configure()" is called to configure subscription-manager with all the "rhsm_", and "server_" arguments; hence, they are already configured - the passed argument to "--serverurl" is partially wrong: "Rhsm.register()" passes only the hostname, whereas the other bits (port and prefix) are supported too; this "works" because port and prefix were already configured previously, and the lax parsing that subscription-manager does allows for missing bits - the parsing done by subscription-manager for "--baseurl" strips out the URL scheme and always uses https: this means that specifying "rhsm_baseurl: http://server" as module parameter will be taken as "https://server" by subscription-manager; since "rhsm_baseurl" is already configured by "Rhsm.configure()", this issue is gone --- ...hat_subscription-subscribe-parameters.yaml | 3 +++ plugins/modules/redhat_subscription.py | 24 ++----------------- .../modules/test_redhat_subscription.py | 5 ---- 3 files changed, 5 insertions(+), 27 deletions(-) create mode 100644 changelogs/fragments/5583-redhat_subscription-subscribe-parameters.yaml diff --git a/changelogs/fragments/5583-redhat_subscription-subscribe-parameters.yaml b/changelogs/fragments/5583-redhat_subscription-subscribe-parameters.yaml new file mode 100644 index 0000000000..bef3676c3b --- /dev/null +++ b/changelogs/fragments/5583-redhat_subscription-subscribe-parameters.yaml @@ -0,0 +1,3 @@ +bugfixes: + - redhat_subscription - do not pass arguments to ``subscription-manager register`` for things already configured; now a specified ``rhsm_baseurl`` is properly set for subscription-manager + (https://github.com/ansible-collections/community.general/pull/5583). diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index aaf39d6d3f..bb21578fa5 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -394,8 +394,7 @@ class Rhsm(RegistrationBase): def register(self, username, password, auto_attach, activationkey, org_id, consumer_type, consumer_name, consumer_id, force_register, environment, - rhsm_baseurl, server_insecure, server_hostname, server_proxy_hostname, - server_proxy_port, server_proxy_user, server_proxy_password, release): + release): ''' Register the current system to the provided RHSM or Red Hat Satellite or Katello server @@ -409,27 +408,9 @@ class Rhsm(RegistrationBase): if force_register: args.extend(['--force']) - if rhsm_baseurl: - args.extend(['--baseurl', rhsm_baseurl]) - - if server_insecure: - args.extend(['--insecure']) - - if server_hostname: - args.extend(['--serverurl', server_hostname]) - if org_id: args.extend(['--org', org_id]) - if server_proxy_hostname and server_proxy_port: - args.extend(['--proxy', server_proxy_hostname + ':' + server_proxy_port]) - - if server_proxy_user: - args.extend(['--proxyuser', server_proxy_user]) - - if server_proxy_password: - args.extend(['--proxypassword', server_proxy_password]) - if activationkey: args.extend(['--activationkey', activationkey]) else: @@ -924,8 +905,7 @@ def main(): rhsm.configure(**module.params) rhsm.register(username, password, auto_attach, activationkey, org_id, consumer_type, consumer_name, consumer_id, force_register, - environment, rhsm_baseurl, server_insecure, server_hostname, - server_proxy_hostname, server_proxy_port, server_proxy_user, server_proxy_password, release) + environment, release) if syspurpose and 'sync' in syspurpose and syspurpose['sync'] is True: rhsm.sync_syspurpose() if pool_ids: diff --git a/tests/unit/plugins/modules/test_redhat_subscription.py b/tests/unit/plugins/modules/test_redhat_subscription.py index bf65671419..f38f1ffe0d 100644 --- a/tests/unit/plugins/modules/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/test_redhat_subscription.py @@ -92,7 +92,6 @@ TEST_CASES = [ ), ( ['/testbin/subscription-manager', 'register', - '--serverurl', 'satellite.company.com', '--username', 'admin', '--password', 'admin'], {'check_rc': True, 'expand_user_and_vars': False}, @@ -180,7 +179,6 @@ TEST_CASES = [ [ '/testbin/subscription-manager', 'register', - '--serverurl', 'satellite.company.com', '--org', 'admin', '--activationkey', 'some-activation-key' ], @@ -340,9 +338,6 @@ TEST_CASES = [ 'register', '--force', '--org', 'admin', - '--proxy', 'proxy.company.com:12345', - '--proxyuser', 'proxy_user', - '--proxypassword', 'secret_proxy_password', '--username', 'admin', '--password', 'admin' ], From f7fa54eed9f82ea2d0287541d9bef31a8e3631d3 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 30 Nov 2022 22:15:55 +0100 Subject: [PATCH 0358/2104] redhat_subscription: don't discard vars with key (#5627) Fixes #3486. From the man-pages of subscription-manager, none of the parameters used are tied to the activationkey except the two that remain in its else-clause. Note that type is not mentioned in the man-pages on 7.6 (at least), but is still present and available. Co-authored-by: Thor K. H --- ...t_subscription-subscribe-parameters-2.yaml | 3 +++ plugins/modules/redhat_subscription.py | 25 +++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5627-redhat_subscription-subscribe-parameters-2.yaml diff --git a/changelogs/fragments/5627-redhat_subscription-subscribe-parameters-2.yaml b/changelogs/fragments/5627-redhat_subscription-subscribe-parameters-2.yaml new file mode 100644 index 0000000000..c76f6871d8 --- /dev/null +++ b/changelogs/fragments/5627-redhat_subscription-subscribe-parameters-2.yaml @@ -0,0 +1,3 @@ +bugfixes: + - redhat_subscription - do not ignore ``consumer_name`` and other variables if ``activationkey`` is specified + (https://github.com/ansible-collections/community.general/issues/3486, https://github.com/ansible-collections/community.general/pull/5627). diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index bb21578fa5..041c1a0097 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -411,23 +411,28 @@ class Rhsm(RegistrationBase): if org_id: args.extend(['--org', org_id]) + if auto_attach: + args.append('--auto-attach') + + if consumer_type: + args.extend(['--type', consumer_type]) + + if consumer_name: + args.extend(['--name', consumer_name]) + + if consumer_id: + args.extend(['--consumerid', consumer_id]) + + if environment: + args.extend(['--environment', environment]) + if activationkey: args.extend(['--activationkey', activationkey]) else: - if auto_attach: - args.append('--auto-attach') if username: args.extend(['--username', username]) if password: args.extend(['--password', password]) - if consumer_type: - args.extend(['--type', consumer_type]) - if consumer_name: - args.extend(['--name', consumer_name]) - if consumer_id: - args.extend(['--consumerid', consumer_id]) - if environment: - args.extend(['--environment', environment]) if release: args.extend(['--release', release]) From b8545d10e6dc0655995fe354b285871ce1f263b2 Mon Sep 17 00:00:00 2001 From: Carlos Neira Date: Wed, 30 Nov 2022 18:41:35 -0300 Subject: [PATCH 0359/2104] Fix for vmadm get_vm_uuid out of range (#5628) * Fix for vmadm get_vm_uuid out of range * Fix for vmadm get_vm_uuid out of range * Update changelogs/fragments/5628-fix-vmadm-off-by-one.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5628-fix-vmadm-off-by-one.yml | 2 ++ plugins/modules/vmadm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5628-fix-vmadm-off-by-one.yml diff --git a/changelogs/fragments/5628-fix-vmadm-off-by-one.yml b/changelogs/fragments/5628-fix-vmadm-off-by-one.yml new file mode 100644 index 0000000000..bcb7bf63e6 --- /dev/null +++ b/changelogs/fragments/5628-fix-vmadm-off-by-one.yml @@ -0,0 +1,2 @@ +bugfixes: + - vmadm - fix for index out of range error in ``get_vm_uuid`` (https://github.com/ansible-collections/community.general/pull/5628). diff --git a/plugins/modules/vmadm.py b/plugins/modules/vmadm.py index 6b4490ca57..d6110726f4 100644 --- a/plugins/modules/vmadm.py +++ b/plugins/modules/vmadm.py @@ -438,7 +438,7 @@ def get_vm_prop(module, uuid, prop): def get_vm_uuid(module, alias): # Lookup the uuid that goes with the given alias. # Returns the uuid or '' if not found. - cmd = [module.vmadm, 'lookup', '-j', '-o', 'uuid', 'alias={1}'.format(alias)] + cmd = [module.vmadm, 'lookup', '-j', '-o', 'uuid', 'alias={0}'.format(alias)] (rc, stdout, stderr) = module.run_command(cmd) From 428e181440dc92378c7326d9d2bfadda052ce372 Mon Sep 17 00:00:00 2001 From: Lee Garrett Date: Wed, 30 Nov 2022 22:48:32 +0100 Subject: [PATCH 0360/2104] vdo: Use yaml.safe_load() instead of yaml.load() (#5632) * vdo: Use yaml.safe_load() instead of yaml.load() yaml.load() without specifying a Loader= is deprecated and unsafe. For details, see https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation * Update changelogs/fragments/5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml Co-authored-by: Felix Fontein Co-authored-by: Lee Garrett Co-authored-by: Felix Fontein --- .../5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml | 2 ++ plugins/modules/vdo.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml diff --git a/changelogs/fragments/5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml b/changelogs/fragments/5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml new file mode 100644 index 0000000000..c2b0756eca --- /dev/null +++ b/changelogs/fragments/5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml @@ -0,0 +1,2 @@ +bugfixes: + - vdo - now uses ``yaml.safe_load()`` to parse command output instead of the deprecated ``yaml.load()`` which is potentially unsafe. Using ``yaml.load()`` without explicitely setting a ``Loader=`` is also an error in pyYAML 6.0 (https://github.com/ansible-collections/community.general/pull/5632). diff --git a/plugins/modules/vdo.py b/plugins/modules/vdo.py index 21e8a96100..d2d4afe944 100644 --- a/plugins/modules/vdo.py +++ b/plugins/modules/vdo.py @@ -332,7 +332,7 @@ def inventory_vdos(module, vdocmd): if rc != 0: module.fail_json(msg="Inventorying VDOs failed: %s" % vdostatusout, rc=rc, err=err) - vdostatusyaml = yaml.load(vdostatusout) + vdostatusyaml = yaml.safe_load(vdostatusout) if vdostatusyaml is None: return vdolist @@ -548,7 +548,7 @@ def run_module(): # Modify the current parameters of a VDO that exists. if desiredvdo in vdolist and state == 'present': rc, vdostatusoutput, err = module.run_command([vdocmd, "status"]) - vdostatusyaml = yaml.load(vdostatusoutput) + vdostatusyaml = yaml.safe_load(vdostatusoutput) # An empty dictionary to contain dictionaries of VDO statistics processedvdos = {} From 03039a56c0a409b574f79f456df72950d95362c6 Mon Sep 17 00:00:00 2001 From: William McBroom Date: Thu, 1 Dec 2022 15:17:09 -0600 Subject: [PATCH 0361/2104] Remove automatically adding # symbol to channel names (#5629) * Add regex to match all channel ids * Add changelog fragment * Allow matching of channel ids with 9-11 characters * Fix file name * Update changelogs/fragments/5629-add-channel-prefix-regex.yml Co-authored-by: Felix Fontein * Remove channel auto prepend # * Update changelog fragment * Add prepend_hash option * Add version_added to prepend_hash doc string Co-authored-by: Felix Fontein * Add description of possible values for the prepend_hash option Co-authored-by: Felix Fontein * Remove old channel assign statement * Update changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml Co-authored-by: Felix Fontein * Update changelog fragment tag Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...add-prepend-hash-option-for-channel-id.yml | 2 ++ plugins/modules/slack.py | 32 ++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml diff --git a/changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml b/changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml new file mode 100644 index 0000000000..f38a6b4e13 --- /dev/null +++ b/changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml @@ -0,0 +1,2 @@ +minor_changes: + - "slack - add option ``prepend_hash`` which allows to control whether a ``#`` is prepended to ``channel_id``. The current behavior (value ``auto``) is to prepend ``#`` unless some specific prefixes are found. That list of prefixes is incomplete, and there does not seem to exist a documented condition on when exactly ``#`` must not be prepended. We recommend to explicitly set ``prepend_hash=always`` or ``prepend_hash=never`` to avoid any ambiguity (https://github.com/ansible-collections/community.general/pull/5629)." \ No newline at end of file diff --git a/plugins/modules/slack.py b/plugins/modules/slack.py index 46602a5d16..2854277f60 100644 --- a/plugins/modules/slack.py +++ b/plugins/modules/slack.py @@ -129,6 +129,21 @@ options: type: list elements: dict version_added: 1.0.0 + prepend_hash: + type: str + description: + - Setting for automatically prepending a C(#) symbol on the passed in I(channel_id). + - The C(auto) method prepends a C(#) unless I(channel_id) starts with one of C(#), C(@), C(C0), C(GF), C(G0), C(CP). + These prefixes only cover a small set of the prefixes that should not have a C(#) prepended. + Since an exact condition which I(channel_id) values must not have the C(#) prefix is not known, + the value C(auto) for this option will be deprecated in the future. It is best to explicitly set + I(prepend_hash=always) or I(prepend_hash=never) to obtain the needed behavior. + choices: + - 'always' + - 'never' + - 'auto' + default: 'auto' + version_added: 6.1.0 """ EXAMPLES = """ @@ -289,7 +304,7 @@ def recursive_escape_quotes(obj, keys): def build_payload_for_slack(text, channel, thread_id, username, icon_url, icon_emoji, link_names, - parse, color, attachments, blocks, message_id): + parse, color, attachments, blocks, message_id, prepend_hash): payload = {} if color == "normal" and text is not None: payload = dict(text=escape_quotes(text)) @@ -297,10 +312,15 @@ def build_payload_for_slack(text, channel, thread_id, username, icon_url, icon_e # With a custom color we have to set the message as attachment, and explicitly turn markdown parsing on for it. payload = dict(attachments=[dict(text=escape_quotes(text), color=color, mrkdwn_in=["text"])]) if channel is not None: - if channel.startswith(('#', '@', 'C0', 'GF', 'G0', 'CP')): - payload['channel'] = channel - else: + if prepend_hash == 'auto': + if channel.startswith(('#', '@', 'C0', 'GF', 'G0', 'CP')): + payload['channel'] = channel + else: + payload['channel'] = '#' + channel + elif prepend_hash == 'always': payload['channel'] = '#' + channel + elif prepend_hash == 'never': + payload['channel'] = channel if thread_id is not None: payload['thread_ts'] = thread_id if username is not None: @@ -428,6 +448,7 @@ def main(): attachments=dict(type='list', elements='dict'), blocks=dict(type='list', elements='dict'), message_id=dict(type='str'), + prepend_hash=dict(type='str', default='auto', choices=['always', 'never', 'auto']), ), supports_check_mode=True, ) @@ -446,6 +467,7 @@ def main(): attachments = module.params['attachments'] blocks = module.params['blocks'] message_id = module.params['message_id'] + prepend_hash = module.params['prepend_hash'] color_choices = ['normal', 'good', 'warning', 'danger'] if color not in color_choices and not is_valid_hex_color(color): @@ -470,7 +492,7 @@ def main(): module.exit_json(changed=changed) payload = build_payload_for_slack(text, channel, thread_id, username, icon_url, icon_emoji, link_names, - parse, color, attachments, blocks, message_id) + parse, color, attachments, blocks, message_id, prepend_hash) slack_response = do_notify_slack(module, domain, token, payload) if 'ok' in slack_response: From da7cba4c12dcdf04a41949f05ccf9d9d952da57d Mon Sep 17 00:00:00 2001 From: Dorian Monnier Date: Thu, 1 Dec 2022 22:20:11 +0100 Subject: [PATCH 0362/2104] Fix example in keycloak_realm documentation (#5639) --- plugins/modules/keycloak_realm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/keycloak_realm.py b/plugins/modules/keycloak_realm.py index f457d20cd3..73a17cf10b 100644 --- a/plugins/modules/keycloak_realm.py +++ b/plugins/modules/keycloak_realm.py @@ -519,6 +519,7 @@ EXAMPLES = ''' auth_username: USERNAME auth_password: PASSWORD id: realm + realm: realm state: present - name: Delete a Keycloak realm From fd436bdbc2917365580851a9a0cf940875633ea1 Mon Sep 17 00:00:00 2001 From: Torgny Bjers Date: Fri, 2 Dec 2022 00:43:22 -0500 Subject: [PATCH 0363/2104] fix typo disable_looups in inventory/proxmox (#5640) * fix typo disable_looups in inventory/proxmox - resolve issue with lookups in proxmox inventory config * add changelog fragment * Update changelogs/fragments/5640-fix-typo-proxmox-inventory.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5640-fix-typo-proxmox-inventory.yml | 2 ++ plugins/inventory/proxmox.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5640-fix-typo-proxmox-inventory.yml diff --git a/changelogs/fragments/5640-fix-typo-proxmox-inventory.yml b/changelogs/fragments/5640-fix-typo-proxmox-inventory.yml new file mode 100644 index 0000000000..d5b8de5aea --- /dev/null +++ b/changelogs/fragments/5640-fix-typo-proxmox-inventory.yml @@ -0,0 +1,2 @@ +bugfixes: + - "proxmox inventory plugin - fix bug while templating when using templates for the ``url``, ``user``, ``password``, ``token_id``, or ``token_secret`` options (https://github.com/ansible-collections/community.general/pull/5640)." diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index b24bcacf25..904579a494 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -615,7 +615,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): for o in ('url', 'user', 'password', 'token_id', 'token_secret'): v = self.get_option(o) if self.templar.is_template(v): - v = self.templar.template(v, disable_looups=False) + v = self.templar.template(v, disable_lookups=False) setattr(self, 'proxmox_%s' % o, v) # some more cleanup and validation From 23aacc78e1dd4eb6a05fea4a243075fd6ed0e2ef Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 3 Dec 2022 15:16:55 -0600 Subject: [PATCH 0364/2104] Reenable and enhance `copr` integration tests (#5638) * Enhance `copr` integration tests - Switch to a new test Copr repository. @copr/integration_tests was removed which caused the tests to fail. I created a new one under my account that I'll ensure stays around. - Add basic testing to ensure that repo files are created in the correct location and contain the correct baseurl and enabled status. - Also run tests on Enterprise Linux. - Test that packages from the Copr install. This has to be disabled on EOL Fedoras that Copr does not allow building new packages for. Resolves: https://github.com/ansible-collections/community.general/issues/5595 * copr tests: Fix ansible_python_interpreter on c8s * copr: Don't test on alt Pythons on cs8 * Revert "copr tests: Fix ansible_python_interpreter on c8s" This reverts commit 58e15a7ebf3a8b270a7ada1a3834ab8322ca006c. --- tests/integration/targets/copr/aliases | 2 - tests/integration/targets/copr/tasks/main.yml | 112 ++++++++++++++++-- tests/integration/targets/copr/vars/main.yml | 15 +++ 3 files changed, 117 insertions(+), 12 deletions(-) create mode 100644 tests/integration/targets/copr/vars/main.yml diff --git a/tests/integration/targets/copr/aliases b/tests/integration/targets/copr/aliases index c9fc0e0a2f..ed3c1af00d 100644 --- a/tests/integration/targets/copr/aliases +++ b/tests/integration/targets/copr/aliases @@ -7,5 +7,3 @@ needs/root skip/macos skip/osx skip/freebsd - -disabled # FIXME tests are currently failing diff --git a/tests/integration/targets/copr/tasks/main.yml b/tests/integration/targets/copr/tasks/main.yml index ac78255d48..917e44b7ec 100644 --- a/tests/integration/targets/copr/tasks/main.yml +++ b/tests/integration/targets/copr/tasks/main.yml @@ -3,14 +3,27 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- when: ansible_distribution == 'Fedora' +- when: + # Fedora or RHEL >= 8 + # This module requires the dnf module which is not available on RHEL 7. + - > + ansible_distribution == 'Fedora' + or (ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' + and ansible_distribution_major_version | int >= 8) + # The copr module imports dnf which is only available for the system Python + # interpreter. + - > + not (ansible_distribution == 'CentOS' and + ansible_distribution_major_version | int == 8 and not + ansible_python_version.startswith('3.6')) block: + - debug: var=copr_chroot - name: enable copr project copr: host: copr.fedorainfracloud.org state: enabled - name: '@copr/integration_tests' - chroot: fedora-rawhide-x86_64 + name: '{{ copr_fullname }}' + chroot: "{{ copr_chroot }}" register: result - name: assert that the copr project was enabled @@ -24,8 +37,8 @@ check_mode: yes copr: state: enabled - name: '@copr/integration_tests' - chroot: fedora-rawhide-x86_64 + name: '{{ copr_fullname }}' + chroot: '{{ copr_chroot }}' register: result - name: assert that the copr project was enabled @@ -34,10 +47,53 @@ - result is not changed - result.msg == 'enabled' + - name: Ensure the repo is installed and enabled | slurp + register: result + ansible.builtin.slurp: + src: "{{ copr_repofile }}" + + - name: Ensure the repo is installed and enabled + vars: + content: "{{ result.content | b64decode }}" + _baseurl: "{{ 'https://download.copr.fedorainfracloud.org/results/gotmax23/community.general.copr_integration_tests' | regex_escape }}" + baseurl: "{{ content | regex_search('baseurl=' ~ _baseurl) }}" + block: + - ansible.builtin.debug: + var: content + - ansible.builtin.debug: + var: baseurl + - name: Ensure the repo is installed and enabled + ansible.builtin.assert: + that: + - "'enabled=1' in content" + - baseurl | length > 0 + + - name: Install test package from Copr + when: + # Copr does not build new packages for EOL Fedoras. + - > + not (ansible_distribution == 'Fedora' and + ansible_distribution_major_version | int < 35) + block: + - name: install test package from the copr + ansible.builtin.package: + update_cache: true + name: copr-module-integration-dummy-package + + - name: uninstall test package + register: result + ansible.builtin.package: + name: copr-module-integration-dummy-package + state: absent + + - name: check uninstall test package + ansible.builtin.assert: + that: result.changed | bool + - name: remove copr project copr: state: absent - name: '@copr/integration_tests' + name: '{{ copr_fullname }}' register: result - name: assert that the copr project was removed @@ -46,11 +102,20 @@ - 'result is changed' - result.msg == 'absent' + - name: Ensure the repo file was removed | stat + register: result + ansible.builtin.stat: + dest: "{{ copr_repofile }}" + + - name: Ensure the repo file was removed + ansible.builtin.assert: + that: not result.stat.exists | bool + - name: disable copr project copr: state: disabled - name: '@copr/integration_tests' - chroot: fedora-rawhide-x86_64 + name: '{{ copr_fullname }}' + chroot: '{{ copr_chroot }}' register: result - name: assert that the copr project was disabled @@ -59,10 +124,37 @@ - 'result is changed' - result.msg == 'disabled' + - name: Ensure the repo is installed but disabled | slurp + register: result + ansible.builtin.slurp: + src: "{{ copr_repofile }}" + + - name: Ensure the repo is installed but disabled + vars: + content: "{{ result.content | b64decode }}" + _baseurl: "{{ 'https://download.copr.fedorainfracloud.org/results/gotmax23/community.general.copr_integration_tests' | regex_escape }}" + baseurl: "{{ content | regex_search('baseurl=' ~ _baseurl) }}" + block: + - ansible.builtin.debug: + var: content + - ansible.builtin.debug: + var: baseurl + - name: Ensure the repo is installed but disabled + ansible.builtin.assert: + that: + - "'enabled=0' in content" + - baseurl | length > 0 + always: - name: clean up + ignore_errors: true copr: host: copr.fedorainfracloud.org state: absent - name: '@copr/integration_tests' - chroot: fedora-rawhide-x86_64 + name: '{{ copr_fullname }}' + chroot: '{{ copr_chroot }}' + + - name: cleanup test package + ansible.builtin.package: + name: copr-module-integration-dummy-package + state: absent diff --git a/tests/integration/targets/copr/vars/main.yml b/tests/integration/targets/copr/vars/main.yml new file mode 100644 index 0000000000..a37a44d478 --- /dev/null +++ b/tests/integration/targets/copr/vars/main.yml @@ -0,0 +1,15 @@ +# Copyright (c) 2022 Maxwell G +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or +# https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +--- +copr_host: copr.fedorainfracloud.org +copr_namespace: gotmax23 +copr_name: community.general.copr_integration_tests +copr_fullname: '{{ copr_namespace }}/{{ copr_name }}' +copr_repofile: '/etc/yum.repos.d/_copr:{{ copr_host }}:{{ copr_namespace }}:{{ copr_name }}.repo' + +# TODO: Fix chroot autodetection so this isn't necessary +_copr_chroot_fedora: "fedora-rawhide-x86_64" +_copr_chroot_rhelish: "epel-{{ ansible_distribution_major_version }}-x86_64" +copr_chroot: "{{ _copr_chroot_fedora if ansible_distribution == 'Fedora' else _copr_chroot_rhelish }}" From be22ca063354507fbafb6d55032be39636bbf036 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 5 Dec 2022 00:18:33 +1300 Subject: [PATCH 0365/2104] cmd_runner: allow bool format to pass alternate (false) value (#5647) * allow bool format to pass alternate (false) value * add changelog fragment --- changelogs/fragments/5647-cmd-runner-as-bool-false.yml | 2 ++ plugins/module_utils/cmd_runner.py | 9 +++++++-- tests/unit/plugins/module_utils/test_cmd_runner.py | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5647-cmd-runner-as-bool-false.yml diff --git a/changelogs/fragments/5647-cmd-runner-as-bool-false.yml b/changelogs/fragments/5647-cmd-runner-as-bool-false.yml new file mode 100644 index 0000000000..5dc447d235 --- /dev/null +++ b/changelogs/fragments/5647-cmd-runner-as-bool-false.yml @@ -0,0 +1,2 @@ +minor_changes: + - cmd_runner module utils - ``cmd_runner_fmt.as_bool()`` can now take an extra parameter to format when value is false (https://github.com/ansible-collections/community.general/pull/5647). diff --git a/plugins/module_utils/cmd_runner.py b/plugins/module_utils/cmd_runner.py index 38daac6716..21d61a6a5c 100644 --- a/plugins/module_utils/cmd_runner.py +++ b/plugins/module_utils/cmd_runner.py @@ -103,8 +103,13 @@ class _ArgFormat(object): class _Format(object): @staticmethod - def as_bool(args): - return _ArgFormat(lambda value: _ensure_list(args) if value else []) + def as_bool(args_true, args_false=None, ignore_none=None): + if args_false is not None: + if ignore_none is None: + ignore_none = False + else: + args_false = [] + return _ArgFormat(lambda value: _ensure_list(args_true) if value else _ensure_list(args_false), ignore_none=ignore_none) @staticmethod def as_bool_not(args): diff --git a/tests/unit/plugins/module_utils/test_cmd_runner.py b/tests/unit/plugins/module_utils/test_cmd_runner.py index f1c3e25a9b..7cec215a76 100644 --- a/tests/unit/plugins/module_utils/test_cmd_runner.py +++ b/tests/unit/plugins/module_utils/test_cmd_runner.py @@ -18,6 +18,10 @@ TC_FORMATS = dict( simple_boolean__true=(fmt.as_bool, ("--superflag",), True, ["--superflag"]), simple_boolean__false=(fmt.as_bool, ("--superflag",), False, []), simple_boolean__none=(fmt.as_bool, ("--superflag",), None, []), + simple_boolean_both__true=(fmt.as_bool, ("--superflag", "--falseflag"), True, ["--superflag"]), + simple_boolean_both__false=(fmt.as_bool, ("--superflag", "--falseflag"), False, ["--falseflag"]), + simple_boolean_both__none=(fmt.as_bool, ("--superflag", "--falseflag"), None, ["--falseflag"]), + simple_boolean_both__none_ig=(fmt.as_bool, ("--superflag", "--falseflag", True), None, []), simple_boolean_not__true=(fmt.as_bool_not, ("--superflag",), True, []), simple_boolean_not__false=(fmt.as_bool_not, ("--superflag",), False, ["--superflag"]), simple_boolean_not__none=(fmt.as_bool_not, ("--superflag",), None, ["--superflag"]), From 632fc07e65778cf236a8da35bf4204bddcd052b0 Mon Sep 17 00:00:00 2001 From: domelek <40233039+domelek@users.noreply.github.com> Date: Sun, 4 Dec 2022 12:42:46 +0100 Subject: [PATCH 0366/2104] Updated tags delimiter (#5602) * Updated tags delimiter Starting from Proxmox 7.3 tags are delimited by semicolon. For backward compatibility it needs to be splitted by both commas and semicolons. * Added missing space * Add changelog fragment. Co-authored-by: Felix Fontein --- changelogs/fragments/5602-proxmox-tags.yml | 2 ++ plugins/inventory/proxmox.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5602-proxmox-tags.yml diff --git a/changelogs/fragments/5602-proxmox-tags.yml b/changelogs/fragments/5602-proxmox-tags.yml new file mode 100644 index 0000000000..32498f0366 --- /dev/null +++ b/changelogs/fragments/5602-proxmox-tags.yml @@ -0,0 +1,2 @@ +bugfixes: + - "proxmox inventory plugin - handle tags delimited by semicolon instead of comma, which happens from Proxmox 7.3 on (https://github.com/ansible-collections/community.general/pull/5602)." diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index 904579a494..e33f7ed77d 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -408,7 +408,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): stripped_value = value.strip() if stripped_value: parsed_key = key + "_parsed" - properties[parsed_key] = [tag.strip() for tag in stripped_value.split(",")] + properties[parsed_key] = [tag.strip() for tag in stripped_value.replace(',', ';').split(";")] # The first field in the agent string tells you whether the agent is enabled # the rest of the comma separated string is extra config for the agent. From fb2833d34d5e8b389ed017084d87ea6b079d4d9b Mon Sep 17 00:00:00 2001 From: Arek Kalandyk <36413794+koralowiec@users.noreply.github.com> Date: Sun, 4 Dec 2022 12:57:54 +0100 Subject: [PATCH 0367/2104] feat(ssh_config): host_key_algorithms option (#5605) * feat(ssh_config): host_key_algorithms option * chore: add changelog fragment * chore(ssh_config): add version info to option and update fragment --- .../5605-ssh-config-add-host-key-algorithms.yaml | 2 ++ plugins/modules/ssh_config.py | 7 +++++++ .../targets/ssh_config/tasks/options.yml | 13 +++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 changelogs/fragments/5605-ssh-config-add-host-key-algorithms.yaml diff --git a/changelogs/fragments/5605-ssh-config-add-host-key-algorithms.yaml b/changelogs/fragments/5605-ssh-config-add-host-key-algorithms.yaml new file mode 100644 index 0000000000..1535d9b13d --- /dev/null +++ b/changelogs/fragments/5605-ssh-config-add-host-key-algorithms.yaml @@ -0,0 +1,2 @@ +minor_changes: + - ssh_config - add ``host_key_algorithms`` option (https://github.com/ansible-collections/community.general/pull/5605). diff --git a/plugins/modules/ssh_config.py b/plugins/modules/ssh_config.py index 00a0525d6c..cb028ac8e5 100644 --- a/plugins/modules/ssh_config.py +++ b/plugins/modules/ssh_config.py @@ -88,6 +88,11 @@ options: - If I(user) and this option are not specified, C(/etc/ssh/ssh_config) is used. - Mutually exclusive with I(user). type: path + host_key_algorithms: + description: + - Sets the C(HostKeyAlgorithms) option. + type: str + version_added: 6.1.0 requirements: - StormSSH notes: @@ -207,6 +212,7 @@ class SSHConfig(): strict_host_key_checking=self.params.get('strict_host_key_checking'), user_known_hosts_file=self.params.get('user_known_hosts_file'), proxycommand=self.params.get('proxycommand'), + host_key_algorithms=self.params.get('host_key_algorithms'), ) # Convert True / False to 'yes' / 'no' for usage in ssh_config @@ -297,6 +303,7 @@ def main(): group=dict(default=None, type='str'), host=dict(type='str', required=True), hostname=dict(type='str'), + host_key_algorithms=dict(type='str', no_log=False), identity_file=dict(type='path'), port=dict(type='str'), proxycommand=dict(type='str', default=None), diff --git a/tests/integration/targets/ssh_config/tasks/options.yml b/tests/integration/targets/ssh_config/tasks/options.yml index 04586873ad..65ce691cf8 100644 --- a/tests/integration/targets/ssh_config/tasks/options.yml +++ b/tests/integration/targets/ssh_config/tasks/options.yml @@ -15,6 +15,7 @@ host: "options.example.com" proxycommand: "ssh jumphost.example.com -W %h:%p" forward_agent: true + host_key_algorithms: "+ssh-rsa" state: present register: options_add check_mode: yes @@ -43,6 +44,7 @@ host: "options.example.com" proxycommand: "ssh jumphost.example.com -W %h:%p" forward_agent: true + host_key_algorithms: "+ssh-rsa" state: present register: options_add @@ -60,6 +62,7 @@ host: "options.example.com" proxycommand: "ssh jumphost.example.com -W %h:%p" forward_agent: true + host_key_algorithms: "+ssh-rsa" state: present register: options_add_again @@ -81,6 +84,7 @@ that: - "'proxycommand ssh jumphost.example.com -W %h:%p' in slurp_ssh_config['content'] | b64decode" - "'forwardagent yes' in slurp_ssh_config['content'] | b64decode" + - "'hostkeyalgorithms +ssh-rsa' in slurp_ssh_config['content'] | b64decode" - name: Options - Update host community.general.ssh_config: @@ -88,6 +92,7 @@ host: "options.example.com" proxycommand: "ssh new-jumphost.example.com -W %h:%p" forward_agent: no + host_key_algorithms: "+ssh-ed25519" state: present register: options_update @@ -107,6 +112,7 @@ host: "options.example.com" proxycommand: "ssh new-jumphost.example.com -W %h:%p" forward_agent: no + host_key_algorithms: "+ssh-ed25519" state: present register: options_update @@ -129,6 +135,7 @@ that: - "'proxycommand ssh new-jumphost.example.com -W %h:%p' in slurp_ssh_config['content'] | b64decode" - "'forwardagent no' in slurp_ssh_config['content'] | b64decode" + - "'hostkeyalgorithms +ssh-ed25519' in slurp_ssh_config['content'] | b64decode" - name: Options - Ensure no update in case option exist in ssh_config file but wasn't defined in playbook community.general.ssh_config: @@ -156,6 +163,11 @@ that: - "'proxycommand ssh new-jumphost.example.com -W %h:%p' in slurp_ssh_config['content'] | b64decode" - "'forwardagent no' in slurp_ssh_config['content'] | b64decode" + - "'hostkeyalgorithms +ssh-ed25519' in slurp_ssh_config['content'] | b64decode" + +- name: Debug + debug: + msg: "{{ slurp_ssh_config['content'] | b64decode }}" - name: Options - Delete a host community.general.ssh_config: @@ -197,3 +209,4 @@ that: - "'proxycommand ssh new-jumphost.example.com -W %h:%p' not in slurp_ssh_config['content'] | b64decode" - "'forwardagent no' not in slurp_ssh_config['content'] | b64decode" + - "'hostkeyalgorithms +ssh-ed25519' not in slurp_ssh_config['content'] | b64decode" From 7ea544a6244c7324e45c6972cdf0b6674797e0e9 Mon Sep 17 00:00:00 2001 From: John Cant Date: Mon, 5 Dec 2022 05:22:14 +0000 Subject: [PATCH 0368/2104] New Module: Keycloak ClientSecret with PR changes (#5606) * feat(plugins/keycloak): add get and create util function for client secret * feat(plugins/keycloak): add client secret module * chore: add maintainer in BOTMETA * Update plugins/modules/identity/keycloak/keycloak_clientsecret.py Co-authored-by: Felix Fontein * Make changes to keycloak_clientsecret from PR * Add SPDX identifier for keycloak_clientsecret * Add copyright in keycloak_clientsecret for REUSE * Add integration test for keycloak_clientsecret * rm clientsecret from keycloak_clientsecret result - end_state used instead * keycloak_clientsecret: Undo meta/runtime.yml change * Fix sanity tests for keycloak_clientsecret * New keycloak_clientsecret_info module - Replaces keycloak_clientsecret - Module definition and some common logic moved into module_utils - Update documentation, tests, etc. - Add myself as author * Misc fixes to keycloak_clientsecret_info * Add keycloak_clientsecret_regenerate module * keycloak_clientsecret* Update .github/BOTMETA.yml * keycloak_clientsecret_regenerate: Fix sanity tests * Fix README for keycloak_clientsecret integration test * Separate out keycloak_clientsecret module_utils * Keycloak_clientsecret module_utils: boilerplate * Update plugins/modules/keycloak_clientsecret_info.py Co-authored-by: Felix Fontein * Update plugins/modules/keycloak_clientsecret_info.py Co-authored-by: Felix Fontein * Update plugins/modules/keycloak_clientsecret_info.py Co-authored-by: Felix Fontein * Update plugins/modules/keycloak_clientsecret_info.py Co-authored-by: Felix Fontein * Update plugins/modules/keycloak_clientsecret_info.py Co-authored-by: Felix Fontein * Update plugins/modules/keycloak_clientsecret_info.py Co-authored-by: Felix Fontein * keycloak_clientsecret: Add no_log to examples and docs * keycloak_clientsecret: Update BOTMETA * Update .github/BOTMETA.yml Co-authored-by: Felix Fontein Co-authored-by: fynncfchen Co-authored-by: Fynnnnn Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 6 + .../identity/keycloak/keycloak.py | 48 +++++ .../keycloak/keycloak_clientsecret.py | 77 ++++++++ plugins/modules/keycloak_clientsecret_info.py | 161 +++++++++++++++++ .../keycloak_clientsecret_regenerate.py | 167 ++++++++++++++++++ .../keycloak_clientsecret_info/README.md | 17 ++ .../docker-compose.yml | 31 ++++ .../keycloak_clientsecret_info/tasks/main.yml | 48 +++++ .../keycloak_clientsecret_info/vars/main.yml | 20 +++ .../README.md | 17 ++ .../docker-compose.yml | 31 ++++ .../tasks/main.yml | 49 +++++ .../vars/main.yml | 20 +++ 13 files changed, 692 insertions(+) create mode 100644 plugins/module_utils/identity/keycloak/keycloak_clientsecret.py create mode 100644 plugins/modules/keycloak_clientsecret_info.py create mode 100644 plugins/modules/keycloak_clientsecret_regenerate.py create mode 100644 tests/integration/targets/keycloak_clientsecret_info/README.md create mode 100644 tests/integration/targets/keycloak_clientsecret_info/docker-compose.yml create mode 100644 tests/integration/targets/keycloak_clientsecret_info/tasks/main.yml create mode 100644 tests/integration/targets/keycloak_clientsecret_info/vars/main.yml create mode 100644 tests/integration/targets/keycloak_clientsecret_regenerate/README.md create mode 100644 tests/integration/targets/keycloak_clientsecret_regenerate/docker-compose.yml create mode 100644 tests/integration/targets/keycloak_clientsecret_regenerate/tasks/main.yml create mode 100644 tests/integration/targets/keycloak_clientsecret_regenerate/vars/main.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index c8e19d0b13..18f4f66e1f 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -281,6 +281,8 @@ files: maintainers: $team_huawei $module_utils/identity/keycloak/keycloak.py: maintainers: $team_keycloak + $module_utils/identity/keycloak/keycloak_clientsecret.py: + maintainers: $team_keycloak fynncfchen johncant $module_utils/ipa.py: labels: ipa maintainers: $team_ipa @@ -668,6 +670,10 @@ files: maintainers: Gaetan2907 $modules/keycloak_clientscope.py: maintainers: Gaetan2907 + $modules/keycloak_clientsecret_info.py: + maintainers: fynncfchen johncant + $modules/keycloak_clientsecret_regenerate.py: + maintainers: fynncfchen johncant $modules/keycloak_group.py: maintainers: adamgoossens $modules/keycloak_identity_provider.py: diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 078925ef71..87b2120318 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -58,6 +58,8 @@ URL_CLIENT_USER_ROLEMAPPINGS = "{url}/admin/realms/{realm}/users/{id}/role-mappi URL_CLIENT_USER_ROLEMAPPINGS_AVAILABLE = "{url}/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}/available" URL_CLIENT_USER_ROLEMAPPINGS_COMPOSITE = "{url}/admin/realms/{realm}/users/{id}/role-mappings/clients/{client}/composite" +URL_CLIENTSECRET = "{url}/admin/realms/{realm}/clients/{id}/client-secret" + URL_AUTHENTICATION_FLOWS = "{url}/admin/realms/{realm}/authentication/flows" URL_AUTHENTICATION_FLOW = "{url}/admin/realms/{realm}/authentication/flows/{id}" URL_AUTHENTICATION_FLOW_COPY = "{url}/admin/realms/{realm}/authentication/flows/{copyfrom}/copy" @@ -1160,6 +1162,52 @@ class KeycloakAPI(object): self.module.fail_json(msg='Could not update protocolmappers for clientscope %s in realm %s: %s' % (mapper_rep, realm, str(e))) + def create_clientsecret(self, id, realm="master"): + """ Generate a new client secret by id + + :param id: id (not clientId) of client to be queried + :param realm: client from this realm + :return: dict of credential representation + """ + clientsecret_url = URL_CLIENTSECRET.format(url=self.baseurl, realm=realm, id=id) + + try: + return json.loads(to_native(open_url(clientsecret_url, method='POST', headers=self.restheaders, timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + + except HTTPError as e: + if e.code == 404: + return None + else: + self.module.fail_json(msg='Could not obtain clientsecret of client %s for realm %s: %s' + % (id, realm, str(e))) + except Exception as e: + self.module.fail_json(msg='Could not obtain clientsecret of client %s for realm %s: %s' + % (id, realm, str(e))) + + def get_clientsecret(self, id, realm="master"): + """ Obtain client secret by id + + :param id: id (not clientId) of client to be queried + :param realm: client from this realm + :return: dict of credential representation + """ + clientsecret_url = URL_CLIENTSECRET.format(url=self.baseurl, realm=realm, id=id) + + try: + return json.loads(to_native(open_url(clientsecret_url, method='GET', headers=self.restheaders, timeout=self.connection_timeout, + validate_certs=self.validate_certs).read())) + + except HTTPError as e: + if e.code == 404: + return None + else: + self.module.fail_json(msg='Could not obtain clientsecret of client %s for realm %s: %s' + % (id, realm, str(e))) + except Exception as e: + self.module.fail_json(msg='Could not obtain clientsecret of client %s for realm %s: %s' + % (id, realm, str(e))) + def get_groups(self, realm="master"): """ Fetch the name and ID of all groups on the Keycloak server. diff --git a/plugins/module_utils/identity/keycloak/keycloak_clientsecret.py b/plugins/module_utils/identity/keycloak/keycloak_clientsecret.py new file mode 100644 index 0000000000..85caa8e16b --- /dev/null +++ b/plugins/module_utils/identity/keycloak/keycloak_clientsecret.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2022, John Cant +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import \ + keycloak_argument_spec + + +def keycloak_clientsecret_module(): + """ + Returns an AnsibleModule definition for modules that interact with a client + secret. + + :return: argument_spec dict + """ + argument_spec = keycloak_argument_spec() + + meta_args = dict( + realm=dict(default='master'), + id=dict(type='str'), + client_id=dict(type='str', aliases=['clientId']), + ) + + argument_spec.update(meta_args) + + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + required_one_of=([['id', 'client_id'], + ['token', 'auth_realm', 'auth_username', 'auth_password']]), + required_together=([['auth_realm', 'auth_username', 'auth_password']]), + mutually_exclusive=[ + ['token', 'auth_realm'], + ['token', 'auth_username'], + ['token', 'auth_password'] + ]) + + return module + + +def keycloak_clientsecret_module_resolve_params(module, kc): + """ + Given an AnsibleModule definition for keycloak_clientsecret_*, and a + KeycloakAPI client, resolve the params needed to interact with the Keycloak + client secret, looking up the client by clientId if necessary via an API + call. + + :return: tuple of id, realm + """ + + realm = module.params.get('realm') + id = module.params.get('id') + client_id = module.params.get('client_id') + + # only lookup the client_id if id isn't provided. + # in the case that both are provided, prefer the ID, since it's one + # less lookup. + if id is None: + # Due to the required_one_of spec, client_id is guaranteed to not be None + client = kc.get_client_by_clientid(client_id, realm=realm) + + if client is None: + module.fail_json( + msg='Client does not exist {client_id}'.format(client_id=client_id) + ) + + id = client['id'] + + return id, realm diff --git a/plugins/modules/keycloak_clientsecret_info.py b/plugins/modules/keycloak_clientsecret_info.py new file mode 100644 index 0000000000..98a41ad20a --- /dev/null +++ b/plugins/modules/keycloak_clientsecret_info.py @@ -0,0 +1,161 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022, Fynn Chen +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: keycloak_clientsecret_info + +short_description: Retrieve client secret via Keycloak API + +version_added: 6.1.0 + +description: + - This module allows you to get a Keycloak client secret via the Keycloak + REST API. It requires access to the REST API via OpenID Connect; the user + connecting and the client being used must have the requisite access rights. + In a default Keycloak installation, admin-cli and an admin user would work, + as would a separate client definition with the scope tailored to your needs + and a user having the expected roles. + + - When retrieving a new client secret, where possible provide the client's + I(id) (not I(client_id)) to the module. This removes a lookup to the API to + translate the I(client_id) into the client ID. + + - "Note that this module returns the client secret. To avoid this showing up in the logs, + please add C(no_log: true) to the task." + +options: + realm: + type: str + description: + - They Keycloak realm under which this client resides. + default: 'master' + + id: + description: + - The unique identifier for this client. + - This parameter is not required for getting or generating a client secret but + providing it will reduce the number of API calls required. + type: str + + client_id: + description: + - The I(client_id) of the client. Passing this instead of I(id) results in an + extra API call. + aliases: + - clientId + type: str + + +extends_documentation_fragment: + - community.general.keycloak + - community.general.attributes + - community.general.attributes.info_module + +author: + - Fynn Chen (@fynncfchen) + - John Cant (@johncant) +''' + +EXAMPLES = ''' +- name: Get a Keycloak client secret, authentication with credentials + community.general.keycloak_clientsecret_info: + id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + delegate_to: localhost + no_log: true + +- name: Get a new Keycloak client secret, authentication with token + community.general.keycloak_clientsecret_info: + id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + token: TOKEN + delegate_to: localhost + no_log: true + +- name: Get a new Keycloak client secret, passing client_id instead of id + community.general.keycloak_clientsecret_info: + client_id: 'myClientId' + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + token: TOKEN + delegate_to: localhost + no_log: true +''' + +RETURN = ''' +msg: + description: Textual description of whether we succeeded or failed + returned: always + type: str + +clientsecret_info: + description: Representation of the client secret + returned: on success + type: complex + contains: + type: + description: Credential type. + type: str + returned: always + sample: secret + value: + description: Client secret. + type: str + returned: always + sample: cUGnX1EIeTtPPAkcyGMv0ncyqDPu68P1 +''' + +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import ( + KeycloakAPI, KeycloakError, get_token) +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak_clientsecret import ( + keycloak_clientsecret_module, keycloak_clientsecret_module_resolve_params) + + +def main(): + """ + Module keycloak_clientsecret_info + + :return: + """ + + module = keycloak_clientsecret_module() + + # Obtain access token, initialize API + try: + connection_header = get_token(module.params) + except KeycloakError as e: + module.fail_json(msg=str(e)) + + kc = KeycloakAPI(module, connection_header) + + id, realm = keycloak_clientsecret_module_resolve_params(module, kc) + + clientsecret = kc.get_clientsecret(id=id, realm=realm) + + result = { + 'clientsecret_info': clientsecret, + 'msg': 'Get client secret successful for ID {id}'.format(id=id) + } + + module.exit_json(**result) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/keycloak_clientsecret_regenerate.py b/plugins/modules/keycloak_clientsecret_regenerate.py new file mode 100644 index 0000000000..7a48a25d25 --- /dev/null +++ b/plugins/modules/keycloak_clientsecret_regenerate.py @@ -0,0 +1,167 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022, Fynn Chen +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: keycloak_clientsecret_regenerate + +short_description: Regenerate Keycloak client secret via Keycloak API + +version_added: 6.1.0 + +description: + - This module allows you to regenerate a Keycloak client secret via the + Keycloak REST API. It requires access to the REST API via OpenID Connect; + the user connecting and the client being used must have the requisite access + rights. In a default Keycloak installation, admin-cli and an admin user + would work, as would a separate client definition with the scope tailored to + your needs and a user having the expected roles. + + - When regenerating a client secret, where possible provide the client's id + (not client_id) to the module. This removes a lookup to the API to + translate the client_id into the client ID. + + - "Note that this module returns the client secret. To avoid this showing up in the logs, + please add C(no_log: true) to the task." + +options: + realm: + type: str + description: + - They Keycloak realm under which this client resides. + default: 'master' + + id: + description: + - The unique identifier for this client. + - This parameter is not required for getting or generating a client secret but + providing it will reduce the number of API calls required. + type: str + + client_id: + description: + - The client_id of the client. Passing this instead of id results in an + extra API call. + aliases: + - clientId + type: str + + +extends_documentation_fragment: + - community.general.keycloak + +author: + - Fynn Chen (@fynncfchen) + - John Cant (@johncant) +''' + +EXAMPLES = ''' +- name: Regenerate a Keycloak client secret, authentication with credentials + community.general.keycloak_clientsecret_regenerate: + id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + delegate_to: localhost + no_log: true + +- name: Regenerate a Keycloak client secret, authentication with token + community.general.keycloak_clientsecret_regenerate: + id: '9d59aa76-2755-48c6-b1af-beb70a82c3cd' + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + token: TOKEN + delegate_to: localhost + no_log: true + +- name: Regenerate a Keycloak client secret, passing client_id instead of id + community.general.keycloak_clientsecret_info: + client_id: 'myClientId' + realm: MyCustomRealm + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + token: TOKEN + delegate_to: localhost + no_log: true +''' + +RETURN = ''' +msg: + description: Message as to what action was taken. + returned: always + type: str + +end_state: + description: Representation of the client credential after module execution + returned: on success + type: complex + contains: + type: + description: Credential type. + type: str + returned: always + sample: secret + value: + description: Client secret. + type: str + returned: always + sample: cUGnX1EIeTtPPAkcyGMv0ncyqDPu68P1 + +''' + +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import ( + KeycloakAPI, KeycloakError, get_token) +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak_clientsecret import ( + keycloak_clientsecret_module, keycloak_clientsecret_module_resolve_params) + + +def main(): + """ + Module keycloak_clientsecret_regenerate + + :return: + """ + + module = keycloak_clientsecret_module() + + # Obtain access token, initialize API + try: + connection_header = get_token(module.params) + except KeycloakError as e: + module.fail_json(msg=str(e)) + + kc = KeycloakAPI(module, connection_header) + + id, realm = keycloak_clientsecret_module_resolve_params(module, kc) + + if module.check_mode: + dummy_result = { + "msg": 'No action taken while in check mode', + "end_state": {'type': 'secret', 'value': 'X' * 32} + } + module.exit_json(**dummy_result) + + # Create new secret + clientsecret = kc.create_clientsecret(id=id, realm=realm) + + result = { + "msg": 'New client secret has been generated for ID {id}'.format(id=id), + "end_state": clientsecret + } + module.exit_json(**result) + + +if __name__ == '__main__': + main() diff --git a/tests/integration/targets/keycloak_clientsecret_info/README.md b/tests/integration/targets/keycloak_clientsecret_info/README.md new file mode 100644 index 0000000000..fb721801da --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_info/README.md @@ -0,0 +1,17 @@ + + +The integration test can be performed as follows: + +``` +# 1. Start docker-compose: +docker-compose -f tests/integration/targets/keycloak_clientsecret_info/docker-compose.yml stop +docker-compose -f tests/integration/targets/keycloak_clientsecret_info/docker-compose.yml rm -f -v +docker-compose -f tests/integration/targets/keycloak_clientsecret_info/docker-compose.yml up -d + +# 2. Run the integration tests: +ansible-test integration keycloak_clientsecret_info --allow-unsupported -v +``` diff --git a/tests/integration/targets/keycloak_clientsecret_info/docker-compose.yml b/tests/integration/targets/keycloak_clientsecret_info/docker-compose.yml new file mode 100644 index 0000000000..5e14e9aac1 --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_info/docker-compose.yml @@ -0,0 +1,31 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +version: '3.4' + +services: + postgres: + image: postgres:9.6 + restart: always + environment: + POSTGRES_USER: postgres + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + + keycloak: + image: jboss/keycloak:12.0.4 + ports: + - 8080:8080 + + environment: + DB_VENDOR: postgres + DB_ADDR: postgres + DB_DATABASE: postgres + DB_USER: postgres + DB_SCHEMA: public + DB_PASSWORD: postgres + + KEYCLOAK_USER: admin + KEYCLOAK_PASSWORD: password diff --git a/tests/integration/targets/keycloak_clientsecret_info/tasks/main.yml b/tests/integration/targets/keycloak_clientsecret_info/tasks/main.yml new file mode 100644 index 0000000000..a0cacf1889 --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_info/tasks/main.yml @@ -0,0 +1,48 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create realm + community.general.keycloak_realm: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + id: "{{ realm }}" + realm: "{{ realm }}" + state: present + +- name: Keycloak Client + community.general.keycloak_client: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + realm: "{{ realm }}" + client_id: "{{ client_id }}" + state: present + register: client + +- name: Keycloak Client fetch clientsecret by client_id + community.general.keycloak_clientsecret_info: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + realm: "{{ realm }}" + client_id: "{{ client_id }}" + register: fetch_by_client_id_result + +- name: Assert that the client secret was retrieved + assert: + that: + - fetch_by_client_id_result.clientsecret_info.type == "secret" + - "{{ fetch_by_client_id_result.clientsecret_info.value | length }} >= 32" + +- name: Keycloak Client fetch clientsecret by id + community.general.keycloak_clientsecret_info: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + realm: "{{ realm }}" + id: "{{ client.end_state.id }}" + register: fetch_by_id_result + +- name: Assert that the same client secret was retrieved both times + assert: + that: + - fetch_by_id_result.clientsecret_info.value == fetch_by_client_id_result.clientsecret_info.value diff --git a/tests/integration/targets/keycloak_clientsecret_info/vars/main.yml b/tests/integration/targets/keycloak_clientsecret_info/vars/main.yml new file mode 100644 index 0000000000..8c913705f7 --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_info/vars/main.yml @@ -0,0 +1,20 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +url: http://localhost:8080/auth +admin_realm: master +admin_user: admin +admin_password: password +realm: myrealm +client_id: myclient +role: myrole +description_1: desc 1 +description_2: desc 2 + +auth_args: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" diff --git a/tests/integration/targets/keycloak_clientsecret_regenerate/README.md b/tests/integration/targets/keycloak_clientsecret_regenerate/README.md new file mode 100644 index 0000000000..08251b4c52 --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_regenerate/README.md @@ -0,0 +1,17 @@ + + +The integration test can be performed as follows: + +``` +# 1. Start docker-compose: +docker-compose -f tests/integration/targets/keycloak_clientsecret_regenerate/docker-compose.yml stop +docker-compose -f tests/integration/targets/keycloak_clientsecret_regenerate/docker-compose.yml rm -f -v +docker-compose -f tests/integration/targets/keycloak_clientsecret_regenerate/docker-compose.yml up -d + +# 2. Run the integration tests: +ansible-test integration keycloak_clientsecret_regenerate --allow-unsupported -v +``` diff --git a/tests/integration/targets/keycloak_clientsecret_regenerate/docker-compose.yml b/tests/integration/targets/keycloak_clientsecret_regenerate/docker-compose.yml new file mode 100644 index 0000000000..5e14e9aac1 --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_regenerate/docker-compose.yml @@ -0,0 +1,31 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +version: '3.4' + +services: + postgres: + image: postgres:9.6 + restart: always + environment: + POSTGRES_USER: postgres + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + + keycloak: + image: jboss/keycloak:12.0.4 + ports: + - 8080:8080 + + environment: + DB_VENDOR: postgres + DB_ADDR: postgres + DB_DATABASE: postgres + DB_USER: postgres + DB_SCHEMA: public + DB_PASSWORD: postgres + + KEYCLOAK_USER: admin + KEYCLOAK_PASSWORD: password diff --git a/tests/integration/targets/keycloak_clientsecret_regenerate/tasks/main.yml b/tests/integration/targets/keycloak_clientsecret_regenerate/tasks/main.yml new file mode 100644 index 0000000000..9bd52698a2 --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_regenerate/tasks/main.yml @@ -0,0 +1,49 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create realm + community.general.keycloak_realm: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + id: "{{ realm }}" + realm: "{{ realm }}" + state: present + +- name: Keycloak Client + community.general.keycloak_client: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + realm: "{{ realm }}" + client_id: "{{ client_id }}" + state: present + register: client + +- name: Keycloak Client regenerate clientsecret by client_id + community.general.keycloak_clientsecret_regenerate: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + realm: "{{ realm }}" + client_id: "{{ client_id }}" + register: regenerate_by_client_id + +- name: Assert that the client secret was retrieved + assert: + that: + - regenerate_by_client_id.end_state.type == "secret" + - "{{ regenerate_by_client_id.end_state.value | length }} >= 32" + +- name: Keycloak Client regenerate clientsecret by id + community.general.keycloak_clientsecret_regenerate: "{{ auth_args | combine(call_args) }}" + vars: + call_args: + realm: "{{ realm }}" + id: "{{ client.end_state.id }}" + register: regenerate_by_id + +- name: Assert that client secret was regenerated + assert: + that: + - "{{ regenerate_by_id.end_state.value | length }} >= 32" + - regenerate_by_id.end_state.value != regenerate_by_client_id.end_state.value diff --git a/tests/integration/targets/keycloak_clientsecret_regenerate/vars/main.yml b/tests/integration/targets/keycloak_clientsecret_regenerate/vars/main.yml new file mode 100644 index 0000000000..8c913705f7 --- /dev/null +++ b/tests/integration/targets/keycloak_clientsecret_regenerate/vars/main.yml @@ -0,0 +1,20 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +url: http://localhost:8080/auth +admin_realm: master +admin_user: admin +admin_password: password +realm: myrealm +client_id: myclient +role: myrole +description_1: desc 1 +description_2: desc 2 + +auth_args: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" From f0b3bba030055183b864678208e187c24d2ca581 Mon Sep 17 00:00:00 2001 From: fachleitner Date: Mon, 5 Dec 2022 06:23:00 +0100 Subject: [PATCH 0369/2104] Fix keycloak_client_rolemapping role removal and diff (#5619) * Keycloak: Fix client rolemapping removal Keycloak's delete_group_rolemapping API wrapper didn't pass data about the roles to remove to keycloak, resulting in removal of all roles. Follow the intended behaviour and delete only the roles listed in the module invocation. Signed-off-by: Florian Achleitner * Keycloak: Fix client_rolemapping diff The module's diff output wrongly showed the changed roles list as 'after' state. This is obviously wrong for role removal and also wrong for role addition, if there are other roles assigned. Use the result of the API query for 'end_state' for 'diff' as well. Signed-off-by: Florian Achleitner * Keycloak: Calculate client_rolemapping proposed state properly Signed-off-by: Florian Achleitner * Add changelog fragment Signed-off-by: Florian Achleitner Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein * Fix for python2 unit test Signed-off-by: Florian Achleitner Co-authored-by: Felix Fontein --- changelogs/fragments/5619-keycloak-improvements.yml | 3 +++ plugins/module_utils/identity/keycloak/keycloak.py | 2 +- plugins/modules/keycloak_client_rolemapping.py | 11 +++++++---- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5619-keycloak-improvements.yml diff --git a/changelogs/fragments/5619-keycloak-improvements.yml b/changelogs/fragments/5619-keycloak-improvements.yml new file mode 100644 index 0000000000..2e5a739dad --- /dev/null +++ b/changelogs/fragments/5619-keycloak-improvements.yml @@ -0,0 +1,3 @@ +bugfixes: + - "keycloak_client_rolemapping - remove only listed mappings with ``state=absent`` (https://github.com/ansible-collections/community.general/pull/5619)." + - "keycloak_client_rolemapping - calculate ``proposed`` and ``after`` return values properly (https://github.com/ansible-collections/community.general/pull/5619)." diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 87b2120318..09b22b7561 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -608,7 +608,7 @@ class KeycloakAPI(object): """ available_rolemappings_url = URL_CLIENT_GROUP_ROLEMAPPINGS.format(url=self.baseurl, realm=realm, id=gid, client=cid) try: - open_url(available_rolemappings_url, method="DELETE", http_agent=self.http_agent, headers=self.restheaders, + open_url(available_rolemappings_url, method="DELETE", http_agent=self.http_agent, headers=self.restheaders, data=json.dumps(role_rep), validate_certs=self.validate_certs, timeout=self.connection_timeout) except Exception as e: self.module.fail_json(msg="Could not delete available rolemappings for client %s in group %s, realm %s: %s" diff --git a/plugins/modules/keycloak_client_rolemapping.py b/plugins/modules/keycloak_client_rolemapping.py index 4f1f9b0d0f..f0da97ef59 100644 --- a/plugins/modules/keycloak_client_rolemapping.py +++ b/plugins/modules/keycloak_client_rolemapping.py @@ -295,7 +295,7 @@ def main(): assigned_roles_before = kc.get_client_group_composite_rolemappings(gid, cid, realm=realm) result['existing'] = assigned_roles_before - result['proposed'] = roles + result['proposed'] = list(assigned_roles_before) if assigned_roles_before else [] update_roles = [] for role_index, role in enumerate(roles, start=0): @@ -307,6 +307,7 @@ def main(): 'id': role['id'], 'name': role['name'], }) + result['proposed'].append(available_role) # Fetch roles to remove if state absent else: for assigned_role in assigned_roles_before: @@ -315,13 +316,15 @@ def main(): 'id': role['id'], 'name': role['name'], }) + if assigned_role in result['proposed']: # Handle double removal + result['proposed'].remove(assigned_role) if len(update_roles): if state == 'present': # Assign roles result['changed'] = True if module._diff: - result['diff'] = dict(before=assigned_roles_before, after=update_roles) + result['diff'] = dict(before=assigned_roles_before, after=result['proposed']) if module.check_mode: module.exit_json(**result) kc.add_group_rolemapping(gid, cid, update_roles, realm=realm) @@ -333,7 +336,7 @@ def main(): # Remove mapping of role result['changed'] = True if module._diff: - result['diff'] = dict(before=assigned_roles_before, after=update_roles) + result['diff'] = dict(before=assigned_roles_before, after=result['proposed']) if module.check_mode: module.exit_json(**result) kc.delete_group_rolemapping(gid, cid, update_roles, realm=realm) @@ -344,7 +347,7 @@ def main(): # Do nothing else: result['changed'] = False - result['msg'] = 'Nothing to do, roles %s are correctly mapped with group %s.' % (roles, group_name) + result['msg'] = 'Nothing to do, roles %s are %s with group %s.' % (roles, 'mapped' if state == 'present' else 'not mapped', group_name) module.exit_json(**result) From b22638ba0cea86994006aa399b94fa45a1c2ff0e Mon Sep 17 00:00:00 2001 From: TSKushal <44438079+TSKushal@users.noreply.github.com> Date: Mon, 5 Dec 2022 23:01:50 +0530 Subject: [PATCH 0370/2104] Adding PUT functionality to redfish_utils (Updated) (#5507) * adding changelog fragment * adding PUT functionality * sanity fix Co-authored-by: Kushal --- .../5490-adding-put-functionality.yml | 2 + plugins/module_utils/redfish_utils.py | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 changelogs/fragments/5490-adding-put-functionality.yml diff --git a/changelogs/fragments/5490-adding-put-functionality.yml b/changelogs/fragments/5490-adding-put-functionality.yml new file mode 100644 index 0000000000..09141d2822 --- /dev/null +++ b/changelogs/fragments/5490-adding-put-functionality.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_utils module utils - added PUT (``put_request()``) functionality (https://github.com/ansible-collections/community.general/pull/5490). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index a86baa1066..4a56346c3f 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -19,6 +19,8 @@ POST_HEADERS = {'content-type': 'application/json', 'accept': 'application/json' 'OData-Version': '4.0'} PATCH_HEADERS = {'content-type': 'application/json', 'accept': 'application/json', 'OData-Version': '4.0'} +PUT_HEADERS = {'content-type': 'application/json', 'accept': 'application/json', + 'OData-Version': '4.0'} DELETE_HEADERS = {'accept': 'application/json', 'OData-Version': '4.0'} FAIL_MSG = 'Issuing a data modification command without specifying the '\ @@ -224,6 +226,41 @@ class RedfishUtils(object): 'msg': "Failed PATCH request to '%s': '%s'" % (uri, to_text(e))} return {'ret': True, 'changed': True, 'resp': resp, 'msg': 'Modified %s' % uri} + def put_request(self, uri, pyld): + req_headers = dict(PUT_HEADERS) + r = self.get_request(uri) + if r['ret']: + # Get etag from etag header or @odata.etag property + etag = r['headers'].get('etag') + if not etag: + etag = r['data'].get('@odata.etag') + if etag: + if self.strip_etag_quotes: + etag = etag.strip('"') + req_headers['If-Match'] = etag + username, password, basic_auth = self._auth_params(req_headers) + try: + resp = open_url(uri, data=json.dumps(pyld), + headers=req_headers, method="PUT", + url_username=username, url_password=password, + force_basic_auth=basic_auth, validate_certs=False, + follow_redirects='all', + use_proxy=True, timeout=self.timeout) + except HTTPError as e: + msg = self._get_extended_message(e) + return {'ret': False, + 'msg': "HTTP Error %s on PUT request to '%s', extended message: '%s'" + % (e.code, uri, msg), + 'status': e.code} + except URLError as e: + return {'ret': False, 'msg': "URL Error on PUT request to '%s': '%s'" + % (uri, e.reason)} + # Almost all errors should be caught above, but just in case + except Exception as e: + return {'ret': False, + 'msg': "Failed PUT request to '%s': '%s'" % (uri, to_text(e))} + return {'ret': True, 'resp': resp} + def delete_request(self, uri, pyld=None): req_headers = dict(DELETE_HEADERS) username, password, basic_auth = self._auth_params(req_headers) From b52a7a6b0edcf5f73904259f6a21777cd94a2d49 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 6 Dec 2022 07:30:54 +0100 Subject: [PATCH 0371/2104] Next expected release is 6.2.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 1c300da904..f55ebce545 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.1.0 +version: 6.2.0 readme: README.md authors: - Ansible (https://github.com/ansible) From 50021d6bfb58b1551cb9ca0bf09a865bd49f895e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 8 Dec 2022 22:13:41 +0100 Subject: [PATCH 0372/2104] Fix pipx_info tests (#5668) Update dependencies. --- tests/integration/targets/pipx_info/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/pipx_info/tasks/main.yml b/tests/integration/targets/pipx_info/tasks/main.yml index 61163afd08..0a01f0af9c 100644 --- a/tests/integration/targets/pipx_info/tasks/main.yml +++ b/tests/integration/targets/pipx_info/tasks/main.yml @@ -56,7 +56,8 @@ - info_all_deps.application|length == 1 - info_all_deps.application[0].name == "tox" - "'version' in info_all_deps.application[0]" - - info_all_deps.application[0].dependencies == ["virtualenv"] + - info_all_deps.application[0].dependencies == ["chardet", "virtualenv"] + or info_all_deps.application[0].dependencies == ["virtualenv"] - "'injected' not in info_all.application[0]" - info_tox.application == info_all_deps.application From 471f523f53220bfbb3e6585b767c7483790c025d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 8 Dec 2022 22:40:37 +0100 Subject: [PATCH 0373/2104] redhat_subscription: add `server_proxy_scheme` parameter (#5662) Add the `server_proxy_scheme` parameter to configure the scheme used for the proxy server. This completes the configuration parameters for the proxy server. --- .../5662-redhat_subscription-server_proxy_scheme.yaml | 3 +++ plugins/modules/redhat_subscription.py | 6 ++++++ tests/unit/plugins/modules/test_redhat_subscription.py | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml diff --git a/changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml b/changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml new file mode 100644 index 0000000000..293e18311a --- /dev/null +++ b/changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml @@ -0,0 +1,3 @@ +minor_changes: + - redhat_subscription - add a ``server_proxy_scheme`` parameter to configure the scheme for the proxy server + (https://github.com/ansible-collections/community.general/pull/5662). diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index 041c1a0097..8836b78564 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -70,6 +70,11 @@ options: description: - Specify an HTTP proxy hostname. type: str + server_proxy_scheme: + description: + - Specify an HTTP proxy scheme, for example C(http) or C(https). + type: str + version_added: 6.2.0 server_proxy_port: description: - Specify an HTTP proxy port. @@ -806,6 +811,7 @@ def main(): 'consumer_id': {}, 'force_register': {'default': False, 'type': 'bool'}, 'server_proxy_hostname': {}, + 'server_proxy_scheme': {}, 'server_proxy_port': {}, 'server_proxy_user': {}, 'server_proxy_password': {'no_log': True}, diff --git a/tests/unit/plugins/modules/test_redhat_subscription.py b/tests/unit/plugins/modules/test_redhat_subscription.py index f38f1ffe0d..865f041141 100644 --- a/tests/unit/plugins/modules/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/test_redhat_subscription.py @@ -308,6 +308,7 @@ TEST_CASES = [ 'org_id': 'admin', 'force_register': 'true', 'server_proxy_hostname': 'proxy.company.com', + 'server_proxy_scheme': 'https', 'server_proxy_port': '12345', 'server_proxy_user': 'proxy_user', 'server_proxy_password': 'secret_proxy_password' @@ -327,6 +328,7 @@ TEST_CASES = [ '--server.proxy_hostname=proxy.company.com', '--server.proxy_password=secret_proxy_password', '--server.proxy_port=12345', + '--server.proxy_scheme=https', '--server.proxy_user=proxy_user' ], {'check_rc': True}, From b5e58a3bccd38791e1c8871bf471941c1d1c762f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 9 Dec 2022 15:10:48 +0100 Subject: [PATCH 0374/2104] CI: Bump CentOS Stream 8 Python from 3.8 to 3.9 (#5674) Bump CentOS Stream 8 Python from 3.8 to 3.9. --- .azure-pipelines/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index c39a855dd0..a5dcafa422 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -386,7 +386,7 @@ stages: - name: ArchLinux test: archlinux/3.10 - name: CentOS Stream 8 - test: centos-stream8/3.8 + test: centos-stream8/3.9 groups: - 1 - 2 From c3bc172bf6fccdca9c16155da058ce95a57e6076 Mon Sep 17 00:00:00 2001 From: Markus Bergholz Date: Sat, 10 Dec 2022 21:40:36 +0100 Subject: [PATCH 0375/2104] respect new variable property in gitlab_group_variable and gitlab_project_variable (#5667) * draft * add changelog fragment * rework * rework group variables * add new line at end of file * Update plugins/module_utils/gitlab.py Co-authored-by: Nejc Habjan * rename * revert * return a copy * Update plugins/modules/gitlab_project_variable.py Co-authored-by: Felix Fontein Co-authored-by: Nejc Habjan Co-authored-by: Felix Fontein --- .../fragments/5666-gitlab-variables.yml | 3 +++ plugins/module_utils/gitlab.py | 11 +++++++++ plugins/modules/gitlab_group_variable.py | 12 +++------- plugins/modules/gitlab_project_variable.py | 23 ++++++++----------- 4 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 changelogs/fragments/5666-gitlab-variables.yml diff --git a/changelogs/fragments/5666-gitlab-variables.yml b/changelogs/fragments/5666-gitlab-variables.yml new file mode 100644 index 0000000000..2070fa8e4a --- /dev/null +++ b/changelogs/fragments/5666-gitlab-variables.yml @@ -0,0 +1,3 @@ +bugfixes: + - gitlab_group_variables - fix dropping variables accidentally when GitLab introduced new properties (https://github.com/ansible-collections/community.general/pull/5667). + - gitlab_project_variables - fix dropping variables accidentally when GitLab introduced new properties (https://github.com/ansible-collections/community.general/pull/5667). \ No newline at end of file diff --git a/plugins/module_utils/gitlab.py b/plugins/module_utils/gitlab.py index 3ed338b401..7cb59e4c2c 100644 --- a/plugins/module_utils/gitlab.py +++ b/plugins/module_utils/gitlab.py @@ -110,3 +110,14 @@ def gitlab_authentication(module): GitLab remove Session API now that private tokens are removed from user API endpoints since version 10.2." % to_native(e)) return gitlab_instance + + +def filter_returned_variables(gitlab_variables): + # pop properties we don't know + existing_variables = [dict(x.attributes) for x in gitlab_variables] + KNOWN = ['key', 'value', 'masked', 'protected', 'variable_type', 'environment_scope'] + for item in existing_variables: + for key in list(item.keys()): + if key not in KNOWN: + item.pop(key) + return existing_variables diff --git a/plugins/modules/gitlab_group_variable.py b/plugins/modules/gitlab_group_variable.py index c273777ca3..4a185b2394 100644 --- a/plugins/modules/gitlab_group_variable.py +++ b/plugins/modules/gitlab_group_variable.py @@ -165,7 +165,7 @@ from ansible.module_utils.six import string_types from ansible.module_utils.six import integer_types from ansible_collections.community.general.plugins.module_utils.gitlab import ( - auth_argument_spec, gitlab_authentication, ensure_gitlab_package + auth_argument_spec, gitlab_authentication, ensure_gitlab_package, filter_returned_variables ) @@ -296,11 +296,7 @@ def native_python_main(this_gitlab, purge, requested_variables, state, module): before = [x.attributes for x in gitlab_keys] gitlab_keys = this_gitlab.list_all_group_variables() - existing_variables = [x.attributes for x in gitlab_keys] - - # preprocessing:filter out and enrich before compare - for item in existing_variables: - item.pop('group_id') + existing_variables = filter_returned_variables(gitlab_keys) for item in requested_variables: item['key'] = item.pop('name') @@ -331,9 +327,7 @@ def native_python_main(this_gitlab, purge, requested_variables, state, module): if purge: # refetch and filter gitlab_keys = this_gitlab.list_all_group_variables() - existing_variables = [x.attributes for x in gitlab_keys] - for item in existing_variables: - item.pop('group_id') + existing_variables = filter_returned_variables(gitlab_keys) remove = [x for x in existing_variables if x not in requested_variables] for item in remove: diff --git a/plugins/modules/gitlab_project_variable.py b/plugins/modules/gitlab_project_variable.py index cdd6402ae8..986847c07b 100644 --- a/plugins/modules/gitlab_project_variable.py +++ b/plugins/modules/gitlab_project_variable.py @@ -189,7 +189,7 @@ except Exception: HAS_GITLAB_PACKAGE = False from ansible_collections.community.general.plugins.module_utils.gitlab import ( - auth_argument_spec, gitlab_authentication, ensure_gitlab_package + auth_argument_spec, gitlab_authentication, ensure_gitlab_package, filter_returned_variables ) @@ -255,9 +255,11 @@ class GitlabProjectVariables(object): return True var = { - "key": var_obj.get('key'), "value": var_obj.get('value'), - "masked": var_obj.get('masked'), "protected": var_obj.get('protected'), - "variable_type": var_obj.get('variable_type') + "key": var_obj.get('key'), + "value": var_obj.get('value'), + "masked": var_obj.get('masked'), + "protected": var_obj.get('protected'), + "variable_type": var_obj.get('variable_type'), } if var_obj.get('environment_scope') is not None: @@ -319,12 +321,9 @@ def native_python_main(this_gitlab, purge, requested_variables, state, module): before = [x.attributes for x in gitlab_keys] gitlab_keys = this_gitlab.list_all_project_variables() - existing_variables = [x.attributes for x in gitlab_keys] - - # preprocessing:filter out and enrich before compare - for item in existing_variables: - item.pop('project_id') + existing_variables = filter_returned_variables(gitlab_keys) + # filter out and enrich before compare for item in requested_variables: item['key'] = item.pop('name') item['value'] = str(item.get('value')) @@ -354,9 +353,7 @@ def native_python_main(this_gitlab, purge, requested_variables, state, module): if purge: # refetch and filter gitlab_keys = this_gitlab.list_all_project_variables() - existing_variables = [x.attributes for x in gitlab_keys] - for item in existing_variables: - item.pop('project_id') + existing_variables = filter_returned_variables(gitlab_keys) remove = [x for x in existing_variables if x not in requested_variables] for item in remove: @@ -409,7 +406,7 @@ def main(): masked=dict(type='bool', default=False), protected=dict(type='bool', default=False), environment_scope=dict(type='str', default='*'), - variable_type=dict(type='str', default='env_var', choices=["env_var", "file"]) + variable_type=dict(type='str', default='env_var', choices=["env_var", "file"]), )), state=dict(type='str', default="present", choices=["absent", "present"]), ) From f95e0d775d301ab36d22526d5f2c25b7598084a4 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 15 Dec 2022 09:30:03 +1300 Subject: [PATCH 0376/2104] puppet: refactored to use CmdRunner (#5612) * puppet: refactored to use CmdRunner * add changelog fragment * add more tests --- .github/BOTMETA.yml | 3 + .../fragments/5612-puppet-cmd-runner.yml | 2 + plugins/module_utils/puppet.py | 114 ++++++++++++++ plugins/modules/puppet.py | 108 ++----------- tests/sanity/ignore-2.11.txt | 3 +- tests/sanity/ignore-2.12.txt | 3 +- tests/sanity/ignore-2.13.txt | 3 +- tests/sanity/ignore-2.14.txt | 3 +- tests/sanity/ignore-2.15.txt | 3 +- tests/unit/plugins/modules/test_puppet.py | 145 ++++++++++++++++++ 10 files changed, 282 insertions(+), 105 deletions(-) create mode 100644 changelogs/fragments/5612-puppet-cmd-runner.yml create mode 100644 plugins/module_utils/puppet.py create mode 100644 tests/unit/plugins/modules/test_puppet.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 18f4f66e1f..0a0cded0c1 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -309,6 +309,9 @@ files: $module_utils/pipx.py: labels: pipx maintainers: russoz + $module_utils/puppet.py: + labels: puppet + maintainers: russoz $module_utils/pure.py: labels: pure pure_storage maintainers: $team_purestorage diff --git a/changelogs/fragments/5612-puppet-cmd-runner.yml b/changelogs/fragments/5612-puppet-cmd-runner.yml new file mode 100644 index 0000000000..a2d14bf5fc --- /dev/null +++ b/changelogs/fragments/5612-puppet-cmd-runner.yml @@ -0,0 +1,2 @@ +minor_changes: + - puppet - refactored module to use ``CmdRunner`` for executing ``puppet`` (https://github.com/ansible-collections/community.general/pull/5612). diff --git a/plugins/module_utils/puppet.py b/plugins/module_utils/puppet.py new file mode 100644 index 0000000000..06369882fb --- /dev/null +++ b/plugins/module_utils/puppet.py @@ -0,0 +1,114 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2022, Alexei Znamensky +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +import os + +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt + + +_PUPPET_PATH_PREFIX = ["/opt/puppetlabs/bin"] + + +def get_facter_dir(): + if os.getuid() == 0: + return '/etc/facter/facts.d' + else: + return os.path.expanduser('~/.facter/facts.d') + + +def _puppet_cmd(module): + return module.get_bin_path("puppet", False, _PUPPET_PATH_PREFIX) + + +# If the `timeout` CLI command feature is removed, +# Then we could add this as a fixed param to `puppet_runner` +def ensure_agent_enabled(module): + runner = CmdRunner( + module, + command="puppet", + path_prefix=_PUPPET_PATH_PREFIX, + arg_formats=dict( + _agent_disabled=cmd_runner_fmt.as_fixed(['config', 'print', 'agent_disabled_lockfile']), + ), + check_rc=False, + ) + + rc, stdout, stderr = runner("_agent_disabled").run() + if os.path.exists(stdout.strip()): + module.fail_json( + msg="Puppet agent is administratively disabled.", + disabled=True) + elif rc != 0: + module.fail_json( + msg="Puppet agent state could not be determined.") + + +def puppet_runner(module): + + # Keeping backward compatibility, allow for running with the `timeout` CLI command. + # If this can be replaced with ansible `timeout` parameter in playbook, + # then this function could be removed. + def _prepare_base_cmd(): + _tout_cmd = module.get_bin_path("timeout", False) + if _tout_cmd: + cmd = ["timeout", "-s", "9", module.params["timeout"], _puppet_cmd(module)] + else: + cmd = ["puppet"] + return cmd + + def noop_func(v): + _noop = cmd_runner_fmt.as_map({ + True: "--noop", + False: "--no-noop", + }) + return _noop(module.check_mode or v) + + _logdest_map = { + "syslog": ["--logdest", "syslog"], + "all": ["--logdest", "syslog", "--logdest", "console"], + } + + @cmd_runner_fmt.unpack_args + def execute_func(execute, manifest): + if execute: + return ["--execute", execute] + else: + return [manifest] + + runner = CmdRunner( + module, + command=_prepare_base_cmd(), + path_prefix=_PUPPET_PATH_PREFIX, + arg_formats=dict( + _agent_fixed=cmd_runner_fmt.as_fixed([ + "agent", "--onetime", "--no-daemonize", "--no-usecacheonfailure", + "--no-splay", "--detailed-exitcodes", "--verbose", "--color", "0", + ]), + _apply_fixed=cmd_runner_fmt.as_fixed(["apply", "--detailed-exitcodes"]), + puppetmaster=cmd_runner_fmt.as_opt_val("--server"), + show_diff=cmd_runner_fmt.as_bool("--show-diff"), + confdir=cmd_runner_fmt.as_opt_val("--confdir"), + environment=cmd_runner_fmt.as_opt_val("--environment"), + tags=cmd_runner_fmt.as_func(lambda v: ["--tags", ",".join(v)]), + certname=cmd_runner_fmt.as_opt_eq_val("--certname"), + noop=cmd_runner_fmt.as_func(noop_func), + use_srv_records=cmd_runner_fmt.as_map({ + True: "--usr_srv_records", + False: "--no-usr_srv_records", + }), + logdest=cmd_runner_fmt.as_map(_logdest_map, default=[]), + modulepath=cmd_runner_fmt.as_opt_eq_val("--modulepath"), + _execute=cmd_runner_fmt.as_func(execute_func), + summarize=cmd_runner_fmt.as_bool("--summarize"), + debug=cmd_runner_fmt.as_bool("--debug"), + verbose=cmd_runner_fmt.as_bool("--verbose"), + ), + check_rc=False, + ) + return runner diff --git a/plugins/modules/puppet.py b/plugins/modules/puppet.py index c787a7f00c..8454bb60fd 100644 --- a/plugins/modules/puppet.py +++ b/plugins/modules/puppet.py @@ -152,15 +152,9 @@ import json import os import stat +import ansible_collections.community.general.plugins.module_utils.puppet as puppet_utils + from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.six.moves import shlex_quote - - -def _get_facter_dir(): - if os.getuid() == 0: - return '/etc/facter/facts.d' - else: - return os.path.expanduser('~/.facter/facts.d') def _write_structured_data(basedir, basename, data): @@ -212,16 +206,6 @@ def main(): ) p = module.params - global PUPPET_CMD - PUPPET_CMD = module.get_bin_path("puppet", False, ['/opt/puppetlabs/bin']) - - if not PUPPET_CMD: - module.fail_json( - msg="Could not find puppet. Please ensure it is installed.") - - global TIMEOUT_CMD - TIMEOUT_CMD = module.get_bin_path("timeout", False) - if p['manifest']: if not os.path.exists(p['manifest']): module.fail_json( @@ -230,90 +214,24 @@ def main(): # Check if puppet is disabled here if not p['manifest']: - rc, stdout, stderr = module.run_command( - PUPPET_CMD + " config print agent_disabled_lockfile") - if os.path.exists(stdout.strip()): - module.fail_json( - msg="Puppet agent is administratively disabled.", - disabled=True) - elif rc != 0: - module.fail_json( - msg="Puppet agent state could not be determined.") + puppet_utils.ensure_agent_enabled(module) if module.params['facts'] and not module.check_mode: _write_structured_data( - _get_facter_dir(), + puppet_utils.get_facter_dir(), module.params['facter_basename'], module.params['facts']) - if TIMEOUT_CMD: - base_cmd = "%(timeout_cmd)s -s 9 %(timeout)s %(puppet_cmd)s" % dict( - timeout_cmd=TIMEOUT_CMD, - timeout=shlex_quote(p['timeout']), - puppet_cmd=PUPPET_CMD) - else: - base_cmd = PUPPET_CMD + runner = puppet_utils.puppet_runner(module) if not p['manifest'] and not p['execute']: - cmd = ("%(base_cmd)s agent --onetime" - " --no-daemonize --no-usecacheonfailure --no-splay" - " --detailed-exitcodes --verbose --color 0") % dict(base_cmd=base_cmd) - if p['puppetmaster']: - cmd += " --server %s" % shlex_quote(p['puppetmaster']) - if p['show_diff']: - cmd += " --show_diff" - if p['confdir']: - cmd += " --confdir %s" % shlex_quote(p['confdir']) - if p['environment']: - cmd += " --environment '%s'" % p['environment'] - if p['tags']: - cmd += " --tags '%s'" % ','.join(p['tags']) - if p['certname']: - cmd += " --certname='%s'" % p['certname'] - if module.check_mode: - cmd += " --noop" - elif 'noop' in p: - if p['noop']: - cmd += " --noop" - else: - cmd += " --no-noop" - if p['use_srv_records'] is not None: - if not p['use_srv_records']: - cmd += " --no-use_srv_records" - else: - cmd += " --use_srv_records" + args_order = "_agent_fixed puppetmaster show_diff confdir environment tags certname noop use_srv_records" + with runner(args_order) as ctx: + rc, stdout, stderr = ctx.run() else: - cmd = "%s apply --detailed-exitcodes " % base_cmd - if p['logdest'] == 'syslog': - cmd += "--logdest syslog " - if p['logdest'] == 'all': - cmd += " --logdest syslog --logdest console" - if p['modulepath']: - cmd += "--modulepath='%s'" % p['modulepath'] - if p['environment']: - cmd += "--environment '%s' " % p['environment'] - if p['certname']: - cmd += " --certname='%s'" % p['certname'] - if p['tags']: - cmd += " --tags '%s'" % ','.join(p['tags']) - if module.check_mode: - cmd += "--noop " - elif 'noop' in p: - if p['noop']: - cmd += " --noop" - else: - cmd += " --no-noop" - if p['execute']: - cmd += " --execute '%s'" % p['execute'] - else: - cmd += " %s" % shlex_quote(p['manifest']) - if p['summarize']: - cmd += " --summarize" - if p['debug']: - cmd += " --debug" - if p['verbose']: - cmd += " --verbose" - rc, stdout, stderr = module.run_command(cmd) + args_order = "_apply_fixed logdest modulepath environment certname tags noop _execute summarize debug verbose" + with runner(args_order) as ctx: + rc, stdout, stderr = ctx.run(_execute=[p['execute'], p['manifest']]) if rc == 0: # success @@ -335,11 +253,11 @@ def main(): elif rc == 124: # timeout module.exit_json( - rc=rc, msg="%s timed out" % cmd, stdout=stdout, stderr=stderr) + rc=rc, msg="%s timed out" % ctx.cmd, stdout=stdout, stderr=stderr) else: # failure module.fail_json( - rc=rc, msg="%s failed with return code: %d" % (cmd, rc), + rc=rc, msg="%s failed with return code: %d" % (ctx.cmd, rc), stdout=stdout, stderr=stderr) diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index d12199993a..c79a17493f 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -18,8 +18,7 @@ plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/puppet.py use-argspec-type-path -plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index d5dd72b549..d93315938c 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -13,8 +13,7 @@ plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/puppet.py use-argspec-type-path -plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index d5dd72b549..d93315938c 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -13,8 +13,7 @@ plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/puppet.py use-argspec-type-path -plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index b54479472b..d4c0d0d948 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -14,8 +14,7 @@ plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/puppet.py use-argspec-type-path -plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index b54479472b..d4c0d0d948 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -14,8 +14,7 @@ plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice -plugins/modules/puppet.py use-argspec-type-path -plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 +plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed diff --git a/tests/unit/plugins/modules/test_puppet.py b/tests/unit/plugins/modules/test_puppet.py new file mode 100644 index 0000000000..632385957e --- /dev/null +++ b/tests/unit/plugins/modules/test_puppet.py @@ -0,0 +1,145 @@ +# -*- coding: utf-8 -*- +# Author: Alexei Znamensky (russoz@gmail.com) +# Largely adapted from test_redhat_subscription by +# Jiri Hnidek (jhnidek@redhat.com) +# +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# Copyright (c) Jiri Hnidek (jhnidek@redhat.com) +# +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +from ansible_collections.community.general.plugins.modules import puppet + +import pytest + +TESTED_MODULE = puppet.__name__ + + +@pytest.fixture +def patch_get_bin_path(mocker): + """ + Function used for mocking AnsibleModule.get_bin_path + """ + def mockie(self, path, *args, **kwargs): + return "/testbin/{0}".format(path) + mocker.patch("ansible.module_utils.basic.AnsibleModule.get_bin_path", mockie) + + +TEST_CASES = [ + [ + {}, + { + "id": "puppet_agent_plain", + "run_command.calls": [ + ( + ["/testbin/puppet", "config", "print", "agent_disabled_lockfile"], + {"environ_update": {"LANGUAGE": "C", "LC_ALL": "C"}, "check_rc": False}, + (0, "blah, anything", "",), # output rc, out, err + ), + ( + [ + "/testbin/timeout", "-s", "9", "30m", "/testbin/puppet", "agent", "--onetime", "--no-daemonize", + "--no-usecacheonfailure", "--no-splay", "--detailed-exitcodes", "--verbose", "--color", "0" + ], + {"environ_update": {"LANGUAGE": "C", "LC_ALL": "C"}, "check_rc": False}, + (0, "", "",), # output rc, out, err + ), + ], + "changed": False, + } + ], + [ + { + "certname": "potatobox" + }, + { + "id": "puppet_agent_certname", + "run_command.calls": [ + ( + ["/testbin/puppet", "config", "print", "agent_disabled_lockfile"], + {"environ_update": {"LANGUAGE": "C", "LC_ALL": "C"}, "check_rc": False}, + (0, "blah, anything", "",), # output rc, out, err + ), + ( + [ + "/testbin/timeout", "-s", "9", "30m", "/testbin/puppet", "agent", "--onetime", "--no-daemonize", + "--no-usecacheonfailure", "--no-splay", "--detailed-exitcodes", "--verbose", "--color", "0", "--certname=potatobox" + ], + {"environ_update": {"LANGUAGE": "C", "LC_ALL": "C"}, "check_rc": False}, + (0, "", "",), # output rc, out, err + ), + ], + "changed": False, + } + ], + [ + { + "tags": ["a", "b", "c"] + }, + { + "id": "puppet_agent_tags_abc", + "run_command.calls": [ + ( + ["/testbin/puppet", "config", "print", "agent_disabled_lockfile"], + {"environ_update": {"LANGUAGE": "C", "LC_ALL": "C"}, "check_rc": False}, + (0, "blah, anything", "",), # output rc, out, err + ), + ( + [ + "/testbin/timeout", "-s", "9", "30m", "/testbin/puppet", "agent", "--onetime", "--no-daemonize", + "--no-usecacheonfailure", "--no-splay", "--detailed-exitcodes", "--verbose", "--color", "0", "--tags", "a,b,c" + ], + {"environ_update": {"LANGUAGE": "C", "LC_ALL": "C"}, "check_rc": False}, + (0, "", "",), # output rc, out, err + ), + ], + "changed": False, + } + ], +] +TEST_CASES_IDS = [item[1]["id"] for item in TEST_CASES] + + +@pytest.mark.parametrize("patch_ansible_module, testcase", + TEST_CASES, + ids=TEST_CASES_IDS, + indirect=["patch_ansible_module"]) +@pytest.mark.usefixtures("patch_ansible_module") +def test_puppet(mocker, capfd, patch_get_bin_path, testcase): + """ + Run unit tests for test cases listen in TEST_CASES + """ + + # Mock function used for running commands first + call_results = [item[2] for item in testcase["run_command.calls"]] + mock_run_command = mocker.patch( + "ansible.module_utils.basic.AnsibleModule.run_command", + side_effect=call_results) + + # Try to run test case + with pytest.raises(SystemExit): + puppet.main() + + out, err = capfd.readouterr() + results = json.loads(out) + print("results =\n%s" % results) + + assert mock_run_command.call_count == len(testcase["run_command.calls"]) + if mock_run_command.call_count: + call_args_list = [(item[0][0], item[1]) for item in mock_run_command.call_args_list] + expected_call_args_list = [(item[0], item[1]) for item in testcase["run_command.calls"]] + print("call args list =\n%s" % call_args_list) + print("expected args list =\n%s" % expected_call_args_list) + assert call_args_list == expected_call_args_list + + assert results.get("changed", False) == testcase["changed"] + if "failed" in testcase: + assert results.get("failed", False) == testcase["failed"] + if "msg" in testcase: + assert results.get("msg", "") == testcase["msg"] From af53271c41f14c39696b1ac3f65b3163407ab18b Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sat, 17 Dec 2022 12:10:23 +0100 Subject: [PATCH 0377/2104] lxc_container: fix lxc argument when executing lxc command (#5659) lxc_container fails when executing the lxc command (e.g. when creating a new container) because PR#5358 broke the module argument parsing. The resulting argument dict contained only the module argument name and the argument flag but not the value. E.g. ``` - lxc_container: template: debian ``` would result in lxc command arguments `lxc template --template` instead of `lxc --template debian`. Fixes: 6f88426cf1dc ("lxc_container: minor refactor (#5358)") Fixes #5578 Signed-off-by: Alexander Couzens Signed-off-by: Alexander Couzens --- changelogs/fragments/5659-fix-lxc_container-command.yml | 2 ++ plugins/modules/lxc_container.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5659-fix-lxc_container-command.yml diff --git a/changelogs/fragments/5659-fix-lxc_container-command.yml b/changelogs/fragments/5659-fix-lxc_container-command.yml new file mode 100644 index 0000000000..450d889808 --- /dev/null +++ b/changelogs/fragments/5659-fix-lxc_container-command.yml @@ -0,0 +1,2 @@ +bugfixes: + - lxc_container - fix the arguments of the lxc command which broke the creation and cloning of containers (https://github.com/ansible-collections/community.general/issues/5578). diff --git a/plugins/modules/lxc_container.py b/plugins/modules/lxc_container.py index 7871f13972..9fe27b8d81 100644 --- a/plugins/modules/lxc_container.py +++ b/plugins/modules/lxc_container.py @@ -677,7 +677,7 @@ class LxcContainerManagement(object): false_values = BOOLEANS_FALSE.union([None, '']) result = dict( - (k, v) + (v, self.module.params[k]) for k, v in variables.items() if self.module.params[k] not in false_values ) From 25be366cc3dfa99bdc9bb914cece4614c2256d08 Mon Sep 17 00:00:00 2001 From: Or Bin Date: Sun, 18 Dec 2022 00:31:06 +0200 Subject: [PATCH 0378/2104] Fixed `github_release` docs: only module-specific returned key is `tag` (#5699) * Fixed github_release docs: only module-specific returned key is "tag" * Update plugins/modules/github_release.py - added a dot Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- plugins/modules/github_release.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/modules/github_release.py b/plugins/modules/github_release.py index 84ce4ce4ec..0b3a5a886c 100644 --- a/plugins/modules/github_release.py +++ b/plugins/modules/github_release.py @@ -108,17 +108,8 @@ EXAMPLES = ''' ''' RETURN = ''' -create_release: - description: - - Version of the created release - - "For Ansible version 2.5 and later, if specified release version already exists, then State is unchanged" - - "For Ansible versions prior to 2.5, if specified release version already exists, then State is skipped" - type: str - returned: success - sample: 1.1.0 - -latest_release: - description: Version of the latest release +tag: + description: Version of the created/latest release. type: str returned: success sample: 1.1.0 From fab73a1d1e168fc04a5723d45bb3251149d9d856 Mon Sep 17 00:00:00 2001 From: castorsky Date: Tue, 20 Dec 2022 03:22:23 +0800 Subject: [PATCH 0379/2104] Bugfix: Remove redundant VMID parameters (#5672) * Remove redundant parameters VMID * Add changelog fragment --- changelogs/fragments/5672-proxmox.yml | 3 +++ plugins/modules/proxmox_disk.py | 4 ++-- plugins/modules/proxmox_nic.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5672-proxmox.yml diff --git a/changelogs/fragments/5672-proxmox.yml b/changelogs/fragments/5672-proxmox.yml new file mode 100644 index 0000000000..4fafe53d14 --- /dev/null +++ b/changelogs/fragments/5672-proxmox.yml @@ -0,0 +1,3 @@ +bugfixes: + - "proxmox_disk - fixed possible issues with redundant ``vmid`` parameter (https://github.com/ansible-collections/community.general/issues/5492, https://github.com/ansible-collections/community.general/pull/5672)." + - "proxmox_nic - fixed possible issues with redundant ``vmid`` parameter (https://github.com/ansible-collections/community.general/issues/5492, https://github.com/ansible-collections/community.general/pull/5672)." diff --git a/plugins/modules/proxmox_disk.py b/plugins/modules/proxmox_disk.py index 8f55e2d130..8a81f18a3f 100644 --- a/plugins/modules/proxmox_disk.py +++ b/plugins/modules/proxmox_disk.py @@ -699,7 +699,7 @@ def main(): module.exit_json(changed=False, vmid=vmid, msg='Disk %s already detached in VM %s' % (disk, vmid)) if disk not in vm_config: module.exit_json(changed=False, vmid=vmid, msg="Disk %s not present in VM %s config" % (disk, vmid)) - proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).unlink.put(vmid=vmid, idlist=disk, force=0) + proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).unlink.put(idlist=disk, force=0) module.exit_json(changed=True, vmid=vmid, msg="Disk %s detached from VM %s" % (disk, vmid)) except Exception as e: module.fail_json(msg="Failed to detach disk %s from VM %s with exception: %s" % (disk, vmid, str(e))) @@ -734,7 +734,7 @@ def main(): try: if disk not in vm_config: module.exit_json(changed=False, vmid=vmid, msg="Disk %s is already absent in VM %s" % (disk, vmid)) - proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).unlink.put(vmid=vmid, idlist=disk, force=1) + proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).unlink.put(idlist=disk, force=1) module.exit_json(changed=True, vmid=vmid, msg="Disk %s removed from VM %s" % (disk, vmid)) except Exception as e: module.fail_json(vmid=vmid, msg='Unable to remove disk %s from VM %s: %s' % (disk, vmid, str(e))) diff --git a/plugins/modules/proxmox_nic.py b/plugins/modules/proxmox_nic.py index bcc56de57e..5c8c3f47df 100644 --- a/plugins/modules/proxmox_nic.py +++ b/plugins/modules/proxmox_nic.py @@ -223,7 +223,7 @@ class ProxmoxNicAnsible(ProxmoxAnsible): if interface in vminfo: if not self.module.check_mode: - self.proxmox_api.nodes(vm['node']).qemu(vmid).config.set(vmid=vmid, delete=interface) + self.proxmox_api.nodes(vm['node']).qemu(vmid).config.set(delete=interface) return True return False From 2b39470a774c28e26780e4e2e4cc9b998471da3c Mon Sep 17 00:00:00 2001 From: joergho <48011876+joergho@users.noreply.github.com> Date: Mon, 19 Dec 2022 20:23:44 +0100 Subject: [PATCH 0380/2104] opkg: fix issue that force=reinstall would not reinstall an existing package (#5705) * opkg: fix issue that force=reinstall would not reinstall an existing package Signed-off-by: Joerg Hofrichter * changelog fragment Signed-off-by: Joerg Hofrichter --- changelogs/fragments/5705-opkg-fix-force-reinstall.yml | 2 ++ plugins/modules/opkg.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5705-opkg-fix-force-reinstall.yml diff --git a/changelogs/fragments/5705-opkg-fix-force-reinstall.yml b/changelogs/fragments/5705-opkg-fix-force-reinstall.yml new file mode 100644 index 0000000000..27a188ab9e --- /dev/null +++ b/changelogs/fragments/5705-opkg-fix-force-reinstall.yml @@ -0,0 +1,2 @@ +bugfixes: + - opkg - fix issue that ``force=reinstall`` would not reinstall an existing package (https://github.com/ansible-collections/community.general/pull/5705). diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index 60d2adc958..6c5e23093e 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -154,7 +154,7 @@ def install_packages(module, opkg_path, packages): install_c = 0 for package in packages: - if query_package(module, opkg_path, package): + if query_package(module, opkg_path, package) and (force != '--force-reinstall'): continue rc, out, err = module.run_command("%s install %s %s" % (opkg_path, force, package)) From 77fde030cdb89c1c5532974fb2d827dc1156a097 Mon Sep 17 00:00:00 2001 From: Laurence Date: Tue, 20 Dec 2022 11:49:11 +0000 Subject: [PATCH 0381/2104] Add support for host restriction in sudoers module (#5703) * Add support to restrict privileges by host * Missing comma * Making linter happy. * Add version 6.2.0 as when sudoers host parameter added Co-authored-by: Felix Fontein * Changelog fragment for PR #5703 * Test for sudoers host-based restriction Co-authored-by: Felix Fontein --- .../fragments/5703-sudoers-host-support.yml | 2 ++ plugins/modules/sudoers.py | 22 +++++++++++++++++-- .../targets/sudoers/tasks/main.yml | 14 ++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5703-sudoers-host-support.yml diff --git a/changelogs/fragments/5703-sudoers-host-support.yml b/changelogs/fragments/5703-sudoers-host-support.yml new file mode 100644 index 0000000000..1aaa30d8d9 --- /dev/null +++ b/changelogs/fragments/5703-sudoers-host-support.yml @@ -0,0 +1,2 @@ +minor_changes: + - sudoers - adds ``host`` parameter for setting hostname restrictions in sudoers rules (https://github.com/ansible-collections/community.general/issues/5702). diff --git a/plugins/modules/sudoers.py b/plugins/modules/sudoers.py index 2c0aa879bc..f2bcb20b75 100644 --- a/plugins/modules/sudoers.py +++ b/plugins/modules/sudoers.py @@ -43,6 +43,12 @@ options: - Whether a password will be required to run the sudo'd command. default: true type: bool + host: + description: + - Specify the host the rule is for. + default: ALL + type: str + version_added: 6.2.0 runas: description: - Specify the target user the command(s) will run as. @@ -95,10 +101,11 @@ EXAMPLES = ''' - name: >- Allow the monitoring group to run sudo /usr/local/bin/gather-app-metrics - without requiring a password + without requiring a password on the host called webserver community.general.sudoers: name: monitor-app group: monitoring + host: webserver commands: /usr/local/bin/gather-app-metrics - name: >- @@ -136,6 +143,7 @@ class Sudoers(object): self.group = module.params['group'] self.state = module.params['state'] self.nopassword = module.params['nopassword'] + self.host = module.params['host'] self.runas = module.params['runas'] self.sudoers_path = module.params['sudoers_path'] self.file = os.path.join(self.sudoers_path, self.name) @@ -178,7 +186,13 @@ class Sudoers(object): commands_str = ', '.join(self.commands) nopasswd_str = 'NOPASSWD:' if self.nopassword else '' runas_str = '({runas})'.format(runas=self.runas) if self.runas is not None else '' - return "{owner} ALL={runas}{nopasswd} {commands}\n".format(owner=owner, runas=runas_str, nopasswd=nopasswd_str, commands=commands_str) + return "{owner} {host}={runas}{nopasswd} {commands}\n".format( + owner=owner, + host=self.host, + runas=runas_str, + nopasswd=nopasswd_str, + commands=commands_str + ) def validate(self): if self.validation == 'absent': @@ -225,6 +239,10 @@ def main(): 'type': 'bool', 'default': True, }, + 'host': { + 'type': 'str', + 'default': 'ALL', + }, 'runas': { 'type': 'str', 'default': None, diff --git a/tests/integration/targets/sudoers/tasks/main.yml b/tests/integration/targets/sudoers/tasks/main.yml index 682bd7efff..a44307ad9e 100644 --- a/tests/integration/targets/sudoers/tasks/main.yml +++ b/tests/integration/targets/sudoers/tasks/main.yml @@ -131,6 +131,19 @@ src: "{{ sudoers_path }}/my-sudo-rule-6" register: rule_6_contents +- name: Create rule to allow user to sudo just on host-1 + community.general.sudoers: + name: my-sudo-rule-7 + state: present + user: alice + host: host-1 + commands: /usr/local/bin/command + register: rule_7 + +- name: Grab contents of my-sudo-rule-7 + ansible.builtin.slurp: + src: "{{ sudoers_path }}/my-sudo-rule-7" + register: rule_7_contents - name: Revoke rule 1 community.general.sudoers: @@ -229,6 +242,7 @@ - "rule_4_contents['content'] | b64decode == '%students ALL=NOPASSWD: /usr/local/bin/command\n'" - "rule_5_contents['content'] | b64decode == 'alice ALL=NOPASSWD: /usr/local/bin/command\n'" - "rule_6_contents['content'] | b64decode == 'alice ALL=(bob)NOPASSWD: /usr/local/bin/command\n'" + - "rule_7_contents['content'] | b64decode == 'alice host-1=NOPASSWD: /usr/local/bin/command\n'" - name: Check revocation stat ansible.builtin.assert: From 1f492414816f5455de27afe659f22272a0829514 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 21 Dec 2022 07:31:46 +0100 Subject: [PATCH 0382/2104] CI: add extra VMs for certain tests (#5713) * Remove superfluous VM. * Add extra VM group. * More platforms, add scripts. * [REVERT THIS] Shrink matrix to only the tests we are interested in. * Fix some tests. * Skip snap tests on Ubuntu VMs for now. * Skip xfs_quota tests on Alpine VMs due to ansible.posix.mount failing. * Revert "[REVERT THIS] Shrink matrix to only the tests we are interested in." This reverts commit 2e98e163db643f5b06290d2f1fa99fe14ca4eebd. * Stick to Alpine and Ubuntu 22.04 for now. --- .azure-pipelines/azure-pipelines.yml | 25 ++++++++++++++++--- tests/integration/targets/filesize/aliases | 1 + tests/integration/targets/filesystem/aliases | 1 + .../filesystem/tasks/create_device.yml | 8 ++++-- .../targets/iptables_state/aliases | 1 + .../iptables_state/tasks/tests/01-tables.yml | 11 +------- tests/integration/targets/lvg/aliases | 1 + tests/integration/targets/lvg/tasks/setup.yml | 19 ++++++++++---- .../targets/lvg/tasks/teardown.yml | 13 +++++----- .../targets/lvg/tasks/test_grow_reduce.yml | 16 ++++++------ .../targets/lvg/tasks/test_indempotency.yml | 4 +-- .../targets/lvg/tasks/test_pvresize.yml | 10 ++++---- tests/integration/targets/snap/aliases | 4 +++ tests/integration/targets/snap_alias/aliases | 4 +++ tests/integration/targets/ufw/aliases | 1 + tests/integration/targets/xattr/aliases | 1 + tests/integration/targets/xfs_quota/aliases | 2 ++ tests/utils/shippable/alpine.sh | 1 + tests/utils/shippable/fedora.sh | 1 + tests/utils/shippable/ubuntu.sh | 1 + 20 files changed, 83 insertions(+), 42 deletions(-) create mode 120000 tests/utils/shippable/alpine.sh create mode 120000 tests/utils/shippable/fedora.sh create mode 120000 tests/utils/shippable/ubuntu.sh diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index a5dcafa422..c8e03a164b 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -189,6 +189,24 @@ stages: - test: 3.5 ## Remote + - stage: Remote_devel_extra_vms + displayName: Remote devel extra VMs + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: devel/{0} + targets: + - name: Alpine 3.16 + test: alpine/3.16 + # - name: Fedora 36 + # test: fedora/36 + # - name: Ubuntu 20.04 + # test: ubuntu/20.04 + - name: Ubuntu 22.04 + test: ubuntu/22.04 + groups: + - vm - stage: Remote_devel displayName: Remote devel dependsOn: [] @@ -203,8 +221,6 @@ stages: test: rhel/7.9 - name: RHEL 9.0 test: rhel/9.0 - - name: FreeBSD 12.3 - test: freebsd/12.3 - name: FreeBSD 13.1 test: freebsd/13.1 groups: @@ -221,8 +237,8 @@ stages: targets: - name: RHEL 9.0 test: rhel/9.0 - - name: FreeBSD 13.1 - test: freebsd/13.1 + - name: FreeBSD 12.3 + test: freebsd/12.3 groups: - 1 - 2 @@ -459,6 +475,7 @@ stages: - Units_2_12 - Units_2_13 - Units_2_14 + - Remote_devel_extra_vms - Remote_devel - Remote_2_11 - Remote_2_12 diff --git a/tests/integration/targets/filesize/aliases b/tests/integration/targets/filesize/aliases index afda346c4e..7642e70daf 100644 --- a/tests/integration/targets/filesize/aliases +++ b/tests/integration/targets/filesize/aliases @@ -3,3 +3,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/1 +azp/posix/vm diff --git a/tests/integration/targets/filesystem/aliases b/tests/integration/targets/filesystem/aliases index 007bed5386..a666f7a142 100644 --- a/tests/integration/targets/filesystem/aliases +++ b/tests/integration/targets/filesystem/aliases @@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/1 +azp/posix/vm destructive skip/aix skip/osx diff --git a/tests/integration/targets/filesystem/tasks/create_device.yml b/tests/integration/targets/filesystem/tasks/create_device.yml index 5229e19f25..8966ec2e61 100644 --- a/tests/integration/targets/filesystem/tasks/create_device.yml +++ b/tests/integration/targets/filesystem/tasks/create_device.yml @@ -14,10 +14,14 @@ block: - when: fstype == 'lvm' block: + - name: 'Show next free loop device' + ansible.builtin.command: + cmd: 'losetup -f' + register: loop_device_cmd + - name: 'Create a loop device for LVM' ansible.builtin.command: - cmd: 'losetup --show -f {{ dev }}' - register: loop_device_cmd + cmd: 'losetup -f {{ dev }}' - name: 'Switch to loop device target for further tasks' ansible.builtin.set_fact: diff --git a/tests/integration/targets/iptables_state/aliases b/tests/integration/targets/iptables_state/aliases index 80f7c7e32f..5a02a630bc 100644 --- a/tests/integration/targets/iptables_state/aliases +++ b/tests/integration/targets/iptables_state/aliases @@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/1 +azp/posix/vm destructive skip/docker # kernel modules not loadable skip/freebsd # no iptables/netfilter (Linux specific) diff --git a/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml b/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml index 2f00e175b4..929928c8e7 100644 --- a/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml +++ b/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml @@ -167,13 +167,12 @@ -- name: "get security, raw and mangle tables states" +- name: "get raw and mangle tables states" iptables_state: path: "{{ iptables_saved }}" state: saved table: "{{ item }}" loop: - - security - raw - mangle changed_when: false @@ -198,8 +197,6 @@ - "'*nat' in iptables_state.saved" - "'raw' in iptables_state.tables" - "'*raw' in iptables_state.saved" - - "'security' in iptables_state.tables" - - "'*security' in iptables_state.saved" quiet: yes @@ -233,17 +230,14 @@ - "'*mangle' in iptables_state.initial_state" - "'*nat' in iptables_state.initial_state" - "'*raw' in iptables_state.initial_state" - - "'*security' in iptables_state.initial_state" - "'filter' in iptables_state.tables" - "'mangle' not in iptables_state.tables" - "'nat' not in iptables_state.tables" - "'raw' not in iptables_state.tables" - - "'security' not in iptables_state.tables" - "'*filter' in iptables_state.restored" - "'*mangle' not in iptables_state.restored" - "'*nat' not in iptables_state.restored" - "'*raw' not in iptables_state.restored" - - "'*security' not in iptables_state.restored" - iptables_state is not changed quiet: yes @@ -264,17 +258,14 @@ - "'*mangle' in iptables_state.initial_state" - "'*nat' in iptables_state.initial_state" - "'*raw' in iptables_state.initial_state" - - "'*security' in iptables_state.initial_state" - "'filter' in iptables_state.tables" - "'mangle' in iptables_state.tables" - "'nat' in iptables_state.tables" - "'raw' in iptables_state.tables" - - "'security' in iptables_state.tables" - "'*filter' in iptables_state.restored" - "'*mangle' in iptables_state.restored" - "'*nat' in iptables_state.restored" - "'*raw' in iptables_state.restored" - - "'*security' in iptables_state.restored" - iptables_state is not changed quiet: yes diff --git a/tests/integration/targets/lvg/aliases b/tests/integration/targets/lvg/aliases index f4617b3377..3b92ba75c4 100644 --- a/tests/integration/targets/lvg/aliases +++ b/tests/integration/targets/lvg/aliases @@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/1 +azp/posix/vm destructive needs/privileged skip/aix diff --git a/tests/integration/targets/lvg/tasks/setup.yml b/tests/integration/targets/lvg/tasks/setup.yml index 92785e6d3d..3984b9fc3a 100644 --- a/tests/integration/targets/lvg/tasks/setup.yml +++ b/tests/integration/targets/lvg/tasks/setup.yml @@ -7,12 +7,21 @@ command: "dd if=/dev/zero of={{ remote_tmp_dir }}/img{{ item }} bs=1M count=10" with_sequence: 'count=2' +- name: "Show next free loop device" + command: "losetup -f" + register: loop_device1 + - name: "Create loop device for file" - command: "losetup --show -f {{ remote_tmp_dir }}/img{{ item }}" - with_sequence: 'count=2' - register: loop_devices + command: "losetup -f {{ remote_tmp_dir }}/img1" + +- name: "Show next free loop device" + command: "losetup -f" + register: loop_device2 + +- name: "Create loop device for file" + command: "losetup -f {{ remote_tmp_dir }}/img2" - name: "Affect name on disk to work on" set_fact: - loop_device1: "{{ loop_devices.results[0] }}" - loop_device2: "{{ loop_devices.results[1] }}" + loop_device1: "{{ loop_device1.stdout }}" + loop_device2: "{{ loop_device2.stdout }}" diff --git a/tests/integration/targets/lvg/tasks/teardown.yml b/tests/integration/targets/lvg/tasks/teardown.yml index 027c1257fe..de49573214 100644 --- a/tests/integration/targets/lvg/tasks/teardown.yml +++ b/tests/integration/targets/lvg/tasks/teardown.yml @@ -8,15 +8,16 @@ vg: testvg state: absent -- name: Detach loop device - command: "losetup -d {{ item.stdout }}" - loop: "{{ loop_devices.results|default([]) }}" +- name: Detach loop devices + command: "losetup -d {{ item }}" + loop: + - "{{ loop_device1 | default('') }}" + - "{{ loop_device2 | default('') }}" when: - - item.stdout is defined - - item.stdout is match("/dev/.*") + - item != '' - name: Remove device files file: path: "{{ remote_tmp_dir }}/img{{ item }}" state: absent - with_sequence: 'count={{ loop_devices.results|length }}' + with_sequence: 'count=2' diff --git a/tests/integration/targets/lvg/tasks/test_grow_reduce.yml b/tests/integration/targets/lvg/tasks/test_grow_reduce.yml index 5974a88aaf..857df92464 100644 --- a/tests/integration/targets/lvg/tasks/test_grow_reduce.yml +++ b/tests/integration/targets/lvg/tasks/test_grow_reduce.yml @@ -6,7 +6,7 @@ - name: "Create volume group on first disk" lvg: vg: testvg - pvs: "{{ loop_device1.stdout }}" + pvs: "{{ loop_device1 }}" - name: "get lvm facts" setup: @@ -16,14 +16,14 @@ - name: "Assert the testvg span only on first disk" assert: that: - - ansible_lvm.pvs[loop_device1.stdout].vg == "testvg" - - 'loop_device2.stdout not in ansible_lvm.pvs or - ansible_lvm.pvs[loop_device2.stdout].vg == ""' + - ansible_lvm.pvs[loop_device1].vg == "testvg" + - 'loop_device2 not in ansible_lvm.pvs or + ansible_lvm.pvs[loop_device2].vg == ""' - name: "Extend to second disk AND reduce from the first disk" lvg: vg: testvg - pvs: "{{ loop_device2.stdout }}" + pvs: "{{ loop_device2 }}" - name: "get lvm facts" setup: @@ -33,6 +33,6 @@ - name: "Assert the testvg span only on first disk" assert: that: - - 'loop_device1.stdout not in ansible_lvm.pvs or - ansible_lvm.pvs[loop_device1.stdout].vg == ""' - - ansible_lvm.pvs[loop_device2.stdout].vg == "testvg" + - 'loop_device1 not in ansible_lvm.pvs or + ansible_lvm.pvs[loop_device1].vg == ""' + - ansible_lvm.pvs[loop_device2].vg == "testvg" diff --git a/tests/integration/targets/lvg/tasks/test_indempotency.yml b/tests/integration/targets/lvg/tasks/test_indempotency.yml index abaa262881..758912484c 100644 --- a/tests/integration/targets/lvg/tasks/test_indempotency.yml +++ b/tests/integration/targets/lvg/tasks/test_indempotency.yml @@ -6,12 +6,12 @@ - name: Create volume group on disk device lvg: vg: testvg - pvs: "{{ loop_device1.stdout }}" + pvs: "{{ loop_device1 }}" - name: Create the volume group again to verify idempotence lvg: vg: testvg - pvs: "{{ loop_device1.stdout }}" + pvs: "{{ loop_device1 }}" register: repeat_vg_create - name: Do all assertions to verify expected results diff --git a/tests/integration/targets/lvg/tasks/test_pvresize.yml b/tests/integration/targets/lvg/tasks/test_pvresize.yml index c8a2c8edb5..eef9503040 100644 --- a/tests/integration/targets/lvg/tasks/test_pvresize.yml +++ b/tests/integration/targets/lvg/tasks/test_pvresize.yml @@ -6,7 +6,7 @@ - name: "Create volume group on first disk" lvg: vg: testvg - pvs: "{{ loop_device1.stdout }}" + pvs: "{{ loop_device1 }}" - name: Gets current vg size shell: vgs -v testvg -o pv_size --noheading --units b | xargs @@ -21,12 +21,12 @@ command: "dd if=/dev/zero bs=8MiB count=1 of={{ remote_tmp_dir }}/img1 conv=notrunc oflag=append" - name: "Reread size of file associated with loop_device1" - command: "losetup -c {{ loop_device1.stdout }}" + command: "losetup -c {{ loop_device1 }}" - name: "Reruns lvg with pvresize:no" lvg: vg: testvg - pvs: "{{ loop_device1.stdout }}" + pvs: "{{ loop_device1 }}" pvresize: no register: cmd_result @@ -46,7 +46,7 @@ - name: "Reruns lvg with pvresize:yes and check_mode:yes" lvg: vg: testvg - pvs: "{{ loop_device1.stdout }}" + pvs: "{{ loop_device1 }}" pvresize: yes check_mode: yes register: cmd_result @@ -68,7 +68,7 @@ - name: "Reruns lvg with pvresize:yes" lvg: vg: testvg - pvs: "{{ loop_device1.stdout }}" + pvs: "{{ loop_device1 }}" pvresize: yes - name: Gets current vg size diff --git a/tests/integration/targets/snap/aliases b/tests/integration/targets/snap/aliases index dcb4aa199e..a50e25cc5c 100644 --- a/tests/integration/targets/snap/aliases +++ b/tests/integration/targets/snap/aliases @@ -3,8 +3,12 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/1 +azp/posix/vm skip/aix +skip/alpine +skip/fedora skip/freebsd skip/osx skip/macos skip/docker +skip/ubuntu # FIXME! diff --git a/tests/integration/targets/snap_alias/aliases b/tests/integration/targets/snap_alias/aliases index dcb4aa199e..a50e25cc5c 100644 --- a/tests/integration/targets/snap_alias/aliases +++ b/tests/integration/targets/snap_alias/aliases @@ -3,8 +3,12 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/1 +azp/posix/vm skip/aix +skip/alpine +skip/fedora skip/freebsd skip/osx skip/macos skip/docker +skip/ubuntu # FIXME! diff --git a/tests/integration/targets/ufw/aliases b/tests/integration/targets/ufw/aliases index fa4f2a6cd3..1f974ecd19 100644 --- a/tests/integration/targets/ufw/aliases +++ b/tests/integration/targets/ufw/aliases @@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/2 +azp/posix/vm skip/aix skip/osx skip/macos diff --git a/tests/integration/targets/xattr/aliases b/tests/integration/targets/xattr/aliases index db3751be49..5cd9c012e1 100644 --- a/tests/integration/targets/xattr/aliases +++ b/tests/integration/targets/xattr/aliases @@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/2 +azp/posix/vm skip/aix skip/docker skip/freebsd diff --git a/tests/integration/targets/xfs_quota/aliases b/tests/integration/targets/xfs_quota/aliases index 56dffecaa4..dd4714509e 100644 --- a/tests/integration/targets/xfs_quota/aliases +++ b/tests/integration/targets/xfs_quota/aliases @@ -3,9 +3,11 @@ # SPDX-License-Identifier: GPL-3.0-or-later azp/posix/1 +azp/posix/vm needs/privileged needs/root skip/aix +skip/alpine # FIXME skip/osx skip/macos skip/freebsd diff --git a/tests/utils/shippable/alpine.sh b/tests/utils/shippable/alpine.sh new file mode 120000 index 0000000000..6ddb776854 --- /dev/null +++ b/tests/utils/shippable/alpine.sh @@ -0,0 +1 @@ +remote.sh \ No newline at end of file diff --git a/tests/utils/shippable/fedora.sh b/tests/utils/shippable/fedora.sh new file mode 120000 index 0000000000..6ddb776854 --- /dev/null +++ b/tests/utils/shippable/fedora.sh @@ -0,0 +1 @@ +remote.sh \ No newline at end of file diff --git a/tests/utils/shippable/ubuntu.sh b/tests/utils/shippable/ubuntu.sh new file mode 120000 index 0000000000..6ddb776854 --- /dev/null +++ b/tests/utils/shippable/ubuntu.sh @@ -0,0 +1 @@ +remote.sh \ No newline at end of file From 488e828f9b7dcf2867edec72ce35f766d7b54ff0 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 22 Dec 2022 18:45:07 +1300 Subject: [PATCH 0383/2104] ansible_galaxy_install: use locale C tentatively, else en_US (#5680) * ansible_galaxy_install: use locale C tentatively, else en_US * use custom exception to signal unsupported locale * add step to remove artefacts at the end of the test * add step to remove artefacts at the beginning of the test * comment out context controller * trying with temporary dir as destination * remove collection before test with reqs file * ensure collections are installed in temp dir in tests + check_force * simplified the change * added extra condition for failing locale * improved exception handling * add changelog fragment --- ...5680-ansible_galaxy_install-fx-locale.yaml | 3 ++ plugins/modules/ansible_galaxy_install.py | 35 ++++++++++++++----- .../ansible_galaxy_install/tasks/main.yml | 6 ++-- 3 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 changelogs/fragments/5680-ansible_galaxy_install-fx-locale.yaml diff --git a/changelogs/fragments/5680-ansible_galaxy_install-fx-locale.yaml b/changelogs/fragments/5680-ansible_galaxy_install-fx-locale.yaml new file mode 100644 index 0000000000..35fd88bc25 --- /dev/null +++ b/changelogs/fragments/5680-ansible_galaxy_install-fx-locale.yaml @@ -0,0 +1,3 @@ +bugfixes: + - ansible_galaxy_install - try ``C.UTF-8`` and then fall back to ``en_US.UTF-8`` before failing (https://github.com/ansible-collections/community.general/pull/5680). + - ansible_galaxy_install - set default to raise exception if command's return code is different from zero (https://github.com/ansible-collections/community.general/pull/5680). diff --git a/plugins/modules/ansible_galaxy_install.py b/plugins/modules/ansible_galaxy_install.py index 5e5ec54eb0..694591d8cb 100644 --- a/plugins/modules/ansible_galaxy_install.py +++ b/plugins/modules/ansible_galaxy_install.py @@ -20,6 +20,10 @@ notes: - > B(Ansible 2.9/2.10): The C(ansible-galaxy) command changed significantly between Ansible 2.9 and ansible-base 2.10 (later ansible-core 2.11). See comments in the parameters. + - > + The module will try and run using the C(C.UTF-8) locale. + If that fails, it will try C(en_US.UTF-8). + If that one also fails, the module will fail. requirements: - Ansible 2.9, ansible-base 2.10, or ansible-core 2.11 or newer options: @@ -185,7 +189,7 @@ RETURN = """ import re from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt -from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper +from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper, ModuleHelperException class AnsibleGalaxyInstall(ModuleHelper): @@ -226,11 +230,17 @@ class AnsibleGalaxyInstall(ModuleHelper): version=fmt.as_bool("--version"), name=fmt.as_list(), ) - force_lang = "en_US.UTF-8" - check_rc = True + + def _make_runner(self, lang): + return CmdRunner(self.module, command=self.command, arg_formats=self.command_args_formats, force_lang=lang, check_rc=True) def _get_ansible_galaxy_version(self): + class UnsupportedLocale(ModuleHelperException): + pass + def process(rc, out, err): + if (rc != 0 and "unsupported locale setting" in err) or (rc == 0 and "cannot change locale" in err): + raise UnsupportedLocale(msg=err) line = out.splitlines()[0] match = self._RE_GALAXY_VERSION.match(line) if not match: @@ -239,12 +249,18 @@ class AnsibleGalaxyInstall(ModuleHelper): version = tuple(int(x) for x in version.split('.')[:3]) return version - with self.runner("version", check_rc=True, output_process=process) as ctx: - return ctx.run(version=True) + try: + runner = self._make_runner("C.UTF-8") + with runner("version", check_rc=False, output_process=process) as ctx: + return runner, ctx.run(version=True) + except UnsupportedLocale as e: + runner = self._make_runner("en_US.UTF-8") + with runner("version", check_rc=True, output_process=process) as ctx: + return runner, ctx.run(version=True) def __init_module__(self): - self.runner = CmdRunner(self.module, command=self.command, arg_formats=self.command_args_formats, force_lang=self.force_lang) - self.ansible_version = self._get_ansible_galaxy_version() + # self.runner = CmdRunner(self.module, command=self.command, arg_formats=self.command_args_formats, force_lang=self.force_lang) + self.runner, self.ansible_version = self._get_ansible_galaxy_version() if self.ansible_version < (2, 11) and not self.vars.ack_min_ansiblecore211: self.module.deprecate( "Support for Ansible 2.9 and ansible-base 2.10 is being deprecated. " @@ -339,11 +355,12 @@ class AnsibleGalaxyInstall(ModuleHelper): self._setup210plus() with self.runner("type galaxy_cmd force no_deps dest requirements_file name", output_process=process) as ctx: ctx.run(galaxy_cmd="install") + if self.verbosity > 2: + self.vars.set("run_info", ctx.run_info) def main(): - galaxy = AnsibleGalaxyInstall() - galaxy.run() + AnsibleGalaxyInstall.execute() if __name__ == '__main__': diff --git a/tests/integration/targets/ansible_galaxy_install/tasks/main.yml b/tests/integration/targets/ansible_galaxy_install/tasks/main.yml index 44ad697930..1ecd9980d4 100644 --- a/tests/integration/targets/ansible_galaxy_install/tasks/main.yml +++ b/tests/integration/targets/ansible_galaxy_install/tasks/main.yml @@ -10,7 +10,7 @@ name: netbox.netbox register: install_c0 -- name: Assert collection was installed +- name: Assert collection netbox.netbox was installed assert: that: - install_c0 is changed @@ -34,7 +34,7 @@ name: ansistrano.deploy register: install_r0 -- name: Assert collection was installed +- name: Assert collection ansistrano.deploy was installed assert: that: - install_r0 is changed @@ -52,7 +52,7 @@ - install_r1 is not changed ################################################### -- name: +- name: Set requirements file path set_fact: reqs_file: '{{ remote_tmp_dir }}/reqs.yaml' From 2fc7baecf8620adba9f46e4d4566f1d2bf1a0a9f Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 22 Dec 2022 18:54:02 +1300 Subject: [PATCH 0384/2104] xfconf: prune deprecated facts-generating code (more of it) (#5719) * xfconf: prune deprecated facts-generatin code (more of it) * add changelog fragment --- changelogs/fragments/5719-xfconf-facts-deprecation.yml | 6 ++++++ plugins/modules/xfconf.py | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5719-xfconf-facts-deprecation.yml diff --git a/changelogs/fragments/5719-xfconf-facts-deprecation.yml b/changelogs/fragments/5719-xfconf-facts-deprecation.yml new file mode 100644 index 0000000000..353c0f3730 --- /dev/null +++ b/changelogs/fragments/5719-xfconf-facts-deprecation.yml @@ -0,0 +1,6 @@ +removed_features: + - > + xfconf - generating facts was deprecated in community.general 3.0.0, + however three factoids, ``property``, ``channel`` and ``value`` continued to be generated by mistake. + This behaviour has been removed and ``xfconf`` generate no facts whatsoever + (https://github.com/ansible-collections/community.general/pull/5502). diff --git a/plugins/modules/xfconf.py b/plugins/modules/xfconf.py index 6776ef888e..ec00763ee1 100644 --- a/plugins/modules/xfconf.py +++ b/plugins/modules/xfconf.py @@ -172,7 +172,6 @@ class XFConfProperty(StateModuleHelper): change_params = 'value', diff_params = 'value', output_params = ('property', 'channel', 'value') - facts_params = ('property', 'channel', 'value') module = dict( argument_spec=dict( state=dict(type='str', choices=("present", "absent"), default="present"), From 28969c61ad0dadb79061ec313e901b93df6c2bdf Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 22 Dec 2022 18:57:23 +1300 Subject: [PATCH 0385/2104] manageiq_policies: deprecate list state (#5721) * manageiq_policies: deprecate list state * add changelog fragment --- .../5721-manageiq-policies-deprecate-list-state.yaml | 2 ++ plugins/modules/manageiq_policies.py | 12 +++++++++++- tests/sanity/ignore-2.11.txt | 2 +- tests/sanity/ignore-2.12.txt | 2 +- tests/sanity/ignore-2.13.txt | 2 +- tests/sanity/ignore-2.14.txt | 2 +- tests/sanity/ignore-2.15.txt | 2 +- 7 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5721-manageiq-policies-deprecate-list-state.yaml diff --git a/changelogs/fragments/5721-manageiq-policies-deprecate-list-state.yaml b/changelogs/fragments/5721-manageiq-policies-deprecate-list-state.yaml new file mode 100644 index 0000000000..109a2103e4 --- /dev/null +++ b/changelogs/fragments/5721-manageiq-policies-deprecate-list-state.yaml @@ -0,0 +1,2 @@ +deprecated_features: + - manageiq_policies - deprecate ``state=list`` in favour of using ``community.general.manageiq_policies_info`` (https://github.com/ansible-collections/community.general/pull/5721). diff --git a/plugins/modules/manageiq_policies.py b/plugins/modules/manageiq_policies.py index c5b2d88287..fc185fcd58 100644 --- a/plugins/modules/manageiq_policies.py +++ b/plugins/modules/manageiq_policies.py @@ -27,7 +27,10 @@ options: description: - C(absent) - policy_profiles should not exist, - C(present) - policy_profiles should exist, - - C(list) - list current policy_profiles and policies. + - > + C(list) - list current policy_profiles and policies. + This state is deprecated and will be removed 8.0.0. + Please use the module M(community.general.manageiq_policies_info) instead. choices: ['absent', 'present', 'list'] default: 'present' policy_profiles: @@ -163,6 +166,13 @@ def main(): resource_name = module.params['resource_name'] state = module.params['state'] + if state == "list": + module.deprecate( + 'The value "list" for "state" is deprecated. Please use community.general.manageiq_policies_info instead.', + version='8.0.0', + collection_name='community.general' + ) + # get the action and resource type action = actions[state] resource_type = manageiq_entities()[resource_type_key] diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index c79a17493f..e49b216f6e 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -10,7 +10,7 @@ plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choic plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index d93315938c..0cf9b73046 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -5,7 +5,7 @@ plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choic plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index d93315938c..0cf9b73046 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -5,7 +5,7 @@ plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choic plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice # state=get - removed in 8.0.0 plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index d4c0d0d948..efdb15f969 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -6,7 +6,7 @@ plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index d4c0d0d948..efdb15f969 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -6,7 +6,7 @@ plugins/modules/gconftool2.py validate-modules:parameter-state-invalid-choice plugins/modules/homectl.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/iptables_state.py validate-modules:undocumented-parameter plugins/modules/lxc_container.py validate-modules:use-run-command-not-popen -plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_policies.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-spec # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions From b3485b8fcab59e47d7460c3473329a9d516c3ea0 Mon Sep 17 00:00:00 2001 From: joergho <48011876+joergho@users.noreply.github.com> Date: Thu, 22 Dec 2022 19:31:33 +0100 Subject: [PATCH 0386/2104] opkg module: allow installing a package in a certain version (#5688) * opkg: allow installing a package in a certain version example: - name: Install foo in version 1.2 community.general.opkg: name: foo=1.2 state: present Signed-off-by: Joerg Hofrichter * opkg: use list for passing arguments to run_command Signed-off-by: Joerg Hofrichter Signed-off-by: Joerg Hofrichter --- ...88-opkg-module-install-certain-version.yml | 2 + plugins/modules/opkg.py | 62 +++++++++++++++---- 2 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 changelogs/fragments/5688-opkg-module-install-certain-version.yml diff --git a/changelogs/fragments/5688-opkg-module-install-certain-version.yml b/changelogs/fragments/5688-opkg-module-install-certain-version.yml new file mode 100644 index 0000000000..88168bd202 --- /dev/null +++ b/changelogs/fragments/5688-opkg-module-install-certain-version.yml @@ -0,0 +1,2 @@ +minor_changes: + - opkg - allow installing a package in a certain version (https://github.com/ansible-collections/community.general/pull/5688). diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index 6c5e23093e..7e2b8c4ac2 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -22,6 +22,9 @@ options: name: description: - Name of package(s) to install/remove. + - C(NAME=VERSION) syntax is also supported to install a package + in a certain version. See the examples. This is supported since + community.general 6.2.0. aliases: [pkg] required: true type: list @@ -64,6 +67,11 @@ EXAMPLES = ''' name: foo state: present +- name: Install foo in version 1.2 + community.general.opkg: + name: foo=1.2 + state: present + - name: Update cache and install foo community.general.opkg: name: foo @@ -96,22 +104,39 @@ from ansible.module_utils.six.moves import shlex_quote def update_package_db(module, opkg_path): """ Updates packages list. """ - rc, out, err = module.run_command("%s update" % opkg_path) + rc, out, err = module.run_command([opkg_path, "update"]) if rc != 0: module.fail_json(msg="could not update package db") -def query_package(module, opkg_path, name, state="present"): +def query_package(module, opkg_path, name, version=None, state="present"): """ Returns whether a package is installed or not. """ if state == "present": + rc, out, err = module.run_command([opkg_path, "list-installed", name]) + if rc != 0: + return False + # variable out is one line if the package is installed: + # "NAME - VERSION - DESCRIPTION" + if version is not None: + if not out.startswith("%s - %s " % (name, version)): + return False + else: + if not out.startswith(name + " "): + return False + return True + else: + raise NotImplementedError() - rc, out, err = module.run_command("%s list-installed | grep -q \"^%s \"" % (shlex_quote(opkg_path), shlex_quote(name)), use_unsafe_shell=True) - if rc == 0: - return True - return False +def split_name_and_version(module, package): + """ Split the name and the version when using the NAME=VERSION syntax """ + splitted = package.split('=', 1) + if len(splitted) == 1: + return splitted[0], None + else: + return splitted[0], splitted[1] def remove_packages(module, opkg_path, packages): @@ -125,11 +150,16 @@ def remove_packages(module, opkg_path, packages): remove_c = 0 # Using a for loop in case of error, we can report the package that failed for package in packages: + package, version = split_name_and_version(module, package) + # Query the package first, to see if we even need to remove if not query_package(module, opkg_path, package): continue - rc, out, err = module.run_command("%s remove %s %s" % (opkg_path, force, package)) + if force: + rc, out, err = module.run_command([opkg_path, "remove", force, package]) + else: + rc, out, err = module.run_command([opkg_path, "remove", package]) if query_package(module, opkg_path, package): module.fail_json(msg="failed to remove %s: %s" % (package, out)) @@ -154,13 +184,23 @@ def install_packages(module, opkg_path, packages): install_c = 0 for package in packages: - if query_package(module, opkg_path, package) and (force != '--force-reinstall'): + package, version = split_name_and_version(module, package) + + if query_package(module, opkg_path, package, version) and (force != '--force-reinstall'): continue - rc, out, err = module.run_command("%s install %s %s" % (opkg_path, force, package)) + if version is not None: + version_str = "=%s" % version + else: + version_str = "" - if not query_package(module, opkg_path, package): - module.fail_json(msg="failed to install %s: %s" % (package, out)) + if force: + rc, out, err = module.run_command([opkg_path, "install", force, package + version_str]) + else: + rc, out, err = module.run_command([opkg_path, "install", package + version_str]) + + if not query_package(module, opkg_path, package, version): + module.fail_json(msg="failed to install %s%s: %s" % (package, version_str, out)) install_c += 1 From 6383c82328f32a6221fa7dd88fc92910966b5457 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 23 Dec 2022 09:34:21 +1300 Subject: [PATCH 0387/2104] ssh_config: fixed sanity (#5720) * ssh_config: fix sanity checks * fixed mod utils and removed sanity ignores * update BOTMETA * add changelog fragment * Update plugins/module_utils/ssh.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 ++ .../5720-ssh_config-plugin-sanity.yml | 2 ++ plugins/module_utils/ssh.py | 21 +++++++++++++++++++ plugins/modules/ssh_config.py | 6 ++---- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 9 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/5720-ssh_config-plugin-sanity.yml create mode 100644 plugins/module_utils/ssh.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 0a0cded0c1..047d537895 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -323,6 +323,8 @@ files: $module_utils/scaleway.py: labels: cloud scaleway maintainers: $team_scaleway + $module_utils/ssh.py: + maintainers: russoz $module_utils/storage/hpe3par/hpe3par.py: maintainers: farhan7500 gautamphegde $module_utils/utm_utils.py: diff --git a/changelogs/fragments/5720-ssh_config-plugin-sanity.yml b/changelogs/fragments/5720-ssh_config-plugin-sanity.yml new file mode 100644 index 0000000000..19d57ea145 --- /dev/null +++ b/changelogs/fragments/5720-ssh_config-plugin-sanity.yml @@ -0,0 +1,2 @@ +minor_changes: + - ssh_config - refactor code to module util to fix sanity check (https://github.com/ansible-collections/community.general/pull/5720). diff --git a/plugins/module_utils/ssh.py b/plugins/module_utils/ssh.py new file mode 100644 index 0000000000..082839e26d --- /dev/null +++ b/plugins/module_utils/ssh.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2015, Björn Andersson +# Copyright (c) 2021, Ansible Project +# Copyright (c) 2021, Abhijeet Kasurde +# Copyright (c) 2022, Alexei Znamensky +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +import os + + +def determine_config_file(user, config_file): + if user: + config_file = os.path.join(os.path.expanduser('~%s' % user), '.ssh', 'config') + elif config_file is None: + config_file = '/etc/ssh/ssh_config' + return config_file diff --git a/plugins/modules/ssh_config.py b/plugins/modules/ssh_config.py index cb028ac8e5..f2fa8aa457 100644 --- a/plugins/modules/ssh_config.py +++ b/plugins/modules/ssh_config.py @@ -169,6 +169,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common.text.converters import to_native +from ansible_collections.community.general.plugins.module_utils.ssh import determine_config_file class SSHConfig(): @@ -188,10 +189,7 @@ class SSHConfig(): self.config.load() def check_ssh_config_path(self): - if self.user: - self.config_file = os.path.join(os.path.expanduser('~%s' % self.user), '.ssh', 'config') - elif self.config_file is None: - self.config_file = '/etc/ssh/ssh_config' + self.config_file = determine_config_file(self.user, self.config_file) # See if the identity file exists or not, relative to the config file if os.path.exists(self.config_file) and self.identity_file is not None: diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index e49b216f6e..77738afd40 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -23,7 +23,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 0cf9b73046..61494a1ab1 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -18,6 +18,5 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 0cf9b73046..61494a1ab1 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -18,6 +18,5 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index efdb15f969..6b9026caea 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -19,7 +19,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index efdb15f969..6b9026caea 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -19,7 +19,6 @@ plugins/modules/rax_files_objects.py use-argspec-type-path plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # fix needed plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice -plugins/modules/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path From 2ce3cf91b8bb0e070b01974f6c938029f0bbbd97 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 23 Dec 2022 19:13:56 +1300 Subject: [PATCH 0388/2104] manageiq_tags: deprecate list state (#5727) * manageiq_tags: deprecate list state * add changelog fragment * add comment to sanity ignore files --- ...27-manageiq-tags-deprecate-list-state.yaml | 2 ++ plugins/modules/manageiq_tags.py | 23 +++++++++---------- tests/sanity/ignore-2.11.txt | 2 +- tests/sanity/ignore-2.12.txt | 2 +- tests/sanity/ignore-2.13.txt | 2 +- tests/sanity/ignore-2.14.txt | 2 +- tests/sanity/ignore-2.15.txt | 2 +- 7 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 changelogs/fragments/5727-manageiq-tags-deprecate-list-state.yaml diff --git a/changelogs/fragments/5727-manageiq-tags-deprecate-list-state.yaml b/changelogs/fragments/5727-manageiq-tags-deprecate-list-state.yaml new file mode 100644 index 0000000000..fe1c49fbf5 --- /dev/null +++ b/changelogs/fragments/5727-manageiq-tags-deprecate-list-state.yaml @@ -0,0 +1,2 @@ +deprecated_features: + - manageiq_tags - deprecate ``state=list`` in favour of using ``community.general.manageiq_tags_info`` (https://github.com/ansible-collections/community.general/pull/5727). diff --git a/plugins/modules/manageiq_tags.py b/plugins/modules/manageiq_tags.py index 9d051a5aa1..5e6b944533 100644 --- a/plugins/modules/manageiq_tags.py +++ b/plugins/modules/manageiq_tags.py @@ -27,7 +27,10 @@ options: description: - C(absent) - tags should not exist. - C(present) - tags should exist. - - C(list) - list current tags. + - > + C(list) - list current tags. + This state is deprecated and will be removed 8.0.0. + Please use the module M(community.general.manageiq_tags_info) instead. choices: ['absent', 'present', 'list'] default: 'present' tags: @@ -103,17 +106,6 @@ EXAMPLES = ''' username: 'admin' password: 'smartvm' validate_certs: false - -- name: List current tags for a provider in ManageIQ. - community.general.manageiq_tags: - state: list - resource_name: 'EngLab' - resource_type: 'provider' - manageiq_connection: - url: 'http://127.0.0.1:3000' - username: 'admin' - password: 'smartvm' - validate_certs: false ''' RETURN = ''' @@ -155,6 +147,13 @@ def main(): resource_name = module.params['resource_name'] state = module.params['state'] + if state == "list": + module.deprecate( + 'The value "list" for "state" is deprecated. Please use community.general.manageiq_tags_info instead.', + version='8.0.0', + collection_name='community.general' + ) + # get the action and resource type action = actions[state] resource_type = manageiq_entities()[resource_type_key] diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 77738afd40..39b09d887a 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -15,7 +15,7 @@ plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-s plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 61494a1ab1..47244bb515 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -10,7 +10,7 @@ plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-s plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 61494a1ab1..47244bb515 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -10,7 +10,7 @@ plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-s plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 6b9026caea..a2e9e37325 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -11,7 +11,7 @@ plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-s plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 6b9026caea..a2e9e37325 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -11,7 +11,7 @@ plugins/modules/manageiq_provider.py validate-modules:doc-choices-do-not-match-s plugins/modules/manageiq_provider.py validate-modules:doc-missing-type # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:parameter-type-not-in-doc # missing docs on suboptions plugins/modules/manageiq_provider.py validate-modules:undocumented-parameter # missing docs on suboptions -plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice +plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice # state=list - removed in 8.0.0 plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 From eb1c1210d657375cdd9374de79608677316deef7 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 23 Dec 2022 19:15:28 +1300 Subject: [PATCH 0389/2104] manageiq_policies: remove doc example for deprecated case (#5728) --- plugins/modules/manageiq_policies.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plugins/modules/manageiq_policies.py b/plugins/modules/manageiq_policies.py index fc185fcd58..fa96fc950f 100644 --- a/plugins/modules/manageiq_policies.py +++ b/plugins/modules/manageiq_policies.py @@ -85,17 +85,6 @@ EXAMPLES = ''' username: 'admin' password: 'smartvm' validate_certs: false - -- name: List current policy_profile and policies for a provider in ManageIQ - community.general.manageiq_policies: - state: list - resource_name: 'EngLab' - resource_type: 'provider' - manageiq_connection: - url: 'http://127.0.0.1:3000' - username: 'admin' - password: 'smartvm' - validate_certs: false ''' RETURN = ''' From 669d0925f71cf591b45bf890b33625d182ae4fc8 Mon Sep 17 00:00:00 2001 From: HAH! Sun <3346207+omani@users.noreply.github.com> Date: Fri, 23 Dec 2022 10:00:17 +0300 Subject: [PATCH 0390/2104] Feature: Provide project field for LXD inventory plugin (#5658) * Provide project field for LXD inventory plugin if field `project` exists in `lxd.yml`, the instances are searched in the given LXD project. if project field is not defined the default project named `default` will be used. Signed-off-by: omani <3346207+omani@users.noreply.github.com> * Update plugins/inventory/lxd.py Signed-off-by: omani <3346207+omani@users.noreply.github.com> Co-authored-by: Felix Fontein --- plugins/inventory/lxd.py | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/plugins/inventory/lxd.py b/plugins/inventory/lxd.py index 291d12b037..2e37de70c1 100644 --- a/plugins/inventory/lxd.py +++ b/plugins/inventory/lxd.py @@ -55,6 +55,11 @@ DOCUMENTATION = r''' type: str default: none choices: [ 'STOPPED', 'STARTING', 'RUNNING', 'none' ] + project: + description: Filter the instance according to the given project. + type: str + default: default + version_added: 6.2.0 type_filter: description: - Filter the instances by type C(virtual-machine), C(container) or C(both). @@ -140,6 +145,9 @@ groupby: vlan666: type: vlanid attribute: 666 + projectInternals: + type: project + attribute: internals ''' import binascii @@ -153,6 +161,7 @@ from ansible.module_utils.common.text.converters import to_native, to_text from ansible.module_utils.common.dict_transformations import dict_merge from ansible.module_utils.six import raise_from from ansible.errors import AnsibleError, AnsibleParserError +from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible_collections.community.general.plugins.module_utils.lxd import LXDClient, LXDClientException try: @@ -330,7 +339,15 @@ class InventoryModule(BaseInventoryPlugin): # "status_code": 200, # "type": "sync" # } - instances = self.socket.do('GET', '/1.0/instances') + url = '/1.0/instances' + if self.project: + url = url + '?{0}'.format(urlencode(dict(project=self.project))) + + instances = self.socket.do('GET', url) + + if self.project: + return [m.split('/')[3].split('?')[0] for m in instances['metadata']] + return [m.split('/')[3] for m in instances['metadata']] def _get_config(self, branch, name): @@ -351,9 +368,11 @@ class InventoryModule(BaseInventoryPlugin): dict(config): Config of the instance""" config = {} if isinstance(branch, (tuple, list)): - config[name] = {branch[1]: self.socket.do('GET', '/1.0/{0}/{1}/{2}'.format(to_native(branch[0]), to_native(name), to_native(branch[1])))} + config[name] = {branch[1]: self.socket.do( + 'GET', '/1.0/{0}/{1}/{2}?{3}'.format(to_native(branch[0]), to_native(name), to_native(branch[1]), urlencode(dict(project=self.project))))} else: - config[name] = {branch: self.socket.do('GET', '/1.0/{0}/{1}'.format(to_native(branch), to_native(name)))} + config[name] = {branch: self.socket.do( + 'GET', '/1.0/{0}/{1}?{2}'.format(to_native(branch), to_native(name), urlencode(dict(project=self.project))))} return config def get_instance_data(self, names): @@ -583,6 +602,8 @@ class InventoryModule(BaseInventoryPlugin): self._set_data_entry(instance_name, 'network_interfaces', self.extract_network_information_from_instance_config(instance_name)) self._set_data_entry(instance_name, 'preferred_interface', self.get_prefered_instance_network_interface(instance_name)) self._set_data_entry(instance_name, 'vlan_ids', self.get_instance_vlans(instance_name)) + self._set_data_entry(instance_name, 'project', self._get_data_entry( + 'instances/{0}/instances/metadata/project'.format(instance_name))) def build_inventory_network(self, instance_name): """Add the network interfaces of the instance to the inventory @@ -686,6 +707,8 @@ class InventoryModule(BaseInventoryPlugin): # add VLAN_ID information if self._get_data_entry('inventory/{0}/vlan_ids'.format(instance_name)): self.inventory.set_variable(instance_name, 'ansible_lxd_vlan_ids', self._get_data_entry('inventory/{0}/vlan_ids'.format(instance_name))) + # add project + self.inventory.set_variable(instance_name, 'ansible_lxd_project', self._get_data_entry('inventory/{0}/project'.format(instance_name))) def build_inventory_groups_location(self, group_name): """create group by attribute: location @@ -761,6 +784,28 @@ class InventoryModule(BaseInventoryPlugin): # Ignore invalid IP addresses returned by lxd pass + def build_inventory_groups_project(self, group_name): + """create group by attribute: project + + Args: + str(group_name): Group name + Kwargs: + None + Raises: + None + Returns: + None""" + # maybe we just want to expand one group + if group_name not in self.inventory.groups: + self.inventory.add_group(group_name) + + gen_instances = [ + instance_name for instance_name in self.inventory.hosts + if 'ansible_lxd_project' in self.inventory.get_host(instance_name).get_vars()] + for instance_name in gen_instances: + if self.groupby[group_name].get('attribute').lower() == self.inventory.get_host(instance_name).get_vars().get('ansible_lxd_project'): + self.inventory.add_child(group_name, instance_name) + def build_inventory_groups_os(self, group_name): """create group by attribute: os @@ -899,6 +944,7 @@ class InventoryModule(BaseInventoryPlugin): * 'profile' * 'vlanid' * 'type' + * 'project' Args: str(group_name): Group name @@ -926,6 +972,8 @@ class InventoryModule(BaseInventoryPlugin): self.build_inventory_groups_vlanid(group_name) elif self.groupby[group_name].get('type') == 'type': self.build_inventory_groups_type(group_name) + elif self.groupby[group_name].get('type') == 'project': + self.build_inventory_groups_project(group_name) else: raise AnsibleParserError('Unknown group type: {0}'.format(to_native(group_name))) @@ -1032,6 +1080,7 @@ class InventoryModule(BaseInventoryPlugin): try: self.client_key = self.get_option('client_key') self.client_cert = self.get_option('client_cert') + self.project = self.get_option('project') self.debug = self.DEBUG self.data = {} # store for inventory-data self.groupby = self.get_option('groupby') From 2d4ce9f21970a2d126550135ba35f7c9a0cfb449 Mon Sep 17 00:00:00 2001 From: GuillaumeV-cemea <101114641+GuillaumeV-cemea@users.noreply.github.com> Date: Fri, 30 Dec 2022 22:09:00 +0100 Subject: [PATCH 0391/2104] feat: add tags to proxmox containers (#5714) * feat: add tags to proxmox containers * fix: correct version added * fix: code style * feat: changelog fragment * fix: correct version_added Co-authored-by: Felix Fontein * feat: fail on unsupported params, rather than silently ignoring them * fix: actually check unsupported feature presence before failing Co-authored-by: Felix Fontein --- .../5714-proxmox-lxc-tag-support.yml | 3 ++ plugins/modules/proxmox.py | 35 ++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5714-proxmox-lxc-tag-support.yml diff --git a/changelogs/fragments/5714-proxmox-lxc-tag-support.yml b/changelogs/fragments/5714-proxmox-lxc-tag-support.yml new file mode 100644 index 0000000000..5e3dcc8fcf --- /dev/null +++ b/changelogs/fragments/5714-proxmox-lxc-tag-support.yml @@ -0,0 +1,3 @@ +--- +minor_changes: +- proxmox - added new module parameter ``tags`` for use with PVE 7+ (https://github.com/ansible-collections/community.general/pull/5714). diff --git a/plugins/modules/proxmox.py b/plugins/modules/proxmox.py index 89706655f2..640f9b4114 100644 --- a/plugins/modules/proxmox.py +++ b/plugins/modules/proxmox.py @@ -106,6 +106,14 @@ options: description: - sets DNS search domain for a container type: str + tags: + description: + - List of tags to apply to the container. + - Tags must start with C([a-z0-9_]) followed by zero or more of the following characters C([a-z0-9_-+.]). + - Tags are only available in Proxmox 7+. + type: list + elements: str + version_added: 6.2.0 timeout: description: - timeout for operations @@ -391,6 +399,7 @@ EXAMPLES = r''' state: absent ''' +import re import time from ansible_collections.community.general.plugins.module_utils.version import LooseVersion @@ -415,11 +424,25 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): return config['template'] def create_instance(self, vmid, node, disk, storage, cpus, memory, swap, timeout, clone, **kwargs): + + # Version limited features + minimum_version = { + 'tags': 7, + } proxmox_node = self.proxmox_api.nodes(node) # Remove all empty kwarg entries kwargs = dict((k, v) for k, v in kwargs.items() if v is not None) + version = self.version() + pve_major_version = 3 if version < LooseVersion('4.0') else version.version[0] + + # Fail on unsupported features + for option, version in minimum_version.items(): + if pve_major_version < version and option in kwargs: + self.module.fail_json(changed=False, msg="Feature {option} is only supported in PVE {version}+, and you're using PVE {pve_major_version}". + format(option=option, version=version, pve_major_version=pve_major_version)) + if VZ_TYPE == 'lxc': kwargs['cpulimit'] = cpus kwargs['rootfs'] = disk @@ -437,6 +460,14 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): kwargs['cpus'] = cpus kwargs['disk'] = disk + # LXC tags are expected to be valid and presented as a comma/semi-colon delimited string + if 'tags' in kwargs: + re_tag = re.compile(r'^[a-z0-9_][a-z0-9_\-\+\.]*$') + for tag in kwargs['tags']: + if not re_tag.match(tag): + self.module.fail_json(msg='%s is not a valid tag' % tag) + kwargs['tags'] = ",".join(kwargs['tags']) + if clone is not None: if VZ_TYPE != 'lxc': self.module.fail_json(changed=False, msg="Clone operator is only supported for LXC enabled proxmox clusters.") @@ -569,6 +600,7 @@ def main(): proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']), clone=dict(type='int'), clone_type=dict(default='opportunistic', choices=['full', 'linked', 'opportunistic']), + tags=dict(type='list', elements='str') ) module_args.update(proxmox_args) @@ -674,7 +706,8 @@ def main(): features=",".join(module.params['features']) if module.params['features'] is not None else None, unprivileged=ansible_to_proxmox_bool(module.params['unprivileged']), description=module.params['description'], - hookscript=module.params['hookscript']) + hookscript=module.params['hookscript'], + tags=module.params['tags']) module.exit_json(changed=True, msg="Deployed VM %s from template %s" % (vmid, module.params['ostemplate'])) except Exception as e: From 568e18809c7cb0b7057feb77bbc919efe5752d8d Mon Sep 17 00:00:00 2001 From: "Fabian P. Schmidt" Date: Fri, 30 Dec 2022 22:35:03 +0100 Subject: [PATCH 0392/2104] unixy Callback: Fix typo using ansibles config manager (#5744) Fixes typo introduced in 53da86c. Signed-off-by: Fabian P. Schmidt Signed-off-by: Fabian P. Schmidt --- .../fragments/5744-unixy-callback-fix-config-manager-typo.yml | 2 ++ plugins/callback/unixy.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5744-unixy-callback-fix-config-manager-typo.yml diff --git a/changelogs/fragments/5744-unixy-callback-fix-config-manager-typo.yml b/changelogs/fragments/5744-unixy-callback-fix-config-manager-typo.yml new file mode 100644 index 0000000000..d60b43d3d4 --- /dev/null +++ b/changelogs/fragments/5744-unixy-callback-fix-config-manager-typo.yml @@ -0,0 +1,2 @@ +bugfixes: + - unixy callback plugin - fix typo introduced when updating to use Ansible's configuration manager for handling options (https://github.com/ansible-collections/community.general/issues/5600). diff --git a/plugins/callback/unixy.py b/plugins/callback/unixy.py index 55f46afd32..02a2e46ba6 100644 --- a/plugins/callback/unixy.py +++ b/plugins/callback/unixy.py @@ -142,7 +142,7 @@ class CallbackModule(CallbackModule_default): display_color = C.COLOR_CHANGED task_result = self._process_result_output(result, msg) self._display.display(" " + task_result, display_color) - elif self.get('display_ok_hosts'): + elif self.get_option('display_ok_hosts'): task_result = self._process_result_output(result, msg) self._display.display(" " + task_result, display_color) From 06d72dfed9c19b7995c7d4665365e112d08c4427 Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Sat, 31 Dec 2022 13:53:27 +0700 Subject: [PATCH 0393/2104] htpasswd: improve documentation on crypt_scheme (#5741) * htpasswd: improve documentation on crypt_scheme * htpasswd: formatting in documentation Co-authored-by: Felix Fontein * htpasswd: formatting in documentation Co-authored-by: Felix Fontein * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Felix Fontein --- plugins/modules/htpasswd.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/modules/htpasswd.py b/plugins/modules/htpasswd.py index f24eaa0087..231506984a 100644 --- a/plugins/modules/htpasswd.py +++ b/plugins/modules/htpasswd.py @@ -41,9 +41,12 @@ options: description: - Encryption scheme to be used. As well as the four choices listed here, you can also use any other hash supported by passlib, such as - md5_crypt and sha256_crypt, which are linux passwd hashes. If you - do so the password file will not be compatible with Apache or Nginx - - 'Some of the available choices might be: C(apr_md5_crypt), C(des_crypt), C(ldap_sha1), C(plaintext)' + C(portable_apache22) and C(host_apache24); or C(md5_crypt) and C(sha256_crypt), + which are Linux passwd hashes. Only some schemes in addition to + the four choices below will be compatible with Apache or Nginx, and + supported schemes depend on passlib version and its dependencies. + - See U(https://passlib.readthedocs.io/en/stable/lib/passlib.apache.html#passlib.apache.HtpasswdFile) parameter C(default_scheme). + - 'Some of the available choices might be: C(apr_md5_crypt), C(des_crypt), C(ldap_sha1), C(plaintext).' state: type: str required: false From 7c99c53c648df93a109f28ff99aee8dff68f52f4 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 4 Jan 2023 07:30:06 +0100 Subject: [PATCH 0394/2104] The next expected release will be 6.3.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index f55ebce545..09c85cf2b8 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.2.0 +version: 6.3.0 readme: README.md authors: - Ansible (https://github.com/ansible) From b49bf081f8fce789f78cbf996d201c1ac99add01 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 4 Jan 2023 23:59:06 +1300 Subject: [PATCH 0395/2104] ModuleHelper - fix bug when adjusting conflicting output (#5755) * ModuleHelper - fix bug when adjusting conflicting output * add changelog fragment * remove commented test code --- .../fragments/5755-mh-fix-output-conflict.yml | 2 ++ plugins/module_utils/mh/module_helper.py | 2 +- .../targets/module_helper/library/msimple.py | 6 +++- .../targets/module_helper/tasks/main.yml | 1 + .../tasks/msimple_output_conflict.yml | 31 +++++++++++++++++++ 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5755-mh-fix-output-conflict.yml create mode 100644 tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml diff --git a/changelogs/fragments/5755-mh-fix-output-conflict.yml b/changelogs/fragments/5755-mh-fix-output-conflict.yml new file mode 100644 index 0000000000..f433cc0290 --- /dev/null +++ b/changelogs/fragments/5755-mh-fix-output-conflict.yml @@ -0,0 +1,2 @@ +bugfixes: + - ModuleHelper - fix bug when adjusting the name of reserved output variables (https://github.com/ansible-collections/community.general/pull/5755). diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index c844acba50..51696b6ff6 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -60,7 +60,7 @@ class ModuleHelper(DeprecateAttrsMixin, VarsMixin, DependencyMixin, ModuleHelper vars_diff = self.vars.diff() or {} result['diff'] = dict_merge(dict(diff), vars_diff) - for varname in result: + for varname in list(result): if varname in self._output_conflict_list: result["_" + varname] = result[varname] del result[varname] diff --git a/tests/integration/targets/module_helper/library/msimple.py b/tests/integration/targets/module_helper/library/msimple.py index 60a49dccb1..3729b6c702 100644 --- a/tests/integration/targets/module_helper/library/msimple.py +++ b/tests/integration/targets/module_helper/library/msimple.py @@ -35,12 +35,13 @@ from ansible_collections.community.general.plugins.module_utils.mh.deco import c class MSimple(ModuleHelper): - output_params = ('a', 'b', 'c') + output_params = ('a', 'b', 'c', 'm') module = dict( argument_spec=dict( a=dict(type='int', default=0), b=dict(type='str'), c=dict(type='str'), + m=dict(type='str'), ), supports_check_mode=True, ) @@ -65,6 +66,9 @@ class MSimple(ModuleHelper): self.vars['c'] = str(self.vars.c) * 2 self.process_a3_bc() + if self.vars.m: + self.vars.msg = self.vars.m + def main(): msimple = MSimple() diff --git a/tests/integration/targets/module_helper/tasks/main.yml b/tests/integration/targets/module_helper/tasks/main.yml index 90006f701d..2368cfcbb5 100644 --- a/tests/integration/targets/module_helper/tasks/main.yml +++ b/tests/integration/targets/module_helper/tasks/main.yml @@ -3,6 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - include_tasks: msimple.yml +- include_tasks: msimple_output_conflict.yml - include_tasks: mdepfail.yml - include_tasks: mstate.yml - include_tasks: msimpleda.yml diff --git a/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml b/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml new file mode 100644 index 0000000000..21ffd37d35 --- /dev/null +++ b/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml @@ -0,0 +1,31 @@ +# Copyright (c) 2023, Alexei Znamensky +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: test msimple (set a=80) + msimple: + a: 80 + register: simple1 + +- name: assert simple1 + assert: + that: + - simple1.a == 80 + - simple1.abc == "abc" + - simple1 is not changed + - simple1.value is none + +- name: test msimple 2 + msimple: + a: 80 + m: a message in a bottle + register: simple2 + +- name: assert simple2 + assert: + that: + - simple1.a == 80 + - simple1.abc == "abc" + - simple1 is not changed + - simple1.value is none + - 'simple2._msg == "a message in a bottle"' From 84ebda65f1479b9b338bfca7294e4c28fba79576 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 4 Jan 2023 22:06:57 +0100 Subject: [PATCH 0396/2104] Fix callback plugin types (#5761) Fix callback types. --- changelogs/fragments/5761-callback-types.yml | 7 +++++++ plugins/callback/loganalytics.py | 4 ++-- plugins/callback/logdna.py | 4 ++-- plugins/callback/logstash.py | 2 +- plugins/callback/splunk.py | 4 ++-- plugins/callback/sumologic.py | 4 ++-- plugins/callback/syslog_json.py | 2 +- 7 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/5761-callback-types.yml diff --git a/changelogs/fragments/5761-callback-types.yml b/changelogs/fragments/5761-callback-types.yml new file mode 100644 index 0000000000..62466f46a5 --- /dev/null +++ b/changelogs/fragments/5761-callback-types.yml @@ -0,0 +1,7 @@ +bugfixes: + - "loganalytics callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)." + - "logdna callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)." + - "logstash callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)." + - "splunk callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)." + - "sumologic callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)." + - "syslog_json callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)." diff --git a/plugins/callback/loganalytics.py b/plugins/callback/loganalytics.py index 54acf846a3..8690aac934 100644 --- a/plugins/callback/loganalytics.py +++ b/plugins/callback/loganalytics.py @@ -8,7 +8,7 @@ __metaclass__ = type DOCUMENTATION = ''' name: loganalytics - type: aggregate + type: notification short_description: Posts task results to Azure Log Analytics author: "Cyrus Li (@zhcli) " description: @@ -155,7 +155,7 @@ class AzureLogAnalyticsSource(object): class CallbackModule(CallbackBase): CALLBACK_VERSION = 2.0 - CALLBACK_TYPE = 'aggregate' + CALLBACK_TYPE = 'notification' CALLBACK_NAME = 'loganalytics' CALLBACK_NEEDS_WHITELIST = True diff --git a/plugins/callback/logdna.py b/plugins/callback/logdna.py index ee0a1eb022..2d0880ce19 100644 --- a/plugins/callback/logdna.py +++ b/plugins/callback/logdna.py @@ -9,7 +9,7 @@ __metaclass__ = type DOCUMENTATION = ''' author: Unknown (!UNKNOWN) name: logdna - type: aggregate + type: notification short_description: Sends playbook logs to LogDNA description: - This callback will report logs from playbook actions, tasks, and events to LogDNA (https://app.logdna.com) @@ -111,7 +111,7 @@ def isJSONable(obj): class CallbackModule(CallbackBase): CALLBACK_VERSION = 0.1 - CALLBACK_TYPE = 'aggregate' + CALLBACK_TYPE = 'notification' CALLBACK_NAME = 'community.general.logdna' CALLBACK_NEEDS_WHITELIST = True diff --git a/plugins/callback/logstash.py b/plugins/callback/logstash.py index 5d3c1e50b8..7666b47876 100644 --- a/plugins/callback/logstash.py +++ b/plugins/callback/logstash.py @@ -113,7 +113,7 @@ from ansible.plugins.callback import CallbackBase class CallbackModule(CallbackBase): CALLBACK_VERSION = 2.0 - CALLBACK_TYPE = 'aggregate' + CALLBACK_TYPE = 'notification' CALLBACK_NAME = 'community.general.logstash' CALLBACK_NEEDS_WHITELIST = True diff --git a/plugins/callback/splunk.py b/plugins/callback/splunk.py index 701cbfdebd..32e77f4eb4 100644 --- a/plugins/callback/splunk.py +++ b/plugins/callback/splunk.py @@ -8,7 +8,7 @@ __metaclass__ = type DOCUMENTATION = ''' name: splunk - type: aggregate + type: notification short_description: Sends task result events to Splunk HTTP Event Collector author: "Stuart Hirst (!UNKNOWN) " description: @@ -165,7 +165,7 @@ class SplunkHTTPCollectorSource(object): class CallbackModule(CallbackBase): CALLBACK_VERSION = 2.0 - CALLBACK_TYPE = 'aggregate' + CALLBACK_TYPE = 'notification' CALLBACK_NAME = 'community.general.splunk' CALLBACK_NEEDS_WHITELIST = True diff --git a/plugins/callback/sumologic.py b/plugins/callback/sumologic.py index 0b6c9b6fee..6fd950d991 100644 --- a/plugins/callback/sumologic.py +++ b/plugins/callback/sumologic.py @@ -8,7 +8,7 @@ __metaclass__ = type DOCUMENTATION = ''' name: sumologic -type: aggregate +type: notification short_description: Sends task result events to Sumologic author: "Ryan Currah (@ryancurrah)" description: @@ -111,7 +111,7 @@ class SumologicHTTPCollectorSource(object): class CallbackModule(CallbackBase): CALLBACK_VERSION = 2.0 - CALLBACK_TYPE = 'aggregate' + CALLBACK_TYPE = 'notification' CALLBACK_NAME = 'community.general.sumologic' CALLBACK_NEEDS_WHITELIST = True diff --git a/plugins/callback/syslog_json.py b/plugins/callback/syslog_json.py index 7ca99a9edd..4b2c7e79b8 100644 --- a/plugins/callback/syslog_json.py +++ b/plugins/callback/syslog_json.py @@ -71,7 +71,7 @@ class CallbackModule(CallbackBase): """ CALLBACK_VERSION = 2.0 - CALLBACK_TYPE = 'aggregate' + CALLBACK_TYPE = 'notification' CALLBACK_NAME = 'community.general.syslog_json' CALLBACK_NEEDS_WHITELIST = True From 4dc897d559cd631554691a2a4d3d82e34325686c Mon Sep 17 00:00:00 2001 From: Eric C Chong Date: Thu, 5 Jan 2023 15:36:07 -0500 Subject: [PATCH 0397/2104] redhat_subscription: Add support for Red Hat API token (#5725) Add support for Red Hat API token fix mixed up fix version --- ...hat_subscription-add-red-hat-api-token.yml | 2 ++ plugins/modules/redhat_subscription.py | 24 ++++++++++---- .../modules/test_redhat_subscription.py | 31 +++++++++++++++++++ 3 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5725-redhat_subscription-add-red-hat-api-token.yml diff --git a/changelogs/fragments/5725-redhat_subscription-add-red-hat-api-token.yml b/changelogs/fragments/5725-redhat_subscription-add-red-hat-api-token.yml new file mode 100644 index 0000000000..980e91ceb2 --- /dev/null +++ b/changelogs/fragments/5725-redhat_subscription-add-red-hat-api-token.yml @@ -0,0 +1,2 @@ +minor_changes: + - redhat_subscription - adds ``token`` parameter for subscription-manager authentication using Red Hat API token (https://github.com/ansible-collections/community.general/pull/5725). diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index 8836b78564..2649092e8a 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -40,6 +40,11 @@ options: description: - access.redhat.com or Red Hat Satellite or Katello password type: str + token: + description: + - sso.redhat.com API access token. + type: str + version_added: 6.3.0 server_hostname: description: - Specify an alternative Red Hat Subscription Management or Red Hat Satellite or Katello server @@ -294,10 +299,11 @@ class RegistrationBase(object): REDHAT_REPO = "/etc/yum.repos.d/redhat.repo" - def __init__(self, module, username=None, password=None): + def __init__(self, module, username=None, password=None, token=None): self.module = module self.username = username self.password = password + self.token = token def configure(self): raise NotImplementedError("Must be implemented by a sub-class") @@ -340,8 +346,8 @@ class RegistrationBase(object): class Rhsm(RegistrationBase): - def __init__(self, module, username=None, password=None): - RegistrationBase.__init__(self, module, username, password) + def __init__(self, module, username=None, password=None, token=None): + RegistrationBase.__init__(self, module, username, password, token) self.module = module def enable(self): @@ -397,7 +403,7 @@ class Rhsm(RegistrationBase): else: return False - def register(self, username, password, auto_attach, activationkey, org_id, + def register(self, username, password, token, auto_attach, activationkey, org_id, consumer_type, consumer_name, consumer_id, force_register, environment, release): ''' @@ -433,6 +439,8 @@ class Rhsm(RegistrationBase): if activationkey: args.extend(['--activationkey', activationkey]) + elif token: + args.extend(['--token', token]) else: if username: args.extend(['--username', username]) @@ -794,6 +802,7 @@ def main(): 'state': {'default': 'present', 'choices': ['present', 'absent']}, 'username': {}, 'password': {'no_log': True}, + 'token': {'no_log': True}, 'server_hostname': {}, 'server_insecure': {}, 'server_prefix': {}, @@ -831,17 +840,20 @@ def main(): ['server_proxy_hostname', 'server_proxy_port'], ['server_proxy_user', 'server_proxy_password']], mutually_exclusive=[['activationkey', 'username'], + ['activationkey', 'token'], + ['token', 'username'], ['activationkey', 'consumer_id'], ['activationkey', 'environment'], ['activationkey', 'auto_attach'], ['pool', 'pool_ids']], - required_if=[['state', 'present', ['username', 'activationkey'], True]], + required_if=[['state', 'present', ['username', 'activationkey', 'token'], True]], ) rhsm.module = module state = module.params['state'] username = module.params['username'] password = module.params['password'] + token = module.params['token'] server_hostname = module.params['server_hostname'] server_insecure = module.params['server_insecure'] server_prefix = module.params['server_prefix'] @@ -914,7 +926,7 @@ def main(): try: rhsm.enable() rhsm.configure(**module.params) - rhsm.register(username, password, auto_attach, activationkey, org_id, + rhsm.register(username, password, token, auto_attach, activationkey, org_id, consumer_type, consumer_name, consumer_id, force_register, environment, release) if syspurpose and 'sync' in syspurpose and syspurpose['sync'] is True: diff --git a/tests/unit/plugins/modules/test_redhat_subscription.py b/tests/unit/plugins/modules/test_redhat_subscription.py index 865f041141..e3f4cdd812 100644 --- a/tests/unit/plugins/modules/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/test_redhat_subscription.py @@ -102,6 +102,37 @@ TEST_CASES = [ 'msg': "System successfully registered to 'satellite.company.com'." } ], + # Test simple registration using token + [ + { + 'state': 'present', + 'server_hostname': 'satellite.company.com', + 'token': 'fake_token', + }, + { + 'id': 'test_registeration_token', + 'run_command.calls': [ + ( + ['/testbin/subscription-manager', 'identity'], + {'check_rc': False}, + (1, '', '') + ), + ( + ['/testbin/subscription-manager', 'config', '--server.hostname=satellite.company.com'], + {'check_rc': True}, + (0, '', '') + ), + ( + ['/testbin/subscription-manager', 'register', + '--token', 'fake_token'], + {'check_rc': True, 'expand_user_and_vars': False}, + (0, '', '') + ) + ], + 'changed': True, + 'msg': "System successfully registered to 'satellite.company.com'." + } + ], # Test unregistration, when system is unregistered [ { From 217a62aca2aa673708621d1c963def9e068681e0 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 7 Jan 2023 01:34:39 +1300 Subject: [PATCH 0398/2104] consul: minor fixes in docs (#5767) * consul: minor fixes in docs * additional docs fixes * adjustments from review --- plugins/modules/consul.py | 57 ++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/plugins/modules/consul.py b/plugins/modules/consul.py index aabc1bd4b7..ea329254a1 100644 --- a/plugins/modules/consul.py +++ b/plugins/modules/consul.py @@ -23,7 +23,7 @@ description: by Consul from the Service name and id respectively by appending 'service:' Node level checks require a I(check_name) and optionally a I(check_id)." - Currently, there is no complete way to retrieve the script, interval or ttl - metadata for a registered check. Without this metadata it is not possible to + metadata for a registered check. Without this metadata it is not possible to tell if the data supplied with ansible represents a change to a check. As a result this does not attempt to determine changes and will always report a changed occurred. An API method is planned to supply this metadata so at that @@ -37,7 +37,7 @@ options: state: type: str description: - - register or deregister the consul service, defaults to present + - Register or deregister the consul service, defaults to present. default: present choices: ['present', 'absent'] service_name: @@ -45,30 +45,30 @@ options: description: - Unique name for the service on a node, must be unique per node, required if registering a service. May be omitted if registering - a node level check + a node level check. service_id: type: str description: - - the ID for the service, must be unique per node. If I(state=absent), + - The ID for the service, must be unique per node. If I(state=absent), defaults to the service name if supplied. host: type: str description: - - host of the consul agent defaults to localhost + - Host of the consul agent defaults to localhost. default: localhost port: type: int description: - - the port on which the consul agent is running + - The port on which the consul agent is running. default: 8500 scheme: type: str description: - - the protocol scheme on which the consul agent is running + - The protocol scheme on which the consul agent is running. default: http validate_certs: description: - - whether to verify the TLS certificate of the consul agent + - Whether to verify the TLS certificate of the consul agent. type: bool default: true notes: @@ -78,12 +78,12 @@ options: service_port: type: int description: - - the port on which the service is listening. Can optionally be supplied for - registration of a service, i.e. if I(service_name) or I(service_id) is set + - The port on which the service is listening. Can optionally be supplied for + registration of a service, i.e. if I(service_name) or I(service_id) is set. service_address: type: str description: - - the address to advertise that the service will be listening on. + - The address to advertise that the service will be listening on. This value will be passed as the I(address) parameter to Consul's C(/v1/agent/service/register) API method, so refer to the Consul API documentation for further details. @@ -91,63 +91,64 @@ options: type: list elements: str description: - - tags that will be attached to the service registration. + - Tags that will be attached to the service registration. script: type: str description: - - the script/command that will be run periodically to check the health - of the service. Scripts require I(interval) and vice versa. + - The script/command that will be run periodically to check the health of the service. + - Requires I(interval) to be provided. interval: type: str description: - - the interval at which the service check will be run. This is a number - with a s or m suffix to signify the units of seconds or minutes e.g - C(15s) or C(1m). If no suffix is supplied, m will be used by default e.g. - C(1) will be C(1m). Required if the I(script) parameter is specified. + - The interval at which the service check will be run. + This is a number with a C(s) or C(m) suffix to signify the units of seconds or minutes e.g C(15s) or C(1m). + If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s). + - Required if one of the parameters I(script), I(http), or I(tcp) is specified. check_id: type: str description: - - an ID for the service check. If I(state=absent), defaults to + - An ID for the service check. If I(state=absent), defaults to I(check_name). Ignored if part of a service definition. check_name: type: str description: - - a name for the service check. Required if standalone, ignored if + - Name for the service check. Required if standalone, ignored if part of service definition. ttl: type: str description: - - checks can be registered with a ttl instead of a I(script) and I(interval) + - Checks can be registered with a ttl instead of a I(script) and I(interval) this means that the service will check in with the agent before the ttl expires. If it doesn't the check will be considered failed. Required if registering a check and the script an interval are missing - Similar to the interval this is a number with a s or m suffix to - signify the units of seconds or minutes e.g C(15s) or C(1m). If no suffix - is supplied, C(m) will be used by default e.g. C(1) will be C(1m) + Similar to the interval this is a number with a C(s) or C(m) suffix to + signify the units of seconds or minutes e.g C(15s) or C(1m). + If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s). tcp: type: str description: - Checks can be registered with a TCP port. This means that consul will check if the connection attempt to that port is successful (that is, the port is currently accepting connections). The format is C(host:port), for example C(localhost:80). - I(interval) must also be provided with this option. + - Requires I(interval) to be provided. version_added: '1.3.0' http: type: str description: - - checks can be registered with an HTTP endpoint. This means that consul + - Checks can be registered with an HTTP endpoint. This means that consul will check that the http endpoint returns a successful HTTP status. - I(interval) must also be provided with this option. + - Requires I(interval) to be provided. timeout: type: str description: - A custom HTTP check timeout. The consul default is 10 seconds. Similar to the interval this is a number with a C(s) or C(m) suffix to signify the units of seconds or minutes, e.g. C(15s) or C(1m). + If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s). token: type: str description: - - the token key identifying an ACL rule set. May be required to register services. + - The token key identifying an ACL rule set. May be required to register services. ''' EXAMPLES = ''' From 02431341b7ecf24432f4082a6005721c624ae550 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 7 Jan 2023 22:20:19 +1300 Subject: [PATCH 0399/2104] snap: use MH execute() static method (#5773) * use MH execute() static method * add changelog fragment --- changelogs/fragments/5773-snap-mh-execute.yml | 2 ++ plugins/modules/snap.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5773-snap-mh-execute.yml diff --git a/changelogs/fragments/5773-snap-mh-execute.yml b/changelogs/fragments/5773-snap-mh-execute.yml new file mode 100644 index 0000000000..43b9b6a1ac --- /dev/null +++ b/changelogs/fragments/5773-snap-mh-execute.yml @@ -0,0 +1,2 @@ +minor_changes: + - snap - minor refactor when executing module (https://github.com/ansible-collections/community.general/pull/5773). diff --git a/plugins/modules/snap.py b/plugins/modules/snap.py index a432504472..1b5e27071a 100644 --- a/plugins/modules/snap.py +++ b/plugins/modules/snap.py @@ -399,8 +399,7 @@ class Snap(CmdStateModuleHelper): def main(): - snap = Snap() - snap.run() + Snap.execute() if __name__ == '__main__': From dc531b183d2f1b48378ddfd3dd976e067bc02eb6 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 7 Jan 2023 22:21:13 +1300 Subject: [PATCH 0400/2104] ModuleHelper - lax handling of conflicting output (#5765) * ModuleHelper - lax handling of conflicting output * add changelog fragment * only create _var when really needed * adjust changelog * Update changelogs/fragments/5765-mh-lax-output-conflict.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/5765-mh-lax-output-conflict.yml | 9 ++++++ plugins/module_utils/mh/deco.py | 17 +++++++++-- plugins/module_utils/mh/module_helper.py | 5 ---- .../targets/module_helper/library/msimple.py | 5 ++-- .../tasks/msimple_output_conflict.yml | 29 +++++++++++++++++-- 5 files changed, 52 insertions(+), 13 deletions(-) create mode 100644 changelogs/fragments/5765-mh-lax-output-conflict.yml diff --git a/changelogs/fragments/5765-mh-lax-output-conflict.yml b/changelogs/fragments/5765-mh-lax-output-conflict.yml new file mode 100644 index 0000000000..2e8cc292bd --- /dev/null +++ b/changelogs/fragments/5765-mh-lax-output-conflict.yml @@ -0,0 +1,9 @@ +breaking_changes: + - > + ModuleHelper module utils - when the module sets output variables named ``msg``, ``exception``, ``output``, ``vars``, or ``changed``, + the actual output will prefix those names with ``_`` (underscore symbol) only when they clash with output variables generated by ModuleHelper + itself, which only occurs when handling exceptions. Please note that this breaking + change does not require a new major release since before this release, it was not possible + to add such variables to the output + `due to a bug `__ + (https://github.com/ansible-collections/community.general/pull/5765). diff --git a/plugins/module_utils/mh/deco.py b/plugins/module_utils/mh/deco.py index 3073e4e9e7..5138b212c7 100644 --- a/plugins/module_utils/mh/deco.py +++ b/plugins/module_utils/mh/deco.py @@ -37,8 +37,17 @@ def cause_changes(on_success=None, on_failure=None): def module_fails_on_exception(func): + conflict_list = ('msg', 'exception', 'output', 'vars', 'changed') + @wraps(func) def wrapper(self, *args, **kwargs): + def fix_var_conflicts(output): + result = dict([ + (k if k not in conflict_list else "_" + k, v) + for k, v in output.items() + ]) + return result + try: func(self, *args, **kwargs) except SystemExit: @@ -46,12 +55,16 @@ def module_fails_on_exception(func): except ModuleHelperException as e: if e.update_output: self.update_output(e.update_output) + # patchy solution to resolve conflict with output variables + output = fix_var_conflicts(self.output) self.module.fail_json(msg=e.msg, exception=traceback.format_exc(), - output=self.output, vars=self.vars.output(), **self.output) + output=self.output, vars=self.vars.output(), **output) except Exception as e: + # patchy solution to resolve conflict with output variables + output = fix_var_conflicts(self.output) msg = "Module failed with exception: {0}".format(str(e).strip()) self.module.fail_json(msg=msg, exception=traceback.format_exc(), - output=self.output, vars=self.vars.output(), **self.output) + output=self.output, vars=self.vars.output(), **output) return wrapper diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 51696b6ff6..6813b5454b 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -18,7 +18,6 @@ from ansible_collections.community.general.plugins.module_utils.mh.mixins.deprec class ModuleHelper(DeprecateAttrsMixin, VarsMixin, DependencyMixin, ModuleHelperBase): - _output_conflict_list = ('msg', 'exception', 'output', 'vars', 'changed') facts_name = None output_params = () diff_params = () @@ -60,10 +59,6 @@ class ModuleHelper(DeprecateAttrsMixin, VarsMixin, DependencyMixin, ModuleHelper vars_diff = self.vars.diff() or {} result['diff'] = dict_merge(dict(diff), vars_diff) - for varname in list(result): - if varname in self._output_conflict_list: - result["_" + varname] = result[varname] - del result[varname] return result diff --git a/tests/integration/targets/module_helper/library/msimple.py b/tests/integration/targets/module_helper/library/msimple.py index 3729b6c702..096e515247 100644 --- a/tests/integration/targets/module_helper/library/msimple.py +++ b/tests/integration/targets/module_helper/library/msimple.py @@ -57,6 +57,8 @@ class MSimple(ModuleHelper): self.vars['c'] = str(self.vars.c) * 3 def __run__(self): + if self.vars.m: + self.vars.msg = self.vars.m if self.vars.a >= 100: raise Exception("a >= 100") if self.vars.c == "abc change": @@ -66,9 +68,6 @@ class MSimple(ModuleHelper): self.vars['c'] = str(self.vars.c) * 2 self.process_a3_bc() - if self.vars.m: - self.vars.msg = self.vars.m - def main(): msimple = MSimple() diff --git a/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml b/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml index 21ffd37d35..55e0a06eca 100644 --- a/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml +++ b/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- name: test msimple (set a=80) +- name: test msimple conflict output (set a=80) msimple: a: 80 register: simple1 @@ -15,7 +15,7 @@ - simple1 is not changed - simple1.value is none -- name: test msimple 2 +- name: test msimple conflict output 2 msimple: a: 80 m: a message in a bottle @@ -28,4 +28,27 @@ - simple1.abc == "abc" - simple1 is not changed - simple1.value is none - - 'simple2._msg == "a message in a bottle"' + - > + "_msg" not in simple2 + - > + simple2.msg == "a message in a bottle" + +- name: test msimple 3 + msimple: + a: 101 + m: a message in a bottle + ignore_errors: yes + register: simple3 + +- name: assert simple3 + assert: + that: + - simple3.a == 101 + - > + simple3.msg == "Module failed with exception: a >= 100" + - > + simple3._msg == "a message in a bottle" + - simple3.abc == "abc" + - simple3 is failed + - simple3 is not changed + - simple3.value is none From fc2b1aac4aca701f3e87706266ac2e32a905d9fe Mon Sep 17 00:00:00 2001 From: Teodor Janez Podobnik <48418580+dorkamotorka@users.noreply.github.com> Date: Sat, 7 Jan 2023 10:24:32 +0100 Subject: [PATCH 0401/2104] terraform: bugfix: init command when default workspace doesn't exists (#5735) * feat: init when default workspace doesn't exists * doc: add changelogs fragment and docs update * fix: changelog formating fix --- ...init-fix-when-default-workspace-doesnt-exists.yaml | 3 +++ plugins/modules/terraform.py | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/5735-terraform-init-fix-when-default-workspace-doesnt-exists.yaml diff --git a/changelogs/fragments/5735-terraform-init-fix-when-default-workspace-doesnt-exists.yaml b/changelogs/fragments/5735-terraform-init-fix-when-default-workspace-doesnt-exists.yaml new file mode 100644 index 0000000000..3ec348aed9 --- /dev/null +++ b/changelogs/fragments/5735-terraform-init-fix-when-default-workspace-doesnt-exists.yaml @@ -0,0 +1,3 @@ +bugfixes: + - terraform - fix ``current`` workspace never getting appended to the ``all`` key in the ``workspace_ctf`` object (https://github.com/ansible-collections/community.general/pull/5735). + - terraform - fix ``terraform init`` failure when there are multiple workspaces on the remote backend and when ``default`` workspace is missing by setting ``TF_WORKSPACE`` environmental variable to the value of ``workspace`` when used (https://github.com/ansible-collections/community.general/pull/5735). diff --git a/plugins/modules/terraform.py b/plugins/modules/terraform.py index 615c125cf3..2a018ea03c 100644 --- a/plugins/modules/terraform.py +++ b/plugins/modules/terraform.py @@ -48,7 +48,9 @@ options: version_added: 3.0.0 workspace: description: - - The terraform workspace to work with. + - The terraform workspace to work with. This sets the C(TF_WORKSPACE) environmental variable + that is used to override workspace selection. For more information about workspaces + have a look at U(https://developer.hashicorp.com/terraform/language/state/workspaces). type: str default: default purge_workspace: @@ -310,7 +312,7 @@ def _state_args(state_file): return [] -def init_plugins(bin_path, project_path, backend_config, backend_config_files, init_reconfigure, provider_upgrade, plugin_paths): +def init_plugins(bin_path, project_path, backend_config, backend_config_files, init_reconfigure, provider_upgrade, plugin_paths, workspace): command = [bin_path, 'init', '-input=false', '-no-color'] if backend_config: for key, val in backend_config.items(): @@ -328,7 +330,7 @@ def init_plugins(bin_path, project_path, backend_config, backend_config_files, i if plugin_paths: for plugin_path in plugin_paths: command.extend(['-plugin-dir', plugin_path]) - rc, out, err = module.run_command(command, check_rc=True, cwd=project_path) + rc, out, err = module.run_command(command, check_rc=True, cwd=project_path, environ_update={"TF_WORKSPACE": workspace}) def get_workspace_context(bin_path, project_path): @@ -343,6 +345,7 @@ def get_workspace_context(bin_path, project_path): continue elif stripped_item.startswith('* '): workspace_ctx["current"] = stripped_item.replace('* ', '') + workspace_ctx["all"].append(stripped_item.replace('* ', '')) else: workspace_ctx["all"].append(stripped_item) return workspace_ctx @@ -485,7 +488,7 @@ def main(): if force_init: if overwrite_init or not os.path.isfile(os.path.join(project_path, ".terraform", "terraform.tfstate")): - init_plugins(command[0], project_path, backend_config, backend_config_files, init_reconfigure, provider_upgrade, plugin_paths) + init_plugins(command[0], project_path, backend_config, backend_config_files, init_reconfigure, provider_upgrade, plugin_paths, workspace) workspace_ctx = get_workspace_context(command[0], project_path) if workspace_ctx["current"] != workspace: From e3f02cb161b7bf351ebab9335b31056a6125348b Mon Sep 17 00:00:00 2001 From: reverendj1 Date: Sat, 7 Jan 2023 04:28:05 -0500 Subject: [PATCH 0402/2104] Add Support to Bitwarden Lookup for Custom Fields (#5694) * Add Support to Bitwarden Lookup for Custom Fields This adds support to the Bitwarden lookup for retrieving values from custom fields, such as api keys. * Need to Return Whole Record if Field is Not Defined * whitespace * Add Changelog Fragment * Need to Make Sure All Login Fields are Represented We need to make sure that all login fields are accounted for, since there will be no other way to retrieve them with this change, and we don't want to break backwards compatibility. Looking at this code from the official client, https://github.com/bitwarden/clients/blob/master/libs/common/spec/models/domain/login.spec.ts, autofillOnPageLoad might be another login field. * Update changelogs/fragments/5694-add-custom-fields-to-bitwarden.yml Clarify changelog fragment Co-authored-by: Felix Fontein * Update plugins/lookup/bitwarden.py Fix logic. Should only error if matches were found, but are missing the custom field. Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../5694-add-custom-fields-to-bitwarden.yml | 2 ++ plugins/lookup/bitwarden.py | 20 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5694-add-custom-fields-to-bitwarden.yml diff --git a/changelogs/fragments/5694-add-custom-fields-to-bitwarden.yml b/changelogs/fragments/5694-add-custom-fields-to-bitwarden.yml new file mode 100644 index 0000000000..55006f06a9 --- /dev/null +++ b/changelogs/fragments/5694-add-custom-fields-to-bitwarden.yml @@ -0,0 +1,2 @@ +minor_changes: + - bitwarden lookup plugin - can now retrieve secrets from custom fields (https://github.com/ansible-collections/community.general/pull/5694). diff --git a/plugins/lookup/bitwarden.py b/plugins/lookup/bitwarden.py index 1cc2e44c74..dbcb88d456 100644 --- a/plugins/lookup/bitwarden.py +++ b/plugins/lookup/bitwarden.py @@ -47,6 +47,11 @@ EXAMPLES = """ ansible.builtin.debug: msg: >- {{ lookup('community.general.bitwarden', 'a_test') }} + +- name: "Get custom field 'api_key' from Bitwarden record named 'a_test'" + ansible.builtin.debug: + msg: >- + {{ lookup('community.general.bitwarden', 'a_test', field='api_key') }} """ RETURN = """ @@ -109,10 +114,19 @@ class Bitwarden(object): """ matches = self._get_matches(search_value, search_field) - if field: + if field in ['autofillOnPageLoad', 'password', 'passwordRevisionDate', 'totp', 'uris', 'username']: return [match['login'][field] for match in matches] - - return matches + elif not field: + return matches + else: + custom_field_matches = [] + for match in matches: + for custom_field in match['fields']: + if custom_field['name'] == field: + custom_field_matches.append(custom_field['value']) + if matches and not custom_field_matches: + raise AnsibleError("Custom field {field} does not exist in {search_value}".format(field=field, search_value=search_value)) + return custom_field_matches class LookupModule(LookupBase): From 2670215c8ad6b18aac2220e1261818ed7f5f45cb Mon Sep 17 00:00:00 2001 From: rietvelde <99407273+rietvelde@users.noreply.github.com> Date: Sat, 7 Jan 2023 10:31:50 +0100 Subject: [PATCH 0403/2104] Fix gem.py, hang on uninstall specific gem version (#5751) * Update gem.py move 'cmd.append('--executable')' to all uninstalls rather than only all versions * Create 5751-gem-fix-uninstall-hang * Rename 5751-gem-fix-uninstall-hang to 5751-gem-fix-uninstall-hang.yml --- changelogs/fragments/5751-gem-fix-uninstall-hang.yml | 2 ++ plugins/modules/gem.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5751-gem-fix-uninstall-hang.yml diff --git a/changelogs/fragments/5751-gem-fix-uninstall-hang.yml b/changelogs/fragments/5751-gem-fix-uninstall-hang.yml new file mode 100644 index 0000000000..3fdd0056de --- /dev/null +++ b/changelogs/fragments/5751-gem-fix-uninstall-hang.yml @@ -0,0 +1,2 @@ +bugfixes: + - gem - fix hang due to interactive prompt for confirmation on specific version uninstall (https://github.com/ansible-collections/community.general/pull/5751). diff --git a/plugins/modules/gem.py b/plugins/modules/gem.py index 8d7f7dade0..21e9efea58 100644 --- a/plugins/modules/gem.py +++ b/plugins/modules/gem.py @@ -234,7 +234,7 @@ def uninstall(module): cmd.extend(['--version', module.params['version']]) else: cmd.append('--all') - cmd.append('--executable') + cmd.append('--executable') cmd.append(module.params['name']) module.run_command(cmd, environ_update=environ, check_rc=True) From 9e3a729da9599aa2751a7ed0afb4bf68401ab400 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 7 Jan 2023 11:03:58 +0100 Subject: [PATCH 0404/2104] Improve callback docs (#5760) * Improve callback docs. * Apply suggestions from code review Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/callback/logentries.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * More improvements. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- plugins/callback/cgroup_memory_recap.py | 12 ++++++------ plugins/callback/context_demo.py | 4 ++-- plugins/callback/counter_enabled.py | 2 +- plugins/callback/dense.py | 2 +- plugins/callback/jabber.py | 4 ++-- plugins/callback/log_plays.py | 4 ++-- plugins/callback/logdna.py | 12 ++++++------ plugins/callback/logentries.py | 18 +++++++++--------- plugins/callback/logstash.py | 12 ++++++------ plugins/callback/null.py | 2 +- plugins/callback/say.py | 6 +++--- plugins/callback/selective.py | 2 +- plugins/callback/slack.py | 6 +++--- plugins/callback/splunk.py | 10 +++++----- plugins/callback/sumologic.py | 6 +++--- plugins/callback/syslog_json.py | 10 +++++----- plugins/callback/yaml.py | 2 +- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/plugins/callback/cgroup_memory_recap.py b/plugins/callback/cgroup_memory_recap.py index eedacfeecb..ccdbcc9cf0 100644 --- a/plugins/callback/cgroup_memory_recap.py +++ b/plugins/callback/cgroup_memory_recap.py @@ -16,15 +16,15 @@ DOCUMENTATION = ''' - cgroups short_description: Profiles maximum memory usage of tasks and full execution using cgroups description: - - This is an ansible callback plugin that profiles maximum memory usage of ansible and individual tasks, and displays a recap at the end using cgroups + - This is an ansible callback plugin that profiles maximum memory usage of ansible and individual tasks, and displays a recap at the end using cgroups. notes: - - Requires ansible to be run from within a cgroup, such as with C(cgexec -g memory:ansible_profile ansible-playbook ...) - - This cgroup should only be used by ansible to get accurate results - - To create the cgroup, first use a command such as C(sudo cgcreate -a ec2-user:ec2-user -t ec2-user:ec2-user -g memory:ansible_profile) + - Requires ansible to be run from within a cgroup, such as with C(cgexec -g memory:ansible_profile ansible-playbook ...). + - This cgroup should only be used by ansible to get accurate results. + - To create the cgroup, first use a command such as C(sudo cgcreate -a ec2-user:ec2-user -t ec2-user:ec2-user -g memory:ansible_profile). options: max_mem_file: required: true - description: Path to cgroups C(memory.max_usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes) + description: Path to cgroups C(memory.max_usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes). env: - name: CGROUP_MAX_MEM_FILE ini: @@ -32,7 +32,7 @@ DOCUMENTATION = ''' key: max_mem_file cur_mem_file: required: true - description: Path to C(memory.usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes) + description: Path to C(memory.usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes). env: - name: CGROUP_CUR_MEM_FILE ini: diff --git a/plugins/callback/context_demo.py b/plugins/callback/context_demo.py index 9c3c9c5afc..b9558fc064 100644 --- a/plugins/callback/context_demo.py +++ b/plugins/callback/context_demo.py @@ -13,8 +13,8 @@ DOCUMENTATION = ''' type: aggregate short_description: demo callback that adds play/task context description: - - Displays some play and task context along with normal output - - This is mostly for demo purposes + - Displays some play and task context along with normal output. + - This is mostly for demo purposes. requirements: - whitelist in configuration ''' diff --git a/plugins/callback/counter_enabled.py b/plugins/callback/counter_enabled.py index e0e040c9d4..555ebd29a6 100644 --- a/plugins/callback/counter_enabled.py +++ b/plugins/callback/counter_enabled.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' extends_documentation_fragment: - default_callback requirements: - - set as stdout callback in ansible.cfg (stdout_callback = counter_enabled) + - set as stdout callback in C(ansible.cfg) (C(stdout_callback = counter_enabled)) ''' from ansible import constants as C diff --git a/plugins/callback/dense.py b/plugins/callback/dense.py index 18e4f162ff..490705fd27 100644 --- a/plugins/callback/dense.py +++ b/plugins/callback/dense.py @@ -14,7 +14,7 @@ short_description: minimal stdout output extends_documentation_fragment: - default_callback description: -- When in verbose mode it will act the same as the default callback +- When in verbose mode it will act the same as the default callback. author: - Dag Wieers (@dagwieers) requirements: diff --git a/plugins/callback/jabber.py b/plugins/callback/jabber.py index 823ae20144..d2d00496d8 100644 --- a/plugins/callback/jabber.py +++ b/plugins/callback/jabber.py @@ -13,10 +13,10 @@ DOCUMENTATION = ''' type: notification short_description: post task events to a jabber server description: - - The chatty part of ChatOps with a Hipchat server as a target + - The chatty part of ChatOps with a Hipchat server as a target. - This callback plugin sends status updates to a HipChat channel during playbook execution. requirements: - - xmpp (python lib https://github.com/ArchipelProject/xmpppy) + - xmpp (Python library U(https://github.com/ArchipelProject/xmpppy)) options: server: description: connection info to jabber server diff --git a/plugins/callback/log_plays.py b/plugins/callback/log_plays.py index b1dc69364c..e99054e176 100644 --- a/plugins/callback/log_plays.py +++ b/plugins/callback/log_plays.py @@ -13,10 +13,10 @@ DOCUMENTATION = ''' type: notification short_description: write playbook output to log file description: - - This callback writes playbook output to a file per host in the C(/var/log/ansible/hosts) directory + - This callback writes playbook output to a file per host in the C(/var/log/ansible/hosts) directory. requirements: - Whitelist in configuration - - A writeable /var/log/ansible/hosts directory by the user executing Ansible on the controller + - A writeable C(/var/log/ansible/hosts) directory by the user executing Ansible on the controller options: log_folder: default: /var/log/ansible/hosts diff --git a/plugins/callback/logdna.py b/plugins/callback/logdna.py index 2d0880ce19..fc9a81ac8a 100644 --- a/plugins/callback/logdna.py +++ b/plugins/callback/logdna.py @@ -12,14 +12,14 @@ DOCUMENTATION = ''' type: notification short_description: Sends playbook logs to LogDNA description: - - This callback will report logs from playbook actions, tasks, and events to LogDNA (https://app.logdna.com) + - This callback will report logs from playbook actions, tasks, and events to LogDNA (U(https://app.logdna.com)). requirements: - - LogDNA Python Library (https://github.com/logdna/python) + - LogDNA Python Library (U(https://github.com/logdna/python)) - whitelisting in configuration options: conf_key: required: true - description: LogDNA Ingestion Key + description: LogDNA Ingestion Key. type: string env: - name: LOGDNA_INGESTION_KEY @@ -28,7 +28,7 @@ DOCUMENTATION = ''' key: conf_key plugin_ignore_errors: required: false - description: Whether to ignore errors on failing or not + description: Whether to ignore errors on failing or not. type: boolean env: - name: ANSIBLE_IGNORE_ERRORS @@ -38,7 +38,7 @@ DOCUMENTATION = ''' default: false conf_hostname: required: false - description: Alternative Host Name; the current host name by default + description: Alternative Host Name; the current host name by default. type: string env: - name: LOGDNA_HOSTNAME @@ -47,7 +47,7 @@ DOCUMENTATION = ''' key: conf_hostname conf_tags: required: false - description: Tags + description: Tags. type: string env: - name: LOGDNA_TAGS diff --git a/plugins/callback/logentries.py b/plugins/callback/logentries.py index d40939b0ab..22322a4df2 100644 --- a/plugins/callback/logentries.py +++ b/plugins/callback/logentries.py @@ -13,15 +13,15 @@ DOCUMENTATION = ''' short_description: Sends events to Logentries description: - This callback plugin will generate JSON objects and send them to Logentries via TCP for auditing/debugging purposes. - - Before 2.4, if you wanted to use an ini configuration, the file must be placed in the same directory as this plugin and named logentries.ini + - Before 2.4, if you wanted to use an ini configuration, the file must be placed in the same directory as this plugin and named C(logentries.ini). - In 2.4 and above you can just put it in the main Ansible configuration file. requirements: - whitelisting in configuration - - certifi (python library) - - flatdict (python library), if you want to use the 'flatten' option + - certifi (Python library) + - flatdict (Python library), if you want to use the 'flatten' option options: api: - description: URI to the Logentries API + description: URI to the Logentries API. env: - name: LOGENTRIES_API default: data.logentries.com @@ -29,7 +29,7 @@ DOCUMENTATION = ''' - section: callback_logentries key: api port: - description: HTTP port to use when connecting to the API + description: HTTP port to use when connecting to the API. env: - name: LOGENTRIES_PORT default: 80 @@ -37,7 +37,7 @@ DOCUMENTATION = ''' - section: callback_logentries key: port tls_port: - description: Port to use when connecting to the API when TLS is enabled + description: Port to use when connecting to the API when TLS is enabled. env: - name: LOGENTRIES_TLS_PORT default: 443 @@ -45,7 +45,7 @@ DOCUMENTATION = ''' - section: callback_logentries key: tls_port token: - description: The logentries "TCP token" + description: The logentries C(TCP token). env: - name: LOGENTRIES_ANSIBLE_TOKEN required: true @@ -54,7 +54,7 @@ DOCUMENTATION = ''' key: token use_tls: description: - - Toggle to decide whether to use TLS to encrypt the communications with the API server + - Toggle to decide whether to use TLS to encrypt the communications with the API server. env: - name: LOGENTRIES_USE_TLS default: false @@ -63,7 +63,7 @@ DOCUMENTATION = ''' - section: callback_logentries key: use_tls flatten: - description: flatten complex data structures into a single dictionary with complex keys + description: Flatten complex data structures into a single dictionary with complex keys. type: boolean default: false env: diff --git a/plugins/callback/logstash.py b/plugins/callback/logstash.py index 7666b47876..144e1f9915 100644 --- a/plugins/callback/logstash.py +++ b/plugins/callback/logstash.py @@ -13,13 +13,13 @@ DOCUMENTATION = r''' type: notification short_description: Sends events to Logstash description: - - This callback will report facts and task events to Logstash https://www.elastic.co/products/logstash + - This callback will report facts and task events to Logstash U(https://www.elastic.co/products/logstash). requirements: - whitelisting in configuration - - logstash (python library) + - logstash (Python library) options: server: - description: Address of the Logstash server + description: Address of the Logstash server. env: - name: LOGSTASH_SERVER ini: @@ -28,7 +28,7 @@ DOCUMENTATION = r''' version_added: 1.0.0 default: localhost port: - description: Port on which logstash is listening + description: Port on which logstash is listening. env: - name: LOGSTASH_PORT ini: @@ -37,7 +37,7 @@ DOCUMENTATION = r''' version_added: 1.0.0 default: 5000 type: - description: Message type + description: Message type. env: - name: LOGSTASH_TYPE ini: @@ -54,7 +54,7 @@ DOCUMENTATION = r''' env: - name: LOGSTASH_PRE_COMMAND format_version: - description: Logging format + description: Logging format. type: str version_added: 2.0.0 ini: diff --git a/plugins/callback/null.py b/plugins/callback/null.py index 01f5f6ca06..f53a242945 100644 --- a/plugins/callback/null.py +++ b/plugins/callback/null.py @@ -15,7 +15,7 @@ DOCUMENTATION = ''' - set as main display callback short_description: Don't display stuff to screen description: - - This callback prevents outputing events to screen + - This callback prevents outputing events to screen. ''' from ansible.plugins.callback import CallbackBase diff --git a/plugins/callback/say.py b/plugins/callback/say.py index 03d7060352..005725a22b 100644 --- a/plugins/callback/say.py +++ b/plugins/callback/say.py @@ -14,12 +14,12 @@ DOCUMENTATION = ''' type: notification requirements: - whitelisting in configuration - - the '/usr/bin/say' command line program (standard on macOS) or 'espeak' command line program + - the C(/usr/bin/say) command line program (standard on macOS) or C(espeak) command line program short_description: notify using software speech synthesizer description: - - This plugin will use the 'say' or 'espeak' program to "speak" about play events. + - This plugin will use the C(say) or C(espeak) program to "speak" about play events. notes: - - In 2.8, this callback has been renamed from C(osx_say) into M(community.general.say). + - In Ansible 2.8, this callback has been renamed from C(osx_say) into M(community.general.say). ''' import platform diff --git a/plugins/callback/selective.py b/plugins/callback/selective.py index 6476f5ba53..526975bd2c 100644 --- a/plugins/callback/selective.py +++ b/plugins/callback/selective.py @@ -22,7 +22,7 @@ DOCUMENTATION = ''' options: nocolor: default: false - description: This setting allows suppressing colorizing output + description: This setting allows suppressing colorizing output. env: - name: ANSIBLE_NOCOLOR - name: ANSIBLE_SELECTIVE_DONT_COLORIZE diff --git a/plugins/callback/slack.py b/plugins/callback/slack.py index 6ca15b43f5..e9b84bbb38 100644 --- a/plugins/callback/slack.py +++ b/plugins/callback/slack.py @@ -18,11 +18,11 @@ DOCUMENTATION = ''' short_description: Sends play events to a Slack channel description: - This is an ansible callback plugin that sends status updates to a Slack channel during playbook execution. - - Before 2.4 only environment variables were available for configuring this plugin + - Before Ansible 2.4 only environment variables were available for configuring this plugin. options: webhook_url: required: true - description: Slack Webhook URL + description: Slack Webhook URL. env: - name: SLACK_WEBHOOK_URL ini: @@ -45,7 +45,7 @@ DOCUMENTATION = ''' - section: callback_slack key: username validate_certs: - description: validate the SSL certificate of the Slack server. (For HTTPS URLs) + description: Validate the SSL certificate of the Slack server for HTTPS URLs. env: - name: SLACK_VALIDATE_CERTS ini: diff --git a/plugins/callback/splunk.py b/plugins/callback/splunk.py index 32e77f4eb4..67ad944d2e 100644 --- a/plugins/callback/splunk.py +++ b/plugins/callback/splunk.py @@ -13,22 +13,22 @@ DOCUMENTATION = ''' author: "Stuart Hirst (!UNKNOWN) " description: - This callback plugin will send task results as JSON formatted events to a Splunk HTTP collector. - - The companion Splunk Monitoring & Diagnostics App is available here "https://splunkbase.splunk.com/app/4023/" + - The companion Splunk Monitoring & Diagnostics App is available here U(https://splunkbase.splunk.com/app/4023/). - Credit to "Ryan Currah (@ryancurrah)" for original source upon which this is based. requirements: - Whitelisting this callback plugin - 'Create a HTTP Event Collector in Splunk' - - 'Define the url and token in ansible.cfg' + - 'Define the URL and token in C(ansible.cfg)' options: url: - description: URL to the Splunk HTTP collector source + description: URL to the Splunk HTTP collector source. env: - name: SPLUNK_URL ini: - section: callback_splunk key: url authtoken: - description: Token to authenticate the connection to the Splunk HTTP collector + description: Token to authenticate the connection to the Splunk HTTP collector. env: - name: SPLUNK_AUTHTOKEN ini: @@ -48,7 +48,7 @@ DOCUMENTATION = ''' version_added: '1.0.0' include_milliseconds: description: Whether to include milliseconds as part of the generated timestamp field in the event - sent to the Splunk HTTP collector + sent to the Splunk HTTP collector. env: - name: SPLUNK_INCLUDE_MILLISECONDS ini: diff --git a/plugins/callback/sumologic.py b/plugins/callback/sumologic.py index 6fd950d991..998081c35b 100644 --- a/plugins/callback/sumologic.py +++ b/plugins/callback/sumologic.py @@ -12,14 +12,14 @@ type: notification short_description: Sends task result events to Sumologic author: "Ryan Currah (@ryancurrah)" description: - - This callback plugin will send task results as JSON formatted events to a Sumologic HTTP collector source + - This callback plugin will send task results as JSON formatted events to a Sumologic HTTP collector source. requirements: - Whitelisting this callback plugin - 'Create a HTTP collector source in Sumologic and specify a custom timestamp format of C(yyyy-MM-dd HH:mm:ss ZZZZ) and a custom timestamp locator of C("timestamp": "(.*)")' options: url: - description: URL to the Sumologic HTTP collector source + description: URL to the Sumologic HTTP collector source. env: - name: SUMOLOGIC_URL ini: @@ -28,7 +28,7 @@ options: ''' EXAMPLES = ''' -examples: > +examples: | To enable, add this to your ansible.cfg file in the defaults block [defaults] callback_whitelist = community.general.sumologic diff --git a/plugins/callback/syslog_json.py b/plugins/callback/syslog_json.py index 4b2c7e79b8..2bd8f6e604 100644 --- a/plugins/callback/syslog_json.py +++ b/plugins/callback/syslog_json.py @@ -15,11 +15,11 @@ DOCUMENTATION = ''' - whitelist in configuration short_description: sends JSON events to syslog description: - - This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format - - Before Ansible 2.9 only environment variables were available for configuration + - This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format. + - Before Ansible 2.9 only environment variables were available for configuration. options: server: - description: syslog server that will receive the event + description: Syslog server that will receive the event. env: - name: SYSLOG_SERVER default: localhost @@ -27,7 +27,7 @@ DOCUMENTATION = ''' - section: callback_syslog_json key: syslog_server port: - description: port on which the syslog server is listening + description: Port on which the syslog server is listening. env: - name: SYSLOG_PORT default: 514 @@ -35,7 +35,7 @@ DOCUMENTATION = ''' - section: callback_syslog_json key: syslog_port facility: - description: syslog facility to log as + description: Syslog facility to log as. env: - name: SYSLOG_FACILITY default: user diff --git a/plugins/callback/yaml.py b/plugins/callback/yaml.py index 81d59e2e70..73782de151 100644 --- a/plugins/callback/yaml.py +++ b/plugins/callback/yaml.py @@ -11,7 +11,7 @@ DOCUMENTATION = ''' author: Unknown (!UNKNOWN) name: yaml type: stdout - short_description: yaml-ized Ansible screen output + short_description: YAML-ized Ansible screen output description: - Ansible output that can be quite a bit easier to read than the default JSON formatting. From 0ff003d31246ca03a891a28a9ecbca8e0b27bb46 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 7 Jan 2023 14:06:09 +0100 Subject: [PATCH 0405/2104] Fix CI (#5785) Try to fix CI. --- tests/utils/constraints.txt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index af2b326ddd..87db256f41 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -7,7 +7,7 @@ coverage >= 4.2, < 5.0.0, != 4.3.2 ; python_version <= '3.7' # features in 4.2+ coverage >= 4.5.4, < 5.0.0 ; python_version > '3.7' # coverage had a bug in < 4.5.4 that would cause unit tests to hang in Python 3.8, coverage 5.0+ incompatible cryptography < 2.2 ; python_version < '2.7' # cryptography 2.2 drops support for python 2.6 cryptography >= 3.0, < 3.4 ; python_version < '3.6' and python_version >= '2.7' # cryptography 3.4 drops support for python 2.7 -cryptography >= 3.3, < 3.4 ; python_version >= '2.7' # FIXME: the upper limit is needed for RHEL8.2, CentOS 8, Ubuntu 18.04, and OpenSuSE 15 +cryptography >= 3.3, < 3.4 ; python_version >= '2.7' and python_version < '3.9' # FIXME: the upper limit is needed for RHEL8.2, CentOS 8, Ubuntu 18.04, and OpenSuSE 15 deepdiff < 4.0.0 ; python_version < '3' # deepdiff 4.0.0 and later require python 3 jinja2 < 2.11 ; python_version < '2.7' # jinja2 2.11 and later require python 2.7 or later urllib3 < 1.24 ; python_version < '2.7' # urllib3 1.24 and later require python 2.7 or later @@ -56,12 +56,3 @@ redis ; python_version >= '3.6' pycdlib < 1.13.0 ; python_version < '3' # 1.13.0 does not work with Python 2, while not declaring that python-daemon <= 2.3.0 ; python_version < '3' bcrypt < 4.0.0 # TEMP: restrict to < 4.0.0 since installing 4.0.0 fails on RHEL 8 - -# freeze pylint and its requirements for consistent test results -astroid == 2.2.5 -isort == 4.3.15 -lazy-object-proxy == 1.3.1 -mccabe == 0.6.1 -pylint == 2.3.1 -typed-ast == 1.4.0 # 1.4.0 is required to compile on Python 3.8 -wrapt == 1.11.1 From 759ca9a0ab5a6c68dea342e0840b6803ac008a63 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 7 Jan 2023 14:08:34 +0100 Subject: [PATCH 0406/2104] Remove currently unneeded generic tests from CI (#5786) Remove currently unneeded generic tests from CI. --- .azure-pipelines/azure-pipelines.yml | 11 ++++++----- tests/integration/targets/one_host/aliases | 2 +- tests/integration/targets/one_template/aliases | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index c8e03a164b..77463e2c79 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -487,10 +487,11 @@ stages: - Docker_2_13 - Docker_2_14 - Docker_community_devel - - Generic_devel - - Generic_2_11 - - Generic_2_12 - - Generic_2_13 - - Generic_2_14 +# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled. +# - Generic_devel +# - Generic_2_11 +# - Generic_2_12 +# - Generic_2_13 +# - Generic_2_14 jobs: - template: templates/coverage.yml diff --git a/tests/integration/targets/one_host/aliases b/tests/integration/targets/one_host/aliases index 02a31bcd55..100ba0f979 100644 --- a/tests/integration/targets/one_host/aliases +++ b/tests/integration/targets/one_host/aliases @@ -4,4 +4,4 @@ azp/generic/1 cloud/opennebula -disabled # FIXME +disabled # FIXME - when this is fixed, also re-enable the generic tests in CI! diff --git a/tests/integration/targets/one_template/aliases b/tests/integration/targets/one_template/aliases index 02a31bcd55..100ba0f979 100644 --- a/tests/integration/targets/one_template/aliases +++ b/tests/integration/targets/one_template/aliases @@ -4,4 +4,4 @@ azp/generic/1 cloud/opennebula -disabled # FIXME +disabled # FIXME - when this is fixed, also re-enable the generic tests in CI! From 3b73e7ed2a550480892854ffb48314665a9b52c5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 7 Jan 2023 16:44:27 +0100 Subject: [PATCH 0407/2104] alternatives: make work with Fedora 37 (#5794) * alternatives in Fedora 37 uses follower instead of slave. * Add changelog fragment. --- changelogs/fragments/5794-alternatives-fedora37.yml | 2 ++ plugins/modules/alternatives.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5794-alternatives-fedora37.yml diff --git a/changelogs/fragments/5794-alternatives-fedora37.yml b/changelogs/fragments/5794-alternatives-fedora37.yml new file mode 100644 index 0000000000..bfb77142cc --- /dev/null +++ b/changelogs/fragments/5794-alternatives-fedora37.yml @@ -0,0 +1,2 @@ +bugfixes: + - "alternatives - support subcommands on Fedora 37, which uses ``follower`` instead of ``slave`` (https://github.com/ansible-collections/community.general/pull/5794)." diff --git a/plugins/modules/alternatives.py b/plugins/modules/alternatives.py index 4566144493..48cacb4540 100644 --- a/plugins/modules/alternatives.py +++ b/plugins/modules/alternatives.py @@ -60,6 +60,8 @@ options: description: - A list of subcommands. - Each subcommand needs a name, a link and a path parameter. + - Subcommands are also named 'slaves' or 'followers', depending on the version + of alternatives. type: list elements: dict aliases: ['slaves'] @@ -310,10 +312,10 @@ class AlternativesModule(object): current_mode_regex = re.compile(r'\s-\s(?:status\sis\s)?(\w*)(?:\smode|.)$', re.MULTILINE) current_path_regex = re.compile(r'^\s*link currently points to (.*)$', re.MULTILINE) current_link_regex = re.compile(r'^\s*link \w+ is (.*)$', re.MULTILINE) - subcmd_path_link_regex = re.compile(r'^\s*slave (\S+) is (.*)$', re.MULTILINE) + subcmd_path_link_regex = re.compile(r'^\s*(?:slave|follower) (\S+) is (.*)$', re.MULTILINE) - alternative_regex = re.compile(r'^(\/.*)\s-\s(?:family\s\S+\s)?priority\s(\d+)((?:\s+slave.*)*)', re.MULTILINE) - subcmd_regex = re.compile(r'^\s+slave (.*): (.*)$', re.MULTILINE) + alternative_regex = re.compile(r'^(\/.*)\s-\s(?:family\s\S+\s)?priority\s(\d+)((?:\s+(?:slave|follower).*)*)', re.MULTILINE) + subcmd_regex = re.compile(r'^\s+(?:slave|follower) (.*): (.*)$', re.MULTILINE) match = current_mode_regex.search(display_output) if not match: From 6fb212b1042f730b7a92c6508a6d249b53f12fae Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 7 Jan 2023 17:19:58 +0100 Subject: [PATCH 0408/2104] Update CI matrix (#5782) * Update CI matrix. * Disable RHEL 9.1 for tests where RHEL 9.0 was disabled as well. * Skip iso_extract on FreeBSD 12.4. * Fix cloud_init_data_facts test for Fedora 37. * Do not try to install snap on RHEL 9.1. * Skip pkgng jail tests on FreeBSD 12.4 as well. --- .azure-pipelines/azure-pipelines.yml | 22 ++++++++++--------- .../cloud_init_data_facts/tasks/main.yml | 6 +++++ .../integration/targets/django_manage/aliases | 1 + tests/integration/targets/homectl/aliases | 1 + tests/integration/targets/iso_extract/aliases | 2 ++ tests/integration/targets/odbc/aliases | 1 + .../targets/pkgng/tasks/freebsd.yml | 7 +++++- .../targets/setup_snap/tasks/D-RedHat-9.1.yml | 6 +++++ tests/integration/targets/ufw/aliases | 1 + 9 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 tests/integration/targets/setup_snap/tasks/D-RedHat-9.1.yml diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 77463e2c79..3816369497 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -197,10 +197,10 @@ stages: parameters: testFormat: devel/{0} targets: - - name: Alpine 3.16 - test: alpine/3.16 - # - name: Fedora 36 - # test: fedora/36 + - name: Alpine 3.17 + test: alpine/3.17 + # - name: Fedora 37 + # test: fedora/37 # - name: Ubuntu 20.04 # test: ubuntu/20.04 - name: Ubuntu 22.04 @@ -219,10 +219,12 @@ stages: test: macos/12.0 - name: RHEL 7.9 test: rhel/7.9 - - name: RHEL 9.0 - test: rhel/9.0 + - name: RHEL 9.1 + test: rhel/9.1 - name: FreeBSD 13.1 test: freebsd/13.1 + - name: FreeBSD 12.4 + test: freebsd/12.4 groups: - 1 - 2 @@ -305,8 +307,8 @@ stages: targets: - name: CentOS 7 test: centos7 - - name: Fedora 36 - test: fedora36 + - name: Fedora 37 + test: fedora37 - name: openSUSE 15 test: opensuse15 - name: Ubuntu 20.04 @@ -327,8 +329,8 @@ stages: parameters: testFormat: 2.14/linux/{0} targets: - - name: Ubuntu 20.04 - test: ubuntu2004 + - name: Fedora 36 + test: fedora36 groups: - 1 - 2 diff --git a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml index fc634a972f..fe38d4ca5b 100644 --- a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml @@ -29,6 +29,12 @@ - cloud-init - udev + - name: Ensure systemd-network user exists + user: + name: systemd-network + state: present + when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int >= 37 + - name: setup run cloud-init service: name: cloud-init-local diff --git a/tests/integration/targets/django_manage/aliases b/tests/integration/targets/django_manage/aliases index 025fe0ec48..98aed9e9d4 100644 --- a/tests/integration/targets/django_manage/aliases +++ b/tests/integration/targets/django_manage/aliases @@ -12,3 +12,4 @@ skip/rhel8.3 skip/rhel8.4 skip/rhel8.5 skip/rhel9.0 +skip/rhel9.1 diff --git a/tests/integration/targets/homectl/aliases b/tests/integration/targets/homectl/aliases index 8d80bf12c3..b87db2e43c 100644 --- a/tests/integration/targets/homectl/aliases +++ b/tests/integration/targets/homectl/aliases @@ -8,3 +8,4 @@ skip/freebsd skip/osx skip/macos skip/rhel9.0 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/ +skip/rhel9.1 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/ diff --git a/tests/integration/targets/iso_extract/aliases b/tests/integration/targets/iso_extract/aliases index 5b0ab153c8..2815959456 100644 --- a/tests/integration/targets/iso_extract/aliases +++ b/tests/integration/targets/iso_extract/aliases @@ -8,3 +8,5 @@ destructive skip/aix skip/osx # FIXME skip/rhel9.0 # FIXME +skip/rhel9.1 # FIXME +skip/freebsd12.4 # FIXME diff --git a/tests/integration/targets/odbc/aliases b/tests/integration/targets/odbc/aliases index 2dbf0eac3e..e8465c50e8 100644 --- a/tests/integration/targets/odbc/aliases +++ b/tests/integration/targets/odbc/aliases @@ -8,4 +8,5 @@ skip/osx skip/macos skip/rhel8.0 skip/rhel9.0 +skip/rhel9.1 skip/freebsd diff --git a/tests/integration/targets/pkgng/tasks/freebsd.yml b/tests/integration/targets/pkgng/tasks/freebsd.yml index a7cb90b11d..a822b4c7e9 100644 --- a/tests/integration/targets/pkgng/tasks/freebsd.yml +++ b/tests/integration/targets/pkgng/tasks/freebsd.yml @@ -501,14 +501,19 @@ # NOTE: FreeBSD 12.0 test runner receives a "connection reset by peer" after ~20% downloaded so we are # only running this on 12.1 or higher # + # NOTE: FreeBSD 12.4 fails to update repositories because it cannot load certificates from /usr/share/keys/pkg/trusted + # knowledge has to take a look) + # # NOTE: FreeBSD 13.0 fails to update the package catalogue for unknown reasons (someone with FreeBSD # knowledge has to take a look) # # NOTE: FreeBSD 13.1 fails to update the package catalogue for unknown reasons (someone with FreeBSD # knowledge has to take a look) # + # See also + # https://github.com/ansible-collections/community.general/issues/5795 when: >- - (ansible_distribution_version is version('12.01', '>=') and ansible_distribution_version is version('13.0', '<')) + (ansible_distribution_version is version('12.01', '>=') and ansible_distribution_version is version('12.4', '<')) or ansible_distribution_version is version('13.2', '>=') block: - name: Setup testjail diff --git a/tests/integration/targets/setup_snap/tasks/D-RedHat-9.1.yml b/tests/integration/targets/setup_snap/tasks/D-RedHat-9.1.yml new file mode 100644 index 0000000000..5bbfaff128 --- /dev/null +++ b/tests/integration/targets/setup_snap/tasks/D-RedHat-9.1.yml @@ -0,0 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +# Do nothing diff --git a/tests/integration/targets/ufw/aliases b/tests/integration/targets/ufw/aliases index 1f974ecd19..2ef1a41338 100644 --- a/tests/integration/targets/ufw/aliases +++ b/tests/integration/targets/ufw/aliases @@ -10,6 +10,7 @@ skip/macos skip/freebsd skip/rhel8.0 # FIXME skip/rhel9.0 # FIXME +skip/rhel9.1 # FIXME skip/docker needs/root needs/target/setup_epel From 4caa6574de486d6840ac50affe48501f9d895bf4 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 9 Jan 2023 09:37:29 +1300 Subject: [PATCH 0409/2104] snap_alias: using CmdRunner (#5486) * snap_alias: using CmdRunner * add changelog fragment * fix changelog fragment * invert order of initialization in __init_module__() * comment extra changed=True from code * add extra info when verbose * add extra info when verbose - fix blank line * handle check_mode the old way * fix logical test * fix error when using multiple aliases * fix error when using multiple aliases, part 2 * revert to using check_mode_skip=True again --- .../fragments/5486-snap-alias-cmd-runner.yml | 2 + plugins/modules/snap_alias.py | 53 ++++++++++--------- 2 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 changelogs/fragments/5486-snap-alias-cmd-runner.yml diff --git a/changelogs/fragments/5486-snap-alias-cmd-runner.yml b/changelogs/fragments/5486-snap-alias-cmd-runner.yml new file mode 100644 index 0000000000..59ae0c5abf --- /dev/null +++ b/changelogs/fragments/5486-snap-alias-cmd-runner.yml @@ -0,0 +1,2 @@ +minor_changes: + - snap_alias - refactored module to use ``CmdRunner`` to execute ``snap`` (https://github.com/ansible-collections/community.general/pull/5486). diff --git a/plugins/modules/snap_alias.py b/plugins/modules/snap_alias.py index 818dbbce31..1611c06719 100644 --- a/plugins/modules/snap_alias.py +++ b/plugins/modules/snap_alias.py @@ -79,9 +79,8 @@ snap_aliases: import re -from ansible_collections.community.general.plugins.module_utils.module_helper import ( - CmdStateModuleHelper -) +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt +from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper _state_map = dict( @@ -91,7 +90,7 @@ _state_map = dict( ) -class SnapAlias(CmdStateModuleHelper): +class SnapAlias(StateModuleHelper): _RE_ALIAS_LIST = re.compile(r"^(?P[\w-]+)\s+(?P[\w-]+)\s+.*$") module = dict( @@ -106,25 +105,26 @@ class SnapAlias(CmdStateModuleHelper): ], supports_check_mode=True, ) - command = "snap" - command_args_formats = dict( - _alias=dict(fmt=lambda v: [v]), - state=dict(fmt=lambda v: [_state_map[v]]), - ) - check_rc = False + + command_args_formats = { + "state": cmd_runner_fmt.as_map(_state_map), + "name": cmd_runner_fmt.as_list(), + "alias": cmd_runner_fmt.as_list(), + } def _aliases(self): n = self.vars.name return {n: self._get_aliases_for(n)} if n else self._get_aliases() def __init_module__(self): + self.runner = CmdRunner(self.module, "snap", self.command_args_formats, check_rc=False) self.vars.set("snap_aliases", self._aliases(), change=True, diff=True) def __quit_module__(self): self.vars.snap_aliases = self._aliases() def _get_aliases(self): - def process_get_aliases(rc, out, err): + def process(rc, out, err): if err: return {} aliases = [self._RE_ALIAS_LIST.match(a.strip()) for a in out.splitlines()[1:]] @@ -134,9 +134,8 @@ class SnapAlias(CmdStateModuleHelper): results[snap] = results.get(snap, []) + [alias] return results - return self.run_command(params=[{'state': 'info'}, 'name'], check_rc=True, - publish_rc=False, publish_out=False, publish_err=False, publish_cmd=False, - process_output=process_get_aliases) + with self.runner("state name", check_rc=True, output_process=process) as ctx: + return ctx.run(state="info") def _get_aliases_for(self, name): return self._get_aliases().get(name, []) @@ -152,24 +151,30 @@ class SnapAlias(CmdStateModuleHelper): return any(alias in aliases for aliases in self.vars.snap_aliases.values()) def state_present(self): - for alias in self.vars.alias: - if not self._has_alias(self.vars.name, alias): + for _alias in self.vars.alias: + if not self._has_alias(self.vars.name, _alias): self.changed = True - if not self.module.check_mode: - self.run_command(params=['state', 'name', {'_alias': alias}]) + with self.runner("state name alias", check_mode_skip=True) as ctx: + ctx.run(alias=_alias) + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info def state_absent(self): if not self.vars.alias: if self._has_alias(self.vars.name): self.changed = True - if not self.module.check_mode: - self.run_command(params=['state', 'name']) + with self.runner("state name", check_mode_skip=True) as ctx: + ctx.run() + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info else: - for alias in self.vars.alias: - if self._has_alias(self.vars.name, alias): + for _alias in self.vars.alias: + if self._has_alias(self.vars.name, _alias): self.changed = True - if not self.module.check_mode: - self.run_command(params=['state', {'_alias': alias}]) + with self.runner("state alias", check_mode_skip=True) as ctx: + ctx.run(alias=_alias) + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info def main(): From 682bb4b88a00b880756a891f9280083164dc8fb2 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 13 Jan 2023 08:42:38 +1300 Subject: [PATCH 0410/2104] opkg: refactor module to use StateModuleHelper and CmdRunner (#5718) * opkg: refactor module to use StateModuleHelper and CmdRunner * add changelog fragment * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * generate message outcome as before * aggregated changes from 5688 * fix package query * add unit tests * fix sanity error * Update plugins/modules/opkg.py Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> * add test for specifying version * refactor parameter name Co-authored-by: joergho <48011876+joergho@users.noreply.github.com> --- changelogs/fragments/5718-opkg-refactor.yaml | 2 + plugins/modules/opkg.py | 208 ++++++++----------- tests/unit/plugins/modules/test_opkg.py | 193 +++++++++++++++++ 3 files changed, 280 insertions(+), 123 deletions(-) create mode 100644 changelogs/fragments/5718-opkg-refactor.yaml create mode 100644 tests/unit/plugins/modules/test_opkg.py diff --git a/changelogs/fragments/5718-opkg-refactor.yaml b/changelogs/fragments/5718-opkg-refactor.yaml new file mode 100644 index 0000000000..fb8b5680da --- /dev/null +++ b/changelogs/fragments/5718-opkg-refactor.yaml @@ -0,0 +1,2 @@ +minor_changes: + - opkg - refactored module to use ``CmdRunner`` for executing ``opkg`` (https://github.com/ansible-collections/community.general/pull/5718). diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index 7e2b8c4ac2..d736c1f3ff 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -97,144 +97,106 @@ EXAMPLES = ''' force: overwrite ''' -from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.six.moves import shlex_quote +from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt +from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper -def update_package_db(module, opkg_path): - """ Updates packages list. """ - - rc, out, err = module.run_command([opkg_path, "update"]) - - if rc != 0: - module.fail_json(msg="could not update package db") - - -def query_package(module, opkg_path, name, version=None, state="present"): - """ Returns whether a package is installed or not. """ - - if state == "present": - rc, out, err = module.run_command([opkg_path, "list-installed", name]) - if rc != 0: - return False - # variable out is one line if the package is installed: - # "NAME - VERSION - DESCRIPTION" - if version is not None: - if not out.startswith("%s - %s " % (name, version)): - return False - else: - if not out.startswith(name + " "): - return False - return True - else: - raise NotImplementedError() - - -def split_name_and_version(module, package): - """ Split the name and the version when using the NAME=VERSION syntax """ - splitted = package.split('=', 1) - if len(splitted) == 1: - return splitted[0], None - else: - return splitted[0], splitted[1] - - -def remove_packages(module, opkg_path, packages): - """ Uninstalls one or more packages if installed. """ - - p = module.params - force = p["force"] - if force: - force = "--force-%s" % force - - remove_c = 0 - # Using a for loop in case of error, we can report the package that failed - for package in packages: - package, version = split_name_and_version(module, package) - - # Query the package first, to see if we even need to remove - if not query_package(module, opkg_path, package): - continue - - if force: - rc, out, err = module.run_command([opkg_path, "remove", force, package]) - else: - rc, out, err = module.run_command([opkg_path, "remove", package]) - - if query_package(module, opkg_path, package): - module.fail_json(msg="failed to remove %s: %s" % (package, out)) - - remove_c += 1 - - if remove_c > 0: - - module.exit_json(changed=True, msg="removed %s package(s)" % remove_c) - - module.exit_json(changed=False, msg="package(s) already absent") - - -def install_packages(module, opkg_path, packages): - """ Installs one or more packages if not already installed. """ - - p = module.params - force = p["force"] - if force: - force = "--force-%s" % force - - install_c = 0 - - for package in packages: - package, version = split_name_and_version(module, package) - - if query_package(module, opkg_path, package, version) and (force != '--force-reinstall'): - continue - - if version is not None: - version_str = "=%s" % version - else: - version_str = "" - - if force: - rc, out, err = module.run_command([opkg_path, "install", force, package + version_str]) - else: - rc, out, err = module.run_command([opkg_path, "install", package + version_str]) - - if not query_package(module, opkg_path, package, version): - module.fail_json(msg="failed to install %s%s: %s" % (package, version_str, out)) - - install_c += 1 - - if install_c > 0: - module.exit_json(changed=True, msg="installed %s package(s)" % (install_c)) - - module.exit_json(changed=False, msg="package(s) already present") - - -def main(): - module = AnsibleModule( +class Opkg(StateModuleHelper): + module = dict( argument_spec=dict( name=dict(aliases=["pkg"], required=True, type="list", elements="str"), state=dict(default="present", choices=["present", "installed", "absent", "removed"]), force=dict(default="", choices=["", "depends", "maintainer", "reinstall", "overwrite", "downgrade", "space", "postinstall", "remove", "checksum", "removal-of-dependent-packages"]), update_cache=dict(default=False, type='bool'), - ) + ), ) - opkg_path = module.get_bin_path('opkg', True, ['/bin']) + def __init_module__(self): + self.vars.set("install_c", 0, output=False, change=True) + self.vars.set("remove_c", 0, output=False, change=True) - p = module.params + state_map = dict( + query="list-installed", + present="install", + installed="install", + absent="remove", + removed="remove", + ) - if p["update_cache"]: - update_package_db(module, opkg_path) + def _force(value): + if value == "": + value = None + return cmd_runner_fmt.as_optval("--force-")(value, ctx_ignore_none=True) - pkgs = p["name"] + self.runner = CmdRunner( + self.module, + command="opkg", + arg_formats=dict( + package=cmd_runner_fmt.as_list(), + state=cmd_runner_fmt.as_map(state_map), + force=cmd_runner_fmt.as_func(_force), + update_cache=cmd_runner_fmt.as_bool("update") + ), + ) - if p["state"] in ["present", "installed"]: - install_packages(module, opkg_path, pkgs) + @staticmethod + def split_name_and_version(package): + """ Split the name and the version when using the NAME=VERSION syntax """ + splitted = package.split('=', 1) + if len(splitted) == 1: + return splitted[0], None + else: + return splitted[0], splitted[1] - elif p["state"] in ["absent", "removed"]: - remove_packages(module, opkg_path, pkgs) + def _package_in_desired_state(self, name, want_installed, version=None): + dummy, out, dummy = self.runner("state package").run(state="query", package=name) + + has_package = out.startswith(name + " - %s" % ("" if not version else (version + " "))) + return want_installed == has_package + + def state_present(self): + if self.vars.update_cache: + dummy, rc, dummy = self.runner("update_cache").run() + if rc != 0: + self.do_raise("could not update package db") + with self.runner("state force package") as ctx: + for package in self.vars.name: + pkg_name, pkg_version = self.split_name_and_version(package) + if not self._package_in_desired_state(pkg_name, want_installed=True, version=pkg_version) or self.vars.force == "reinstall": + ctx.run(package=package) + if not self._package_in_desired_state(pkg_name, want_installed=True, version=pkg_version): + self.do_raise("failed to install %s" % package) + self.vars.install_c += 1 + if self.vars.install_c > 0: + self.vars.msg = "installed %s package(s)" % (self.vars.install_c) + else: + self.vars.msg = "package(s) already present" + + def state_absent(self): + if self.vars.update_cache: + dummy, rc, dummy = self.runner("update_cache").run() + if rc != 0: + self.do_raise("could not update package db") + with self.runner("state force package") as ctx: + for package in self.vars.name: + package, dummy = self.split_name_and_version(package) + if not self._package_in_desired_state(package, want_installed=False): + ctx.run(package=package) + if not self._package_in_desired_state(package, want_installed=False): + self.do_raise("failed to remove %s" % package) + self.vars.remove_c += 1 + if self.vars.remove_c > 0: + self.vars.msg = "removed %s package(s)" % (self.vars.remove_c) + else: + self.vars.msg = "package(s) already absent" + + state_installed = state_present + state_removed = state_absent + + +def main(): + Opkg.execute() if __name__ == '__main__': diff --git a/tests/unit/plugins/modules/test_opkg.py b/tests/unit/plugins/modules/test_opkg.py new file mode 100644 index 0000000000..f11347facc --- /dev/null +++ b/tests/unit/plugins/modules/test_opkg.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +from collections import namedtuple +from ansible_collections.community.general.plugins.modules import opkg + +import pytest + +TESTED_MODULE = opkg.__name__ + + +ModuleTestCase = namedtuple("ModuleTestCase", ["id", "input", "output", "run_command_calls"]) +RunCmdCall = namedtuple("RunCmdCall", ["command", "environ", "rc", "out", "err"]) + + +@pytest.fixture +def patch_opkg(mocker): + mocker.patch('ansible.module_utils.basic.AnsibleModule.get_bin_path', return_value='/testbin/opkg') + + +TEST_CASES = [ + ModuleTestCase( + id="install_zlibdev", + input={"name": "zlib-dev", "state": "present"}, + output={ + "msg": "installed 1 package(s)" + }, + run_command_calls=[ + RunCmdCall( + command=["/testbin/opkg", "list-installed", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="", + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "install", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out=( + "Installing zlib-dev (1.2.11-6) to root..." + "Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib-dev_1.2.11-6_mips_24kc.ipk" + "Installing zlib (1.2.11-6) to root..." + "Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib_1.2.11-6_mips_24kc.ipk" + "Configuring zlib." + "Configuring zlib-dev." + ), + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "list-installed", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="zlib-dev - 1.2.11-6\n", + err="", + ), + ], + ), + ModuleTestCase( + id="install_zlibdev_present", + input={"name": "zlib-dev", "state": "present"}, + output={ + "msg": "package(s) already present" + }, + run_command_calls=[ + RunCmdCall( + command=["/testbin/opkg", "list-installed", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="zlib-dev - 1.2.11-6\n", + err="", + ), + ], + ), + ModuleTestCase( + id="install_zlibdev_force_reinstall", + input={"name": "zlib-dev", "state": "present", "force": "reinstall"}, + output={ + "msg": "installed 1 package(s)" + }, + run_command_calls=[ + RunCmdCall( + command=["/testbin/opkg", "list-installed", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="zlib-dev - 1.2.11-6\n", + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "install", "--force-reinstall", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out=( + "Installing zlib-dev (1.2.11-6) to root...\n" + "Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib-dev_1.2.11-6_mips_24kc.ipk\n" + "Configuring zlib-dev.\n" + ), + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "list-installed", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="zlib-dev - 1.2.11-6\n", + err="", + ), + ], + ), + ModuleTestCase( + id="install_zlibdev_with_version", + input={"name": "zlib-dev=1.2.11-6", "state": "present"}, + output={ + "msg": "installed 1 package(s)" + }, + run_command_calls=[ + RunCmdCall( + command=["/testbin/opkg", "list-installed", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="", + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "install", "zlib-dev=1.2.11-6"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out=( + "Installing zlib-dev (1.2.11-6) to root..." + "Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib-dev_1.2.11-6_mips_24kc.ipk" + "Installing zlib (1.2.11-6) to root..." + "Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib_1.2.11-6_mips_24kc.ipk" + "Configuring zlib." + "Configuring zlib-dev." + ), + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "list-installed", "zlib-dev"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="zlib-dev - 1.2.11-6 \n", # This output has the extra space at the end, to satisfy the behaviour of Yocto/OpenEmbedded's opkg + err="", + ), + ], + ), +] +TEST_CASES_IDS = [item.id for item in TEST_CASES] + + +@pytest.mark.parametrize('patch_ansible_module, testcase', + [[x.input, x] for x in TEST_CASES], + ids=TEST_CASES_IDS, + indirect=['patch_ansible_module']) +@pytest.mark.usefixtures('patch_ansible_module') +def test_opkg(mocker, capfd, patch_opkg, testcase): + """ + Run unit tests for test cases listen in TEST_CASES + """ + + run_cmd_calls = testcase.run_command_calls + + # Mock function used for running commands first + call_results = [(x.rc, x.out, x.err) for x in run_cmd_calls] + mock_run_command = mocker.patch('ansible.module_utils.basic.AnsibleModule.run_command', side_effect=call_results) + + # Try to run test case + with pytest.raises(SystemExit): + opkg.main() + + out, err = capfd.readouterr() + results = json.loads(out) + print("testcase =\n%s" % str(testcase)) + print("results =\n%s" % results) + + for test_result in testcase.output: + assert results[test_result] == testcase.output[test_result], \ + "'{0}': '{1}' != '{2}'".format(test_result, results[test_result], testcase.output[test_result]) + + call_args_list = [(item[0][0], item[1]) for item in mock_run_command.call_args_list] + expected_call_args_list = [(item.command, item.environ) for item in run_cmd_calls] + print("call args list =\n%s" % call_args_list) + print("expected args list =\n%s" % expected_call_args_list) + + assert mock_run_command.call_count == len(run_cmd_calls) + if mock_run_command.call_count: + assert call_args_list == expected_call_args_list From b9ac2dcda5fe44b8c6c10b2649a9d682a053c069 Mon Sep 17 00:00:00 2001 From: joergho <48011876+joergho@users.noreply.github.com> Date: Thu, 12 Jan 2023 20:43:56 +0100 Subject: [PATCH 0411/2104] opkg: extend docu about compatibilty with OpenWrt vs. Yocto based Linux distribitions (#5810) * opkg: extend documentation: opkg also works on Yocto ... based linux distributions Signed-off-by: Joerg Hofrichter * opkg: extend documentation: PACKAGE=VERSION only works on Yocto ... based linux distributions Signed-off-by: Joerg Hofrichter Signed-off-by: Joerg Hofrichter --- plugins/modules/opkg.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index d736c1f3ff..73c2597de2 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -15,16 +15,17 @@ DOCUMENTATION = ''' --- module: opkg author: "Patrick Pelletier (@skinp)" -short_description: Package manager for OpenWrt +short_description: Package manager for OpenWrt and Openembedded/Yocto based Linux distributions description: - - Manages OpenWrt packages + - Manages ipk packages for OpenWrt and Openembedded/Yocto based Linux distributions options: name: description: - Name of package(s) to install/remove. - C(NAME=VERSION) syntax is also supported to install a package - in a certain version. See the examples. This is supported since - community.general 6.2.0. + in a certain version. See the examples. This only works on Yocto based + Linux distributions (opkg>=0.3.2) and not for OpenWrt. This is + supported since community.general 6.2.0. aliases: [pkg] required: true type: list @@ -67,7 +68,7 @@ EXAMPLES = ''' name: foo state: present -- name: Install foo in version 1.2 +- name: Install foo in version 1.2 (opkg>=0.3.2 on Yocto based Linux distributions) community.general.opkg: name: foo=1.2 state: present From 317f79ff1f4a590d73455054c3235cdef684b4f8 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 13 Jan 2023 09:02:25 +1300 Subject: [PATCH 0412/2104] multiple scaleway modules: fixed markups in doc (#5766) * multiple scaleway modules: fixed markups in doc * Update plugins/modules/scaleway_ip.py Co-authored-by: Felix Fontein * Update plugins/modules/scaleway_volume.py Co-authored-by: Felix Fontein * Update plugins/modules/scaleway_private_network.py Co-authored-by: Felix Fontein * Update plugins/modules/scaleway_security_group.py Co-authored-by: Felix Fontein * Update plugins/modules/scaleway_security_group_rule.py Co-authored-by: Felix Fontein * Update plugins/modules/scaleway_sshkey.py Co-authored-by: Felix Fontein * further docs adjustments Co-authored-by: Felix Fontein --- .../scaleway_compute_private_network.py | 2 +- plugins/modules/scaleway_database_backup.py | 12 ++++----- plugins/modules/scaleway_image_info.py | 2 +- plugins/modules/scaleway_ip.py | 4 +-- plugins/modules/scaleway_lb.py | 14 +++++----- plugins/modules/scaleway_organization_info.py | 4 +-- plugins/modules/scaleway_private_network.py | 5 ++-- plugins/modules/scaleway_security_group.py | 7 +++-- .../modules/scaleway_security_group_rule.py | 19 +++++++------ plugins/modules/scaleway_sshkey.py | 9 +++---- plugins/modules/scaleway_user_data.py | 10 +++---- plugins/modules/scaleway_volume.py | 27 +++++++++---------- 12 files changed, 55 insertions(+), 60 deletions(-) diff --git a/plugins/modules/scaleway_compute_private_network.py b/plugins/modules/scaleway_compute_private_network.py index f85b2f2444..201ec257f7 100644 --- a/plugins/modules/scaleway_compute_private_network.py +++ b/plugins/modules/scaleway_compute_private_network.py @@ -92,7 +92,7 @@ EXAMPLES = ''' RETURN = ''' scaleway_compute_private_network: description: Information on the VPC. - returned: success when C(state=present) + returned: success when I(state=present) type: dict sample: { diff --git a/plugins/modules/scaleway_database_backup.py b/plugins/modules/scaleway_database_backup.py index f91ce143a0..9daa7921c0 100644 --- a/plugins/modules/scaleway_database_backup.py +++ b/plugins/modules/scaleway_database_backup.py @@ -19,7 +19,7 @@ short_description: Scaleway database backups management module version_added: 1.2.0 author: Guillaume Rodriguez (@guillaume_ro_fr) description: - - This module manages database backups on Scaleway account U(https://developer.scaleway.com). + - "This module manages database backups on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway options: @@ -58,7 +58,7 @@ options: description: - Name used to identify the database backup. - Required for C(present) state. - - Ignored when C(state=absent), C(state=exported) or C(state=restored). + - Ignored when I(state=absent), I(state=exported) or I(state=restored). type: str required: false @@ -66,7 +66,7 @@ options: description: - Name used to identify the database. - Required for C(present) and C(restored) states. - - Ignored when C(state=absent) or C(state=exported). + - Ignored when I(state=absent) or I(state=exported). type: str required: false @@ -74,14 +74,14 @@ options: description: - UUID of the instance associated to the database backup. - Required for C(present) and C(restored) states. - - Ignored when C(state=absent) or C(state=exported). + - Ignored when I(state=absent) or I(state=exported). type: str required: false expires_at: description: - Expiration datetime of the database backup (ISO 8601 format). - - Ignored when C(state=absent), C(state=exported) or C(state=restored). + - Ignored when I(state=absent), I(state=exported) or I(state=restored). type: str required: false @@ -139,7 +139,7 @@ EXAMPLES = ''' RETURN = ''' metadata: description: Backup metadata. - returned: when C(state=present), C(state=exported) or C(state=restored) + returned: when I(state=present), I(state=exported) or I(state=restored) type: dict sample: { "metadata": { diff --git a/plugins/modules/scaleway_image_info.py b/plugins/modules/scaleway_image_info.py index 56ca689c38..bdae185148 100644 --- a/plugins/modules/scaleway_image_info.py +++ b/plugins/modules/scaleway_image_info.py @@ -26,7 +26,7 @@ options: region: type: str description: - - Scaleway compute zone + - Scaleway compute zone. required: true choices: - ams1 diff --git a/plugins/modules/scaleway_ip.py b/plugins/modules/scaleway_ip.py index eccd64e47b..a49e9c9f31 100644 --- a/plugins/modules/scaleway_ip.py +++ b/plugins/modules/scaleway_ip.py @@ -88,8 +88,8 @@ EXAMPLES = ''' RETURN = ''' data: - description: This is only present when C(state=present) - returned: when C(state=present) + description: This is only present when I(state=present). + returned: when I(state=present) type: dict sample: { "ips": [ diff --git a/plugins/modules/scaleway_lb.py b/plugins/modules/scaleway_lb.py index 124cba5945..578f4ae894 100644 --- a/plugins/modules/scaleway_lb.py +++ b/plugins/modules/scaleway_lb.py @@ -29,19 +29,19 @@ options: name: type: str description: - - Name of the load-balancer + - Name of the load-balancer. required: true description: type: str description: - - Description of the load-balancer + - Description of the load-balancer. required: true organization_id: type: str description: - - Organization identifier + - Organization identifier. required: true state: @@ -56,7 +56,7 @@ options: region: type: str description: - - Scaleway zone + - Scaleway zone. required: true choices: - nl-ams @@ -68,7 +68,7 @@ options: elements: str default: [] description: - - List of tags to apply to the load-balancer + - List of tags to apply to the load-balancer. wait: description: @@ -79,14 +79,14 @@ options: wait_timeout: type: int description: - - Time to wait for the load-balancer to reach the expected state + - Time to wait for the load-balancer to reach the expected state. required: false default: 300 wait_sleep_time: type: int description: - - Time to wait before every attempt to check the state of the load-balancer + - Time to wait before every attempt to check the state of the load-balancer. required: false default: 3 ''' diff --git a/plugins/modules/scaleway_organization_info.py b/plugins/modules/scaleway_organization_info.py index 717c47db19..e9e272c988 100644 --- a/plugins/modules/scaleway_organization_info.py +++ b/plugins/modules/scaleway_organization_info.py @@ -20,7 +20,7 @@ author: options: api_url: description: - - Scaleway API URL + - Scaleway API URL. default: 'https://account.scaleway.com' aliases: ['base_url'] extends_documentation_fragment: @@ -42,7 +42,7 @@ EXAMPLES = r''' RETURN = r''' --- scaleway_organization_info: - description: Response from Scaleway API + description: Response from Scaleway API. returned: success type: list elements: dict diff --git a/plugins/modules/scaleway_private_network.py b/plugins/modules/scaleway_private_network.py index 6a611fa32b..57cf67ec1f 100644 --- a/plugins/modules/scaleway_private_network.py +++ b/plugins/modules/scaleway_private_network.py @@ -18,8 +18,7 @@ short_description: Scaleway private network management version_added: 4.5.0 author: Pascal MANGIN (@pastral) description: - - This module manages private network on Scaleway account - (U(https://developer.scaleway.com)). + - "This module manages private network on Scaleway account (U(https://developer.scaleway.com))." extends_documentation_fragment: - community.general.scaleway @@ -88,7 +87,7 @@ EXAMPLES = ''' RETURN = ''' scaleway_private_network: description: Information on the VPC. - returned: success when C(state=present) + returned: success when I(state=present) type: dict sample: { diff --git a/plugins/modules/scaleway_security_group.py b/plugins/modules/scaleway_security_group.py index 635309947a..d863156fa3 100644 --- a/plugins/modules/scaleway_security_group.py +++ b/plugins/modules/scaleway_security_group.py @@ -18,8 +18,7 @@ module: scaleway_security_group short_description: Scaleway Security Group management module author: Antoine Barbare (@abarbare) description: - - This module manages Security Group on Scaleway account - U(https://developer.scaleway.com). + - "This module manages Security Group on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway @@ -105,8 +104,8 @@ EXAMPLES = ''' RETURN = ''' data: - description: This is only present when C(state=present) - returned: when C(state=present) + description: This is only present when I(state=present). + returned: when I(state=present) type: dict sample: { "scaleway_security_group": { diff --git a/plugins/modules/scaleway_security_group_rule.py b/plugins/modules/scaleway_security_group_rule.py index d0b16aeb50..cd27543a7b 100644 --- a/plugins/modules/scaleway_security_group_rule.py +++ b/plugins/modules/scaleway_security_group_rule.py @@ -18,8 +18,7 @@ module: scaleway_security_group_rule short_description: Scaleway Security Group Rule management module author: Antoine Barbare (@abarbare) description: - - This module manages Security Group Rule on Scaleway account - U(https://developer.scaleway.com) + - "This module manages Security Group Rule on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway requirements: @@ -53,7 +52,7 @@ options: protocol: type: str description: - - Network protocol to use + - Network protocol to use. choices: - TCP - UDP @@ -62,20 +61,20 @@ options: port: description: - - Port related to the rule, null value for all the ports + - Port related to the rule, null value for all the ports. required: true type: int ip_range: type: str description: - - IPV4 CIDR notation to apply to the rule + - IPV4 CIDR notation to apply to the rule. default: 0.0.0.0/0 direction: type: str description: - - Rule direction + - Rule direction. choices: - inbound - outbound @@ -84,7 +83,7 @@ options: action: type: str description: - - Rule action + - Rule action. choices: - accept - drop @@ -93,7 +92,7 @@ options: security_group: type: str description: - - Security Group unique identifier + - Security Group unique identifier. required: true ''' @@ -113,8 +112,8 @@ EXAMPLES = ''' RETURN = ''' data: - description: This is only present when C(state=present) - returned: when C(state=present) + description: This is only present when I(state=present). + returned: when I(state=present) type: dict sample: { "scaleway_security_group_rule": { diff --git a/plugins/modules/scaleway_sshkey.py b/plugins/modules/scaleway_sshkey.py index 13dc211d36..8bb804165a 100644 --- a/plugins/modules/scaleway_sshkey.py +++ b/plugins/modules/scaleway_sshkey.py @@ -19,8 +19,7 @@ module: scaleway_sshkey short_description: Scaleway SSH keys management module author: Remy Leone (@remyleone) description: - - This module manages SSH keys on Scaleway account - U(https://developer.scaleway.com) + - "This module manages SSH keys on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway @@ -42,7 +41,7 @@ options: api_url: type: str description: - - Scaleway API URL + - Scaleway API URL. default: 'https://account.scaleway.com' aliases: ['base_url'] ''' @@ -67,8 +66,8 @@ EXAMPLES = ''' RETURN = ''' data: - description: This is only present when C(state=present) - returned: when C(state=present) + description: This is only present when I(state=present). + returned: when I(state=present) type: dict sample: { "ssh_public_keys": [ diff --git a/plugins/modules/scaleway_user_data.py b/plugins/modules/scaleway_user_data.py index 37d9e94142..509ae44cc0 100644 --- a/plugins/modules/scaleway_user_data.py +++ b/plugins/modules/scaleway_user_data.py @@ -19,8 +19,8 @@ module: scaleway_user_data short_description: Scaleway user_data management module author: Remy Leone (@remyleone) description: - - "This module manages user_data on compute instances on Scaleway." - - "It can be used to configure cloud-init for instance" + - This module manages user_data on compute instances on Scaleway. + - It can be used to configure cloud-init for instance. extends_documentation_fragment: - community.general.scaleway @@ -30,20 +30,20 @@ options: server_id: type: str description: - - Scaleway Compute instance ID of the server + - Scaleway Compute instance ID of the server. required: true user_data: type: dict description: - User defined data. Typically used with C(cloud-init). - - Pass your cloud-init script here as a string + - Pass your C(cloud-init) script here as a string. required: false region: type: str description: - - Scaleway compute zone + - Scaleway compute zone. required: true choices: - ams1 diff --git a/plugins/modules/scaleway_volume.py b/plugins/modules/scaleway_volume.py index 315b5e7334..e633b4a1a7 100644 --- a/plugins/modules/scaleway_volume.py +++ b/plugins/modules/scaleway_volume.py @@ -18,8 +18,7 @@ module: scaleway_volume short_description: Scaleway volumes management module author: Henryk Konsek (@hekonsek) description: - - This module manages volumes on Scaleway account - U(https://developer.scaleway.com) + - "This module manages volumes on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway @@ -28,7 +27,7 @@ options: state: type: str description: - - Indicate desired state of the volume. + - Indicate desired state of the volume. default: present choices: - present @@ -36,7 +35,7 @@ options: region: type: str description: - - Scaleway region to use (for example par1). + - Scaleway region to use (for example par1). required: true choices: - ams1 @@ -50,25 +49,25 @@ options: name: type: str description: - - Name used to identify the volume. + - Name used to identify the volume. required: true project: type: str description: - - Scaleway project ID to which volume belongs. + - Scaleway project ID to which volume belongs. version_added: 4.3.0 organization: type: str description: - - ScaleWay organization ID to which volume belongs. + - ScaleWay organization ID to which volume belongs. size: type: int description: - - Size of the volume in bytes. + - Size of the volume in bytes. volume_type: type: str description: - - Type of the volume (for example 'l_ssd'). + - Type of the volume (for example 'l_ssd'). ''' EXAMPLES = ''' @@ -91,8 +90,8 @@ EXAMPLES = ''' RETURN = ''' data: - description: This is only present when C(state=present) - returned: when C(state=present) + description: This is only present when I(state=present). + returned: when I(state=present) type: dict sample: { "volume": { @@ -100,9 +99,9 @@ data: "id": "c675f420-cfeb-48ff-ba2a-9d2a4dbe3fcd", "name": "volume-0-3", "project": "000a115d-2852-4b0a-9ce8-47f1134ba95a", - "server": null, - "size": 10000000000, - "volume_type": "l_ssd" + "server": null, + "size": 10000000000, + "volume_type": "l_ssd" } } ''' From 58eb49579762f78d04c5c15c9089c62670f7078d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Vali=C3=B1o=20Garc=C3=ADa?= Date: Thu, 12 Jan 2023 21:06:52 +0100 Subject: [PATCH 0413/2104] Fixes #5691. Support gitlab forking_access_level, builds_access_level and container_registry_access_level fields (#5706) * Fixes #5691. Support gitlab forking_access_level, builds_access_level and container_registry_access_level fields * Add changelog fragment * Fix revision issues --- ...06-add-builds-forks-container-registry.yml | 2 ++ plugins/modules/gitlab_project.py | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 changelogs/fragments/5706-add-builds-forks-container-registry.yml diff --git a/changelogs/fragments/5706-add-builds-forks-container-registry.yml b/changelogs/fragments/5706-add-builds-forks-container-registry.yml new file mode 100644 index 0000000000..5635241b64 --- /dev/null +++ b/changelogs/fragments/5706-add-builds-forks-container-registry.yml @@ -0,0 +1,2 @@ +minor_changes: + - gitlab_project - add ``builds_access_level``, ``container_registry_access_level`` and ``forking_access_level`` options (https://github.com/ansible-collections/community.general/pull/5706). diff --git a/plugins/modules/gitlab_project.py b/plugins/modules/gitlab_project.py index ca1f8a6c64..1ab8ae220c 100644 --- a/plugins/modules/gitlab_project.py +++ b/plugins/modules/gitlab_project.py @@ -172,6 +172,30 @@ options: - This option is only used on creation, not for updates. This is also only used if I(initialize_with_readme=true). type: str version_added: "4.2.0" + builds_access_level: + description: + - C(private) means that repository CI/CD is allowed only to project members. + - C(disabled) means that repository CI/CD is disabled. + - C(enabled) means that repository CI/CD is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.2.0" + forking_access_level: + description: + - C(private) means that repository forks is allowed only to project members. + - C(disabled) means that repository forks are disabled. + - C(enabled) means that repository forks are enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.2.0" + container_registry_access_level: + description: + - C(private) means that container registry is allowed only to project members. + - C(disabled) means that container registry is disabled. + - C(enabled) means that container registry is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.2.0" ''' EXAMPLES = r''' @@ -287,6 +311,9 @@ class GitLabProject(object): 'squash_option': options['squash_option'], 'ci_config_path': options['ci_config_path'], 'shared_runners_enabled': options['shared_runners_enabled'], + 'builds_access_level': options['builds_access_level'], + 'forking_access_level': options['forking_access_level'], + 'container_registry_access_level': options['container_registry_access_level'], } # Because we have already call userExists in main() if self.project_object is None: @@ -417,6 +444,9 @@ def main(): ci_config_path=dict(type='str'), shared_runners_enabled=dict(type='bool'), avatar_path=dict(type='path'), + builds_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + forking_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + container_registry_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), )) module = AnsibleModule( @@ -464,6 +494,9 @@ def main(): shared_runners_enabled = module.params['shared_runners_enabled'] avatar_path = module.params['avatar_path'] default_branch = module.params['default_branch'] + builds_access_level = module.params['builds_access_level'] + forking_access_level = module.params['forking_access_level'] + container_registry_access_level = module.params['container_registry_access_level'] if default_branch and not initialize_with_readme: module.fail_json(msg="Param default_branch need param initialize_with_readme set to true") @@ -533,6 +566,9 @@ def main(): "ci_config_path": ci_config_path, "shared_runners_enabled": shared_runners_enabled, "avatar_path": avatar_path, + "builds_access_level": builds_access_level, + "forking_access_level": forking_access_level, + "container_registry_access_level": container_registry_access_level, }): module.exit_json(changed=True, msg="Successfully created or updated the project %s" % project_name, project=gitlab_project.project_object._attrs) From cc79c24c01010ed75b2dee116ddf36276ffd2763 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 14 Jan 2023 08:47:56 +1300 Subject: [PATCH 0414/2104] consul: deprecate params incompatible with state=absent (#5772) * consul: deprecate params incompatible with state=absent * Refrain from handling SystemExit exception * preposition * add changelog fragment * Update plugins/modules/consul.py * Update changelogs/fragments/5772-consul-deprecate-params-when-absent.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...72-consul-deprecate-params-when-absent.yml | 2 ++ plugins/modules/consul.py | 26 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5772-consul-deprecate-params-when-absent.yml diff --git a/changelogs/fragments/5772-consul-deprecate-params-when-absent.yml b/changelogs/fragments/5772-consul-deprecate-params-when-absent.yml new file mode 100644 index 0000000000..44d681765f --- /dev/null +++ b/changelogs/fragments/5772-consul-deprecate-params-when-absent.yml @@ -0,0 +1,2 @@ +deprecated_features: + - consul - deprecate using parameters unused for ``state=absent`` (https://github.com/ansible-collections/community.general/pull/5772). diff --git a/plugins/modules/consul.py b/plugins/modules/consul.py index ea329254a1..dea853b98e 100644 --- a/plugins/modules/consul.py +++ b/plugins/modules/consul.py @@ -149,6 +149,10 @@ options: type: str description: - The token key identifying an ACL rule set. May be required to register services. + ack_params_state_absent: + type: bool + description: + - Disable deprecation warning when using parameters incompatible with I(state=absent). ''' EXAMPLES = ''' @@ -584,7 +588,8 @@ def main(): http=dict(type='str'), timeout=dict(type='str'), tags=dict(type='list', elements='str'), - token=dict(no_log=True) + token=dict(no_log=True), + ack_params_state_absent=dict(type='bool'), ), required_if=[ ('state', 'present', ['service_name']), @@ -592,14 +597,29 @@ def main(): ], supports_check_mode=False, ) + p = module.params test_dependencies(module) + if p['state'] == 'absent' and any(p[x] for x in ['script', 'ttl', 'tcp', 'http', 'interval']) and not p['ack_params_state_absent']: + module.deprecate( + "The use of parameters 'script', 'ttl', 'tcp', 'http', 'interval' along with 'state=absent' is deprecated. " + "In community.general 8.0.0 their use will become an error. " + "To suppress this deprecation notice, set parameter ack_params_state_absent=true.", + version="8.0.0", + collection_name="community.general", + ) + # When reaching c.g 8.0.0: + # - Replace the deprecation with a fail_json(), remove the "ack_params_state_absent" condition from the "if" + # - Add mutually_exclusive for ('script', 'ttl', 'tcp', 'http'), then remove that validation from parse_check() + # - Add required_by {'script': 'interval', 'http': 'interval', 'tcp': 'interval'}, then remove checks for 'interval' in ConsulCheck.__init__() + # - Deprecate the parameter ack_params_state_absent try: register_with_consul(module) + except SystemExit: + raise except ConnectionError as e: - module.fail_json(msg='Could not connect to consul agent at %s:%s, error was %s' % ( - module.params['host'], module.params['port'], str(e))) + module.fail_json(msg='Could not connect to consul agent at %s:%s, error was %s' % (p['host'], p['port'], str(e))) except Exception as e: module.fail_json(msg=str(e)) From 08b0ea700d98d6d05724a435aa73c90ff841f4d5 Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Sun, 15 Jan 2023 00:05:22 +0700 Subject: [PATCH 0415/2104] ldap.py: capitalize one letter (#5833) --- plugins/doc_fragments/ldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index c73e5080be..1f04c0f600 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -60,7 +60,7 @@ options: sasl_class: description: - The class to use for SASL authentication. - - possible choices are C(external), C(gssapi). + - Possible choices are C(external), C(gssapi). type: str choices: ['external', 'gssapi'] default: external From 6ec049734e4b54edcf8dffbad64bf777fc9701e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Servais?= Date: Sat, 14 Jan 2023 18:22:00 +0100 Subject: [PATCH 0416/2104] xml children module parameter does not exist (#5808) * Add changelog * Add integration tests * Rename children to set_children * Add PR information * Update changelogs/fragments/5808-xml-children-parameter-does-not-exist.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...-xml-children-parameter-does-not-exist.yml | 2 ++ plugins/modules/xml.py | 4 +-- .../test-set-children-elements-empty-list.xml | 11 ++++++++ ...t-children-elements-empty-list.xml.license | 3 +++ .../xml/tasks/test-set-children-elements.yml | 26 +++++++++++++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5808-xml-children-parameter-does-not-exist.yml create mode 100644 tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml create mode 100644 tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml.license diff --git a/changelogs/fragments/5808-xml-children-parameter-does-not-exist.yml b/changelogs/fragments/5808-xml-children-parameter-does-not-exist.yml new file mode 100644 index 0000000000..2bad2c9886 --- /dev/null +++ b/changelogs/fragments/5808-xml-children-parameter-does-not-exist.yml @@ -0,0 +1,2 @@ +bugfixes: +- xml - fixed a bug where empty ``children`` list would not be set (https://github.com/ansible-collections/community.general/pull/5808). \ No newline at end of file diff --git a/plugins/modules/xml.py b/plugins/modules/xml.py index a35cc31ef0..9f16ee1344 100644 --- a/plugins/modules/xml.py +++ b/plugins/modules/xml.py @@ -266,7 +266,7 @@ EXAMPLES = r''' community.general.xml: path: /foo/bar.xml xpath: /business/website - children: [] + set_children: [] # In case of namespaces, like in below XML, they have to be explicitly stated. # @@ -961,7 +961,7 @@ def main(): # add_children && set_children both set?: should have already aborted by now # set_children set? - if set_children: + if set_children is not None: set_target_children(module, doc, xpath, namespaces, set_children, input_type) # add_children set? diff --git a/tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml b/tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml new file mode 100644 index 0000000000..51eb98f16b --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml @@ -0,0 +1,11 @@ + + + Tasty Beverage Co. + + + 10 + + +
http://tastybeverageco.com
+
+
\ No newline at end of file diff --git a/tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml.license b/tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/tests/integration/targets/xml/results/test-set-children-elements-empty-list.xml.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements.yml b/tests/integration/targets/xml/tasks/test-set-children-elements.yml index 8ab14d5080..147f493c97 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements.yml @@ -8,6 +8,32 @@ src: fixtures/ansible-xml-beers.xml dest: /tmp/ansible-xml-beers.xml + - name: Set child elements - empty list + xml: + path: /tmp/ansible-xml-beers.xml + xpath: /business/beers + set_children: [] + register: set_children_elements + + - name: Compare to expected result + copy: + src: results/test-set-children-elements-empty-list.xml + dest: /tmp/ansible-xml-beers.xml + check_mode: yes + diff: yes + register: comparison + + - name: Test expected result + assert: + that: + - set_children_elements is changed + - comparison is not changed # identical + #command: diff -u {{ role_path }}/results/test-set-children-elements.xml /tmp/ansible-xml-beers.xml + + - name: Setup test fixture + copy: + src: fixtures/ansible-xml-beers.xml + dest: /tmp/ansible-xml-beers.xml - name: Set child elements xml: From 3985ade3fc7e97595bb3b17a15720681a16d9a5e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 14 Jan 2023 18:35:01 +0100 Subject: [PATCH 0417/2104] Add PLATFORM docs fragment (#5837) Add PLATFORM docs fragment. --- plugins/doc_fragments/attributes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/doc_fragments/attributes.py b/plugins/doc_fragments/attributes.py index da089dff21..e7ab495916 100644 --- a/plugins/doc_fragments/attributes.py +++ b/plugins/doc_fragments/attributes.py @@ -20,9 +20,11 @@ attributes: description: Will return details on what has changed (or possibly needs changing in C(check_mode)), when in diff mode. ''' -# platform: -# description: Target OS/families that can be operated against. -# support: N/A + PLATFORM = r''' + platform: + description: Target OS/families that can be operated against. + support: N/A +''' # Should be used together with the standard fragment INFO_MODULE = r''' From 756c0776d623ce928149db2d664451e549273ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Servais?= Date: Sat, 14 Jan 2023 18:37:33 +0100 Subject: [PATCH 0418/2104] apache2_module generates false/misleading warning (#5793) * Add parameter warn_mpm_module to control when warning are raised * Remoe whitespace * Add changelog fragment * Add missing license * Update changelogs/fragments/5793-apache2-module-npm-warnings.yml Co-authored-by: Felix Fontein * Update plugins/modules/apache2_module.py Co-authored-by: Felix Fontein * Update plugins/modules/apache2_module.py Co-authored-by: Felix Fontein * Update tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml Co-authored-by: Felix Fontein * Refining integration test - previous was invalid * False to false * refactor assertion for suse * Revert "refactor assertion for suse" This reverts commit 61b86e7493c15a88160d0c0b955f2b08fa538a40. * Excluding test on Suse Co-authored-by: Felix Fontein --- .../5793-apache2-module-npm-warnings.yml | 2 + plugins/modules/apache2_module.py | 28 +++++++++-- .../tasks/635-apache2-misleading-warning.yml | 47 +++++++++++++++++++ .../apache2_module/tasks/actualtest.yml | 2 +- .../targets/apache2_module/tasks/main.yml | 5 ++ 5 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5793-apache2-module-npm-warnings.yml create mode 100644 tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml diff --git a/changelogs/fragments/5793-apache2-module-npm-warnings.yml b/changelogs/fragments/5793-apache2-module-npm-warnings.yml new file mode 100644 index 0000000000..a4750790a4 --- /dev/null +++ b/changelogs/fragments/5793-apache2-module-npm-warnings.yml @@ -0,0 +1,2 @@ +minor_changes: + - apache2_module - add module argument ``warn_mpm_absent`` to control whether warning are raised in some edge cases (https://github.com/ansible-collections/community.general/pull/5793). \ No newline at end of file diff --git a/plugins/modules/apache2_module.py b/plugins/modules/apache2_module.py index a58c0f0c54..e6998ad3f5 100644 --- a/plugins/modules/apache2_module.py +++ b/plugins/modules/apache2_module.py @@ -49,6 +49,12 @@ options: - Ignore configuration checks about inconsistent module configuration. Especially for mpm_* modules. type: bool default: false + warn_mpm_absent: + description: + - Control the behavior of the warning process for MPM modules. + type: bool + default: true + version_added: 6.3.0 requirements: ["a2enmod","a2dismod"] notes: - This does not work on RedHat-based distributions. It does work on Debian- and SuSE-based distributions. @@ -78,6 +84,18 @@ EXAMPLES = ''' name: mpm_worker ignore_configcheck: true +- name: Disable mpm_event, enable mpm_prefork and ignore warnings about missing mpm module + community.general.apache2_module: + name: "{{ item.module }}" + state: "{{ item.state }}" + warn_mpm_absent: false + ignore_configcheck: true + loop: + - module: mpm_event + state: absent + - module: mpm_prefork + state: present + - name: Enable dump_io module, which is identified as dumpio_module inside apache2 community.general.apache2_module: state: present @@ -140,10 +158,11 @@ def _module_is_enabled(module): error_msg = "Error executing %s: %s" % (control_binary, stderr) if module.params['ignore_configcheck']: if 'AH00534' in stderr and 'mpm_' in module.params['name']: - module.warnings.append( - "No MPM module loaded! apache2 reload AND other module actions" - " will fail if no MPM module is loaded immediately." - ) + if module.params['warn_mpm_absent']: + module.warnings.append( + "No MPM module loaded! apache2 reload AND other module actions" + " will fail if no MPM module is loaded immediately." + ) else: module.warnings.append(error_msg) return False @@ -249,6 +268,7 @@ def main(): force=dict(type='bool', default=False), state=dict(default='present', choices=['absent', 'present']), ignore_configcheck=dict(type='bool', default=False), + warn_mpm_absent=dict(type='bool', default=True), ), supports_check_mode=True, ) diff --git a/tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml b/tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml new file mode 100644 index 0000000000..5d93a9d300 --- /dev/null +++ b/tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml @@ -0,0 +1,47 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +# This test represent the misleading behavior of the following issue: https://github.com/ansible-collections/community.general/issues/635 +- name: Disable MPM event module + apache2_module: + name: "{{ item.module}}" + state: "{{ item.state}}" + ignore_configcheck: true + register: disable_mpm_modules + with_items: + - { module: mpm_event, state: absent } + - { module: mpm_prefork, state: present } + +- assert: + that: + - "'warnings' in disable_mpm_modules" + - disable_mpm_modules["warnings"] == [ + "No MPM module loaded! apache2 reload AND other module actions will fail if no MPM module is loaded immediately.", + "No MPM module loaded! apache2 reload AND other module actions will fail if no MPM module is loaded immediately." + ] + +- name: Enable MPM event module - Revert previous change + apache2_module: + name: "{{ item.module}}" + state: "{{ item.state}}" + ignore_configcheck: true + register: disable_mpm_modules + with_items: + - { module: mpm_prefork, state: absent } + - { module: mpm_event, state: present } + +- name: Disable MPM event module + apache2_module: + name: "{{ item.module}}" + state: "{{ item.state}}" + ignore_configcheck: true + warn_mpm_absent: false + register: disable_mpm_modules + with_items: + - { module: mpm_event, state: absent } + - { module: mpm_prefork, state: present } + +- assert: + that: + - "'warnings' not in disable_mpm_modules" diff --git a/tests/integration/targets/apache2_module/tasks/actualtest.yml b/tests/integration/targets/apache2_module/tasks/actualtest.yml index 156b54047d..1902cac5ee 100644 --- a/tests/integration/targets/apache2_module/tasks/actualtest.yml +++ b/tests/integration/targets/apache2_module/tasks/actualtest.yml @@ -180,7 +180,7 @@ - mpm_worker - mpm_event - mpm_prefork - ignore_errors: yes + ignore_errors: true register: remove_with_configcheck - name: ensure configcheck fails task with when run without mpm modules diff --git a/tests/integration/targets/apache2_module/tasks/main.yml b/tests/integration/targets/apache2_module/tasks/main.yml index 650e36474c..70ba14ea24 100644 --- a/tests/integration/targets/apache2_module/tasks/main.yml +++ b/tests/integration/targets/apache2_module/tasks/main.yml @@ -45,3 +45,8 @@ that: modules_before.stdout == modules_after.stdout when: ansible_os_family in ['Debian', 'Suse'] # centos/RHEL does not have a2enmod/a2dismod + +- name: include misleading warning test + include: 635-apache2-misleading-warning.yml + when: ansible_os_family in ['Debian'] + # Suse has mpm_event module compiled within the base apache2 \ No newline at end of file From f05f8bb49a54e11077adebfd7e3b2c8b1098139e Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 15 Jan 2023 06:39:05 +1300 Subject: [PATCH 0419/2104] rax modules: deprecation (#5752) * rax modules: deprecation * add changelog fragment * Update plugins/doc_fragments/rackspace.py Co-authored-by: Felix Fontein * add comment go sanity ignore files * changelog: fix typo + add rax module utils * add module utils and doc fragment to runtime.yml Co-authored-by: Felix Fontein --- changelogs/fragments/5752-rax-deprecation.yml | 28 +++++ meta/runtime.yml | 112 ++++++++++++++++++ plugins/doc_fragments/rackspace.py | 4 + tests/sanity/ignore-2.11.txt | 6 +- tests/sanity/ignore-2.12.txt | 6 +- tests/sanity/ignore-2.13.txt | 6 +- tests/sanity/ignore-2.14.txt | 6 +- tests/sanity/ignore-2.15.txt | 6 +- 8 files changed, 159 insertions(+), 15 deletions(-) create mode 100644 changelogs/fragments/5752-rax-deprecation.yml diff --git a/changelogs/fragments/5752-rax-deprecation.yml b/changelogs/fragments/5752-rax-deprecation.yml new file mode 100644 index 0000000000..4db8412208 --- /dev/null +++ b/changelogs/fragments/5752-rax-deprecation.yml @@ -0,0 +1,28 @@ +deprecated_features: + - rax_cbs_attachments - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_cbs - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_cdb_database - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_cdb - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_cdb_user - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_clb_nodes - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_clb - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_clb_ssl - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_dns - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_dns_record - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_facts - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_files_objects - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_files - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_identity - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_keypair - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_meta - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_mon_alarm - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_mon_check - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_mon_entity - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_mon_notification_plan - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_mon_notification - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_network - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_queue - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_scaling_group - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax_scaling_policy - module relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). + - rax module utils - module utils code relies on deprecated library ``pyrax`` and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5752). diff --git a/meta/runtime.yml b/meta/runtime.yml index 9d15860ac4..0cdb1bedc8 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -22,6 +22,110 @@ plugin_routing: nios_next_network: redirect: infoblox.nios_modules.nios_next_network modules: + rax_cbs_attachments: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_cbs: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_cdb_database: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_cdb_user: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_cdb: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_clb_nodes: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_clb_ssl: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_clb: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_dns_record: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_dns: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_facts: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_files_objects: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_files: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_identity: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_keypair: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_meta: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_mon_alarm: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_mon_check: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_mon_entity: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_mon_notification_plan: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_mon_notification: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_network: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_queue: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_scaling_group: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. + rax_scaling_policy: + deprecation: + removal_version: 9.0.0 + warning_text: This module relies on the deprecated package pyrax. database.aerospike.aerospike_migrations: redirect: community.general.aerospike_migrations deprecation: @@ -4499,6 +4603,10 @@ plugin_routing: modules. This has never been supported or documented, and will stop working in community.general 9.0.0. doc_fragments: + rackspace: + deprecation: + removal_version: 9.0.0 + warning_text: This doc fragment is used by rax modules, that rely on the deprecated package pyrax. _gcp: redirect: community.google._gcp docker: @@ -4514,6 +4622,10 @@ plugin_routing: postgresql: redirect: community.postgresql.postgresql module_utils: + rax: + deprecation: + removal_version: 9.0.0 + warning_text: This module util relies on the deprecated package pyrax. docker.common: redirect: community.docker.common docker.swarm: diff --git a/plugins/doc_fragments/rackspace.py b/plugins/doc_fragments/rackspace.py index 9e22316022..6f902a2395 100644 --- a/plugins/doc_fragments/rackspace.py +++ b/plugins/doc_fragments/rackspace.py @@ -105,6 +105,10 @@ options: - Whether or not to require SSL validation of API endpoints. type: bool aliases: [ verify_ssl ] +deprecated: + removed_in: 9.0.0 + why: This module relies on the deprecated package pyrax. + alternative: Use the Openstack modules instead. requirements: - python >= 2.6 - pyrax diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 39b09d887a..508785f220 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -19,9 +19,9 @@ plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files_objects.py use-argspec-type-path # module deprecated - removed in 9.0.0 +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice # module deprecated - removed in 9.0.0 +plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 47244bb515..77a0105529 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -14,9 +14,9 @@ plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files_objects.py use-argspec-type-path # module deprecated - removed in 9.0.0 +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice # module deprecated - removed in 9.0.0 +plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 47244bb515..77a0105529 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -14,9 +14,9 @@ plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files_objects.py use-argspec-type-path # module deprecated - removed in 9.0.0 +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice # module deprecated - removed in 9.0.0 +plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index a2e9e37325..db0e449b79 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -15,9 +15,9 @@ plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files_objects.py use-argspec-type-path # module deprecated - removed in 9.0.0 +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice # module deprecated - removed in 9.0.0 +plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index a2e9e37325..db0e449b79 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -15,9 +15,9 @@ plugins/modules/manageiq_tags.py validate-modules:parameter-state-invalid-choice plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice plugins/modules/parted.py validate-modules:parameter-state-invalid-choice plugins/modules/puppet.py validate-modules:parameter-invalid # invalid alias - removed in 7.0.0 -plugins/modules/rax_files_objects.py use-argspec-type-path -plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice -plugins/modules/rax.py use-argspec-type-path # fix needed +plugins/modules/rax_files_objects.py use-argspec-type-path # module deprecated - removed in 9.0.0 +plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice # module deprecated - removed in 9.0.0 +plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error From 937dea6af33eb9b01aef405ab2bf6ee9ea242675 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 15 Jan 2023 18:44:50 +0100 Subject: [PATCH 0420/2104] Remove leftovers. --- CHANGELOG.rst | 240 ++------------------------------------------------ 1 file changed, 5 insertions(+), 235 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3b83faa551..119e04e170 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,236 +1,6 @@ -=============================== -Community General Release Notes -=============================== +Placeholder changelog +===================== -.. contents:: Topics - -This changelog describes changes after version 5.0.0. - -v6.0.0-a1 -========= - -Release Summary ---------------- - -This is a pre-release for the upcoming 6.0.0 major release. The main objective of this pre-release is to make it possible to test the large stuctural changes by flattening the directory structure. See the corresponding entry in the changelog for details. - -Major Changes -------------- - -- The internal structure of the collection was changed for modules and action plugins. These no longer live in a directory hierarchy ordered by topic, but instead are now all in a single (flat) directory. This has no impact on users *assuming they did not use internal FQCNs*. These will still work, but result in deprecation warnings. They were never officially supported and thus the redirects are kept as a courtsey, and this is not labelled as a breaking change. Note that for example the Ansible VScode plugin started recommending these internal names. If you followed its recommendation, you will now have to change back to the short names to avoid deprecation warnings, and potential errors in the future as these redirects will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5461). -- newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341). - -Minor Changes -------------- - -- Added MIT license as ``LICENSES/MIT.txt`` for tests/unit/plugins/modules/packaging/language/test_gem.py (https://github.com/ansible-collections/community.general/pull/5065). -- All software licenses are now in the ``LICENSES/`` directory of the collection root (https://github.com/ansible-collections/community.general/pull/5065, https://github.com/ansible-collections/community.general/pull/5079, https://github.com/ansible-collections/community.general/pull/5080, https://github.com/ansible-collections/community.general/pull/5083, https://github.com/ansible-collections/community.general/pull/5087, https://github.com/ansible-collections/community.general/pull/5095, https://github.com/ansible-collections/community.general/pull/5098, https://github.com/ansible-collections/community.general/pull/5106). -- ModuleHelper module utils - added property ``verbosity`` to base class (https://github.com/ansible-collections/community.general/pull/5035). -- ModuleHelper module utils - improved ``ModuleHelperException``, using ``to_native()`` for the exception message (https://github.com/ansible-collections/community.general/pull/4755). -- The collection repository conforms to the `REUSE specification `__ except for the changelog fragments (https://github.com/ansible-collections/community.general/pull/5138). -- ali_instance - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). -- ali_instance_info - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5240). -- alternatives - add ``state=absent`` to be able to remove an alternative (https://github.com/ansible-collections/community.general/pull/4654). -- alternatives - add ``subcommands`` parameter (https://github.com/ansible-collections/community.general/pull/4654). -- ansible_galaxy_install - minor refactoring using latest ``ModuleHelper`` updates (https://github.com/ansible-collections/community.general/pull/4752). -- apk - add ``world`` parameter for supporting a custom world file (https://github.com/ansible-collections/community.general/pull/4976). -- bitwarden lookup plugin - add option ``search`` to search for other attributes than name (https://github.com/ansible-collections/community.general/pull/5297). -- cartesian lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- cmd_runner module util - added parameters ``check_mode_skip`` and ``check_mode_return`` to ``CmdRunner.context()``, so that the command is not executed when ``check_mode=True`` (https://github.com/ansible-collections/community.general/pull/4736). -- cmd_runner module utils - add ``__call__`` method to invoke context (https://github.com/ansible-collections/community.general/pull/4791). -- consul - adds ``ttl`` parameter for session (https://github.com/ansible-collections/community.general/pull/4996). -- consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367). -- consul_session - adds ``token`` parameter for session (https://github.com/ansible-collections/community.general/pull/5193). -- cpanm - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). -- credstash lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- dependent lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- dig lookup plugin - add option ``fail_on_error`` to allow stopping execution on lookup failures (https://github.com/ansible-collections/community.general/pull/4973). -- dig lookup plugin - start using Ansible's configuration manager to parse options. All documented options can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440). -- dnstxt lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- filetree lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- flattened lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- gitlab module util - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_deploy_key - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_group - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_group_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_group_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_hook - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_hook - minor refactoring (https://github.com/ansible-collections/community.general/pull/5271). -- gitlab_project - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_project_members - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_project_variable - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_protected_branch - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_runner - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- gitlab_user - minor refactor when checking for installed dependency (https://github.com/ansible-collections/community.general/pull/5259). -- hiera lookup plugin - start using Ansible's configuration manager to parse options. The Hiera executable and config file can now also be passed as lookup parameters (https://github.com/ansible-collections/community.general/pull/5440). -- homebrew, homebrew_tap - added Homebrew on Linux path to defaults (https://github.com/ansible-collections/community.general/pull/5241). -- keycloak_* modules - add ``http_agent`` parameter with default value ``Ansible`` (https://github.com/ansible-collections/community.general/issues/5023). -- keyring lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- lastpass - use config manager for handling plugin options (https://github.com/ansible-collections/community.general/pull/5022). -- linode inventory plugin - simplify option handling (https://github.com/ansible-collections/community.general/pull/5438). -- listen_ports_facts - add new ``include_non_listening`` option which adds ``-a`` option to ``netstat`` and ``ss``. This shows both listening and non-listening (for TCP this means established connections) sockets, and returns ``state`` and ``foreign_address`` (https://github.com/ansible-collections/community.general/issues/4762, https://github.com/ansible-collections/community.general/pull/4953). -- lmdb_kv lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358). -- machinectl become plugin - can now be used with a password from another user than root, if a polkit rule is present (https://github.com/ansible-collections/community.general/pull/4849). -- machinectl become plugin - combine the success command when building the become command to be consistent with other become plugins (https://github.com/ansible-collections/community.general/pull/5287). -- manifold lookup plugin - start using Ansible's configuration manager to parse options (https://github.com/ansible-collections/community.general/pull/5440). -- maven_artifact - add a new ``unredirected_headers`` option that can be used with ansible-core 2.12 and above. The default value is to not use ``Authorization`` and ``Cookie`` headers on redirects for security reasons. With ansible-core 2.11, all headers are still passed on for redirects (https://github.com/ansible-collections/community.general/pull/4812). -- mksysb - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). -- nagios - minor refactoring on parameter validation for different actions (https://github.com/ansible-collections/community.general/pull/5239). -- netcup_dnsapi - add ``timeout`` parameter (https://github.com/ansible-collections/community.general/pull/5301). -- nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361). -- nmcli - add bond option ``xmit_hash_policy`` to bond options (https://github.com/ansible-collections/community.general/issues/5148). -- nmcli - adds ``vpn`` type and parameter for supporting VPN with service type L2TP and PPTP (https://github.com/ansible-collections/community.general/pull/4746). -- nmcli - honor IP options for VPNs (https://github.com/ansible-collections/community.general/pull/5228). -- opentelemetry callback plugin - allow configuring opentelementry callback via config file (https://github.com/ansible-collections/community.general/pull/4916). -- opentelemetry callback plugin - send logs. This can be disabled by setting ``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175). -- pacman - added parameters ``reason`` and ``reason_for`` to set/change the install reason of packages (https://github.com/ansible-collections/community.general/pull/4956). -- passwordstore lookup plugin - allow options to be passed lookup options instead of being part of the term strings (https://github.com/ansible-collections/community.general/pull/5444). -- passwordstore lookup plugin - allow using alternative password managers by detecting wrapper scripts, allow explicit configuration of pass and gopass backends (https://github.com/ansible-collections/community.general/issues/4766). -- passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436) -- pipx - added state ``latest`` to the module (https://github.com/ansible-collections/community.general/pull/5105). -- pipx - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/5085). -- pipx - module fails faster when ``name`` is missing for states ``upgrade`` and ``reinstall`` (https://github.com/ansible-collections/community.general/pull/5100). -- pipx - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). -- pipx module utils - created new module util ``pipx`` providing a ``cmd_runner`` specific for the ``pipx`` module (https://github.com/ansible-collections/community.general/pull/5085). -- portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options (https://github.com/ansible-collections/community.general/pull/5349). -- portage - use Portage's python module instead of calling gentoolkit-provided program in shell (https://github.com/ansible-collections/community.general/pull/5349). -- proxmox inventory plugin - added new flag ``qemu_extended_statuses`` and new groups ``prelaunch``, ``paused``. They will be populated only when ``want_facts=true``, ``qemu_extended_statuses=true`` and only for ``QEMU`` machines (https://github.com/ansible-collections/community.general/pull/4723). -- proxmox inventory plugin - simplify option handling code (https://github.com/ansible-collections/community.general/pull/5437). -- proxmox module utils, the proxmox* modules - add ``api_task_ok`` helper to standardize API task status checks across all proxmox modules (https://github.com/ansible-collections/community.general/pull/5274). -- proxmox_kvm - allow ``agent`` argument to be a string (https://github.com/ansible-collections/community.general/pull/5107). -- proxmox_snap - add ``unbind`` param to support snapshotting containers with configured mountpoints (https://github.com/ansible-collections/community.general/pull/5274). -- puppet - adds ``confdir`` parameter to configure a custom confir location (https://github.com/ansible-collections/community.general/pull/4740). -- redfish - added new command GetVirtualMedia, VirtualMediaInsert and VirtualMediaEject to Systems category due to Redfish spec changes the virtualMedia resource location from Manager to System (https://github.com/ansible-collections/community.general/pull/5124). -- redfish_config - add ``SetSessionService`` to set default session timeout policy (https://github.com/ansible-collections/community.general/issues/5008). -- redfish_info - add ``GetManagerInventory`` to report list of Manager inventory information (https://github.com/ansible-collections/community.general/issues/4899). -- seport - added new argument ``local`` (https://github.com/ansible-collections/community.general/pull/5203) -- snap - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). -- sudoers - will attempt to validate the proposed sudoers rule using visudo if available, optionally skipped, or required (https://github.com/ansible-collections/community.general/pull/4794, https://github.com/ansible-collections/community.general/issues/4745). -- terraform - adds capability to handle complex variable structures for ``variables`` parameter in the module. This must be enabled with the new ``complex_vars`` parameter (https://github.com/ansible-collections/community.general/pull/4797). -- terraform - run ``terraform init`` with ``-no-color`` not to mess up the stdout of the task (https://github.com/ansible-collections/community.general/pull/5147). -- wdc_redfish_command - add ``IndicatorLedOn`` and ``IndicatorLedOff`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5059). -- wdc_redfish_command - add ``PowerModeLow`` and ``PowerModeNormal`` commands for ``Chassis`` category (https://github.com/ansible-collections/community.general/pull/5145). -- xfconf - add ``stdout``, ``stderr`` and ``cmd`` to the module results (https://github.com/ansible-collections/community.general/pull/5037). -- xfconf - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). -- xfconf - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). -- xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674). -- xfconf module utils - created new module util ``xfconf`` providing a ``cmd_runner`` specific for ``xfconf`` modules (https://github.com/ansible-collections/community.general/pull/4776). -- xfconf_info - changed implementation to use ``cmd_runner`` (https://github.com/ansible-collections/community.general/pull/4776). -- xfconf_info - use ``do_raise()`` instead of defining custom exception class (https://github.com/ansible-collections/community.general/pull/4975). -- znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306). - -Breaking Changes / Porting Guide --------------------------------- - -- newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341). - -Deprecated Features -------------------- - -- ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt`` module util (https://github.com/ansible-collections/community.general/pull/5370). -- CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). -- CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). -- CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370). -- cmd_runner module utils - deprecated ``fmt`` in favour of ``cmd_runner_fmt`` as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777). -- django_manage - support for Django releases older than 4.1 has been deprecated and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). -- django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate`` that have been deprecated in Django long time ago will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400). -- django_manage - the behavior of "creating the virtual environment when missing" is being deprecated and will be removed in community.general version 9.0.0 (https://github.com/ansible-collections/community.general/pull/5405). -- gconftool2 - deprecates ``state=get`` in favor of using the module ``gconftool2_info`` (https://github.com/ansible-collections/community.general/pull/4778). -- lxc_container - the module will no longer make any effort to support Python 2 (https://github.com/ansible-collections/community.general/pull/5304). -- newrelic_deployment - ``appname`` and ``environment`` are no longer valid options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341). -- proxmox - deprecated the current ``unprivileged`` default value, will be changed to ``true`` in community.general 7.0.0 (https://github.com/pull/5224). -- xfconf - deprecated parameter ``disable_facts``, as since version 4.0.0 it only allows value ``true`` (https://github.com/ansible-collections/community.general/pull/4520). - -Removed Features (previously deprecated) ----------------------------------------- - -- bitbucket* modules - ``username`` is no longer an alias of ``workspace``, but of ``user`` (https://github.com/ansible-collections/community.general/pull/5326). -- gem - the default of the ``norc`` option changed from ``false`` to ``true`` (https://github.com/ansible-collections/community.general/pull/5326). -- gitlab_group_members - ``gitlab_group`` must now always contain the full path, and no longer just the name or path (https://github.com/ansible-collections/community.general/pull/5326). -- keycloak_authentication - the return value ``flow`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326). -- keycloak_group - the return value ``group`` has been removed. Use ``end_state`` instead (https://github.com/ansible-collections/community.general/pull/5326). -- lxd_container - the default of the ``ignore_volatile_options`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). -- mail callback plugin - the ``sender`` option is now required (https://github.com/ansible-collections/community.general/pull/5326). -- module_helper module utils - remove the ``VarDict`` attribute from ``ModuleHelper``. Import ``VarDict`` from ``ansible_collections.community.general.plugins.module_utils.mh.mixins.vars`` instead (https://github.com/ansible-collections/community.general/pull/5326). -- proxmox inventory plugin - the default of the ``want_proxmox_nodes_ansible_host`` option changed from ``true`` to ``false`` (https://github.com/ansible-collections/community.general/pull/5326). -- vmadm - the ``debug`` option has been removed. It was not used anyway (https://github.com/ansible-collections/community.general/pull/5326). - -Bugfixes --------- - -- Include ``PSF-license.txt`` file for ``plugins/module_utils/_mount.py``. -- Include ``simplified_bsd.txt`` license file for various module utils, the ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests. -- alternatives - do not set the priority if the priority was not set by the user (https://github.com/ansible-collections/community.general/pull/4810). -- alternatives - only pass subcommands when they are specified as module arguments (https://github.com/ansible-collections/community.general/issues/4803, https://github.com/ansible-collections/community.general/issues/4804, https://github.com/ansible-collections/community.general/pull/4836). -- alternatives - when ``subcommands`` is specified, ``link`` must be given for every subcommand. This was already mentioned in the documentation, but not enforced by the code (https://github.com/ansible-collections/community.general/pull/4836). -- apache2_mod_proxy - avoid crash when reporting inability to parse balancer_member_page HTML caused by using an undefined variable in the error message (https://github.com/ansible-collections/community.general/pull/5111). -- archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz`` (https://github.com/ansible-collections/community.general/pull/5393). -- cmd_runner module utils - fix bug caused by using the ``command`` variable instead of ``self.command`` when looking for binary path (https://github.com/ansible-collections/community.general/pull/4903). -- consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680). -- credstash lookup plugin - pass plugin options to credstash for all terms, not just for the first (https://github.com/ansible-collections/community.general/pull/5440). -- dig lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5439, https://github.com/ansible-collections/community.general/issues/5428). -- dig lookup plugin - fix evaluation of falsy values for boolean parameters ``fail_on_error`` and ``retry_servfail`` (https://github.com/ansible-collections/community.general/pull/5129). -- dnsimple_info - correctly report missing library as ``requests`` and not ``another_library`` (https://github.com/ansible-collections/community.general/pull/5111). -- dnstxt lookup plugin - add option to return empty result without empty strings, and return empty list instead of ``NXDOMAIN`` (https://github.com/ansible-collections/community.general/pull/5457, https://github.com/ansible-collections/community.general/issues/5428). -- dsv lookup plugin - do not ignore the ``tld`` parameter (https://github.com/ansible-collections/community.general/pull/4911). -- filesystem - handle ``fatresize --info`` output lines without ``:`` (https://github.com/ansible-collections/community.general/pull/4700). -- filesystem - improve error messages when output cannot be parsed by including newlines in escaped form (https://github.com/ansible-collections/community.general/pull/4700). -- funcd connection plugin - fix signature of ``exec_command`` (https://github.com/ansible-collections/community.general/pull/5111). -- ini_file - minor refactor fixing a python lint error (https://github.com/ansible-collections/community.general/pull/5307). -- keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241). -- keyring_info - fix the result from the keyring library never getting returned (https://github.com/ansible-collections/community.general/pull/4964). -- ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute values (https://github.com/ansible-collections/community.general/issues/977, https://github.com/ansible-collections/community.general/pull/5385). -- listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` clause had a wrong indentation. The check is now handled in the ``split_pid_name`` function (https://github.com/ansible-collections/community.general/pull/5202). -- locale_gen - fix support for Ubuntu (https://github.com/ansible-collections/community.general/issues/5281). -- lxc_container - the module has been updated to support Python 3 (https://github.com/ansible-collections/community.general/pull/5304). -- lxd connection plugin - fix incorrect ``inventory_hostname`` in ``remote_addr``. This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/issues/4886). -- manageiq_alert_profiles - avoid crash when reporting unknown profile caused by trying to return an undefined variable (https://github.com/ansible-collections/community.general/pull/5111). -- nmcli - avoid changed status for most cases with VPN connections (https://github.com/ansible-collections/community.general/pull/5126). -- nmcli - fix error caused by adding undefined module arguments for list options (https://github.com/ansible-collections/community.general/issues/4373, https://github.com/ansible-collections/community.general/pull/4813). -- nmcli - fix error when setting previously unset MAC address, ``gsm.apn`` or ``vpn.data``: current values were being normalized without checking if they might be ``None`` (https://github.com/ansible-collections/community.general/pull/5291). -- nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998). -- nsupdate - compatibility with NS records (https://github.com/ansible-collections/community.general/pull/5112). -- nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed DNS zones (https://github.com/ansible-collections/community.general/issues/4657). -- opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342). -- osx_defaults - no longer expand ``~`` in ``value`` to the user's home directory, or expand environment variables (https://github.com/ansible-collections/community.general/issues/5234, https://github.com/ansible-collections/community.general/pull/5243). -- packet_ip_subnet - fix error reporting in case of invalid CIDR prefix lengths (https://github.com/ansible-collections/community.general/pull/5111). -- pacman - fixed name resolution of URL packages (https://github.com/ansible-collections/community.general/pull/4959). -- passwordstore lookup plugin - fix ``returnall`` for gopass (https://github.com/ansible-collections/community.general/pull/5027). -- passwordstore lookup plugin - fix password store path detection for gopass (https://github.com/ansible-collections/community.general/pull/4955). -- pfexec become plugin - remove superflous quotes preventing exe wrap from working as expected (https://github.com/ansible-collections/community.general/issues/3671, https://github.com/ansible-collections/community.general/pull/3889). -- pip_package_info - remove usage of global variable (https://github.com/ansible-collections/community.general/pull/5111). -- pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363). -- proxmox - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). -- proxmox inventory plugin - fix crash when ``enabled=1`` is used in agent config string (https://github.com/ansible-collections/community.general/pull/4910). -- proxmox inventory plugin - fixed extended status detection for qemu (https://github.com/ansible-collections/community.general/pull/4816). -- proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198). -- proxmox_kvm - fix error handling when getting VM by name when ``state=absent`` (https://github.com/ansible-collections/community.general/pull/4945). -- proxmox_kvm - fix exception when no ``agent`` argument is specified (https://github.com/ansible-collections/community.general/pull/5194). -- proxmox_kvm - fix wrong condition (https://github.com/ansible-collections/community.general/pull/5108). -- proxmox_kvm - replace new condition with proper condition to allow for using ``vmid`` on update (https://github.com/ansible-collections/community.general/pull/5206). -- rax_clb_nodes - fix code to be compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/4933). -- redfish_command - fix the check if a virtual media is unmounted to just check for ``instered= false`` caused by Supermicro hardware that does not clear the ``ImageName`` (https://github.com/ansible-collections/community.general/pull/4839). -- redfish_command - the Supermicro Redfish implementation only supports the ``image_url`` parameter in the underlying API calls to ``VirtualMediaInsert`` and ``VirtualMediaEject``. Any values set (or the defaults) for ``write_protected`` or ``inserted`` will be ignored (https://github.com/ansible-collections/community.general/pull/4839). -- redfish_info - fix to ``GetChassisPower`` to correctly report power information when multiple chassis exist, but not all chassis report power information (https://github.com/ansible-collections/community.general/issues/4901). -- redfish_utils module utils - centralize payload checking when performing modification requests to a Redfish service (https://github.com/ansible-collections/community.general/issues/5210/). -- redhat_subscription - fix unsubscribing on RHEL 9 (https://github.com/ansible-collections/community.general/issues/4741). -- redhat_subscription - make module idempotent when ``pool_ids`` are used (https://github.com/ansible-collections/community.general/issues/5313). -- redis* modules - fix call to ``module.fail_json`` when failing because of missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733). -- slack - fix incorrect channel prefix ``#`` caused by incomplete pattern detection by adding ``G0`` and ``GF`` as channel ID patterns (https://github.com/ansible-collections/community.general/pull/5019). -- slack - fix message update for channels which start with ``CP``. When ``message-id`` was passed it failed for channels which started with ``CP`` because the ``#`` symbol was added before the ``channel_id`` (https://github.com/ansible-collections/community.general/pull/5249). -- sudoers - ensure sudoers config files are created with the permissions requested by sudoers (0440) (https://github.com/ansible-collections/community.general/pull/4814). -- sudoers - fix incorrect handling of ``state: absent`` (https://github.com/ansible-collections/community.general/issues/4852). -- tss lookup plugin - adding support for updated Delinea library (https://github.com/DelineaXPM/python-tss-sdk/issues/9, https://github.com/ansible-collections/community.general/pull/5151). -- virtualbox inventory plugin - skip parsing values with keys that have both a value and nested data. Skip parsing values that are nested more than two keys deep (https://github.com/ansible-collections/community.general/issues/5332, https://github.com/ansible-collections/community.general/pull/5348). -- xcc_redfish_command - for compatibility due to Redfish spec changes the virtualMedia resource location changed from Manager to System (https://github.com/ansible-collections/community.general/pull/4682). -- xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module from working at all (https://github.com/ansible-collections/community.general/pull/5383). -- xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, https://github.com/ansible-collections/community.general/pull/5007). -- zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, https://github.com/ansible-collections/community.general/pull/4726). - -New Modules ------------ - -- scaleway_function_namespace - Scaleway Function namespace management -- scaleway_function_namespace_info - Retrieve information on Scaleway Function namespace +This file is a placeholder; a version-specific ``CHANGELOG-vX.rst`` will be generated during releases from fragments +under ``changelogs/fragments``. On release branches once a release has been created, consult the branch's version-specific +file for changes that have occurred in that branch. From 44172ddaa6130d2441954da54da0ea70caf41521 Mon Sep 17 00:00:00 2001 From: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com> Date: Mon, 16 Jan 2023 23:54:07 +0200 Subject: [PATCH 0421/2104] Add -no-color argument to terraform validation (#5843) --- changelogs/fragments/5843-terraform-validate-no-color.yml | 2 ++ plugins/modules/terraform.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5843-terraform-validate-no-color.yml diff --git a/changelogs/fragments/5843-terraform-validate-no-color.yml b/changelogs/fragments/5843-terraform-validate-no-color.yml new file mode 100644 index 0000000000..25cc6045ad --- /dev/null +++ b/changelogs/fragments/5843-terraform-validate-no-color.yml @@ -0,0 +1,2 @@ +bugfixes: +- terraform module - disable ANSI escape sequences during validation phase (https://github.com/ansible-collections/community.general/pull/5843). \ No newline at end of file diff --git a/plugins/modules/terraform.py b/plugins/modules/terraform.py index 2a018ea03c..b6b09b0eb2 100644 --- a/plugins/modules/terraform.py +++ b/plugins/modules/terraform.py @@ -299,9 +299,9 @@ def preflight_validation(bin_path, project_path, version, variables_args=None, p if not os.path.isdir(project_path): module.fail_json(msg="Path for Terraform project '{0}' doesn't exist on this host - check the path and try again please.".format(project_path)) if LooseVersion(version) < LooseVersion('0.15.0'): - rc, out, err = module.run_command([bin_path, 'validate'] + variables_args, check_rc=True, cwd=project_path) + module.run_command([bin_path, 'validate', '-no-color'] + variables_args, check_rc=True, cwd=project_path) else: - rc, out, err = module.run_command([bin_path, 'validate'], check_rc=True, cwd=project_path) + module.run_command([bin_path, 'validate', '-no-color'], check_rc=True, cwd=project_path) def _state_args(state_file): From 5ad703ac64026f88a401880b52fb25dab49237bc Mon Sep 17 00:00:00 2001 From: n0p90 <36303164+n0p90@users.noreply.github.com> Date: Tue, 17 Jan 2023 20:03:38 +0000 Subject: [PATCH 0422/2104] nsupdate: fix zone lookup (#5818) The SOA record for an existing zone is returned as an answer RR and not as an authority RR. It can be returned as an authority RR for subdomains of a zone. $ dig -t SOA example.com ;; ANSWER SECTION: example.com. 3530 IN SOA ns.icann.org. noc.dns.icann.org. 2022091184 7200 3600 1209600 3600 $ dig -t SOA www.example.com ;; AUTHORITY SECTION: example.com. 3600 IN SOA ns.icann.org. noc.dns.icann.org. 2022091184 7200 3600 1209600 3600 --- .../fragments/5818-nsupdate-fix-zone-lookup.yml | 2 ++ plugins/modules/nsupdate.py | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5818-nsupdate-fix-zone-lookup.yml diff --git a/changelogs/fragments/5818-nsupdate-fix-zone-lookup.yml b/changelogs/fragments/5818-nsupdate-fix-zone-lookup.yml new file mode 100644 index 0000000000..4f6ed6a125 --- /dev/null +++ b/changelogs/fragments/5818-nsupdate-fix-zone-lookup.yml @@ -0,0 +1,2 @@ +bugfixes: + - nsupdate - fix zone lookup. The SOA record for an existing zone is returned as an answer RR and not as an authority RR (https://github.com/ansible-collections/community.general/issues/5817, https://github.com/ansible-collections/community.general/pull/5818). diff --git a/plugins/modules/nsupdate.py b/plugins/modules/nsupdate.py index 2be4863b68..bc31521cdb 100644 --- a/plugins/modules/nsupdate.py +++ b/plugins/modules/nsupdate.py @@ -269,12 +269,16 @@ class RecordManager(object): if lookup.rcode() in [dns.rcode.SERVFAIL, dns.rcode.REFUSED]: self.module.fail_json(msg='Zone lookup failure: \'%s\' will not respond to queries regarding \'%s\'.' % ( self.module.params['server'], self.module.params['record'])) - try: - zone = lookup.authority[0].name - if zone == name: - return zone.to_text() - except IndexError: - pass + # If the response contains an Answer SOA RR whose name matches the queried name, + # this is the name of the zone in which the record needs to be inserted. + for rr in lookup.answer: + if rr.rdtype == dns.rdatatype.SOA and rr.name == name: + return rr.name.to_text() + # If the response contains an Authority SOA RR whose name is a subdomain of the queried name, + # this SOA name is the zone in which the record needs to be inserted. + for rr in lookup.authority: + if rr.rdtype == dns.rdatatype.SOA and name.fullcompare(rr.name)[0] == dns.name.NAMERELN_SUBDOMAIN: + return rr.name.to_text() try: name = name.parent() except dns.name.NoParent: From 4a40f99cd69d5cc75cdd7537a928be09de70e23b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 18 Jan 2023 07:54:50 +0100 Subject: [PATCH 0423/2104] Add extended PR template (#5622) * Add extended PR template. * Improvements. * Apply suggestions from code review Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/feature_request.yml Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../ISSUE_TEMPLATE/documentation_report.yml | 4 +-- .github/ISSUE_TEMPLATE/feature_request.yml | 4 +-- .github/pull_request_template.md | 32 +++++++++++++++++++ .github/pull_request_template.md.license | 3 ++ CONTRIBUTING.md | 2 +- 6 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/pull_request_template.md.license diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index bd5030f2c2..f64de2abe3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -47,7 +47,7 @@ body: label: Component Name description: >- Write the short name of the module, plugin, task or feature below, - *use your best guess if unsure*. + *use your best guess if unsure*. Do not include `community.general.`! placeholder: dnf, apt, yum, pip, user etc. validations: required: true diff --git a/.github/ISSUE_TEMPLATE/documentation_report.yml b/.github/ISSUE_TEMPLATE/documentation_report.yml index 3a2777f207..6ec49fcb37 100644 --- a/.github/ISSUE_TEMPLATE/documentation_report.yml +++ b/.github/ISSUE_TEMPLATE/documentation_report.yml @@ -46,8 +46,8 @@ body: attributes: label: Component Name description: >- - Write the short name of the rst file, module, plugin, task or - feature below, *use your best guess if unsure*. + Write the short name of the file, module, plugin, task or feature below, + *use your best guess if unsure*. Do not include `community.general.`! placeholder: mysql_user validations: required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 9630b67e12..f34564283c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -42,8 +42,8 @@ body: attributes: label: Component Name description: >- - Write the short name of the module, plugin, task or feature below, - *use your best guess if unsure*. + Write the short name of the module or plugin, or which other part(s) of the collection this feature affects. + *use your best guess if unsure*. Do not include `community.general.`! placeholder: dnf, apt, yum, pip, user etc. validations: required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..29a2d2e36a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,32 @@ +##### SUMMARY + + + + + + +##### ISSUE TYPE + +- Bugfix Pull Request +- Docs Pull Request +- Feature Pull Request +- New Module/Plugin Pull Request +- Refactoring Pull Request +- Test Pull Request + +##### COMPONENT NAME + + +##### ADDITIONAL INFORMATION + + + + +```paste below + +``` diff --git a/.github/pull_request_template.md.license b/.github/pull_request_template.md.license new file mode 100644 index 0000000000..a1390a69ed --- /dev/null +++ b/.github/pull_request_template.md.license @@ -0,0 +1,3 @@ +Copyright (c) Ansible Project +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 358daa5e91..4048f32a81 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ Also, consider taking up a valuable, reviewed, but abandoned pull request which * Try committing your changes with an informative but short commit message. * Do not squash your commits and force-push to your branch if not needed. Reviews of your pull request are much easier with individual commits to comprehend the pull request history. All commits of your pull request branch will be squashed into one commit by GitHub upon merge. * Do not add merge commits to your PR. The bot will complain and you will have to rebase ([instructions for rebasing](https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html)) to remove them before your PR can be merged. To avoid that git automatically does merges during pulls, you can configure it to do rebases instead by running `git config pull.rebase true` inside the repository checkout. -* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#creating-changelog-fragments). (You must not include a fragment for new modules or new plugins, except for test and filter plugins. Also you shouldn't include one for docs-only changes. If you're not sure, simply don't include one, we'll tell you whether one is needed or not :) ) +* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#creating-changelog-fragments). (You must not include a fragment for new modules or new plugins. Also you shouldn't include one for docs-only changes. If you're not sure, simply don't include one, we'll tell you whether one is needed or not :) ) * Avoid reformatting unrelated parts of the codebase in your PR. These types of changes will likely be requested for reversion, create additional work for reviewers, and may cause approval to be delayed. You can also read [our Quick-start development guide](https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst). From b92542dea2bf542c95bc2f4b494276bda2a5d18f Mon Sep 17 00:00:00 2001 From: Bhavya <44067558+Bhavya06@users.noreply.github.com> Date: Wed, 18 Jan 2023 12:29:13 +0530 Subject: [PATCH 0424/2104] Minor changes to HPE iLO collection (#5804) * Minor changes to setting IPs of servers * Lint fix * Added change log * Update changelogs/fragments/5804-minor-changes-to-hpe-ilo-collection.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...04-minor-changes-to-hpe-ilo-collection.yml | 2 ++ plugins/module_utils/ilo_redfish_utils.py | 35 +++++++++---------- plugins/modules/ilo_redfish_config.py | 2 +- 3 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 changelogs/fragments/5804-minor-changes-to-hpe-ilo-collection.yml diff --git a/changelogs/fragments/5804-minor-changes-to-hpe-ilo-collection.yml b/changelogs/fragments/5804-minor-changes-to-hpe-ilo-collection.yml new file mode 100644 index 0000000000..b53bd9eecf --- /dev/null +++ b/changelogs/fragments/5804-minor-changes-to-hpe-ilo-collection.yml @@ -0,0 +1,2 @@ +minor_changes: + - ilo_redfish_utils module utils - change implementation of DNS Server IP and NTP Server IP update (https://github.com/ansible-collections/community.general/pull/5804). diff --git a/plugins/module_utils/ilo_redfish_utils.py b/plugins/module_utils/ilo_redfish_utils.py index 2d4d999cef..a6ab42dba6 100644 --- a/plugins/module_utils/ilo_redfish_utils.py +++ b/plugins/module_utils/ilo_redfish_utils.py @@ -85,17 +85,16 @@ class iLORedfishUtils(RedfishUtils): datetime_uri = self.manager_uri + "DateTime" - response = self.get_request(self.root_uri + datetime_uri) - if not response['ret']: - return response + listofips = mgr_attributes['mgr_attr_value'].split(" ") + if len(listofips) > 2: + return {'ret': False, 'changed': False, 'msg': "More than 2 NTP Servers mentioned"} - data = response['data'] + ntp_list = [] + for ips in listofips: + ntp_list.append(ips) - ntp_list = data[setkey] - if len(ntp_list) == 2: - ntp_list.pop(0) - - ntp_list.append(mgr_attributes['mgr_attr_value']) + while len(ntp_list) < 2: + ntp_list.append("0.0.0.0") payload = {setkey: ntp_list} @@ -137,18 +136,16 @@ class iLORedfishUtils(RedfishUtils): nic_info = self.get_manager_ethernet_uri() uri = nic_info["nic_addr"] - response = self.get_request(self.root_uri + uri) - if not response['ret']: - return response + listofips = attr['mgr_attr_value'].split(" ") + if len(listofips) > 3: + return {'ret': False, 'changed': False, 'msg': "More than 3 DNS Servers mentioned"} - data = response['data'] + dns_list = [] + for ips in listofips: + dns_list.append(ips) - dns_list = data["Oem"]["Hpe"]["IPv4"][key] - - if len(dns_list) == 3: - dns_list.pop(0) - - dns_list.append(attr['mgr_attr_value']) + while len(dns_list) < 3: + dns_list.append("0.0.0.0") payload = { "Oem": { diff --git a/plugins/modules/ilo_redfish_config.py b/plugins/modules/ilo_redfish_config.py index d13d10dfdc..1c68127fa4 100644 --- a/plugins/modules/ilo_redfish_config.py +++ b/plugins/modules/ilo_redfish_config.py @@ -125,7 +125,7 @@ def main(): password=dict(no_log=True), auth_token=dict(no_log=True), attribute_name=dict(required=True), - attribute_value=dict(), + attribute_value=dict(type='str'), timeout=dict(type='int', default=10) ), required_together=[ From a35b2eda4c7dec53677063cb183a89b1236af608 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:05:31 +1300 Subject: [PATCH 0425/2104] iptables_state: minor pythonisms (#5844) * iptables_state: minor pythonisms * add changelog fragment * fix typo --- .../5844-iptables-state-refactor.yml | 2 ++ plugins/modules/iptables_state.py | 20 +++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 changelogs/fragments/5844-iptables-state-refactor.yml diff --git a/changelogs/fragments/5844-iptables-state-refactor.yml b/changelogs/fragments/5844-iptables-state-refactor.yml new file mode 100644 index 0000000000..a69b88de24 --- /dev/null +++ b/changelogs/fragments/5844-iptables-state-refactor.yml @@ -0,0 +1,2 @@ +minor_changes: + - iptables_state - minor refactoring within the module (https://github.com/ansible-collections/community.general/pull/5844). diff --git a/plugins/modules/iptables_state.py b/plugins/modules/iptables_state.py index 1e94631c7f..17f8d9eb70 100644 --- a/plugins/modules/iptables_state.py +++ b/plugins/modules/iptables_state.py @@ -260,10 +260,7 @@ def read_state(b_path): ''' with open(b_path, 'r') as f: text = f.read() - lines = text.splitlines() - while '' in lines: - lines.remove('') - return lines + return [t for t in text.splitlines() if t != ''] def write_state(b_path, lines, changed): @@ -273,8 +270,7 @@ def write_state(b_path, lines, changed): # Populate a temporary file tmpfd, tmpfile = tempfile.mkstemp() with os.fdopen(tmpfd, 'w') as f: - for line in lines: - f.write('%s\n' % line) + f.write("{0}\n".format("\n".join(lines))) # Prepare to copy temporary file to the final destination if not os.path.exists(b_path): @@ -335,9 +331,7 @@ def filter_and_format_state(string): string = re.sub(r'((^|\n)# (Generated|Completed)[^\n]*) on [^\n]*', r'\1', string) if not module.params['counters']: string = re.sub(r'\[[0-9]+:[0-9]+\]', r'[0:0]', string) - lines = string.splitlines() - while '' in lines: - lines.remove('') + lines = [line for line in string.splitlines() if line != ''] return lines @@ -354,10 +348,7 @@ def per_table_state(command, state): dummy, out, dummy = module.run_command(COMMAND, check_rc=True) out = re.sub(r'(^|\n)(# Generated|# Completed|[*]%s|COMMIT)[^\n]*' % t, r'', out) out = re.sub(r' *\[[0-9]+:[0-9]+\] *', r'', out) - table = out.splitlines() - while '' in table: - table.remove('') - tables[t] = table + tables[t] = [tt for tt in out.splitlines() if tt != ''] return tables @@ -548,8 +539,7 @@ def main(): if module.check_mode: tmpfd, tmpfile = tempfile.mkstemp() with os.fdopen(tmpfd, 'w') as f: - for line in initial_state: - f.write('%s\n' % line) + f.write("{0}\n".format("\n".join(initial_state))) if filecmp.cmp(tmpfile, b_path): restored_state = initial_state From 1430ed000c704fb03f0ad65d25285c0921f012a0 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 19 Jan 2023 09:28:16 +1300 Subject: [PATCH 0426/2104] pipx: add testcase w/ env vars PIPX_xxxx (#5845) * pipx: add testcase w/ env vars PIPX_xxxx * add note to the docs about env vars * add note to the docs about env vars * Apply suggestions from code review * Update plugins/modules/pipx.py Co-authored-by: Felix Fontein * Update plugins/modules/pipx_info.py Co-authored-by: Felix Fontein * break long lines into smaller ones Co-authored-by: Felix Fontein --- plugins/modules/pipx.py | 3 +++ plugins/modules/pipx_info.py | 3 +++ tests/integration/targets/pipx/tasks/main.yml | 27 +++++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/plugins/modules/pipx.py b/plugins/modules/pipx.py index a94b7d8d03..773fbef8ea 100644 --- a/plugins/modules/pipx.py +++ b/plugins/modules/pipx.py @@ -95,6 +95,9 @@ options: notes: - This module does not install the C(pipx) python package, however that can be easily done with the module M(ansible.builtin.pip). - This module does not require C(pipx) to be in the shell C(PATH), but it must be loadable by Python as a module. + - > + This module will honor C(pipx) environment variables such as but not limited to C(PIPX_HOME) and C(PIPX_BIN_DIR) + passed using the R(environment Ansible keyword, playbooks_environment). - Please note that C(pipx) requires Python 3.6 or above. - > This first implementation does not verify whether a specified version constraint has been installed or not. diff --git a/plugins/modules/pipx_info.py b/plugins/modules/pipx_info.py index ff9698e31d..4487cdab5a 100644 --- a/plugins/modules/pipx_info.py +++ b/plugins/modules/pipx_info.py @@ -50,6 +50,9 @@ options: notes: - This module does not install the C(pipx) python package, however that can be easily done with the module M(ansible.builtin.pip). - This module does not require C(pipx) to be in the shell C(PATH), but it must be loadable by Python as a module. + - > + This module will honor C(pipx) environment variables such as but not limited to C(PIPX_HOME) and C(PIPX_BIN_DIR) + passed using the R(environment Ansible keyword, playbooks_environment). - Please note that C(pipx) requires Python 3.6 or above. - See also the C(pipx) documentation at U(https://pypa.github.io/pipx/). author: diff --git a/tests/integration/targets/pipx/tasks/main.yml b/tests/integration/targets/pipx/tasks/main.yml index 2318a59ba4..00f54aeb24 100644 --- a/tests/integration/targets/pipx/tasks/main.yml +++ b/tests/integration/targets/pipx/tasks/main.yml @@ -230,3 +230,30 @@ that: - install_jupyter is changed - '"ipython" in install_jupyter.stdout' + +############################################################################## +- name: ensure /opt/pipx + ansible.builtin.file: + path: /opt/pipx + state: directory + mode: 0755 + +- name: install tox site-wide + community.general.pipx: + name: tox + state: latest + register: install_tox_sitewide + environment: + PIPX_HOME: /opt/pipx + PIPX_BIN_DIR: /usr/local/bin + +- name: stat /usr/local/bin/tox + ansible.builtin.stat: + path: /usr/local/bin/tox + register: usrlocaltox + +- name: check assertions + ansible.builtin.assert: + that: + - install_tox_sitewide is changed + - usrlocaltox.stat.exists From c4b18361b990fac683e0438a154eeac23b38d590 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 18 Jan 2023 21:32:40 +0100 Subject: [PATCH 0427/2104] scaleway module utils: make function private that should be removed (#5499) * Make function private that should be removed (ref: #5497). * Maybe it works as a comment? * Try something else. * Ok, let's just add a comment. * Last try: docstring instead of comment. --- plugins/module_utils/scaleway.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/module_utils/scaleway.py b/plugins/module_utils/scaleway.py index a44c52aa78..43f2094800 100644 --- a/plugins/module_utils/scaleway.py +++ b/plugins/module_utils/scaleway.py @@ -84,6 +84,10 @@ def parse_pagination_link(header): def filter_sensitive_attributes(container, attributes): + ''' + WARNING: This function is effectively private, **do not use it**! + It will be removed or renamed once changing its name no longer triggers a pylint bug. + ''' for attr in attributes: container[attr] = "SENSITIVE_VALUE" From 59a9d34250aaf4bb213acf4ecda4ea91da1ae7ac Mon Sep 17 00:00:00 2001 From: Mike Moerk Date: Sun, 22 Jan 2023 09:10:36 -0700 Subject: [PATCH 0428/2104] Remote management modules for OCAPI-based devices. (#5754) * Remote management modules for OCAPI-based devices. Open Composable API (OCAPI) is a REST-based API designed for data center composability. For more information, see https://www.opencompute.org/documents/open-composable-api-for-ocp-2019-06-24-pdf This PR introduces ocapi_command and ocapi_info modules. These are based on the existing redfish_command and redfish_info modules and follow similar patterns. This initial implementation includes support for the folowing operations: - Indicator LED toggling - Power state toggling - Enclosure reset (reboot) - Firmware upload - Firmware update - Firmware activate - Job deletion - Job status These modules have been tested against Western Digital OpenFlex(tm) Data24 storage enclosures. API reference is at https://documents.westerndigital.com/content/dam/doc-library/en_us/assets/public/western-digital/product/platforms/openflex/reference-architecture-open-composable-api.pdf * Fix licensing issue for ocapi_utils.py * PR Feedback * Apply suggestions from code review Co-authored-by: Felix Fontein * Update plugins/module_utils/ocapi_utils.py Co-authored-by: Felix Fontein * Update plugins/modules/ocapi_info.py Co-authored-by: Felix Fontein * Apply suggestions from code review Co-authored-by: Felix Fontein * PR Feedback Use six module for urlparse * Apply suggestions from code review Documentation fixes. Co-authored-by: Felix Fontein * Fix sanity test line too long error. Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 4 + plugins/module_utils/ocapi_utils.py | 502 ++++++++++++++ plugins/modules/ocapi_command.py | 267 ++++++++ plugins/modules/ocapi_info.py | 221 ++++++ .../plugins/module_utils/test_ocapi_utils.py | 54 ++ .../plugins/modules/test_ocapi_command.py | 639 ++++++++++++++++++ tests/unit/plugins/modules/test_ocapi_info.py | 240 +++++++ 7 files changed, 1927 insertions(+) create mode 100644 plugins/module_utils/ocapi_utils.py create mode 100644 plugins/modules/ocapi_command.py create mode 100644 plugins/modules/ocapi_info.py create mode 100644 tests/unit/plugins/module_utils/test_ocapi_utils.py create mode 100644 tests/unit/plugins/modules/test_ocapi_command.py create mode 100644 tests/unit/plugins/modules/test_ocapi_info.py diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 047d537895..2051e34e0a 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -828,6 +828,10 @@ files: maintainers: shane-walker xcambar $modules/nsupdate.py: maintainers: nerzhul + $modules/ocapi_command.py: + maintainers: $team_wdc + $modules/ocapi_info.py: + maintainers: $team_wdc $modules/oci_vcn.py: maintainers: $team_oracle rohitChaware $modules/odbc.py: diff --git a/plugins/module_utils/ocapi_utils.py b/plugins/module_utils/ocapi_utils.py new file mode 100644 index 0000000000..acc2ceae49 --- /dev/null +++ b/plugins/module_utils/ocapi_utils.py @@ -0,0 +1,502 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2022 Western Digital Corporation +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +import json +import os +import uuid + +from ansible.module_utils.urls import open_url +from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.common.text.converters import to_text +from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError +from ansible.module_utils.six.moves.urllib.parse import urlparse + + +GET_HEADERS = {'accept': 'application/json'} +PUT_HEADERS = {'content-type': 'application/json', 'accept': 'application/json'} +POST_HEADERS = {'content-type': 'application/json', 'accept': 'application/json'} +DELETE_HEADERS = {'accept': 'application/json'} + +HEALTH_OK = 5 + + +class OcapiUtils(object): + + def __init__(self, creds, base_uri, proxy_slot_number, timeout, module): + self.root_uri = base_uri + self.proxy_slot_number = proxy_slot_number + self.creds = creds + self.timeout = timeout + self.module = module + + def _auth_params(self): + """ + Return tuple of required authentication params based on the username and password. + + :return: tuple of username, password + """ + username = self.creds['user'] + password = self.creds['pswd'] + force_basic_auth = True + return username, password, force_basic_auth + + def get_request(self, uri): + req_headers = dict(GET_HEADERS) + username, password, basic_auth = self._auth_params() + try: + resp = open_url(uri, method="GET", headers=req_headers, + url_username=username, url_password=password, + force_basic_auth=basic_auth, validate_certs=False, + follow_redirects='all', + use_proxy=True, timeout=self.timeout) + data = json.loads(to_native(resp.read())) + headers = dict((k.lower(), v) for (k, v) in resp.info().items()) + except HTTPError as e: + return {'ret': False, + 'msg': "HTTP Error %s on GET request to '%s'" + % (e.code, uri), + 'status': e.code} + except URLError as e: + return {'ret': False, 'msg': "URL Error on GET request to '%s': '%s'" + % (uri, e.reason)} + # Almost all errors should be caught above, but just in case + except Exception as e: + return {'ret': False, + 'msg': "Failed GET request to '%s': '%s'" % (uri, to_text(e))} + return {'ret': True, 'data': data, 'headers': headers} + + def delete_request(self, uri, etag=None): + req_headers = dict(DELETE_HEADERS) + if etag is not None: + req_headers['If-Match'] = etag + username, password, basic_auth = self._auth_params() + try: + resp = open_url(uri, method="DELETE", headers=req_headers, + url_username=username, url_password=password, + force_basic_auth=basic_auth, validate_certs=False, + follow_redirects='all', + use_proxy=True, timeout=self.timeout) + if resp.status != 204: + data = json.loads(to_native(resp.read())) + else: + data = "" + headers = dict((k.lower(), v) for (k, v) in resp.info().items()) + except HTTPError as e: + return {'ret': False, + 'msg': "HTTP Error %s on DELETE request to '%s'" + % (e.code, uri), + 'status': e.code} + except URLError as e: + return {'ret': False, 'msg': "URL Error on DELETE request to '%s': '%s'" + % (uri, e.reason)} + # Almost all errors should be caught above, but just in case + except Exception as e: + return {'ret': False, + 'msg': "Failed DELETE request to '%s': '%s'" % (uri, to_text(e))} + return {'ret': True, 'data': data, 'headers': headers} + + def put_request(self, uri, payload, etag=None): + req_headers = dict(PUT_HEADERS) + if etag is not None: + req_headers['If-Match'] = etag + username, password, basic_auth = self._auth_params() + try: + resp = open_url(uri, data=json.dumps(payload), + headers=req_headers, method="PUT", + url_username=username, url_password=password, + force_basic_auth=basic_auth, validate_certs=False, + follow_redirects='all', + use_proxy=True, timeout=self.timeout) + headers = dict((k.lower(), v) for (k, v) in resp.info().items()) + except HTTPError as e: + return {'ret': False, + 'msg': "HTTP Error %s on PUT request to '%s'" + % (e.code, uri), + 'status': e.code} + except URLError as e: + return {'ret': False, 'msg': "URL Error on PUT request to '%s': '%s'" + % (uri, e.reason)} + # Almost all errors should be caught above, but just in case + except Exception as e: + return {'ret': False, + 'msg': "Failed PUT request to '%s': '%s'" % (uri, to_text(e))} + return {'ret': True, 'headers': headers, 'resp': resp} + + def post_request(self, uri, payload, content_type="application/json", timeout=None): + req_headers = dict(POST_HEADERS) + if content_type != "application/json": + req_headers["content-type"] = content_type + username, password, basic_auth = self._auth_params() + if content_type == "application/json": + request_data = json.dumps(payload) + else: + request_data = payload + try: + resp = open_url(uri, data=request_data, + headers=req_headers, method="POST", + url_username=username, url_password=password, + force_basic_auth=basic_auth, validate_certs=False, + follow_redirects='all', + use_proxy=True, timeout=self.timeout if timeout is None else timeout) + headers = dict((k.lower(), v) for (k, v) in resp.info().items()) + except HTTPError as e: + return {'ret': False, + 'msg': "HTTP Error %s on POST request to '%s'" + % (e.code, uri), + 'status': e.code} + except URLError as e: + return {'ret': False, 'msg': "URL Error on POST request to '%s': '%s'" + % (uri, e.reason)} + # Almost all errors should be caught above, but just in case + except Exception as e: + return {'ret': False, + 'msg': "Failed POST request to '%s': '%s'" % (uri, to_text(e))} + return {'ret': True, 'headers': headers, 'resp': resp} + + def get_uri_with_slot_number_query_param(self, uri): + """Return the URI with proxy slot number added as a query param, if there is one. + + If a proxy slot number is provided, to access it, we must append it as a query parameter. + This method returns the given URI with the slotnumber query param added, if there is one. + If there is not a proxy slot number, it just returns the URI as it was passed in. + """ + if self.proxy_slot_number is not None: + parsed_url = urlparse(uri) + return parsed_url._replace(query="slotnumber=" + str(self.proxy_slot_number)).geturl() + else: + return uri + + def manage_system_power(self, command): + """Process a command to manage the system power. + + :param str command: The Ansible command being processed. + """ + if command == "PowerGracefulRestart": + resource_uri = self.root_uri + resource_uri = self.get_uri_with_slot_number_query_param(resource_uri) + + # Get the resource so that we have the Etag + response = self.get_request(resource_uri) + if 'etag' not in response['headers']: + return {'ret': False, 'msg': 'Etag not found in response.'} + etag = response['headers']['etag'] + if response['ret'] is False: + return response + + # Issue the PUT to do the reboot (unless we are in check mode) + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + payload = {'Reboot': True} + response = self.put_request(resource_uri, payload, etag) + if response['ret'] is False: + return response + elif command.startswith("PowerMode"): + return self.manage_power_mode(command) + else: + return {'ret': False, 'msg': 'Invalid command: ' + command} + + return {'ret': True} + + def manage_chassis_indicator_led(self, command): + """Process a command to manage the chassis indicator LED. + + :param string command: The Ansible command being processed. + """ + return self.manage_indicator_led(command, self.root_uri) + + def manage_indicator_led(self, command, resource_uri=None): + """Process a command to manage an indicator LED. + + :param string command: The Ansible command being processed. + :param string resource_uri: URI of the resource whose indicator LED is being managed. + """ + key = "IndicatorLED" + if resource_uri is None: + resource_uri = self.root_uri + resource_uri = self.get_uri_with_slot_number_query_param(resource_uri) + + payloads = { + 'IndicatorLedOn': { + 'ID': 2 + }, + 'IndicatorLedOff': { + 'ID': 4 + } + } + + response = self.get_request(resource_uri) + if 'etag' not in response['headers']: + return {'ret': False, 'msg': 'Etag not found in response.'} + etag = response['headers']['etag'] + if response['ret'] is False: + return response + data = response['data'] + if key not in data: + return {'ret': False, 'msg': "Key %s not found" % key} + if 'ID' not in data[key]: + return {'ret': False, 'msg': 'IndicatorLED for resource has no ID.'} + + if command in payloads.keys(): + # See if the LED is already set as requested. + current_led_status = data[key]['ID'] + if current_led_status == payloads[command]['ID']: + return {'ret': True, 'changed': False} + + # Set the LED (unless we are in check mode) + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + payload = {'IndicatorLED': payloads[command]} + response = self.put_request(resource_uri, payload, etag) + if response['ret'] is False: + return response + else: + return {'ret': False, 'msg': 'Invalid command'} + + return {'ret': True} + + def manage_power_mode(self, command): + key = "PowerState" + resource_uri = self.get_uri_with_slot_number_query_param(self.root_uri) + + payloads = { + "PowerModeNormal": 2, + "PowerModeLow": 4 + } + + response = self.get_request(resource_uri) + if 'etag' not in response['headers']: + return {'ret': False, 'msg': 'Etag not found in response.'} + etag = response['headers']['etag'] + if response['ret'] is False: + return response + data = response['data'] + if key not in data: + return {'ret': False, 'msg': "Key %s not found" % key} + if 'ID' not in data[key]: + return {'ret': False, 'msg': 'PowerState for resource has no ID.'} + + if command in payloads.keys(): + # See if the PowerState is already set as requested. + current_power_state = data[key]['ID'] + if current_power_state == payloads[command]: + return {'ret': True, 'changed': False} + + # Set the Power State (unless we are in check mode) + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + payload = {'PowerState': {"ID": payloads[command]}} + response = self.put_request(resource_uri, payload, etag) + if response['ret'] is False: + return response + else: + return {'ret': False, 'msg': 'Invalid command: ' + command} + + return {'ret': True} + + def prepare_multipart_firmware_upload(self, filename): + """Prepare a multipart/form-data body for OCAPI firmware upload. + + :arg filename: The name of the file to upload. + :returns: tuple of (content_type, body) where ``content_type`` is + the ``multipart/form-data`` ``Content-Type`` header including + ``boundary`` and ``body`` is the prepared bytestring body + + Prepares the body to include "FirmwareFile" field with the contents of the file. + Because some OCAPI targets do not support Base-64 encoding for multipart/form-data, + this method sends the file as binary. + """ + boundary = str(uuid.uuid4()) # Generate a random boundary + body = "--" + boundary + '\r\n' + body += 'Content-Disposition: form-data; name="FirmwareFile"; filename="%s"\r\n' % to_native(os.path.basename(filename)) + body += 'Content-Type: application/octet-stream\r\n\r\n' + body_bytes = bytearray(body, 'utf-8') + with open(filename, 'rb') as f: + body_bytes += f.read() + body_bytes += bytearray("\r\n--%s--" % boundary, 'utf-8') + return ("multipart/form-data; boundary=%s" % boundary, + body_bytes) + + def upload_firmware_image(self, update_image_path): + """Perform Firmware Upload to the OCAPI storage device. + + :param str update_image_path: The path/filename of the firmware image, on the local filesystem. + """ + if not (os.path.exists(update_image_path) and os.path.isfile(update_image_path)): + return {'ret': False, 'msg': 'File does not exist.'} + url = self.root_uri + "OperatingSystem" + url = self.get_uri_with_slot_number_query_param(url) + content_type, b_form_data = self.prepare_multipart_firmware_upload(update_image_path) + + # Post the firmware (unless we are in check mode) + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + result = self.post_request(url, b_form_data, content_type=content_type, timeout=300) + if result['ret'] is False: + return result + return {'ret': True} + + def update_firmware_image(self): + """Perform a Firmware Update on the OCAPI storage device.""" + resource_uri = self.root_uri + resource_uri = self.get_uri_with_slot_number_query_param(resource_uri) + # We have to do a GET to obtain the Etag. It's required on the PUT. + response = self.get_request(resource_uri) + if response['ret'] is False: + return response + if 'etag' not in response['headers']: + return {'ret': False, 'msg': 'Etag not found in response.'} + etag = response['headers']['etag'] + + # Issue the PUT (unless we are in check mode) + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + payload = {'FirmwareUpdate': True} + response = self.put_request(resource_uri, payload, etag) + if response['ret'] is False: + return response + + return {'ret': True, 'jobUri': response["headers"]["location"]} + + def activate_firmware_image(self): + """Perform a Firmware Activate on the OCAPI storage device.""" + resource_uri = self.root_uri + resource_uri = self.get_uri_with_slot_number_query_param(resource_uri) + # We have to do a GET to obtain the Etag. It's required on the PUT. + response = self.get_request(resource_uri) + if 'etag' not in response['headers']: + return {'ret': False, 'msg': 'Etag not found in response.'} + etag = response['headers']['etag'] + if response['ret'] is False: + return response + + # Issue the PUT (unless we are in check mode) + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + payload = {'FirmwareActivate': True} + response = self.put_request(resource_uri, payload, etag) + if response['ret'] is False: + return response + + return {'ret': True, 'jobUri': response["headers"]["location"]} + + def get_job_status(self, job_uri): + """Get the status of a job. + + :param str job_uri: The URI of the job's status monitor. + """ + job_uri = self.get_uri_with_slot_number_query_param(job_uri) + response = self.get_request(job_uri) + if response['ret'] is False: + if response.get('status') == 404: + # Job not found -- assume 0% + return { + "ret": True, + "percentComplete": 0, + "operationStatus": "Not Available", + "operationStatusId": 1, + "operationHealth": None, + "operationHealthId": None, + "details": "Job does not exist.", + "jobExists": False + } + else: + return response + details = response["data"]["Status"].get("Details") + if type(details) is str: + details = [details] + health_list = response["data"]["Status"]["Health"] + return_value = { + "ret": True, + "percentComplete": response["data"]["PercentComplete"], + "operationStatus": response["data"]["Status"]["State"]["Name"], + "operationStatusId": response["data"]["Status"]["State"]["ID"], + "operationHealth": health_list[0]["Name"] if len(health_list) > 0 else None, + "operationHealthId": health_list[0]["ID"] if len(health_list) > 0 else None, + "details": details, + "jobExists": True + } + return return_value + + def delete_job(self, job_uri): + """Delete the OCAPI job referenced by the specified job_uri.""" + job_uri = self.get_uri_with_slot_number_query_param(job_uri) + # We have to do a GET to obtain the Etag. It's required on the DELETE. + response = self.get_request(job_uri) + + if response['ret'] is True: + if 'etag' not in response['headers']: + return {'ret': False, 'msg': 'Etag not found in response.'} + else: + etag = response['headers']['etag'] + + if response['data']['PercentComplete'] != 100: + return { + 'ret': False, + 'changed': False, + 'msg': 'Cannot delete job because it is in progress.' + } + + if response['ret'] is False: + if response['status'] == 404: + return { + 'ret': True, + 'changed': False, + 'msg': 'Job already deleted.' + } + return response + if self.module.check_mode: + return { + 'ret': True, + 'changed': True, + 'msg': 'Update not performed in check mode.' + } + + # Do the DELETE (unless we are in check mode) + response = self.delete_request(job_uri, etag) + if response['ret'] is False: + if response['status'] == 404: + return { + 'ret': True, + 'changed': False + } + elif response['status'] == 409: + return { + 'ret': False, + 'changed': False, + 'msg': 'Cannot delete job because it is in progress.' + } + return response + return { + 'ret': True, + 'changed': True + } diff --git a/plugins/modules/ocapi_command.py b/plugins/modules/ocapi_command.py new file mode 100644 index 0000000000..7d8fca8064 --- /dev/null +++ b/plugins/modules/ocapi_command.py @@ -0,0 +1,267 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022 Western Digital Corporation +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ocapi_command +version_added: 6.3.0 +short_description: Manages Out-Of-Band controllers using Open Composable API (OCAPI) +description: + - Builds OCAPI URIs locally and sends them to remote OOB controllers to + perform an action. + - Manages OOB controller such as Indicator LED, Reboot, Power Mode, Firmware Update. +options: + category: + required: true + description: + - Category to execute on OOB controller. + type: str + command: + required: true + description: + - Command to execute on OOB controller. + type: str + baseuri: + required: true + description: + - Base URI of OOB controller. + type: str + proxy_slot_number: + description: For proxied inband requests, the slot number of the IOM. Only applies if I(baseuri) is a proxy server. + type: int + update_image_path: + required: false + description: + - For C(FWUpload), the path on the local filesystem of the firmware update image. + type: str + job_name: + required: false + description: + - For C(DeleteJob) command, the name of the job to delete. + type: str + username: + required: true + description: + - Username for authenticating to OOB controller. + type: str + password: + required: true + description: + - Password for authenticating to OOB controller. + type: str + timeout: + description: + - Timeout in seconds for URL requests to OOB controller. + default: 10 + type: int + +author: "Mike Moerk (@mikemoerk)" +''' + +EXAMPLES = ''' + - name: Set the power state to low + community.general.ocapi_command: + category: Chassis + command: PowerModeLow + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + + - name: Set the power state to normal + community.general.ocapi_command: + category: Chassis + command: PowerModeNormal + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + - name: Set chassis indicator LED to on + community.general.ocapi_command: + category: Chassis + command: IndicatorLedOn + baseuri: "{{ baseuri }}" + proxy_slot_number: 2 + username: "{{ username }}" + password: "{{ password }}" + - name: Set chassis indicator LED to off + community.general.ocapi_command: + category: Chassis + command: IndicatorLedOff + baseuri: "{{ baseuri }}" + proxy_slot_number: 2 + username: "{{ username }}" + password: "{{ password }}" + - name: Reset Enclosure + community.general.ocapi_command: + category: Systems + command: PowerGracefulRestart + baseuri: "{{ baseuri }}" + proxy_slot_number: 2 + username: "{{ username }}" + password: "{{ password }}" + - name: Firmware Upload + community.general.ocapi_command: + category: Update + command: FWUpload + baseuri: "iom1.wdc.com" + proxy_slot_number: 2 + username: "{{ username }}" + password: "{{ password }}" + update_image_path: "/path/to/firmware.tar.gz" + - name: Firmware Update + community.general.ocapi_command: + category: Update + command: FWUpdate + baseuri: "iom1.wdc.com" + proxy_slot_number: 2 + username: "{{ username }}" + password: "{{ password }}" + - name: Firmware Activate + community.general.ocapi_command: + category: Update + command: FWActivate + baseuri: "iom1.wdc.com" + proxy_slot_number: 2 + username: "{{ username }}" + password: "{{ password }}" + - name: Delete Job + community.general.ocapi_command: + category: Jobs + command: DeleteJob + job_name: FirmwareUpdate + baseuri: "{{ baseuri }}" + proxy_slot_number: 2 + username: "{{ username }}" + password: "{{ password }}" +''' + +RETURN = ''' +msg: + description: Message with action result or error description. + returned: always + type: str + sample: "Action was successful" + +jobUri: + description: URI to use to monitor status of the operation. Returned for async commands such as Firmware Update, Firmware Activate. + returned: when supported + type: str + sample: "https://ioma.wdc.com/Storage/Devices/openflex-data24-usalp03020qb0003/Jobs/FirmwareUpdate/" + +operationStatusId: + description: OCAPI State ID (see OCAPI documentation for possible values). + returned: when supported + type: int + sample: 2 + +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.ocapi_utils import OcapiUtils +from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.six.moves.urllib.parse import quote_plus, urljoin + +# More will be added as module features are expanded +CATEGORY_COMMANDS_ALL = { + "Chassis": ["IndicatorLedOn", "IndicatorLedOff", "PowerModeLow", "PowerModeNormal"], + "Systems": ["PowerGracefulRestart"], + "Update": ["FWUpload", "FWUpdate", "FWActivate"], + "Jobs": ["DeleteJob"] +} + + +def main(): + result = {} + module = AnsibleModule( + argument_spec=dict( + category=dict(required=True), + command=dict(required=True, type='str'), + job_name=dict(type='str'), + baseuri=dict(required=True, type='str'), + proxy_slot_number=dict(type='int'), + update_image_path=dict(type='str'), + username=dict(required=True), + password=dict(required=True, no_log=True), + timeout=dict(type='int', default=10) + ), + supports_check_mode=True + ) + + category = module.params['category'] + command = module.params['command'] + + # admin credentials used for authentication + creds = { + 'user': module.params['username'], + 'pswd': module.params['password'] + } + + # timeout + timeout = module.params['timeout'] + + base_uri = "https://" + module.params["baseuri"] + proxy_slot_number = module.params.get("proxy_slot_number") + ocapi_utils = OcapiUtils(creds, base_uri, proxy_slot_number, timeout, module) + + # Check that Category is valid + if category not in CATEGORY_COMMANDS_ALL: + module.fail_json(msg=to_native("Invalid Category '%s'. Valid Categories = %s" % (category, list(CATEGORY_COMMANDS_ALL.keys())))) + + # Check that the command is valid + if command not in CATEGORY_COMMANDS_ALL[category]: + module.fail_json(msg=to_native("Invalid Command '%s'. Valid Commands = %s" % (command, CATEGORY_COMMANDS_ALL[category]))) + + # Organize by Categories / Commands + if category == "Chassis": + if command.startswith("IndicatorLed"): + result = ocapi_utils.manage_chassis_indicator_led(command) + elif command.startswith("PowerMode"): + result = ocapi_utils.manage_system_power(command) + elif category == "Systems": + if command.startswith("Power"): + result = ocapi_utils.manage_system_power(command) + elif category == "Update": + if command == "FWUpload": + update_image_path = module.params.get("update_image_path") + if update_image_path is None: + module.fail_json(msg=to_native("Missing update_image_path.")) + result = ocapi_utils.upload_firmware_image(update_image_path) + elif command == "FWUpdate": + result = ocapi_utils.update_firmware_image() + elif command == "FWActivate": + result = ocapi_utils.activate_firmware_image() + elif category == "Jobs": + if command == "DeleteJob": + job_name = module.params.get("job_name") + if job_name is None: + module.fail_json("Missing job_name") + job_uri = urljoin(base_uri, "Jobs/" + job_name) + result = ocapi_utils.delete_job(job_uri) + + if result['ret'] is False: + module.fail_json(msg=to_native(result['msg'])) + else: + del result['ret'] + changed = result.get('changed', True) + session = result.get('session', dict()) + kwargs = { + "changed": changed, + "session": session, + "msg": "Action was successful." if not module.check_mode else result.get( + "msg", "No action performed in check mode." + ) + } + result_keys = [result_key for result_key in result if result_key not in kwargs] + for result_key in result_keys: + kwargs[result_key] = result[result_key] + module.exit_json(**kwargs) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ocapi_info.py b/plugins/modules/ocapi_info.py new file mode 100644 index 0000000000..c827b4522d --- /dev/null +++ b/plugins/modules/ocapi_info.py @@ -0,0 +1,221 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2022 Western Digital Corporation +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + + +DOCUMENTATION = ''' +--- +module: ocapi_info +version_added: 6.3.0 +short_description: Manages Out-Of-Band controllers using Open Composable API (OCAPI) +description: + - Builds OCAPI URIs locally and sends them to remote OOB controllers to + get information back. +options: + category: + required: true + description: + - Category to execute on OOB controller. + type: str + command: + required: true + description: + - Command to execute on OOB controller. + type: str + baseuri: + required: true + description: + - Base URI of OOB controller. + type: str + proxy_slot_number: + description: For proxied inband requests, the slot number of the IOM. Only applies if I(baseuri) is a proxy server. + type: int + username: + required: true + description: + - Username for authenticating to OOB controller. + type: str + password: + required: true + description: + - Password for authenticating to OOB controller. + type: str + timeout: + description: + - Timeout in seconds for URL requests to OOB controller. + default: 10 + type: int + job_name: + description: + - Name of job for fetching status. + type: str + + +author: "Mike Moerk (@mikemoerk)" +''' + +EXAMPLES = ''' + - name: Get job status + community.general.ocapi_info: + category: Status + command: JobStatus + baseuri: "http://iom1.wdc.com" + jobName: FirmwareUpdate + username: "{{ username }}" + password: "{{ password }}" +''' + +RETURN = ''' +msg: + description: Message with action result or error description. + returned: always + type: str + sample: "Action was successful" + +percentComplete: + description: Percent complete of the relevant operation. Applies to C(JobStatus) command. + returned: when supported + type: int + sample: 99 + +operationStatus: + description: Status of the relevant operation. Applies to C(JobStatus) command. See OCAPI documentation for details. + returned: when supported + type: str + sample: "Activate needed" + +operationStatusId: + description: Integer value of status (corresponds to operationStatus). Applies to C(JobStatus) command. See OCAPI documentation for details. + returned: when supported + type: int + sample: 65540 + +operationHealth: + description: Health of the operation. Applies to C(JobStatus) command. See OCAPI documentation for details. + returned: when supported + type: str + sample: "OK" + +operationHealthId: + description: > + Integer value for health of the operation (corresponds to C(operationHealth)). Applies to C(JobStatus) command. + See OCAPI documentation for details. + returned: when supported + type: str + sample: "OK" + +details: + description: Details of the relevant operation. Applies to C(JobStatus) command. + returned: when supported + type: list + elements: str + +status: + description: Dict containing status information. See OCAPI documentation for details. + returned: when supported + type: dict + sample: { + "Details": [ + "None" + ], + "Health": [ + { + "ID": 5, + "Name": "OK" + } + ], + "State": { + "ID": 16, + "Name": "In service" + } + } +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.ocapi_utils import OcapiUtils +from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.six.moves.urllib.parse import quote_plus, urljoin + +# More will be added as module features are expanded +CATEGORY_COMMANDS_ALL = { + "Jobs": ["JobStatus"] +} + + +def main(): + result = {} + module = AnsibleModule( + argument_spec=dict( + category=dict(required=True), + command=dict(required=True, type='str'), + job_name=dict(type='str'), + baseuri=dict(required=True, type='str'), + proxy_slot_number=dict(type='int'), + username=dict(required=True), + password=dict(required=True, no_log=True), + timeout=dict(type='int', default=10) + ), + supports_check_mode=True + ) + + category = module.params['category'] + command = module.params['command'] + + # admin credentials used for authentication + creds = { + 'user': module.params['username'], + 'pswd': module.params['password'] + } + + # timeout + timeout = module.params['timeout'] + + base_uri = "https://" + module.params["baseuri"] + proxy_slot_number = module.params.get("proxy_slot_number") + ocapi_utils = OcapiUtils(creds, base_uri, proxy_slot_number, timeout, module) + + # Check that Category is valid + if category not in CATEGORY_COMMANDS_ALL: + module.fail_json(msg=to_native("Invalid Category '%s'. Valid Categories = %s" % (category, list(CATEGORY_COMMANDS_ALL.keys())))) + + # Check that the command is valid + if command not in CATEGORY_COMMANDS_ALL[category]: + module.fail_json(msg=to_native("Invalid Command '%s'. Valid Commands = %s" % (command, CATEGORY_COMMANDS_ALL[category]))) + + # Organize by Categories / Commands + if category == "Jobs": + if command == "JobStatus": + if module.params.get("job_name") is None: + module.fail_json(msg=to_native( + "job_name required for JobStatus command.")) + job_uri = urljoin(base_uri, 'Jobs/' + module.params["job_name"]) + result = ocapi_utils.get_job_status(job_uri) + + if result['ret'] is False: + module.fail_json(msg=to_native(result['msg'])) + else: + del result['ret'] + changed = False + session = result.get('session', dict()) + kwargs = { + "changed": changed, + "session": session, + "msg": "Action was successful." if not module.check_mode else result.get( + "msg", "No action performed in check mode." + ) + } + result_keys = [result_key for result_key in result if result_key not in kwargs] + for result_key in result_keys: + kwargs[result_key] = result[result_key] + module.exit_json(**kwargs) + + +if __name__ == '__main__': + main() diff --git a/tests/unit/plugins/module_utils/test_ocapi_utils.py b/tests/unit/plugins/module_utils/test_ocapi_utils.py new file mode 100644 index 0000000000..3c939b5586 --- /dev/null +++ b/tests/unit/plugins/module_utils/test_ocapi_utils.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Ansible project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import re +import shutil +import tempfile + +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.general.plugins.module_utils.ocapi_utils import OcapiUtils + + +class TestOcapiUtils(unittest.TestCase): + def setUp(self): + self.tempdir = tempfile.mkdtemp() + self.utils = OcapiUtils(creds={"user": "a_user", "pswd": "a_password"}, + base_uri="fakeUri", + proxy_slot_number=None, + timeout=30, + module=None) + + def tearDown(self): + shutil.rmtree(self.tempdir) + + def test_prepare_multipart_firmware_upload(self): + # Generate a binary file and save it + filename = "fake_firmware.bin" + filepath = os.path.join(self.tempdir, filename) + file_contents = b'\x00\x01\x02\x03\x04' + with open(filepath, 'wb+') as f: + f.write(file_contents) + + # Call prepare_mutipart_firmware_upload + content_type, b_form_data = self.utils.prepare_multipart_firmware_upload(filepath) + + # Check the returned content-type + content_type_pattern = r"multipart/form-data; boundary=(.*)" + m = re.match(content_type_pattern, content_type) + self.assertIsNotNone(m) + + # Check the returned binary data + boundary = m.group(1) + expected_content_text = '--%s\r\n' % boundary + expected_content_text += 'Content-Disposition: form-data; name="FirmwareFile"; filename="%s"\r\n' % filename + expected_content_text += 'Content-Type: application/octet-stream\r\n\r\n' + expected_content_bytes = bytearray(expected_content_text, 'utf-8') + expected_content_bytes += file_contents + expected_content_bytes += bytearray('\r\n--%s--' % boundary, 'utf-8') + self.assertEqual(expected_content_bytes, b_form_data) diff --git a/tests/unit/plugins/modules/test_ocapi_command.py b/tests/unit/plugins/modules/test_ocapi_command.py new file mode 100644 index 0000000000..031fb9dd09 --- /dev/null +++ b/tests/unit/plugins/modules/test_ocapi_command.py @@ -0,0 +1,639 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Ansible project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import shutil +import tempfile + +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible.module_utils import basic +import ansible_collections.community.general.plugins.modules.ocapi_command as module +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson +from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json +from ansible.module_utils.six.moves.urllib.parse import quote_plus, urljoin + + +MOCK_BASE_URI = "mockBaseUri/" +OPERATING_SYSTEM_URI = "OperatingSystem" +MOCK_JOB_NAME = "MockJob" + +ACTION_WAS_SUCCESSFUL = "Action was successful." +UPDATE_NOT_PERFORMED_IN_CHECK_MODE = "Update not performed in check mode." +NO_ACTION_PERFORMED_IN_CHECK_MODE = "No action performed in check mode." + +MOCK_SUCCESSFUL_HTTP_RESPONSE_LED_INDICATOR_OFF_WITH_ETAG = { + "ret": True, + "data": { + "IndicatorLED": { + "ID": 4, + "Name": "Off" + }, + "PowerState": { + "ID": 2, + "Name": "On" + } + }, + "headers": {"etag": "MockETag"} +} + +MOCK_SUCCESSFUL_HTTP_RESPONSE = { + "ret": True, + "data": {} +} + +MOCK_404_RESPONSE = { + "ret": False, + "status": 404 +} + +MOCK_SUCCESSFUL_HTTP_RESPONSE_WITH_LOCATION_HEADER = { + "ret": True, + "data": {}, + "headers": {"location": "mock_location"} +} + +MOCK_HTTP_RESPONSE_CONFLICT = { + "ret": False, + "msg": "Conflict", + "status": 409 +} + +MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS = { + "ret": True, + "data": { + "PercentComplete": 99 + }, + "headers": { + "etag": "12345" + } +} + +MOCK_HTTP_RESPONSE_JOB_COMPLETE = { + "ret": True, + "data": { + "PercentComplete": 100 + }, + "headers": { + "etag": "12345" + } +} + + +def get_bin_path(self, arg, required=False): + """Mock AnsibleModule.get_bin_path""" + return arg + + +def get_exception_message(ansible_exit_json): + """From an AnsibleExitJson exception, get the message string.""" + return ansible_exit_json.exception.args[0]["msg"] + + +def is_changed(ansible_exit_json): + """From an AnsibleExitJson exception, return the value of the changed flag""" + return ansible_exit_json.exception.args[0]["changed"] + + +def mock_get_request(*args, **kwargs): + """Mock for get_request.""" + url = args[1] + if url == 'https://' + MOCK_BASE_URI: + return MOCK_SUCCESSFUL_HTTP_RESPONSE_LED_INDICATOR_OFF_WITH_ETAG + elif url == "mock_location": + return MOCK_SUCCESSFUL_HTTP_RESPONSE + raise RuntimeError("Illegal call to get_request in test: " + args[1]) + + +def mock_get_request_job_does_not_exist(*args, **kwargs): + """Mock for get_request.""" + url = args[1] + if url == 'https://' + MOCK_BASE_URI: + return MOCK_SUCCESSFUL_HTTP_RESPONSE_LED_INDICATOR_OFF_WITH_ETAG + elif url == urljoin('https://' + MOCK_BASE_URI, "Jobs/" + MOCK_JOB_NAME): + return MOCK_404_RESPONSE + raise RuntimeError("Illegal call to get_request in test: " + args[1]) + + +def mock_get_request_job_in_progress(*args, **kwargs): + url = args[1] + if url == 'https://' + MOCK_BASE_URI: + return MOCK_SUCCESSFUL_HTTP_RESPONSE_LED_INDICATOR_OFF_WITH_ETAG + elif url == urljoin('https://' + MOCK_BASE_URI, "Jobs/" + MOCK_JOB_NAME): + return MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS + raise RuntimeError("Illegal call to get_request in test: " + args[1]) + + +def mock_get_request_job_complete(*args, **kwargs): + url = args[1] + if url == 'https://' + MOCK_BASE_URI: + return MOCK_SUCCESSFUL_HTTP_RESPONSE_LED_INDICATOR_OFF_WITH_ETAG + elif url == urljoin('https://' + MOCK_BASE_URI, "Jobs/" + MOCK_JOB_NAME): + return MOCK_HTTP_RESPONSE_JOB_COMPLETE + raise RuntimeError("Illegal call to get_request in test: " + args[1]) + + +def mock_put_request(*args, **kwargs): + """Mock put_request.""" + url = args[1] + if url == 'https://' + MOCK_BASE_URI: + return MOCK_SUCCESSFUL_HTTP_RESPONSE_WITH_LOCATION_HEADER + raise RuntimeError("Illegal PUT call to: " + args[1]) + + +def mock_delete_request(*args, **kwargs): + """Mock delete request.""" + url = args[1] + if url == urljoin('https://' + MOCK_BASE_URI, 'Jobs/' + MOCK_JOB_NAME): + return MOCK_SUCCESSFUL_HTTP_RESPONSE + raise RuntimeError("Illegal DELETE call to: " + args[1]) + + +def mock_post_request(*args, **kwargs): + """Mock post_request.""" + url = args[1] + if url == urljoin('https://' + MOCK_BASE_URI, OPERATING_SYSTEM_URI): + return MOCK_SUCCESSFUL_HTTP_RESPONSE + raise RuntimeError("Illegal POST call to: " + args[1]) + + +def mock_http_request_conflict(*args, **kwargs): + """Mock to make an HTTP request return 409 Conflict""" + return MOCK_HTTP_RESPONSE_CONFLICT + + +def mock_invalid_http_request(*args, **kwargs): + """Mock to make an HTTP request invalid. Raises an exception.""" + raise RuntimeError("Illegal HTTP call to " + args[1]) + + +class TestOcapiCommand(unittest.TestCase): + + def setUp(self): + self.mock_module_helper = patch.multiple(basic.AnsibleModule, + exit_json=exit_json, + fail_json=fail_json, + get_bin_path=get_bin_path) + self.mock_module_helper.start() + self.addCleanup(self.mock_module_helper.stop) + self.tempdir = tempfile.mkdtemp() + + def tearDown(self): + shutil.rmtree(self.tempdir) + + def test_module_fail_when_required_args_missing(self): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({}) + module.main() + self.assertIn("missing required arguments:", get_exception_message(ansible_fail_json)) + + def test_module_fail_when_unknown_category(self): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'unknown', + 'command': 'IndicatorLedOn', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'baseuri': MOCK_BASE_URI + }) + module.main() + self.assertIn("Invalid Category 'unknown", get_exception_message(ansible_fail_json)) + + def test_set_power_mode(self): + """Test that we can set chassis power mode""" + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'PowerModeLow', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_set_chassis_led_indicator(self): + """Test that we can set chassis LED indicator.""" + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'IndicatorLedOn', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_set_power_mode_already_set(self): + """Test that if we set Power Mode to normal when it's already normal, we get changed=False.""" + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'PowerModeNormal', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertFalse(is_changed(ansible_exit_json)) + + def test_set_power_mode_check_mode(self): + """Test check mode when setting chassis Power Mode.""" + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'IndicatorLedOn', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21', + '_ansible_check_mode': True + }) + module.main() + self.assertEqual(UPDATE_NOT_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_set_chassis_led_indicator_check_mode(self): + """Test check mode when setting chassis LED indicator""" + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'IndicatorLedOn', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21', + '_ansible_check_mode': True + }) + module.main() + self.assertEqual(UPDATE_NOT_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_set_chassis_led_indicator_already_set(self): + """Test that if we set LED Indicator to off when it's already off, we get changed=False.""" + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'IndicatorLedOff', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertFalse(is_changed(ansible_exit_json)) + + def test_set_chassis_led_indicator_already_set_check_mode(self): + """Test that if we set LED Indicator to off when it's already off, we get changed=False even in check mode.""" + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'IndicatorLedOff', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21', + "_ansible_check_mode": True + }) + module.main() + self.assertEqual(NO_ACTION_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertFalse(is_changed(ansible_exit_json)) + + def test_set_chassis_invalid_indicator_command(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'Chassis', + 'command': 'IndicatorLedBright', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertIn("Invalid Command", get_exception_message(ansible_fail_json)) + + def test_reset_enclosure(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Systems', + 'command': 'PowerGracefulRestart', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_reset_enclosure_check_mode(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Systems', + 'command': 'PowerGracefulRestart', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21', + "_ansible_check_mode": True + }) + module.main() + self.assertEqual(UPDATE_NOT_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_firmware_upload_missing_update_image_path(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWUpload', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual("Missing update_image_path.", get_exception_message(ansible_fail_json)) + + def test_firmware_upload_file_not_found(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWUpload', + 'update_image_path': 'nonexistentfile.bin', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual("File does not exist.", get_exception_message(ansible_fail_json)) + + def test_firmware_upload(self): + filename = "fake_firmware.bin" + filepath = os.path.join(self.tempdir, filename) + file_contents = b'\x00\x01\x02\x03\x04' + with open(filepath, 'wb+') as f: + f.write(file_contents) + + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWUpload', + 'update_image_path': filepath, + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_firmware_upload_check_mode(self): + filename = "fake_firmware.bin" + filepath = os.path.join(self.tempdir, filename) + file_contents = b'\x00\x01\x02\x03\x04' + with open(filepath, 'wb+') as f: + f.write(file_contents) + + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWUpload', + 'update_image_path': filepath, + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21', + "_ansible_check_mode": True + }) + module.main() + self.assertEqual(UPDATE_NOT_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_firmware_update(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWUpdate', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_firmware_update_check_mode(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWUpdate', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21', + "_ansible_check_mode": True + }) + module.main() + self.assertEqual(UPDATE_NOT_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_firmware_activate(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWActivate', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_firmware_activate_check_mode(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Update', + 'command': 'FWActivate', + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21', + "_ansible_check_mode": True + }) + module.main() + self.assertEqual(UPDATE_NOT_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_delete_job(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request_job_complete, + delete_request=mock_delete_request, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'DeleteJob', + 'baseuri': MOCK_BASE_URI, + 'job_name': MOCK_JOB_NAME, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_delete_job_in_progress(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request_job_in_progress, + delete_request=mock_invalid_http_request, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'DeleteJob', + 'baseuri': MOCK_BASE_URI, + 'job_name': MOCK_JOB_NAME, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual("Cannot delete job because it is in progress.", get_exception_message(ansible_fail_json)) + + def test_delete_job_in_progress_only_on_delete(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request_job_complete, + delete_request=mock_http_request_conflict, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'DeleteJob', + 'baseuri': MOCK_BASE_URI, + 'job_name': MOCK_JOB_NAME, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual("Cannot delete job because it is in progress.", get_exception_message(ansible_fail_json)) + + def test_delete_job_check_mode(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request_job_complete, + delete_request=mock_delete_request, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'DeleteJob', + 'baseuri': MOCK_BASE_URI, + 'job_name': MOCK_JOB_NAME, + 'username': 'USERID', + 'password': 'PASSWORD=21', + '_ansible_check_mode': True + }) + module.main() + self.assertEqual(UPDATE_NOT_PERFORMED_IN_CHECK_MODE, get_exception_message(ansible_exit_json)) + self.assertTrue(is_changed(ansible_exit_json)) + + def test_delete_job_check_mode_job_not_found(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request_job_does_not_exist, + delete_request=mock_delete_request, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'DeleteJob', + 'baseuri': MOCK_BASE_URI, + 'job_name': MOCK_JOB_NAME, + 'username': 'USERID', + 'password': 'PASSWORD=21', + '_ansible_check_mode': True + }) + module.main() + self.assertEqual("Job already deleted.", get_exception_message(ansible_exit_json)) + self.assertFalse(is_changed(ansible_exit_json)) + + def test_delete_job_check_mode_job_in_progress(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request_job_in_progress, + delete_request=mock_delete_request, + put_request=mock_invalid_http_request, + post_request=mock_invalid_http_request): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'DeleteJob', + 'baseuri': MOCK_BASE_URI, + 'job_name': MOCK_JOB_NAME, + 'username': 'USERID', + 'password': 'PASSWORD=21', + '_ansible_check_mode': True + }) + module.main() + self.assertEqual("Cannot delete job because it is in progress.", get_exception_message(ansible_fail_json)) diff --git a/tests/unit/plugins/modules/test_ocapi_info.py b/tests/unit/plugins/modules/test_ocapi_info.py new file mode 100644 index 0000000000..5010b328f8 --- /dev/null +++ b/tests/unit/plugins/modules/test_ocapi_info.py @@ -0,0 +1,240 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Ansible project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.compat import unittest +from ansible.module_utils import basic +import ansible_collections.community.general.plugins.modules.ocapi_info as module +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson +from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json + +MOCK_BASE_URI = "mockBaseUri" +MOCK_JOB_NAME_IN_PROGRESS = "MockJobInProgress" +MOCK_JOB_NAME_COMPLETE = "MockJobComplete" +MOCK_JOB_NAME_DOES_NOT_EXIST = "MockJobDoesNotExist" + +ACTION_WAS_SUCCESSFUL = "Action was successful." + +MOCK_SUCCESSFUL_HTTP_RESPONSE = { + "ret": True, + "data": {} +} + +MOCK_404_RESPONSE = { + "ret": False, + "status": 404 +} + +MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS = { + "ret": True, + "data": { + "Self": "https://openflex-data24-usalp02120qo0012-iomb:443/Storage/Devices/openflex-data24-usalp02120qo0012/Jobs/FirmwareUpdate/", + "ID": MOCK_JOB_NAME_IN_PROGRESS, + "PercentComplete": 10, + "Status": { + "State": { + "ID": 16, + "Name": "In service" + }, + "Health": [ + { + "ID": 5, + "Name": "OK" + } + ] + } + } +} + +MOCK_HTTP_RESPONSE_JOB_COMPLETE = { + "ret": True, + "data": { + "Self": "https://openflex-data24-usalp02120qo0012-iomb:443/Storage/Devices/openflex-data24-usalp02120qo0012/Jobs/FirmwareUpdate/", + "ID": MOCK_JOB_NAME_COMPLETE, + "PercentComplete": 100, + "Status": { + "State": { + "ID": 65540, + "Name": "Activate needed" + }, + "Health": [ + { + "ID": 5, + "Name": "OK" + } + ], + "Details": [ + "Completed." + ] + } + } +} + + +def get_bin_path(self, arg, required=False): + """Mock AnsibleModule.get_bin_path""" + return arg + + +def get_exception_message(ansible_exit_json): + """From an AnsibleExitJson exception, get the message string.""" + return ansible_exit_json.exception.args[0]["msg"] + + +def mock_get_request(*args, **kwargs): + """Mock for get_request.""" + url = args[1] + if url == "https://" + MOCK_BASE_URI: + return MOCK_SUCCESSFUL_HTTP_RESPONSE + elif url == "https://" + MOCK_BASE_URI + '/Jobs/' + MOCK_JOB_NAME_IN_PROGRESS: + return MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS + elif url == "https://" + MOCK_BASE_URI + '/Jobs/' + MOCK_JOB_NAME_COMPLETE: + return MOCK_HTTP_RESPONSE_JOB_COMPLETE + elif url == "https://" + MOCK_BASE_URI + '/Jobs/' + MOCK_JOB_NAME_DOES_NOT_EXIST: + return MOCK_404_RESPONSE + else: + raise RuntimeError("Illegal GET call to: " + args[1]) + + +def mock_put_request(*args, **kwargs): + """Mock put_request. PUT should never happen so it will raise an error.""" + raise RuntimeError("Illegal PUT call to: " + args[1]) + + +def mock_delete_request(*args, **kwargs): + """Mock delete request. DELETE should never happen so it will raise an error.""" + raise RuntimeError("Illegal DELETE call to: " + args[1]) + + +def mock_post_request(*args, **kwargs): + """Mock post_request. POST should never happen so it will raise an error.""" + raise RuntimeError("Illegal POST call to: " + args[1]) + + +class TestOcapiInfo(unittest.TestCase): + def setUp(self): + self.mock_module_helper = patch.multiple(basic.AnsibleModule, + exit_json=exit_json, + fail_json=fail_json, + get_bin_path=get_bin_path) + self.mock_module_helper.start() + self.addCleanup(self.mock_module_helper.stop) + + def test_module_fail_when_required_args_missing(self): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({}) + module.main() + self.assertIn("missing required arguments:", get_exception_message(ansible_fail_json)) + + def test_module_fail_when_unknown_category(self): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'unknown', + 'command': 'JobStatus', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'baseuri': MOCK_BASE_URI + }) + module.main() + self.assertIn("Invalid Category 'unknown", get_exception_message(ansible_fail_json)) + + def test_module_fail_when_unknown_command(self): + with self.assertRaises(AnsibleFailJson) as ansible_fail_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'unknown', + 'username': 'USERID', + 'password': 'PASSW0RD=21', + 'baseuri': MOCK_BASE_URI + }) + module.main() + self.assertIn("Invalid Command 'unknown", get_exception_message(ansible_fail_json)) + + def test_job_status_in_progress(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request, + delete_request=mock_delete_request, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'JobStatus', + 'job_name': MOCK_JOB_NAME_IN_PROGRESS, + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + response_data = ansible_exit_json.exception.args[0] + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS["data"]["PercentComplete"], response_data["percentComplete"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS["data"]["Status"]["State"]["ID"], response_data["operationStatusId"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS["data"]["Status"]["State"]["Name"], response_data["operationStatus"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS["data"]["Status"]["Health"][0]["Name"], response_data["operationHealth"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_IN_PROGRESS["data"]["Status"]["Health"][0]["ID"], response_data["operationHealthId"]) + self.assertTrue(response_data["jobExists"]) + self.assertFalse(response_data["changed"]) + self.assertEqual(ACTION_WAS_SUCCESSFUL, response_data["msg"]) + self.assertIsNone(response_data["details"]) + + def test_job_status_complete(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request, + delete_request=mock_delete_request, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'JobStatus', + 'job_name': MOCK_JOB_NAME_COMPLETE, + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + response_data = ansible_exit_json.exception.args[0] + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_COMPLETE["data"]["PercentComplete"], response_data["percentComplete"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_COMPLETE["data"]["Status"]["State"]["ID"], response_data["operationStatusId"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_COMPLETE["data"]["Status"]["State"]["Name"], response_data["operationStatus"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_COMPLETE["data"]["Status"]["Health"][0]["Name"], response_data["operationHealth"]) + self.assertEqual(MOCK_HTTP_RESPONSE_JOB_COMPLETE["data"]["Status"]["Health"][0]["ID"], response_data["operationHealthId"]) + self.assertTrue(response_data["jobExists"]) + self.assertFalse(response_data["changed"]) + self.assertEqual(ACTION_WAS_SUCCESSFUL, response_data["msg"]) + self.assertEqual(["Completed."], response_data["details"]) + + def test_job_status_not_found(self): + with patch.multiple("ansible_collections.community.general.plugins.module_utils.ocapi_utils.OcapiUtils", + get_request=mock_get_request, + put_request=mock_put_request, + delete_request=mock_delete_request, + post_request=mock_post_request): + with self.assertRaises(AnsibleExitJson) as ansible_exit_json: + set_module_args({ + 'category': 'Jobs', + 'command': 'JobStatus', + 'job_name': MOCK_JOB_NAME_DOES_NOT_EXIST, + 'baseuri': MOCK_BASE_URI, + 'username': 'USERID', + 'password': 'PASSWORD=21' + }) + module.main() + self.assertEqual(ACTION_WAS_SUCCESSFUL, get_exception_message(ansible_exit_json)) + response_data = ansible_exit_json.exception.args[0] + self.assertFalse(response_data["jobExists"]) + self.assertEqual(0, response_data["percentComplete"]) + self.assertEqual(1, response_data["operationStatusId"]) + self.assertEqual("Not Available", response_data["operationStatus"]) + self.assertIsNone(response_data["operationHealth"]) + self.assertIsNone(response_data["operationHealthId"]) + self.assertFalse(response_data["changed"]) + self.assertEqual(ACTION_WAS_SUCCESSFUL, response_data["msg"]) + self.assertEqual("Job does not exist.", response_data["details"]) From 098912c2293febb91cfca14631784ccb72c4b774 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 22 Jan 2023 17:27:17 +0100 Subject: [PATCH 0429/2104] stormssh tests: do not install newer cryptography (#5868) Do not install newer cryptography. ci_complete --- tests/integration/targets/ssh_config/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/ssh_config/tasks/main.yml b/tests/integration/targets/ssh_config/tasks/main.yml index ce57493b84..d0b088302c 100644 --- a/tests/integration/targets/ssh_config/tasks/main.yml +++ b/tests/integration/targets/ssh_config/tasks/main.yml @@ -5,7 +5,9 @@ - name: Install required libs pip: - name: stormssh + name: + - stormssh + - 'paramiko<3.0.0' state: present extra_args: "-c {{ remote_constraints }}" From 0ca41dedce083b34fe06faa84eb001c1d1f5a8bd Mon Sep 17 00:00:00 2001 From: morco Date: Sun, 22 Jan 2023 17:27:57 +0100 Subject: [PATCH 0430/2104] Bugfix/keycloak userfed idempotency (#5732) * fix(modules/keycloak_user_federation): fixes ... ... federation read call not finding already existing federations properly because of bad parametrisation * fix(modules/keycloak_user_federation): added ... ... new integration test for module idempotency bugfix * added changelog fragment for pr Co-authored-by: Mirko Wilhelmi --- ...32-bugfix-keycloak-userfed-idempotency.yml | 6 + plugins/modules/keycloak_user_federation.py | 4 +- .../keycloak_user_federation/tasks/main.yml | 108 ++++++++++++++++++ 3 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5732-bugfix-keycloak-userfed-idempotency.yml diff --git a/changelogs/fragments/5732-bugfix-keycloak-userfed-idempotency.yml b/changelogs/fragments/5732-bugfix-keycloak-userfed-idempotency.yml new file mode 100644 index 0000000000..c50a105c3f --- /dev/null +++ b/changelogs/fragments/5732-bugfix-keycloak-userfed-idempotency.yml @@ -0,0 +1,6 @@ +bugfixes: + - > + keycloak_user_federation - fixes idempotency detection issues. In some + cases the module could fail to properly detect already existing user + federations because of a buggy seemingly superflous extra query parameter + (https://github.com/ansible-collections/community.general/pull/5732). diff --git a/plugins/modules/keycloak_user_federation.py b/plugins/modules/keycloak_user_federation.py index 3e66c577ec..3659d757ac 100644 --- a/plugins/modules/keycloak_user_federation.py +++ b/plugins/modules/keycloak_user_federation.py @@ -24,7 +24,7 @@ description: to your needs and a user having the expected roles. - The names of module options are snake_cased versions of the camelCase ones found in the - Keycloak API and its documentation at U(https://www.keycloak.org/docs-api/15.0/rest-api/index.html). + Keycloak API and its documentation at U(https://www.keycloak.org/docs-api/20.0.2/rest-api/index.html). options: @@ -835,7 +835,7 @@ def main(): # See if it already exists in Keycloak if cid is None: - found = kc.get_components(urlencode(dict(type='org.keycloak.storage.UserStorageProvider', parent=realm, name=name)), realm) + found = kc.get_components(urlencode(dict(type='org.keycloak.storage.UserStorageProvider', name=name)), realm) if len(found) > 1: module.fail_json(msg='No ID given and found multiple user federations with name `{name}`. Cannot continue.'.format(name=name)) before_comp = next(iter(found), None) diff --git a/tests/integration/targets/keycloak_user_federation/tasks/main.yml b/tests/integration/targets/keycloak_user_federation/tasks/main.yml index 79e21dae03..139d6ee2be 100644 --- a/tests/integration/targets/keycloak_user_federation/tasks/main.yml +++ b/tests/integration/targets/keycloak_user_federation/tasks/main.yml @@ -66,6 +66,59 @@ - result.existing == {} - result.end_state.name == "{{ federation }}" +- name: Create new user federation in admin realm + community.general.keycloak_user_federation: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ admin_realm }}" + name: "{{ federation }}" + state: present + provider_id: ldap + provider_type: org.keycloak.storage.UserStorageProvider + config: + enabled: true + priority: 0 + fullSyncPeriod: -1 + changedSyncPeriod: -1 + cachePolicy: DEFAULT + batchSizeForSync: 1000 + editMode: READ_ONLY + importEnabled: true + syncRegistrations: false + vendor: other + usernameLDAPAttribute: uid + rdnLDAPAttribute: uid + uuidLDAPAttribute: entryUUID + userObjectClasses: "inetOrgPerson, organizationalPerson" + connectionUrl: "ldaps://ldap.example.com:636" + usersDn: "ou=Users,dc=example,dc=com" + authType: simple + bindDn: cn=directory reader + bindCredential: secret + searchScope: 1 + validatePasswordPolicy: false + trustEmail: false + useTruststoreSpi: "ldapsOnly" + connectionPooling: true + pagination: true + allowKerberosAuthentication: false + useKerberosForPasswordAuthentication: false + debug: false + register: result + +- name: Debug + debug: + var: result + +- name: Assert user federation created (admin realm) + assert: + that: + - result is changed + - result.existing == {} + - result.end_state.name == "{{ federation }}" + - name: Update existing user federation (no change) community.general.keycloak_user_federation: auth_keycloak_url: "{{ url }}" @@ -121,6 +174,61 @@ - result.end_state != {} - result.end_state.name == "{{ federation }}" +- name: Update existing user federation (no change, admin realm) + community.general.keycloak_user_federation: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ admin_realm }}" + name: "{{ federation }}" + state: present + provider_id: ldap + provider_type: org.keycloak.storage.UserStorageProvider + config: + enabled: true + priority: 0 + fullSyncPeriod: -1 + changedSyncPeriod: -1 + cachePolicy: DEFAULT + batchSizeForSync: 1000 + editMode: READ_ONLY + importEnabled: true + syncRegistrations: false + vendor: other + usernameLDAPAttribute: uid + rdnLDAPAttribute: uid + uuidLDAPAttribute: entryUUID + userObjectClasses: "inetOrgPerson, organizationalPerson" + connectionUrl: "ldaps://ldap.example.com:636" + usersDn: "ou=Users,dc=example,dc=com" + authType: simple + bindDn: cn=directory reader + bindCredential: "**********" + searchScope: 1 + validatePasswordPolicy: false + trustEmail: false + useTruststoreSpi: "ldapsOnly" + connectionPooling: true + pagination: true + allowKerberosAuthentication: false + useKerberosForPasswordAuthentication: false + debug: false + register: result + +- name: Debug + debug: + var: result + +- name: Assert user federation unchanged (admin realm) + assert: + that: + - result is not changed + - result.existing != {} + - result.existing.name == "{{ federation }}" + - result.end_state != {} + - result.end_state.name == "{{ federation }}" + - name: Update existing user federation (with change) community.general.keycloak_user_federation: auth_keycloak_url: "{{ url }}" From 6781dd19183a6c9322242461c1f6a585cca717fa Mon Sep 17 00:00:00 2001 From: morco Date: Sun, 22 Jan 2023 17:28:33 +0100 Subject: [PATCH 0431/2104] bugfixing keycloak user federation failing when updating default mapper simultaneously (#5750) * fix(modules/keycloak_user_federation): fixes ... ... user federation creation failing when also updating/changing default mappers at the same time * add changelog fragment for pr Co-authored-by: Mirko Wilhelmi --- ...n-update-default-mapper-simultaneously.yml | 7 ++ plugins/modules/keycloak_user_federation.py | 2 + .../keycloak_user_federation/tasks/main.yml | 88 +++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 changelogs/fragments/5750-bugfixing-keycloak-usrfed-fail-when-update-default-mapper-simultaneously.yml diff --git a/changelogs/fragments/5750-bugfixing-keycloak-usrfed-fail-when-update-default-mapper-simultaneously.yml b/changelogs/fragments/5750-bugfixing-keycloak-usrfed-fail-when-update-default-mapper-simultaneously.yml new file mode 100644 index 0000000000..93cfc3adcb --- /dev/null +++ b/changelogs/fragments/5750-bugfixing-keycloak-usrfed-fail-when-update-default-mapper-simultaneously.yml @@ -0,0 +1,7 @@ +bugfixes: + - >- + keycloak_user_federation - fixes federation creation issue. When a new + federation was created and at the same time a default / standard mapper + was also changed / updated the creation process failed as a bad None + set variable led to a bad malformed url request + (https://github.com/ansible-collections/community.general/pull/5750). diff --git a/plugins/modules/keycloak_user_federation.py b/plugins/modules/keycloak_user_federation.py index 3659d757ac..fbb31e695d 100644 --- a/plugins/modules/keycloak_user_federation.py +++ b/plugins/modules/keycloak_user_federation.py @@ -923,6 +923,8 @@ def main(): updated_mappers = desired_comp.pop('mappers', []) after_comp = kc.create_component(desired_comp, realm) + cid = after_comp['id'] + for mapper in updated_mappers: found = kc.get_components(urlencode(dict(parent=cid, name=mapper['name'])), realm) if len(found) > 1: diff --git a/tests/integration/targets/keycloak_user_federation/tasks/main.yml b/tests/integration/targets/keycloak_user_federation/tasks/main.yml index 139d6ee2be..ae0b4bf162 100644 --- a/tests/integration/targets/keycloak_user_federation/tasks/main.yml +++ b/tests/integration/targets/keycloak_user_federation/tasks/main.yml @@ -270,6 +270,14 @@ useKerberosForPasswordAuthentication: false debug: false mappers: + # overwrite / update pre existing default mapper + - name: "username" + providerId: "user-attribute-ldap-mapper" + config: + ldap.attribute: ldap_user + user.model.attribute: usr + read.only: true + # create new mapper - name: "full name" providerId: "full-name-ldap-mapper" providerType: "org.keycloak.storage.ldap.mappers.LDAPStorageMapper" @@ -335,3 +343,83 @@ - result is not changed - result.existing == {} - result.end_state == {} + +- name: Create new user federation together with mappers + community.general.keycloak_user_federation: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: "{{ federation }}" + state: present + provider_id: ldap + provider_type: org.keycloak.storage.UserStorageProvider + config: + enabled: true + priority: 0 + fullSyncPeriod: -1 + changedSyncPeriod: -1 + cachePolicy: DEFAULT + batchSizeForSync: 1000 + editMode: READ_ONLY + importEnabled: true + syncRegistrations: false + vendor: other + usernameLDAPAttribute: uid + rdnLDAPAttribute: uid + uuidLDAPAttribute: entryUUID + userObjectClasses: "inetOrgPerson, organizationalPerson" + connectionUrl: "ldaps://ldap.example.com:636" + usersDn: "ou=Users,dc=example,dc=com" + authType: simple + bindDn: cn=directory reader + bindCredential: secret + searchScope: 1 + validatePasswordPolicy: false + trustEmail: false + useTruststoreSpi: "ldapsOnly" + connectionPooling: true + pagination: true + allowKerberosAuthentication: false + useKerberosForPasswordAuthentication: false + debug: false + mappers: + # overwrite / update pre existing default mapper + - name: "username" + providerId: "user-attribute-ldap-mapper" + config: + ldap.attribute: ldap_user + user.model.attribute: usr + read.only: true + # create new mapper + - name: "full name" + providerId: "full-name-ldap-mapper" + providerType: "org.keycloak.storage.ldap.mappers.LDAPStorageMapper" + config: + ldap.full.name.attribute: cn + read.only: true + write.only: false + register: result + +- name: Debug + debug: + var: result + +- name: Assert user federation created + assert: + that: + - result is changed + - result.existing == {} + - result.end_state.name == "{{ federation }}" + +## no point in retesting this, just doing it to clean up introduced server changes +- name: Delete absent user federation + community.general.keycloak_user_federation: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: "{{ federation }}" + state: absent From bf117c839cdfbf5d6fd398df6750b53c71f8e16b Mon Sep 17 00:00:00 2001 From: Christoph <29735603+Chr1s70ph@users.noreply.github.com> Date: Sun, 22 Jan 2023 17:29:11 +0100 Subject: [PATCH 0432/2104] Clarify Error message when bitwarden vault not unlocked (#5811) * Clarify Error message when vault not unlocked You can be logged into the Bitwarden-CLI, but it can still be locked. This took me several hours to debug, since every time I ran 'bw login' it told me, that I am already logged in. If you run 'bw unlock' without being logged in, you are prompted to log in. This clarifies the Error occurring and can drastically reduce debugging time, since you don't have to look into the source code to get an understanding of whats wrong. * RM: negation Nobody needs negation * Update function name * FIX: tests * ADD: changelog * Update changelogs/fragments/5811-clarify-bitwarden-error.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5811-clarify-bitwarden-error.yml | 2 ++ plugins/lookup/bitwarden.py | 6 +++--- tests/unit/plugins/lookup/test_bitwarden.py | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/5811-clarify-bitwarden-error.yml diff --git a/changelogs/fragments/5811-clarify-bitwarden-error.yml b/changelogs/fragments/5811-clarify-bitwarden-error.yml new file mode 100644 index 0000000000..343faba478 --- /dev/null +++ b/changelogs/fragments/5811-clarify-bitwarden-error.yml @@ -0,0 +1,2 @@ +minor_changes: + - bitwarden lookup plugin - clarify what to do, if the bitwarden vault is not unlocked (https://github.com/ansible-collections/community.general/pull/5811). diff --git a/plugins/lookup/bitwarden.py b/plugins/lookup/bitwarden.py index dbcb88d456..344f960b0a 100644 --- a/plugins/lookup/bitwarden.py +++ b/plugins/lookup/bitwarden.py @@ -83,7 +83,7 @@ class Bitwarden(object): return self._cli_path @property - def logged_in(self): + def unlocked(self): out, err = self._run(['status'], stdin="") decoded = AnsibleJSONDecoder().raw_decode(out)[0] return decoded['status'] == 'unlocked' @@ -135,8 +135,8 @@ class LookupModule(LookupBase): self.set_options(var_options=variables, direct=kwargs) field = self.get_option('field') search_field = self.get_option('search') - if not _bitwarden.logged_in: - raise AnsibleError("Not logged into Bitwarden. Run 'bw login'.") + if not _bitwarden.unlocked: + raise AnsibleError("Bitwarden Vault locked. Run 'bw unlock'.") return [_bitwarden.get_field(field, term, search_field) for term in terms] diff --git a/tests/unit/plugins/lookup/test_bitwarden.py b/tests/unit/plugins/lookup/test_bitwarden.py index 7f86c39697..90f3ff7751 100644 --- a/tests/unit/plugins/lookup/test_bitwarden.py +++ b/tests/unit/plugins/lookup/test_bitwarden.py @@ -111,7 +111,7 @@ MOCK_RECORDS = [ class MockBitwarden(Bitwarden): - logged_in = True + unlocked = True def _get_matches(self, search_value, search_field="name"): return list(filter(lambda record: record[search_field] == search_value, MOCK_RECORDS)) @@ -119,7 +119,7 @@ class MockBitwarden(Bitwarden): class LoggedOutMockBitwarden(MockBitwarden): - logged_in = False + unlocked = False class TestLookupModule(unittest.TestCase): @@ -155,7 +155,7 @@ class TestLookupModule(unittest.TestCase): self.lookup.run(['a_test'])[0]) @patch('ansible_collections.community.general.plugins.lookup.bitwarden._bitwarden', LoggedOutMockBitwarden()) - def test_bitwarden_plugin_logged_out(self): + def test_bitwarden_plugin_unlocked(self): record = MOCK_RECORDS[0] record_name = record['name'] with self.assertRaises(AnsibleError): From f38bfaddf0d9cb63e028a4bc14d732bc35039492 Mon Sep 17 00:00:00 2001 From: castorsky Date: Tue, 24 Jan 2023 05:49:50 +0800 Subject: [PATCH 0433/2104] Bugfix: proxmox_disk - read time out on import (#5803) * Use async calls and fix docs * Add changelog fragment --- .../fragments/5803-proxmox-read-timeout.yml | 2 + plugins/modules/proxmox_disk.py | 61 ++++++++++++------- 2 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 changelogs/fragments/5803-proxmox-read-timeout.yml diff --git a/changelogs/fragments/5803-proxmox-read-timeout.yml b/changelogs/fragments/5803-proxmox-read-timeout.yml new file mode 100644 index 0000000000..fc29605e4f --- /dev/null +++ b/changelogs/fragments/5803-proxmox-read-timeout.yml @@ -0,0 +1,2 @@ +bugfixes: + - proxmox_disk - fixed issue with read timeout on import action (https://github.com/ansible-collections/community.general/pull/5803). diff --git a/plugins/modules/proxmox_disk.py b/plugins/modules/proxmox_disk.py index 8a81f18a3f..8292b1de50 100644 --- a/plugins/modules/proxmox_disk.py +++ b/plugins/modules/proxmox_disk.py @@ -104,6 +104,7 @@ options: - Move the disk to this storage when I(state=moved). - You can move between storages only in scope of one VM. - Mutually exclusive with I(target_vmid). + - Consider increasing I(timeout) in case of large disk images or slow storage backend. type: str target_vmid: description: @@ -113,8 +114,8 @@ options: type: int timeout: description: - - Timeout in seconds to wait when moving disk. - - Used only when I(state=moved). + - Timeout in seconds to wait for slow operations such as importing disk or moving disk between storages. + - Used only when I(state) is C(present) or C(moved). type: int default: 600 aio: @@ -172,6 +173,7 @@ options: - C(:/) or C(/) - Attention! Only root can use absolute paths. - This parameter is mutually exclusive with I(size). + - Increase I(timeout) parameter when importing large disk images or using slow storage. type: str iops: description: @@ -471,6 +473,16 @@ class ProxmoxDiskAnsible(ProxmoxAnsible): params.update(dict((k, int(v)) for k, v in params.items() if isinstance(v, bool))) return params + def wait_till_complete_or_timeout(self, node_name, task_id): + timeout = self.module.params['timeout'] + while timeout: + if self.api_task_ok(node_name, task_id): + return True + timeout -= 1 + if timeout <= 0: + return False + sleep(1) + def create_disk(self, disk, vmid, vm, vm_config): create = self.module.params['create'] if create == 'disabled' and disk not in vm_config: @@ -484,20 +496,23 @@ class ProxmoxDiskAnsible(ProxmoxAnsible): if import_string: config_str = "%s:%s,import-from=%s" % (self.module.params["storage"], "0", import_string) + timeout_str = "Reached timeout while importing VM disk. Last line in task before timeout: %s" + ok_str = "Disk %s imported into VM %s" else: config_str = "%s:%s" % (self.module.params["storage"], self.module.params["size"]) + ok_str = "Disk %s created in VM %s" + timeout_str = "Reached timeout while creating VM disk. Last line in task before timeout: %s" for k, v in attributes.items(): config_str += ',%s=%s' % (k, v) - create_disk = {self.module.params["disk"]: config_str} - self.proxmox_api.nodes(vm['node']).qemu(vmid).config.set(**create_disk) - return True, "Disk %s created in VM %s" % (disk, vmid) + disk_config_to_apply = {self.module.params["disk"]: config_str} if create in ['disabled', 'regular'] and disk in vm_config: # UPDATE disk_config = disk_conf_str_to_dict(vm_config[disk]) config_str = disk_config["volume"] + ok_str = "Disk %s updated in VM %s" attributes = self.get_create_attributes() # 'import_from' fails on disk updates attributes.pop('import_from', None) @@ -513,9 +528,16 @@ class ProxmoxDiskAnsible(ProxmoxAnsible): if disk_config == attributes: return False, "Disk %s is up to date in VM %s" % (disk, vmid) - update_disk = {self.module.params["disk"]: config_str} - self.proxmox_api.nodes(vm['node']).qemu(vmid).config.set(**update_disk) - return True, "Disk %s updated in VM %s" % (disk, vmid) + disk_config_to_apply = {self.module.params["disk"]: config_str} + + current_task_id = self.proxmox_api.nodes(vm['node']).qemu(vmid).config.post(**disk_config_to_apply) + task_success = self.wait_till_complete_or_timeout(vm['node'], current_task_id) + if task_success: + return True, ok_str % (disk, vmid) + else: + self.module.fail_json( + msg=timeout_str % self.proxmox_api.nodes(vm['node']).tasks(current_task_id).log.get()[:1] + ) def move_disk(self, disk, vmid, vm, vm_config): params = dict() @@ -535,20 +557,15 @@ class ProxmoxDiskAnsible(ProxmoxAnsible): if params['storage'] == disk_config['storage_name']: return False - taskid = self.proxmox_api.nodes(vm['node']).qemu(vmid).move_disk.post(**params) - timeout = self.module.params['timeout'] - while timeout: - status_data = self.proxmox_api.nodes(vm['node']).tasks(taskid).status.get() - if status_data['status'] == 'stopped' and status_data['exitstatus'] == 'OK': - return True - if timeout <= 0: - self.module.fail_json( - msg='Reached timeout while waiting for moving VM disk. Last line in task before timeout: %s' % - self.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1]) - - sleep(1) - timeout -= 1 - return True + task_id = self.proxmox_api.nodes(vm['node']).qemu(vmid).move_disk.post(**params) + task_success = self.wait_till_complete_or_timeout(vm['node'], task_id) + if task_success: + return True + else: + self.module.fail_json( + msg='Reached timeout while waiting for moving VM disk. Last line in task before timeout: %s' % + self.proxmox_api.nodes(vm['node']).tasks(task_id).log.get()[:1] + ) def main(): From fe520a6b09aeab283f1477556b49cb64386a8e10 Mon Sep 17 00:00:00 2001 From: Juan Vela Date: Tue, 24 Jan 2023 19:43:28 +0100 Subject: [PATCH 0434/2104] Gem: Support force flag when uninstalling (#5822) * Gem: Support force flag when uninstalling * Improve docs' syntax * Add changelog fragment --- changelogs/fragments/5822-gem-uninstall-force.yml | 2 ++ plugins/modules/gem.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5822-gem-uninstall-force.yml diff --git a/changelogs/fragments/5822-gem-uninstall-force.yml b/changelogs/fragments/5822-gem-uninstall-force.yml new file mode 100644 index 0000000000..7b8a0efbda --- /dev/null +++ b/changelogs/fragments/5822-gem-uninstall-force.yml @@ -0,0 +1,2 @@ +bugfixes: + - gem - fix force parameter not being passed to gem command when uninstalling (https://github.com/ansible-collections/community.general/pull/5822). diff --git a/plugins/modules/gem.py b/plugins/modules/gem.py index 21e9efea58..a44683c786 100644 --- a/plugins/modules/gem.py +++ b/plugins/modules/gem.py @@ -105,7 +105,7 @@ options: required: false force: description: - - Force gem to install, bypassing dependency checks. + - Force gem to (un-)install, bypassing dependency checks. required: false default: false type: bool @@ -235,6 +235,8 @@ def uninstall(module): else: cmd.append('--all') cmd.append('--executable') + if module.params['force']: + cmd.append('--force') cmd.append(module.params['name']) module.run_command(cmd, environ_update=environ, check_rc=True) From 855cbd67aed46e9cae30fda61535fa21183a40bb Mon Sep 17 00:00:00 2001 From: lapete Date: Wed, 25 Jan 2023 23:03:35 +0100 Subject: [PATCH 0435/2104] Update gitlab_deploy_key.py (#5888) * Update gitlab_deploy_key.py Change key title on key update * Create 5888-update-key-title Add changelog fragment for key title change * Update changelogs/fragments/5888-update-key-title Co-authored-by: Felix Fontein * Rename 5888-update-key-title to 5888-update-key-title.yml Co-authored-by: Felix Fontein --- changelogs/fragments/5888-update-key-title.yml | 2 ++ plugins/modules/gitlab_deploy_key.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/5888-update-key-title.yml diff --git a/changelogs/fragments/5888-update-key-title.yml b/changelogs/fragments/5888-update-key-title.yml new file mode 100644 index 0000000000..e620ad3d79 --- /dev/null +++ b/changelogs/fragments/5888-update-key-title.yml @@ -0,0 +1,2 @@ +minor_changes: + - gitlab_deploy_key - also update ``title`` and not just ``can_push`` (https://github.com/ansible-collections/community.general/pull/5888). diff --git a/plugins/modules/gitlab_deploy_key.py b/plugins/modules/gitlab_deploy_key.py index 3ed2b2d7a5..f4a9fb29fa 100644 --- a/plugins/modules/gitlab_deploy_key.py +++ b/plugins/modules/gitlab_deploy_key.py @@ -151,6 +151,7 @@ class GitLabDeployKey(object): changed = True else: changed, deploy_key = self.update_deploy_key(self.deploy_key_object, { + 'title': key_title, 'can_push': options['can_push']}) self.deploy_key_object = deploy_key From 7b8b73f17faee9f76b9cd62b770b277a5e752905 Mon Sep 17 00:00:00 2001 From: Piotr Date: Sat, 28 Jan 2023 11:28:18 +0100 Subject: [PATCH 0436/2104] Add support to Bitwarden Lookup for filtering results by collection (#5849) (#5851) * Add support to Bitwarden Lookup for filtering results by collection id (#5849) * Debug * Add support to Bitwarden Lookup for filtering results by collection id (#5849) * Update comments * Fix blank line issue * Fix unit tests for bitwarden lookup plugin. Add changelog fragment file. * Change collectionId to collection_id parameter on bitwarden plugin * Fix collection id parameter name when used in bw cli --- ...-add-filter-by-collection-id-parameter.yml | 2 ++ plugins/lookup/bitwarden.py | 32 +++++++++++++++---- tests/unit/plugins/lookup/test_bitwarden.py | 2 +- 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/5851-lookup-bitwarden-add-filter-by-collection-id-parameter.yml diff --git a/changelogs/fragments/5851-lookup-bitwarden-add-filter-by-collection-id-parameter.yml b/changelogs/fragments/5851-lookup-bitwarden-add-filter-by-collection-id-parameter.yml new file mode 100644 index 0000000000..28b878a5b0 --- /dev/null +++ b/changelogs/fragments/5851-lookup-bitwarden-add-filter-by-collection-id-parameter.yml @@ -0,0 +1,2 @@ +minor_changes: + - bitwarden lookup plugin - implement filtering results by ``collection_id`` parameter (https://github.com/ansible-collections/community.general/issues/5849). \ No newline at end of file diff --git a/plugins/lookup/bitwarden.py b/plugins/lookup/bitwarden.py index 344f960b0a..389fa475bd 100644 --- a/plugins/lookup/bitwarden.py +++ b/plugins/lookup/bitwarden.py @@ -28,8 +28,12 @@ DOCUMENTATION = """ default: name version_added: 5.7.0 field: - description: Field to fetch; leave unset to fetch whole response. + description: Field to fetch. Leave unset to fetch whole response. type: str + collection_id: + description: Collection ID to filter results by collection. Leave unset to skip filtering. + type: str + version_added: 6.3.0 """ EXAMPLES = """ @@ -43,6 +47,11 @@ EXAMPLES = """ msg: >- {{ lookup('community.general.bitwarden', 'bafba515-af11-47e6-abe3-af1200cd18b2', search='id', field='password') }} +- name: "Get 'password' from Bitwarden record named 'a_test' from collection" + ansible.builtin.debug: + msg: >- + {{ lookup('community.general.bitwarden', 'a_test', field='password', collection_id='bafba515-af11-47e6-abe3-af1200cd18b2') }} + - name: "Get full Bitwarden record named 'a_test'" ansible.builtin.debug: msg: >- @@ -96,10 +105,17 @@ class Bitwarden(object): raise BitwardenException(err) return to_text(out, errors='surrogate_or_strict'), to_text(err, errors='surrogate_or_strict') - def _get_matches(self, search_value, search_field): + def _get_matches(self, search_value, search_field, collection_id): """Return matching records whose search_field is equal to key. """ - out, err = self._run(['list', 'items', '--search', search_value]) + + # Prepare set of params for Bitwarden CLI + params = ['list', 'items', '--search', search_value] + + if collection_id: + params.extend(['--collectionid', collection_id]) + + out, err = self._run(params) # This includes things that matched in different fields. initial_matches = AnsibleJSONDecoder().raw_decode(out)[0] @@ -107,12 +123,13 @@ class Bitwarden(object): # Filter to only include results from the right field. return [item for item in initial_matches if item[search_field] == search_value] - def get_field(self, field, search_value, search_field="name"): - """Return a list of the specified field for records whose search_field match search_value. + def get_field(self, field, search_value, search_field="name", collection_id=None): + """Return a list of the specified field for records whose search_field match search_value + and filtered by collection if collection has been provided. If field is None, return the whole record for each match. """ - matches = self._get_matches(search_value, search_field) + matches = self._get_matches(search_value, search_field, collection_id) if field in ['autofillOnPageLoad', 'password', 'passwordRevisionDate', 'totp', 'uris', 'username']: return [match['login'][field] for match in matches] @@ -135,10 +152,11 @@ class LookupModule(LookupBase): self.set_options(var_options=variables, direct=kwargs) field = self.get_option('field') search_field = self.get_option('search') + collection_id = self.get_option('collection_id') if not _bitwarden.unlocked: raise AnsibleError("Bitwarden Vault locked. Run 'bw unlock'.") - return [_bitwarden.get_field(field, term, search_field) for term in terms] + return [_bitwarden.get_field(field, term, search_field, collection_id) for term in terms] _bitwarden = Bitwarden() diff --git a/tests/unit/plugins/lookup/test_bitwarden.py b/tests/unit/plugins/lookup/test_bitwarden.py index 90f3ff7751..ac0242737e 100644 --- a/tests/unit/plugins/lookup/test_bitwarden.py +++ b/tests/unit/plugins/lookup/test_bitwarden.py @@ -113,7 +113,7 @@ class MockBitwarden(Bitwarden): unlocked = True - def _get_matches(self, search_value, search_field="name"): + def _get_matches(self, search_value, search_field="name", collection_id=None): return list(filter(lambda record: record[search_field] == search_value, MOCK_RECORDS)) From 8818a6f2421d50980229db464a710a84e4748eff Mon Sep 17 00:00:00 2001 From: Michal Opala Date: Sat, 28 Jan 2023 11:29:00 +0100 Subject: [PATCH 0437/2104] OpenNebula/one_vm implement the one.vm.updateconf API call (#5812) * opennebula: Add template manipulation helpers * one_vm: Use 'updateconf' API call to modify running VMs * one_vm: Emulate 'updateconf' API call for newly created VMs * opennebula/one_vm: Satisfy linter checks * opennebula/one_vm: Apply suggestions from code review Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * opennebula/one_vm: Drop 'extend' function, use 'dict_merge' instead * Add changelog fragment * one_vm: Refactor 'parse_updateconf' function * opennebula/one_vm: Apply suggestions from code review Co-authored-by: Felix Fontein * one_vm: Allow for using updateconf in all scenarios --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein --- .../5812-implement-updateconf-api-call.yml | 2 + plugins/module_utils/opennebula.py | 30 ++ plugins/modules/one_vm.py | 259 ++++++++++++------ .../plugins/module_utils/test_opennebula.py | 91 ++++++ tests/unit/plugins/modules/test_one_vm.py | 62 +++++ 5 files changed, 364 insertions(+), 80 deletions(-) create mode 100644 changelogs/fragments/5812-implement-updateconf-api-call.yml create mode 100644 tests/unit/plugins/module_utils/test_opennebula.py create mode 100644 tests/unit/plugins/modules/test_one_vm.py diff --git a/changelogs/fragments/5812-implement-updateconf-api-call.yml b/changelogs/fragments/5812-implement-updateconf-api-call.yml new file mode 100644 index 0000000000..09058f044e --- /dev/null +++ b/changelogs/fragments/5812-implement-updateconf-api-call.yml @@ -0,0 +1,2 @@ +minor_changes: + - one_vm - add a new ``updateconf`` option which implements the ``one.vm.updateconf`` API call (https://github.com/ansible-collections/community.general/pull/5812). diff --git a/plugins/module_utils/opennebula.py b/plugins/module_utils/opennebula.py index b27ec229bf..0fe649ba5c 100644 --- a/plugins/module_utils/opennebula.py +++ b/plugins/module_utils/opennebula.py @@ -26,6 +26,36 @@ except ImportError: HAS_PYONE = False +# A helper function to mitigate https://github.com/OpenNebula/one/issues/6064. +# It allows for easily handling lists like "NIC" or "DISK" in the JSON-like template representation. +# There are either lists of dictionaries (length > 1) or just dictionaries. +def flatten(to_flatten, extract=False): + """Flattens nested lists (with optional value extraction).""" + def recurse(to_flatten): + return sum(map(recurse, to_flatten), []) if isinstance(to_flatten, list) else [to_flatten] + value = recurse(to_flatten) + if extract and len(value) == 1: + return value[0] + return value + + +# A helper function to mitigate https://github.com/OpenNebula/one/issues/6064. +# It renders JSON-like template representation into OpenNebula's template syntax (string). +def render(to_render): + """Converts dictionary to OpenNebula template.""" + def recurse(to_render): + for key, value in sorted(to_render.items()): + if isinstance(value, dict): + yield '{0:}=[{1:}]'.format(key, ','.join(recurse(value))) + continue + if isinstance(value, list): + for item in value: + yield '{0:}=[{1:}]'.format(key, ','.join(recurse(item))) + continue + yield '{0:}="{1:}"'.format(key, value) + return '\n'.join(recurse(to_render)) + + class OpenNebulaModule: """ Base class for all OpenNebula Ansible Modules. diff --git a/plugins/modules/one_vm.py b/plugins/modules/one_vm.py index 7122907d38..3724d9433d 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -196,6 +196,13 @@ options: - Name of Datastore to use to create a new instace version_added: '0.2.0' type: str + updateconf: + description: + - When I(instance_ids) is provided, updates running VMs with the C(updateconf) API call. + - When new VMs are being created, emulates the C(updateconf) API call via direct template merge. + - Allows for complete modifications of the C(CONTEXT) attribute. + type: dict + version_added: 6.3.0 author: - "Milan Ilic (@ilicmilan)" - "Jan Meerkamp (@meerkampdvv)" @@ -403,6 +410,30 @@ EXAMPLES = ''' disk_saveas: name: bar-image disk_id: 1 + +- name: "Deploy 2 new instances with a custom 'start script'" + community.general.one_vm: + template_name: app_template + count: 2 + updateconf: + CONTEXT: + START_SCRIPT: ip r r 169.254.16.86/32 dev eth0 + +- name: "Add a custom 'start script' to a running VM" + community.general.one_vm: + instance_ids: 351 + updateconf: + CONTEXT: + START_SCRIPT: ip r r 169.254.16.86/32 dev eth0 + +- name: "Update SSH public keys inside the VM's context" + community.general.one_vm: + instance_ids: 351 + updateconf: + CONTEXT: + SSH_PUBLIC_KEY: |- + ssh-rsa ... + ssh-ed25519 ... ''' RETURN = ''' @@ -510,6 +541,17 @@ instances: "TE_GALAXY": "bar", "USER_INPUTS": null } + updateconf: + description: A dictionary of key/values attributes that are set with the updateconf API call. + type: dict + version_added: 6.3.0 + sample: { + "OS": { "ARCH": "x86_64" }, + "CONTEXT": { + "START_SCRIPT": "ip r r 169.254.16.86/32 dev eth0", + "SSH_PUBLIC_KEY": "ssh-rsa ...\\nssh-ed25519 ..." + } + } tagged_instances: description: - A list of instances info based on a specific attributes and/or @@ -615,6 +657,17 @@ tagged_instances: "TE_GALAXY": "bar", "USER_INPUTS": null } + updateconf: + description: A dictionary of key/values attributes that are set with the updateconf API call + type: dict + version_added: 6.3.0 + sample: { + "OS": { "ARCH": "x86_64" }, + "CONTEXT": { + "START_SCRIPT": "ip r r 169.254.16.86/32 dev eth0", + "SSH_PUBLIC_KEY": "ssh-rsa ...\\nssh-ed25519 ..." + } + } ''' try: @@ -623,9 +676,52 @@ try: except ImportError: HAS_PYONE = False -from ansible.module_utils.basic import AnsibleModule + import os +from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.common.dict_transformations import dict_merge + +from ansible_collections.community.general.plugins.module_utils.opennebula import flatten, render + + +UPDATECONF_ATTRIBUTES = { + "OS": ["ARCH", "MACHINE", "KERNEL", "INITRD", "BOOTLOADER", "BOOT", "SD_DISK_BUS", "UUID"], + "FEATURES": ["ACPI", "PAE", "APIC", "LOCALTIME", "HYPERV", "GUEST_AGENT"], + "INPUT": ["TYPE", "BUS"], + "GRAPHICS": ["TYPE", "LISTEN", "PASSWD", "KEYMAP"], + "RAW": ["DATA", "DATA_VMX", "TYPE"], + "CONTEXT": [], +} + + +def check_updateconf(module, to_check): + '''Checks if attributes are compatible with one.vm.updateconf API call.''' + for attr, subattributes in to_check.items(): + if attr not in UPDATECONF_ATTRIBUTES: + module.fail_json(msg="'{0:}' is not a valid VM attribute.".format(attr)) + if not UPDATECONF_ATTRIBUTES[attr]: + continue + for subattr in subattributes: + if subattr not in UPDATECONF_ATTRIBUTES[attr]: + module.fail_json(msg="'{0:}' is not a valid VM subattribute of '{1:}'".format(subattr, attr)) + + +def parse_updateconf(vm_template): + '''Extracts 'updateconf' attributes from a VM template.''' + updateconf = {} + for attr, subattributes in vm_template.items(): + if attr not in UPDATECONF_ATTRIBUTES: + continue + tmp = {} + for subattr, value in subattributes.items(): + if UPDATECONF_ATTRIBUTES[attr] and subattr not in UPDATECONF_ATTRIBUTES[attr]: + continue + tmp[subattr] = value + if tmp: + updateconf[attr] = tmp + return updateconf + def get_template(module, client, predicate): @@ -767,6 +863,8 @@ def get_vm_info(client, vm): vm_labels, vm_attributes = get_vm_labels_and_attributes_dict(client, vm.ID) + updateconf = parse_updateconf(vm.TEMPLATE) + info = { 'template_id': int(vm.TEMPLATE['TEMPLATE_ID']), 'vm_id': vm.ID, @@ -785,7 +883,8 @@ def get_vm_info(client, vm): 'uptime_h': int(vm_uptime), 'attributes': vm_attributes, 'mode': permissions_str, - 'labels': vm_labels + 'labels': vm_labels, + 'updateconf': updateconf, } return info @@ -844,6 +943,28 @@ def set_vm_ownership(module, client, vms, owner_id, group_id): return changed +def update_vm(module, client, vm, updateconf_dict): + changed = False + if not updateconf_dict: + return changed + + before = client.vm.info(vm.ID).TEMPLATE + + client.vm.updateconf(vm.ID, render(updateconf_dict), 1) # 1: Merge new template with the existing one. + + after = client.vm.info(vm.ID).TEMPLATE + + changed = before != after + return changed + + +def update_vms(module, client, vms, *args): + changed = False + for vm in vms: + changed = update_vm(module, client, vm, *args) or changed + return changed + + def get_size_in_MB(module, size_str): SYMBOLS = ['B', 'KB', 'MB', 'GB', 'TB'] @@ -871,81 +992,46 @@ def get_size_in_MB(module, size_str): return size_in_MB -def create_disk_str(module, client, template_id, disk_size_list): - - if not disk_size_list: - return '' - - template = client.template.info(template_id) - if isinstance(template.TEMPLATE['DISK'], list): - # check if the number of disks is correct - if len(template.TEMPLATE['DISK']) != len(disk_size_list): - module.fail_json(msg='This template has ' + str(len(template.TEMPLATE['DISK'])) + ' disks but you defined ' + str(len(disk_size_list))) - result = '' - index = 0 - for DISKS in template.TEMPLATE['DISK']: - disk = {} - diskresult = '' - # Get all info about existed disk e.g. IMAGE_ID,... - for key, value in DISKS.items(): - disk[key] = value - # copy disk attributes if it is not the size attribute - diskresult += 'DISK = [' + ','.join('{key}="{val}"'.format(key=key, val=val) for key, val in disk.items() if key != 'SIZE') - # Set the Disk Size - diskresult += ', SIZE=' + str(int(get_size_in_MB(module, disk_size_list[index]))) + ']\n' - result += diskresult - index += 1 - else: - if len(disk_size_list) > 1: - module.fail_json(msg='This template has one disk but you defined ' + str(len(disk_size_list))) - disk = {} - # Get all info about existed disk e.g. IMAGE_ID,... - for key, value in template.TEMPLATE['DISK'].items(): - disk[key] = value - # copy disk attributes if it is not the size attribute - result = 'DISK = [' + ','.join('{key}="{val}"'.format(key=key, val=val) for key, val in disk.items() if key != 'SIZE') - # Set the Disk Size - result += ', SIZE=' + str(int(get_size_in_MB(module, disk_size_list[0]))) + ']\n' - - return result - - -def create_attributes_str(attributes_dict, labels_list): - - attributes_str = '' - - if labels_list: - attributes_str += 'LABELS="' + ','.join('{label}'.format(label=label) for label in labels_list) + '"\n' - if attributes_dict: - attributes_str += '\n'.join('{key}="{val}"'.format(key=key.upper(), val=val) for key, val in attributes_dict.items()) + '\n' - - return attributes_str - - -def create_nics_str(network_attrs_list): - nics_str = '' - - for network in network_attrs_list: - # Packing key-value dict in string with format key="value", key="value" - network_str = ','.join('{key}="{val}"'.format(key=key, val=val) for key, val in network.items()) - nics_str = nics_str + 'NIC = [' + network_str + ']\n' - - return nics_str - - -def create_vm(module, client, template_id, attributes_dict, labels_list, disk_size, network_attrs_list, vm_start_on_hold, vm_persistent): - +def create_vm(module, client, template_id, attributes_dict, labels_list, disk_size, network_attrs_list, vm_start_on_hold, vm_persistent, updateconf_dict): if attributes_dict: vm_name = attributes_dict.get('NAME', '') - disk_str = create_disk_str(module, client, template_id, disk_size) - vm_extra_template_str = create_attributes_str(attributes_dict, labels_list) + create_nics_str(network_attrs_list) + disk_str + template = client.template.info(template_id).TEMPLATE + + disk_count = len(flatten(template.get('DISK', []))) + if disk_size: + size_count = len(flatten(disk_size)) + # check if the number of disks is correct + if disk_count != size_count: + module.fail_json(msg='This template has ' + str(disk_count) + ' disks but you defined ' + str(size_count)) + + vm_extra_template = dict_merge(template or {}, attributes_dict or {}) + vm_extra_template = dict_merge(vm_extra_template, { + 'LABELS': ','.join(labels_list), + 'NIC': flatten(network_attrs_list, extract=True), + 'DISK': flatten([ + disk if not size else dict_merge(disk, { + 'SIZE': str(int(get_size_in_MB(module, size))), + }) + for disk, size in zip( + flatten(template.get('DISK', [])), + flatten(disk_size or [None] * disk_count), + ) + if disk is not None + ], extract=True) + }) + vm_extra_template = dict_merge(vm_extra_template, updateconf_dict or {}) + try: - vm_id = client.template.instantiate(template_id, vm_name, vm_start_on_hold, vm_extra_template_str, vm_persistent) + vm_id = client.template.instantiate(template_id, + vm_name, + vm_start_on_hold, + render(vm_extra_template), + vm_persistent) except pyone.OneException as e: module.fail_json(msg=str(e)) - vm = get_vm_by_id(client, vm_id) + vm = get_vm_by_id(client, vm_id) return get_vm_info(client, vm) @@ -1028,8 +1114,10 @@ def get_all_vms_by_attributes(client, attributes_dict, labels_list): return vm_list -def create_count_of_vms( - module, client, template_id, count, attributes_dict, labels_list, disk_size, network_attrs_list, wait, wait_timeout, vm_start_on_hold, vm_persistent): +def create_count_of_vms(module, client, + template_id, count, + attributes_dict, labels_list, disk_size, network_attrs_list, + wait, wait_timeout, vm_start_on_hold, vm_persistent, updateconf_dict): new_vms_list = [] vm_name = '' @@ -1058,7 +1146,9 @@ def create_count_of_vms( new_vm_name += next_index # Update NAME value in the attributes in case there is index attributes_dict['NAME'] = new_vm_name - new_vm_dict = create_vm(module, client, template_id, attributes_dict, labels_list, disk_size, network_attrs_list, vm_start_on_hold, vm_persistent) + new_vm_dict = create_vm(module, client, + template_id, attributes_dict, labels_list, disk_size, network_attrs_list, + vm_start_on_hold, vm_persistent, updateconf_dict) new_vm_id = new_vm_dict.get('vm_id') new_vm = get_vm_by_id(client, new_vm_id) new_vms_list.append(new_vm) @@ -1076,9 +1166,10 @@ def create_count_of_vms( return True, new_vms_list, [] -def create_exact_count_of_vms(module, client, template_id, exact_count, attributes_dict, count_attributes_dict, - labels_list, count_labels_list, disk_size, network_attrs_list, hard, wait, wait_timeout, vm_start_on_hold, vm_persistent): - +def create_exact_count_of_vms(module, client, + template_id, exact_count, attributes_dict, count_attributes_dict, + labels_list, count_labels_list, disk_size, network_attrs_list, + hard, wait, wait_timeout, vm_start_on_hold, vm_persistent, updateconf_dict): vm_list = get_all_vms_by_attributes(client, count_attributes_dict, count_labels_list) vm_count_diff = exact_count - len(vm_list) @@ -1095,7 +1186,7 @@ def create_exact_count_of_vms(module, client, template_id, exact_count, attribut # Add more VMs changed, instances_list, tagged_instances = create_count_of_vms(module, client, template_id, vm_count_diff, attributes_dict, labels_list, disk_size, network_attrs_list, wait, wait_timeout, - vm_start_on_hold, vm_persistent) + vm_start_on_hold, vm_persistent, updateconf_dict) tagged_instances_list += instances_list elif vm_count_diff < 0: @@ -1398,7 +1489,8 @@ def main(): "labels": {"default": [], "type": "list", "elements": "str"}, "count_labels": {"required": False, "type": "list", "elements": "str"}, "disk_saveas": {"type": "dict"}, - "persistent": {"default": False, "type": "bool"} + "persistent": {"default": False, "type": "bool"}, + "updateconf": {"type": "dict"}, } module = AnsibleModule(argument_spec=fields, @@ -1452,6 +1544,7 @@ def main(): count_labels = params.get('count_labels') disk_saveas = params.get('disk_saveas') persistent = params.get('persistent') + updateconf = params.get('updateconf') if not (auth.username and auth.password): module.warn("Credentials missing") @@ -1470,6 +1563,9 @@ def main(): attributes = copy.copy(count_attributes) check_attributes(module, count_attributes) + if updateconf: + check_updateconf(module, updateconf) + if count_labels and not labels: module.warn('When you pass `count_labels` without `labels` option when deploying, `labels` option will have same values implicitly.') labels = count_labels @@ -1529,13 +1625,13 @@ def main(): # Deploy an exact count of VMs changed, instances_list, tagged_instances_list = create_exact_count_of_vms(module, one_client, template_id, exact_count, attributes, count_attributes, labels, count_labels, disk_size, - networks, hard, wait, wait_timeout, put_vm_on_hold, persistent) + networks, hard, wait, wait_timeout, put_vm_on_hold, persistent, updateconf) vms = tagged_instances_list elif template_id is not None and state == 'present': # Deploy count VMs changed, instances_list, tagged_instances_list = create_count_of_vms(module, one_client, template_id, count, attributes, labels, disk_size, networks, wait, wait_timeout, - put_vm_on_hold, persistent) + put_vm_on_hold, persistent, updateconf) # instances_list - new instances # tagged_instances_list - all instances with specified `count_attributes` and `count_labels` vms = instances_list @@ -1587,6 +1683,9 @@ def main(): if owner_id is not None or group_id is not None: changed = set_vm_ownership(module, one_client, vms, owner_id, group_id) or changed + if template_id is None and updateconf is not None: + changed = update_vms(module, one_client, vms, updateconf) or changed + if wait and not module.check_mode and state != 'present': wait_for = { 'absent': wait_for_done, diff --git a/tests/unit/plugins/module_utils/test_opennebula.py b/tests/unit/plugins/module_utils/test_opennebula.py new file mode 100644 index 0000000000..3dd2e91876 --- /dev/null +++ b/tests/unit/plugins/module_utils/test_opennebula.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2023, Michal Opala +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import textwrap + +import pytest + +from ansible_collections.community.general.plugins.module_utils.opennebula import flatten, render + + +FLATTEN_VALID = [ + ( + [[[1]], [2], 3], + False, + [1, 2, 3] + ), + ( + [[[1]], [2], 3], + True, + [1, 2, 3] + ), + ( + [[1]], + False, + [1] + ), + ( + [[1]], + True, + 1 + ), + ( + 1, + False, + [1] + ), + ( + 1, + True, + 1 + ), +] + +RENDER_VALID = [ + ( + { + "NIC": {"NAME": "NIC0", "NETWORK_ID": 0}, + "CPU": 1, + "MEMORY": 1024, + }, + textwrap.dedent(''' + CPU="1" + MEMORY="1024" + NIC=[NAME="NIC0",NETWORK_ID="0"] + ''').strip() + ), + ( + { + "NIC": [ + {"NAME": "NIC0", "NETWORK_ID": 0}, + {"NAME": "NIC1", "NETWORK_ID": 1}, + ], + "CPU": 1, + "MEMORY": 1024, + }, + textwrap.dedent(''' + CPU="1" + MEMORY="1024" + NIC=[NAME="NIC0",NETWORK_ID="0"] + NIC=[NAME="NIC1",NETWORK_ID="1"] + ''').strip() + ), +] + + +@pytest.mark.parametrize('to_flatten,extract,expected_result', FLATTEN_VALID) +def test_flatten(to_flatten, extract, expected_result): + result = flatten(to_flatten, extract) + assert result == expected_result, repr(result) + + +@pytest.mark.parametrize('to_render,expected_result', RENDER_VALID) +def test_render(to_render, expected_result): + result = render(to_render) + assert result == expected_result, repr(result) diff --git a/tests/unit/plugins/modules/test_one_vm.py b/tests/unit/plugins/modules/test_one_vm.py new file mode 100644 index 0000000000..f89a0c63df --- /dev/null +++ b/tests/unit/plugins/modules/test_one_vm.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2023, Michal Opala +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os + +import pytest + +from ansible_collections.community.general.plugins.modules.one_vm import parse_updateconf + + +PARSE_UPDATECONF_VALID = [ + ( + { + "CPU": 1, + "OS": {"ARCH": 2}, + }, + { + "OS": {"ARCH": 2}, + } + ), + ( + { + "OS": {"ARCH": 1, "ASD": 2}, # "ASD" is an invalid attribute, we ignore it + }, + { + "OS": {"ARCH": 1}, + } + ), + ( + { + "OS": {"ASD": 1}, # "ASD" is an invalid attribute, we ignore it + }, + { + } + ), + ( + { + "MEMORY": 1, + "CONTEXT": { + "PASSWORD": 2, + "SSH_PUBLIC_KEY": 3, + }, + }, + { + "CONTEXT": { + "PASSWORD": 2, + "SSH_PUBLIC_KEY": 3, + }, + } + ), +] + + +@pytest.mark.parametrize('vm_template,expected_result', PARSE_UPDATECONF_VALID) +def test_parse_updateconf(vm_template, expected_result): + result = parse_updateconf(vm_template) + assert result == expected_result, repr(result) From 6c6de8fb90cb273250517a603d61eb49bd2603ee Mon Sep 17 00:00:00 2001 From: yhal003 Date: Mon, 30 Jan 2023 03:18:40 +1300 Subject: [PATCH 0438/2104] add external user support to ipa_group module (#5897) * add external user support to ipa_group module * add changelog * fix style errors * remove trailing whitespace * Update plugins/modules/ipa_group.py Co-authored-by: Felix Fontein * Update plugins/modules/ipa_group.py Co-authored-by: Felix Fontein * Update plugins/modules/ipa_group.py Co-authored-by: Felix Fontein * Update plugins/modules/ipa_group.py Co-authored-by: Felix Fontein * Update changelogs/fragments/5897-ipa_group-add-external-users.yml Co-authored-by: Felix Fontein * Update plugins/modules/ipa_group.py Co-authored-by: Felix Fontein * Update plugins/modules/ipa_group.py Co-authored-by: Felix Fontein --------- Co-authored-by: Yuriy Halytskyy Co-authored-by: Felix Fontein --- .../5897-ipa_group-add-external-users.yml | 2 + plugins/modules/ipa_group.py | 56 ++++++++++++++++++- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5897-ipa_group-add-external-users.yml diff --git a/changelogs/fragments/5897-ipa_group-add-external-users.yml b/changelogs/fragments/5897-ipa_group-add-external-users.yml new file mode 100644 index 0000000000..e41ea7a97c --- /dev/null +++ b/changelogs/fragments/5897-ipa_group-add-external-users.yml @@ -0,0 +1,2 @@ +minor_changes: + - ipa_group - allow to add and remove external users with the ``external_user`` option (https://github.com/ansible-collections/community.general/pull/5897). \ No newline at end of file diff --git a/plugins/modules/ipa_group.py b/plugins/modules/ipa_group.py index fa3c610d90..89cc806d2d 100644 --- a/plugins/modules/ipa_group.py +++ b/plugins/modules/ipa_group.py @@ -64,6 +64,17 @@ options: - If option is omitted assigned users will not be checked or changed. type: list elements: str + external_user: + description: + - List of external users assigned to this group. + - Behaves identically to I(user) with respect to I(append) attribute. + - List entries can be in C(DOMAIN\\username) or SID format. + - Unless SIDs are provided, the module will always attempt to make changes even if the group already has all the users. + This is because only SIDs are returned by IPA query. + - I(external=true) is needed for this option to work. + type: list + elements: str + version_added: 6.3.0 state: description: - State to ensure @@ -116,6 +127,28 @@ EXAMPLES = r''' ipa_user: admin ipa_pass: topsecret +- name: Add external user to a group + community.general.ipa_group: + name: developers + external: true + append: true + external_user: + - S-1-5-21-123-1234-12345-63421 + ipa_host: ipa.example.com + ipa_user: admin + ipa_pass: topsecret + +- name: Add a user from MYDOMAIN + community.general.ipa_group: + name: developers + external: true + append: true + external_user: + - MYDOMAIN\\john + ipa_host: ipa.example.com + ipa_user: admin + ipa_pass: topsecret + - name: Ensure group is absent community.general.ipa_group: name: sysops @@ -164,6 +197,9 @@ class GroupIPAClient(IPAClient): def group_add_member_user(self, name, item): return self.group_add_member(name=name, item={'user': item}) + def group_add_member_externaluser(self, name, item): + return self.group_add_member(name=name, item={'ipaexternalmember': item}) + def group_remove_member(self, name, item): return self._post_json(method='group_remove_member', name=name, item=item) @@ -173,6 +209,9 @@ class GroupIPAClient(IPAClient): def group_remove_member_user(self, name, item): return self.group_remove_member(name=name, item={'user': item}) + def group_remove_member_externaluser(self, name, item): + return self.group_remove_member(name=name, item={'ipaexternalmember': item}) + def get_group_dict(description=None, external=None, gid=None, nonposix=None): group = {} @@ -208,12 +247,19 @@ def ensure(module, client): name = module.params['cn'] group = module.params['group'] user = module.params['user'] + external = module.params['external'] + external_user = module.params['external_user'] append = module.params['append'] - module_group = get_group_dict(description=module.params['description'], external=module.params['external'], - gid=module.params['gidnumber'], nonposix=module.params['nonposix']) + module_group = get_group_dict(description=module.params['description'], + external=external, + gid=module.params['gidnumber'], + nonposix=module.params['nonposix']) ipa_group = client.group_find(name=name) + if (not (external or external_user is None)): + module.fail_json("external_user can only be set if external = True") + changed = False if state == 'present': if not ipa_group: @@ -242,6 +288,11 @@ def ensure(module, client): client.group_remove_member_user, append=append) or changed + if external_user is not None: + changed = client.modify_if_diff(name, ipa_group.get('ipaexternalmember', []), external_user, + client.group_add_member_externaluser, + client.group_remove_member_externaluser, + append=append) or changed else: if ipa_group: changed = True @@ -256,6 +307,7 @@ def main(): argument_spec.update(cn=dict(type='str', required=True, aliases=['name']), description=dict(type='str'), external=dict(type='bool'), + external_user=dict(type='list', elements='str'), gidnumber=dict(type='str', aliases=['gid']), group=dict(type='list', elements='str'), nonposix=dict(type='bool'), From 3da24d50cdadfd4aa383800f72ca6dab22ee93f2 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Jan 2023 18:18:27 +0100 Subject: [PATCH 0439/2104] dig lookup: fix DNSKEY's algorithm handling (#5914) Fix DNSKEY's algorithm handling. --- changelogs/fragments/5914-dig-dnskey.yml | 2 ++ plugins/lookup/dig.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5914-dig-dnskey.yml diff --git a/changelogs/fragments/5914-dig-dnskey.yml b/changelogs/fragments/5914-dig-dnskey.yml new file mode 100644 index 0000000000..d6a26388d2 --- /dev/null +++ b/changelogs/fragments/5914-dig-dnskey.yml @@ -0,0 +1,2 @@ +bugfixes: + - "dig lookup plugin - correctly handle DNSKEY record type's ``algorithm`` field (https://github.com/ansible-collections/community.general/pull/5914)." diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index ceaff15e9f..e8c6d86497 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -230,7 +230,7 @@ def make_rdata_dict(rdata): NSEC3PARAM: ['algorithm', 'flags', 'iterations', 'salt'], PTR: ['target'], RP: ['mbox', 'txt'], - # RRSIG: ['algorithm', 'labels', 'original_ttl', 'expiration', 'inception', 'signature'], + # RRSIG: ['type_covered', 'algorithm', 'labels', 'original_ttl', 'expiration', 'inception', 'key_tag', 'signer', 'signature'], SOA: ['mname', 'rname', 'serial', 'refresh', 'retry', 'expire', 'minimum'], SPF: ['strings'], SRV: ['priority', 'weight', 'port', 'target'], @@ -251,6 +251,8 @@ def make_rdata_dict(rdata): if rdata.rdtype == DS and f == 'digest': val = dns.rdata._hexify(rdata.digest).replace(' ', '') + if rdata.rdtype == DNSKEY and f == 'algorithm': + val = int(val) if rdata.rdtype == DNSKEY and f == 'key': val = dns.rdata._base64ify(rdata.key).replace(' ', '') if rdata.rdtype == NSEC3PARAM and f == 'salt': From 451c90251ad4b41e2f3b9a2c7e8bb557a1d5733f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Jan 2023 18:19:14 +0100 Subject: [PATCH 0440/2104] dig lookup: support CAA record type (#5913) * Support CAA record type. * Update return docs. --- changelogs/fragments/5913-dig-caa.yml | 2 ++ plugins/lookup/dig.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5913-dig-caa.yml diff --git a/changelogs/fragments/5913-dig-caa.yml b/changelogs/fragments/5913-dig-caa.yml new file mode 100644 index 0000000000..62ff698737 --- /dev/null +++ b/changelogs/fragments/5913-dig-caa.yml @@ -0,0 +1,2 @@ +minor_changes: + - "dig lookup plugin - support CAA record type (https://github.com/ansible-collections/community.general/pull/5913)." diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index e8c6d86497..d0d94e988a 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -35,9 +35,10 @@ DOCUMENTATION = ''' description: - Record type to query. - C(DLV) has been removed in community.general 6.0.0. + - C(CAA) has been added in community.general 6.3.0. type: str default: 'A' - choices: [A, ALL, AAAA, CNAME, DNAME, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT] + choices: [A, ALL, AAAA, CAA, CNAME, DNAME, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, RRSIG, SOA, SPF, SRV, SSHFP, TLSA, TXT] flat: description: If 0 each record is returned as a dictionary, otherwise a string. type: int @@ -129,6 +130,12 @@ RETURN = """ AAAA: description: - address + CAA: + description: + - flags + - tag + - value + version_added: 6.3.0 CNAME: description: - target @@ -198,7 +205,7 @@ try: import dns.resolver import dns.reversename import dns.rdataclass - from dns.rdatatype import (A, AAAA, CNAME, DNAME, DNSKEY, DS, HINFO, LOC, + from dns.rdatatype import (A, AAAA, CAA, CNAME, DNAME, DNSKEY, DS, HINFO, LOC, MX, NAPTR, NS, NSEC3PARAM, PTR, RP, SOA, SPF, SRV, SSHFP, TLSA, TXT) HAVE_DNS = True except ImportError: @@ -218,6 +225,7 @@ def make_rdata_dict(rdata): supported_types = { A: ['address'], AAAA: ['address'], + CAA: ['flags', 'tag', 'value'], CNAME: ['target'], DNAME: ['target'], DNSKEY: ['flags', 'algorithm', 'protocol', 'key'], From 393f2d615383e384002dd38cb123f423a6975907 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Jan 2023 22:12:27 +0100 Subject: [PATCH 0441/2104] Fix PLATFORM attributes docs fragment (#5918) Fix PLATFORM attributes docs fragment. --- plugins/doc_fragments/attributes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/doc_fragments/attributes.py b/plugins/doc_fragments/attributes.py index e7ab495916..9b8488e0a5 100644 --- a/plugins/doc_fragments/attributes.py +++ b/plugins/doc_fragments/attributes.py @@ -21,6 +21,8 @@ attributes: ''' PLATFORM = r''' +options: {} +attributes: platform: description: Target OS/families that can be operated against. support: N/A From dcc3d4f50843b54aee82a44b059466149d692fa5 Mon Sep 17 00:00:00 2001 From: Renaud <33203203+redat00@users.noreply.github.com> Date: Mon, 30 Jan 2023 06:30:54 +0100 Subject: [PATCH 0442/2104] Add support for setenv parameters (#5883) --- ...doers-add-support-for-setenv-parameter.yml | 2 ++ plugins/modules/sudoers.py | 22 ++++++++++++++++++- .../targets/sudoers/tasks/main.yml | 16 +++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5883-sudoers-add-support-for-setenv-parameter.yml diff --git a/changelogs/fragments/5883-sudoers-add-support-for-setenv-parameter.yml b/changelogs/fragments/5883-sudoers-add-support-for-setenv-parameter.yml new file mode 100644 index 0000000000..f713428136 --- /dev/null +++ b/changelogs/fragments/5883-sudoers-add-support-for-setenv-parameter.yml @@ -0,0 +1,2 @@ +minor_changes: + - sudoers - add ``setenv`` parameters to support passing environment variables via sudo. (https://github.com/ansible-collections/community.general/pull/5883) diff --git a/plugins/modules/sudoers.py b/plugins/modules/sudoers.py index f2bcb20b75..fd29b189f0 100644 --- a/plugins/modules/sudoers.py +++ b/plugins/modules/sudoers.py @@ -43,6 +43,12 @@ options: - Whether a password will be required to run the sudo'd command. default: true type: bool + setenv: + description: + - Whether to allow keeping the environment when command is run with sudo. + default: false + type: bool + version_added: 6.3.0 host: description: - Specify the host the rule is for. @@ -123,6 +129,13 @@ EXAMPLES = ''' community.general.sudoers: name: alice-service state: absent + +- name: Allow alice to sudo /usr/local/bin/upload and keep env variables + community.general.sudoers: + name: allow-alice-upload + user: alice + commands: /usr/local/bin/upload + setenv: true ''' import os @@ -143,6 +156,7 @@ class Sudoers(object): self.group = module.params['group'] self.state = module.params['state'] self.nopassword = module.params['nopassword'] + self.setenv = module.params['setenv'] self.host = module.params['host'] self.runas = module.params['runas'] self.sudoers_path = module.params['sudoers_path'] @@ -185,12 +199,14 @@ class Sudoers(object): commands_str = ', '.join(self.commands) nopasswd_str = 'NOPASSWD:' if self.nopassword else '' + setenv_str = 'SETENV:' if self.setenv else '' runas_str = '({runas})'.format(runas=self.runas) if self.runas is not None else '' - return "{owner} {host}={runas}{nopasswd} {commands}\n".format( + return "{owner} {host}={runas}{nopasswd}{setenv} {commands}\n".format( owner=owner, host=self.host, runas=runas_str, nopasswd=nopasswd_str, + setenv=setenv_str, commands=commands_str ) @@ -239,6 +255,10 @@ def main(): 'type': 'bool', 'default': True, }, + 'setenv': { + 'type': 'bool', + 'default': False, + }, 'host': { 'type': 'str', 'default': 'ALL', diff --git a/tests/integration/targets/sudoers/tasks/main.yml b/tests/integration/targets/sudoers/tasks/main.yml index a44307ad9e..dd62025d5e 100644 --- a/tests/integration/targets/sudoers/tasks/main.yml +++ b/tests/integration/targets/sudoers/tasks/main.yml @@ -145,6 +145,20 @@ src: "{{ sudoers_path }}/my-sudo-rule-7" register: rule_7_contents +- name: Create rule with setenv parameters + community.general.sudoers: + name: my-sudo-rule-8 + state: present + user: alice + commands: /usr/local/bin/command + setenv: true + register: rule_8 + +- name: Grab contents of my-sudo-rule-8 + ansible.builtin.slurp: + src: "{{ sudoers_path }}/my-sudo-rule-8" + register: rule_8_contents + - name: Revoke rule 1 community.general.sudoers: name: my-sudo-rule-1 @@ -202,7 +216,6 @@ when: ansible_os_family != 'Darwin' register: edge_case_3 - - name: Revoke non-existing rule community.general.sudoers: name: non-existing-rule @@ -243,6 +256,7 @@ - "rule_5_contents['content'] | b64decode == 'alice ALL=NOPASSWD: /usr/local/bin/command\n'" - "rule_6_contents['content'] | b64decode == 'alice ALL=(bob)NOPASSWD: /usr/local/bin/command\n'" - "rule_7_contents['content'] | b64decode == 'alice host-1=NOPASSWD: /usr/local/bin/command\n'" + - "rule_8_contents['content'] | b64decode == 'alice ALL=NOPASSWD:SETENV: /usr/local/bin/command\n'" - name: Check revocation stat ansible.builtin.assert: From 31ff3f662d91fc36e453415ccb229282b479f96c Mon Sep 17 00:00:00 2001 From: cfiehe Date: Mon, 30 Jan 2023 21:03:13 +0100 Subject: [PATCH 0443/2104] Fixes #5907: gitlab_runner is not idempotent on first run after runner creation (#5908) This fix introduces the new boolean option 'access_level_on_creation'. It controls, whether the value of 'access_level' is used for runner registration or not. The option 'access_level' has been ignored on registration so far and was only used on updates. The user is informed by a deprecation warning, if the option is unspecified. For reasons of compatibility 'false' is assumed in that case. The option 'access_level_on_creation' will switch to 'true' for the next major release (community.general 7.0.0) Signed-off-by: Christoph Fiehe Co-authored-by: Christoph Fiehe --- .../5907-fix-gitlab_runner-not-idempotent.yml | 4 ++ plugins/modules/gitlab_runner.py | 53 +++++++++++++------ 2 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 changelogs/fragments/5907-fix-gitlab_runner-not-idempotent.yml diff --git a/changelogs/fragments/5907-fix-gitlab_runner-not-idempotent.yml b/changelogs/fragments/5907-fix-gitlab_runner-not-idempotent.yml new file mode 100644 index 0000000000..a7386b8c73 --- /dev/null +++ b/changelogs/fragments/5907-fix-gitlab_runner-not-idempotent.yml @@ -0,0 +1,4 @@ +minor_changes: + - gitlab_runner - add new boolean option ``access_level_on_creation``. It controls, whether the value of ``access_level`` is used for runner registration or not. The option ``access_level`` has been ignored on registration so far and was only used on updates (https://github.com/ansible-collections/community.general/issues/5907, https://github.com/ansible-collections/community.general/pull/5908). +deprecated_features: + - gitlab_runner - the default of the new option ``access_level_on_creation`` will change from ``false`` to ``true`` in community.general 7.0.0. This will cause ``access_level`` to be used during runner registration as well, and not only during updates (https://github.com/ansible-collections/community.general/pull/5908). diff --git a/plugins/modules/gitlab_runner.py b/plugins/modules/gitlab_runner.py index 1094df9424..9d7c900cc5 100644 --- a/plugins/modules/gitlab_runner.py +++ b/plugins/modules/gitlab_runner.py @@ -84,12 +84,23 @@ options: access_level: description: - Determines if a runner can pick up jobs only from protected branches. + - If I(access_level_on_creation) is not explicitly set to C(true), this option is ignored on registration and + is only applied on updates. - If set to C(ref_protected), runner can pick up jobs only from protected branches. - If set to C(not_protected), runner can pick up jobs from both protected and unprotected branches. required: false default: ref_protected choices: ["ref_protected", "not_protected"] type: str + access_level_on_creation: + description: + - Whether the runner should be registered with an access level or not. + - If set to C(true), the value of I(access_level) is used for runner registration. + - If set to C(false), GitLab registers the runner with the default access level. + - The current default of this option is C(false). This default is deprecated and will change to C(true) in commuinty.general 7.0.0. + required: false + type: bool + version_added: 6.3.0 maximum_timeout: description: - The maximum time that a runner has to complete a specific job. @@ -207,27 +218,34 @@ class GitLabRunner(object): def create_or_update_runner(self, description, options): changed = False + arguments = { + 'active': options['active'], + 'locked': options['locked'], + 'run_untagged': options['run_untagged'], + 'maximum_timeout': options['maximum_timeout'], + 'tag_list': options['tag_list'], + } # Because we have already call userExists in main() if self.runner_object is None: - runner = self.create_runner({ - 'description': description, - 'active': options['active'], - 'token': options['registration_token'], - 'locked': options['locked'], - 'run_untagged': options['run_untagged'], - 'maximum_timeout': options['maximum_timeout'], - 'tag_list': options['tag_list'], - }) + arguments['description'] = description + arguments['token'] = options['registration_token'] + + access_level_on_creation = self._module.params['access_level_on_creation'] + if access_level_on_creation is None: + message = "The option 'access_level_on_creation' is unspecified, so 'false' is assumed. "\ + "That means any value of 'access_level' is ignored and GitLab registers the runner with its default value. "\ + "The option 'access_level_on_creation' will switch to 'true' in community.general 7.0.0" + self._module.deprecate(message, version='7.0.0', collection_name='community.general') + access_level_on_creation = False + + if access_level_on_creation: + arguments['access_level'] = options['access_level'] + + runner = self.create_runner(arguments) changed = True else: - changed, runner = self.update_runner(self.runner_object, { - 'active': options['active'], - 'locked': options['locked'], - 'run_untagged': options['run_untagged'], - 'maximum_timeout': options['maximum_timeout'], - 'access_level': options['access_level'], - 'tag_list': options['tag_list'], - }) + arguments['access_level'] = options['access_level'] + changed, runner = self.update_runner(self.runner_object, arguments) self.runner_object = runner if changed: @@ -328,6 +346,7 @@ def main(): run_untagged=dict(type='bool', default=True), locked=dict(type='bool', default=False), access_level=dict(type='str', default='ref_protected', choices=["not_protected", "ref_protected"]), + access_level_on_creation=dict(type='bool'), maximum_timeout=dict(type='int', default=3600), registration_token=dict(type='str', no_log=True), project=dict(type='str'), From ea5cbe2553716192c9a15f93532c286d1ddec1d1 Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Mon, 30 Jan 2023 15:05:22 -0500 Subject: [PATCH 0444/2104] Redfish: Removed basic auth header when performing a GET on the service root and POST to the session collection (#5903) * Redfish: Removed basic auth header when performing a GET on the service root and POST to the session collection * Update changelogs/fragments/5886-redfish-correct-basic-auth-usage-on-session-creation.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- ...t-basic-auth-usage-on-session-creation.yml | 2 ++ plugins/module_utils/redfish_utils.py | 35 ++++++++++++------- 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 changelogs/fragments/5886-redfish-correct-basic-auth-usage-on-session-creation.yml diff --git a/changelogs/fragments/5886-redfish-correct-basic-auth-usage-on-session-creation.yml b/changelogs/fragments/5886-redfish-correct-basic-auth-usage-on-session-creation.yml new file mode 100644 index 0000000000..25ec0746a6 --- /dev/null +++ b/changelogs/fragments/5886-redfish-correct-basic-auth-usage-on-session-creation.yml @@ -0,0 +1,2 @@ +bugfixes: + - redfish_utils - removed basic auth HTTP header when performing a GET on the service root resource and when performing a POST to the session collection (https://github.com/ansible-collections/community.general/issues/5886). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 4a56346c3f..eadca28205 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -38,6 +38,8 @@ class RedfishUtils(object): self.timeout = timeout self.module = module self.service_root = '/redfish/v1/' + self.session_service_uri = '/redfish/v1/SessionService' + self.sessions_uri = '/redfish/v1/SessionService/Sessions' self.resource_id = resource_id self.data_modification = data_modification self.strip_etag_quotes = strip_etag_quotes @@ -125,6 +127,10 @@ class RedfishUtils(object): req_headers = dict(GET_HEADERS) username, password, basic_auth = self._auth_params(req_headers) try: + # Service root is an unauthenticated resource; remove credentials + # in case the caller will be using sessions later. + if uri == (self.root_uri + self.service_root): + basic_auth = False resp = open_url(uri, method="GET", headers=req_headers, url_username=username, url_password=password, force_basic_auth=basic_auth, validate_certs=False, @@ -151,6 +157,11 @@ class RedfishUtils(object): req_headers = dict(POST_HEADERS) username, password, basic_auth = self._auth_params(req_headers) try: + # When performing a POST to the session collection, credentials are + # provided in the request body. Do not provide the basic auth + # header since this can cause conflicts with some services + if self.sessions_uri is not None and uri == (self.root_uri + self.sessions_uri): + basic_auth = False resp = open_url(uri, data=json.dumps(pyld), headers=req_headers, method="POST", url_username=username, url_password=password, @@ -363,23 +374,23 @@ class RedfishUtils(object): return {'ret': True} def _find_sessionservice_resource(self): + # Get the service root response = self.get_request(self.root_uri + self.service_root) if response['ret'] is False: return response data = response['data'] - if 'SessionService' not in data: + + # Check for the session service and session collection. Well-known + # defaults are provided in the constructor, but services that predate + # Redfish 1.6.0 might contain different values. + self.session_service_uri = data.get('SessionService', {}).get('@odata.id') + self.sessions_uri = data.get('Links', {}).get('Sessions', {}).get('@odata.id') + + # If one isn't found, return an error + if self.session_service_uri is None: return {'ret': False, 'msg': "SessionService resource not found"} - else: - session_service = data["SessionService"]["@odata.id"] - self.session_service_uri = session_service - response = self.get_request(self.root_uri + session_service) - if response['ret'] is False: - return response - data = response['data'] - sessions = data['Sessions']['@odata.id'] - if sessions[-1:] == '/': - sessions = sessions[:-1] - self.sessions_uri = sessions + if self.sessions_uri is None: + return {'ret': False, 'msg': "SessionCollection resource not found"} return {'ret': True} def _get_resource_uri_by_id(self, uris, id_prop): From 84dbb286ebc26fcda1155eac5ca690faed7a5b56 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 31 Jan 2023 07:15:12 +0100 Subject: [PATCH 0445/2104] Fix changelog fragment types. --- changelogs/fragments/5811-clarify-bitwarden-error.yml | 2 +- changelogs/fragments/5888-update-key-title.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/5811-clarify-bitwarden-error.yml b/changelogs/fragments/5811-clarify-bitwarden-error.yml index 343faba478..ee9a3c72b1 100644 --- a/changelogs/fragments/5811-clarify-bitwarden-error.yml +++ b/changelogs/fragments/5811-clarify-bitwarden-error.yml @@ -1,2 +1,2 @@ -minor_changes: +bugfixes: - bitwarden lookup plugin - clarify what to do, if the bitwarden vault is not unlocked (https://github.com/ansible-collections/community.general/pull/5811). diff --git a/changelogs/fragments/5888-update-key-title.yml b/changelogs/fragments/5888-update-key-title.yml index e620ad3d79..d98dcc4c17 100644 --- a/changelogs/fragments/5888-update-key-title.yml +++ b/changelogs/fragments/5888-update-key-title.yml @@ -1,2 +1,2 @@ -minor_changes: +bugfixes: - gitlab_deploy_key - also update ``title`` and not just ``can_push`` (https://github.com/ansible-collections/community.general/pull/5888). From 868699dc5f8ecfbf007681419dfe07b0c5db0ac2 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 31 Jan 2023 07:33:49 +0100 Subject: [PATCH 0446/2104] Next release will be 6.4.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 09c85cf2b8..b44b59bf5a 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.3.0 +version: 6.4.0 readme: README.md authors: - Ansible (https://github.com/ansible) From a64df658c5eb09621feffb2f6e4c6b0b14501c59 Mon Sep 17 00:00:00 2001 From: Lars Krahl <57526005+mmslkr@users.noreply.github.com> Date: Fri, 3 Feb 2023 11:02:14 +0100 Subject: [PATCH 0447/2104] Replace missing default favicon with docs.ansible.com favicon (#5928) * replace missing default favicon with docs.ansible.com * create changelog fragment for PR 5928 * move changelog fragment * fix parameter description Co-authored-by: Felix Fontein * fix parameter description Co-authored-by: Felix Fontein * add affected modules in changelog fragment Co-authored-by: Felix Fontein --------- Co-authored-by: Lars Krahl Co-authored-by: Felix Fontein --- changelogs/fragments/5928-fix-favicon-url.yml | 2 ++ plugins/modules/mattermost.py | 6 +++--- plugins/modules/rocketchat.py | 4 ++-- plugins/modules/slack.py | 6 +++--- tests/unit/plugins/modules/test_slack.py | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/5928-fix-favicon-url.yml diff --git a/changelogs/fragments/5928-fix-favicon-url.yml b/changelogs/fragments/5928-fix-favicon-url.yml new file mode 100644 index 0000000000..eccb9f4a0f --- /dev/null +++ b/changelogs/fragments/5928-fix-favicon-url.yml @@ -0,0 +1,2 @@ +minor_changes: + - mattermost, rocketchat, slack - replace missing default favicon with docs.ansible.com favicon (https://github.com/ansible-collections/community.general/pull/5928). diff --git a/plugins/modules/mattermost.py b/plugins/modules/mattermost.py index af6666b3cd..b3fe6b5680 100644 --- a/plugins/modules/mattermost.py +++ b/plugins/modules/mattermost.py @@ -60,8 +60,8 @@ options: icon_url: type: str description: - - Url for the message sender's icon. - default: https://www.ansible.com/favicon.ico + - URL for the message sender's icon. + default: https://docs.ansible.com/favicon.ico validate_certs: description: - If C(false), SSL certificates will not be validated. This should only be used @@ -127,7 +127,7 @@ def main(): text=dict(type='str'), channel=dict(type='str', default=None), username=dict(type='str', default='Ansible'), - icon_url=dict(type='str', default='https://www.ansible.com/favicon.ico'), + icon_url=dict(type='str', default='https://docs.ansible.com/favicon.ico'), validate_certs=dict(default=True, type='bool'), attachments=dict(type='list', elements='dict'), ), diff --git a/plugins/modules/rocketchat.py b/plugins/modules/rocketchat.py index 153567e22a..02458ed232 100644 --- a/plugins/modules/rocketchat.py +++ b/plugins/modules/rocketchat.py @@ -58,7 +58,7 @@ options: type: str description: - URL for the message sender's icon. - default: "https://www.ansible.com/favicon.ico" + default: "https://docs.ansible.com/favicon.ico" icon_emoji: type: str description: @@ -212,7 +212,7 @@ def main(): msg=dict(type='str', required=False), channel=dict(type='str'), username=dict(type='str', default='Ansible'), - icon_url=dict(type='str', default='https://www.ansible.com/favicon.ico'), + icon_url=dict(type='str', default='https://docs.ansible.com/favicon.ico'), icon_emoji=dict(type='str'), link_names=dict(type='int', default=1, choices=[0, 1]), validate_certs=dict(default=True, type='bool'), diff --git a/plugins/modules/slack.py b/plugins/modules/slack.py index 2854277f60..c1ae865cde 100644 --- a/plugins/modules/slack.py +++ b/plugins/modules/slack.py @@ -81,8 +81,8 @@ options: icon_url: type: str description: - - Url for the message sender's icon (default C(https://www.ansible.com/favicon.ico)) - default: https://www.ansible.com/favicon.ico + - URL for the message sender's icon (default C(https://docs.ansible.com/favicon.ico)) + default: https://docs.ansible.com/favicon.ico icon_emoji: type: str description: @@ -439,7 +439,7 @@ def main(): channel=dict(type='str'), thread_id=dict(type='str'), username=dict(type='str', default='Ansible'), - icon_url=dict(type='str', default='https://www.ansible.com/favicon.ico'), + icon_url=dict(type='str', default='https://docs.ansible.com/favicon.ico'), icon_emoji=dict(type='str'), link_names=dict(type='int', default=1, choices=[0, 1]), parse=dict(type='str', choices=['none', 'full']), diff --git a/tests/unit/plugins/modules/test_slack.py b/tests/unit/plugins/modules/test_slack.py index 352d3f4b94..ab4405baa7 100644 --- a/tests/unit/plugins/modules/test_slack.py +++ b/tests/unit/plugins/modules/test_slack.py @@ -142,7 +142,7 @@ class TestSlackModule(ModuleTestCase): }, 'accessory': { 'type': 'image', - 'image_url': 'https://www.ansible.com/favicon.ico', + 'image_url': 'https://docs.ansible.com/favicon.ico', 'alt_text': 'test' } }, { From b1d9507cd2986cc2f3e9d918a56477ef2eba3d1f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 4 Feb 2023 17:05:08 +0100 Subject: [PATCH 0448/2104] Fix pylint errors (#5933) * Fix pylint errors. * Also adjust to https://github.com/ansible/ansible/pull/79909. --- changelogs/fragments/5933-linting.yml | 2 ++ plugins/modules/gconftool2.py | 4 ++-- plugins/modules/pritunl_org.py | 2 +- plugins/modules/pritunl_org_info.py | 2 +- plugins/modules/pritunl_user.py | 2 +- plugins/modules/pritunl_user_info.py | 2 +- plugins/modules/terraform.py | 2 +- plugins/modules/timezone.py | 1 + plugins/modules/xfconf.py | 4 ++-- 9 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/5933-linting.yml diff --git a/changelogs/fragments/5933-linting.yml b/changelogs/fragments/5933-linting.yml new file mode 100644 index 0000000000..d0c46542bf --- /dev/null +++ b/changelogs/fragments/5933-linting.yml @@ -0,0 +1,2 @@ +bugfixes: + - "terraform and timezone - slight refactoring to avoid linter reporting potentially undefined variables (https://github.com/ansible-collections/community.general/pull/5933)." diff --git a/plugins/modules/gconftool2.py b/plugins/modules/gconftool2.py index a3ac8bb8f1..788aed3423 100644 --- a/plugins/modules/gconftool2.py +++ b/plugins/modules/gconftool2.py @@ -88,8 +88,8 @@ from ansible_collections.community.general.plugins.module_utils.gconftool2 impor class GConftool(StateModuleHelper): - change_params = 'value', - diff_params = 'value', + change_params = ('value', ) + diff_params = ('value', ) output_params = ('key', 'value_type') facts_params = ('key', 'value_type') facts_name = 'gconftool2' diff --git a/plugins/modules/pritunl_org.py b/plugins/modules/pritunl_org.py index 75c3564f24..4a6a8a3444 100644 --- a/plugins/modules/pritunl_org.py +++ b/plugins/modules/pritunl_org.py @@ -181,7 +181,7 @@ def main(): required=False, choices=["present", "absent"], default="present" ), ) - ), + ) module = AnsibleModule(argument_spec=argument_spec) diff --git a/plugins/modules/pritunl_org_info.py b/plugins/modules/pritunl_org_info.py index 7f3974e0e5..979e29b5a0 100644 --- a/plugins/modules/pritunl_org_info.py +++ b/plugins/modules/pritunl_org_info.py @@ -118,7 +118,7 @@ def main(): dict( organization=dict(required=False, type="str", default=None, aliases=["org"]) ) - ), + ) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) diff --git a/plugins/modules/pritunl_user.py b/plugins/modules/pritunl_user.py index 817d6fb3f6..f3feb94eed 100644 --- a/plugins/modules/pritunl_user.py +++ b/plugins/modules/pritunl_user.py @@ -336,7 +336,7 @@ def main(): user_gravatar=dict(required=False, type="bool", default=None), user_mac_addresses=dict(required=False, type="list", elements="str", default=None), ) - ), + ) module = AnsibleModule(argument_spec=argument_spec) diff --git a/plugins/modules/pritunl_user_info.py b/plugins/modules/pritunl_user_info.py index d4c68ca6e0..7b0399061f 100644 --- a/plugins/modules/pritunl_user_info.py +++ b/plugins/modules/pritunl_user_info.py @@ -160,7 +160,7 @@ def main(): default="client", ), ) - ), + ) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) diff --git a/plugins/modules/terraform.py b/plugins/modules/terraform.py index b6b09b0eb2..9d1cc2ed02 100644 --- a/plugins/modules/terraform.py +++ b/plugins/modules/terraform.py @@ -628,9 +628,9 @@ def main(): outputs_command = [command[0], 'output', '-no-color', '-json'] + _state_args(state_file) rc, outputs_text, outputs_err = module.run_command(outputs_command, cwd=project_path) + outputs = {} if rc == 1: module.warn("Could not get Terraform outputs. This usually means none have been defined.\nstdout: {0}\nstderr: {1}".format(outputs_text, outputs_err)) - outputs = {} elif rc != 0: module.fail_json( msg="Failure when getting Terraform outputs. " diff --git a/plugins/modules/timezone.py b/plugins/modules/timezone.py index 9e89462089..20404d3a79 100644 --- a/plugins/modules/timezone.py +++ b/plugins/modules/timezone.py @@ -356,6 +356,7 @@ class NosystemdTimezone(Timezone): def __init__(self, module): super(NosystemdTimezone, self).__init__(module) # Validate given timezone + planned_tz = '' if 'name' in self.value: tzfile = self._verify_timezone() planned_tz = self.value['name']['planned'] diff --git a/plugins/modules/xfconf.py b/plugins/modules/xfconf.py index ec00763ee1..0fff6f0d14 100644 --- a/plugins/modules/xfconf.py +++ b/plugins/modules/xfconf.py @@ -169,8 +169,8 @@ from ansible_collections.community.general.plugins.module_utils.xfconf import xf class XFConfProperty(StateModuleHelper): - change_params = 'value', - diff_params = 'value', + change_params = ('value', ) + diff_params = ('value', ) output_params = ('property', 'channel', 'value') module = dict( argument_spec=dict( From de193ac1bf1c2336d8b9e465e28093cb20bb14c1 Mon Sep 17 00:00:00 2001 From: cfiehe Date: Fri, 10 Feb 2023 13:54:24 +0100 Subject: [PATCH 0449/2104] Align 'gitlab_runner' with GitLab's default access level. (#5930) Signed-off-by: Christoph Fiehe Co-authored-by: Christoph Fiehe --- ...unner_access_level_default_with_gitlab.yml | 2 ++ plugins/modules/gitlab_runner.py | 27 ++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/5925-align_gitlab_runner_access_level_default_with_gitlab.yml diff --git a/changelogs/fragments/5925-align_gitlab_runner_access_level_default_with_gitlab.yml b/changelogs/fragments/5925-align_gitlab_runner_access_level_default_with_gitlab.yml new file mode 100644 index 0000000000..a14561f07e --- /dev/null +++ b/changelogs/fragments/5925-align_gitlab_runner_access_level_default_with_gitlab.yml @@ -0,0 +1,2 @@ +deprecated_features: + - gitlab_runner - the option ``access_level`` will lose its default value in community.general 8.0.0. From that version on, you have set this option to ``ref_protected`` explicitly, if you want to have a protected runner (https://github.com/ansible-collections/community.general/issues/5925). diff --git a/plugins/modules/gitlab_runner.py b/plugins/modules/gitlab_runner.py index 9d7c900cc5..e0ef43a316 100644 --- a/plugins/modules/gitlab_runner.py +++ b/plugins/modules/gitlab_runner.py @@ -86,11 +86,13 @@ options: - Determines if a runner can pick up jobs only from protected branches. - If I(access_level_on_creation) is not explicitly set to C(true), this option is ignored on registration and is only applied on updates. - - If set to C(ref_protected), runner can pick up jobs only from protected branches. - If set to C(not_protected), runner can pick up jobs from both protected and unprotected branches. + - If set to C(ref_protected), runner can pick up jobs only from protected branches. + - The current default is C(ref_protected). This will change to no default in community.general 8.0.0. + From that version on, if this option is not specified explicitly, GitLab will use C(not_protected) + on creation, and the value set will not be changed on any updates. required: false - default: ref_protected - choices: ["ref_protected", "not_protected"] + choices: ["not_protected", "ref_protected"] type: str access_level_on_creation: description: @@ -225,6 +227,9 @@ class GitLabRunner(object): 'maximum_timeout': options['maximum_timeout'], 'tag_list': options['tag_list'], } + if arguments['access_level'] is not None: + arguments['access_level'] = options['access_level'] + # Because we have already call userExists in main() if self.runner_object is None: arguments['description'] = description @@ -238,13 +243,12 @@ class GitLabRunner(object): self._module.deprecate(message, version='7.0.0', collection_name='community.general') access_level_on_creation = False - if access_level_on_creation: - arguments['access_level'] = options['access_level'] + if not access_level_on_creation: + del arguments['access_level'] runner = self.create_runner(arguments) changed = True else: - arguments['access_level'] = options['access_level'] changed, runner = self.update_runner(self.runner_object, arguments) self.runner_object = runner @@ -345,7 +349,7 @@ def main(): tag_list=dict(type='list', elements='str', default=[]), run_untagged=dict(type='bool', default=True), locked=dict(type='bool', default=False), - access_level=dict(type='str', default='ref_protected', choices=["not_protected", "ref_protected"]), + access_level=dict(type='str', choices=["not_protected", "ref_protected"]), access_level_on_creation=dict(type='bool'), maximum_timeout=dict(type='int', default=3600), registration_token=dict(type='str', no_log=True), @@ -387,6 +391,15 @@ def main(): registration_token = module.params['registration_token'] project = module.params['project'] + if access_level is None: + message = "The option 'access_level' is unspecified, so 'ref_protected' is assumed. "\ + "In order to align the module with GitLab's runner API, this option will lose "\ + "its default value in community.general 8.0.0. From that version on, you must set "\ + "this option to 'ref_protected' explicitly, if you want to have a protected runner, "\ + "otherwise GitLab's default access level gets applied, which is 'not_protected'" + module.deprecate(message, version='8.0.0', collection_name='community.general') + access_level = 'ref_protected' + gitlab_instance = gitlab_authentication(module) gitlab_project = None if project: From 2b8ac3c6292570e257c3aed9fc2d2550ccf736b1 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 12 Feb 2023 19:48:39 +0100 Subject: [PATCH 0450/2104] Remove unneccessary imports (#5940) * Remove unneccessary imports. * Keep unnecessary imports in module_utils - for now. * Make older sanity tests shut up. * Also make flake8 happier. --- changelogs/fragments/remove-unneeded-imports.yml | 2 ++ plugins/cache/memcached.py | 2 -- plugins/cache/redis.py | 2 -- plugins/callback/counter_enabled.py | 1 - plugins/callback/diy.py | 4 ---- plugins/callback/loganalytics.py | 1 - plugins/callback/mail.py | 1 - plugins/callback/nrdp.py | 3 --- plugins/callback/syslog_json.py | 3 --- plugins/callback/yaml.py | 6 ++---- plugins/filter/jc.py | 6 +++--- plugins/filter/lists_mergeby.py | 2 -- plugins/inventory/linode.py | 5 +---- plugins/inventory/lxd.py | 2 -- plugins/inventory/online.py | 2 +- plugins/lookup/consul_kv.py | 1 - plugins/lookup/credstash.py | 2 -- plugins/lookup/cyberarkpassword.py | 1 - plugins/lookup/etcd3.py | 5 ++--- plugins/lookup/hiera.py | 2 -- plugins/lookup/manifold.py | 1 - plugins/lookup/redis.py | 2 -- plugins/module_utils/dimensiondata.py | 7 ++++--- plugins/module_utils/influxdb.py | 4 ++-- plugins/module_utils/mh/module_helper.py | 3 ++- plugins/module_utils/module_helper.py | 15 ++++++++------- plugins/module_utils/oneview.py | 3 ++- plugins/module_utils/oracle/oci_utils.py | 5 +++-- plugins/module_utils/proxmox.py | 12 ++++++++---- plugins/module_utils/pure.py | 8 +++++--- plugins/module_utils/version.py | 4 ++-- plugins/modules/gitlab_project_variable.py | 2 +- plugins/modules/jenkins_plugin.py | 1 - plugins/modules/keycloak_authentication.py | 2 +- plugins/modules/keycloak_client_rolemapping.py | 5 +++-- plugins/modules/keycloak_clientscope.py | 2 +- plugins/modules/keycloak_user_rolemapping.py | 4 ++-- plugins/modules/lxc_container.py | 2 +- plugins/modules/macports.py | 1 - plugins/modules/manageiq_policies_info.py | 2 +- plugins/modules/mas.py | 1 - plugins/modules/memset_zone_record.py | 1 - plugins/modules/mksysb.py | 4 ---- plugins/modules/ocapi_command.py | 2 +- plugins/modules/ocapi_info.py | 2 +- plugins/modules/packet_device.py | 2 -- plugins/modules/scaleway_compute.py | 1 - plugins/modules/scaleway_container.py | 2 +- plugins/modules/scaleway_container_info.py | 2 +- plugins/modules/scaleway_container_namespace.py | 2 +- .../modules/scaleway_container_namespace_info.py | 2 +- plugins/modules/scaleway_container_registry.py | 2 +- .../modules/scaleway_container_registry_info.py | 2 +- plugins/modules/scaleway_function.py | 2 +- plugins/modules/scaleway_function_info.py | 2 +- plugins/modules/scaleway_function_namespace.py | 2 +- .../modules/scaleway_function_namespace_info.py | 2 +- plugins/modules/scaleway_security_group_rule.py | 3 +-- plugins/modules/xenserver_guest_info.py | 4 ++-- plugins/modules/xenserver_guest_powerstate.py | 4 ++-- 60 files changed, 74 insertions(+), 108 deletions(-) create mode 100644 changelogs/fragments/remove-unneeded-imports.yml diff --git a/changelogs/fragments/remove-unneeded-imports.yml b/changelogs/fragments/remove-unneeded-imports.yml new file mode 100644 index 0000000000..a5fed1d93e --- /dev/null +++ b/changelogs/fragments/remove-unneeded-imports.yml @@ -0,0 +1,2 @@ +bugfixes: + - "various plugins and modules - remove unnecessary imports (https://github.com/ansible-collections/community.general/pull/5940)." diff --git a/plugins/cache/memcached.py b/plugins/cache/memcached.py index 77f1717e45..0bc5256b3f 100644 --- a/plugins/cache/memcached.py +++ b/plugins/cache/memcached.py @@ -52,11 +52,9 @@ import time from multiprocessing import Lock from itertools import chain -from ansible import constants as C from ansible.errors import AnsibleError from ansible.module_utils.common._collections_compat import MutableSet from ansible.plugins.cache import BaseCacheModule -from ansible.release import __version__ as ansible_base_version from ansible.utils.display import Display try: diff --git a/plugins/cache/redis.py b/plugins/cache/redis.py index 81e960cf18..8c06217176 100644 --- a/plugins/cache/redis.py +++ b/plugins/cache/redis.py @@ -67,12 +67,10 @@ import re import time import json -from ansible import constants as C from ansible.errors import AnsibleError from ansible.module_utils.common.text.converters import to_native from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder from ansible.plugins.cache import BaseCacheModule -from ansible.release import __version__ as ansible_base_version from ansible.utils.display import Display try: diff --git a/plugins/callback/counter_enabled.py b/plugins/callback/counter_enabled.py index 555ebd29a6..27adc97a6c 100644 --- a/plugins/callback/counter_enabled.py +++ b/plugins/callback/counter_enabled.py @@ -27,7 +27,6 @@ DOCUMENTATION = ''' from ansible import constants as C from ansible.plugins.callback import CallbackBase from ansible.utils.color import colorize, hostcolor -from ansible.template import Templar from ansible.playbook.task_include import TaskInclude diff --git a/plugins/callback/diy.py b/plugins/callback/diy.py index 55a07725f2..75b3f4e24b 100644 --- a/plugins/callback/diy.py +++ b/plugins/callback/diy.py @@ -786,10 +786,6 @@ playbook.yml: > import sys from contextlib import contextmanager -from ansible import constants as C -from ansible.playbook.task_include import TaskInclude -from ansible.plugins.callback import CallbackBase -from ansible.utils.color import colorize, hostcolor from ansible.template import Templar from ansible.vars.manager import VariableManager from ansible.plugins.callback.default import CallbackModule as Default diff --git a/plugins/callback/loganalytics.py b/plugins/callback/loganalytics.py index 8690aac934..fbcdc6f89f 100644 --- a/plugins/callback/loganalytics.py +++ b/plugins/callback/loganalytics.py @@ -54,7 +54,6 @@ examples: | import hashlib import hmac import base64 -import logging import json import uuid import socket diff --git a/plugins/callback/mail.py b/plugins/callback/mail.py index a605d13eac..9e8314baf8 100644 --- a/plugins/callback/mail.py +++ b/plugins/callback/mail.py @@ -79,7 +79,6 @@ import re import email.utils import smtplib -from ansible.module_utils.six import string_types from ansible.module_utils.common.text.converters import to_bytes from ansible.parsing.ajson import AnsibleJSONEncoder from ansible.plugins.callback import CallbackBase diff --git a/plugins/callback/nrdp.py b/plugins/callback/nrdp.py index 8295bf9759..c16a3c7bec 100644 --- a/plugins/callback/nrdp.py +++ b/plugins/callback/nrdp.py @@ -67,9 +67,6 @@ DOCUMENTATION = ''' type: string ''' -import os -import json - from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.urls import open_url diff --git a/plugins/callback/syslog_json.py b/plugins/callback/syslog_json.py index 2bd8f6e604..0f5ec4d0d9 100644 --- a/plugins/callback/syslog_json.py +++ b/plugins/callback/syslog_json.py @@ -54,9 +54,6 @@ DOCUMENTATION = ''' version_added: 4.5.0 ''' -import os -import json - import logging import logging.handlers diff --git a/plugins/callback/yaml.py b/plugins/callback/yaml.py index 73782de151..ae2c8f8810 100644 --- a/plugins/callback/yaml.py +++ b/plugins/callback/yaml.py @@ -25,12 +25,10 @@ import yaml import json import re import string -import sys -from ansible.module_utils.common.text.converters import to_bytes, to_text -from ansible.module_utils.six import string_types +from ansible.module_utils.common.text.converters import to_text from ansible.parsing.yaml.dumper import AnsibleDumper -from ansible.plugins.callback import CallbackBase, strip_internal_keys, module_response_deepcopy +from ansible.plugins.callback import strip_internal_keys, module_response_deepcopy from ansible.plugins.callback.default import CallbackModule as Default diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index 6708f573d3..742d4147a1 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -80,13 +80,13 @@ from ansible.errors import AnsibleError, AnsibleFilterError import importlib try: - import jc + import jc # noqa: F401, pylint: disable=unused-import HAS_LIB = True except ImportError: HAS_LIB = False -def jc(data, parser, quiet=True, raw=False): +def jc_filter(data, parser, quiet=True, raw=False): """Convert returned command output to JSON using the JC library Arguments: @@ -150,5 +150,5 @@ class FilterModule(object): def filters(self): return { - 'jc': jc + 'jc': jc_filter, } diff --git a/plugins/filter/lists_mergeby.py b/plugins/filter/lists_mergeby.py index a89039ed89..036dfe4d7c 100644 --- a/plugins/filter/lists_mergeby.py +++ b/plugins/filter/lists_mergeby.py @@ -102,8 +102,6 @@ from ansible.errors import AnsibleFilterError from ansible.module_utils.six import string_types from ansible.module_utils.common._collections_compat import Mapping, Sequence from ansible.utils.vars import merge_hash -from ansible.release import __version__ as ansible_version -from ansible_collections.community.general.plugins.module_utils.version import LooseVersion from collections import defaultdict from operator import itemgetter diff --git a/plugins/inventory/linode.py b/plugins/inventory/linode.py index ea87a9a58e..b28cfa27ba 100644 --- a/plugins/inventory/linode.py +++ b/plugins/inventory/linode.py @@ -121,10 +121,7 @@ compose: ansible_host: "ipv4 | community.general.json_query('[?public==`false`].address') | first" ''' -import os - -from ansible.errors import AnsibleError, AnsibleParserError -from ansible.module_utils.six import string_types +from ansible.errors import AnsibleError from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable diff --git a/plugins/inventory/lxd.py b/plugins/inventory/lxd.py index 2e37de70c1..bd0a6ce008 100644 --- a/plugins/inventory/lxd.py +++ b/plugins/inventory/lxd.py @@ -150,12 +150,10 @@ groupby: attribute: internals ''' -import binascii import json import re import time import os -import socket from ansible.plugins.inventory import BaseInventoryPlugin from ansible.module_utils.common.text.converters import to_native, to_text from ansible.module_utils.common.dict_transformations import dict_merge diff --git a/plugins/inventory/online.py b/plugins/inventory/online.py index 261548d8a2..3fccd58d2f 100644 --- a/plugins/inventory/online.py +++ b/plugins/inventory/online.py @@ -65,7 +65,7 @@ from sys import version as python_version from ansible.errors import AnsibleError from ansible.module_utils.urls import open_url from ansible.plugins.inventory import BaseInventoryPlugin -from ansible.module_utils.common.text.converters import to_native, to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.ansible_release import __version__ as ansible_version from ansible.module_utils.six.moves.urllib.parse import urljoin diff --git a/plugins/lookup/consul_kv.py b/plugins/lookup/consul_kv.py index 2d4a202d94..f17f1b2694 100644 --- a/plugins/lookup/consul_kv.py +++ b/plugins/lookup/consul_kv.py @@ -105,7 +105,6 @@ RETURN = """ type: dict """ -import os from ansible.module_utils.six.moves.urllib.parse import urlparse from ansible.errors import AnsibleError, AnsibleAssertionError from ansible.plugins.lookup import LookupBase diff --git a/plugins/lookup/credstash.py b/plugins/lookup/credstash.py index d49d5b23cb..6a3f58595b 100644 --- a/plugins/lookup/credstash.py +++ b/plugins/lookup/credstash.py @@ -93,8 +93,6 @@ RETURN = """ type: str """ -import os - from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase diff --git a/plugins/lookup/cyberarkpassword.py b/plugins/lookup/cyberarkpassword.py index 1e005e23e8..c3cc427df8 100644 --- a/plugins/lookup/cyberarkpassword.py +++ b/plugins/lookup/cyberarkpassword.py @@ -80,7 +80,6 @@ from subprocess import Popen from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase -from ansible.parsing.splitter import parse_kv from ansible.module_utils.common.text.converters import to_bytes, to_text, to_native from ansible.utils.display import Display diff --git a/plugins/lookup/etcd3.py b/plugins/lookup/etcd3.py index df41d791e8..7f0a0cf90e 100644 --- a/plugins/lookup/etcd3.py +++ b/plugins/lookup/etcd3.py @@ -136,12 +136,11 @@ RETURN = ''' import re -from ansible.plugins.lookup import LookupBase -from ansible.utils.display import Display +from ansible.errors import AnsibleLookupError from ansible.module_utils.basic import missing_required_lib from ansible.module_utils.common.text.converters import to_native from ansible.plugins.lookup import LookupBase -from ansible.errors import AnsibleError, AnsibleLookupError +from ansible.utils.display import Display try: import etcd3 diff --git a/plugins/lookup/hiera.py b/plugins/lookup/hiera.py index 1049e80b02..fa4d0a1999 100644 --- a/plugins/lookup/hiera.py +++ b/plugins/lookup/hiera.py @@ -61,8 +61,6 @@ RETURN = """ elements: str """ -import os - from ansible.plugins.lookup import LookupBase from ansible.utils.cmd_functions import run_cmd from ansible.module_utils.common.text.converters import to_text diff --git a/plugins/lookup/manifold.py b/plugins/lookup/manifold.py index 51064b9c2b..049d453e4f 100644 --- a/plugins/lookup/manifold.py +++ b/plugins/lookup/manifold.py @@ -69,7 +69,6 @@ from ansible.utils.display import Display from traceback import format_exception import json import sys -import os display = Display() diff --git a/plugins/lookup/redis.py b/plugins/lookup/redis.py index 490751a398..43b046a798 100644 --- a/plugins/lookup/redis.py +++ b/plugins/lookup/redis.py @@ -73,8 +73,6 @@ _raw: elements: str """ -import os - HAVE_REDIS = False try: import redis diff --git a/plugins/module_utils/dimensiondata.py b/plugins/module_utils/dimensiondata.py index 308615bfe4..0300f6c1e9 100644 --- a/plugins/module_utils/dimensiondata.py +++ b/plugins/module_utils/dimensiondata.py @@ -19,15 +19,16 @@ import os import re import traceback -from ansible.module_utils.basic import AnsibleModule, missing_required_lib +# (TODO: remove AnsibleModule from next line!) +from ansible.module_utils.basic import AnsibleModule, missing_required_lib # noqa: F401, pylint: disable=unused-import from ansible.module_utils.six.moves import configparser from os.path import expanduser from uuid import UUID LIBCLOUD_IMP_ERR = None try: - from libcloud.common.dimensiondata import API_ENDPOINTS, DimensionDataAPIException, DimensionDataStatus - from libcloud.compute.base import Node, NodeLocation + from libcloud.common.dimensiondata import API_ENDPOINTS, DimensionDataAPIException, DimensionDataStatus # noqa: F401, pylint: disable=unused-import + from libcloud.compute.base import Node, NodeLocation # noqa: F401, pylint: disable=unused-import from libcloud.compute.providers import get_driver from libcloud.compute.types import Provider diff --git a/plugins/module_utils/influxdb.py b/plugins/module_utils/influxdb.py index 9a30e76428..580cabe7d5 100644 --- a/plugins/module_utils/influxdb.py +++ b/plugins/module_utils/influxdb.py @@ -15,7 +15,7 @@ from ansible_collections.community.general.plugins.module_utils.version import L REQUESTS_IMP_ERR = None try: - import requests.exceptions + import requests.exceptions # noqa: F401, pylint: disable=unused-import HAS_REQUESTS = True except ImportError: REQUESTS_IMP_ERR = traceback.format_exc() @@ -25,7 +25,7 @@ INFLUXDB_IMP_ERR = None try: from influxdb import InfluxDBClient from influxdb import __version__ as influxdb_version - from influxdb import exceptions + from influxdb import exceptions # noqa: F401, pylint: disable=unused-import HAS_INFLUXDB = True except ImportError: INFLUXDB_IMP_ERR = traceback.format_exc() diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 6813b5454b..212ebb48fe 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -9,7 +9,8 @@ __metaclass__ = type from ansible.module_utils.common.dict_transformations import dict_merge -from ansible_collections.community.general.plugins.module_utils.mh.base import ModuleHelperBase, AnsibleModule +# (TODO: remove AnsibleModule!) pylint: disable-next-line=unused-import +from ansible_collections.community.general.plugins.module_utils.mh.base import ModuleHelperBase, AnsibleModule # noqa: F401 from ansible_collections.community.general.plugins.module_utils.mh.mixins.cmd import CmdMixin from ansible_collections.community.general.plugins.module_utils.mh.mixins.state import StateMixin from ansible_collections.community.general.plugins.module_utils.mh.mixins.deps import DependencyMixin diff --git a/plugins/module_utils/module_helper.py b/plugins/module_utils/module_helper.py index 4cda4175c7..ec7f1b1b78 100644 --- a/plugins/module_utils/module_helper.py +++ b/plugins/module_utils/module_helper.py @@ -8,12 +8,13 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.plugins.module_utils.mh.module_helper import ( +from ansible_collections.community.general.plugins.module_utils.mh.module_helper import ( # noqa: F401, pylint: disable=unused-import ModuleHelper, StateModuleHelper, CmdModuleHelper, CmdStateModuleHelper, AnsibleModule ) -from ansible_collections.community.general.plugins.module_utils.mh.mixins.cmd import CmdMixin, ArgFormat -from ansible_collections.community.general.plugins.module_utils.mh.mixins.state import StateMixin -from ansible_collections.community.general.plugins.module_utils.mh.mixins.deps import DependencyCtxMgr -from ansible_collections.community.general.plugins.module_utils.mh.exceptions import ModuleHelperException -from ansible_collections.community.general.plugins.module_utils.mh.deco import cause_changes, module_fails_on_exception -from ansible_collections.community.general.plugins.module_utils.mh.mixins.vars import VarMeta, VarDict +from ansible_collections.community.general.plugins.module_utils.mh.mixins.cmd import CmdMixin, ArgFormat # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.module_utils.mh.mixins.state import StateMixin # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.module_utils.mh.mixins.deps import DependencyCtxMgr # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.module_utils.mh.exceptions import ModuleHelperException # noqa: F401, pylint: disable=unused-import +# pylint: disable-next-line=unused-import +from ansible_collections.community.general.plugins.module_utils.mh.deco import cause_changes, module_fails_on_exception # noqa: F401 +from ansible_collections.community.general.plugins.module_utils.mh.mixins.vars import VarMeta, VarDict # noqa: F401, pylint: disable=unused-import diff --git a/plugins/module_utils/oneview.py b/plugins/module_utils/oneview.py index dfd00c514e..4315a462dc 100644 --- a/plugins/module_utils/oneview.py +++ b/plugins/module_utils/oneview.py @@ -16,7 +16,8 @@ __metaclass__ = type import abc import collections import json -import os +# (TODO: remove next line!) +import os # noqa: F401, pylint: disable=unused-import import traceback HPE_ONEVIEW_IMP_ERR = None diff --git a/plugins/module_utils/oracle/oci_utils.py b/plugins/module_utils/oracle/oci_utils.py index 76fb45324b..3d9c20f2ac 100644 --- a/plugins/module_utils/oracle/oci_utils.py +++ b/plugins/module_utils/oracle/oci_utils.py @@ -10,13 +10,14 @@ import logging import logging.config import os import tempfile -from datetime import datetime +# (TODO: remove next line!) +from datetime import datetime # noqa: F401, pylint: disable=unused-import from operator import eq import time try: - import yaml + import yaml # noqa: F401, pylint: disable=unused-import import oci from oci.constants import HEADER_NEXT_PAGE diff --git a/plugins/module_utils/proxmox.py b/plugins/module_utils/proxmox.py index 96a96c8b3c..58287cec17 100644 --- a/plugins/module_utils/proxmox.py +++ b/plugins/module_utils/proxmox.py @@ -7,9 +7,12 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -import atexit -import time -import re +# (TODO: remove next line!) +import atexit # noqa: F401, pylint: disable=unused-import +# (TODO: remove next line!) +import time # noqa: F401, pylint: disable=unused-import +# (TODO: remove next line!) +import re # noqa: F401, pylint: disable=unused-import import traceback PROXMOXER_IMP_ERR = None @@ -22,7 +25,8 @@ except ImportError: from ansible.module_utils.basic import env_fallback, missing_required_lib -from ansible.module_utils.common.text.converters import to_native +# (TODO: remove next line!) +from ansible.module_utils.common.text.converters import to_native # noqa: F401, pylint: disable=unused-import from ansible_collections.community.general.plugins.module_utils.version import LooseVersion diff --git a/plugins/module_utils/pure.py b/plugins/module_utils/pure.py index c9914c38b5..8210e28f4d 100644 --- a/plugins/module_utils/pure.py +++ b/plugins/module_utils/pure.py @@ -21,13 +21,15 @@ except ImportError: HAS_PURITY_FB = True try: - from purity_fb import PurityFb, FileSystem, FileSystemSnapshot, SnapshotSuffix, rest + from purity_fb import PurityFb, FileSystem, FileSystemSnapshot, SnapshotSuffix, rest # noqa: F401, pylint: disable=unused-import except ImportError: HAS_PURITY_FB = False -from functools import wraps +# (TODO: remove next line!) +from functools import wraps # noqa: F401, pylint: disable=unused-import from os import environ -from os import path +# (TODO: remove next line!) +from os import path # noqa: F401, pylint: disable=unused-import import platform VERSION = 1.2 diff --git a/plugins/module_utils/version.py b/plugins/module_utils/version.py index b671e59628..3699881978 100644 --- a/plugins/module_utils/version.py +++ b/plugins/module_utils/version.py @@ -13,10 +13,10 @@ __metaclass__ = type from ansible.module_utils.six import raise_from try: - from ansible.module_utils.compat.version import LooseVersion + from ansible.module_utils.compat.version import LooseVersion # noqa: F401, pylint: disable=unused-import except ImportError: try: - from distutils.version import LooseVersion + from distutils.version import LooseVersion # noqa: F401, pylint: disable=unused-import except ImportError as exc: msg = 'To use this plugin or module with ansible-core 2.11, you need to use Python < 3.12 with distutils.version present' raise_from(ImportError(msg), exc) diff --git a/plugins/modules/gitlab_project_variable.py b/plugins/modules/gitlab_project_variable.py index 986847c07b..5e6a2904dc 100644 --- a/plugins/modules/gitlab_project_variable.py +++ b/plugins/modules/gitlab_project_variable.py @@ -182,7 +182,7 @@ from ansible.module_utils.six import integer_types GITLAB_IMP_ERR = None try: - import gitlab + import gitlab # noqa: F401, pylint: disable=unused-import HAS_GITLAB_PACKAGE = True except Exception: GITLAB_IMP_ERR = traceback.format_exc() diff --git a/plugins/modules/jenkins_plugin.py b/plugins/modules/jenkins_plugin.py index c4e1b7fb66..9c4c42e675 100644 --- a/plugins/modules/jenkins_plugin.py +++ b/plugins/modules/jenkins_plugin.py @@ -295,7 +295,6 @@ import io import json import os import tempfile -import time from ansible.module_utils.basic import AnsibleModule, to_bytes from ansible.module_utils.six.moves import http_cookiejar as cookiejar diff --git a/plugins/modules/keycloak_authentication.py b/plugins/modules/keycloak_authentication.py index 4f56582951..5ec53f9d8c 100644 --- a/plugins/modules/keycloak_authentication.py +++ b/plugins/modules/keycloak_authentication.py @@ -206,7 +206,7 @@ end_state: ''' from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak \ - import KeycloakAPI, camel, keycloak_argument_spec, get_token, KeycloakError, is_struct_included + import KeycloakAPI, keycloak_argument_spec, get_token, KeycloakError, is_struct_included from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/keycloak_client_rolemapping.py b/plugins/modules/keycloak_client_rolemapping.py index f0da97ef59..efb9e77cf7 100644 --- a/plugins/modules/keycloak_client_rolemapping.py +++ b/plugins/modules/keycloak_client_rolemapping.py @@ -201,8 +201,9 @@ end_state: } ''' -from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ - keycloak_argument_spec, get_token, KeycloakError, is_struct_included +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import ( + KeycloakAPI, keycloak_argument_spec, get_token, KeycloakError, +) from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/keycloak_clientscope.py b/plugins/modules/keycloak_clientscope.py index 0ac6836f7b..1bba8ba77d 100644 --- a/plugins/modules/keycloak_clientscope.py +++ b/plugins/modules/keycloak_clientscope.py @@ -295,7 +295,7 @@ end_state: ''' from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ - keycloak_argument_spec, get_token, KeycloakError, is_struct_included + keycloak_argument_spec, get_token, KeycloakError from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/keycloak_user_rolemapping.py b/plugins/modules/keycloak_user_rolemapping.py index 72d403c637..9e909716ac 100644 --- a/plugins/modules/keycloak_user_rolemapping.py +++ b/plugins/modules/keycloak_user_rolemapping.py @@ -225,8 +225,8 @@ end_state: } ''' -from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ - keycloak_argument_spec, get_token, KeycloakError, is_struct_included +from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, \ + keycloak_argument_spec, get_token, KeycloakError from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/lxc_container.py b/plugins/modules/lxc_container.py index 9fe27b8d81..4e7f43419a 100644 --- a/plugins/modules/lxc_container.py +++ b/plugins/modules/lxc_container.py @@ -433,7 +433,7 @@ else: HAS_LXC = True from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.parsing.convert_bool import boolean, BOOLEANS_FALSE +from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE from ansible.module_utils.common.text.converters import to_text, to_bytes diff --git a/plugins/modules/macports.py b/plugins/modules/macports.py index 398a5552e0..7bf5c4f532 100644 --- a/plugins/modules/macports.py +++ b/plugins/modules/macports.py @@ -99,7 +99,6 @@ EXAMPLES = ''' import re from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.six.moves import shlex_quote def selfupdate(module, port_path): diff --git a/plugins/modules/manageiq_policies_info.py b/plugins/modules/manageiq_policies_info.py index c10ee95327..8a75ef6464 100644 --- a/plugins/modules/manageiq_policies_info.py +++ b/plugins/modules/manageiq_policies_info.py @@ -81,7 +81,7 @@ profiles: ''' from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, ManageIQPolicies, manageiq_argument_spec, manageiq_entities +from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec, manageiq_entities def main(): diff --git a/plugins/modules/mas.py b/plugins/modules/mas.py index 49faa53d9d..af77110da7 100644 --- a/plugins/modules/mas.py +++ b/plugins/modules/mas.py @@ -97,7 +97,6 @@ EXAMPLES = ''' RETURN = r''' # ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.common.text.converters import to_native import os from ansible_collections.community.general.plugins.module_utils.version import LooseVersion diff --git a/plugins/modules/memset_zone_record.py b/plugins/modules/memset_zone_record.py index 925a034c56..16a1c3a742 100644 --- a/plugins/modules/memset_zone_record.py +++ b/plugins/modules/memset_zone_record.py @@ -166,7 +166,6 @@ memset_api: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.memset import get_zone_id from ansible_collections.community.general.plugins.module_utils.memset import memset_api_call -from ansible_collections.community.general.plugins.module_utils.memset import get_zone_id def api_validation(args=None): diff --git a/plugins/modules/mksysb.py b/plugins/modules/mksysb.py index 15b6ad9442..39f3e6a1c4 100644 --- a/plugins/modules/mksysb.py +++ b/plugins/modules/mksysb.py @@ -101,10 +101,6 @@ import os from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper -from ansible_collections.community.general.plugins.module_utils.module_helper import ( - ArgFormat -) - class MkSysB(ModuleHelper): module = dict( diff --git a/plugins/modules/ocapi_command.py b/plugins/modules/ocapi_command.py index 7d8fca8064..73c0e22bd5 100644 --- a/plugins/modules/ocapi_command.py +++ b/plugins/modules/ocapi_command.py @@ -165,7 +165,7 @@ operationStatusId: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ocapi_utils import OcapiUtils from ansible.module_utils.common.text.converters import to_native -from ansible.module_utils.six.moves.urllib.parse import quote_plus, urljoin +from ansible.module_utils.six.moves.urllib.parse import urljoin # More will be added as module features are expanded CATEGORY_COMMANDS_ALL = { diff --git a/plugins/modules/ocapi_info.py b/plugins/modules/ocapi_info.py index c827b4522d..2cb7a3afca 100644 --- a/plugins/modules/ocapi_info.py +++ b/plugins/modules/ocapi_info.py @@ -141,7 +141,7 @@ status: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ocapi_utils import OcapiUtils from ansible.module_utils.common.text.converters import to_native -from ansible.module_utils.six.moves.urllib.parse import quote_plus, urljoin +from ansible.module_utils.six.moves.urllib.parse import urljoin # More will be added as module features are expanded CATEGORY_COMMANDS_ALL = { diff --git a/plugins/modules/packet_device.py b/plugins/modules/packet_device.py index 500a400273..a2c2d1d653 100644 --- a/plugins/modules/packet_device.py +++ b/plugins/modules/packet_device.py @@ -292,8 +292,6 @@ try: except ImportError: HAS_PACKET_SDK = False -from ansible.module_utils.basic import AnsibleModule - NAME_RE = r'({0}|{0}{1}*{0})'.format(r'[a-zA-Z0-9]', r'[a-zA-Z0-9\-]') HOSTNAME_RE = r'({0}\.)*{0}$'.format(NAME_RE) diff --git a/plugins/modules/scaleway_compute.py b/plugins/modules/scaleway_compute.py index 3acdc8bd77..0da3f0ff24 100644 --- a/plugins/modules/scaleway_compute.py +++ b/plugins/modules/scaleway_compute.py @@ -177,7 +177,6 @@ import datetime import time from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.six.moves.urllib.parse import quote as urlquote from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway SCALEWAY_SERVER_STATES = ( diff --git a/plugins/modules/scaleway_container.py b/plugins/modules/scaleway_container.py index 6bc237ee39..85e746e1f5 100644 --- a/plugins/modules/scaleway_container.py +++ b/plugins/modules/scaleway_container.py @@ -200,7 +200,7 @@ container: from copy import deepcopy from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed, SecretVariables ) diff --git a/plugins/modules/scaleway_container_info.py b/plugins/modules/scaleway_container_info.py index 993919c7ee..670c63a0bc 100644 --- a/plugins/modules/scaleway_container_info.py +++ b/plugins/modules/scaleway_container_info.py @@ -89,7 +89,7 @@ container: ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, ) from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/scaleway_container_namespace.py b/plugins/modules/scaleway_container_namespace.py index 4cfde73542..e7bf7c71f1 100644 --- a/plugins/modules/scaleway_container_namespace.py +++ b/plugins/modules/scaleway_container_namespace.py @@ -126,7 +126,7 @@ container_namespace: from copy import deepcopy from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed, SecretVariables ) diff --git a/plugins/modules/scaleway_container_namespace_info.py b/plugins/modules/scaleway_container_namespace_info.py index fea2d8474b..758720dd57 100644 --- a/plugins/modules/scaleway_container_namespace_info.py +++ b/plugins/modules/scaleway_container_namespace_info.py @@ -81,7 +81,7 @@ container_namespace: ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, ) from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/scaleway_container_registry.py b/plugins/modules/scaleway_container_registry.py index 294be2cb4c..f49b19917a 100644 --- a/plugins/modules/scaleway_container_registry.py +++ b/plugins/modules/scaleway_container_registry.py @@ -113,7 +113,7 @@ container_registry: ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed ) from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/scaleway_container_registry_info.py b/plugins/modules/scaleway_container_registry_info.py index c0682cefbe..9c641edcbb 100644 --- a/plugins/modules/scaleway_container_registry_info.py +++ b/plugins/modules/scaleway_container_registry_info.py @@ -80,7 +80,7 @@ container_registry: ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, ) from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/scaleway_function.py b/plugins/modules/scaleway_function.py index b54091c6ab..5e7ac2a3d1 100644 --- a/plugins/modules/scaleway_function.py +++ b/plugins/modules/scaleway_function.py @@ -184,7 +184,7 @@ function: from copy import deepcopy from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed, SecretVariables ) diff --git a/plugins/modules/scaleway_function_info.py b/plugins/modules/scaleway_function_info.py index 14a4cd6289..c30f0cdb00 100644 --- a/plugins/modules/scaleway_function_info.py +++ b/plugins/modules/scaleway_function_info.py @@ -89,7 +89,7 @@ function: ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway ) from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/scaleway_function_namespace.py b/plugins/modules/scaleway_function_namespace.py index cae4c5ede5..243bb7124c 100644 --- a/plugins/modules/scaleway_function_namespace.py +++ b/plugins/modules/scaleway_function_namespace.py @@ -126,7 +126,7 @@ function_namespace: from copy import deepcopy from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, scaleway_waitable_resource_argument_spec, resource_attributes_should_be_changed, SecretVariables ) diff --git a/plugins/modules/scaleway_function_namespace_info.py b/plugins/modules/scaleway_function_namespace_info.py index bb0b7fa9df..f3ea5ddfc8 100644 --- a/plugins/modules/scaleway_function_namespace_info.py +++ b/plugins/modules/scaleway_function_namespace_info.py @@ -81,7 +81,7 @@ function_namespace: ''' from ansible_collections.community.general.plugins.module_utils.scaleway import ( - SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway + SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, ) from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/scaleway_security_group_rule.py b/plugins/modules/scaleway_security_group_rule.py index cd27543a7b..52e69868cc 100644 --- a/plugins/modules/scaleway_security_group_rule.py +++ b/plugins/modules/scaleway_security_group_rule.py @@ -133,11 +133,10 @@ data: import traceback from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object -from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.basic import AnsibleModule, missing_required_lib try: - from ipaddress import ip_network + from ipaddress import ip_network # noqa: F401, pylint: disable=unused-import except ImportError: IPADDRESS_IMP_ERR = traceback.format_exc() HAS_IPADDRESS = False diff --git a/plugins/modules/xenserver_guest_info.py b/plugins/modules/xenserver_guest_info.py index 5cdd52fc56..dd28cf7d07 100644 --- a/plugins/modules/xenserver_guest_info.py +++ b/plugins/modules/xenserver_guest_info.py @@ -153,13 +153,13 @@ instance: HAS_XENAPI = False try: - import XenAPI + import XenAPI # noqa: F401, pylint: disable=unused-import HAS_XENAPI = True except ImportError: pass from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.xenserver import (xenserver_common_argument_spec, XAPI, XenServerObject, get_object_ref, +from ansible_collections.community.general.plugins.module_utils.xenserver import (xenserver_common_argument_spec, XenServerObject, get_object_ref, gather_vm_params, gather_vm_facts) diff --git a/plugins/modules/xenserver_guest_powerstate.py b/plugins/modules/xenserver_guest_powerstate.py index 7903ad8b9f..2bb7264875 100644 --- a/plugins/modules/xenserver_guest_powerstate.py +++ b/plugins/modules/xenserver_guest_powerstate.py @@ -173,13 +173,13 @@ instance: HAS_XENAPI = False try: - import XenAPI + import XenAPI # noqa: F401, pylint: disable=unused-import HAS_XENAPI = True except ImportError: pass from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.module_utils.xenserver import (xenserver_common_argument_spec, XAPI, XenServerObject, get_object_ref, +from ansible_collections.community.general.plugins.module_utils.xenserver import (xenserver_common_argument_spec, XenServerObject, get_object_ref, gather_vm_params, gather_vm_facts, set_vm_power_state, wait_for_vm_ip_address) From 9f87989e7ff629e53f0324d60f404ae2c3f77ac4 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 12 Feb 2023 21:05:08 +0100 Subject: [PATCH 0451/2104] Remove unnecessary test imports (#5978) Remove unnecessary test imports. --- .../targets/module_helper/library/mdepfail.py | 2 +- .../module_helper/library/msimpleda.py | 5 +-- tests/sanity/extra/aliases.py | 1 - tests/sanity/extra/botmeta.py | 3 +- tests/unit/compat/builtins.py | 2 +- tests/unit/compat/mock.py | 4 +-- tests/unit/compat/unittest.py | 4 +-- tests/unit/plugins/become/helper.py | 1 - tests/unit/plugins/cache/test_redis.py | 1 - .../plugins/callback/test_loganalytics.py | 2 +- .../plugins/callback/test_opentelemetry.py | 2 +- tests/unit/plugins/callback/test_splunk.py | 2 +- tests/unit/plugins/connection/test_lxc.py | 1 - tests/unit/plugins/filter/test_crc32.py | 1 - tests/unit/plugins/inventory/test_cobbler.py | 2 -- tests/unit/plugins/inventory/test_linode.py | 2 +- tests/unit/plugins/inventory/test_lxd.py | 2 -- .../plugins/inventory/test_xen_orchestra.py | 1 - tests/unit/plugins/lookup/test_bitwarden.py | 4 +-- tests/unit/plugins/lookup/test_etcd3.py | 2 -- tests/unit/plugins/lookup/test_lastpass.py | 2 +- tests/unit/plugins/lookup/test_manifold.py | 2 +- .../module_utils/cloud/test_scaleway.py | 2 -- .../module_utils/test_module_helper.py | 6 ++-- .../plugins/module_utils/test_opennebula.py | 1 - tests/unit/plugins/modules/hpe_test_utils.py | 1 - .../plugins/modules/oneview_module_loader.py | 32 +++++++++++-------- tests/unit/plugins/modules/rhn_conftest.py | 1 - .../plugins/modules/test_alerta_customer.py | 2 +- tests/unit/plugins/modules/test_discord.py | 2 +- .../unit/plugins/modules/test_github_repo.py | 1 - .../modules/test_gitlab_protected_branch.py | 2 +- .../modules/test_keycloak_authentication.py | 4 +-- .../plugins/modules/test_keycloak_client.py | 5 ++- .../test_keycloak_client_rolemapping.py | 4 +-- .../modules/test_keycloak_clientscope.py | 5 ++- .../test_keycloak_identity_provider.py | 4 +-- .../plugins/modules/test_keycloak_realm.py | 4 +-- .../modules/test_keycloak_realm_info.py | 2 +- .../plugins/modules/test_keycloak_role.py | 4 +-- .../modules/test_keycloak_user_federation.py | 4 +-- tests/unit/plugins/modules/test_linode.py | 2 +- tests/unit/plugins/modules/test_linode_v4.py | 2 +- tests/unit/plugins/modules/test_lxca_nodes.py | 2 -- tests/unit/plugins/modules/test_macports.py | 1 - tests/unit/plugins/modules/test_npm.py | 3 +- .../plugins/modules/test_ocapi_command.py | 2 +- tests/unit/plugins/modules/test_one_vm.py | 2 -- .../modules/test_oneview_datacenter_info.py | 2 +- .../modules/test_oneview_enclosure_info.py | 1 - .../modules/test_oneview_ethernet_network.py | 1 - .../test_oneview_ethernet_network_info.py | 1 - .../modules/test_oneview_fc_network.py | 1 - .../modules/test_oneview_fc_network_info.py | 1 - .../modules/test_oneview_fcoe_network.py | 1 - .../modules/test_oneview_fcoe_network_info.py | 1 - ...test_oneview_logical_interconnect_group.py | 1 - ...oneview_logical_interconnect_group_info.py | 1 - .../modules/test_oneview_network_set.py | 1 - .../modules/test_oneview_network_set_info.py | 1 - .../modules/test_oneview_san_manager.py | 1 - .../modules/test_oneview_san_manager_info.py | 1 - tests/unit/plugins/modules/test_pacman.py | 6 +--- .../modules/test_proxmox_tasks_info.py | 7 +--- .../plugins/modules/test_redis_data_incr.py | 2 +- .../unit/plugins/modules/test_rhn_channel.py | 2 +- .../unit/plugins/modules/test_rhn_register.py | 2 +- tests/unit/plugins/modules/test_statsd.py | 2 -- .../modules/test_xcc_redfish_command.py | 3 -- .../modules/test_xenserver_guest_info.py | 2 +- .../test_xenserver_guest_powerstate.py | 2 +- 71 files changed, 70 insertions(+), 121 deletions(-) diff --git a/tests/integration/targets/module_helper/library/mdepfail.py b/tests/integration/targets/module_helper/library/mdepfail.py index d48727980a..92ebbde6e8 100644 --- a/tests/integration/targets/module_helper/library/mdepfail.py +++ b/tests/integration/targets/module_helper/library/mdepfail.py @@ -34,7 +34,7 @@ from ansible_collections.community.general.plugins.module_utils.module_helper im from ansible.module_utils.basic import missing_required_lib with ModuleHelper.dependency("nopackagewiththisname", missing_required_lib("nopackagewiththisname")): - import nopackagewiththisname + import nopackagewiththisname # noqa: F401, pylint: disable=unused-import class MSimple(ModuleHelper): diff --git a/tests/integration/targets/module_helper/library/msimpleda.py b/tests/integration/targets/module_helper/library/msimpleda.py index 74ec4ba010..c21c3d2ea4 100644 --- a/tests/integration/targets/module_helper/library/msimpleda.py +++ b/tests/integration/targets/module_helper/library/msimpleda.py @@ -6,7 +6,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function -import collections __metaclass__ = type DOCUMENTATION = ''' @@ -26,7 +25,9 @@ EXAMPLES = "" RETURN = "" from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper -from ansible_collections.community.general.plugins.module_utils.mh.mixins.deprecate_attrs import DeprecateAttrsMixin +from ansible_collections.community.general.plugins.module_utils.mh.mixins.deprecate_attrs import ( # noqa: F401, pylint: disable=unused-import + DeprecateAttrsMixin +) class MSimpleDA(ModuleHelper): diff --git a/tests/sanity/extra/aliases.py b/tests/sanity/extra/aliases.py index 8779fec513..c1dcba0df5 100755 --- a/tests/sanity/extra/aliases.py +++ b/tests/sanity/extra/aliases.py @@ -6,7 +6,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import os import sys import yaml diff --git a/tests/sanity/extra/botmeta.py b/tests/sanity/extra/botmeta.py index c6d677ae5e..3b6c348344 100755 --- a/tests/sanity/extra/botmeta.py +++ b/tests/sanity/extra/botmeta.py @@ -13,8 +13,7 @@ import sys import yaml -from voluptuous import All, Any, MultipleInvalid, PREVENT_EXTRA -from voluptuous import Required, Schema, Invalid +from voluptuous import Any, MultipleInvalid, PREVENT_EXTRA, Schema from voluptuous.humanize import humanize_error diff --git a/tests/unit/compat/builtins.py b/tests/unit/compat/builtins.py index b0cc618676..d548601d46 100644 --- a/tests/unit/compat/builtins.py +++ b/tests/unit/compat/builtins.py @@ -13,7 +13,7 @@ __metaclass__ = type # One unittest needs to import builtins via __import__() so we need to have # the string that represents it try: - import __builtin__ + import __builtin__ # noqa: F401, pylint: disable=unused-import except ImportError: BUILTINS = 'builtins' else: diff --git a/tests/unit/compat/mock.py b/tests/unit/compat/mock.py index f8f565dcf3..bdbea945e6 100644 --- a/tests/unit/compat/mock.py +++ b/tests/unit/compat/mock.py @@ -20,12 +20,12 @@ try: # Allow wildcard import because we really do want to import all of mock's # symbols into this compat shim # pylint: disable=wildcard-import,unused-wildcard-import - from unittest.mock import * + from unittest.mock import * # noqa: F401, pylint: disable=unused-import except ImportError: # Python 2 # pylint: disable=wildcard-import,unused-wildcard-import try: - from mock import * + from mock import * # noqa: F401, pylint: disable=unused-import except ImportError: print('You need the mock library installed on python2.x to run tests') diff --git a/tests/unit/compat/unittest.py b/tests/unit/compat/unittest.py index 1872e58337..d50bab86f0 100644 --- a/tests/unit/compat/unittest.py +++ b/tests/unit/compat/unittest.py @@ -18,8 +18,8 @@ import sys if sys.version_info < (2, 7): try: # Need unittest2 on python2.6 - from unittest2 import * + from unittest2 import * # noqa: F401, pylint: disable=unused-import except ImportError: print('You need unittest2 installed on python2.6.x to run tests') else: - from unittest import * + from unittest import * # noqa: F401, pylint: disable=unused-import diff --git a/tests/unit/plugins/become/helper.py b/tests/unit/plugins/become/helper.py index 410738504b..9949e1befb 100644 --- a/tests/unit/plugins/become/helper.py +++ b/tests/unit/plugins/become/helper.py @@ -8,7 +8,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.errors import AnsibleError from ansible.plugins.loader import become_loader, get_shell_plugin diff --git a/tests/unit/plugins/cache/test_redis.py b/tests/unit/plugins/cache/test_redis.py index 26f97c127e..81ae9293e3 100644 --- a/tests/unit/plugins/cache/test_redis.py +++ b/tests/unit/plugins/cache/test_redis.py @@ -10,7 +10,6 @@ import pytest pytest.importorskip('redis') -from ansible import constants as C from ansible.plugins.loader import cache_loader from ansible_collections.community.general.plugins.cache.redis import CacheModule as RedisCache diff --git a/tests/unit/plugins/callback/test_loganalytics.py b/tests/unit/plugins/callback/test_loganalytics.py index a61ad32d3a..f9fef3c5d6 100644 --- a/tests/unit/plugins/callback/test_loganalytics.py +++ b/tests/unit/plugins/callback/test_loganalytics.py @@ -7,7 +7,7 @@ __metaclass__ = type from ansible.executor.task_result import TaskResult from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, call, MagicMock, Mock +from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock from ansible_collections.community.general.plugins.callback.loganalytics import AzureLogAnalyticsSource from datetime import datetime diff --git a/tests/unit/plugins/callback/test_opentelemetry.py b/tests/unit/plugins/callback/test_opentelemetry.py index c6532bc2e5..dea2e29d41 100644 --- a/tests/unit/plugins/callback/test_opentelemetry.py +++ b/tests/unit/plugins/callback/test_opentelemetry.py @@ -10,7 +10,7 @@ from ansible.playbook.task import Task from ansible.executor.task_result import TaskResult from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock -from ansible_collections.community.general.plugins.callback.opentelemetry import OpenTelemetrySource, TaskData, CallbackModule +from ansible_collections.community.general.plugins.callback.opentelemetry import OpenTelemetrySource, TaskData from collections import OrderedDict import sys diff --git a/tests/unit/plugins/callback/test_splunk.py b/tests/unit/plugins/callback/test_splunk.py index 595d1530b6..ddcdae24c7 100644 --- a/tests/unit/plugins/callback/test_splunk.py +++ b/tests/unit/plugins/callback/test_splunk.py @@ -7,7 +7,7 @@ __metaclass__ = type from ansible.executor.task_result import TaskResult from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, call, MagicMock, Mock +from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock from ansible_collections.community.general.plugins.callback.splunk import SplunkHTTPCollectorSource from datetime import datetime diff --git a/tests/unit/plugins/connection/test_lxc.py b/tests/unit/plugins/connection/test_lxc.py index 4a1139d6e9..8733a92e09 100644 --- a/tests/unit/plugins/connection/test_lxc.py +++ b/tests/unit/plugins/connection/test_lxc.py @@ -7,7 +7,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from io import StringIO -import pytest from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.plugins.connection import lxc diff --git a/tests/unit/plugins/filter/test_crc32.py b/tests/unit/plugins/filter/test_crc32.py index 961840235d..8201045136 100644 --- a/tests/unit/plugins/filter/test_crc32.py +++ b/tests/unit/plugins/filter/test_crc32.py @@ -7,7 +7,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest -from ansible.errors import AnsibleError from ansible_collections.community.general.plugins.filter.crc32 import crc32s diff --git a/tests/unit/plugins/inventory/test_cobbler.py b/tests/unit/plugins/inventory/test_cobbler.py index 6db9b91cbc..a09001ad62 100644 --- a/tests/unit/plugins/inventory/test_cobbler.py +++ b/tests/unit/plugins/inventory/test_cobbler.py @@ -7,9 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest -import sys -from ansible.errors import AnsibleError, AnsibleParserError from ansible_collections.community.general.plugins.inventory.cobbler import InventoryModule diff --git a/tests/unit/plugins/inventory/test_linode.py b/tests/unit/plugins/inventory/test_linode.py index 4e6a018850..a4f556761d 100644 --- a/tests/unit/plugins/inventory/test_linode.py +++ b/tests/unit/plugins/inventory/test_linode.py @@ -16,7 +16,7 @@ mandatory_py_version = pytest.mark.skipif( ) -from ansible.errors import AnsibleError, AnsibleParserError +from ansible.errors import AnsibleError from ansible.parsing.dataloader import DataLoader from ansible.template import Templar from ansible_collections.community.general.plugins.inventory.linode import InventoryModule diff --git a/tests/unit/plugins/inventory/test_lxd.py b/tests/unit/plugins/inventory/test_lxd.py index 99c9e166c1..a1f31fdc58 100644 --- a/tests/unit/plugins/inventory/test_lxd.py +++ b/tests/unit/plugins/inventory/test_lxd.py @@ -8,9 +8,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest -import os -from ansible.errors import AnsibleError from ansible.inventory.data import InventoryData from ansible_collections.community.general.plugins.inventory.lxd import InventoryModule diff --git a/tests/unit/plugins/inventory/test_xen_orchestra.py b/tests/unit/plugins/inventory/test_xen_orchestra.py index 7d51f6f183..bae038e807 100644 --- a/tests/unit/plugins/inventory/test_xen_orchestra.py +++ b/tests/unit/plugins/inventory/test_xen_orchestra.py @@ -10,7 +10,6 @@ __metaclass__ = type import pytest -from ansible.errors import AnsibleError, AnsibleParserError from ansible.inventory.data import InventoryData from ansible_collections.community.general.plugins.inventory.xen_orchestra import InventoryModule diff --git a/tests/unit/plugins/lookup/test_bitwarden.py b/tests/unit/plugins/lookup/test_bitwarden.py index ac0242737e..d452639658 100644 --- a/tests/unit/plugins/lookup/test_bitwarden.py +++ b/tests/unit/plugins/lookup/test_bitwarden.py @@ -6,15 +6,13 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from argparse import ArgumentParser - from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.errors import AnsibleError from ansible.module_utils import six from ansible.plugins.loader import lookup_loader -from ansible_collections.community.general.plugins.lookup.bitwarden import LookupModule, Bitwarden, BitwardenException +from ansible_collections.community.general.plugins.lookup.bitwarden import Bitwarden MOCK_RECORDS = [ diff --git a/tests/unit/plugins/lookup/test_etcd3.py b/tests/unit/plugins/lookup/test_etcd3.py index 798d537ed9..e9ac777ebe 100644 --- a/tests/unit/plugins/lookup/test_etcd3.py +++ b/tests/unit/plugins/lookup/test_etcd3.py @@ -8,10 +8,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import pytest from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock -from ansible.errors import AnsibleError from ansible_collections.community.general.plugins.lookup import etcd3 from ansible.plugins.loader import lookup_loader diff --git a/tests/unit/plugins/lookup/test_lastpass.py b/tests/unit/plugins/lookup/test_lastpass.py index f9749716d7..5f65c9f633 100644 --- a/tests/unit/plugins/lookup/test_lastpass.py +++ b/tests/unit/plugins/lookup/test_lastpass.py @@ -14,7 +14,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.errors import AnsibleError from ansible.module_utils import six from ansible.plugins.loader import lookup_loader -from ansible_collections.community.general.plugins.lookup.lastpass import LookupModule, LPass, LPassException +from ansible_collections.community.general.plugins.lookup.lastpass import LPass, LPassException MOCK_ENTRIES = [{'username': 'user', diff --git a/tests/unit/plugins/lookup/test_manifold.py b/tests/unit/plugins/lookup/test_manifold.py index f6f4a605a6..4fa3562763 100644 --- a/tests/unit/plugins/lookup/test_manifold.py +++ b/tests/unit/plugins/lookup/test_manifold.py @@ -12,7 +12,7 @@ from ansible.module_utils.urls import ConnectionError, SSLValidationError from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError from ansible.module_utils import six from ansible.plugins.loader import lookup_loader -from ansible_collections.community.general.plugins.lookup.manifold import ManifoldApiClient, LookupModule, ApiError +from ansible_collections.community.general.plugins.lookup.manifold import ManifoldApiClient, ApiError import json import os diff --git a/tests/unit/plugins/module_utils/cloud/test_scaleway.py b/tests/unit/plugins/module_utils/cloud/test_scaleway.py index 3dbd7fbbbc..dc53bc1261 100644 --- a/tests/unit/plugins/module_utils/cloud/test_scaleway.py +++ b/tests/unit/plugins/module_utils/cloud/test_scaleway.py @@ -5,8 +5,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import random - from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.plugins.module_utils.scaleway import SecretVariables, argon2 diff --git a/tests/unit/plugins/module_utils/test_module_helper.py b/tests/unit/plugins/module_utils/test_module_helper.py index 18251cf2e9..3d8a4b654c 100644 --- a/tests/unit/plugins/module_utils/test_module_helper.py +++ b/tests/unit/plugins/module_utils/test_module_helper.py @@ -95,14 +95,14 @@ def test_arg_format_fail(fmt, style, stars, value, expected): def test_dependency_ctxmgr(): ctx = DependencyCtxMgr("POTATOES", "Potatoes must be installed") with ctx: - import potatoes_that_will_never_be_there + import potatoes_that_will_never_be_there # noqa: F401, pylint: disable=unused-import print("POTATOES: ctx.text={0}".format(ctx.text)) assert ctx.text == "Potatoes must be installed" assert not ctx.has_it ctx = DependencyCtxMgr("POTATOES2") with ctx: - import potatoes_that_will_never_be_there_again + import potatoes_that_will_never_be_there_again # noqa: F401, pylint: disable=unused-import assert not ctx.has_it print("POTATOES2: ctx.text={0}".format(ctx.text)) assert ctx.text.startswith("No module named") @@ -110,7 +110,7 @@ def test_dependency_ctxmgr(): ctx = DependencyCtxMgr("TYPING") with ctx: - import sys + import sys # noqa: F401, pylint: disable=unused-import assert ctx.has_it diff --git a/tests/unit/plugins/module_utils/test_opennebula.py b/tests/unit/plugins/module_utils/test_opennebula.py index 3dd2e91876..550d403711 100644 --- a/tests/unit/plugins/module_utils/test_opennebula.py +++ b/tests/unit/plugins/module_utils/test_opennebula.py @@ -6,7 +6,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import os import textwrap import pytest diff --git a/tests/unit/plugins/modules/hpe_test_utils.py b/tests/unit/plugins/modules/hpe_test_utils.py index 56b4d11045..ab16d8f22b 100644 --- a/tests/unit/plugins/modules/hpe_test_utils.py +++ b/tests/unit/plugins/modules/hpe_test_utils.py @@ -13,7 +13,6 @@ import yaml from mock import Mock, patch from .oneview_module_loader import ONEVIEW_MODULE_UTILS_PATH -from .oneview_conftest import mock_ov_client, mock_ansible_module from hpOneView.oneview_client import OneViewClient diff --git a/tests/unit/plugins/modules/oneview_module_loader.py b/tests/unit/plugins/modules/oneview_module_loader.py index 51dcee788b..ae62d9ced1 100644 --- a/tests/unit/plugins/modules/oneview_module_loader.py +++ b/tests/unit/plugins/modules/oneview_module_loader.py @@ -15,18 +15,22 @@ if 'hpOneView' not in sys.modules: sys.modules['hpOneView.oneview_client'] = Mock() ONEVIEW_MODULE_UTILS_PATH = 'ansible_collections.community.general.plugins.module_utils.oneview' -from ansible_collections.community.general.plugins.module_utils.oneview import (OneViewModuleException, - OneViewModuleTaskError, - OneViewModuleResourceNotFound, - OneViewModuleBase) +from ansible_collections.community.general.plugins.module_utils.oneview import ( # noqa: F401, pylint: disable=unused-import + OneViewModuleException, + OneViewModuleTaskError, + OneViewModuleResourceNotFound, + OneViewModuleBase, +) -from ansible_collections.community.general.plugins.modules.oneview_ethernet_network import EthernetNetworkModule -from ansible_collections.community.general.plugins.modules.oneview_ethernet_network_info import EthernetNetworkInfoModule -from ansible_collections.community.general.plugins.modules.oneview_fc_network import FcNetworkModule -from ansible_collections.community.general.plugins.modules.oneview_fc_network_info import FcNetworkInfoModule -from ansible_collections.community.general.plugins.modules.oneview_fcoe_network import FcoeNetworkModule -from ansible_collections.community.general.plugins.modules.oneview_fcoe_network_info import FcoeNetworkInfoModule -from ansible_collections.community.general.plugins.modules.oneview_network_set import NetworkSetModule -from ansible_collections.community.general.plugins.modules.oneview_network_set_info import NetworkSetInfoModule -from ansible_collections.community.general.plugins.modules.oneview_san_manager import SanManagerModule -from ansible_collections.community.general.plugins.modules.oneview_san_manager_info import SanManagerInfoModule +from ansible_collections.community.general.plugins.modules.oneview_ethernet_network import EthernetNetworkModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_ethernet_network_info import ( # noqa: F401, pylint: disable=unused-import + EthernetNetworkInfoModule, +) +from ansible_collections.community.general.plugins.modules.oneview_fc_network import FcNetworkModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_fc_network_info import FcNetworkInfoModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_fcoe_network import FcoeNetworkModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_fcoe_network_info import FcoeNetworkInfoModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_network_set import NetworkSetModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_network_set_info import NetworkSetInfoModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_san_manager import SanManagerModule # noqa: F401, pylint: disable=unused-import +from ansible_collections.community.general.plugins.modules.oneview_san_manager_info import SanManagerInfoModule # noqa: F401, pylint: disable=unused-import diff --git a/tests/unit/plugins/modules/rhn_conftest.py b/tests/unit/plugins/modules/rhn_conftest.py index a8f890050e..acc0e2f221 100644 --- a/tests/unit/plugins/modules/rhn_conftest.py +++ b/tests/unit/plugins/modules/rhn_conftest.py @@ -5,7 +5,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils.six.moves import xmlrpc_client import pytest diff --git a/tests/unit/plugins/modules/test_alerta_customer.py b/tests/unit/plugins/modules/test_alerta_customer.py index 2b63464e09..ccd0ced50e 100644 --- a/tests/unit/plugins/modules/test_alerta_customer.py +++ b/tests/unit/plugins/modules/test_alerta_customer.py @@ -7,7 +7,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch +from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import alerta_customer from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_discord.py b/tests/unit/plugins/modules/test_discord.py index 007cd0038e..83069d279d 100644 --- a/tests/unit/plugins/modules/test_discord.py +++ b/tests/unit/plugins/modules/test_discord.py @@ -7,7 +7,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch +from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import discord from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_github_repo.py b/tests/unit/plugins/modules/test_github_repo.py index e86179f874..10227aadfb 100644 --- a/tests/unit/plugins/modules/test_github_repo.py +++ b/tests/unit/plugins/modules/test_github_repo.py @@ -5,7 +5,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import requests import re import json import sys diff --git a/tests/unit/plugins/modules/test_gitlab_protected_branch.py b/tests/unit/plugins/modules/test_gitlab_protected_branch.py index de35a4b28b..1162d8a351 100644 --- a/tests/unit/plugins/modules/test_gitlab_protected_branch.py +++ b/tests/unit/plugins/modules/test_gitlab_protected_branch.py @@ -31,7 +31,7 @@ try: # GitLab module requirements if python_version_match_requirement(): - from gitlab.v4.objects import Project + from gitlab.v4.objects import Project # noqa: F401, pylint: disable=unused-import gitlab_req_version = python_gitlab_version_match_requirement() gitlab_module_version = python_gitlab_module_version() if LooseVersion(gitlab_module_version) < LooseVersion(gitlab_req_version): diff --git a/tests/unit/plugins/modules/test_keycloak_authentication.py b/tests/unit/plugins/modules/test_keycloak_authentication.py index 19bea8ac0e..aaa1fa9b1b 100644 --- a/tests/unit/plugins/modules/test_keycloak_authentication.py +++ b/tests/unit/plugins/modules/test_keycloak_authentication.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_authentication diff --git a/tests/unit/plugins/modules/test_keycloak_client.py b/tests/unit/plugins/modules/test_keycloak_client.py index bc71b37327..b44013af13 100644 --- a/tests/unit/plugins/modules/test_keycloak_client.py +++ b/tests/unit/plugins/modules/test_keycloak_client.py @@ -11,9 +11,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, \ - ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_client diff --git a/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py b/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py index 648d04aa23..58c8b95483 100644 --- a/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py +++ b/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_client_rolemapping diff --git a/tests/unit/plugins/modules/test_keycloak_clientscope.py b/tests/unit/plugins/modules/test_keycloak_clientscope.py index 2d09496bbf..ea015b05bf 100644 --- a/tests/unit/plugins/modules/test_keycloak_clientscope.py +++ b/tests/unit/plugins/modules/test_keycloak_clientscope.py @@ -11,9 +11,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, \ - ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_clientscope diff --git a/tests/unit/plugins/modules/test_keycloak_identity_provider.py b/tests/unit/plugins/modules/test_keycloak_identity_provider.py index ecee7eb9ef..6fd258b8a3 100644 --- a/tests/unit/plugins/modules/test_keycloak_identity_provider.py +++ b/tests/unit/plugins/modules/test_keycloak_identity_provider.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_identity_provider diff --git a/tests/unit/plugins/modules/test_keycloak_realm.py b/tests/unit/plugins/modules/test_keycloak_realm.py index 1572d79cbd..72993cbdfe 100644 --- a/tests/unit/plugins/modules/test_keycloak_realm.py +++ b/tests/unit/plugins/modules/test_keycloak_realm.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_realm diff --git a/tests/unit/plugins/modules/test_keycloak_realm_info.py b/tests/unit/plugins/modules/test_keycloak_realm_info.py index c1860e41ff..41095a8784 100644 --- a/tests/unit/plugins/modules/test_keycloak_realm_info.py +++ b/tests/unit/plugins/modules/test_keycloak_realm_info.py @@ -10,7 +10,7 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_realm_info diff --git a/tests/unit/plugins/modules/test_keycloak_role.py b/tests/unit/plugins/modules/test_keycloak_role.py index 74cd7bc9a3..c48c9771a5 100644 --- a/tests/unit/plugins/modules/test_keycloak_role.py +++ b/tests/unit/plugins/modules/test_keycloak_role.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_role diff --git a/tests/unit/plugins/modules/test_keycloak_user_federation.py b/tests/unit/plugins/modules/test_keycloak_user_federation.py index 7b624ef067..8d3dcaa230 100644 --- a/tests/unit/plugins/modules/test_keycloak_user_federation.py +++ b/tests/unit/plugins/modules/test_keycloak_user_federation.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args +from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_user_federation diff --git a/tests/unit/plugins/modules/test_linode.py b/tests/unit/plugins/modules/test_linode.py index 684a5f0c67..9e7b158d8e 100644 --- a/tests/unit/plugins/modules/test_linode.py +++ b/tests/unit/plugins/modules/test_linode.py @@ -10,7 +10,7 @@ import pytest from ansible_collections.community.general.plugins.modules import linode from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args -from .linode_conftest import api_key, auth +from .linode_conftest import api_key, auth # noqa: F401, pylint: disable=unused-import if not linode.HAS_LINODE: pytestmark = pytest.mark.skip('test_linode.py requires the `linode-python` module') diff --git a/tests/unit/plugins/modules/test_linode_v4.py b/tests/unit/plugins/modules/test_linode_v4.py index 37774bfd44..915a82f087 100644 --- a/tests/unit/plugins/modules/test_linode_v4.py +++ b/tests/unit/plugins/modules/test_linode_v4.py @@ -25,7 +25,7 @@ from ansible_collections.community.general.plugins.module_utils.linode import ge from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args from ansible_collections.community.general.tests.unit.compat import mock -from .linode_conftest import access_token, no_access_token_in_env, default_args, mock_linode +from .linode_conftest import access_token, no_access_token_in_env, default_args, mock_linode # noqa: F401, pylint: disable=unused-import def test_mandatory_state_is_validated(capfd): diff --git a/tests/unit/plugins/modules/test_lxca_nodes.py b/tests/unit/plugins/modules/test_lxca_nodes.py index 677587f1c4..87effa0c01 100644 --- a/tests/unit/plugins/modules/test_lxca_nodes.py +++ b/tests/unit/plugins/modules/test_lxca_nodes.py @@ -10,8 +10,6 @@ import json import pytest from ansible_collections.community.general.tests.unit.compat import mock from ansible_collections.community.general.plugins.modules import lxca_nodes -from ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common import setup_conn -from ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common import close_conn @pytest.fixture(scope='module') diff --git a/tests/unit/plugins/modules/test_macports.py b/tests/unit/plugins/modules/test_macports.py index 8fa3942e88..61de27654e 100644 --- a/tests/unit/plugins/modules/test_macports.py +++ b/tests/unit/plugins/modules/test_macports.py @@ -5,7 +5,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.module_utils import basic from ansible_collections.community.general.plugins.modules import macports import pytest diff --git a/tests/unit/plugins/modules/test_npm.py b/tests/unit/plugins/modules/test_npm.py index 6041fcb0cf..f5d3127759 100644 --- a/tests/unit/plugins/modules/test_npm.py +++ b/tests/unit/plugins/modules/test_npm.py @@ -8,8 +8,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ansible_collections.community.general.plugins.modules import npm -from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( - AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args) +from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args class NPMModuleTestCase(ModuleTestCase): diff --git a/tests/unit/plugins/modules/test_ocapi_command.py b/tests/unit/plugins/modules/test_ocapi_command.py index 031fb9dd09..3ce267c4e9 100644 --- a/tests/unit/plugins/modules/test_ocapi_command.py +++ b/tests/unit/plugins/modules/test_ocapi_command.py @@ -16,7 +16,7 @@ from ansible.module_utils import basic import ansible_collections.community.general.plugins.modules.ocapi_command as module from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json -from ansible.module_utils.six.moves.urllib.parse import quote_plus, urljoin +from ansible.module_utils.six.moves.urllib.parse import urljoin MOCK_BASE_URI = "mockBaseUri/" diff --git a/tests/unit/plugins/modules/test_one_vm.py b/tests/unit/plugins/modules/test_one_vm.py index f89a0c63df..fcfa685af7 100644 --- a/tests/unit/plugins/modules/test_one_vm.py +++ b/tests/unit/plugins/modules/test_one_vm.py @@ -6,8 +6,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import os - import pytest from ansible_collections.community.general.plugins.modules.one_vm import parse_updateconf diff --git a/tests/unit/plugins/modules/test_oneview_datacenter_info.py b/tests/unit/plugins/modules/test_oneview_datacenter_info.py index 1224a8fde7..eb5e05d229 100644 --- a/tests/unit/plugins/modules/test_oneview_datacenter_info.py +++ b/tests/unit/plugins/modules/test_oneview_datacenter_info.py @@ -8,7 +8,7 @@ __metaclass__ = type import pytest from .hpe_test_utils import FactsParamsTest -from .oneview_conftest import mock_ov_client, mock_ansible_module +from .oneview_conftest import mock_ov_client, mock_ansible_module # noqa: F401, pylint: disable=unused-import from ansible_collections.community.general.plugins.modules.oneview_datacenter_info import DatacenterInfoModule diff --git a/tests/unit/plugins/modules/test_oneview_enclosure_info.py b/tests/unit/plugins/modules/test_oneview_enclosure_info.py index 4356e70e29..e8ef3449fb 100644 --- a/tests/unit/plugins/modules/test_oneview_enclosure_info.py +++ b/tests/unit/plugins/modules/test_oneview_enclosure_info.py @@ -6,7 +6,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from .hpe_test_utils import FactsParamsTestCase -from .oneview_conftest import mock_ov_client, mock_ansible_module from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules.oneview_enclosure_info import EnclosureInfoModule diff --git a/tests/unit/plugins/modules/test_oneview_ethernet_network.py b/tests/unit/plugins/modules/test_oneview_ethernet_network.py index 834c6c88c6..f1398740ee 100644 --- a/tests/unit/plugins/modules/test_oneview_ethernet_network.py +++ b/tests/unit/plugins/modules/test_oneview_ethernet_network.py @@ -11,7 +11,6 @@ import yaml from ansible_collections.community.general.tests.unit.compat import unittest, mock from .oneview_module_loader import EthernetNetworkModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py b/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py index f922bc8f48..4a2813e2f8 100644 --- a/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py +++ b/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py @@ -8,7 +8,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import EthernetNetworkInfoModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_fc_network.py b/tests/unit/plugins/modules/test_oneview_fc_network.py index 97d5ef85b6..6def80fc43 100644 --- a/tests/unit/plugins/modules/test_oneview_fc_network.py +++ b/tests/unit/plugins/modules/test_oneview_fc_network.py @@ -9,7 +9,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcNetworkModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_fc_network_info.py b/tests/unit/plugins/modules/test_oneview_fc_network_info.py index c548bf02f7..236ce136ad 100644 --- a/tests/unit/plugins/modules/test_oneview_fc_network_info.py +++ b/tests/unit/plugins/modules/test_oneview_fc_network_info.py @@ -7,7 +7,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcNetworkInfoModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_fcoe_network.py b/tests/unit/plugins/modules/test_oneview_fcoe_network.py index 8e74f8c73d..224e5471e9 100644 --- a/tests/unit/plugins/modules/test_oneview_fcoe_network.py +++ b/tests/unit/plugins/modules/test_oneview_fcoe_network.py @@ -9,7 +9,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcoeNetworkModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py b/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py index a8fda975a8..387c1da3c1 100644 --- a/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py +++ b/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py @@ -8,7 +8,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import FcoeNetworkInfoModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py index 99b4a8bc63..1f941fb50f 100644 --- a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py +++ b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py @@ -9,7 +9,6 @@ from copy import deepcopy from ansible_collections.community.general.tests.unit.compat import unittest, mock from .hpe_test_utils import OneViewBaseTestCase -from .oneview_conftest import mock_ov_client, mock_ansible_module from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group import LogicalInterconnectGroupModule diff --git a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py index 425aac6ba8..9fa602a8cf 100644 --- a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py +++ b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py @@ -7,7 +7,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .hpe_test_utils import FactsParamsTestCase -from .oneview_conftest import mock_ov_client, mock_ansible_module from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group_info import ( LogicalInterconnectGroupInfoModule ) diff --git a/tests/unit/plugins/modules/test_oneview_network_set.py b/tests/unit/plugins/modules/test_oneview_network_set.py index be89898aed..f801cd102a 100644 --- a/tests/unit/plugins/modules/test_oneview_network_set.py +++ b/tests/unit/plugins/modules/test_oneview_network_set.py @@ -8,7 +8,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest, mock from .hpe_test_utils import OneViewBaseTestCase from .oneview_module_loader import NetworkSetModule -from .oneview_conftest import mock_ov_client, mock_ansible_module FAKE_MSG_ERROR = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_network_set_info.py b/tests/unit/plugins/modules/test_oneview_network_set_info.py index 67d8f28201..13cd0400a4 100644 --- a/tests/unit/plugins/modules/test_oneview_network_set_info.py +++ b/tests/unit/plugins/modules/test_oneview_network_set_info.py @@ -7,7 +7,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import NetworkSetInfoModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake message error' diff --git a/tests/unit/plugins/modules/test_oneview_san_manager.py b/tests/unit/plugins/modules/test_oneview_san_manager.py index 22ee624f24..d675c3b353 100644 --- a/tests/unit/plugins/modules/test_oneview_san_manager.py +++ b/tests/unit/plugins/modules/test_oneview_san_manager.py @@ -7,7 +7,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest, mock from .oneview_module_loader import SanManagerModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import OneViewBaseTestCase from copy import deepcopy diff --git a/tests/unit/plugins/modules/test_oneview_san_manager_info.py b/tests/unit/plugins/modules/test_oneview_san_manager_info.py index c786e504e0..be1f243161 100644 --- a/tests/unit/plugins/modules/test_oneview_san_manager_info.py +++ b/tests/unit/plugins/modules/test_oneview_san_manager_info.py @@ -7,7 +7,6 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from .oneview_module_loader import SanManagerInfoModule -from .oneview_conftest import mock_ov_client, mock_ansible_module from .hpe_test_utils import FactsParamsTestCase diff --git a/tests/unit/plugins/modules/test_pacman.py b/tests/unit/plugins/modules/test_pacman.py index c3e455c034..04ff5bb3e8 100644 --- a/tests/unit/plugins/modules/test_pacman.py +++ b/tests/unit/plugins/modules/test_pacman.py @@ -6,12 +6,9 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -import sys - from ansible.module_utils import basic -from ansible_collections.community.general.tests.unit.compat import mock, unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.general.tests.unit.compat import mock from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, @@ -27,7 +24,6 @@ from ansible_collections.community.general.plugins.modules.pacman import ( ) import pytest -import json def get_bin_path(self, arg, required=False): diff --git a/tests/unit/plugins/modules/test_proxmox_tasks_info.py b/tests/unit/plugins/modules/test_proxmox_tasks_info.py index aff3fe189a..0d1b5a7bfb 100644 --- a/tests/unit/plugins/modules/test_proxmox_tasks_info.py +++ b/tests/unit/plugins/modules/test_proxmox_tasks_info.py @@ -15,13 +15,8 @@ import json from ansible_collections.community.general.plugins.modules import proxmox_tasks_info import ansible_collections.community.general.plugins.module_utils.proxmox as proxmox_utils -from ansible_collections.community.general.plugins.module_utils.proxmox import ProxmoxAnsible -from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, patch -from ansible_collections.community.general.tests.unit.plugins.modules.utils import ( - AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -) +from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args -from ansible_collections.community.general.plugins.module_utils import proxmox NODE = 'node01' TASK_UPID = 'UPID:iaclab-01-01:000029DD:1599528B:6108F068:srvreload:networking:root@pam:' diff --git a/tests/unit/plugins/modules/test_redis_data_incr.py b/tests/unit/plugins/modules/test_redis_data_incr.py index 24c792adb1..d819b2f7e2 100644 --- a/tests/unit/plugins/modules/test_redis_data_incr.py +++ b/tests/unit/plugins/modules/test_redis_data_incr.py @@ -21,7 +21,7 @@ HAS_REDIS_USERNAME_OPTION = True if tuple(map(int, __version__.split('.'))) < (3, 4, 0): HAS_REDIS_USERNAME_OPTION = False if HAS_REDIS_USERNAME_OPTION: - from redis.exceptions import NoPermissionError, RedisError, ResponseError + from redis.exceptions import NoPermissionError def test_redis_data_incr_without_arguments(capfd): diff --git a/tests/unit/plugins/modules/test_rhn_channel.py b/tests/unit/plugins/modules/test_rhn_channel.py index cfbb11e118..fd3bdc5fe0 100644 --- a/tests/unit/plugins/modules/test_rhn_channel.py +++ b/tests/unit/plugins/modules/test_rhn_channel.py @@ -10,7 +10,7 @@ import json from ansible_collections.community.general.plugins.modules import rhn_channel -from .rhn_conftest import mock_request +from .rhn_conftest import mock_request # noqa: F401, pylint: disable=unused-import import pytest diff --git a/tests/unit/plugins/modules/test_rhn_register.py b/tests/unit/plugins/modules/test_rhn_register.py index 62d952a428..1394c07b65 100644 --- a/tests/unit/plugins/modules/test_rhn_register.py +++ b/tests/unit/plugins/modules/test_rhn_register.py @@ -15,7 +15,7 @@ import ansible.module_utils.six from ansible.module_utils.six.moves import xmlrpc_client from ansible_collections.community.general.plugins.modules import rhn_register -from .rhn_conftest import mock_request +from .rhn_conftest import mock_request # noqa: F401, pylint: disable=unused-import import pytest diff --git a/tests/unit/plugins/modules/test_statsd.py b/tests/unit/plugins/modules/test_statsd.py index 49aadf2b90..7d458c5eb4 100644 --- a/tests/unit/plugins/modules/test_statsd.py +++ b/tests/unit/plugins/modules/test_statsd.py @@ -5,8 +5,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import pytest - from ansible_collections.community.general.plugins.modules import statsd from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_xcc_redfish_command.py b/tests/unit/plugins/modules/test_xcc_redfish_command.py index c4132125cc..c3902a2f30 100644 --- a/tests/unit/plugins/modules/test_xcc_redfish_command.py +++ b/tests/unit/plugins/modules/test_xcc_redfish_command.py @@ -5,12 +5,9 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import json -from ansible_collections.community.general.tests.unit.compat import mock from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat import unittest from ansible.module_utils import basic -from ansible.module_utils.common.text.converters import to_bytes import ansible_collections.community.general.plugins.modules.xcc_redfish_command as module from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json diff --git a/tests/unit/plugins/modules/test_xenserver_guest_info.py b/tests/unit/plugins/modules/test_xenserver_guest_info.py index fd669953a8..6eb22a7671 100644 --- a/tests/unit/plugins/modules/test_xenserver_guest_info.py +++ b/tests/unit/plugins/modules/test_xenserver_guest_info.py @@ -12,7 +12,7 @@ import json import pytest from .xenserver_common import fake_xenapi_ref -from .xenserver_conftest import XenAPI, xenserver_guest_info +from .xenserver_conftest import XenAPI, xenserver_guest_info # noqa: F401, pylint: disable=unused-import pytestmark = pytest.mark.usefixtures('patch_ansible_module') diff --git a/tests/unit/plugins/modules/test_xenserver_guest_powerstate.py b/tests/unit/plugins/modules/test_xenserver_guest_powerstate.py index d209ca1600..74b21fcf36 100644 --- a/tests/unit/plugins/modules/test_xenserver_guest_powerstate.py +++ b/tests/unit/plugins/modules/test_xenserver_guest_powerstate.py @@ -11,7 +11,7 @@ import json import pytest from .xenserver_common import fake_xenapi_ref -from .xenserver_conftest import fake_ansible_module, XenAPI, xenserver_guest_powerstate +from .xenserver_conftest import fake_ansible_module, XenAPI, xenserver_guest_powerstate # noqa: F401, pylint: disable=unused-import testcase_set_powerstate = { From 68d0cac310d4e06af103d51afddf473fac4a0a33 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 12 Feb 2023 22:02:24 +0100 Subject: [PATCH 0452/2104] Ignore more unnecessary import warnings (#5981) Fix imports. --- plugins/module_utils/mh/module_helper.py | 2 +- plugins/module_utils/module_helper.py | 2 +- plugins/modules/pubnub_blocks.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/mh/module_helper.py b/plugins/module_utils/mh/module_helper.py index 212ebb48fe..c5973262d2 100644 --- a/plugins/module_utils/mh/module_helper.py +++ b/plugins/module_utils/mh/module_helper.py @@ -9,7 +9,7 @@ __metaclass__ = type from ansible.module_utils.common.dict_transformations import dict_merge -# (TODO: remove AnsibleModule!) pylint: disable-next-line=unused-import +# (TODO: remove AnsibleModule!) pylint: disable-next=unused-import from ansible_collections.community.general.plugins.module_utils.mh.base import ModuleHelperBase, AnsibleModule # noqa: F401 from ansible_collections.community.general.plugins.module_utils.mh.mixins.cmd import CmdMixin from ansible_collections.community.general.plugins.module_utils.mh.mixins.state import StateMixin diff --git a/plugins/module_utils/module_helper.py b/plugins/module_utils/module_helper.py index ec7f1b1b78..8a51de6658 100644 --- a/plugins/module_utils/module_helper.py +++ b/plugins/module_utils/module_helper.py @@ -15,6 +15,6 @@ from ansible_collections.community.general.plugins.module_utils.mh.mixins.cmd im from ansible_collections.community.general.plugins.module_utils.mh.mixins.state import StateMixin # noqa: F401, pylint: disable=unused-import from ansible_collections.community.general.plugins.module_utils.mh.mixins.deps import DependencyCtxMgr # noqa: F401, pylint: disable=unused-import from ansible_collections.community.general.plugins.module_utils.mh.exceptions import ModuleHelperException # noqa: F401, pylint: disable=unused-import -# pylint: disable-next-line=unused-import +# pylint: disable-next=unused-import from ansible_collections.community.general.plugins.module_utils.mh.deco import cause_changes, module_fails_on_exception # noqa: F401 from ansible_collections.community.general.plugins.module_utils.mh.mixins.vars import VarMeta, VarDict # noqa: F401, pylint: disable=unused-import diff --git a/plugins/modules/pubnub_blocks.py b/plugins/modules/pubnub_blocks.py index 28b17b5431..7d15b0d9eb 100644 --- a/plugins/modules/pubnub_blocks.py +++ b/plugins/modules/pubnub_blocks.py @@ -235,7 +235,7 @@ import os try: # Import PubNub BLOCKS client. - from pubnub_blocks_client import User, Account, Owner, Application, Keyset + from pubnub_blocks_client import User, Account, Owner, Application, Keyset # noqa: F401, pylint: disable=unused-import from pubnub_blocks_client import Block, EventHandler from pubnub_blocks_client import exceptions HAS_PUBNUB_BLOCKS_CLIENT = True From f0fd6aa97d0dd6a5979fc9e262ce38688e2df4f4 Mon Sep 17 00:00:00 2001 From: Boik Date: Tue, 14 Feb 2023 04:36:09 +0800 Subject: [PATCH 0453/2104] Suppress urllib3 InsecureRequestWarnings when `validate_certs` option is false (#5931) * Suppress urllib3 InsecureRequestWarnings when validate_certs option is false Suppress urllib3 InsecureRequestWarnings when `validate_certs` option is false. It's clear that the user would know the possible risk when he or she chose to turn off the option, so the warning message could be ignored and make the output clean. * Create 5915-suppress-urllib3-insecure-request-warnings.yml * Update changelogs/fragments/5915-suppress-urllib3-insecure-request-warnings.yml Co-authored-by: Felix Fontein * Remove extra whitespaces --------- Co-authored-by: Felix Fontein --- .../5915-suppress-urllib3-insecure-request-warnings.yml | 2 ++ plugins/inventory/proxmox.py | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 changelogs/fragments/5915-suppress-urllib3-insecure-request-warnings.yml diff --git a/changelogs/fragments/5915-suppress-urllib3-insecure-request-warnings.yml b/changelogs/fragments/5915-suppress-urllib3-insecure-request-warnings.yml new file mode 100644 index 0000000000..9fa285154a --- /dev/null +++ b/changelogs/fragments/5915-suppress-urllib3-insecure-request-warnings.yml @@ -0,0 +1,2 @@ +minor_changes: + - proxmox - suppress urllib3 ``InsecureRequestWarnings`` when ``validate_certs`` option is ``false`` (https://github.com/ansible-collections/community.general/pull/5931). diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index e33f7ed77d..dc2e1febca 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -277,6 +277,11 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): credentials = urlencode({'username': self.proxmox_user, 'password': self.proxmox_password, }) a = self._get_session() + + if a.verify is False: + from requests.packages.urllib3 import disable_warnings + disable_warnings() + ret = a.post('%s/api2/json/access/ticket' % self.proxmox_url, data=credentials) json = ret.json() From c587c09df1d839aa072883d3c9fd3082b2ed8a69 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 13 Feb 2023 21:40:26 +0100 Subject: [PATCH 0454/2104] Remove skornehl as maintainer for datadog_monitor (#5885) Remove skornehl as maintainer for datadog_monitor. --- .github/BOTMETA.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 2051e34e0a..769b4d273b 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -440,7 +440,7 @@ files: labels: datadog_event maintainers: n0ts $modules/datadog_monitor.py: - maintainers: skornehl + ignore: skornehl $modules/dconf.py: maintainers: azaghal $modules/deploy_helper.py: From cd0a414e9f13331752a4a53c798626666aca33d4 Mon Sep 17 00:00:00 2001 From: cybernet Date: Mon, 13 Feb 2023 20:53:49 +0000 Subject: [PATCH 0455/2104] Update gitlab_project_members.py - typo fix (#5989) Update gitlab_project_members.py ##### SUMMARY typo fix ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr --- plugins/modules/gitlab_project_members.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/gitlab_project_members.py b/plugins/modules/gitlab_project_members.py index 811033f312..84e3c9b8e1 100644 --- a/plugins/modules/gitlab_project_members.py +++ b/plugins/modules/gitlab_project_members.py @@ -136,7 +136,7 @@ EXAMPLES = r''' project: projectname gitlab_user: username access_level: developer - pruge_users: developer + purge_users: developer state: present - name: Remove a list of Users with Dedicated Access Levels to A GitLab project From 4c4ef80ca9518792bc4e0551864a7929254a27a0 Mon Sep 17 00:00:00 2001 From: Sargun Vohra Date: Mon, 13 Feb 2023 12:54:56 -0800 Subject: [PATCH 0456/2104] yarn: Fix state=latest not working with global=true (#5829) * Yarn module: fix state=latest not working with global=true * fix whitespace * add changelog fragment * add integration test cases * add only tests for this PR (install+upgrade) * fix assuming default global dir * fix list() not working when global=true and name a package with no binary * remove ignores * whitespace * Update changelogs/fragments/5829-fix-yarn-global.yml Co-authored-by: Felix Fontein * Update changelogs/fragments/5829-fix-yarn-global.yml Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --------- Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- changelogs/fragments/5829-fix-yarn-global.yml | 4 + plugins/modules/yarn.py | 41 ++++----- tests/integration/targets/yarn/tasks/run.yml | 87 +++++++++++++++++++ tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - 8 files changed, 112 insertions(+), 25 deletions(-) create mode 100644 changelogs/fragments/5829-fix-yarn-global.yml diff --git a/changelogs/fragments/5829-fix-yarn-global.yml b/changelogs/fragments/5829-fix-yarn-global.yml new file mode 100644 index 0000000000..fade7d97f6 --- /dev/null +++ b/changelogs/fragments/5829-fix-yarn-global.yml @@ -0,0 +1,4 @@ +bugfixes: + - yarn - fix ``state=latest`` not working with ``global=true`` (https://github.com/ansible-collections/community.general/issues/5712). + - yarn - fix ``global=true`` to check for the configured global folder instead of assuming the default (https://github.com/ansible-collections/community.general/pull/5829) + - yarn - fix ``state=absent`` not working with ``global=true`` when the package does not include a binary (https://github.com/ansible-collections/community.general/pull/5829) diff --git a/plugins/modules/yarn.py b/plugins/modules/yarn.py index 2e96cb799d..df55925dba 100644 --- a/plugins/modules/yarn.py +++ b/plugins/modules/yarn.py @@ -163,8 +163,6 @@ from ansible.module_utils.basic import AnsibleModule class Yarn(object): - DEFAULT_GLOBAL_INSTALLATION_PATH = os.path.expanduser('~/.config/yarn/global') - def __init__(self, module, **kwargs): self.module = module self.globally = kwargs['globally'] @@ -188,10 +186,12 @@ class Yarn(object): elif self.name is not None: self.name_version = self.name - def _exec(self, args, run_in_check_mode=False, check_rc=True): + def _exec(self, args, run_in_check_mode=False, check_rc=True, unsupported_with_global=False): if not self.module.check_mode or (self.module.check_mode and run_in_check_mode): - if self.globally: + with_global_arg = self.globally and not unsupported_with_global + + if with_global_arg: # Yarn global arg is inserted before the command (e.g. `yarn global {some-command}`) args.insert(0, 'global') @@ -207,7 +207,7 @@ class Yarn(object): # If path is specified, cd into that path and run the command. cwd = None - if self.path and not self.globally: + if self.path and not with_global_arg: if not os.path.exists(self.path): # Module will make directory if not exists. os.makedirs(self.path) @@ -233,24 +233,21 @@ class Yarn(object): missing.append(self.name) return installed, missing - result, error = self._exec(cmd, True, False) + # `yarn global list` should be treated as "unsupported with global" even though it exists, + # because it only only lists binaries, but `yarn global add` can install libraries too. + result, error = self._exec(cmd, run_in_check_mode=True, check_rc=False, unsupported_with_global=True) if error: self.module.fail_json(msg=error) for json_line in result.strip().split('\n'): data = json.loads(json_line) - if self.globally: - if data['type'] == 'list' and data['data']['type'].startswith('bins-'): - # This is a string in format: 'bins-' - installed.append(data['data']['type'][5:]) - else: - if data['type'] == 'tree': - dependencies = data['data']['trees'] + if data['type'] == 'tree': + dependencies = data['data']['trees'] - for dep in dependencies: - name, version = dep['name'].rsplit('@', 1) - installed.append(name) + for dep in dependencies: + name, version = dep['name'].rsplit('@', 1) + installed.append(name) if self.name not in installed: missing.append(self.name) @@ -276,9 +273,12 @@ class Yarn(object): if not os.path.isfile(os.path.join(self.path, 'yarn.lock')): return outdated - cmd_result, err = self._exec(['outdated', '--json'], True, False) - if err: - self.module.fail_json(msg=err) + cmd_result, err = self._exec(['outdated', '--json'], True, False, unsupported_with_global=True) + + # the package.json in the global dir is missing a license field, so warnings are expected on stderr + for line in err.splitlines(): + if json.loads(line)['type'] == 'error': + self.module.fail_json(msg=err) if not cmd_result: return outdated @@ -340,7 +340,8 @@ def main(): # When installing globally, use the defined path for global node_modules if globally: - path = Yarn.DEFAULT_GLOBAL_INSTALLATION_PATH + _rc, out, _err = module.run_command([executable, 'global', 'dir'], check_rc=True) + path = out.strip() yarn = Yarn(module, name=name, diff --git a/tests/integration/targets/yarn/tasks/run.yml b/tests/integration/targets/yarn/tasks/run.yml index 367d7dcf2c..6521d45fcf 100644 --- a/tests/integration/targets/yarn/tasks/run.yml +++ b/tests/integration/targets/yarn/tasks/run.yml @@ -39,6 +39,7 @@ package: 'iconv-lite' environment: PATH: "{{ node_bin_path }}:{{ansible_env.PATH}}" + YARN_IGNORE_ENGINES: true block: # Get the version of Yarn and register to a variable @@ -135,3 +136,89 @@ assert: that: - yarn_uninstall_package is changed + + - name: 'Global install binary with explicit version (older version of package)' + yarn: + global: true + executable: '{{ yarn_bin_path }}/yarn' + name: prettier + version: 2.0.0 + state: present + environment: + PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}' + register: yarn_global_install_old_binary + + - assert: + that: + - yarn_global_install_old_binary is changed + + - name: 'Global upgrade old binary' + yarn: + global: true + executable: '{{ yarn_bin_path }}/yarn' + name: prettier + state: latest + environment: + PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}' + register: yarn_global_update_old_binary + + - assert: + that: + - yarn_global_update_old_binary is changed + + - name: 'Global remove a binary' + yarn: + global: true + executable: '{{ yarn_bin_path }}/yarn' + name: prettier + state: absent + environment: + PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}' + register: yarn_global_uninstall_binary + + - assert: + that: + - yarn_global_uninstall_binary is changed + + - name: 'Global install package with no binary with explicit version (older version of package)' + yarn: + global: true + executable: '{{ yarn_bin_path }}/yarn' + name: left-pad + version: 1.1.0 + state: present + environment: + PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}' + register: yarn_global_install_old_package + + - assert: + that: + - yarn_global_install_old_package is changed + + - name: 'Global upgrade old package with no binary' + yarn: + global: true + executable: '{{ yarn_bin_path }}/yarn' + name: left-pad + state: latest + environment: + PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}' + register: yarn_global_update_old_package + + - assert: + that: + - yarn_global_update_old_package is changed + + - name: 'Global remove a package with no binary' + yarn: + global: true + executable: '{{ yarn_bin_path }}/yarn' + name: left-pad + state: absent + environment: + PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}' + register: yarn_global_uninstall_package + + - assert: + that: + - yarn_global_uninstall_package is changed diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 508785f220..336a923589 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -24,6 +24,5 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/yarn.py use-argspec-type-path tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.6 # django generated code tests/integration/targets/django_manage/files/base_test/simple_project/p1/manage.py compile-2.7 # django generated code diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 77a0105529..2386cda087 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -19,4 +19,3 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 77a0105529..2386cda087 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -19,4 +19,3 @@ plugins/modules/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/rax.py use-argspec-type-path # module deprecated - removed in 9.0.0 plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index db0e449b79..ec887e18b8 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -21,4 +21,3 @@ plugins/modules/rax.py use-argspec-type-path plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/yarn.py use-argspec-type-path diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index db0e449b79..ec887e18b8 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -21,4 +21,3 @@ plugins/modules/rax.py use-argspec-type-path plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error -plugins/modules/yarn.py use-argspec-type-path From 24efe9ee9a39fb41bfe3a185c46450df19c5db31 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 15 Feb 2023 22:55:23 +0100 Subject: [PATCH 0457/2104] Normalize bools in tests (#5996) * Normalize bools in tests. * Fix typo. --- .../targets/aix_devices/tasks/main.yml | 4 +- .../targets/aix_filesystem/tasks/main.yml | 6 +- .../targets/archive/tasks/main.yml | 4 +- .../targets/archive/tests/broken-link.yml | 2 +- .../targets/archive/tests/remove.yml | 10 +- .../targets/cargo/tasks/test_general.yml | 2 +- .../cloud_init_data_facts/tasks/main.yml | 2 +- .../targets/connection/test_connection.yml | 2 +- tests/integration/targets/copr/tasks/main.yml | 2 +- .../integration/targets/cpanm/tasks/main.yml | 10 +- .../dnf_versionlock/tasks/lock_updates.yml | 2 +- .../targets/dpkg_divert/tasks/prepare.yml | 8 +- .../dpkg_divert/tasks/tests/01-basic.yml | 20 ++-- .../dpkg_divert/tasks/tests/02-rename.yml | 98 +++++++++---------- .../targets/filesize/tasks/basics.yml | 20 ++-- .../targets/filesize/tasks/errors.yml | 26 ++--- .../targets/filesize/tasks/floats.yml | 12 +-- .../targets/filesize/tasks/sparse.yml | 60 ++++++------ .../targets/filesize/tasks/symlinks.yml | 8 +- .../targets/filesystem/tasks/create_fs.yml | 6 +- .../filesystem/tasks/overwrite_another_fs.yml | 2 +- .../targets/filesystem/tasks/remove_fs.yml | 4 +- .../targets/filter_counter/tasks/main.yml | 4 +- .../targets/filter_random_mac/tasks/main.yml | 6 +- .../targets/filter_time/tasks/main.yml | 6 +- .../gandi_livedns/tasks/create_record.yml | 2 +- .../gandi_livedns/tasks/remove_record.yml | 2 +- .../gandi_livedns/tasks/update_record.yml | 2 +- tests/integration/targets/gem/tasks/main.yml | 16 +-- .../tasks/exclusion_state_list-all.yml | 2 +- .../targets/git_config/tasks/setup.yml | 4 +- .../git_config/tasks/unset_check_mode.yml | 2 +- .../gitlab_group_variable/tasks/main.yml | 6 +- .../gitlab_project_badge/tasks/main.yml | 6 +- .../gitlab_project_variable/tasks/main.yml | 6 +- tests/integration/targets/hg/tasks/main.yml | 2 +- .../targets/hg/tasks/run-tests.yml | 4 +- .../targets/hg/tasks/uninstall.yml | 4 +- .../targets/homebrew/tasks/main.yml | 24 ++--- .../targets/homebrew_cask/tasks/main.yml | 10 +- .../targets/homectl/tasks/main.yml | 26 ++--- .../targets/hwc_ecs_instance/tasks/main.yml | 6 +- .../targets/hwc_evs_disk/tasks/main.yml | 4 +- .../targets/hwc_vpc_eip/tasks/main.yml | 8 +- .../hwc_vpc_peering_connect/tasks/main.yml | 8 +- .../targets/hwc_vpc_port/tasks/main.yml | 6 +- .../targets/hwc_vpc_private_ip/tasks/main.yml | 8 +- .../targets/hwc_vpc_route/tasks/main.yml | 8 +- .../hwc_vpc_security_group/tasks/main.yml | 6 +- .../tasks/main.yml | 4 +- .../targets/hwc_vpc_subnet/tasks/main.yml | 8 +- .../targets/ini_file/tasks/tests/01-value.yml | 16 +-- .../ini_file/tasks/tests/02-values.yml | 2 +- .../targets/iptables_state/tasks/main.yml | 4 +- .../iptables_state/tasks/tests/00-basic.yml | 58 +++++------ .../iptables_state/tasks/tests/01-tables.yml | 28 +++--- .../tasks/tests/10-rollback.yml | 2 +- .../targets/ipwcli_dns/tasks/main.yml | 4 +- .../targets/iso_create/tasks/main.yml | 2 +- .../targets/iso_extract/tasks/7zip.yml | 6 +- .../targets/iso_extract/tasks/main.yml | 6 +- .../targets/java_cert/tasks/main.yml | 6 +- .../targets/java_cert/tasks/state_change.yml | 8 +- .../targets/java_keystore/tasks/tests.yml | 18 ++-- .../integration/targets/jboss/tasks/jboss.yml | 16 +-- .../targets/keycloak_client/tasks/main.yml | 2 +- .../targets/launchd/tasks/setup.yml | 4 +- .../targets/launchd/tasks/teardown.yml | 6 +- .../launchd/tasks/tests/test_reload.yml | 12 +-- .../launchd/tasks/tests/test_restart.yml | 8 +- .../launchd/tasks/tests/test_runatload.yml | 6 +- .../launchd/tasks/tests/test_start_stop.yml | 14 +-- .../launchd/tasks/tests/test_unload.yml | 10 +- .../targets/ldap_search/tasks/tests/basic.yml | 2 +- .../targets/lookup_dig/tasks/main.yml | 2 +- .../lookup_passwordstore/tasks/package.yml | 12 +-- .../lookup_passwordstore/tasks/tests.yml | 2 +- .../targets/lookup_random_pet/test.yml | 2 +- .../targets/lookup_random_string/test.yml | 4 +- .../targets/lvg/tasks/test_pvresize.yml | 8 +- tests/integration/targets/mail/tasks/main.yml | 6 +- tests/integration/targets/mas/tasks/main.yml | 12 +-- .../targets/module_helper/library/mstate.py | 2 +- .../targets/module_helper/tasks/mdepfail.yml | 2 +- .../targets/module_helper/tasks/msimple.yml | 2 +- .../tasks/msimple_output_conflict.yml | 2 +- .../integration/targets/monit/tasks/main.yml | 14 +-- .../targets/mssql_script/tasks/main.yml | 2 +- tests/integration/targets/npm/tasks/setup.yml | 2 +- .../targets/osx_defaults/tasks/main.yml | 10 +- .../targets/pacman/tasks/remove_nosave.yml | 2 +- .../targets/pam_limits/tasks/main.yml | 2 +- tests/integration/targets/pipx/tasks/main.yml | 8 +- .../pkgng/tasks/create-outofdate-pkg.yml | 4 +- .../targets/pkgng/tasks/freebsd.yml | 44 ++++----- .../pkgng/tasks/install_single_package.yml | 16 +-- .../targets/pkgng/tasks/setup-testjail.yml | 8 +- .../targets/pkgutil/tasks/main.yml | 8 +- .../targets/read_csv/tasks/main.yml | 8 +- .../targets/redis_info/tasks/main.yml | 2 +- .../targets/scaleway_compute/tasks/ip.yml | 6 +- .../scaleway_compute/tasks/security_group.yml | 4 +- .../targets/scaleway_compute/tasks/state.yml | 16 +-- .../targets/scaleway_container/tasks/main.yml | 8 +- .../tasks/main.yml | 8 +- .../tasks/main.yml | 6 +- .../scaleway_database_backup/tasks/main.yml | 10 +- .../targets/scaleway_function/tasks/main.yml | 8 +- .../tasks/main.yml | 8 +- .../targets/scaleway_ip/tasks/main.yml | 12 +-- .../targets/scaleway_lb/tasks/main.yml | 6 +- .../scaleway_security_group/tasks/main.yml | 4 +- .../targets/scaleway_sshkey/tasks/main.yml | 4 +- .../targets/scaleway_user_data/tasks/main.yml | 2 +- .../targets/sefcontext/tasks/sefcontext.yml | 12 +-- .../targets/setup_etcd3/tasks/main.yml | 2 +- .../targets/setup_gnutar/handlers/main.yml | 2 +- .../targets/setup_gnutar/tasks/main.yml | 2 +- .../targets/setup_mosquitto/tasks/ubuntu.yml | 2 +- .../targets/setup_pkg_mgr/tasks/main.yml | 6 +- .../setup_postgresql_db/tasks/main.yml | 8 +- .../tasks/default-cleanup.yml | 2 +- .../tasks/default-cleanup.yml | 2 +- .../setup_wildfly_server/handlers/main.yml | 2 +- .../setup_wildfly_server/tasks/main.yml | 14 +-- .../targets/shutdown/tasks/main.yml | 4 +- .../targets/ssh_config/tasks/main.yml | 6 +- .../targets/ssh_config/tasks/options.yml | 6 +- .../supervisorctl/tasks/install_Linux.yml | 2 +- .../integration/targets/sysrc/tasks/main.yml | 14 +-- .../targets/sysrc/tasks/setup-testjail.yml | 4 +- .../terraform/tasks/complex_variables.yml | 2 +- .../targets/terraform/tasks/main.yml | 2 +- .../terraform/tasks/test_provider_upgrade.yml | 4 +- .../targets/terraform/vars/main.yml | 4 +- .../targets/timezone/tasks/test.yml | 44 ++++----- tests/integration/targets/ufw/tasks/main.yml | 6 +- .../targets/ufw/tasks/tests/basic.yml | 78 +++++++-------- .../targets/ufw/tasks/tests/global-state.yml | 26 ++--- .../targets/ufw/tasks/tests/interface.yml | 8 +- .../targets/wakeonlan/tasks/main.yml | 6 +- .../integration/targets/xattr/tasks/main.yml | 2 +- .../targets/xfs_quota/tasks/main.yml | 4 +- .../test-add-children-elements-unicode.yml | 4 +- .../xml/tasks/test-add-children-elements.yml | 4 +- .../test-add-children-from-groupvars.yml | 4 +- .../tasks/test-add-children-insertafter.yml | 8 +- .../tasks/test-add-children-insertbefore.yml | 8 +- ...t-add-children-with-attributes-unicode.yml | 4 +- .../test-add-children-with-attributes.yml | 4 +- .../xml/tasks/test-add-element-implicitly.yml | 24 ++--- .../test-add-namespaced-children-elements.yml | 4 +- .../xml/tasks/test-children-elements-xml.yml | 4 +- .../targets/xml/tasks/test-count-unicode.yml | 2 +- .../targets/xml/tasks/test-count.yml | 2 +- .../test-mutually-exclusive-attributes.yml | 2 +- .../xml/tasks/test-pretty-print-only.yml | 6 +- .../targets/xml/tasks/test-pretty-print.yml | 6 +- .../tasks/test-remove-attribute-nochange.yml | 4 +- .../xml/tasks/test-remove-attribute.yml | 4 +- .../tasks/test-remove-element-nochange.yml | 4 +- .../targets/xml/tasks/test-remove-element.yml | 4 +- ...t-remove-namespaced-attribute-nochange.yml | 4 +- .../test-remove-namespaced-attribute.yml | 4 +- ...est-remove-namespaced-element-nochange.yml | 4 +- .../tasks/test-remove-namespaced-element.yml | 4 +- .../test-set-attribute-value-unicode.yml | 4 +- .../xml/tasks/test-set-attribute-value.yml | 4 +- .../test-set-children-elements-level.yml | 8 +- .../test-set-children-elements-unicode.yml | 8 +- .../xml/tasks/test-set-children-elements.yml | 12 +-- .../tasks/test-set-element-value-empty.yml | 4 +- .../tasks/test-set-element-value-unicode.yml | 4 +- .../xml/tasks/test-set-element-value.yml | 4 +- .../test-set-namespaced-attribute-value.yml | 4 +- .../test-set-namespaced-children-elements.yml | 10 +- .../test-set-namespaced-element-value.yml | 4 +- .../targets/xml/tasks/test-xmlstring.yml | 16 +-- tests/integration/targets/yarn/tasks/run.yml | 4 +- .../targets/yum_versionlock/tasks/main.yml | 2 +- .../targets/zypper/tasks/zypper.yml | 16 +-- .../tasks/zypper_repository.yml | 4 +- 182 files changed, 770 insertions(+), 770 deletions(-) diff --git a/tests/integration/targets/aix_devices/tasks/main.yml b/tests/integration/targets/aix_devices/tasks/main.yml index d007e9b611..c2b829d42f 100644 --- a/tests/integration/targets/aix_devices/tasks/main.yml +++ b/tests/integration/targets/aix_devices/tasks/main.yml @@ -47,13 +47,13 @@ - name: Put vscsi1 and children devices in Defined state. aix_devices: device: vscsi1 - recursive: yes + recursive: true state: defined - name: Removes vscsi1 and children devices. aix_devices: device: vscsi1 - recursive: yes + recursive: true state: absent - name: Changes en1 mtu to 9000 and disables arp. diff --git a/tests/integration/targets/aix_filesystem/tasks/main.yml b/tests/integration/targets/aix_filesystem/tasks/main.yml index e17ec4d263..25146062d6 100644 --- a/tests/integration/targets/aix_filesystem/tasks/main.yml +++ b/tests/integration/targets/aix_filesystem/tasks/main.yml @@ -104,7 +104,7 @@ - name: Remove NFS filesystem /home/ftp aix_filesystem: filesystem: /home/ftp - rm_mount_point: yes + rm_mount_point: true state: absent - name: Mount filesystem /newfs @@ -115,7 +115,7 @@ - name: Remove mounted /newfs aix_filesystem: filesystem: /newfs - rm_mount_point: yes + rm_mount_point: true state: absent - name: Umount /newfs @@ -126,5 +126,5 @@ - name: Remove /newfs aix_filesystem: filesystem: /newfs - rm_mount_point: yes + rm_mount_point: true state: absent diff --git a/tests/integration/targets/archive/tasks/main.yml b/tests/integration/targets/archive/tasks/main.yml index 4043f95b62..afe278bcf4 100644 --- a/tests/integration/targets/archive/tasks/main.yml +++ b/tests/integration/targets/archive/tasks/main.yml @@ -78,8 +78,8 @@ homebrew: name: xz state: present - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" # Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a # proper solution can be found diff --git a/tests/integration/targets/archive/tests/broken-link.yml b/tests/integration/targets/archive/tests/broken-link.yml index 8f8b534d58..7c64443719 100644 --- a/tests/integration/targets/archive/tests/broken-link.yml +++ b/tests/integration/targets/archive/tests/broken-link.yml @@ -9,7 +9,7 @@ src: /nowhere dest: "{{ remote_tmp_dir }}/nowhere.txt" state: link - force: yes + force: true - name: Archive - broken link ({{ format }}) archive: diff --git a/tests/integration/targets/archive/tests/remove.yml b/tests/integration/targets/archive/tests/remove.yml index b58046af6a..8f0b8cff86 100644 --- a/tests/integration/targets/archive/tests/remove.yml +++ b/tests/integration/targets/archive/tests/remove.yml @@ -8,7 +8,7 @@ path: "{{ remote_tmp_dir }}/*.txt" dest: "{{ remote_tmp_dir }}/archive_remove_source_files.{{ format }}" format: "{{ format }}" - remove: yes + remove: true register: archive_remove_source_files - name: Verify archive exists - remove source files ({{ format }}) @@ -64,7 +64,7 @@ path: "{{ remote_tmp_dir }}/tmpdir" dest: "{{ remote_tmp_dir }}/archive_remove_source_directory.{{ format }}" format: "{{ format }}" - remove: yes + remove: true register: archive_remove_source_directory - name: Verify archive exists - remove source directory ({{ format }}) @@ -107,7 +107,7 @@ path: "{{ remote_tmp_dir }}/tmpdir/*" dest: "{{ remote_tmp_dir }}/archive_remove_source_excluding_path.{{ format }}" format: "{{ format }}" - remove: yes + remove: true exclude_path: "{{ remote_tmp_dir }}/tmpdir/empty.txt" register: archive_remove_source_excluding_path @@ -150,7 +150,7 @@ - "{{ remote_tmp_dir }}/tmpdir/sub/*" dest: "{{ remote_tmp_dir }}/archive_remove_source_excluding_sub_path.{{ format }}" format: "{{ format }}" - remove: yes + remove: true exclude_path: "{{ remote_tmp_dir }}/tmpdir/sub/subfile.txt" register: archive_remove_source_excluding_sub_path @@ -185,7 +185,7 @@ path: "{{ remote_tmp_dir }}/tmpdir/" dest: "{{ remote_tmp_dir }}/archive_remove_source_nested_paths.{{ format }}" format: "{{ format }}" - remove: yes + remove: true register: archive_remove_nested_paths - name: Verify archive exists - remove source with nested paths ({{ format }}) diff --git a/tests/integration/targets/cargo/tasks/test_general.yml b/tests/integration/targets/cargo/tasks/test_general.yml index e07264b517..2bffa08f0d 100644 --- a/tests/integration/targets/cargo/tasks/test_general.yml +++ b/tests/integration/targets/cargo/tasks/test_general.yml @@ -18,7 +18,7 @@ community.general.cargo: name: helloworld register: install_present_helloworld - ignore_errors: yes + ignore_errors: true - name: Uninstall application helloworld community.general.cargo: diff --git a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml index fe38d4ca5b..40e762d689 100644 --- a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml @@ -42,7 +42,7 @@ - name: test gather cloud-init facts in check mode cloud_init_data_facts: - check_mode: yes + check_mode: true register: result - name: verify test gather cloud-init facts in check mode assert: diff --git a/tests/integration/targets/connection/test_connection.yml b/tests/integration/targets/connection/test_connection.yml index 157a7821ba..bb0a993995 100644 --- a/tests/integration/targets/connection/test_connection.yml +++ b/tests/integration/targets/connection/test_connection.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - hosts: "{{ target_hosts }}" - gather_facts: no + gather_facts: false serial: 1 tasks: diff --git a/tests/integration/targets/copr/tasks/main.yml b/tests/integration/targets/copr/tasks/main.yml index 917e44b7ec..0e46517240 100644 --- a/tests/integration/targets/copr/tasks/main.yml +++ b/tests/integration/targets/copr/tasks/main.yml @@ -34,7 +34,7 @@ - result.info == 'Please note that this repository is not part of the main distribution' - name: enable copr project - check_mode: yes + check_mode: true copr: state: enabled name: '{{ copr_fullname }}' diff --git a/tests/integration/targets/cpanm/tasks/main.yml b/tests/integration/targets/cpanm/tasks/main.yml index ed3c02b692..c9adc1ca6b 100644 --- a/tests/integration/targets/cpanm/tasks/main.yml +++ b/tests/integration/targets/cpanm/tasks/main.yml @@ -15,7 +15,7 @@ - perl-devel - perl-App-cpanminus state: present - become: yes + become: true when: ansible_os_family == "RedHat" - name: install perl development package for Debian family @@ -23,13 +23,13 @@ name: - cpanminus state: present - become: yes + become: true when: ansible_os_family == "Debian" - name: install a Perl package cpanm: name: JSON - notest: yes + notest: true register: install_perl_package_result - name: assert package is installed @@ -41,7 +41,7 @@ - name: install same Perl package cpanm: name: JSON - notest: yes + notest: true register: install_same_perl_package_result - name: assert same package is installed @@ -54,7 +54,7 @@ cpanm: name: JSON version: "@4.01" - notest: yes + notest: true mode: new register: install_perl_package_with_version_op_result diff --git a/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml b/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml index edbfcabd40..b3fceb26f5 100644 --- a/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml +++ b/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml @@ -63,7 +63,7 @@ dnf: name: "{{ _packages }}" state: latest - check_mode: yes + check_mode: true register: update_packages - assert: diff --git a/tests/integration/targets/dpkg_divert/tasks/prepare.yml b/tests/integration/targets/dpkg_divert/tasks/prepare.yml index 7697d0fd2d..94566b41e1 100644 --- a/tests/integration/targets/dpkg_divert/tasks/prepare.yml +++ b/tests/integration/targets/dpkg_divert/tasks/prepare.yml @@ -19,7 +19,7 @@ dpkg_divert: path: "{{ foobarrc }}" state: absent - become: yes + become: true - name: "remove test files" file: @@ -30,7 +30,7 @@ - "{{ foobarrc_distrib }}" loop_control: loop_var: dpkg_divert_item - become: yes + become: true - block: @@ -39,5 +39,5 @@ - name: "include tasks to perform other tests (rename)" include_tasks: tests/02-rename.yml - become: yes - diff: yes + become: true + diff: true diff --git a/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml b/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml index 0668a8aa02..78863d1db8 100644 --- a/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml +++ b/tests/integration/targets/dpkg_divert/tasks/tests/01-basic.yml @@ -46,14 +46,14 @@ dpkg_divert: path: "{{ foobarrc }}" state: present - rename: yes + rename: true register: diversion_4 - name: "divert foobarrc (check mode, rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" state: present - rename: yes + rename: true register: diversion_5 check_mode: true @@ -88,7 +88,7 @@ - diversion_0.commands == diversion_1.commands - diversion_2.commands == diversion_3.commands - diversion_4.commands == diversion_5.commands - quiet: yes + quiet: true ################################################################################ @@ -148,7 +148,7 @@ - diversion_2.diversion == diversion_3.diversion - diversion_0.commands == diversion_1.commands - diversion_2.commands == diversion_3.commands - quiet: yes + quiet: true ################################################################################ @@ -164,7 +164,7 @@ path: "{{ foobarrc }}" holder: "ansible" register: diversion_0 - check_mode: yes + check_mode: true - name: "update foobarrc diversion holder (must report a change)" dpkg_divert: @@ -184,7 +184,7 @@ path: "{{ foobarrc }}" holder: "ansible" register: diversion_3 - check_mode: yes + check_mode: true # Check results @@ -213,7 +213,7 @@ - diversion_2.diversion == diversion_3.diversion - diversion_0.commands == diversion_1.commands - diversion_2.commands == diversion_3.commands - quiet: yes + quiet: true - name: "remove foobarrc diversion" dpkg_divert: @@ -234,7 +234,7 @@ path: "{{ foobarrc }}" divert: "{{ foobarrc_ansible }}" register: diversion_0 - check_mode: yes + check_mode: true - name: "update foobarrc divert path (must report a change)" dpkg_divert: @@ -254,7 +254,7 @@ path: "{{ foobarrc }}" divert: "{{ foobarrc_ansible }}" register: diversion_3 - check_mode: yes + check_mode: true # Check results @@ -283,7 +283,7 @@ - diversion_2.diversion == diversion_3.diversion - diversion_0.commands == diversion_1.commands - diversion_2.commands == diversion_3.commands - quiet: yes + quiet: true - name: "remove foobarrc diversion" dpkg_divert: diff --git a/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml b/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml index 077004029d..6c95a72912 100644 --- a/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml +++ b/tests/integration/targets/dpkg_divert/tasks/tests/02-rename.yml @@ -9,29 +9,29 @@ - name: "create diversion for foobarrc (check mode, rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true register: diversion_0 - check_mode: yes + check_mode: true - name: "create diversion for foobarrc (rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true register: diversion_1 - name: "create diversion for foobarrc (rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true register: diversion_2 - name: "create diversion for foobarrc (check mode, rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true register: diversion_3 - check_mode: yes + check_mode: true # Get results @@ -60,7 +60,7 @@ - diversion_2.diversion == diversion_3.diversion - diversion_0.commands == diversion_1.commands - diversion_2.commands == diversion_3.commands - quiet: yes + quiet: true ################################################################################ @@ -69,15 +69,15 @@ - name: "remove diversion for foobarrc (check mode, rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true state: absent register: diversion_0 - check_mode: yes + check_mode: true - name: "remove diversion for foobarrc (rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true state: absent register: diversion_1 @@ -85,17 +85,17 @@ - name: "remove diversion for foobarrc (rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true state: absent register: diversion_2 - name: "remove diversion for foobarrc (check mode, rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true state: absent register: diversion_3 - check_mode: yes + check_mode: true # Check results @@ -124,7 +124,7 @@ - diversion_2.diversion == diversion_3.diversion - diversion_0.commands == diversion_1.commands - diversion_2.commands == diversion_3.commands - quiet: yes + quiet: true ################################################################################ @@ -139,49 +139,49 @@ - name: "create diversion for foobarrc (check mode, rename, must fail)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true register: diversion_0 - ignore_errors: yes - check_mode: yes + ignore_errors: true + check_mode: true - name: "create diversion for foobarrc (rename, must fail)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes + rename: true register: diversion_1 - ignore_errors: yes + ignore_errors: true - name: "create diversion for foobarrc (check mode, force rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes - force: yes + rename: true + force: true register: diversion_2 - check_mode: yes + check_mode: true - name: "create diversion for foobarrc (force rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes - force: yes + rename: true + force: true register: diversion_3 - name: "create diversion for foobarrc (force rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes - force: yes + rename: true + force: true register: diversion_4 - name: "create diversion for foobarrc (check mode, force rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" - rename: yes - force: yes + rename: true + force: true register: diversion_5 - check_mode: yes + check_mode: true # Check results @@ -213,7 +213,7 @@ - diversion_4.diversion == diversion_5.diversion - diversion_2.commands == diversion_3.commands - diversion_4.commands == diversion_5.commands - quiet: yes + quiet: true ################################################################################ @@ -230,7 +230,7 @@ path: "{{ foobarrc }}" divert: "{{ foobarrc_ansible }}" register: diversion_0 - check_mode: yes + check_mode: true - name: "create diversion for foobarrc (update divert path, must report a change)" dpkg_divert: @@ -250,7 +250,7 @@ path: "{{ foobarrc }}" divert: "{{ foobarrc_ansible }}" register: diversion_3 - check_mode: yes + check_mode: true # Check results @@ -286,7 +286,7 @@ - diversion_2.diversion == diversion_3.diversion - diversion_0.commands == diversion_1.commands - diversion_2.commands == diversion_3.commands - quiet: yes + quiet: true ################################################################################ @@ -296,35 +296,35 @@ dpkg_divert: path: "{{ foobarrc }}" state: absent - rename: yes + rename: true register: diversion_0 - ignore_errors: yes - check_mode: yes + ignore_errors: true + check_mode: true - name: "remove diversion for foobarrc (rename, must fail)" dpkg_divert: path: "{{ foobarrc }}" state: absent - rename: yes + rename: true register: diversion_1 - ignore_errors: yes + ignore_errors: true - name: "remove diversion for foobarrc (check mode, force rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" state: absent - rename: yes - force: yes + rename: true + force: true register: diversion_2 - check_mode: yes + check_mode: true - name: "remove diversion for foobarrc (force rename, must report a change)" dpkg_divert: path: "{{ foobarrc }}" state: absent - rename: yes - force: yes + rename: true + force: true register: diversion_3 @@ -332,18 +332,18 @@ dpkg_divert: path: "{{ foobarrc }}" state: absent - rename: yes - force: yes + rename: true + force: true register: diversion_4 - name: "remove diversion for foobarrc (check mode, force rename, must NOT report a change, idempotency)" dpkg_divert: path: "{{ foobarrc }}" state: absent - rename: yes - force: yes + rename: true + force: true register: diversion_5 - check_mode: yes + check_mode: true # Check results @@ -381,4 +381,4 @@ - diversion_4.diversion == diversion_5.diversion - diversion_2.commands == diversion_3.commands - diversion_4.commands == diversion_5.commands - quiet: yes + quiet: true diff --git a/tests/integration/targets/filesize/tasks/basics.yml b/tests/integration/targets/filesize/tasks/basics.yml index ac99778a30..3c06731899 100644 --- a/tests/integration/targets/filesize/tasks/basics.yml +++ b/tests/integration/targets/filesize/tasks/basics.yml @@ -14,7 +14,7 @@ path: "{{ filesize_testfile }}" size: 0 register: filesize_test_basic_01 - check_mode: yes + check_mode: true - name: Stat the file (should not exist) ansible.builtin.stat: @@ -39,7 +39,7 @@ path: "{{ filesize_testfile }}" size: 0G register: filesize_test_basic_03 - check_mode: yes + check_mode: true - name: Create an empty file (idempotency) community.general.filesize: @@ -102,7 +102,7 @@ size: 57kB source: /dev/urandom register: filesize_test_basic_11 - check_mode: yes + check_mode: true - name: Stat the file (should still be unchanged) ansible.builtin.stat: @@ -133,7 +133,7 @@ size: 57000B source: /dev/urandom register: filesize_test_basic_13 - check_mode: yes + check_mode: true - name: Fill the file up to 57000B (57kB) with random data (idempotency) community.general.filesize: @@ -183,7 +183,7 @@ path: "{{ filesize_testfile }}" size: 57001B register: filesize_test_basic_21 - check_mode: yes + check_mode: true - name: Stat the file again (should remain the same) ansible.builtin.stat: @@ -208,7 +208,7 @@ path: "{{ filesize_testfile }}" size: 57.001 kB register: filesize_test_basic_23 - check_mode: yes + check_mode: true - name: Expand the file with 1 byte (57.001 kB) (idempotency) community.general.filesize: @@ -259,7 +259,7 @@ path: "{{ filesize_testfile }}" size: 2 MiB register: filesize_test_basic_31 - check_mode: yes + check_mode: true - name: Stat the file again (should remain the same) ansible.builtin.stat: @@ -285,7 +285,7 @@ size: 2 blocksize: 1M register: filesize_test_basic_33 - check_mode: yes + check_mode: true - name: Expand the file up to 2×1M (2*1024*1024 bytes) (idempotency) community.general.filesize: @@ -333,7 +333,7 @@ path: "{{ filesize_testfile }}" size: 57kB register: filesize_test_basic_41 - check_mode: yes + check_mode: true - name: Stat the resulting file (should be unchanged) ansible.builtin.stat: @@ -358,7 +358,7 @@ path: "{{ filesize_testfile }}" size: 57000 B register: filesize_test_basic_43 - check_mode: yes + check_mode: true - name: Truncate the file to 57000 B (57kB) (idempotency) community.general.filesize: diff --git a/tests/integration/targets/filesize/tasks/errors.yml b/tests/integration/targets/filesize/tasks/errors.yml index ba65934e5a..351a90ac6c 100644 --- a/tests/integration/targets/filesize/tasks/errors.yml +++ b/tests/integration/targets/filesize/tasks/errors.yml @@ -11,24 +11,24 @@ community.general.filesize: size: 1kB register: filesize_test_error_01 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to missing parameter (size) community.general.filesize: path: "{{ filesize_testfile }}" register: filesize_test_error_02 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to conflicting parameters (force|sparse) community.general.filesize: path: "{{ filesize_testfile }}" size: 1MB - force: yes - sparse: yes + force: true + sparse: true register: filesize_test_error_03 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid file path (not a file) @@ -36,7 +36,7 @@ path: "{{ filesize_testdir }}" size: 4096B register: filesize_test_error_04 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid file path (unexisting parent dir) @@ -44,7 +44,7 @@ path: "/unexistent/{{ filesize_testfile }}" size: 4096B register: filesize_test_error_05 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid size unit (b)" @@ -52,7 +52,7 @@ path: "{{ filesize_testfile }}" size: 4096b register: filesize_test_error_06 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid size value (bytes require integer) @@ -60,7 +60,7 @@ path: "{{ filesize_testfile }}" size: 1000.5B register: filesize_test_error_07 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid blocksize value (not an integer) @@ -69,7 +69,7 @@ size: 1M blocksize: "12.5" register: filesize_test_error_08 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid blocksize value type (dict) @@ -79,7 +79,7 @@ blocksize: bytes: 512 register: filesize_test_error_09 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid source device (/dev/unexistent) @@ -88,7 +88,7 @@ size: 1M source: /dev/unexistent register: filesize_test_error_10 - ignore_errors: yes + ignore_errors: true - name: Trigger an error due to invalid source device (/dev/null) @@ -97,7 +97,7 @@ size: 1M source: /dev/null register: filesize_test_error_11 - ignore_errors: yes + ignore_errors: true - name: Assert that expected errors have been triggered diff --git a/tests/integration/targets/filesize/tasks/floats.yml b/tests/integration/targets/filesize/tasks/floats.yml index d7b5a4c9a7..6d1bde22c9 100644 --- a/tests/integration/targets/filesize/tasks/floats.yml +++ b/tests/integration/targets/filesize/tasks/floats.yml @@ -14,7 +14,7 @@ path: "{{ filesize_testfile }}" size: 512.512kB register: filesize_test_float_01 - check_mode: yes + check_mode: true - name: Stat the file (should not exist) ansible.builtin.stat: @@ -39,7 +39,7 @@ path: "{{ filesize_testfile }}" size: 0.512512MB register: filesize_test_float_03 - check_mode: yes + check_mode: true - name: Create a file with a size of 0.512512MB (idempotency) community.general.filesize: @@ -95,7 +95,7 @@ path: "{{ filesize_testfile }}" size: 512.513kB register: filesize_test_float_11 - check_mode: yes + check_mode: true - name: Stat the file again (should remain the same) ansible.builtin.stat: @@ -120,7 +120,7 @@ path: "{{ filesize_testfile }}" size: 0.512513MB register: filesize_test_float_13 - check_mode: yes + check_mode: true - name: Create a file with a size of 0.512513MB (idempotency) community.general.filesize: @@ -172,7 +172,7 @@ path: "{{ filesize_testfile }}" size: 4.004MB register: filesize_test_float_21 - check_mode: yes + check_mode: true - name: Stat the file again (should remain the same) ansible.builtin.stat: @@ -197,7 +197,7 @@ path: "{{ filesize_testfile }}" size: 4.004MB register: filesize_test_float_23 - check_mode: yes + check_mode: true - name: Create a file with a size of 4.004MB (idempotency) community.general.filesize: diff --git a/tests/integration/targets/filesize/tasks/sparse.yml b/tests/integration/targets/filesize/tasks/sparse.yml index 9a8a9cfe90..79145b6e23 100644 --- a/tests/integration/targets/filesize/tasks/sparse.yml +++ b/tests/integration/targets/filesize/tasks/sparse.yml @@ -9,14 +9,14 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4TB - sparse: yes + sparse: true register: filesize_test_sparse_01 - check_mode: yes + check_mode: true - name: Stat the file (should not exist) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_01 @@ -24,13 +24,13 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4TB - sparse: yes + sparse: true register: filesize_test_sparse_02 - name: Stat the resulting file (should exist now) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_02 @@ -38,15 +38,15 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4000GB - sparse: yes + sparse: true register: filesize_test_sparse_03 - check_mode: yes + check_mode: true - name: Create a huge sparse file of 4TB (4000GB) (idempotency) community.general.filesize: path: "{{ filesize_testfile }}" size: 4000GB - sparse: yes + sparse: true register: filesize_test_sparse_04 - name: Create a huge sparse file of 4TB (4000000 × 1MB) (check mode, idempotency) @@ -54,22 +54,22 @@ path: "{{ filesize_testfile }}" size: 4000000 blocksize: 1MB - sparse: yes + sparse: true register: filesize_test_sparse_05 - check_mode: yes + check_mode: true - name: Create a huge sparse file of 4TB (4000000 × 1MB) (idempotency) community.general.filesize: path: "{{ filesize_testfile }}" size: 4000000 blocksize: 1MB - sparse: yes + sparse: true register: filesize_test_sparse_06 - name: Stat the file again (should remain the same) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_06 @@ -124,14 +124,14 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4TiB - sparse: yes + sparse: true register: filesize_test_sparse_11 - check_mode: yes + check_mode: true - name: Stat the file again (should remain the same) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_11 @@ -139,13 +139,13 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4TiB - sparse: yes + sparse: true register: filesize_test_sparse_12 - name: Stat the file again (should have grown) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_12 @@ -153,21 +153,21 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4096GiB - sparse: yes + sparse: true register: filesize_test_sparse_13 - check_mode: yes + check_mode: true - name: Change sparse file size to 4TiB (4096GiB) (idempotency) community.general.filesize: path: "{{ filesize_testfile }}" size: 4096GiB - sparse: yes + sparse: true register: filesize_test_sparse_14 - name: Stat the file again (should remain the same) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_14 @@ -203,14 +203,14 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4.321TB - sparse: yes + sparse: true register: filesize_test_sparse_21 - check_mode: yes + check_mode: true - name: Stat the file again (should remain the same) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_21 @@ -218,13 +218,13 @@ community.general.filesize: path: "{{ filesize_testfile }}" size: 4.321TB - sparse: yes + sparse: true register: filesize_test_sparse_22 - name: Stat the file again (should have been reduced) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_22 @@ -233,22 +233,22 @@ path: "{{ filesize_testfile }}" size: 4321 blocksize: 1GB - sparse: yes + sparse: true register: filesize_test_sparse_23 - check_mode: yes + check_mode: true - name: Change sparse file size to 4321×1GB (idempotency) community.general.filesize: path: "{{ filesize_testfile }}" size: 4321 blocksize: 1GB - sparse: yes + sparse: true register: filesize_test_sparse_24 - name: Stat the file again (should remain the same) ansible.builtin.stat: path: "{{ filesize_testfile }}" - get_checksum: no + get_checksum: false register: filesize_stat_sparse_24 diff --git a/tests/integration/targets/filesize/tasks/symlinks.yml b/tests/integration/targets/filesize/tasks/symlinks.yml index ee75777101..0118896568 100644 --- a/tests/integration/targets/filesize/tasks/symlinks.yml +++ b/tests/integration/targets/filesize/tasks/symlinks.yml @@ -16,8 +16,8 @@ src: "{{ filesize_testfile | basename }}" dest: "{{ filesize_testlink }}" state: link - force: yes - follow: no + force: true + follow: false @@ -26,7 +26,7 @@ path: "{{ filesize_testlink }}" size: "512 kB" register: filesize_test_symlink_01 - check_mode: yes + check_mode: true - name: Create a file with a size of 512 kB (512000 bytes) community.general.filesize: @@ -45,7 +45,7 @@ path: "{{ filesize_testlink }}" size: "500 KiB" register: filesize_test_symlink_03 - check_mode: yes + check_mode: true - name: Create a file with a size of 500 KiB (512000 bytes) (idempotency) community.general.filesize: diff --git a/tests/integration/targets/filesystem/tasks/create_fs.yml b/tests/integration/targets/filesystem/tasks/create_fs.yml index 82f92f4cc3..d5470fa56b 100644 --- a/tests/integration/targets/filesystem/tasks/create_fs.yml +++ b/tests/integration/targets/filesystem/tasks/create_fs.yml @@ -44,7 +44,7 @@ community.general.filesystem: dev: '{{ dev }}' fstype: '{{ fstype }}' - force: yes + force: true register: fs3_result - name: "Get UUID of the new filesystem" @@ -84,7 +84,7 @@ community.general.filesystem: dev: '{{ dev }}' fstype: '{{ fstype }}' - resizefs: yes + resizefs: true register: fs4_result - name: "Get UUID of the filesystem" @@ -109,7 +109,7 @@ community.general.filesystem: dev: '{{ dev }}' fstype: '{{ fstype }}' - resizefs: yes + resizefs: true register: fs5_result - name: "Assert that the state did not change" diff --git a/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml b/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml index 25bc9a0699..de0ad4d66b 100644 --- a/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml +++ b/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml @@ -42,7 +42,7 @@ community.general.filesystem: dev: '{{ dev }}' fstype: '{{ fstype }}' - force: yes + force: true register: fs_result2 - name: 'Get UUID of the new filesystem' diff --git a/tests/integration/targets/filesystem/tasks/remove_fs.yml b/tests/integration/targets/filesystem/tasks/remove_fs.yml index aaa78ae563..c5428b309f 100644 --- a/tests/integration/targets/filesystem/tasks/remove_fs.yml +++ b/tests/integration/targets/filesystem/tasks/remove_fs.yml @@ -28,7 +28,7 @@ dev: '{{ dev }}' state: absent register: wipefs - check_mode: yes + check_mode: true - name: "Get filesystem UUID with 'blkid' (should remain the same)" ansible.builtin.shell: @@ -81,7 +81,7 @@ dev: '{{ dev }}' state: absent register: wipefs - check_mode: yes + check_mode: true - name: "Assert that the state did not change" ansible.builtin.assert: diff --git a/tests/integration/targets/filter_counter/tasks/main.yml b/tests/integration/targets/filter_counter/tasks/main.yml index 881d55d2f6..77d6b1b020 100644 --- a/tests/integration/targets/filter_counter/tasks/main.yml +++ b/tests/integration/targets/filter_counter/tasks/main.yml @@ -19,7 +19,7 @@ - name: test fail argument not a sequence debug: msg: "{{ {'a': 'b'} | community.general.counter }}" - ignore_errors: yes + ignore_errors: true register: res - name: verify test fail argument not a sequence @@ -31,7 +31,7 @@ - name: test fail element not hashable debug: msg: "{{ [{'a': 'b'}] | community.general.counter }}" - ignore_errors: yes + ignore_errors: true register: res - name: verify test fail element not hashable diff --git a/tests/integration/targets/filter_random_mac/tasks/main.yml b/tests/integration/targets/filter_random_mac/tasks/main.yml index f9f85e986b..230f9776d5 100644 --- a/tests/integration/targets/filter_random_mac/tasks/main.yml +++ b/tests/integration/targets/filter_random_mac/tasks/main.yml @@ -13,7 +13,7 @@ debug: var: "0 | community.general.random_mac" register: _bad_random_mac_filter - ignore_errors: yes + ignore_errors: true - name: Verify random_mac filter showed a bad argument type error message assert: @@ -25,7 +25,7 @@ debug: var: "'dummy' | community.general.random_mac" register: _bad_random_mac_filter - ignore_errors: yes + ignore_errors: true - name: Verify random_mac filter showed a bad argument value error message assert: @@ -37,7 +37,7 @@ debug: var: "'00:00:00:00:00:00' | community.general.random_mac" register: _bad_random_mac_filter - ignore_errors: yes + ignore_errors: true - name: Verify random_mac filter showed a prefix too big error message assert: diff --git a/tests/integration/targets/filter_time/tasks/main.yml b/tests/integration/targets/filter_time/tasks/main.yml index bd8c53ac31..3b6539499e 100644 --- a/tests/integration/targets/filter_time/tasks/main.yml +++ b/tests/integration/targets/filter_time/tasks/main.yml @@ -81,7 +81,7 @@ - name: test fail unknown unit debug: msg: "{{ '1s' | community.general.to_time_unit('lightyears') }}" - ignore_errors: yes + ignore_errors: true register: res - name: verify test fail unknown unit @@ -93,7 +93,7 @@ - name: test fail unknown string debug: msg: "{{ '1 s' | community.general.to_time_unit('s') }}" - ignore_errors: yes + ignore_errors: true register: res - name: test fail unknown string @@ -105,7 +105,7 @@ - name: test fail unknown kwarg debug: msg: "{{ '1s' | community.general.to_time_unit('s', second=23) }}" - ignore_errors: yes + ignore_errors: true register: res - name: test fail unknown kwarg diff --git a/tests/integration/targets/gandi_livedns/tasks/create_record.yml b/tests/integration/targets/gandi_livedns/tasks/create_record.yml index 9d764a4198..c3f1c17981 100644 --- a/tests/integration/targets/gandi_livedns/tasks/create_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/create_record.yml @@ -25,7 +25,7 @@ values: "{{ item['values'] }}" ttl: "{{ item.ttl }}" type: "{{ item.type }}" - check_mode: yes + check_mode: true register: result - name: verify test create a dns record in check mode assert: diff --git a/tests/integration/targets/gandi_livedns/tasks/remove_record.yml b/tests/integration/targets/gandi_livedns/tasks/remove_record.yml index 6f497d2375..c4b937fd5a 100644 --- a/tests/integration/targets/gandi_livedns/tasks/remove_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/remove_record.yml @@ -11,7 +11,7 @@ values: "{{ item.update_values | default(item['values']) }}" type: "{{ item.type }}" state: absent - check_mode: yes + check_mode: true register: result - name: verify test remove a dns record in check mode assert: diff --git a/tests/integration/targets/gandi_livedns/tasks/update_record.yml b/tests/integration/targets/gandi_livedns/tasks/update_record.yml index 7489059de1..a080560a75 100644 --- a/tests/integration/targets/gandi_livedns/tasks/update_record.yml +++ b/tests/integration/targets/gandi_livedns/tasks/update_record.yml @@ -11,7 +11,7 @@ values: "{{ item.update_values | default(item['values']) }}" ttl: "{{ item.update_ttl | default(item.ttl) }}" type: "{{ item.type }}" - check_mode: yes + check_mode: true register: result - name: verify test update in check mode assert: diff --git a/tests/integration/targets/gem/tasks/main.yml b/tests/integration/targets/gem/tasks/main.yml index edf813ba4a..7b975f0351 100644 --- a/tests/integration/targets/gem/tasks/main.yml +++ b/tests/integration/targets/gem/tasks/main.yml @@ -34,7 +34,7 @@ name: gist state: present register: install_gem_result - ignore_errors: yes + ignore_errors: true # when running as root on Fedora, '--install-dir' is set in the os defaults which is # incompatible with '--user-install', we ignore this error for this case only @@ -79,7 +79,7 @@ gem: name: gist state: present - user_install: no + user_install: false register: install_gem_result - name: List gems @@ -115,7 +115,7 @@ name: gist state: present install_dir: "{{ remote_tmp_dir }}/gems" - ignore_errors: yes + ignore_errors: true register: install_gem_fail_result - debug: @@ -132,7 +132,7 @@ gem: name: gist state: present - user_install: no + user_install: false install_dir: "{{ remote_tmp_dir }}/gems" register: install_gem_result @@ -148,13 +148,13 @@ that: - install_gem_result is changed - gem_search.files[0].path is search('gist-[0-9.]+') - ignore_errors: yes + ignore_errors: true - name: Remove a gem in a custom directory gem: name: gist state: absent - user_install: no + user_install: false install_dir: "{{ remote_tmp_dir }}/gems" register: install_gem_result @@ -177,7 +177,7 @@ name: gist state: present bindir: "{{ remote_tmp_dir }}/custom_bindir" - norc: yes + norc: true user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL register: install_gem_result @@ -197,7 +197,7 @@ name: gist state: absent bindir: "{{ remote_tmp_dir }}/custom_bindir" - norc: yes + norc: true user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL register: install_gem_result diff --git a/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml b/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml index d908f6e737..e294a83fb5 100644 --- a/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml +++ b/tests/integration/targets/git_config/tasks/exclusion_state_list-all.yml @@ -10,7 +10,7 @@ list_all: true state: absent register: result - ignore_errors: yes + ignore_errors: true - name: assert git_config failed assert: diff --git a/tests/integration/targets/git_config/tasks/setup.yml b/tests/integration/targets/git_config/tasks/setup.yml index 0112011bd6..6e5516da57 100644 --- a/tests/integration/targets/git_config/tasks/setup.yml +++ b/tests/integration/targets/git_config/tasks/setup.yml @@ -6,10 +6,10 @@ - name: verify that git is installed so this test can continue command: which git register: git_installed - ignore_errors: yes + ignore_errors: true - name: get git version, only newer than {{git_version_supporting_includes}} has includes option shell: "git --version | grep 'git version' | sed 's/git version //'" register: git_version - ignore_errors: yes + ignore_errors: true ... diff --git a/tests/integration/targets/git_config/tasks/unset_check_mode.yml b/tests/integration/targets/git_config/tasks/unset_check_mode.yml index 52ab4a27f3..39bce33790 100644 --- a/tests/integration/targets/git_config/tasks/unset_check_mode.yml +++ b/tests/integration/targets/git_config/tasks/unset_check_mode.yml @@ -10,7 +10,7 @@ name: "{{ option_name }}" scope: "{{ option_scope }}" state: absent - check_mode: yes + check_mode: true register: unset_result - name: getting value diff --git a/tests/integration/targets/gitlab_group_variable/tasks/main.yml b/tests/integration/targets/gitlab_group_variable/tasks/main.yml index 0f4a93f461..3ba0a176cd 100644 --- a/tests/integration/targets/gitlab_group_variable/tasks/main.yml +++ b/tests/integration/targets/gitlab_group_variable/tasks/main.yml @@ -27,7 +27,7 @@ group: "{{ gitlab_group_name }}" vars: ACCESS_KEY_ID: checkmode - check_mode: yes + check_mode: true register: gitlab_group_variable_state - name: check_mode state must be changed @@ -202,7 +202,7 @@ group: "{{ gitlab_group_name }}" vars: ACCESS_KEY_ID: checkmode - check_mode: yes + check_mode: true register: gitlab_group_variable_state - name: check_mode state must not be changed @@ -665,7 +665,7 @@ variables: - name: delete_me register: gitlab_group_variable_state - ignore_errors: yes + ignore_errors: true - name: verify fail assert: diff --git a/tests/integration/targets/gitlab_project_badge/tasks/main.yml b/tests/integration/targets/gitlab_project_badge/tasks/main.yml index fa8a806efe..dfd0bee75b 100644 --- a/tests/integration/targets/gitlab_project_badge/tasks/main.yml +++ b/tests/integration/targets/gitlab_project_badge/tasks/main.yml @@ -23,7 +23,7 @@ state: present - name: Create Badge (check) - check_mode: yes + check_mode: true gitlab_project_badge: api_url: "{{ gitlab_api_url }}" validate_certs: False @@ -84,7 +84,7 @@ - not gitlab_badge_create_confirmation_task.failed - name: Update Badge (check) - check_mode: yes + check_mode: true gitlab_project_badge: api_url: "{{ gitlab_api_url }}" validate_certs: False @@ -145,7 +145,7 @@ - not gitlab_badge_update_confirmation_task.failed - name: Delete Badge (check) - check_mode: yes + check_mode: true gitlab_project_badge: api_url: "{{ gitlab_api_url }}" validate_certs: False diff --git a/tests/integration/targets/gitlab_project_variable/tasks/main.yml b/tests/integration/targets/gitlab_project_variable/tasks/main.yml index 3c90bfe467..c82671aeae 100644 --- a/tests/integration/targets/gitlab_project_variable/tasks/main.yml +++ b/tests/integration/targets/gitlab_project_variable/tasks/main.yml @@ -27,7 +27,7 @@ project: "{{ gitlab_project_name }}" vars: ACCESS_KEY_ID: checkmode - check_mode: yes + check_mode: true register: gitlab_project_variable_state - name: check_mode state must be changed @@ -202,7 +202,7 @@ project: "{{ gitlab_project_name }}" vars: ACCESS_KEY_ID: checkmode - check_mode: yes + check_mode: true register: gitlab_project_variable_state - name: check_mode state must not be changed @@ -660,7 +660,7 @@ variables: - name: delete_me register: gitlab_project_variable_state - ignore_errors: yes + ignore_errors: true - name: verify fail assert: diff --git a/tests/integration/targets/hg/tasks/main.yml b/tests/integration/targets/hg/tasks/main.yml index a2cb8df903..1ca30459c8 100644 --- a/tests/integration/targets/hg/tasks/main.yml +++ b/tests/integration/targets/hg/tasks/main.yml @@ -12,7 +12,7 @@ - name: determine if mercurial is already installed command: which hg register: has_hg - ignore_errors: yes + ignore_errors: true - name: warn if the underlying system is not capable of running these tests debug: diff --git a/tests/integration/targets/hg/tasks/run-tests.yml b/tests/integration/targets/hg/tasks/run-tests.yml index e38aeae104..928b7cb68d 100644 --- a/tests/integration/targets/hg/tasks/run-tests.yml +++ b/tests/integration/targets/hg/tasks/run-tests.yml @@ -72,8 +72,8 @@ - name: Checkout non-existent repo clone hg: repo: "http://hg.pf.osdn.net/view/a/ak/akasurde/hg_project_test_1" - clone: no - update: no + clone: false + update: false register: hg_result3 ignore_errors: true diff --git a/tests/integration/targets/hg/tasks/uninstall.yml b/tests/integration/targets/hg/tasks/uninstall.yml index 80a28f0623..4a26995ef4 100644 --- a/tests/integration/targets/hg/tasks/uninstall.yml +++ b/tests/integration/targets/hg/tasks/uninstall.yml @@ -25,7 +25,7 @@ dnf: name: mercurial state: absent - autoremove: yes + autoremove: true when: ansible_facts.pkg_mgr == 'dnf' # the yum module does not have an autoremove parameter @@ -37,7 +37,7 @@ package: name: mercurial state: absent - autoremove: yes + autoremove: true when: ansible_facts.pkg_mgr in ['pkgng', 'community.general.pkgng'] - name: uninstall packages which were not originally installed (zypper) diff --git a/tests/integration/targets/homebrew/tasks/main.yml b/tests/integration/targets/homebrew/tasks/main.yml index 07cc81d034..1db3ef1a6a 100644 --- a/tests/integration/targets/homebrew/tasks/main.yml +++ b/tests/integration/targets/homebrew/tasks/main.yml @@ -22,9 +22,9 @@ #- name: Use ignored-pinned option while upgrading all # homebrew: -# upgrade_all: yes +# upgrade_all: true # upgrade_options: ignore-pinned -# become: yes +# become: true # become_user: "{{ brew_stat.stat.pw_name }}" # register: upgrade_option_result # environment: @@ -42,16 +42,16 @@ homebrew: name: "{{ package_name }}" state: absent - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" - name: Install {{ package_name }} package using homebrew homebrew: name: "{{ package_name }}" state: present - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" register: package_result @@ -63,8 +63,8 @@ homebrew: name: "{{ package_name }}" state: present - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" register: package_result @@ -76,8 +76,8 @@ homebrew: name: "{{ package_name }}" state: absent - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" register: package_result @@ -89,8 +89,8 @@ homebrew: name: "{{ package_name }}" state: absent - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" register: package_result diff --git a/tests/integration/targets/homebrew_cask/tasks/main.yml b/tests/integration/targets/homebrew_cask/tasks/main.yml index 9d7ac47b5a..85f2572664 100644 --- a/tests/integration/targets/homebrew_cask/tasks/main.yml +++ b/tests/integration/targets/homebrew_cask/tasks/main.yml @@ -25,7 +25,7 @@ homebrew_cask: name: "{{ cask }}" state: present - become: yes + become: true become_user: "{{ brew_stat.stat.pw_name }}" register: cask_install_result @@ -38,7 +38,7 @@ homebrew_cask: name: "{{ cask }}" state: present - become: yes + become: true become_user: "{{ brew_stat.stat.pw_name }}" register: cask_install_result @@ -53,7 +53,7 @@ name: "{{ cask }}" state: present install_options: force - become: yes + become: true become_user: "{{ brew_stat.stat.pw_name }}" register: cask_install_result @@ -68,6 +68,6 @@ name: "{{ cask }}" state: absent install_options: force - become: yes + become: true become_user: "{{ brew_stat.stat.pw_name }}" - ignore_errors: yes + ignore_errors: true diff --git a/tests/integration/targets/homectl/tasks/main.yml b/tests/integration/targets/homectl/tasks/main.yml index c57052c5d8..93c1089b47 100644 --- a/tests/integration/targets/homectl/tasks/main.yml +++ b/tests/integration/targets/homectl/tasks/main.yml @@ -7,19 +7,19 @@ - name: check systemd version command: "systemctl --version" register: systemd_version - ignore_errors: yes + ignore_errors: true - name: check homectl version command: homectl --version register: homectl_version - ignore_errors: yes + ignore_errors: true - block: - name: Check and start systemd-homed service service: name: systemd-homed.service state: started - enabled: yes + enabled: true - name: Add a user 'james' community.general.homectl: @@ -55,9 +55,9 @@ name: foo password: uq4895738!@#$%dfd state: present - resize: yes + resize: true register: resize_out - ignore_errors: yes + ignore_errors: true - name: Use option 'disksize=1G' without option resize (allowed) community.general.homectl: @@ -66,13 +66,13 @@ state: present disksize: 1G register: disk_out - ignore_errors: yes + ignore_errors: true - name: Try to Create user without giving password community.general.homectl: name: danielle register: danielle_out - ignore_errors: yes + ignore_errors: true - name: remove user 'foobar' without requiring password community.general.homectl: @@ -102,20 +102,20 @@ name: janet state: absent register: user_not_exist - ignore_errors: yes + ignore_errors: true - name: Use check_mode to try and create user 'diana' community.general.homectl: name: diana password: helloworld123!@ state: present - check_mode: yes + check_mode: true register: diana_create_checkmode_out - name: Verify user 'diana' was not created with check_mode command: homectl inspect diana register: user_diana_exists - ignore_errors: yes + ignore_errors: true - name: Try to modify user 'jake' with only noexec mount option in check_mode community.general.homectl: @@ -123,7 +123,7 @@ password: myreallysecurepassword12! state: present mountopts: noexec - check_mode: yes + check_mode: true register: jake_checkmode_out - name: Verify user 'jake' was not modified and still has all mount options @@ -152,8 +152,8 @@ password: incorrectPassword! state: present mountopts: noexec - locked: yes - ignore_errors: yes + locked: true + ignore_errors: true register: jake_incorrect_pass_out - assert: diff --git a/tests/integration/targets/hwc_ecs_instance/tasks/main.yml b/tests/integration/targets/hwc_ecs_instance/tasks/main.yml index 9322558f96..dd70861522 100644 --- a/tests/integration/targets/hwc_ecs_instance/tasks/main.yml +++ b/tests/integration/targets/hwc_ecs_instance/tasks/main.yml @@ -84,7 +84,7 @@ root_volume: volume_type: "SAS" state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -139,7 +139,7 @@ root_volume: volume_type: "SAS" state: present - check_mode: yes + check_mode: true register: result - name: idemponent assert: @@ -195,7 +195,7 @@ root_volume: volume_type: "SAS" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: diff --git a/tests/integration/targets/hwc_evs_disk/tasks/main.yml b/tests/integration/targets/hwc_evs_disk/tasks/main.yml index e691169016..63b7d03f95 100644 --- a/tests/integration/targets/hwc_evs_disk/tasks/main.yml +++ b/tests/integration/targets/hwc_evs_disk/tasks/main.yml @@ -64,7 +64,7 @@ volume_type: "SATA" size: 10 state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -91,7 +91,7 @@ volume_type: "SATA" size: 10 state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is false assert: diff --git a/tests/integration/targets/hwc_vpc_eip/tasks/main.yml b/tests/integration/targets/hwc_vpc_eip/tasks/main.yml index 462b5ff93f..bbcefcaa62 100644 --- a/tests/integration/targets/hwc_vpc_eip/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_eip/tasks/main.yml @@ -49,7 +49,7 @@ size: 1 port_id: "{{ port.id }}" state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -80,7 +80,7 @@ size: 1 port_id: "{{ port.id }}" state: present - check_mode: yes + check_mode: true register: result - name: idemponent assert: @@ -112,7 +112,7 @@ size: 1 port_id: "{{ port.id }}" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -143,7 +143,7 @@ size: 1 port_id: "{{ port.id }}" state: absent - check_mode: yes + check_mode: true register: result - name: idemponent assert: diff --git a/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml b/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml index 6a5eb19b89..b8e02a5394 100644 --- a/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_peering_connect/tasks/main.yml @@ -36,7 +36,7 @@ peering_vpc: vpc_id: "{{ vpc2.id }}" state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -64,7 +64,7 @@ peering_vpc: vpc_id: "{{ vpc2.id }}" state: present - check_mode: yes + check_mode: true register: result - name: idemponent assert: @@ -92,7 +92,7 @@ peering_vpc: vpc_id: "{{ vpc2.id }}" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -119,7 +119,7 @@ peering_vpc: vpc_id: "{{ vpc2.id }}" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is false assert: diff --git a/tests/integration/targets/hwc_vpc_port/tasks/main.yml b/tests/integration/targets/hwc_vpc_port/tasks/main.yml index d78498cbb6..bb8cf81b0b 100644 --- a/tests/integration/targets/hwc_vpc_port/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_port/tasks/main.yml @@ -35,7 +35,7 @@ subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -81,7 +81,7 @@ subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -104,7 +104,7 @@ subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" state: absent - check_mode: yes + check_mode: true register: result - name: idemponent assert: diff --git a/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml b/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml index 8bfd3e4d82..25972d7e9f 100644 --- a/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml @@ -35,7 +35,7 @@ subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -58,7 +58,7 @@ subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" state: present - check_mode: yes + check_mode: true register: result - name: idemponent assert: @@ -82,7 +82,7 @@ subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -105,7 +105,7 @@ subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" state: absent - check_mode: yes + check_mode: true register: result - name: idemponent assert: diff --git a/tests/integration/targets/hwc_vpc_route/tasks/main.yml b/tests/integration/targets/hwc_vpc_route/tasks/main.yml index c7ae7989ca..8e2e2ca825 100644 --- a/tests/integration/targets/hwc_vpc_route/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_route/tasks/main.yml @@ -43,7 +43,7 @@ vpc_id: "{{ vpc1.id }}" destination: "192.168.0.0/16" next_hop: "{{ connect.id }}" - check_mode: yes + check_mode: true register: result - assert: that: @@ -68,7 +68,7 @@ destination: "192.168.0.0/16" next_hop: "{{ connect.id }}" state: present - check_mode: yes + check_mode: true register: result - name: idemponent assert: @@ -94,7 +94,7 @@ destination: "192.168.0.0/16" next_hop: "{{ connect.id }}" state: absent - check_mode: yes + check_mode: true #---------------------------------------------------------- - name: delete a route hwc_vpc_route: @@ -114,7 +114,7 @@ destination: "192.168.0.0/16" next_hop: "{{ connect.id }}" state: absent - check_mode: yes + check_mode: true register: result - name: not changed assert: diff --git a/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml b/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml index f9d8e5bf76..b6ee25e25b 100644 --- a/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_security_group/tasks/main.yml @@ -18,7 +18,7 @@ hwc_vpc_security_group: name: "ansible_network_security_group_test" state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -40,7 +40,7 @@ hwc_vpc_security_group: name: "ansible_network_security_group_test" state: present - check_mode: yes + check_mode: true register: idemponent - name: idemponent assert: @@ -62,7 +62,7 @@ hwc_vpc_security_group: name: "ansible_network_security_group_test" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: diff --git a/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml b/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml index 0b7f99fd61..4ce4bafdc4 100644 --- a/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_security_group_rule/tasks/main.yml @@ -35,7 +35,7 @@ port_range_min: 22 remote_ip_prefix: "0.0.0.0/0" state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -102,7 +102,7 @@ port_range_min: 22 remote_ip_prefix: "0.0.0.0/0" state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: diff --git a/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml b/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml index 90243203f6..2eb7980b34 100644 --- a/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml @@ -32,7 +32,7 @@ name: "ansible_network_subnet_test" dhcp_enable: True state: present - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -62,7 +62,7 @@ name: "ansible_network_subnet_test" dhcp_enable: True state: present - check_mode: yes + check_mode: true register: result - name: idemponent assert: @@ -92,7 +92,7 @@ name: "ansible_network_subnet_test" dhcp_enable: True state: absent - check_mode: yes + check_mode: true register: result - name: assert changed is true assert: @@ -121,7 +121,7 @@ name: "ansible_network_subnet_test" dhcp_enable: True state: absent - check_mode: yes + check_mode: true register: result - name: idemponent assert: diff --git a/tests/integration/targets/ini_file/tasks/tests/01-value.yml b/tests/integration/targets/ini_file/tasks/tests/01-value.yml index 9670cd20f9..f95f166fe5 100644 --- a/tests/integration/targets/ini_file/tasks/tests/01-value.yml +++ b/tests/integration/targets/ini_file/tasks/tests/01-value.yml @@ -174,7 +174,7 @@ path: "{{ output_file }}" section: mysqld option: skip-name - allow_no_value: yes + allow_no_value: true register: result8 - name: test-value 8 - read content from output file @@ -203,7 +203,7 @@ path: "{{ output_file }}" section: mysqld option: skip-name - allow_no_value: yes + allow_no_value: true register: result9 - name: test-value 9 - assert 'changed' is false @@ -217,7 +217,7 @@ ini_file: path: "{{ output_file }}" section: new_empty_section - allow_no_value: yes + allow_no_value: true register: result10 - name: test-value 10 - assert 'changed' is true and section added @@ -231,7 +231,7 @@ ini_file: path: "{{ output_file }}" section: new_empty_section - allow_no_value: yes + allow_no_value: true register: result11 - name: test-value 11 - assert 'changed' is false @@ -246,7 +246,7 @@ state: absent path: "{{ output_file }}" section: new_empty_section - allow_no_value: yes + allow_no_value: true - name: test-value 12 - test allow_no_value with loop ini_file: @@ -254,7 +254,7 @@ section: mysqld option: "{{ item.o }}" value: "{{ item.v | d(omit) }}" - allow_no_value: yes + allow_no_value: true loop: - { o: "skip-name-resolve" } - { o: "max_connections", v: "500" } @@ -316,7 +316,7 @@ path: "{{ output_file }}" section: mysqld option: skip-name - allow_no_value: yes + allow_no_value: true register: result14 - name: test-value 14 - read content from output file @@ -376,7 +376,7 @@ copy: content: "" dest: "{{ output_file }}" - force: yes + force: true - name: test-value 16 - Ensure "beverage=coke" is created within no section ini_file: diff --git a/tests/integration/targets/ini_file/tasks/tests/02-values.yml b/tests/integration/targets/ini_file/tasks/tests/02-values.yml index 23071ebccc..b19a8799c1 100644 --- a/tests/integration/targets/ini_file/tasks/tests/02-values.yml +++ b/tests/integration/targets/ini_file/tasks/tests/02-values.yml @@ -722,7 +722,7 @@ copy: content: "" dest: "{{ output_file }}" - force: yes + force: true - name: "test-values 25 - Ensure 'beverage=[coke, pepsi]' is created within no section" ini_file: diff --git a/tests/integration/targets/iptables_state/tasks/main.yml b/tests/integration/targets/iptables_state/tasks/main.yml index 8ed0b46d0e..a74e74df48 100644 --- a/tests/integration/targets/iptables_state/tasks/main.yml +++ b/tests/integration/targets/iptables_state/tasks/main.yml @@ -12,7 +12,7 @@ package: name: - iptables - become: yes + become: true - name: include tasks @@ -35,4 +35,4 @@ - xtables_lock is undefined - ansible_connection in ['ssh', 'paramiko', 'smart'] - become: yes + become: true diff --git a/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml b/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml index 722f362da9..7b366edcec 100644 --- a/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml +++ b/tests/integration/targets/iptables_state/tasks/tests/00-basic.yml @@ -22,14 +22,14 @@ iptables_state: name: foobar register: iptables_state - ignore_errors: yes + ignore_errors: true - name: "assert that results are as expected" assert: that: - iptables_state is failed - iptables_state.msg is match("Invalid options") - quiet: yes + quiet: true @@ -37,14 +37,14 @@ iptables_state: path: foobar register: iptables_state - ignore_errors: yes + ignore_errors: true - name: "assert that results are as expected" assert: that: - iptables_state is failed - iptables_state.msg is match("missing required arguments") - quiet: yes + quiet: true @@ -52,14 +52,14 @@ iptables_state: state: saved register: iptables_state - ignore_errors: yes + ignore_errors: true - name: "assert that results are as expected" assert: that: - iptables_state is failed - iptables_state.msg is match("missing required arguments") - quiet: yes + quiet: true @@ -68,14 +68,14 @@ path: foobar state: present register: iptables_state - ignore_errors: yes + ignore_errors: true - name: "assert that results are as expected" assert: that: - iptables_state is failed - iptables_state.msg is match("value of state must be one of") - quiet: yes + quiet: true # @@ -89,14 +89,14 @@ path: "{{ iptables_saved }}" state: saved register: iptables_state - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: that: - iptables_state is changed - iptables_state.initial_state == iptables_state.saved - quiet: yes + quiet: true @@ -111,7 +111,7 @@ that: - iptables_state is changed - iptables_state.initial_state == iptables_state.saved - quiet: yes + quiet: true @@ -126,7 +126,7 @@ that: - iptables_state is not changed - iptables_state.initial_state == iptables_state.saved - quiet: yes + quiet: true @@ -135,14 +135,14 @@ path: "{{ iptables_saved }}" state: saved register: iptables_state - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: that: - iptables_state is not changed - iptables_state.initial_state == iptables_state.saved - quiet: yes + quiet: true @@ -157,14 +157,14 @@ path: "{{ iptables_saved }}" state: restored register: iptables_state - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: that: - iptables_state is not changed - iptables_state.initial_state == iptables_state.restored - quiet: yes + quiet: true rescue: - name: "assert that results are not as expected for only one reason (xtables lock)" @@ -172,7 +172,7 @@ that: - iptables_state is failed - iptables_state.stderr is search('xtables lock') - quiet: yes + quiet: true register: xtables_lock @@ -190,7 +190,7 @@ that: - iptables_state is not changed - iptables_state.initial_state == iptables_state.restored - quiet: yes + quiet: true rescue: - name: "assert that results are not as expected for only one reason (xtables lock)" @@ -198,7 +198,7 @@ that: - iptables_state is failed - iptables_state.stderr is search('xtables lock') - quiet: yes + quiet: true register: xtables_lock @@ -217,14 +217,14 @@ path: "{{ iptables_saved }}" state: restored register: iptables_state - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: that: - iptables_state is changed - iptables_state.initial_state != iptables_state.restored - quiet: yes + quiet: true rescue: - name: "assert that results are not as expected for only one reason (xtables lock)" @@ -232,7 +232,7 @@ that: - iptables_state is failed - iptables_state.stderr is search('xtables lock') - quiet: yes + quiet: true register: xtables_lock @@ -253,7 +253,7 @@ - iptables_state is changed - iptables_state.initial_state != iptables_state.restored - iptables_state.applied - quiet: yes + quiet: true rescue: - name: "assert that results are not as expected for only one reason (xtables lock)" @@ -261,7 +261,7 @@ that: - iptables_state is failed - iptables_state.stderr is search('xtables lock') - quiet: yes + quiet: true register: xtables_lock @@ -281,7 +281,7 @@ that: - iptables_state is not changed - iptables_state.initial_state == iptables_state.restored - quiet: yes + quiet: true rescue: - name: "assert that results are not as expected for only one reason (xtables lock)" @@ -289,7 +289,7 @@ that: - iptables_state is failed - iptables_state.stderr is search('xtables lock') - quiet: yes + quiet: true register: xtables_lock @@ -301,14 +301,14 @@ path: "{{ iptables_saved }}" state: restored register: iptables_state - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: that: - iptables_state is not changed - iptables_state.initial_state == iptables_state.restored - quiet: yes + quiet: true rescue: - name: "assert that results are not as expected for only one reason (xtables lock)" @@ -316,5 +316,5 @@ that: - iptables_state is failed - iptables_state.stderr is search('xtables lock') - quiet: yes + quiet: true register: xtables_lock diff --git a/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml b/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml index 929928c8e7..8a9869c437 100644 --- a/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml +++ b/tests/integration/targets/iptables_state/tasks/tests/01-tables.yml @@ -17,7 +17,7 @@ path: "{{ iptables_saved }}" register: iptables_state changed_when: false - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: @@ -25,7 +25,7 @@ - "'*filter' in iptables_state.initial_state" - iptables_state.tables.filter is defined - iptables_state.tables.nat is undefined - quiet: yes + quiet: true @@ -36,7 +36,7 @@ path: "{{ iptables_saved }}" register: iptables_state changed_when: false - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: @@ -45,7 +45,7 @@ - "'*filter' in iptables_state.initial_state" - iptables_state.tables.nat is defined - iptables_state.tables.filter is undefined - quiet: yes + quiet: true @@ -65,7 +65,7 @@ - "'*nat' not in iptables_state.saved" - iptables_state.tables.filter is defined - iptables_state.tables.nat is undefined - quiet: yes + quiet: true @@ -86,7 +86,7 @@ - "'*filter' not in iptables_state.saved" - iptables_state.tables.nat is defined - iptables_state.tables.filter is undefined - quiet: yes + quiet: true @@ -106,7 +106,7 @@ - "'*nat' in iptables_state.saved" - iptables_state.tables.filter is defined - iptables_state.tables.nat is defined - quiet: yes + quiet: true @@ -129,7 +129,7 @@ - iptables_state.tables.nat is defined - iptables_state.tables.filter is undefined - iptables_state is not changed - quiet: yes + quiet: true @@ -163,7 +163,7 @@ - "'-A INPUT -j ACCEPT' not in iptables_state.restored" - iptables_state.tables.filter is undefined - iptables_state is changed - quiet: yes + quiet: true @@ -176,7 +176,7 @@ - raw - mangle changed_when: false - check_mode: yes + check_mode: true @@ -197,7 +197,7 @@ - "'*nat' in iptables_state.saved" - "'raw' in iptables_state.tables" - "'*raw' in iptables_state.saved" - quiet: yes + quiet: true @@ -239,7 +239,7 @@ - "'*nat' not in iptables_state.restored" - "'*raw' not in iptables_state.restored" - iptables_state is not changed - quiet: yes + quiet: true @@ -267,7 +267,7 @@ - "'*nat' in iptables_state.restored" - "'*raw' in iptables_state.restored" - iptables_state is not changed - quiet: yes + quiet: true @@ -279,7 +279,7 @@ register: iptables_state async: "{{ ansible_timeout }}" poll: 0 - ignore_errors: yes + ignore_errors: true - name: "explain expected failure" assert: diff --git a/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml b/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml index af49482114..53fdd3ca03 100644 --- a/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml +++ b/tests/integration/targets/iptables_state/tasks/tests/10-rollback.yml @@ -18,7 +18,7 @@ path: "{{ iptables_tests }}" state: restored register: iptables_state - check_mode: yes + check_mode: true - name: "assert that results are as expected" assert: diff --git a/tests/integration/targets/ipwcli_dns/tasks/main.yml b/tests/integration/targets/ipwcli_dns/tasks/main.yml index ca47b4dece..9cbb4edc2e 100644 --- a/tests/integration/targets/ipwcli_dns/tasks/main.yml +++ b/tests/integration/targets/ipwcli_dns/tasks/main.yml @@ -83,7 +83,7 @@ username: '{{ username }}' password: '{{ password }}' register: result - ignore_errors: yes + ignore_errors: true - name: assert the failure of the new SRV record assert: @@ -105,7 +105,7 @@ flags: S username: '{{ username }}' password: '{{ password }}' - check_mode: yes + check_mode: true register: result - name: assert the NAPTR check_mode diff --git a/tests/integration/targets/iso_create/tasks/main.yml b/tests/integration/targets/iso_create/tasks/main.yml index 4d321c2d23..a719e91d8e 100644 --- a/tests/integration/targets/iso_create/tasks/main.yml +++ b/tests/integration/targets/iso_create/tasks/main.yml @@ -35,7 +35,7 @@ dest_iso: "{{ output_test_dir }}/test.iso" interchange_level: 3 register: iso_result - check_mode: yes + check_mode: true - debug: var=iso_result - name: Check if iso file created diff --git a/tests/integration/targets/iso_extract/tasks/7zip.yml b/tests/integration/targets/iso_extract/tasks/7zip.yml index 3d3c12250a..b16f202398 100644 --- a/tests/integration/targets/iso_extract/tasks/7zip.yml +++ b/tests/integration/targets/iso_extract/tasks/7zip.yml @@ -7,7 +7,7 @@ - name: Gather facts setup: - become: yes + become: true - name: Include distribution specific variables include_vars: "{{ lookup('first_found', params) }}" @@ -45,8 +45,8 @@ homebrew: name: p7zip state: present - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" # Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a # proper solution can be found diff --git a/tests/integration/targets/iso_extract/tasks/main.yml b/tests/integration/targets/iso_extract/tasks/main.yml index 4a7097de8a..67ebfa7ab6 100644 --- a/tests/integration/targets/iso_extract/tasks/main.yml +++ b/tests/integration/targets/iso_extract/tasks/main.yml @@ -29,7 +29,7 @@ - name: Test in normal mode import_tasks: tests.yml vars: - in_check_mode: no + in_check_mode: false - name: Prepare environment import_tasks: prepare.yml @@ -37,7 +37,7 @@ - name: Test in check-mode import_tasks: tests.yml vars: - in_check_mode: yes - check_mode: yes + in_check_mode: true + check_mode: true # FIXME - fill this in after figuring out how to allow mounts diff --git a/tests/integration/targets/java_cert/tasks/main.yml b/tests/integration/targets/java_cert/tasks/main.yml index 54d205c255..25ec87e8f9 100644 --- a/tests/integration/targets/java_cert/tasks/main.yml +++ b/tests/integration/targets/java_cert/tasks/main.yml @@ -24,7 +24,7 @@ cert_alias: default keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}" keystore_pass: changeme_keystore - keystore_create: yes + keystore_create: true state: present register: result_success @@ -41,7 +41,7 @@ cert_alias: default_new keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}" keystore_pass: changeme_keystore - keystore_create: yes + keystore_create: true state: present ignore_errors: true register: result_wrong_pass @@ -58,7 +58,7 @@ cert_alias: default keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}" keystore_pass: changeme_keystore - keystore_create: yes + keystore_create: true state: present ignore_errors: true register: result_excl_params diff --git a/tests/integration/targets/java_cert/tasks/state_change.yml b/tests/integration/targets/java_cert/tasks/state_change.yml index 114c51ef58..e135a60a3e 100644 --- a/tests/integration/targets/java_cert/tasks/state_change.yml +++ b/tests/integration/targets/java_cert/tasks/state_change.yml @@ -117,7 +117,7 @@ pkcs12_password: "{{ test_keystore2_password }}" keystore_path: "{{ test_keystore2_path }}" keystore_pass: "{{ test_keystore2_password }}" - keystore_create: yes + keystore_create: true - name: List newly created keystore content ansible.builtin.command: @@ -138,8 +138,8 @@ pkcs12_password: "{{ test_keystore2_password }}" keystore_path: "{{ test_keystore2_path }}" keystore_pass: "{{ test_keystore2_password }}" - keystore_create: yes - ignore_errors: yes + keystore_create: true + ignore_errors: true register: result_x509_changed - name: Verify the x509 status is failed @@ -153,7 +153,7 @@ cert_path: "{{ test_cert_path }}" keystore_path: "{{ test_keystore2_path }}" keystore_pass: "{{ test_keystore2_password }}" - keystore_create: yes + keystore_create: true state: present register: result_x509_changed diff --git a/tests/integration/targets/java_keystore/tasks/tests.yml b/tests/integration/targets/java_keystore/tasks/tests.yml index a3d6ebf7d9..899fe27e85 100644 --- a/tests/integration/targets/java_keystore/tasks/tests.yml +++ b/tests/integration/targets/java_keystore/tasks/tests.yml @@ -46,7 +46,7 @@ loop: "{{ java_keystore_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_check - name: Create a Java keystore for the given certificates @@ -62,7 +62,7 @@ loop: "{{ java_keystore_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_idem_check - name: Create a Java keystore for the given certificates (idempotency) @@ -102,7 +102,7 @@ loop: "{{ java_keystore_new_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_change_check - name: Create a Java keystore for the given certificates (certificate changed) @@ -120,7 +120,7 @@ loop: "{{ java_keystore_new_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_alias_change_check - name: Create a Java keystore for the given certificates (alias changed) @@ -141,7 +141,7 @@ loop: "{{ java_keystore_new_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_pw_change_check - name: Create a Java keystore for the given certificates (password changed) @@ -164,7 +164,7 @@ loop: "{{ java_keystore_new_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_type_pkcs12_check - name: Create a Java keystore for the given certificates (force keystore type jks, check mode) @@ -176,7 +176,7 @@ loop: "{{ java_keystore_new_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_type_jks_check - name: Create a Java keystore for the given certificates (force keystore type jks) @@ -225,7 +225,7 @@ loop: "{{ java_keystore_new_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_type_change_check - name: Create a Java keystore for the given certificates (keystore type changed) @@ -248,7 +248,7 @@ loop: "{{ java_keystore_new_certs }}" loop_control: index_var: loop_index - check_mode: yes + check_mode: true register: result_type_omit_check - name: Create a Java keystore for the given certificates (omit keystore type) diff --git a/tests/integration/targets/jboss/tasks/jboss.yml b/tests/integration/targets/jboss/tasks/jboss.yml index 13d0c6bc70..2403a02c4f 100644 --- a/tests/integration/targets/jboss/tasks/jboss.yml +++ b/tests/integration/targets/jboss/tasks/jboss.yml @@ -48,7 +48,7 @@ test_deployment: helloworld-1.war task_parameters: &task_parameters become_user: '{{ wf_user }}' - become: yes + become: true register: result block: @@ -67,7 +67,7 @@ jboss: deployment: '{{ war_file_1 }}' src: '{{ war_file_1_path }}' - check_mode: yes + check_mode: true - assert: that: @@ -78,7 +78,7 @@ <<: *task_parameters file: path: '{{ deploy_dir }}/{{ war_file_1 }}.deployed' - ignore_errors: yes + ignore_errors: true - assert: that: @@ -113,7 +113,7 @@ deployment: '{{ war_file_1 }}' src: '{{ war_file_1_path }}' deploy_path: '{{ deploy_dir }}' - check_mode: yes + check_mode: true - assert: that: @@ -148,7 +148,7 @@ deployment: '{{ war_file_1 }}' deploy_path: '{{ deploy_dir }}' state: absent - check_mode: yes + check_mode: true - assert: that: @@ -191,7 +191,7 @@ deployment: '{{ war_file_1 }}' deploy_path: '{{ deploy_dir }}' state: absent - check_mode: yes + check_mode: true - assert: that: @@ -217,7 +217,7 @@ deploy_path: '{{ deploy_dir }}' src: '{{ fake_src_path }}' state: present - ignore_errors: yes + ignore_errors: true - assert: that: @@ -230,7 +230,7 @@ jboss: deployment: '{{ war_file_1 }}' state: present - ignore_errors: yes + ignore_errors: true - assert: that: diff --git a/tests/integration/targets/keycloak_client/tasks/main.yml b/tests/integration/targets/keycloak_client/tasks/main.yml index 933f00bd15..513d5836b8 100644 --- a/tests/integration/targets/keycloak_client/tasks/main.yml +++ b/tests/integration/targets/keycloak_client/tasks/main.yml @@ -45,7 +45,7 @@ - name: Check client again with same props community.general.keycloak_client: "{{ auth_args | combine(call_args) }}" - check_mode: yes + check_mode: true vars: call_args: realm: "{{ realm }}" diff --git a/tests/integration/targets/launchd/tasks/setup.yml b/tests/integration/targets/launchd/tasks/setup.yml index 1df9667bf9..bd7134cc07 100644 --- a/tests/integration/targets/launchd/tasks/setup.yml +++ b/tests/integration/targets/launchd/tasks/setup.yml @@ -7,7 +7,7 @@ template: src: "{{ launchd_service_name }}.plist.j2" dest: "{{ launchd_plist_location }}" - become: yes + become: true - name: install the test daemon script copy: @@ -20,4 +20,4 @@ path: /usr/local/sbin/ansible_test_service line: "#!{{ ansible_python_interpreter | realpath }}" insertbefore: BOF - firstmatch: yes + firstmatch: true diff --git a/tests/integration/targets/launchd/tasks/teardown.yml b/tests/integration/targets/launchd/tasks/teardown.yml index e781757050..e364056e6d 100644 --- a/tests/integration/targets/launchd/tasks/teardown.yml +++ b/tests/integration/targets/launchd/tasks/teardown.yml @@ -7,7 +7,7 @@ launchd: name: "{{ launchd_service_name }}" state: unloaded - become: yes + become: true register: launchd_unloaded_result - name: "[{{ item }}] Validation" @@ -21,10 +21,10 @@ file: path: "{{ launchd_plist_location }}" state: absent - become: yes + become: true - name: "[{{ item }}] Remove test service server" file: path: "/usr/local/sbin/ansible_test_service" state: absent - become: yes + become: true diff --git a/tests/integration/targets/launchd/tasks/tests/test_reload.yml b/tests/integration/targets/launchd/tasks/tests/test_reload.yml index df2c1be9fa..04dc8ae72d 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_reload.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_reload.yml @@ -9,9 +9,9 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_1_launchd_start_result_check_mode" - check_mode: yes + check_mode: true - name: "[{{ item }}] Assert that everything work in check mode" assert: @@ -23,7 +23,7 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_1_launchd_start_result" @@ -37,13 +37,13 @@ template: src: "modified.{{ launchd_service_name }}.plist.j2" dest: "{{ launchd_plist_location }}" - become: yes + become: true - name: "[{{ item }}] When reloading the service..." launchd: name: "{{ launchd_service_name }}" state: reloaded - become: yes + become: true register: "test_1_launchd_reload_result" - name: "[{{ item }}] Validate that service was reloaded" @@ -60,7 +60,7 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_1_launchd_start_result" diff --git a/tests/integration/targets/launchd/tasks/tests/test_restart.yml b/tests/integration/targets/launchd/tasks/tests/test_restart.yml index 08ef62d919..44064cef12 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_restart.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_restart.yml @@ -9,7 +9,7 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_1_launchd_start_result" @@ -17,9 +17,9 @@ launchd: name: "{{ launchd_service_name }}" state: restarted - become: yes + become: true register: "test_1_launchd_restart_result_check_mode" - check_mode: yes + check_mode: true - name: "[{{ item }}] Validate that service was restarted in check mode" assert: @@ -31,7 +31,7 @@ launchd: name: "{{ launchd_service_name }}" state: restarted - become: yes + become: true register: "test_1_launchd_restart_result" - name: "[{{ item }}] Validate that service was restarted" diff --git a/tests/integration/targets/launchd/tasks/tests/test_runatload.yml b/tests/integration/targets/launchd/tasks/tests/test_runatload.yml index 03059fc884..87c72d5329 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_runatload.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_runatload.yml @@ -9,8 +9,8 @@ launchd: name: "{{ launchd_service_name }}" state: started - enabled: yes - become: yes + enabled: true + become: true register: test_1_launchd_start_result - name: "[{{ item }}] Validate that service was started" @@ -31,6 +31,6 @@ \s+RunAtLoad \s+ replace: found_run_at_load - check_mode: yes + check_mode: true register: contents_would_have failed_when: not contents_would_have is changed diff --git a/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml b/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml index 2a78f89c12..bf59979aaf 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_start_stop.yml @@ -9,9 +9,9 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_1_launchd_start_result_check_mode" - check_mode: yes + check_mode: true - name: "[{{ item }}] Validate that service was started in check mode" @@ -25,7 +25,7 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_1_launchd_start_result" @@ -46,7 +46,7 @@ launchd: name: "{{ launchd_service_name }}" state: stopped - become: yes + become: true register: "test_2_launchd_stop_result" - name: "[{{ item }}] Validate that service was stopped after it was started" @@ -65,7 +65,7 @@ launchd: name: "{{ launchd_service_name }}" state: stopped - become: yes + become: true register: "test_3_launchd_stop_result" - name: "[{{ item }}] Validate that service can be stopped after being already stopped" @@ -84,7 +84,7 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_4_launchd_start_result" - name: "[{{ item }}] Validate that service was started..." @@ -102,7 +102,7 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_5_launchd_start_result" - name: "[{{ item }}] Validate that service is still in the same state as before" diff --git a/tests/integration/targets/launchd/tasks/tests/test_unload.yml b/tests/integration/targets/launchd/tasks/tests/test_unload.yml index aee9d8b5ee..8915aac8b6 100644 --- a/tests/integration/targets/launchd/tasks/tests/test_unload.yml +++ b/tests/integration/targets/launchd/tasks/tests/test_unload.yml @@ -9,7 +9,7 @@ launchd: name: "{{ launchd_service_name }}" state: started - become: yes + become: true register: "test_1_launchd_start_result" @@ -17,9 +17,9 @@ launchd: name: "{{ launchd_service_name }}" state: unloaded - become: yes + become: true register: "test_1_launchd_unloaded_result_check_mode" - check_mode: yes + check_mode: true - name: "[{{ item }}] Validate that service was unloaded in check mode" assert: @@ -32,7 +32,7 @@ launchd: name: "{{ launchd_service_name }}" state: unloaded - become: yes + become: true register: "test_1_launchd_unloaded_result" - name: "[{{ item }}] Validate that service was unloaded" @@ -51,7 +51,7 @@ launchd: name: "{{ launchd_service_name }}" state: unloaded - become: yes + become: true register: "test_2_launchd_unloaded_result" - name: "[{{ item }}] Validate that service did not change and is still unloaded" diff --git a/tests/integration/targets/ldap_search/tasks/tests/basic.yml b/tests/integration/targets/ldap_search/tasks/tests/basic.yml index ab6c745277..36d245d396 100644 --- a/tests/integration/targets/ldap_search/tasks/tests/basic.yml +++ b/tests/integration/targets/ldap_search/tasks/tests/basic.yml @@ -14,7 +14,7 @@ dn: "ou=users,dc=example,dc=com" scope: "onelevel" filter: "(uid=ldaptest)" - ignore_errors: yes + ignore_errors: true register: output - name: assert that test LDAP user can be found diff --git a/tests/integration/targets/lookup_dig/tasks/main.yml b/tests/integration/targets/lookup_dig/tasks/main.yml index 5c0ebeb761..2f48333cb0 100644 --- a/tests/integration/targets/lookup_dig/tasks/main.yml +++ b/tests/integration/targets/lookup_dig/tasks/main.yml @@ -29,7 +29,7 @@ - name: Test dig lookup with non-existing domain and fail_on_error=yes set_fact: dig_nonexisting_fail_yes: "{{ lookup('community.general.dig', 'non-existing.domain.', 'fail_on_error=yes') }}" - ignore_errors: yes + ignore_errors: true register: dig_nonexisting_fail_yes_result - name: Verify that the task failed diff --git a/tests/integration/targets/lookup_passwordstore/tasks/package.yml b/tests/integration/targets/lookup_passwordstore/tasks/package.yml index 89d750ee6d..3623101c86 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/package.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/package.yml @@ -32,14 +32,14 @@ package: name: password-store state: present - update_cache: yes - disable_gpg_check: yes + update_cache: true + disable_gpg_check: true when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper'] # See https://github.com/gopasspw/gopass/issues/1849#issuecomment-802789285 - name: Install gopass on Debian when: ansible_facts.os_family == 'Debian' - become: yes + become: true block: - name: Fetch gopass repo keyring ansible.builtin.get_url: @@ -54,7 +54,7 @@ - name: Update apt-cache and install gopass package ansible.builtin.apt: name: gopass - update_cache: yes + update_cache: true - name: Install on macOS when: ansible_facts.distribution == 'MacOSX' @@ -75,8 +75,8 @@ - pass - gopass state: present - update_homebrew: no - become: yes + update_homebrew: false + become: true become_user: "{{ brew_stat.stat.pw_name }}" # Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a # proper solution can be found diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index 583aafd108..65a578c962 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -14,7 +14,7 @@ - name: Stop gpg-agent so we can remove any locks on the GnuPG dir command: gpgconf --kill gpg-agent - ignore_errors: yes + ignore_errors: true - name: Remove previous password files and directory file: diff --git a/tests/integration/targets/lookup_random_pet/test.yml b/tests/integration/targets/lookup_random_pet/test.yml index 31ce38c4d0..c61461867a 100644 --- a/tests/integration/targets/lookup_random_pet/test.yml +++ b/tests/integration/targets/lookup_random_pet/test.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - hosts: localhost - gather_facts: no + gather_facts: false tasks: - name: Call plugin set_fact: diff --git a/tests/integration/targets/lookup_random_string/test.yml b/tests/integration/targets/lookup_random_string/test.yml index 2ce57ad2cb..b1f6234102 100644 --- a/tests/integration/targets/lookup_random_string/test.yml +++ b/tests/integration/targets/lookup_random_string/test.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - hosts: localhost - gather_facts: no + gather_facts: false tasks: - name: Call plugin set_fact: @@ -25,7 +25,7 @@ - name: Raise error when impossible constraints are provided set_fact: impossible: "{{ query('community.general.random_string', upper=false, lower=false, special=false, numbers=false) }}" - ignore_errors: yes + ignore_errors: true register: impossible_result - name: Check results diff --git a/tests/integration/targets/lvg/tasks/test_pvresize.yml b/tests/integration/targets/lvg/tasks/test_pvresize.yml index eef9503040..f15add91cb 100644 --- a/tests/integration/targets/lvg/tasks/test_pvresize.yml +++ b/tests/integration/targets/lvg/tasks/test_pvresize.yml @@ -27,7 +27,7 @@ lvg: vg: testvg pvs: "{{ loop_device1 }}" - pvresize: no + pvresize: false register: cmd_result - assert: @@ -47,8 +47,8 @@ lvg: vg: testvg pvs: "{{ loop_device1 }}" - pvresize: yes - check_mode: yes + pvresize: true + check_mode: true register: cmd_result - name: Assert that the module returned the state was changed @@ -69,7 +69,7 @@ lvg: vg: testvg pvs: "{{ loop_device1 }}" - pvresize: yes + pvresize: true - name: Gets current vg size shell: vgs -v testvg -o pv_size --noheading --units b | xargs diff --git a/tests/integration/targets/mail/tasks/main.yml b/tests/integration/targets/mail/tasks/main.yml index a79d9e9162..4f3f90a51d 100644 --- a/tests/integration/targets/mail/tasks/main.yml +++ b/tests/integration/targets/mail/tasks/main.yml @@ -15,7 +15,7 @@ pip: name: smtpd-tls state: present - ignore_errors: yes + ignore_errors: true register: smtpd_tls - name: Install test smtpserver @@ -70,7 +70,7 @@ body: Test body 4 attach: /etc/group secure: starttls - ignore_errors: yes + ignore_errors: true register: starttls_support # NOTE: This might fail if smtpd-tls is missing or python 2.7.8 or older is used @@ -83,7 +83,7 @@ body: Test body 5 attach: /etc/group secure: always - ignore_errors: yes + ignore_errors: true register: tls_support - fail: diff --git a/tests/integration/targets/mas/tasks/main.yml b/tests/integration/targets/mas/tasks/main.yml index ce50c39eb1..f659160dcc 100644 --- a/tests/integration/targets/mas/tasks/main.yml +++ b/tests/integration/targets/mas/tasks/main.yml @@ -14,7 +14,7 @@ mas: id: 421879749 state: absent - become: yes + become: true - name: Determine whether the app is installed stat: @@ -36,7 +36,7 @@ id: 421879749 state: present register: install_check - check_mode: yes + check_mode: true - name: Ensure that the status would have changed assert: @@ -98,8 +98,8 @@ id: 421879749 state: absent register: uninstall_check - become: yes - check_mode: yes + become: true + check_mode: true - name: Ensure that the status would have changed assert: @@ -122,7 +122,7 @@ id: 421879749 state: absent register: uninstall - become: yes + become: true - name: Ensure that the status changed assert: @@ -149,7 +149,7 @@ id: 421879749 state: absent register: uninstall_again - become: yes + become: true - name: Ensure that the status is unchanged (already uninstalled) assert: diff --git a/tests/integration/targets/module_helper/library/mstate.py b/tests/integration/targets/module_helper/library/mstate.py index 9e70ed4364..bfaab03755 100644 --- a/tests/integration/targets/module_helper/library/mstate.py +++ b/tests/integration/targets/module_helper/library/mstate.py @@ -18,7 +18,7 @@ options: a: description: aaaa type: int - required: yes + required: true b: description: bbbb type: str diff --git a/tests/integration/targets/module_helper/tasks/mdepfail.yml b/tests/integration/targets/module_helper/tasks/mdepfail.yml index 3f4ed9039d..1655be54e3 100644 --- a/tests/integration/targets/module_helper/tasks/mdepfail.yml +++ b/tests/integration/targets/module_helper/tasks/mdepfail.yml @@ -5,7 +5,7 @@ - name: test failing dependency mdepfail: a: 123 - ignore_errors: yes + ignore_errors: true register: result - name: assert failing dependency diff --git a/tests/integration/targets/module_helper/tasks/msimple.yml b/tests/integration/targets/module_helper/tasks/msimple.yml index 9010c455ca..03818639c7 100644 --- a/tests/integration/targets/module_helper/tasks/msimple.yml +++ b/tests/integration/targets/module_helper/tasks/msimple.yml @@ -18,7 +18,7 @@ - name: test msimple 2 msimple: a: 101 - ignore_errors: yes + ignore_errors: true register: simple2 - name: assert simple2 diff --git a/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml b/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml index 55e0a06eca..62fe1e327b 100644 --- a/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml +++ b/tests/integration/targets/module_helper/tasks/msimple_output_conflict.yml @@ -37,7 +37,7 @@ msimple: a: 101 m: a message in a bottle - ignore_errors: yes + ignore_errors: true register: simple3 - name: assert simple3 diff --git a/tests/integration/targets/monit/tasks/main.yml b/tests/integration/targets/monit/tasks/main.yml index 73b6cfc8a6..ea85954125 100644 --- a/tests/integration/targets/monit/tasks/main.yml +++ b/tests/integration/targets/monit/tasks/main.yml @@ -17,7 +17,7 @@ - ansible_distribution_major_version is version('9', '<') - name: create required directories - become: yes + become: true file: path: "{{ item }}" state: directory @@ -27,7 +27,7 @@ - "{{ process_root }}" - name: install monit - become: yes + become: true package: name: monit state: present @@ -40,13 +40,13 @@ - 'defaults.yml' - name: monit config - become: yes + become: true template: src: "monitrc.j2" dest: "{{ monitrc }}" - name: copy process file - become: yes + become: true copy: src: httpd_echo.py dest: "{{ process_file }}" @@ -73,7 +73,7 @@ - python-daemon - name: restart monit - become: yes + become: true service: name: monit state: restarted @@ -82,13 +82,13 @@ always: - name: stop monit - become: yes + become: true service: name: monit state: stopped - name: uninstall monit - become: yes + become: true package: name: monit state: absent diff --git a/tests/integration/targets/mssql_script/tasks/main.yml b/tests/integration/targets/mssql_script/tasks/main.yml index 2ecfd51c15..7f8d6d1840 100644 --- a/tests/integration/targets/mssql_script/tasks/main.yml +++ b/tests/integration/targets/mssql_script/tasks/main.yml @@ -169,7 +169,7 @@ login_host: "{{ mssql_host }}" login_port: "{{ mssql_port }}" script: SELECT Invalid_Column FROM Does_Not_Exist WITH Invalid Syntax - check_mode: yes + check_mode: true register: check_mode - assert: that: check_mode.query_results is undefined diff --git a/tests/integration/targets/npm/tasks/setup.yml b/tests/integration/targets/npm/tasks/setup.yml index 0c7a9eabfb..bad927915b 100644 --- a/tests/integration/targets/npm/tasks/setup.yml +++ b/tests/integration/targets/npm/tasks/setup.yml @@ -7,5 +7,5 @@ unarchive: src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/npm/{{ nodejs_path }}.tar.gz' dest: '{{ remote_tmp_dir }}' - remote_src: yes + remote_src: true creates: '{{ remote_tmp_dir }}/{{ nodejs_path }}.tar.gz' diff --git a/tests/integration/targets/osx_defaults/tasks/main.yml b/tests/integration/targets/osx_defaults/tasks/main.yml index 0de351991a..c3cb09d394 100644 --- a/tests/integration/targets/osx_defaults/tasks/main.yml +++ b/tests/integration/targets/osx_defaults/tasks/main.yml @@ -16,7 +16,7 @@ type: string state: present register: missing_value - ignore_errors: yes + ignore_errors: true - name: Test if state and value are required together assert: @@ -31,7 +31,7 @@ value: Centimeter state: present register: measure_task_check_mode - check_mode: yes + check_mode: true - name: Test if AppleMeasurementUnits value is changed to Centimeters in check_mode assert: @@ -163,7 +163,7 @@ key: ExampleKeyToRemove state: absent register: absent_check_mode_task - check_mode: yes + check_mode: true - debug: msg: "{{ absent_check_mode_task }}" @@ -225,7 +225,7 @@ value: - 'Value with spaces' type: array - array_add: yes + array_add: true register: test_array_add - assert: @@ -238,7 +238,7 @@ value: - 'Value with spaces' type: array - array_add: yes + array_add: true register: test_array_add - assert: diff --git a/tests/integration/targets/pacman/tasks/remove_nosave.yml b/tests/integration/targets/pacman/tasks/remove_nosave.yml index c6d1c961cb..2271ebc037 100644 --- a/tests/integration/targets/pacman/tasks/remove_nosave.yml +++ b/tests/integration/targets/pacman/tasks/remove_nosave.yml @@ -61,7 +61,7 @@ - name: Remove {{ package_name }} - nosave pacman: name: '{{ package_name }}' - remove_nosave: yes + remove_nosave: true state: absent - name: Make sure {{config_file}}.pacsave does not exist diff --git a/tests/integration/targets/pam_limits/tasks/main.yml b/tests/integration/targets/pam_limits/tasks/main.yml index 1c73394fb3..5ad68f4a64 100644 --- a/tests/integration/targets/pam_limits/tasks/main.yml +++ b/tests/integration/targets/pam_limits/tasks/main.yml @@ -19,7 +19,7 @@ limit_item: nofile value: '64000' dest: "{{ test_limit_file }}" - check_mode: yes + check_mode: true register: check_mode_test - name: Test that check mode is working diff --git a/tests/integration/targets/pipx/tasks/main.yml b/tests/integration/targets/pipx/tasks/main.yml index 00f54aeb24..267c2a2d1a 100644 --- a/tests/integration/targets/pipx/tasks/main.yml +++ b/tests/integration/targets/pipx/tasks/main.yml @@ -32,7 +32,7 @@ - name: install application tox again force community.general.pipx: name: tox - force: yes + force: true register: install_tox_again_force - name: uninstall application tox @@ -68,7 +68,7 @@ community.general.pipx: state: reinstall register: reinstall_noname - ignore_errors: yes + ignore_errors: true - name: upgrade tox from 3.24.0 community.general.pipx: @@ -80,13 +80,13 @@ community.general.pipx: state: upgrade register: upgrade_noname - ignore_errors: yes + ignore_errors: true - name: downgrade tox 3.24.0 community.general.pipx: name: tox source: tox==3.24.0 - force: yes + force: true register: downgrade_tox_324 - name: cleanup tox 3.24.0 diff --git a/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml b/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml index e63cb72312..4028c57d8f 100644 --- a/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml +++ b/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml @@ -31,7 +31,7 @@ - name: Find created package file find: path: '{{ pkgng_test_outofdate_pkg_tempdir.path }}' - use_regex: yes + use_regex: true pattern: '.*\.(pkg|tzst|t[xbg]z|tar)' register: pkgng_test_outofdate_pkg_tempfile @@ -42,7 +42,7 @@ - name: Copy the created package file to the expected location copy: - remote_src: yes + remote_src: true src: '{{ pkgng_test_outofdate_pkg_tempfile.files[0].path }}' dest: '{{ pkgng_test_outofdate_pkg_path }}' diff --git a/tests/integration/targets/pkgng/tasks/freebsd.yml b/tests/integration/targets/pkgng/tasks/freebsd.yml index a822b4c7e9..fd9a4a4c5b 100644 --- a/tests/integration/targets/pkgng/tasks/freebsd.yml +++ b/tests/integration/targets/pkgng/tasks/freebsd.yml @@ -37,15 +37,15 @@ - name: Verify package sentinel file is present stat: path: '{{ pkgng_test_pkg_sentinelfile_path }}' - get_attributes: no - get_checksum: no - get_mime: no + get_attributes: false + get_checksum: false + get_mime: false register: pkgng_example3_stat_before - name: Install package (checkmode) pkgng: name: '{{ pkgng_test_pkg_name }}' - check_mode: yes + check_mode: true register: pkgng_example3_checkmode - name: Remove package @@ -63,9 +63,9 @@ - name: Verify package sentinel file is not present stat: path: '{{ pkgng_test_pkg_sentinelfile_path }}' - get_attributes: no - get_checksum: no - get_mime: no + get_attributes: false + get_checksum: false + get_mime: false register: pkgng_example3_stat_after - name: Ensure pkgng installs package correctly @@ -104,14 +104,14 @@ pkgng: name: '*' state: latest - check_mode: yes + check_mode: true register: pkgng_example4_wildcard_checkmode - name: Check for available package upgrade (checkmode) pkgng: name: '{{ pkgng_test_pkg_name }}' state: latest - check_mode: yes + check_mode: true register: pkgng_example4_checkmode - name: Upgrade out-of-date package @@ -183,7 +183,7 @@ pkgng: name: '{{ pkgng_test_pkg_name }}' state: absent - check_mode: yes + check_mode: true register: pkgng_example5_prepare - name: Install three packages @@ -219,7 +219,7 @@ pkgng: name: '{{ pkgng_test_pkg_name }}' state: absent - check_mode: yes + check_mode: true register: pkgng_example6_check - name: Create out-of-date test package @@ -279,7 +279,7 @@ pkgng: name: autotools state: absent - autoremove: yes + autoremove: true register: pkgng_example7 - name: Check if autoremove uninstalled known autotools dependencies @@ -290,7 +290,7 @@ - libtool - m4 state: absent - check_mode: yes + check_mode: true register: pkgng_example7_cleanup - name: Ensure pkgng autoremove works correctly @@ -313,7 +313,7 @@ pkgng: name: '{{ pkgng_test_pkg_name }}' annotation: '+ansibletest_example8=duplicate' - ignore_errors: yes + ignore_errors: true register: pkgng_example8_add_annotation_failure - name: Verify annotation is actually there @@ -324,14 +324,14 @@ pkgng: name: '{{ pkgng_test_pkg_name }}' annotation: '+ansibletest_example8=added' - check_mode: yes + check_mode: true register: pkgng_example8_add_annotation_checkmode_nochange - name: Install and annotate single package (checkmode, changed) pkgng: name: '{{ pkgng_test_pkg_name }}' annotation: '+ansibletest_example8_checkmode=added' - check_mode: yes + check_mode: true register: pkgng_example8_add_annotation_checkmode_change - name: Verify check_mode did not add an annotation @@ -348,7 +348,7 @@ pkgng: name: '{{ pkgng_test_pkg_name }}' annotation: ':ansiblemissing=modified' - ignore_errors: yes + ignore_errors: true register: pkgng_example8_modify_annotation_failure - name: Verify annotation has been modified @@ -451,7 +451,7 @@ pkgng: name: '{{ pkgng_test_pkg_name }}' annotation: '{{ item }}' - ignore_errors: yes + ignore_errors: true register: pkgng_example8_invalid_annotation_failure loop: - 'naked_string' @@ -484,7 +484,7 @@ pkgng: name: '{{ pkgng_test_pkg_name }}' pkgsite: DoesNotExist - ignore_errors: yes + ignore_errors: true register: pkgng_example10_invalid_pkgsite_failure - name: Ensure invalid pkgsite fails as expected @@ -524,21 +524,21 @@ vars: pkgng_test_rootdir: /usr/jails/testjail pkgng_test_install_prefix: /usr/jails/testjail - pkgng_test_install_cleanup: yes + pkgng_test_install_cleanup: true - name: Install package in jail include_tasks: install_single_package.yml vars: pkgng_test_jail: testjail pkgng_test_install_prefix: /usr/jails/testjail - pkgng_test_install_cleanup: yes + pkgng_test_install_cleanup: true - name: Install package in jail as chroot include_tasks: install_single_package.yml vars: pkgng_test_chroot: /usr/jails/testjail pkgng_test_install_prefix: /usr/jails/testjail - pkgng_test_install_cleanup: yes + pkgng_test_install_cleanup: true always: - name: Stop and remove testjail failed_when: false diff --git a/tests/integration/targets/pkgng/tasks/install_single_package.yml b/tests/integration/targets/pkgng/tasks/install_single_package.yml index 00768085ca..5ba529af35 100644 --- a/tests/integration/targets/pkgng/tasks/install_single_package.yml +++ b/tests/integration/targets/pkgng/tasks/install_single_package.yml @@ -6,9 +6,9 @@ - name: Verify package sentinel file is not present stat: path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}' - get_attributes: no - get_checksum: no - get_mime: no + get_attributes: false + get_checksum: false + get_mime: false register: pkgng_install_stat_before - name: Install package @@ -23,21 +23,21 @@ pkgng: <<: *pkgng_install_params state: absent - check_mode: yes + check_mode: true register: pkgng_install_checkmode - name: Install package (idempotent, cached) pkgng: <<: *pkgng_install_params - cached: yes + cached: true register: pkgng_install_idempotent_cached - name: Verify package sentinel file is present stat: path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}' - get_attributes: no - get_checksum: no - get_mime: no + get_attributes: false + get_checksum: false + get_mime: false register: pkgng_install_stat_after - name: Remove test package (if requested) diff --git a/tests/integration/targets/pkgng/tasks/setup-testjail.yml b/tests/integration/targets/pkgng/tasks/setup-testjail.yml index 99505af591..3055d29e88 100644 --- a/tests/integration/targets/pkgng/tasks/setup-testjail.yml +++ b/tests/integration/targets/pkgng/tasks/setup-testjail.yml @@ -28,7 +28,7 @@ service: name: pf state: started - enabled: yes + enabled: true - name: Install ezjail pkgng: @@ -49,11 +49,11 @@ line: ezjail_ftphost=http://ftp-archive.freebsd.org - name: Start ezjail - ignore_errors: yes + ignore_errors: true service: name: ezjail state: started - enabled: yes + enabled: true - name: Redirect logs depending on verbosity set_fact: @@ -84,7 +84,7 @@ dest: /usr/jails/testjail/etc/resolv.conf regexp: "^nameserver[[:blank:]]+{{ item }}$" line: "nameserver {{ item }}" - create: yes + create: true loop: - "1.1.1.1" - "1.0.0.1" diff --git a/tests/integration/targets/pkgutil/tasks/main.yml b/tests/integration/targets/pkgutil/tasks/main.yml index e6f32ccc7a..8ceb4adcc3 100644 --- a/tests/integration/targets/pkgutil/tasks/main.yml +++ b/tests/integration/targets/pkgutil/tasks/main.yml @@ -18,7 +18,7 @@ pkgutil: name: CSWtop state: present - check_mode: yes + check_mode: true register: cm_add_package - name: Verify cm_add_package @@ -41,7 +41,7 @@ pkgutil: name: CSWtop state: present - check_mode: yes + check_mode: true register: cm_add_package_again - name: Verify cm_add_package_again @@ -66,7 +66,7 @@ pkgutil: name: CSWtop state: absent - check_mode: yes + check_mode: true register: cm_remove_package - name: Verify cm_remove_package @@ -89,7 +89,7 @@ pkgutil: name: CSWtop state: absent - check_mode: yes + check_mode: true register: cm_remove_package_again - name: Verify cm_remove_package_again diff --git a/tests/integration/targets/read_csv/tasks/main.yml b/tests/integration/targets/read_csv/tasks/main.yml index 325a102c21..a21af95182 100644 --- a/tests/integration/targets/read_csv/tasks/main.yml +++ b/tests/integration/targets/read_csv/tasks/main.yml @@ -68,7 +68,7 @@ read_csv: path: users_nonunique.csv key: name - unique: no + unique: false delimiter: ';' register: users_nonunique @@ -90,7 +90,7 @@ path: users_nonunique.csv dialect: placebo register: users_placebo - ignore_errors: yes + ignore_errors: true - assert: that: @@ -140,9 +140,9 @@ read_csv: path: users_broken.csv key: name - strict: yes + strict: true register: users_broken - ignore_errors: yes + ignore_errors: true - assert: that: diff --git a/tests/integration/targets/redis_info/tasks/main.yml b/tests/integration/targets/redis_info/tasks/main.yml index e696066b26..4a11de3650 100644 --- a/tests/integration/targets/redis_info/tasks/main.yml +++ b/tests/integration/targets/redis_info/tasks/main.yml @@ -24,7 +24,7 @@ login_host: 127.0.0.1 login_port: "{{ master_port }}" login_password: "{{ redis_password }}" - check_mode: yes + check_mode: true register: result - assert: diff --git a/tests/integration/targets/scaleway_compute/tasks/ip.yml b/tests/integration/targets/scaleway_compute/tasks/ip.yml index f6b7840fd9..094176ce86 100644 --- a/tests/integration/targets/scaleway_compute/tasks/ip.yml +++ b/tests/integration/targets/scaleway_compute/tasks/ip.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create a server with no IP (Check) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: present @@ -66,7 +66,7 @@ # Add a dynamic IP to the instance - name: Patch server tags (Check) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: present @@ -127,7 +127,7 @@ # Remove dynamic IP - name: Patch server tags (Check) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: present diff --git a/tests/integration/targets/scaleway_compute/tasks/security_group.yml b/tests/integration/targets/scaleway_compute/tasks/security_group.yml index 6126514212..59f81e6af1 100644 --- a/tests/integration/targets/scaleway_compute/tasks/security_group.yml +++ b/tests/integration/targets/scaleway_compute/tasks/security_group.yml @@ -20,7 +20,7 @@ - block: - name: Create a server with security_group (Check) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: present @@ -80,7 +80,7 @@ - server_creation_confirmation_task is not changed - name: Keep current security_group (Check) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: present diff --git a/tests/integration/targets/scaleway_compute/tasks/state.yml b/tests/integration/targets/scaleway_compute/tasks/state.yml index 8f015ad337..b3f2567626 100644 --- a/tests/integration/targets/scaleway_compute/tasks/state.yml +++ b/tests/integration/targets/scaleway_compute/tasks/state.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create a server (Check) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: present @@ -61,7 +61,7 @@ - server_creation_confirmation_task is not changed - name: Patch server tags (Check) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: present @@ -124,7 +124,7 @@ - server_patching_confirmation_task is not changed - name: Run it (Check mode) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: running @@ -187,7 +187,7 @@ - server_run_confirmation_task is not changed - name: Reboot it (Check mode) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: restarted @@ -229,7 +229,7 @@ - server_reboot_task is changed - name: Stop it (Check mode) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: stopped @@ -292,7 +292,7 @@ - server_stop_confirmation_task is not changed - name: Destroy it (Check mode) - check_mode: yes + check_mode: true scaleway_compute: name: '{{ scaleway_name }}' state: absent @@ -355,7 +355,7 @@ - server_destroy_confirmation_task is not changed - name: Testing for unauthorized organization - ignore_errors: yes + ignore_errors: true scaleway_compute: name: '{{ scaleway_name }}' state: present @@ -373,7 +373,7 @@ - unauthorized_organization_task is not changed - name: Testing for unexisting image - ignore_errors: yes + ignore_errors: true scaleway_compute: name: '{{ scaleway_name }}' state: present diff --git a/tests/integration/targets/scaleway_container/tasks/main.yml b/tests/integration/targets/scaleway_container/tasks/main.yml index 1ac5bf1768..d0bf4206f6 100644 --- a/tests/integration/targets/scaleway_container/tasks/main.yml +++ b/tests/integration/targets/scaleway_container/tasks/main.yml @@ -18,7 +18,7 @@ register: integration_container_namespace - name: Create a container (Check) - check_mode: yes + check_mode: true community.general.scaleway_container: state: present name: '{{ name }}' @@ -87,7 +87,7 @@ - cn_creation_confirmation_task.container.status in ["created", "ready"] - name: Update container (Check) - check_mode: yes + check_mode: true community.general.scaleway_container: state: present name: '{{ name }}' @@ -156,7 +156,7 @@ - cn_update_confirmation_task.container.status in ["created", "ready"] - name: Update container secret variables (Check) - check_mode: yes + check_mode: true community.general.scaleway_container: state: present name: '{{ name }}' @@ -227,7 +227,7 @@ - "'hashed_value' in cn_update_secret_confirmation_task.container.secret_environment_variables[0]" - name: Delete container (Check) - check_mode: yes + check_mode: true community.general.scaleway_container: state: absent name: '{{ name }}' diff --git a/tests/integration/targets/scaleway_container_namespace/tasks/main.yml b/tests/integration/targets/scaleway_container_namespace/tasks/main.yml index bab42ee13f..73e43ff156 100644 --- a/tests/integration/targets/scaleway_container_namespace/tasks/main.yml +++ b/tests/integration/targets/scaleway_container_namespace/tasks/main.yml @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create a container namespace (Check) - check_mode: yes + check_mode: true community.general.scaleway_container_namespace: state: present name: '{{ name }}' @@ -72,7 +72,7 @@ - cn_creation_confirmation_task.container_namespace.status == "ready" - name: Update container namespace (Check) - check_mode: yes + check_mode: true community.general.scaleway_container_namespace: state: present name: '{{ name }}' @@ -135,7 +135,7 @@ - cn_update_confirmation_task.container_namespace.status == "ready" - name: Update container namespace secret variables (Check) - check_mode: yes + check_mode: true community.general.scaleway_container_namespace: state: present name: '{{ name }}' @@ -200,7 +200,7 @@ - "'hashed_value' in cn_update_secret_confirmation_task.container_namespace.secret_environment_variables[0]" - name: Delete container namespace (Check) - check_mode: yes + check_mode: true community.general.scaleway_container_namespace: state: absent name: '{{ name }}' diff --git a/tests/integration/targets/scaleway_container_registry/tasks/main.yml b/tests/integration/targets/scaleway_container_registry/tasks/main.yml index 24b1f0cbc9..91cea20f3f 100644 --- a/tests/integration/targets/scaleway_container_registry/tasks/main.yml +++ b/tests/integration/targets/scaleway_container_registry/tasks/main.yml @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create a container registry (Check) - check_mode: yes + check_mode: true community.general.scaleway_container_registry: state: present name: '{{ name }}' @@ -66,7 +66,7 @@ - cr_creation_confirmation_task.container_registry.status == "ready" - name: Update container registry (Check) - check_mode: yes + check_mode: true community.general.scaleway_container_registry: state: present name: '{{ name }}' @@ -123,7 +123,7 @@ - cr_update_confirmation_task.container_registry.status == "ready" - name: Delete container registry (Check) - check_mode: yes + check_mode: true community.general.scaleway_container_registry: state: absent name: '{{ name }}' diff --git a/tests/integration/targets/scaleway_database_backup/tasks/main.yml b/tests/integration/targets/scaleway_database_backup/tasks/main.yml index b0af65c0ae..fdef03fb30 100644 --- a/tests/integration/targets/scaleway_database_backup/tasks/main.yml +++ b/tests/integration/targets/scaleway_database_backup/tasks/main.yml @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create a backup (Check) - check_mode: yes + check_mode: true scaleway_database_backup: name: '{{ scaleway_name }}' state: present @@ -63,7 +63,7 @@ - backup_creation_confirmation_task is not changed - name: Patch backup name (Check) - check_mode: yes + check_mode: true scaleway_database_backup: name: '{{ scaleway_name }}-changed' state: present @@ -115,7 +115,7 @@ - backup_patching_confirmation_task is not changed - name: Export backup (Check) - check_mode: yes + check_mode: true scaleway_database_backup: id: '{{ backup_creation_task.metadata.id }}' state: exported @@ -161,7 +161,7 @@ - backup_export_confirmation_task.metadata.download_url != "" - name: Restore backup (Check) - check_mode: yes + check_mode: true scaleway_database_backup: id: '{{ backup_creation_task.metadata.id }}' state: restored @@ -195,7 +195,7 @@ - backup_restore_task is changed - name: Delete backup (Check) - check_mode: yes + check_mode: true scaleway_database_backup: id: '{{ backup_creation_task.metadata.id }}' state: absent diff --git a/tests/integration/targets/scaleway_function/tasks/main.yml b/tests/integration/targets/scaleway_function/tasks/main.yml index 92ebfb8f7d..d4552d0b39 100644 --- a/tests/integration/targets/scaleway_function/tasks/main.yml +++ b/tests/integration/targets/scaleway_function/tasks/main.yml @@ -18,7 +18,7 @@ register: integration_function_namespace - name: Create a function (Check) - check_mode: yes + check_mode: true community.general.scaleway_function: state: present name: '{{ name }}' @@ -84,7 +84,7 @@ - fn_creation_confirmation_task.function.status in ["created", "ready"] - name: Update function (Check) - check_mode: yes + check_mode: true community.general.scaleway_function: state: present name: '{{ name }}' @@ -150,7 +150,7 @@ - fn_update_confirmation_task.function.status in ["created", "ready"] - name: Update function secret variables (Check) - check_mode: yes + check_mode: true community.general.scaleway_function: state: present name: '{{ name }}' @@ -218,7 +218,7 @@ - "'hashed_value' in fn_update_secret_confirmation_task.function.secret_environment_variables[0]" - name: Delete function (Check) - check_mode: yes + check_mode: true community.general.scaleway_function: state: absent name: '{{ name }}' diff --git a/tests/integration/targets/scaleway_function_namespace/tasks/main.yml b/tests/integration/targets/scaleway_function_namespace/tasks/main.yml index 78b7c95757..50af4449d5 100644 --- a/tests/integration/targets/scaleway_function_namespace/tasks/main.yml +++ b/tests/integration/targets/scaleway_function_namespace/tasks/main.yml @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create a function namespace (Check) - check_mode: yes + check_mode: true community.general.scaleway_function_namespace: state: present name: '{{ name }}' @@ -74,7 +74,7 @@ - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" - name: Update function namespace (Check) - check_mode: yes + check_mode: true community.general.scaleway_function_namespace: state: present name: '{{ name }}' @@ -139,7 +139,7 @@ - "'hashed_value' in fn_creation_task.function_namespace.secret_environment_variables[0]" - name: Update function namespace secret variables (Check) - check_mode: yes + check_mode: true community.general.scaleway_function_namespace: state: present name: '{{ name }}' @@ -204,7 +204,7 @@ - "'hashed_value' in fn_update_secret_confirmation_task.function_namespace.secret_environment_variables[0]" - name: Delete function namespace (Check) - check_mode: yes + check_mode: true community.general.scaleway_function_namespace: state: absent name: '{{ name }}' diff --git a/tests/integration/targets/scaleway_ip/tasks/main.yml b/tests/integration/targets/scaleway_ip/tasks/main.yml index fe0f578fa8..5a396ba4f2 100644 --- a/tests/integration/targets/scaleway_ip/tasks/main.yml +++ b/tests/integration/targets/scaleway_ip/tasks/main.yml @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create IP (Check) - check_mode: yes + check_mode: true scaleway_ip: state: present region: '{{ scaleway_region }}' @@ -78,7 +78,7 @@ - '{{ ip_creation_task.scaleway_ip.server is none }}' - name: Assign reverse to server (Check) - check_mode: yes + check_mode: true scaleway_ip: state: present id: '{{ ip_creation_task.scaleway_ip.id }}' @@ -162,7 +162,7 @@ - server_creation_task is success - name: Assign IP to server (Check) - check_mode: yes + check_mode: true scaleway_ip: state: present id: '{{ ip_creation_task.scaleway_ip.id }}' @@ -229,7 +229,7 @@ - ip_assignation_confirmation_task is not changed - name: Unassign IP to server (Check) - check_mode: yes + check_mode: true scaleway_ip: state: present id: '{{ ip_creation_task.scaleway_ip.id }}' @@ -303,7 +303,7 @@ - '{{ ip_unassignation_task.scaleway_ip.server is none }}' - name: Unassign reverse to IP (Check) - check_mode: yes + check_mode: true scaleway_ip: state: present id: '{{ ip_creation_task.scaleway_ip.id }}' @@ -397,7 +397,7 @@ - server_destroy_task is changed - name: Delete IP (Check) - check_mode: yes + check_mode: true scaleway_ip: state: absent region: '{{ scaleway_region }}' diff --git a/tests/integration/targets/scaleway_lb/tasks/main.yml b/tests/integration/targets/scaleway_lb/tasks/main.yml index 05237e1a78..2567abd078 100644 --- a/tests/integration/targets/scaleway_lb/tasks/main.yml +++ b/tests/integration/targets/scaleway_lb/tasks/main.yml @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create a load-balancer (Check) - check_mode: yes + check_mode: true scaleway_lb: state: present name: '{{ name }}' @@ -87,7 +87,7 @@ - lb_creation_confirmation_task.scaleway_lb.status == "ready" - name: Update load-balancer (Check) - check_mode: yes + check_mode: true scaleway_lb: state: present name: '{{ name }}' @@ -165,7 +165,7 @@ - lb_update_confirmation_task.scaleway_lb.status == "ready" - name: Delete load-balancer (Check) - check_mode: yes + check_mode: true scaleway_lb: state: absent name: '{{ name }}' diff --git a/tests/integration/targets/scaleway_security_group/tasks/main.yml b/tests/integration/targets/scaleway_security_group/tasks/main.yml index 362166e291..cab972ae50 100644 --- a/tests/integration/targets/scaleway_security_group/tasks/main.yml +++ b/tests/integration/targets/scaleway_security_group/tasks/main.yml @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create security group check - check_mode: yes + check_mode: true scaleway_security_group: state: present region: '{{ scaleway_region }}' @@ -74,7 +74,7 @@ - security_group_creation is not changed - name: Delete security group check - check_mode: yes + check_mode: true scaleway_security_group: state: absent region: '{{ scaleway_region }}' diff --git a/tests/integration/targets/scaleway_sshkey/tasks/main.yml b/tests/integration/targets/scaleway_sshkey/tasks/main.yml index 2871086251..588745abdc 100644 --- a/tests/integration/targets/scaleway_sshkey/tasks/main.yml +++ b/tests/integration/targets/scaleway_sshkey/tasks/main.yml @@ -11,7 +11,7 @@ - scaleway_sshkey: ssh_pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDf29yyommeGyKSIgSmX0ISVXP+3x6RUY4JDGLoAMFh2efkfDaRVdsvkvnFuUywgP2RewrjTyLE8w0NpCBHVS5Fm1BAn3yvxOUtTMxTbsQcw6HQ8swJ02+1tewJYjHPwc4GrBqiDo3Nmlq354Us0zBOJg/bBzuEnVD5eJ3GO3gKaCSUYTVrYwO0U4eJE0D9OJeUP9J48kl4ULbCub976+mTHdBvlzRw0Tzfl2kxgdDwlks0l2NefY/uiTdz2oMt092bAY3wZHxjto/DXoChxvaf5s2k8Zb+J7CjimUYnzPlH+zA9F6ROjP5AUu6ZWPd0jOIBl1nDWWb2j/qfNLYM43l sieben@sieben-macbook.local" state: present - check_mode: yes + check_mode: true - scaleway_sshkey: ssh_pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDf29yyommeGyKSIgSmX0ISVXP+3x6RUY4JDGLoAMFh2efkfDaRVdsvkvnFuUywgP2RewrjTyLE8w0NpCBHVS5Fm1BAn3yvxOUtTMxTbsQcw6HQ8swJ02+1tewJYjHPwc4GrBqiDo3Nmlq354Us0zBOJg/bBzuEnVD5eJ3GO3gKaCSUYTVrYwO0U4eJE0D9OJeUP9J48kl4ULbCub976+mTHdBvlzRw0Tzfl2kxgdDwlks0l2NefY/uiTdz2oMt092bAY3wZHxjto/DXoChxvaf5s2k8Zb+J7CjimUYnzPlH+zA9F6ROjP5AUu6ZWPd0jOIBl1nDWWb2j/qfNLYM43l sieben@sieben-macbook.local" @@ -31,7 +31,7 @@ - scaleway_sshkey: ssh_pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDf29yyommeGyKSIgSmX0ISVXP+3x6RUY4JDGLoAMFh2efkfDaRVdsvkvnFuUywgP2RewrjTyLE8w0NpCBHVS5Fm1BAn3yvxOUtTMxTbsQcw6HQ8swJ02+1tewJYjHPwc4GrBqiDo3Nmlq354Us0zBOJg/bBzuEnVD5eJ3GO3gKaCSUYTVrYwO0U4eJE0D9OJeUP9J48kl4ULbCub976+mTHdBvlzRw0Tzfl2kxgdDwlks0l2NefY/uiTdz2oMt092bAY3wZHxjto/DXoChxvaf5s2k8Zb+J7CjimUYnzPlH+zA9F6ROjP5AUu6ZWPd0jOIBl1nDWWb2j/qfNLYM43l sieben@sieben-macbook.local" state: absent - check_mode: yes + check_mode: true - scaleway_sshkey: ssh_pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDf29yyommeGyKSIgSmX0ISVXP+3x6RUY4JDGLoAMFh2efkfDaRVdsvkvnFuUywgP2RewrjTyLE8w0NpCBHVS5Fm1BAn3yvxOUtTMxTbsQcw6HQ8swJ02+1tewJYjHPwc4GrBqiDo3Nmlq354Us0zBOJg/bBzuEnVD5eJ3GO3gKaCSUYTVrYwO0U4eJE0D9OJeUP9J48kl4ULbCub976+mTHdBvlzRw0Tzfl2kxgdDwlks0l2NefY/uiTdz2oMt092bAY3wZHxjto/DXoChxvaf5s2k8Zb+J7CjimUYnzPlH+zA9F6ROjP5AUu6ZWPd0jOIBl1nDWWb2j/qfNLYM43l sieben@sieben-macbook.local" diff --git a/tests/integration/targets/scaleway_user_data/tasks/main.yml b/tests/integration/targets/scaleway_user_data/tasks/main.yml index b1cd856ec8..ce42841277 100644 --- a/tests/integration/targets/scaleway_user_data/tasks/main.yml +++ b/tests/integration/targets/scaleway_user_data/tasks/main.yml @@ -28,7 +28,7 @@ - debug: var=server_id - name: Patch user_data cloud-init configuration (Check) - check_mode: yes + check_mode: true scaleway_user_data: region: '{{ scaleway_region }}' server_id: "{{ server_id }}" diff --git a/tests/integration/targets/sefcontext/tasks/sefcontext.yml b/tests/integration/targets/sefcontext/tasks/sefcontext.yml index e4d2d50baa..8f5039b85a 100644 --- a/tests/integration/targets/sefcontext/tasks/sefcontext.yml +++ b/tests/integration/targets/sefcontext/tasks/sefcontext.yml @@ -28,7 +28,7 @@ path: '/tmp/foo/bar(/.*)?' setype: httpd_sys_content_t state: present - reload: no + reload: false register: first - assert: @@ -41,7 +41,7 @@ path: '/tmp/foo/bar(/.*)?' setype: httpd_sys_content_t state: present - reload: no + reload: false register: second - assert: @@ -54,7 +54,7 @@ path: '/tmp/foo/bar(/.*)?' setype: unlabeled_t state: present - reload: no + reload: false register: third - assert: @@ -67,7 +67,7 @@ path: '/tmp/foo/bar(/.*)?' setype: unlabeled_t state: present - reload: no + reload: false register: fourth - assert: @@ -80,7 +80,7 @@ path: '/tmp/foo/bar(/.*)?' setype: httpd_sys_content_t state: absent - reload: no + reload: false register: fifth - assert: @@ -93,7 +93,7 @@ path: '/tmp/foo/bar(/.*)?' setype: unlabeled_t state: absent - reload: no + reload: false register: sixth - assert: diff --git a/tests/integration/targets/setup_etcd3/tasks/main.yml b/tests/integration/targets/setup_etcd3/tasks/main.yml index ddd7ab8988..fe6b9cd028 100644 --- a/tests/integration/targets/setup_etcd3/tasks/main.yml +++ b/tests/integration/targets/setup_etcd3/tasks/main.yml @@ -86,7 +86,7 @@ unarchive: src: "{{ etcd3_download_url }}" dest: "{{ etcd3_download_location }}" - remote_src: yes + remote_src: true # Running etcd3 and kill afterwards if it wasn't running before. - name: Run etcd3 diff --git a/tests/integration/targets/setup_gnutar/handlers/main.yml b/tests/integration/targets/setup_gnutar/handlers/main.yml index 975e0b47a8..f75354097f 100644 --- a/tests/integration/targets/setup_gnutar/handlers/main.yml +++ b/tests/integration/targets/setup_gnutar/handlers/main.yml @@ -7,5 +7,5 @@ community.general.homebrew: name: gnu-tar state: absent - become: yes + become: true become_user: "{{ brew_stat.stat.pw_name }}" diff --git a/tests/integration/targets/setup_gnutar/tasks/main.yml b/tests/integration/targets/setup_gnutar/tasks/main.yml index c7024666b0..8dbfebf6f8 100644 --- a/tests/integration/targets/setup_gnutar/tasks/main.yml +++ b/tests/integration/targets/setup_gnutar/tasks/main.yml @@ -18,7 +18,7 @@ community.general.homebrew: name: gnu-tar state: present - become: yes + become: true become_user: "{{ brew_stat.stat.pw_name }}" notify: - uninstall gnu-tar diff --git a/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml b/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml index dd1c340d08..8222aa175a 100644 --- a/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml +++ b/tests/integration/targets/setup_mosquitto/tasks/ubuntu.yml @@ -7,7 +7,7 @@ apt: name: apt-transport-https state: latest - force: yes + force: true - name: Install Mosquitto Server apt: diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml index a42b4b4a03..7c6ab4ef9f 100644 --- a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -11,19 +11,19 @@ - set_fact: pkg_mgr: community.general.pkgng ansible_pkg_mgr: community.general.pkgng - cacheable: yes + cacheable: true when: ansible_os_family == "FreeBSD" - set_fact: pkg_mgr: community.general.zypper ansible_pkg_mgr: community.general.zypper - cacheable: yes + cacheable: true when: ansible_os_family == "Suse" - set_fact: pkg_mgr: community.general.pacman ansible_pkg_mgr: community.general.pacman - cacheable: yes + cacheable: true when: ansible_os_family == "Archlinux" - shell: diff --git a/tests/integration/targets/setup_postgresql_db/tasks/main.yml b/tests/integration/targets/setup_postgresql_db/tasks/main.yml index 7c9baa4074..3dac4a0986 100644 --- a/tests/integration/targets/setup_postgresql_db/tasks/main.yml +++ b/tests/integration/targets/setup_postgresql_db/tasks/main.yml @@ -50,9 +50,9 @@ - name: Kill all postgres processes shell: 'pkill -u {{ pg_user }}' - become: yes + become: true when: ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_major_version == '8' - ignore_errors: yes + ignore_errors: true - name: stop postgresql service service: name={{ postgresql_service }} state=stopped @@ -202,9 +202,9 @@ - name: Kill all postgres processes shell: 'pkill -u {{ pg_user }}' - become: yes + become: true when: ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_major_version == '8' - ignore_errors: yes + ignore_errors: true register: terminate - name: Stop postgresql service diff --git a/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml b/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml index e19d903e6b..cc74b70afc 100644 --- a/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml +++ b/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml @@ -7,4 +7,4 @@ file: path: "{{ remote_tmp_dir }}" state: absent - no_log: yes + no_log: true diff --git a/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml index e19d903e6b..cc74b70afc 100644 --- a/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml +++ b/tests/integration/targets/setup_remote_tmp_dir_outside_tmp/tasks/default-cleanup.yml @@ -7,4 +7,4 @@ file: path: "{{ remote_tmp_dir }}" state: absent - no_log: yes + no_log: true diff --git a/tests/integration/targets/setup_wildfly_server/handlers/main.yml b/tests/integration/targets/setup_wildfly_server/handlers/main.yml index 641025edb1..1383b15753 100644 --- a/tests/integration/targets/setup_wildfly_server/handlers/main.yml +++ b/tests/integration/targets/setup_wildfly_server/handlers/main.yml @@ -7,7 +7,7 @@ systemd: name: wildfly state: stopped - ignore_errors: yes + ignore_errors: true - name: Remove files file: diff --git a/tests/integration/targets/setup_wildfly_server/tasks/main.yml b/tests/integration/targets/setup_wildfly_server/tasks/main.yml index e2bda5736e..26f5083b0a 100644 --- a/tests/integration/targets/setup_wildfly_server/tasks/main.yml +++ b/tests/integration/targets/setup_wildfly_server/tasks/main.yml @@ -31,7 +31,7 @@ unarchive: src: '{{ wf_tmp_dir }}/wildfly-{{ wf_version }}.tar.gz' dest: '{{ wf_tmp_dir }}' - remote_src: yes + remote_src: true - name: Remove tar file: @@ -47,12 +47,12 @@ - name: Create group for wildfly group: name: '{{ wf_user }}' - system: yes + system: true - name: Create user for wildfly user: name: '{{ wf_user }}' - system: yes + system: true group: '{{ wf_user }}' home: '{{ wf_homedir }}' @@ -62,7 +62,7 @@ state: directory owner: '{{ wf_user }}' group: '{{ wf_user }}' - recurse: yes + recurse: true - name: Create config file copy: @@ -86,11 +86,11 @@ mode: "0644" - name: Create directories for testing the default deploy_path - become: yes + become: true file: path: '{{ default_deploy_root }}' state: directory - recurse: yes + recurse: true owner: '{{ wf_user }}' group: '{{ wf_user }}' @@ -102,6 +102,6 @@ - name: Reload systemd and start wildfly systemd: - daemon_reload: yes + daemon_reload: true name: wildfly state: started diff --git a/tests/integration/targets/shutdown/tasks/main.yml b/tests/integration/targets/shutdown/tasks/main.yml index 3f765ff059..dadeb62699 100644 --- a/tests/integration/targets/shutdown/tasks/main.yml +++ b/tests/integration/targets/shutdown/tasks/main.yml @@ -20,13 +20,13 @@ delay: 100 msg: "Custom Message" register: shutdown_result - check_mode: yes + check_mode: true - name: Execute shutdown with minus delay community.general.shutdown: delay: -100 register: shutdown_result_minus - check_mode: yes + check_mode: true - name: Verify Custom Message except Alpine, AIX assert: diff --git a/tests/integration/targets/ssh_config/tasks/main.yml b/tests/integration/targets/ssh_config/tasks/main.yml index d0b088302c..d594835bf1 100644 --- a/tests/integration/targets/ssh_config/tasks/main.yml +++ b/tests/integration/targets/ssh_config/tasks/main.yml @@ -36,7 +36,7 @@ - name: Fail for required argument community.general.ssh_config: ssh_config_file: "{{ ssh_config_test }}" - ignore_errors: yes + ignore_errors: true register: host_required - name: Check if ssh_config fails for required parameter host @@ -53,7 +53,7 @@ port: '2223' state: present register: host_add - check_mode: yes + check_mode: true - name: Check if changes are made in check mode assert: @@ -179,7 +179,7 @@ port: '2223' state: present register: mut_ex - ignore_errors: yes + ignore_errors: true - name: Check mutual exclusive test - user and ssh_config_file assert: diff --git a/tests/integration/targets/ssh_config/tasks/options.yml b/tests/integration/targets/ssh_config/tasks/options.yml index 65ce691cf8..9b617ad356 100644 --- a/tests/integration/targets/ssh_config/tasks/options.yml +++ b/tests/integration/targets/ssh_config/tasks/options.yml @@ -18,7 +18,7 @@ host_key_algorithms: "+ssh-rsa" state: present register: options_add - check_mode: yes + check_mode: true - name: Options - Check if changes are made in check mode assert: @@ -91,7 +91,7 @@ ssh_config_file: "{{ ssh_config_test }}" host: "options.example.com" proxycommand: "ssh new-jumphost.example.com -W %h:%p" - forward_agent: no + forward_agent: false host_key_algorithms: "+ssh-ed25519" state: present register: options_update @@ -111,7 +111,7 @@ ssh_config_file: "{{ ssh_config_test }}" host: "options.example.com" proxycommand: "ssh new-jumphost.example.com -W %h:%p" - forward_agent: no + forward_agent: false host_key_algorithms: "+ssh-ed25519" state: present register: options_update diff --git a/tests/integration/targets/supervisorctl/tasks/install_Linux.yml b/tests/integration/targets/supervisorctl/tasks/install_Linux.yml index e5a7b009e0..2f70b284cc 100644 --- a/tests/integration/targets/supervisorctl/tasks/install_Linux.yml +++ b/tests/integration/targets/supervisorctl/tasks/install_Linux.yml @@ -12,4 +12,4 @@ service: name: '{{ supervisor_service_name }}' state: stopped - enabled: no + enabled: false diff --git a/tests/integration/targets/sysrc/tasks/main.yml b/tests/integration/targets/sysrc/tasks/main.yml index 544dc63c65..df24cf1f94 100644 --- a/tests/integration/targets/sysrc/tasks/main.yml +++ b/tests/integration/targets/sysrc/tasks/main.yml @@ -29,7 +29,7 @@ sysrc: name: mysql_pidfile value: checkmode - check_mode: yes + check_mode: true register: sysrc_example1_checkmode - name: Configure mysql pid file (idempotent) @@ -68,7 +68,7 @@ state: present value: "NO" path: /boot/loader.conf - check_mode: yes + check_mode: true register: sysrc_example2_checkmode - name: Enable accf_http kld in /boot/loader.conf (idempotent) @@ -112,7 +112,7 @@ name: cloned_interfaces state: value_present value: "gif1" - check_mode: yes + check_mode: true register: sysrc_example3_checkmode - name: Add gif0 interface (idempotent) @@ -159,7 +159,7 @@ name: nginx_enable value: "NO" jail: testjail - check_mode: yes + check_mode: true register: sysrc_example4_checkmode - name: Enable nginx in test jail (idempotent) @@ -198,7 +198,7 @@ sysrc: name: sysrc_absent state: absent - check_mode: yes + check_mode: true register: sysrc_absent_checkmode - name: Remove sysrc_absent @@ -255,7 +255,7 @@ state: value_present delim: "," value: t4 - check_mode: yes + check_mode: true register: sysrc_delim_checkmode - name: Add to value with delimiter (idempotent) @@ -305,7 +305,7 @@ state: value_absent value: t2 delim: "," - check_mode: yes + check_mode: true register: sysrc_value_absent_checkmode - name: Remove value from sysrc_delim (idempotent diff --git a/tests/integration/targets/sysrc/tasks/setup-testjail.yml b/tests/integration/targets/sysrc/tasks/setup-testjail.yml index 4ad0d63b16..8aac7a430d 100644 --- a/tests/integration/targets/sysrc/tasks/setup-testjail.yml +++ b/tests/integration/targets/sysrc/tasks/setup-testjail.yml @@ -36,11 +36,11 @@ line: ezjail_ftphost=http://ftp-archive.freebsd.org - name: Start ezjail - ignore_errors: yes + ignore_errors: true service: name: ezjail state: started - enabled: yes + enabled: true - name: Has ezjail register: ezjail_base_jail diff --git a/tests/integration/targets/terraform/tasks/complex_variables.yml b/tests/integration/targets/terraform/tasks/complex_variables.yml index 180a1fb98c..9788a3eed1 100644 --- a/tests/integration/targets/terraform/tasks/complex_variables.yml +++ b/tests/integration/targets/terraform/tasks/complex_variables.yml @@ -23,7 +23,7 @@ community.general.terraform: project_path: "{{ terraform_project_dir }}/complex_vars" binary_path: "{{ terraform_binary_path }}" - force_init: yes + force_init: true complex_vars: true variables: dictionaries: diff --git a/tests/integration/targets/terraform/tasks/main.yml b/tests/integration/targets/terraform/tasks/main.yml index db9fc3fc5b..1c66990be2 100644 --- a/tests/integration/targets/terraform/tasks/main.yml +++ b/tests/integration/targets/terraform/tasks/main.yml @@ -43,7 +43,7 @@ src: "{{ terraform_url }}" dest: "{{ remote_tmp_dir }}" mode: 0755 - remote_src: yes + remote_src: true validate_certs: "{{ validate_certs }}" when: terraform_version_installed is not defined or terraform_version_installed != terraform_version diff --git a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml index 711dfc1a33..b20182c9f3 100644 --- a/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml +++ b/tests/integration/targets/terraform/tasks/test_provider_upgrade.yml @@ -16,7 +16,7 @@ ansible.builtin.template: src: templates/provider_test/main.tf.j2 dest: "{{ terraform_project_dir }}/{{ tf_provider['name'] }}/main.tf" - force: yes + force: true register: terraform_provider_hcl # The purpose of this task is to init terraform multiple times with different provider module @@ -26,7 +26,7 @@ community.general.terraform: project_path: "{{ terraform_provider_hcl.dest | dirname }}" binary_path: "{{ terraform_binary_path }}" - force_init: yes + force_init: true provider_upgrade: "{{ terraform_provider_upgrade }}" state: present register: terraform_init_result diff --git a/tests/integration/targets/terraform/vars/main.yml b/tests/integration/targets/terraform/vars/main.yml index 7474836387..1032adee4f 100644 --- a/tests/integration/targets/terraform/vars/main.yml +++ b/tests/integration/targets/terraform/vars/main.yml @@ -14,13 +14,13 @@ terraform_arch: "{{ ansible_system | lower }}_{{terraform_arch_map[ansible_archi terraform_url: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_{{ terraform_arch }}.zip" # Controls whether the unarchive task will validate TLS certs of the Terraform binary host -validate_certs: yes +validate_certs: true # Directory where Terraform tests will be created terraform_project_dir: "{{ remote_tmp_dir }}/tf_provider_test" # Controls whether terraform init will use the `-upgrade` flag -terraform_provider_upgrade: yes +terraform_provider_upgrade: true # list of dicts containing Terraform providers that will be tested # The null provider is a good candidate, as it's small and has no external dependencies diff --git a/tests/integration/targets/timezone/tasks/test.yml b/tests/integration/targets/timezone/tasks/test.yml index 5a58559d7c..975526800e 100644 --- a/tests/integration/targets/timezone/tasks/test.yml +++ b/tests/integration/targets/timezone/tasks/test.yml @@ -10,7 +10,7 @@ - name: set timezone to Australia/Brisbane (checkmode) timezone: name: Australia/Brisbane - check_mode: yes + check_mode: true register: timezone_set_checkmode - name: ensure timezone reported as changed in checkmode @@ -24,7 +24,7 @@ command: cmp /etc/localtime /usr/share/zoneinfo/Australia/Brisbane register: result failed_when: result is not failed - changed_when: no + changed_when: false - name: ensure that checkmode didn't update the timezone in the config file command: egrep '^(TIME)?ZONE="Etc/UTC"' {{ timezone_config_file }} @@ -52,7 +52,7 @@ - name: ensure that the timezone is actually set command: cmp /etc/localtime /usr/share/zoneinfo/Australia/Brisbane - changed_when: no + changed_when: false - name: ensure that the timezone is updated in the config file command: egrep '^(TIME)?ZONE="Australia/Brisbane"' {{ timezone_config_file }} @@ -93,14 +93,14 @@ - name: check dpkg-reconfigure shell: type dpkg-reconfigure register: check_dpkg_reconfigure - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: check timedatectl shell: type timedatectl && timedatectl register: check_timedatectl - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - block: - name: set timezone to Etc/UTC @@ -161,7 +161,7 @@ - name: check if the timezone is actually set (empty config file) command: cmp /etc/localtime /usr/share/zoneinfo/Europe/Belgrade - changed_when: no + changed_when: false ## @@ -187,7 +187,7 @@ - name: check if the timezone is actually set (no config file) command: cmp /etc/localtime /usr/share/zoneinfo/Europe/Belgrade - changed_when: no + changed_when: false ## @@ -199,7 +199,7 @@ src: /usr/share/zoneinfo/Etc/UTC dest: /etc/localtime state: link - force: yes + force: true - name: set timezone to Europe/Belgrade (over symlink) timezone: @@ -215,7 +215,7 @@ - name: check if the timezone is actually set (over symlink) command: cmp /etc/localtime /usr/share/zoneinfo/Europe/Belgrade - changed_when: no + changed_when: false ## @@ -227,7 +227,7 @@ src: /tmp/foo dest: /etc/localtime state: link - force: yes + force: true - name: set timezone to Europe/Belgrade (over broken symlink) timezone: @@ -243,7 +243,7 @@ - name: check if the timezone is actually set (over broken symlink) command: cmp /etc/localtime /usr/share/zoneinfo/Europe/Belgrade - changed_when: no + changed_when: false ## @@ -254,7 +254,7 @@ copy: src: /usr/share/zoneinfo/Etc/UTC dest: /etc/localtime - remote_src: yes + remote_src: true - name: set timezone to Europe/Belgrade (over copied file) timezone: @@ -270,7 +270,7 @@ - name: check if the timezone is actually set (over copied file) command: cmp /etc/localtime /usr/share/zoneinfo/Europe/Belgrade - changed_when: no + changed_when: false when: - ansible_service_mgr != 'systemd' - timezone_config_file is defined @@ -283,12 +283,12 @@ - name: check if hwclock is supported in the environment command: hwclock --test register: hwclock_test - ignore_errors: yes + ignore_errors: true - name: check if timedatectl works in the environment command: timedatectl register: timedatectl_test - ignore_errors: yes + ignore_errors: true - name: set_fact: @@ -305,7 +305,7 @@ - name: set hwclock to UTC (checkmode) timezone: hwclock: UTC - check_mode: yes + check_mode: true register: hwclock_set_checkmode - name: ensure hwclock reported as changed (checkmode) @@ -358,7 +358,7 @@ - name: set hwclock to RTC again (checkmode) timezone: hwclock: UTC - check_mode: yes + check_mode: true register: hwclock_again_checkmode - name: set hwclock idempotency (checkmode) @@ -510,7 +510,7 @@ timezone: name: Europe/Belgrade hwclock: UTC - check_mode: yes + check_mode: true register: tzclock_set_checkmode - name: ensure timezone and hwclock reported as changed in checkmode @@ -526,7 +526,7 @@ command: cmp /etc/localtime /usr/share/zoneinfo/Australia/Brisbane register: result failed_when: result is not failed - changed_when: no + changed_when: false - block: - name: ensure that checkmode didn't update the timezone in the config file @@ -565,7 +565,7 @@ - name: ensure that the timezone is actually set command: cmp /etc/localtime /usr/share/zoneinfo/Europe/Belgrade - changed_when: no + changed_when: false - block: - name: ensure that the timezone is updated in the config file diff --git a/tests/integration/targets/ufw/tasks/main.yml b/tests/integration/targets/ufw/tasks/main.yml index c870f85d47..5fba2fa4d7 100644 --- a/tests/integration/targets/ufw/tasks/main.yml +++ b/tests/integration/targets/ufw/tasks/main.yml @@ -18,10 +18,10 @@ - name: Install iptables (SuSE only) package: name: iptables - become: yes + become: true when: ansible_os_family == 'Suse' - name: Install ufw - become: yes + become: true package: name: ufw @@ -30,7 +30,7 @@ - include_tasks: run-test.yml with_fileglob: - "tests/*.yml" - become: yes + become: true # Cleanup always: diff --git a/tests/integration/targets/ufw/tasks/tests/basic.yml b/tests/integration/targets/ufw/tasks/tests/basic.yml index 9aac5e6dd8..8c179d7aed 100644 --- a/tests/integration/targets/ufw/tasks/tests/basic.yml +++ b/tests/integration/targets/ufw/tasks/tests/basic.yml @@ -10,7 +10,7 @@ - name: Enable (check mode) ufw: state: enabled - check_mode: yes + check_mode: true register: enable_check - name: Enable ufw: @@ -23,7 +23,7 @@ - name: Enable (idempotency, check mode) ufw: state: enabled - check_mode: yes + check_mode: true register: enable_idem_check - assert: that: @@ -38,7 +38,7 @@ rule: allow port: 23 to_ip: 0.0.0.0 - check_mode: yes + check_mode: true register: ipv4_allow_check - name: ipv4 allow ufw: @@ -57,7 +57,7 @@ rule: allow port: 23 to_ip: 0.0.0.0 - check_mode: yes + check_mode: true register: ipv4_allow_idem_check - assert: that: @@ -72,30 +72,30 @@ rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv4_allow_check - name: delete ipv4 allow ufw: rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes + delete: true register: delete_ipv4_allow - name: delete ipv4 allow (idempotency) ufw: rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes + delete: true register: delete_ipv4_allow_idem - name: delete ipv4 allow (idempotency, check mode) ufw: rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv4_allow_idem_check - assert: that: @@ -110,7 +110,7 @@ rule: allow port: 23 to_ip: "::" - check_mode: yes + check_mode: true register: ipv6_allow_check - name: ipv6 allow ufw: @@ -129,7 +129,7 @@ rule: allow port: 23 to_ip: "::" - check_mode: yes + check_mode: true register: ipv6_allow_idem_check - assert: that: @@ -144,30 +144,30 @@ rule: allow port: 23 to_ip: "::" - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv6_allow_check - name: delete ipv6 allow ufw: rule: allow port: 23 to_ip: "::" - delete: yes + delete: true register: delete_ipv6_allow - name: delete ipv6 allow (idempotency) ufw: rule: allow port: 23 to_ip: "::" - delete: yes + delete: true register: delete_ipv6_allow_idem - name: delete ipv6 allow (idempotency, check mode) ufw: rule: allow port: 23 to_ip: "::" - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv6_allow_idem_check - assert: that: @@ -183,7 +183,7 @@ rule: allow port: 23 to_ip: 0.0.0.0 - check_mode: yes + check_mode: true register: ipv4_allow_check - name: ipv4 allow ufw: @@ -202,7 +202,7 @@ rule: allow port: 23 to_ip: 0.0.0.0 - check_mode: yes + check_mode: true register: ipv4_allow_idem_check - assert: that: @@ -217,30 +217,30 @@ rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv4_allow_check - name: delete ipv4 allow ufw: rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes + delete: true register: delete_ipv4_allow - name: delete ipv4 allow (idempotency) ufw: rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes + delete: true register: delete_ipv4_allow_idem - name: delete ipv4 allow (idempotency, check mode) ufw: rule: allow port: 23 to_ip: 0.0.0.0 - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv4_allow_idem_check - assert: that: @@ -255,7 +255,7 @@ rule: allow port: 23 to_ip: "::" - check_mode: yes + check_mode: true register: ipv6_allow_check - name: ipv6 allow ufw: @@ -274,7 +274,7 @@ rule: allow port: 23 to_ip: "::" - check_mode: yes + check_mode: true register: ipv6_allow_idem_check - assert: that: @@ -289,30 +289,30 @@ rule: allow port: 23 to_ip: "::" - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv6_allow_check - name: delete ipv6 allow ufw: rule: allow port: 23 to_ip: "::" - delete: yes + delete: true register: delete_ipv6_allow - name: delete ipv6 allow (idempotency) ufw: rule: allow port: 23 to_ip: "::" - delete: yes + delete: true register: delete_ipv6_allow_idem - name: delete ipv6 allow (idempotency, check mode) ufw: rule: allow port: 23 to_ip: "::" - delete: yes - check_mode: yes + delete: true + check_mode: true register: delete_ipv6_allow_idem_check - assert: that: @@ -329,7 +329,7 @@ - name: Reload ufw (check mode) ufw: state: reloaded - check_mode: yes + check_mode: true register: reload_check - assert: that: @@ -340,7 +340,7 @@ - name: Disable (check mode) ufw: state: disabled - check_mode: yes + check_mode: true register: disable_check - name: Disable ufw: @@ -353,7 +353,7 @@ - name: Disable (idempotency, check mode) ufw: state: disabled - check_mode: yes + check_mode: true register: disable_idem_check - assert: that: @@ -369,7 +369,7 @@ - name: Reset (check mode) ufw: state: reset - check_mode: yes + check_mode: true register: reset_check - pause: # Should not be needed, but since ufw is ignoring --dry-run for reset @@ -396,7 +396,7 @@ - name: Reset (idempotency, check mode) ufw: state: reset - check_mode: yes + check_mode: true register: reset_idem_check - assert: that: diff --git a/tests/integration/targets/ufw/tasks/tests/global-state.yml b/tests/integration/targets/ufw/tasks/tests/global-state.yml index 3e8ab4460e..f5f1007510 100644 --- a/tests/integration/targets/ufw/tasks/tests/global-state.yml +++ b/tests/integration/targets/ufw/tasks/tests/global-state.yml @@ -10,15 +10,15 @@ # ############################################ - name: Make sure logging is off ufw: - logging: no + logging: false - name: Logging (check mode) ufw: - logging: yes - check_mode: yes + logging: true + check_mode: true register: logging_check - name: Logging ufw: - logging: yes + logging: true register: logging - name: Get logging shell: | @@ -28,17 +28,17 @@ LC_ALL: C - name: Logging (idempotency) ufw: - logging: yes + logging: true register: logging_idem - name: Logging (idempotency, check mode) ufw: - logging: yes - check_mode: yes + logging: true + check_mode: true register: logging_idem_check - name: Logging (change, check mode) ufw: logging: full - check_mode: yes + check_mode: true register: logging_change_check - name: Logging (change) ufw: @@ -66,7 +66,7 @@ ufw: default: reject direction: incoming - check_mode: yes + check_mode: true register: default_check - name: Default ufw: @@ -88,13 +88,13 @@ ufw: default: reject direction: incoming - check_mode: yes + check_mode: true register: default_idem_check - name: Default (change, check mode) ufw: default: allow direction: incoming - check_mode: yes + check_mode: true register: default_change_check - name: Default (change) ufw: @@ -115,7 +115,7 @@ - name: Default (change incoming implicitly, check mode) ufw: default: allow - check_mode: yes + check_mode: true register: default_change_implicit_check - name: Default (change incoming implicitly) ufw: @@ -130,7 +130,7 @@ - name: Default (change incoming implicitly, idempotent, check mode) ufw: default: allow - check_mode: yes + check_mode: true register: default_change_implicit_idem_check - name: Default (change incoming implicitly, idempotent) ufw: diff --git a/tests/integration/targets/ufw/tasks/tests/interface.yml b/tests/integration/targets/ufw/tasks/tests/interface.yml index 9c7c570dc7..1ec3568aa2 100644 --- a/tests/integration/targets/ufw/tasks/tests/interface.yml +++ b/tests/integration/targets/ufw/tasks/tests/interface.yml @@ -10,7 +10,7 @@ - name: Route with interface in and out ufw: rule: allow - route: yes + route: true interface_in: foo interface_out: bar proto: tcp @@ -22,7 +22,7 @@ - name: Route with interface in ufw: rule: allow - route: yes + route: true interface_in: foo proto: tcp from_ip: 1.1.1.1 @@ -31,7 +31,7 @@ - name: Route with interface out ufw: rule: allow - route: yes + route: true interface_out: bar proto: tcp from_ip: 1.1.1.1 @@ -77,7 +77,7 @@ from_port: 1111 to_ip: 8.8.8.8 to_port: 2222 - ignore_errors: yes + ignore_errors: true register: ufw_non_route_iface - assert: diff --git a/tests/integration/targets/wakeonlan/tasks/main.yml b/tests/integration/targets/wakeonlan/tasks/main.yml index 03df57e989..0597480318 100644 --- a/tests/integration/targets/wakeonlan/tasks/main.yml +++ b/tests/integration/targets/wakeonlan/tasks/main.yml @@ -22,7 +22,7 @@ wakeonlan: mac: 00-00-5E-00-53-66-AB port: 9 - ignore_errors: yes + ignore_errors: true register: incorrect_mac_length - name: Check error message @@ -35,7 +35,7 @@ wakeonlan: mac: ZW-YX-WV-UT-SR-QP port: 9 - ignore_errors: yes + ignore_errors: true register: incorrect_mac_format - name: Check error message @@ -48,7 +48,7 @@ wakeonlan: mac: 00-00-5E-00-53-66 broadcast: 345.567.678.890 - ignore_errors: yes + ignore_errors: true register: incorrect_broadcast_address - name: Check error message diff --git a/tests/integration/targets/xattr/tasks/main.yml b/tests/integration/targets/xattr/tasks/main.yml index b5293db770..b6e93d92bc 100644 --- a/tests/integration/targets/xattr/tasks/main.yml +++ b/tests/integration/targets/xattr/tasks/main.yml @@ -13,7 +13,7 @@ - name: Check availability of xattr support command: setfattr -n user.foo {{ test_file }} - ignore_errors: yes + ignore_errors: true register: xattr - name: Test diff --git a/tests/integration/targets/xfs_quota/tasks/main.yml b/tests/integration/targets/xfs_quota/tasks/main.yml index e98b1452ab..b1ad1da4e9 100644 --- a/tests/integration/targets/xfs_quota/tasks/main.yml +++ b/tests/integration/targets/xfs_quota/tasks/main.yml @@ -13,7 +13,7 @@ user: name: xfsquotauser state: present - become: yes + become: true - include_tasks: uquota.yml - include_tasks: gquota.yml @@ -24,4 +24,4 @@ user: name: xfsquotauser state: absent - become: yes + become: true diff --git a/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml b/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml index fbc74a9367..e15ac5fd92 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-elements-unicode.yml @@ -24,8 +24,8 @@ copy: src: results/test-add-children-elements-unicode.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-add-children-elements.yml b/tests/integration/targets/xml/tasks/test-add-children-elements.yml index 7b5e0be42a..29467f6d6f 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-elements.yml @@ -24,8 +24,8 @@ copy: src: results/test-add-children-elements.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml b/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml index f6733d6e82..2b232b6d0d 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-from-groupvars.yml @@ -23,8 +23,8 @@ copy: src: results/test-add-children-from-groupvars.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml b/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml index fbeff105b2..7795c89663 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-insertafter.yml @@ -13,20 +13,20 @@ xml: path: /tmp/ansible-xml-beers.xml xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]' - insertafter: yes + insertafter: true add_children: - beer: Old Rasputin - beer: Old Motor Oil - beer: Old Curmudgeon - pretty_print: yes + pretty_print: true register: add_children_insertafter - name: Compare to expected result copy: src: results/test-add-children-insertafter.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml b/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml index 3c3212c30e..b14c5e06fc 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-insertbefore.yml @@ -13,20 +13,20 @@ xml: path: /tmp/ansible-xml-beers.xml xpath: '/business/beers/beer[text()="St. Bernardus Abbot 12"]' - insertbefore: yes + insertbefore: true add_children: - beer: Old Rasputin - beer: Old Motor Oil - beer: Old Curmudgeon - pretty_print: yes + pretty_print: true register: add_children_insertbefore - name: Compare to expected result copy: src: results/test-add-children-insertbefore.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml b/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml index 7c928b239d..07905aa15c 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-with-attributes-unicode.yml @@ -26,8 +26,8 @@ copy: src: results/test-add-children-with-attributes-unicode.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml b/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml index e11dda7639..fede24395f 100644 --- a/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml +++ b/tests/integration/targets/xml/tasks/test-add-children-with-attributes.yml @@ -26,8 +26,8 @@ copy: src: results/test-add-children-with-attributes.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison # NOTE: This test may fail if lxml does not support predictable element attribute order diff --git a/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml b/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml index e3ed8080f7..b1718e452e 100644 --- a/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml +++ b/tests/integration/targets/xml/tasks/test-add-element-implicitly.yml @@ -57,28 +57,28 @@ file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/testnormalelement value: xml tag with no special characters - pretty_print: yes + pretty_print: true - name: Add an element with dash xml: file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/test-with-dash value: xml tag with dashes - pretty_print: yes + pretty_print: true - name: Add an element with dot xml: file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/test-with-dash.and.dot value: xml tag with dashes and dots - pretty_print: yes + pretty_print: true - name: Add an element with underscore xml: file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/test-with.dash_and.dot_and-underscores value: xml tag with dashes, dots and underscores - pretty_print: yes + pretty_print: true - name: Add an attribute on a conditional element xml: @@ -99,14 +99,14 @@ - name: Pretty Print this! xml: file: /tmp/ansible-xml-beers-implicit.xml - pretty_print: yes + pretty_print: true - name: Compare to expected result copy: src: results/test-add-element-implicitly.xml dest: /tmp/ansible-xml-beers-implicit.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result @@ -203,7 +203,7 @@ file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/testnormalelement value: xml tag with no special characters - pretty_print: yes + pretty_print: true namespaces: a: http://example.com/some/namespace @@ -213,7 +213,7 @@ file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/test-with-dash value: xml tag with dashes - pretty_print: yes + pretty_print: true namespaces: a: http://example.com/some/namespace @@ -222,7 +222,7 @@ file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/test-with-dash.and.dot value: xml tag with dashes and dots - pretty_print: yes + pretty_print: true namespaces: a: http://example.com/some/namespace @@ -231,11 +231,11 @@ file: /tmp/ansible-xml-beers-implicit.xml xpath: /business/test-with.dash_and.dot_and-underscores value: xml tag with dashes, dots and underscores - pretty_print: yes + pretty_print: true namespaces: a: http://example.com/some/namespace - name: Pretty Print this! xml: file: /tmp/ansible-xml-beers-implicit.xml - pretty_print: yes + pretty_print: true diff --git a/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml b/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml index dd3ada48e1..2a9daab787 100644 --- a/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-add-namespaced-children-elements.yml @@ -27,8 +27,8 @@ copy: src: results/test-add-namespaced-children-elements.xml dest: /tmp/ansible-xml-namespaced-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-children-elements-xml.yml b/tests/integration/targets/xml/tasks/test-children-elements-xml.yml index 139281fb34..1c8c2b804d 100644 --- a/tests/integration/targets/xml/tasks/test-children-elements-xml.yml +++ b/tests/integration/targets/xml/tasks/test-children-elements-xml.yml @@ -25,8 +25,8 @@ copy: src: results/test-add-children-elements.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-count-unicode.yml b/tests/integration/targets/xml/tasks/test-count-unicode.yml index 58d01b8318..118e2986db 100644 --- a/tests/integration/targets/xml/tasks/test-count-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-count-unicode.yml @@ -13,7 +13,7 @@ xml: path: /tmp/ansible-xml-beers-unicode.xml xpath: /business/beers/beer - count: yes + count: true register: beers - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-count.yml b/tests/integration/targets/xml/tasks/test-count.yml index cc778ddcd6..79be9402fe 100644 --- a/tests/integration/targets/xml/tasks/test-count.yml +++ b/tests/integration/targets/xml/tasks/test-count.yml @@ -13,7 +13,7 @@ xml: path: /tmp/ansible-xml-beers.xml xpath: /business/beers/beer - count: yes + count: true register: beers - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml b/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml index 0eb92fe083..33f129e2e6 100644 --- a/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml +++ b/tests/integration/targets/xml/tasks/test-mutually-exclusive-attributes.yml @@ -17,7 +17,7 @@ - child02 value: conflict! register: module_output - ignore_errors: yes + ignore_errors: true - name: Test expected result assert: diff --git a/tests/integration/targets/xml/tasks/test-pretty-print-only.yml b/tests/integration/targets/xml/tasks/test-pretty-print-only.yml index 0657186ca5..03d3299aa7 100644 --- a/tests/integration/targets/xml/tasks/test-pretty-print-only.yml +++ b/tests/integration/targets/xml/tasks/test-pretty-print-only.yml @@ -14,15 +14,15 @@ - name: Pretty print without modification xml: path: /tmp/ansible-xml-beers.xml - pretty_print: yes + pretty_print: true register: pretty_print_only - name: Compare to expected result copy: src: results/test-pretty-print-only.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-pretty-print.yml b/tests/integration/targets/xml/tasks/test-pretty-print.yml index 2ef0a0ce8b..51b34502d5 100644 --- a/tests/integration/targets/xml/tasks/test-pretty-print.yml +++ b/tests/integration/targets/xml/tasks/test-pretty-print.yml @@ -13,7 +13,7 @@ xml: path: /tmp/ansible-xml-beers.xml xpath: /business/beers - pretty_print: yes + pretty_print: true add_children: - beer: Old Rasputin register: pretty_print @@ -22,8 +22,8 @@ copy: src: results/test-pretty-print.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml index 97bc7f525a..3222bd4368 100644 --- a/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-attribute-nochange.yml @@ -20,8 +20,8 @@ copy: src: results/test-remove-attribute.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-attribute.yml b/tests/integration/targets/xml/tasks/test-remove-attribute.yml index 84e15aa446..e8952a655e 100644 --- a/tests/integration/targets/xml/tasks/test-remove-attribute.yml +++ b/tests/integration/targets/xml/tasks/test-remove-attribute.yml @@ -23,8 +23,8 @@ copy: src: results/test-remove-attribute.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml index ada95029e8..c1312c5a75 100644 --- a/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-element-nochange.yml @@ -20,8 +20,8 @@ copy: src: results/test-remove-element.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-element.yml b/tests/integration/targets/xml/tasks/test-remove-element.yml index 243e148984..bea376ba93 100644 --- a/tests/integration/targets/xml/tasks/test-remove-element.yml +++ b/tests/integration/targets/xml/tasks/test-remove-element.yml @@ -23,8 +23,8 @@ copy: src: results/test-remove-element.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml index 80dc6fee42..61b7179ba0 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute-nochange.yml @@ -25,8 +25,8 @@ copy: src: results/test-remove-namespaced-attribute.xml dest: /tmp/ansible-xml-namespaced-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml index 75c1a505d9..a725ee79cf 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-attribute.yml @@ -28,8 +28,8 @@ copy: src: results/test-remove-namespaced-attribute.xml dest: /tmp/ansible-xml-namespaced-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml index 5bbb9ef7c7..fd83c54c32 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-element-nochange.yml @@ -25,8 +25,8 @@ copy: src: results/test-remove-element.xml dest: /tmp/ansible-xml-namespaced-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml b/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml index 70a86dcd30..c4129f33e2 100644 --- a/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml +++ b/tests/integration/targets/xml/tasks/test-remove-namespaced-element.yml @@ -28,8 +28,8 @@ copy: src: results/test-remove-element.xml dest: /tmp/ansible-xml-namespaced-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml b/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml index 27e759c6b8..bf35bfdd95 100644 --- a/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-attribute-value-unicode.yml @@ -24,8 +24,8 @@ copy: src: results/test-set-attribute-value-unicode.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-attribute-value.yml b/tests/integration/targets/xml/tasks/test-set-attribute-value.yml index ada4d9ab56..2908e00aa3 100644 --- a/tests/integration/targets/xml/tasks/test-set-attribute-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-attribute-value.yml @@ -24,8 +24,8 @@ copy: src: results/test-set-attribute-value.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml b/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml index 7fb755bfcc..648f5b25af 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements-level.yml @@ -47,8 +47,8 @@ copy: src: results/test-set-children-elements-level.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result @@ -70,8 +70,8 @@ copy: src: results/test-set-children-elements-level.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml b/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml index 5e3a7a5758..8c4fc10941 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements-unicode.yml @@ -25,8 +25,8 @@ copy: src: results/test-set-children-elements-unicode.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result @@ -41,8 +41,8 @@ copy: src: results/test-set-children-elements-unicode.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-children-elements.yml b/tests/integration/targets/xml/tasks/test-set-children-elements.yml index 147f493c97..ed9e4a54ee 100644 --- a/tests/integration/targets/xml/tasks/test-set-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-set-children-elements.yml @@ -19,8 +19,8 @@ copy: src: results/test-set-children-elements-empty-list.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result @@ -51,8 +51,8 @@ copy: src: results/test-set-children-elements.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result @@ -74,8 +74,8 @@ copy: src: results/test-set-children-elements.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml b/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml index 49a4903ad0..4041bf9106 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value-empty.yml @@ -23,8 +23,8 @@ copy: src: results/test-set-element-value-empty.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml b/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml index 9dbb47b94b..616f26ddc8 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value-unicode.yml @@ -37,8 +37,8 @@ copy: src: results/test-set-element-value-unicode.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-element-value.yml b/tests/integration/targets/xml/tasks/test-set-element-value.yml index 50bbe71f95..b563b25766 100644 --- a/tests/integration/targets/xml/tasks/test-set-element-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-element-value.yml @@ -37,8 +37,8 @@ copy: src: results/test-set-element-value.xml dest: /tmp/ansible-xml-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml index 90a9aef725..7c1bbd2376 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-attribute-value.yml @@ -29,8 +29,8 @@ copy: src: results/test-set-namespaced-attribute-value.xml dest: /tmp/ansible-xml-namespaced-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml index 72d342c514..e6ed1bdecc 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-children-elements.yml @@ -23,7 +23,7 @@ copy: src: /tmp/ansible-xml-namespaced-beers.xml dest: /tmp/ansible-xml-namespaced-beers-1.xml - remote_src: yes + remote_src: true - name: Set child elements again xml: @@ -41,15 +41,15 @@ copy: src: /tmp/ansible-xml-namespaced-beers.xml dest: /tmp/ansible-xml-namespaced-beers-2.xml - remote_src: yes + remote_src: true - name: Compare to expected result copy: src: /tmp/ansible-xml-namespaced-beers-1.xml dest: /tmp/ansible-xml-namespaced-beers-2.xml - remote_src: yes - check_mode: yes - diff: yes + remote_src: true + check_mode: true + diff: true register: comparison #command: diff /tmp/ansible-xml-namespaced-beers-1.xml /tmp/ansible-xml-namespaced-beers-2.xml diff --git a/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml b/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml index 7b3839a2b3..9944da8a55 100644 --- a/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml +++ b/tests/integration/targets/xml/tasks/test-set-namespaced-element-value.yml @@ -40,8 +40,8 @@ copy: src: results/test-set-namespaced-element-value.xml dest: /tmp/ansible-xml-namespaced-beers.xml - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison #command: diff -u {{ role_path }}/results/test-set-namespaced-element-value.xml /tmp/ansible-xml-namespaced-beers.xml diff --git a/tests/integration/targets/xml/tasks/test-xmlstring.yml b/tests/integration/targets/xml/tasks/test-xmlstring.yml index 4a0e4ad343..1c2e4de4a8 100644 --- a/tests/integration/targets/xml/tasks/test-xmlstring.yml +++ b/tests/integration/targets/xml/tasks/test-xmlstring.yml @@ -22,8 +22,8 @@ copy: content: "{{ xmlresponse.xmlstring }}\n" dest: '/tmp/test-pretty-print-only.xml' - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison - name: Test expected result @@ -38,15 +38,15 @@ - name: Read from xmlstring (using pretty_print) xml: xmlstring: "{{ lookup('file', '{{ role_path }}/fixtures/ansible-xml-beers.xml') }}" - pretty_print: yes + pretty_print: true register: xmlresponse - name: Compare to expected result copy: content: '{{ xmlresponse.xmlstring }}' dest: '/tmp/test-pretty-print-only.xml' - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison # FIXME: This change is related to the newline added by pretty_print @@ -63,7 +63,7 @@ xml: xmlstring: "{{ lookup('file', '{{ role_path }}/fixtures/ansible-xml-beers.xml') }}" xpath: /business/beers - pretty_print: yes + pretty_print: true add_children: - beer: Old Rasputin register: xmlresponse_modification @@ -72,8 +72,8 @@ copy: content: '{{ xmlresponse_modification.xmlstring }}' dest: '/tmp/test-pretty-print.xml' - check_mode: yes - diff: yes + check_mode: true + diff: true register: comparison # FIXME: This change is related to the newline added by pretty_print diff --git a/tests/integration/targets/yarn/tasks/run.yml b/tests/integration/targets/yarn/tasks/run.yml index 6521d45fcf..93a3d5bb55 100644 --- a/tests/integration/targets/yarn/tasks/run.yml +++ b/tests/integration/targets/yarn/tasks/run.yml @@ -12,14 +12,14 @@ unarchive: src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/{{ nodejs_path }}.tar.gz' dest: '{{ remote_tmp_dir }}' - remote_src: yes + remote_src: true creates: '{{ remote_tmp_dir }}/{{ nodejs_path }}.tar.gz' - name: 'Download Yarn' unarchive: src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/yarn-v{{yarn_version}}.tar.gz' dest: '{{ remote_tmp_dir }}' - remote_src: yes + remote_src: true creates: '{{ remote_tmp_dir }}/yarn-v{{yarn_version}}_pkg.tar.gz' - name: 'Copy node to directory created earlier' diff --git a/tests/integration/targets/yum_versionlock/tasks/main.yml b/tests/integration/targets/yum_versionlock/tasks/main.yml index d1d6726247..05f1f74954 100644 --- a/tests/integration/targets/yum_versionlock/tasks/main.yml +++ b/tests/integration/targets/yum_versionlock/tasks/main.yml @@ -63,7 +63,7 @@ yum: name: '*' state: latest - check_mode: yes + check_mode: true register: update_all_packages when: yum_updates.results | length != 0 diff --git a/tests/integration/targets/zypper/tasks/zypper.yml b/tests/integration/targets/zypper/tasks/zypper.yml index ab1bc179eb..9e840676e9 100644 --- a/tests/integration/targets/zypper/tasks/zypper.yml +++ b/tests/integration/targets/zypper/tasks/zypper.yml @@ -144,7 +144,7 @@ name: doesnotexist state: present register: zypper_result - ignore_errors: yes + ignore_errors: true - name: verify package installation failed assert: @@ -168,7 +168,7 @@ name: "{{remote_tmp_dir | expanduser}}/zypper1/broken.rpm" state: present register: zypper_result - ignore_errors: yes + ignore_errors: true - debug: var=zypper_result @@ -219,7 +219,7 @@ - name: install empty rpm zypper: name: "{{ remote_tmp_dir | expanduser }}/zypper2/rpm-build/noarch/empty-1-0.noarch.rpm" - disable_gpg_check: yes + disable_gpg_check: true register: zypper_result - name: check empty with rpm @@ -243,7 +243,7 @@ zypper: name: "{{ remote_tmp_dir | expanduser }}/zypper2/rpm-build/noarch/empty-1-0.noarch.rpm" state: installed - disable_gpg_check: yes + disable_gpg_check: true extra_args_precommand: --root {{ remote_tmp_dir | expanduser }}/testdir/ - name: check that dir var is exist @@ -322,7 +322,7 @@ - +hello state: absent register: zypper_res - ignore_errors: yes + ignore_errors: true - name: verify simultaneous install/remove failed with absent assert: @@ -335,7 +335,7 @@ name: openSUSE-2016-128 type: patch state: absent - ignore_errors: yes + ignore_errors: true register: zypper_patch - assert: that: @@ -346,7 +346,7 @@ zypper: name: "{{ hello_package_url }}" state: absent - ignore_errors: yes + ignore_errors: true register: zypper_rm - assert: that: @@ -440,7 +440,7 @@ # zypper: # name: gnu-netcat # state: present -# ignore_errors: yes +# ignore_errors: true # register: zypper_pkg_conflict # # - assert: diff --git a/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml b/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml index 740cffd37d..db4c3afb5d 100644 --- a/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml +++ b/tests/integration/targets/zypper_repository/tasks/zypper_repository.yml @@ -53,7 +53,7 @@ - name: use refresh option community.general.zypper_repository: name: testrefresh - refresh: no + refresh: false state: present repo: http://download.videolan.org/pub/vlc/SuSE/Leap_{{ ansible_distribution_version }}/ @@ -94,7 +94,7 @@ - name: check repo is updated by url command: zypper lr chrome1 register: zypper_result1 - ignore_errors: yes + ignore_errors: true - name: check repo is updated by url command: zypper lr chrome2 From 33df7b61c008ee3331b27af2b43d8c90e04f0c9c Mon Sep 17 00:00:00 2001 From: Ivan Bakalov Date: Fri, 17 Feb 2023 08:48:46 +0200 Subject: [PATCH 0458/2104] Set User-Agent for API requests to DNSimple (#5927) * Set the user-agent for API requests to DNSimple * Update user agent format * Add changelog fragment * Update changelogs/fragments/5927-set-user-agent-dnsimple.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- changelogs/fragments/5927-set-user-agent-dnsimple.yml | 2 ++ plugins/modules/dnsimple.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5927-set-user-agent-dnsimple.yml diff --git a/changelogs/fragments/5927-set-user-agent-dnsimple.yml b/changelogs/fragments/5927-set-user-agent-dnsimple.yml new file mode 100644 index 0000000000..1082b41481 --- /dev/null +++ b/changelogs/fragments/5927-set-user-agent-dnsimple.yml @@ -0,0 +1,2 @@ +minor_changes: + - "dnsimple - set custom User-Agent for API requests to DNSimple (https://github.com/ansible-collections/community.general/pull/5927)." diff --git a/plugins/modules/dnsimple.py b/plugins/modules/dnsimple.py index e96c22613f..ddd3ba0bab 100644 --- a/plugins/modules/dnsimple.py +++ b/plugins/modules/dnsimple.py @@ -168,7 +168,7 @@ class DNSimpleV2(): def dnsimple_client(self): """creates a dnsimple client object""" if self.account_email and self.account_api_token: - client = Client(sandbox=self.sandbox, email=self.account_email, access_token=self.account_api_token) + client = Client(sandbox=self.sandbox, email=self.account_email, access_token=self.account_api_token, user_agent="ansible/community.general") else: msg = "Option account_email or account_api_token not provided. " \ "Dnsimple authentiction with a .dnsimple config file is not " \ From 49e3da36461eef7a3cc9b23d31cd8ac8336dfdbc Mon Sep 17 00:00:00 2001 From: TSKushal <44438079+TSKushal@users.noreply.github.com> Date: Fri, 17 Feb 2023 12:19:54 +0530 Subject: [PATCH 0459/2104] Adding VerifyBiosAttributes functionality (#5900) * Adding VerifyBiosAttributes functionality * Updating authors information * PR comment changes * Update plugins/modules/redfish_command.py Agreed Co-authored-by: Felix Fontein * Adding author as redfish maintainer * Adding changelog fragment * Update changelogs/fragments/5900-adding-verifybiosattribute-fucntionality-to-redfish-command.yml Agreed Co-authored-by: Felix Fontein --------- Co-authored-by: Kushal Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 +- ...ibute-fucntionality-to-redfish-command.yml | 2 ++ plugins/module_utils/redfish_utils.py | 35 +++++++++++++++++++ plugins/modules/redfish_command.py | 29 +++++++++++++-- 4 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/5900-adding-verifybiosattribute-fucntionality-to-redfish-command.yml diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 769b4d273b..7a6a1c1eea 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1037,7 +1037,7 @@ files: maintainers: dagwieers $modules/redfish_: ignore: jose-delarosa - maintainers: $team_redfish + maintainers: $team_redfish TSKushal $modules/redhat_subscription.py: labels: redhat_subscription maintainers: barnabycourt alikins kahowell diff --git a/changelogs/fragments/5900-adding-verifybiosattribute-fucntionality-to-redfish-command.yml b/changelogs/fragments/5900-adding-verifybiosattribute-fucntionality-to-redfish-command.yml new file mode 100644 index 0000000000..bbbb464534 --- /dev/null +++ b/changelogs/fragments/5900-adding-verifybiosattribute-fucntionality-to-redfish-command.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_command - adding ``VerifyBiosAttributes`` functionality (https://github.com/ansible-collections/community.general/pull/5900). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index eadca28205..b7fda59a52 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -3163,3 +3163,38 @@ class RedfishUtils(object): if resp['ret'] and resp['changed']: resp['msg'] = 'Modified session service' return resp + + def verify_bios_attributes(self, bios_attributes): + # This method verifies BIOS attributes against the provided input + server_bios = self.get_multi_bios_attributes() + if server_bios["ret"] is False: + return server_bios + + bios_dict = {} + wrong_param = {} + + # Verify bios_attributes with BIOS settings available in the server + for key, value in bios_attributes.items(): + if key in server_bios["entries"][0][1]: + if server_bios["entries"][0][1][key] != value: + bios_dict.update({key: value}) + else: + wrong_param.update({key: value}) + + if wrong_param: + return { + "ret": False, + "msg": "Wrong parameters are provided: %s" % wrong_param + } + + if bios_dict: + return { + "ret": False, + "msg": "BIOS parameters are not matching: %s" % bios_dict + } + + return { + "ret": True, + "changed": False, + "msg": "BIOS verification completed" + } diff --git a/plugins/modules/redfish_command.py b/plugins/modules/redfish_command.py index 9d5640996a..ac19fb0e2b 100644 --- a/plugins/modules/redfish_command.py +++ b/plugins/modules/redfish_command.py @@ -239,8 +239,16 @@ options: type: bool default: false version_added: 3.7.0 + bios_attributes: + required: false + description: + - BIOS attributes that needs to be verified in the given server. + type: dict + version_added: 6.4.0 -author: "Jose Delarosa (@jose-delarosa)" +author: + - "Jose Delarosa (@jose-delarosa)" + - "T S Kushal (@TSKushal)" ''' EXAMPLES = ''' @@ -629,6 +637,17 @@ EXAMPLES = ''' category: Manager command: PowerReboot resource_id: BMC + + - name: Verify BIOS attributes + community.general.redfish_command: + category: Systems + command: VerifyBiosAttributes + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + bios_attributes: + SubNumaClustering: "Disabled" + WorkloadProfile: "Virtualization-MaxPerformance" ''' RETURN = ''' @@ -662,7 +681,7 @@ from ansible.module_utils.common.text.converters import to_native CATEGORY_COMMANDS_ALL = { "Systems": ["PowerOn", "PowerForceOff", "PowerForceRestart", "PowerGracefulRestart", "PowerGracefulShutdown", "PowerReboot", "SetOneTimeBoot", "EnableContinuousBootOverride", "DisableBootOverride", - "IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink", "VirtualMediaInsert", "VirtualMediaEject"], + "IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink", "VirtualMediaInsert", "VirtualMediaEject", "VerifyBiosAttributes"], "Chassis": ["IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink"], "Accounts": ["AddUser", "EnableUser", "DeleteUser", "DisableUser", "UpdateUserRole", "UpdateUserPassword", "UpdateUserName", @@ -726,6 +745,7 @@ def main(): ) ), strip_etag_quotes=dict(type='bool', default=False), + bios_attributes=dict(type="dict") ), required_together=[ ('username', 'password'), @@ -785,6 +805,9 @@ def main(): # Etag options strip_etag_quotes = module.params['strip_etag_quotes'] + # BIOS Attributes options + bios_attributes = module.params['bios_attributes'] + # Build root URI root_uri = "https://" + module.params['baseuri'] rf_utils = RedfishUtils(creds, root_uri, timeout, module, @@ -845,6 +868,8 @@ def main(): result = rf_utils.virtual_media_insert(virtual_media, category) elif command == 'VirtualMediaEject': result = rf_utils.virtual_media_eject(virtual_media, category) + elif command == 'VerifyBiosAttributes': + result = rf_utils.verify_bios_attributes(bios_attributes) elif category == "Chassis": result = rf_utils._find_chassis_resource() From 71d74a796092e912be5798e54ec034571cb6c804 Mon Sep 17 00:00:00 2001 From: TSKushal <44438079+TSKushal@users.noreply.github.com> Date: Fri, 17 Feb 2023 17:54:35 +0530 Subject: [PATCH 0460/2104] Adding EnableSecureBoot functionality (#5899) * rebase merge * Sanity fixes * Optimizing code as suggested by PR comments * Optimizing code as suggested by PR comments * PR comment changes * Adding changelog fragment * Update changelogs/fragments/5899-adding-enablesecureboot-functionality-to-redfish-config.yml Agreed Co-authored-by: Felix Fontein --------- Co-authored-by: Kushal Co-authored-by: Felix Fontein --- ...reboot-functionality-to-redfish-config.yml | 2 ++ plugins/module_utils/redfish_utils.py | 19 +++++++++++++++++++ plugins/modules/redfish_config.py | 16 ++++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5899-adding-enablesecureboot-functionality-to-redfish-config.yml diff --git a/changelogs/fragments/5899-adding-enablesecureboot-functionality-to-redfish-config.yml b/changelogs/fragments/5899-adding-enablesecureboot-functionality-to-redfish-config.yml new file mode 100644 index 0000000000..fba75df0eb --- /dev/null +++ b/changelogs/fragments/5899-adding-enablesecureboot-functionality-to-redfish-config.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_command - adding ``EnableSecureBoot`` functionality (https://github.com/ansible-collections/community.general/pull/5899). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index b7fda59a52..4803cf1ac8 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -3198,3 +3198,22 @@ class RedfishUtils(object): "changed": False, "msg": "BIOS verification completed" } + + def enable_secure_boot(self): + # This function enable Secure Boot on an OOB controller + + response = self.get_request(self.root_uri + self.systems_uri) + if response["ret"] is False: + return response + + server_details = response["data"] + secure_boot_url = server_details["SecureBoot"]["@odata.id"] + + response = self.get_request(self.root_uri + secure_boot_url) + if response["ret"] is False: + return response + + body = {} + body["SecureBootEnable"] = True + + return self.patch_request(self.root_uri + secure_boot_url, body, check_pyld=True) diff --git a/plugins/modules/redfish_config.py b/plugins/modules/redfish_config.py index 07ac2e1588..df8cd732bd 100644 --- a/plugins/modules/redfish_config.py +++ b/plugins/modules/redfish_config.py @@ -124,7 +124,9 @@ options: default: {} version_added: '5.7.0' -author: "Jose Delarosa (@jose-delarosa)" +author: + - "Jose Delarosa (@jose-delarosa)" + - "T S Kushal (@TSKushal)" ''' EXAMPLES = ''' @@ -255,6 +257,14 @@ EXAMPLES = ''' baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" + + - name: Enable SecureBoot + community.general.redfish_config: + category: Systems + command: EnableSecureBoot + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" ''' RETURN = ''' @@ -273,7 +283,7 @@ from ansible.module_utils.common.text.converters import to_native # More will be added as module features are expanded CATEGORY_COMMANDS_ALL = { "Systems": ["SetBiosDefaultSettings", "SetBiosAttributes", "SetBootOrder", - "SetDefaultBootOrder"], + "SetDefaultBootOrder", "EnableSecureBoot"], "Manager": ["SetNetworkProtocols", "SetManagerNic", "SetHostInterface"], "Sessions": ["SetSessionService"], } @@ -386,6 +396,8 @@ def main(): result = rf_utils.set_boot_order(boot_order) elif command == "SetDefaultBootOrder": result = rf_utils.set_default_boot_order() + elif command == "EnableSecureBoot": + result = rf_utils.enable_secure_boot() elif category == "Manager": # execute only if we find a Manager service resource From 1b2c2af9a87b7cf364529108e95696c4d966058f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 18 Feb 2023 16:32:28 +0100 Subject: [PATCH 0461/2104] Disable Arch Linux tests for now (#6013) Disable Arch Linux tests for now until https://github.com/ansible-community/images/pull/40 and https://github.com/systemd/systemd/issues/26474 are resolved. --- .azure-pipelines/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 3816369497..ddf43bf9b0 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -401,8 +401,8 @@ stages: targets: - name: Debian Bullseye test: debian-bullseye/3.9 - - name: ArchLinux - test: archlinux/3.10 + #- name: ArchLinux + # test: archlinux/3.10 - name: CentOS Stream 8 test: centos-stream8/3.9 groups: From 3186a944e929358e78c9c1c0824692d6be2ee706 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:26:28 +0100 Subject: [PATCH 0462/2104] Add attributes to git* modules (#5947) Add attributes to git* modules. --- plugins/modules/git_config.py | 13 ++++++++++--- plugins/modules/github_deploy_key.py | 7 +++++++ plugins/modules/github_issue.py | 9 ++++++++- plugins/modules/github_key.py | 9 ++++++++- plugins/modules/github_release.py | 7 +++++++ plugins/modules/github_repo.py | 12 +++++++++--- plugins/modules/github_webhook.py | 7 +++++++ plugins/modules/gitlab_branch.py | 7 +++++++ plugins/modules/gitlab_deploy_key.py | 7 +++++++ plugins/modules/gitlab_group.py | 7 +++++++ plugins/modules/gitlab_group_members.py | 9 +++++++-- plugins/modules/gitlab_group_variable.py | 9 +++++++-- plugins/modules/gitlab_hook.py | 7 +++++++ plugins/modules/gitlab_project.py | 7 +++++++ plugins/modules/gitlab_project_members.py | 9 +++++++-- plugins/modules/gitlab_project_variable.py | 7 +++++++ plugins/modules/gitlab_protected_branch.py | 7 +++++++ plugins/modules/gitlab_runner.py | 7 +++++++ plugins/modules/gitlab_user.py | 7 +++++++ 19 files changed, 140 insertions(+), 14 deletions(-) diff --git a/plugins/modules/git_config.py b/plugins/modules/git_config.py index 9191de0e87..d673121748 100644 --- a/plugins/modules/git_config.py +++ b/plugins/modules/git_config.py @@ -21,10 +21,17 @@ requirements: ['git'] short_description: Read and write git configuration description: - The C(git_config) module changes git configuration by invoking 'git config'. - This is needed if you don't want to use M(ansible.builtin.template) for the entire git - config file (e.g. because you need to change just C(user.email) in + This is needed if you do not want to use M(ansible.builtin.template) for the entire git + config file (for example because you need to change just C(user.email) in /etc/.git/config). Solutions involving M(ansible.builtin.command) are cumbersome or - don't work correctly in check mode. + do not work correctly in check mode. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: list_all: description: diff --git a/plugins/modules/github_deploy_key.py b/plugins/modules/github_deploy_key.py index bd32438b0a..322650bf70 100644 --- a/plugins/modules/github_deploy_key.py +++ b/plugins/modules/github_deploy_key.py @@ -18,6 +18,13 @@ description: - "Adds or removes deploy keys for GitHub repositories. Supports authentication using username and password, username and password and 2-factor authentication code (OTP), OAuth2 token, or personal access token. Admin rights on the repository are required." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: github_url: description: diff --git a/plugins/modules/github_issue.py b/plugins/modules/github_issue.py index d49837499a..4e10e9f925 100644 --- a/plugins/modules/github_issue.py +++ b/plugins/modules/github_issue.py @@ -14,7 +14,14 @@ DOCUMENTATION = ''' module: github_issue short_description: View GitHub issue description: - - View GitHub issue for a given repository and organization. + - View GitHub issue for a given repository and organization. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: repo: description: diff --git a/plugins/modules/github_key.py b/plugins/modules/github_key.py index 3c7ee7bd7b..683a963a7f 100644 --- a/plugins/modules/github_key.py +++ b/plugins/modules/github_key.py @@ -13,7 +13,14 @@ DOCUMENTATION = ''' module: github_key short_description: Manage GitHub access keys description: - - Creates, removes, or updates GitHub access keys. + - Creates, removes, or updates GitHub access keys. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: description: diff --git a/plugins/modules/github_release.py b/plugins/modules/github_release.py index 0b3a5a886c..3ddd6c8820 100644 --- a/plugins/modules/github_release.py +++ b/plugins/modules/github_release.py @@ -15,6 +15,13 @@ module: github_release short_description: Interact with GitHub Releases description: - Fetch metadata about GitHub Releases +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: description: diff --git a/plugins/modules/github_repo.py b/plugins/modules/github_repo.py index d01312fcfa..97076c58af 100644 --- a/plugins/modules/github_repo.py +++ b/plugins/modules/github_repo.py @@ -14,8 +14,15 @@ module: github_repo short_description: Manage your repositories on Github version_added: 2.2.0 description: -- Manages Github repositories using PyGithub library. -- Authentication can be done with I(access_token) or with I(username) and I(password). + - Manages Github repositories using PyGithub library. + - Authentication can be done with I(access_token) or with I(username) and I(password). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: username: description: @@ -89,7 +96,6 @@ notes: - For Python 3, PyGithub>=1.54 should be used. - "For Python 3.5, PyGithub==1.54 should be used. More information: U(https://pygithub.readthedocs.io/en/latest/changes.html#version-1-54-november-30-2020)." - "For Python 2.7, PyGithub==1.45 should be used. More information: U(https://pygithub.readthedocs.io/en/latest/changes.html#version-1-45-december-29-2019)." -- Supports C(check_mode). author: - Álvaro Torres Cogollo (@atorrescogollo) ''' diff --git a/plugins/modules/github_webhook.py b/plugins/modules/github_webhook.py index b97087d221..71e199adbe 100644 --- a/plugins/modules/github_webhook.py +++ b/plugins/modules/github_webhook.py @@ -16,6 +16,13 @@ description: - "Create and delete GitHub webhooks" requirements: - "PyGithub >= 1.3.5" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: repository: description: diff --git a/plugins/modules/gitlab_branch.py b/plugins/modules/gitlab_branch.py index e57ca4922f..d7eecb33fb 100644 --- a/plugins/modules/gitlab_branch.py +++ b/plugins/modules/gitlab_branch.py @@ -21,6 +21,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: diff --git a/plugins/modules/gitlab_deploy_key.py b/plugins/modules/gitlab_deploy_key.py index f4a9fb29fa..27cb01f87e 100644 --- a/plugins/modules/gitlab_deploy_key.py +++ b/plugins/modules/gitlab_deploy_key.py @@ -25,6 +25,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: project: diff --git a/plugins/modules/gitlab_group.py b/plugins/modules/gitlab_group.py index d099a0c274..624028f298 100644 --- a/plugins/modules/gitlab_group.py +++ b/plugins/modules/gitlab_group.py @@ -25,6 +25,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: diff --git a/plugins/modules/gitlab_group_members.py b/plugins/modules/gitlab_group_members.py index 6edc8c983f..66298e882c 100644 --- a/plugins/modules/gitlab_group_members.py +++ b/plugins/modules/gitlab_group_members.py @@ -22,6 +22,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: gitlab_group: @@ -81,8 +88,6 @@ options: elements: str choices: ['guest', 'reporter', 'developer', 'maintainer', 'owner'] version_added: 3.6.0 -notes: - - Supports C(check_mode). ''' EXAMPLES = r''' diff --git a/plugins/modules/gitlab_group_variable.py b/plugins/modules/gitlab_group_variable.py index 4a185b2394..c7befe123c 100644 --- a/plugins/modules/gitlab_group_variable.py +++ b/plugins/modules/gitlab_group_variable.py @@ -26,6 +26,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: @@ -99,8 +106,6 @@ options: - The scope for the variable. type: str default: '*' -notes: -- Supports I(check_mode). ''' diff --git a/plugins/modules/gitlab_hook.py b/plugins/modules/gitlab_hook.py index 70864207ed..adf90eb7bc 100644 --- a/plugins/modules/gitlab_hook.py +++ b/plugins/modules/gitlab_hook.py @@ -26,6 +26,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: project: diff --git a/plugins/modules/gitlab_project.py b/plugins/modules/gitlab_project.py index 1ab8ae220c..cd34db4431 100644 --- a/plugins/modules/gitlab_project.py +++ b/plugins/modules/gitlab_project.py @@ -26,6 +26,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: group: diff --git a/plugins/modules/gitlab_project_members.py b/plugins/modules/gitlab_project_members.py index 84e3c9b8e1..9053584431 100644 --- a/plugins/modules/gitlab_project_members.py +++ b/plugins/modules/gitlab_project_members.py @@ -25,6 +25,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: project: @@ -82,8 +89,6 @@ options: elements: str choices: ['guest', 'reporter', 'developer', 'maintainer'] version_added: 3.7.0 -notes: - - Supports C(check_mode). ''' EXAMPLES = r''' diff --git a/plugins/modules/gitlab_project_variable.py b/plugins/modules/gitlab_project_variable.py index 5e6a2904dc..63569dd789 100644 --- a/plugins/modules/gitlab_project_variable.py +++ b/plugins/modules/gitlab_project_variable.py @@ -23,6 +23,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/gitlab_protected_branch.py b/plugins/modules/gitlab_protected_branch.py index 335e1445a2..fea374cbfd 100644 --- a/plugins/modules/gitlab_protected_branch.py +++ b/plugins/modules/gitlab_protected_branch.py @@ -21,6 +21,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/gitlab_runner.py b/plugins/modules/gitlab_runner.py index e0ef43a316..f0da30e8f2 100644 --- a/plugins/modules/gitlab_runner.py +++ b/plugins/modules/gitlab_runner.py @@ -35,6 +35,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: project: diff --git a/plugins/modules/gitlab_user.py b/plugins/modules/gitlab_user.py index 4824f7301f..94f3713160 100644 --- a/plugins/modules/gitlab_user.py +++ b/plugins/modules/gitlab_user.py @@ -33,6 +33,13 @@ requirements: extends_documentation_fragment: - community.general.auth_basic - community.general.gitlab + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: From ed79a685533b2940abcf5af64fbce8fa31de1ca3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:27:38 +0100 Subject: [PATCH 0463/2104] Add attributes to atomic, memset, one, oneview, packet, proxmox, and xenserver modules (#5958) Add attributes to atomic, memset, one, oneview, packet, proxmox, and xenserver modules. --- plugins/modules/atomic_container.py | 7 +++++++ plugins/modules/atomic_host.py | 7 +++++++ plugins/modules/atomic_image.py | 7 +++++++ plugins/modules/memset_dns_reload.py | 9 ++++++++- plugins/modules/memset_zone.py | 9 ++++++++- plugins/modules/memset_zone_domain.py | 9 ++++++++- plugins/modules/memset_zone_record.py | 9 ++++++++- plugins/modules/one_host.py | 10 ++++++++-- plugins/modules/one_image.py | 7 +++++++ plugins/modules/one_service.py | 7 +++++++ plugins/modules/one_template.py | 12 +++++++++--- plugins/modules/one_vm.py | 7 +++++++ plugins/modules/oneview_ethernet_network.py | 10 ++++++++-- plugins/modules/oneview_fc_network.py | 10 ++++++++-- plugins/modules/oneview_fcoe_network.py | 10 ++++++++-- .../modules/oneview_logical_interconnect_group.py | 10 ++++++++-- plugins/modules/oneview_network_set.py | 10 ++++++++-- plugins/modules/oneview_san_manager.py | 10 ++++++++-- plugins/modules/packet_device.py | 12 +++++++++--- plugins/modules/packet_ip_subnet.py | 9 +++++++++ plugins/modules/packet_project.py | 9 +++++++++ plugins/modules/packet_sshkey.py | 7 +++++++ plugins/modules/packet_volume.py | 9 +++++++++ plugins/modules/packet_volume_attachment.py | 9 +++++++++ plugins/modules/proxmox.py | 6 ++++++ plugins/modules/proxmox_disk.py | 6 ++++++ plugins/modules/proxmox_kvm.py | 6 ++++++ plugins/modules/proxmox_nic.py | 6 ++++++ plugins/modules/proxmox_snap.py | 7 ++++++- plugins/modules/proxmox_template.py | 9 ++++++++- plugins/modules/xenserver_guest.py | 6 ++++++ plugins/modules/xenserver_guest_powerstate.py | 6 ++++++ 32 files changed, 241 insertions(+), 26 deletions(-) diff --git a/plugins/modules/atomic_container.py b/plugins/modules/atomic_container.py index c32e617a22..c265102960 100644 --- a/plugins/modules/atomic_container.py +++ b/plugins/modules/atomic_container.py @@ -22,6 +22,13 @@ notes: requirements: - atomic - "python >= 2.6" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: backend: description: diff --git a/plugins/modules/atomic_host.py b/plugins/modules/atomic_host.py index 5aa389e174..bb44c44896 100644 --- a/plugins/modules/atomic_host.py +++ b/plugins/modules/atomic_host.py @@ -22,6 +22,13 @@ notes: requirements: - atomic - python >= 2.6 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: revision: description: diff --git a/plugins/modules/atomic_image.py b/plugins/modules/atomic_image.py index 2705304f01..65aec1e9d5 100644 --- a/plugins/modules/atomic_image.py +++ b/plugins/modules/atomic_image.py @@ -22,6 +22,13 @@ notes: requirements: - atomic - python >= 2.6 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: backend: description: diff --git a/plugins/modules/memset_dns_reload.py b/plugins/modules/memset_dns_reload.py index 580740d1a3..c69df6d783 100644 --- a/plugins/modules/memset_dns_reload.py +++ b/plugins/modules/memset_dns_reload.py @@ -21,7 +21,14 @@ notes: I(dns.reload). If you wish to poll the job status to wait until the reload has completed, then I(job.status) is also required. description: - - Request a reload of Memset's DNS infrastructure, and optionally poll until it finishes. + - Request a reload of Memset's DNS infrastructure, and optionally poll until it finishes. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: required: true diff --git a/plugins/modules/memset_zone.py b/plugins/modules/memset_zone.py index 02b5fd28f0..738d9e16ba 100644 --- a/plugins/modules/memset_zone.py +++ b/plugins/modules/memset_zone.py @@ -19,7 +19,14 @@ notes: Memset customer control panel is needed with the following minimum scope - I(dns.zone_create), I(dns.zone_delete), I(dns.zone_list). description: - - Manage DNS zones in a Memset account. + - Manage DNS zones in a Memset account. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: required: true diff --git a/plugins/modules/memset_zone_domain.py b/plugins/modules/memset_zone_domain.py index 1e18a984b6..26276f68a5 100644 --- a/plugins/modules/memset_zone_domain.py +++ b/plugins/modules/memset_zone_domain.py @@ -21,7 +21,14 @@ notes: - Currently this module can only create one domain at a time. Multiple domains should be created using C(with_items). description: - - Manage DNS zone domains in a Memset account. + - Manage DNS zone domains in a Memset account. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: default: present diff --git a/plugins/modules/memset_zone_record.py b/plugins/modules/memset_zone_record.py index 16a1c3a742..021ad461d2 100644 --- a/plugins/modules/memset_zone_record.py +++ b/plugins/modules/memset_zone_record.py @@ -21,7 +21,14 @@ notes: - Currently this module can only create one DNS record at a time. Multiple records should be created using C(with_items). description: - - Manage DNS records in a Memset account. + - Manage DNS records in a Memset account. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: default: present diff --git a/plugins/modules/one_host.py b/plugins/modules/one_host.py index 20bdaa4088..c4578f9501 100644 --- a/plugins/modules/one_host.py +++ b/plugins/modules/one_host.py @@ -23,6 +23,12 @@ requirements: description: - "Manages OpenNebula Hosts" +attributes: + check_mode: + support: none + diff_mode: + support: none + options: name: description: @@ -77,8 +83,8 @@ options: type: dict extends_documentation_fragment: -- community.general.opennebula - + - community.general.opennebula + - community.general.attributes author: - Rafael del Valle (@rvalle) diff --git a/plugins/modules/one_image.py b/plugins/modules/one_image.py index fb255dc590..a50b33e93e 100644 --- a/plugins/modules/one_image.py +++ b/plugins/modules/one_image.py @@ -16,6 +16,13 @@ description: - Manages OpenNebula images requirements: - pyone +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_url: description: diff --git a/plugins/modules/one_service.py b/plugins/modules/one_service.py index 6bc3137cc3..4f51438870 100644 --- a/plugins/modules/one_service.py +++ b/plugins/modules/one_service.py @@ -14,6 +14,13 @@ module: one_service short_description: Deploy and manage OpenNebula services description: - Manage OpenNebula services +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_url: description: diff --git a/plugins/modules/one_template.py b/plugins/modules/one_template.py index 8cfac6baf0..97d0f856ed 100644 --- a/plugins/modules/one_template.py +++ b/plugins/modules/one_template.py @@ -23,6 +23,14 @@ requirements: description: - "Manages OpenNebula templates." +attributes: + check_mode: + support: partial + details: + - Note that check mode always returns C(changed=true) for existing templates, even if the template would not actually change. + diff_mode: + support: none + options: id: description: @@ -47,11 +55,9 @@ options: default: present type: str -notes: - - Supports C(check_mode). Note that check mode always returns C(changed=true) for existing templates, even if the template would not actually change. - extends_documentation_fragment: - community.general.opennebula + - community.general.attributes author: - "Georg Gadinger (@nilsding)" diff --git a/plugins/modules/one_vm.py b/plugins/modules/one_vm.py index 3724d9433d..1bbf474661 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -17,6 +17,13 @@ description: - Manages OpenNebula instances requirements: - pyone +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_url: description: diff --git a/plugins/modules/oneview_ethernet_network.py b/plugins/modules/oneview_ethernet_network.py index 3c8711fe05..8eb63db5aa 100644 --- a/plugins/modules/oneview_ethernet_network.py +++ b/plugins/modules/oneview_ethernet_network.py @@ -19,6 +19,11 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: @@ -35,8 +40,9 @@ options: type: dict required: true extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.validateetag + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes ''' diff --git a/plugins/modules/oneview_fc_network.py b/plugins/modules/oneview_fc_network.py index 2898447c0b..4c5f867e23 100644 --- a/plugins/modules/oneview_fc_network.py +++ b/plugins/modules/oneview_fc_network.py @@ -16,6 +16,11 @@ description: requirements: - "hpOneView >= 4.0.0" author: "Felipe Bulsoni (@fgbulsoni)" +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: @@ -32,8 +37,9 @@ options: required: true extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.validateetag + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes ''' diff --git a/plugins/modules/oneview_fcoe_network.py b/plugins/modules/oneview_fcoe_network.py index 61102dff15..73eef5af08 100644 --- a/plugins/modules/oneview_fcoe_network.py +++ b/plugins/modules/oneview_fcoe_network.py @@ -17,6 +17,11 @@ requirements: - "python >= 2.7.9" - "hpOneView >= 4.0.0" author: "Felipe Bulsoni (@fgbulsoni)" +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: @@ -33,8 +38,9 @@ options: required: true extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.validateetag + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes ''' diff --git a/plugins/modules/oneview_logical_interconnect_group.py b/plugins/modules/oneview_logical_interconnect_group.py index ed51722672..cd8e875285 100644 --- a/plugins/modules/oneview_logical_interconnect_group.py +++ b/plugins/modules/oneview_logical_interconnect_group.py @@ -20,6 +20,11 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: @@ -35,8 +40,9 @@ options: type: dict required: true extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.validateetag + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes ''' diff --git a/plugins/modules/oneview_network_set.py b/plugins/modules/oneview_network_set.py index 6dac04c5ca..a6a62a05c2 100644 --- a/plugins/modules/oneview_network_set.py +++ b/plugins/modules/oneview_network_set.py @@ -19,6 +19,11 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: @@ -35,8 +40,9 @@ options: required: true extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.validateetag + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes ''' diff --git a/plugins/modules/oneview_san_manager.py b/plugins/modules/oneview_san_manager.py index a22398074a..65a016b1c2 100644 --- a/plugins/modules/oneview_san_manager.py +++ b/plugins/modules/oneview_san_manager.py @@ -19,6 +19,11 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: @@ -36,8 +41,9 @@ options: required: true extends_documentation_fragment: -- community.general.oneview -- community.general.oneview.validateetag + - community.general.oneview + - community.general.oneview.validateetag + - community.general.attributes ''' diff --git a/plugins/modules/packet_device.py b/plugins/modules/packet_device.py index a2c2d1d653..d220c5f8f7 100644 --- a/plugins/modules/packet_device.py +++ b/plugins/modules/packet_device.py @@ -28,6 +28,15 @@ author: - Matt Baldwin (@baldwinSPC) - Thibaud Morel l'Horset (@teebes) +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: none + diff_mode: + support: none + options: auth_token: description: @@ -149,9 +158,6 @@ options: requirements: - "packet-python >= 1.35" -notes: - - Doesn't support check mode. - ''' EXAMPLES = ''' diff --git a/plugins/modules/packet_ip_subnet.py b/plugins/modules/packet_ip_subnet.py index 63790e1c6a..afeb7ea04c 100644 --- a/plugins/modules/packet_ip_subnet.py +++ b/plugins/modules/packet_ip_subnet.py @@ -28,6 +28,15 @@ author: - Tomas Karasek (@t0mk) - Nurfet Becirevic (@nurfet-becirevic) +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: auth_token: description: diff --git a/plugins/modules/packet_project.py b/plugins/modules/packet_project.py index 9a82c2ec72..da4a2bb89f 100644 --- a/plugins/modules/packet_project.py +++ b/plugins/modules/packet_project.py @@ -26,6 +26,15 @@ author: - Tomas Karasek (@t0mk) - Nurfet Becirevic (@nurfet-becirevic) +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: state: description: diff --git a/plugins/modules/packet_sshkey.py b/plugins/modules/packet_sshkey.py index 87beb01aa8..97f55ba23b 100644 --- a/plugins/modules/packet_sshkey.py +++ b/plugins/modules/packet_sshkey.py @@ -16,6 +16,13 @@ description: - Create/delete an SSH key in Packet host. - API is documented at U(https://www.packet.net/help/api/#page:ssh-keys,header:ssh-keys-ssh-keys-post). author: "Tomas Karasek (@t0mk) " +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/packet_volume.py b/plugins/modules/packet_volume.py index b06e57b56c..910d64b55b 100644 --- a/plugins/modules/packet_volume.py +++ b/plugins/modules/packet_volume.py @@ -25,6 +25,15 @@ author: - Tomas Karasek (@t0mk) - Nurfet Becirevic (@nurfet-becirevic) +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: state: description: diff --git a/plugins/modules/packet_volume_attachment.py b/plugins/modules/packet_volume_attachment.py index 74b42ab479..7f6c68e054 100644 --- a/plugins/modules/packet_volume_attachment.py +++ b/plugins/modules/packet_volume_attachment.py @@ -29,6 +29,15 @@ author: - Tomas Karasek (@t0mk) - Nurfet Becirevic (@nurfet-becirevic) +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: state: description: diff --git a/plugins/modules/proxmox.py b/plugins/modules/proxmox.py index 640f9b4114..315ee601ad 100644 --- a/plugins/modules/proxmox.py +++ b/plugins/modules/proxmox.py @@ -16,6 +16,11 @@ description: - allows you to create/delete/stop instances in Proxmox VE cluster - Starting in Ansible 2.1, it automatically detects containerization type (lxc for PVE 4, openvz for older) - Since community.general 4.0.0 on, there are no more default values, see I(proxmox_default_behavior). +attributes: + check_mode: + support: none + diff_mode: + support: none options: password: description: @@ -202,6 +207,7 @@ author: Sergei Antipov (@UnderGreen) extends_documentation_fragment: - community.general.proxmox.documentation - community.general.proxmox.selection + - community.general.attributes ''' EXAMPLES = r''' diff --git a/plugins/modules/proxmox_disk.py b/plugins/modules/proxmox_disk.py index 8292b1de50..df6735cc0c 100644 --- a/plugins/modules/proxmox_disk.py +++ b/plugins/modules/proxmox_disk.py @@ -16,6 +16,11 @@ version_added: 5.7.0 description: - Allows you to perform some supported operations on a disk in Qemu(KVM) Virtual Machines in a Proxmox VE cluster. author: "Castor Sky (@castorsky) " +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: @@ -311,6 +316,7 @@ options: type: str extends_documentation_fragment: - community.general.proxmox.documentation + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/proxmox_kvm.py b/plugins/modules/proxmox_kvm.py index 25e252bee9..852f6333b7 100644 --- a/plugins/modules/proxmox_kvm.py +++ b/plugins/modules/proxmox_kvm.py @@ -16,6 +16,11 @@ description: - Allows you to create/delete/stop Qemu(KVM) Virtual Machines in Proxmox VE cluster. - Since community.general 4.0.0 on, there are no more default values, see I(proxmox_default_behavior). author: "Abdoul Bah (@helldorado) " +attributes: + check_mode: + support: none + diff_mode: + support: none options: acpi: description: @@ -519,6 +524,7 @@ options: extends_documentation_fragment: - community.general.proxmox.documentation - community.general.proxmox.selection + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/proxmox_nic.py b/plugins/modules/proxmox_nic.py index 5c8c3f47df..26d07c7ecc 100644 --- a/plugins/modules/proxmox_nic.py +++ b/plugins/modules/proxmox_nic.py @@ -16,6 +16,11 @@ version_added: 3.1.0 description: - Allows you to create/update/delete a NIC on Qemu(KVM) Virtual Machines in a Proxmox VE cluster. author: "Lammert Hellinga (@Kogelvis) " +attributes: + check_mode: + support: full + diff_mode: + support: none options: bridge: description: @@ -90,6 +95,7 @@ options: type: int extends_documentation_fragment: - community.general.proxmox.documentation + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/proxmox_snap.py b/plugins/modules/proxmox_snap.py index 3bd7c4ee32..0c17f83763 100644 --- a/plugins/modules/proxmox_snap.py +++ b/plugins/modules/proxmox_snap.py @@ -16,6 +16,11 @@ version_added: 2.0.0 description: - Allows you to create/delete/restore snapshots from instances in Proxmox VE cluster. - Supports both KVM and LXC, OpenVZ has not been tested, as it is no longer supported on Proxmox VE. +attributes: + check_mode: + support: full + diff_mode: + support: none options: hostname: description: @@ -72,11 +77,11 @@ options: notes: - Requires proxmoxer and requests modules on host. These modules can be installed with pip. - - Supports C(check_mode). requirements: [ "proxmoxer", "python >= 2.7", "requests" ] author: Jeffrey van Pelt (@Thulium-Drake) extends_documentation_fragment: - community.general.proxmox.documentation + - community.general.attributes ''' EXAMPLES = r''' diff --git a/plugins/modules/proxmox_template.py b/plugins/modules/proxmox_template.py index a09af2f2a3..2bf24ff845 100644 --- a/plugins/modules/proxmox_template.py +++ b/plugins/modules/proxmox_template.py @@ -15,6 +15,11 @@ module: proxmox_template short_description: Management of OS templates in Proxmox VE cluster description: - allows you to upload/delete templates in Proxmox VE cluster +attributes: + check_mode: + support: none + diff_mode: + support: none options: node: description: @@ -62,7 +67,9 @@ options: notes: - Requires C(proxmoxer) and C(requests) modules on host. This modules can be installed with M(ansible.builtin.pip). author: Sergei Antipov (@UnderGreen) -extends_documentation_fragment: community.general.proxmox.documentation +extends_documentation_fragment: + - community.general.proxmox.documentation + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/xenserver_guest.py b/plugins/modules/xenserver_guest.py index 95b25174cf..7659ee2aed 100644 --- a/plugins/modules/xenserver_guest.py +++ b/plugins/modules/xenserver_guest.py @@ -46,6 +46,11 @@ notes: requirements: - python >= 2.6 - XenAPI +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -286,6 +291,7 @@ options: default: false extends_documentation_fragment: - community.general.xenserver.documentation +- community.general.attributes ''' diff --git a/plugins/modules/xenserver_guest_powerstate.py b/plugins/modules/xenserver_guest_powerstate.py index 2bb7264875..ba88bbf1de 100644 --- a/plugins/modules/xenserver_guest_powerstate.py +++ b/plugins/modules/xenserver_guest_powerstate.py @@ -30,6 +30,11 @@ notes: requirements: - python >= 2.6 - XenAPI +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -67,6 +72,7 @@ options: default: 0 extends_documentation_fragment: - community.general.xenserver.documentation +- community.general.attributes ''' From 755a49692dedf42ca4b9f8d9dcb09ba250ff6210 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:28:13 +0100 Subject: [PATCH 0464/2104] Add attributes to remove management modules (#5961) Add attributes to remove management modules. --- plugins/modules/hpilo_boot.py | 13 ++++++++++--- plugins/modules/idrac_redfish_command.py | 7 +++++++ plugins/modules/idrac_redfish_config.py | 7 +++++++ plugins/modules/ilo_redfish_config.py | 7 +++++++ plugins/modules/ipmi_boot.py | 7 +++++++ plugins/modules/ipmi_power.py | 7 +++++++ plugins/modules/ocapi_command.py | 7 +++++++ plugins/modules/redfish_command.py | 7 +++++++ plugins/modules/redfish_config.py | 7 +++++++ plugins/modules/wdc_redfish_command.py | 7 +++++++ plugins/modules/xcc_redfish_command.py | 7 +++++++ 11 files changed, 80 insertions(+), 3 deletions(-) diff --git a/plugins/modules/hpilo_boot.py b/plugins/modules/hpilo_boot.py index f663a7b5f5..ace79a493a 100644 --- a/plugins/modules/hpilo_boot.py +++ b/plugins/modules/hpilo_boot.py @@ -15,9 +15,16 @@ module: hpilo_boot author: Dag Wieers (@dagwieers) short_description: Boot system using specific media through HP iLO interface description: -- "This module boots a system through its HP iLO interface. The boot media - can be one of: cdrom, floppy, hdd, network or usb." -- This module requires the hpilo python module. + - "This module boots a system through its HP iLO interface. The boot media + can be one of: cdrom, floppy, hdd, network or usb." + - This module requires the hpilo python module. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: host: description: diff --git a/plugins/modules/idrac_redfish_command.py b/plugins/modules/idrac_redfish_command.py index 9e523b6d11..3c81267f45 100644 --- a/plugins/modules/idrac_redfish_command.py +++ b/plugins/modules/idrac_redfish_command.py @@ -16,6 +16,13 @@ description: - Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action. - For use with Dell iDRAC operations that require Redfish OEM extensions. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: category: required: true diff --git a/plugins/modules/idrac_redfish_config.py b/plugins/modules/idrac_redfish_config.py index f995258c7d..cc47e62d2e 100644 --- a/plugins/modules/idrac_redfish_config.py +++ b/plugins/modules/idrac_redfish_config.py @@ -16,6 +16,13 @@ description: - For use with Dell iDRAC operations that require Redfish OEM extensions - Builds Redfish URIs locally and sends them to remote iDRAC controllers to set or update a configuration attribute. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: category: required: true diff --git a/plugins/modules/ilo_redfish_config.py b/plugins/modules/ilo_redfish_config.py index 1c68127fa4..1f021895dc 100644 --- a/plugins/modules/ilo_redfish_config.py +++ b/plugins/modules/ilo_redfish_config.py @@ -15,6 +15,13 @@ description: - Builds Redfish URIs locally and sends them to iLO to set or update a configuration attribute. - For use with HPE iLO operations that require Redfish OEM extensions. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: category: required: true diff --git a/plugins/modules/ipmi_boot.py b/plugins/modules/ipmi_boot.py index 3cfa60d18e..7a4d2b6ec4 100644 --- a/plugins/modules/ipmi_boot.py +++ b/plugins/modules/ipmi_boot.py @@ -15,6 +15,13 @@ module: ipmi_boot short_description: Management of order of boot devices description: - Use this module to manage order of boot devices +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/ipmi_power.py b/plugins/modules/ipmi_power.py index fa23b289b5..c5ec27a480 100644 --- a/plugins/modules/ipmi_power.py +++ b/plugins/modules/ipmi_power.py @@ -15,6 +15,13 @@ module: ipmi_power short_description: Power management for machine description: - Use this module for power management +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/ocapi_command.py b/plugins/modules/ocapi_command.py index 73c0e22bd5..ed2366736a 100644 --- a/plugins/modules/ocapi_command.py +++ b/plugins/modules/ocapi_command.py @@ -17,6 +17,13 @@ description: - Builds OCAPI URIs locally and sends them to remote OOB controllers to perform an action. - Manages OOB controller such as Indicator LED, Reboot, Power Mode, Firmware Update. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: category: required: true diff --git a/plugins/modules/redfish_command.py b/plugins/modules/redfish_command.py index ac19fb0e2b..400677eabb 100644 --- a/plugins/modules/redfish_command.py +++ b/plugins/modules/redfish_command.py @@ -18,6 +18,13 @@ description: - Manages OOB controller ex. reboot, log management. - Manages OOB controller users ex. add, remove, update. - Manages system power ex. on, off, graceful and forced reboot. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: category: required: true diff --git a/plugins/modules/redfish_config.py b/plugins/modules/redfish_config.py index df8cd732bd..9f31870e32 100644 --- a/plugins/modules/redfish_config.py +++ b/plugins/modules/redfish_config.py @@ -17,6 +17,13 @@ description: set or update a configuration attribute. - Manages BIOS configuration settings. - Manages OOB controller configuration settings. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: category: required: true diff --git a/plugins/modules/wdc_redfish_command.py b/plugins/modules/wdc_redfish_command.py index 0b89a1ff15..a51d454d9b 100644 --- a/plugins/modules/wdc_redfish_command.py +++ b/plugins/modules/wdc_redfish_command.py @@ -17,6 +17,13 @@ description: - Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action. - Manages OOB controller firmware. For example, Firmware Activate, Update and Activate. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: category: required: true diff --git a/plugins/modules/xcc_redfish_command.py b/plugins/modules/xcc_redfish_command.py index 4fb0dfe178..494ea061ee 100644 --- a/plugins/modules/xcc_redfish_command.py +++ b/plugins/modules/xcc_redfish_command.py @@ -20,6 +20,13 @@ description: - Supports getting information back via GET method. - Supports updating a configuration attribute via PATCH method. - Supports performing an action via POST method. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: category: required: true From 9de145482bcd855735c8306999381bd6489492e0 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:28:47 +0100 Subject: [PATCH 0465/2104] Add attributes to various basic modules (#5964) * Add attributes to various basic modules. * Check and diff mode for pam_limits was added in #830. --- plugins/modules/alternatives.py | 7 +++++++ plugins/modules/archive.py | 9 ++++++++- plugins/modules/cronvar.py | 7 +++++++ plugins/modules/crypttab.py | 7 +++++++ plugins/modules/dconf.py | 7 +++++++ plugins/modules/gconftool2.py | 9 ++++++++- plugins/modules/homectl.py | 7 +++++++ plugins/modules/ini_file.py | 21 ++++++++++++++------- plugins/modules/interfaces_file.py | 15 +++++++++++---- plugins/modules/java_cert.py | 7 +++++++ plugins/modules/java_keystore.py | 8 +++++++- plugins/modules/kernel_blacklist.py | 9 ++++++++- plugins/modules/keyring.py | 7 +++++++ plugins/modules/launchd.py | 11 +++++++++-- plugins/modules/locale_gen.py | 23 +++++++++++++++-------- plugins/modules/make.py | 9 ++++++++- plugins/modules/mksysb.py | 7 +++++++ plugins/modules/modprobe.py | 7 +++++++ plugins/modules/nmcli.py | 11 +++++++++-- plugins/modules/osx_defaults.py | 7 +++++++ plugins/modules/pam_limits.py | 9 +++++++++ plugins/modules/pamd.py | 7 +++++++ plugins/modules/read_csv.py | 7 +++++++ plugins/modules/sefcontext.py | 11 +++++++++-- plugins/modules/selinux_permissive.py | 7 +++++++ plugins/modules/selogin.py | 9 ++++++++- plugins/modules/seport.py | 7 +++++++ plugins/modules/ssh_config.py | 9 +++++++-- plugins/modules/sudoers.py | 7 +++++++ plugins/modules/sysrc.py | 7 +++++++ plugins/modules/timezone.py | 7 +++++++ plugins/modules/ufw.py | 7 +++++++ plugins/modules/xattr.py | 7 +++++++ plugins/modules/xfconf.py | 9 +++++++++ plugins/modules/xml.py | 9 ++++++++- 35 files changed, 280 insertions(+), 34 deletions(-) diff --git a/plugins/modules/alternatives.py b/plugins/modules/alternatives.py index 48cacb4540..97d4f51fbb 100644 --- a/plugins/modules/alternatives.py +++ b/plugins/modules/alternatives.py @@ -22,6 +22,13 @@ author: - Marius Rieder (@jiuka) - David Wittman (@DavidWittman) - Gabe Mulley (@mulby) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: name: description: diff --git a/plugins/modules/archive.py b/plugins/modules/archive.py index 83eae34f56..5744925312 100644 --- a/plugins/modules/archive.py +++ b/plugins/modules/archive.py @@ -14,11 +14,18 @@ DOCUMENTATION = r''' --- module: archive short_description: Creates a compressed archive of one or more files or trees -extends_documentation_fragment: files +extends_documentation_fragment: + - files + - community.general.attributes description: - Creates or extends an archive. - The source and archive are on the remote host, and the archive I(is not) copied to the local host. - Source files can be deleted after archival by specifying I(remove=True). +attributes: + check_mode: + support: full + diff_mode: + support: none options: path: description: diff --git a/plugins/modules/cronvar.py b/plugins/modules/cronvar.py index 9299880537..7effed2ae1 100644 --- a/plugins/modules/cronvar.py +++ b/plugins/modules/cronvar.py @@ -24,6 +24,13 @@ short_description: Manage variables in crontabs description: - Use this module to manage crontab variables. - This module allows you to create, update, or delete cron variable definitions. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/crypttab.py b/plugins/modules/crypttab.py index a334e8ab3f..6aea362e74 100644 --- a/plugins/modules/crypttab.py +++ b/plugins/modules/crypttab.py @@ -14,6 +14,13 @@ module: crypttab short_description: Encrypted Linux block devices description: - Control Linux encrypted block devices that are set up during system boot in C(/etc/crypttab). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/dconf.py b/plugins/modules/dconf.py index 61bf6f0e3f..4d7ed34bf9 100644 --- a/plugins/modules/dconf.py +++ b/plugins/modules/dconf.py @@ -44,6 +44,13 @@ notes: key is by making the configuration change in application affected by the key, and then having a look at value set via commands C(dconf dump /path/to/dir/) or C(dconf read /path/to/key). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: key: type: str diff --git a/plugins/modules/gconftool2.py b/plugins/modules/gconftool2.py index 788aed3423..949e92b306 100644 --- a/plugins/modules/gconftool2.py +++ b/plugins/modules/gconftool2.py @@ -12,11 +12,18 @@ __metaclass__ = type DOCUMENTATION = ''' module: gconftool2 author: - - Kenneth D. Evensen (@kevensen) + - Kenneth D. Evensen (@kevensen) short_description: Edit GNOME Configurations description: - This module allows for the manipulation of GNOME 2 Configuration via gconftool-2. Please see the gconftool-2(1) man pages for more details. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: key: type: str diff --git a/plugins/modules/homectl.py b/plugins/modules/homectl.py index c14dc4af9a..301e388d38 100644 --- a/plugins/modules/homectl.py +++ b/plugins/modules/homectl.py @@ -17,6 +17,13 @@ short_description: Manage user accounts with systemd-homed version_added: 4.4.0 description: - Manages a user's home directory managed by systemd-homed. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/ini_file.py b/plugins/modules/ini_file.py index ee4ad62b72..231a0e836a 100644 --- a/plugins/modules/ini_file.py +++ b/plugins/modules/ini_file.py @@ -15,14 +15,21 @@ DOCUMENTATION = r''' --- module: ini_file short_description: Tweak settings in INI files -extends_documentation_fragment: files +extends_documentation_fragment: + - files + - community.general.attributes description: - - Manage (add, remove, change) individual settings in an INI-style file without having - to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). - - Adds missing sections if they don't exist. - - Before Ansible 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file. - - Since Ansible 2.3, this module adds missing ending newlines to files to keep in line with the POSIX standard, even when - no other modifications need to be applied. + - Manage (add, remove, change) individual settings in an INI-style file without having + to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). + - Adds missing sections if they don't exist. + - Before Ansible 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file. + - Since Ansible 2.3, this module adds missing ending newlines to files to keep in line with the POSIX standard, even when + no other modifications need to be applied. +attributes: + check_mode: + support: full + diff_mode: + support: full options: path: description: diff --git a/plugins/modules/interfaces_file.py b/plugins/modules/interfaces_file.py index fe4223a12f..8e643fb797 100644 --- a/plugins/modules/interfaces_file.py +++ b/plugins/modules/interfaces_file.py @@ -13,11 +13,18 @@ DOCUMENTATION = ''' --- module: interfaces_file short_description: Tweak settings in /etc/network/interfaces files -extends_documentation_fragment: files +extends_documentation_fragment: + - ansible.builtin.files + - community.general.attributes description: - - Manage (add, remove, change) individual interface options in an interfaces-style file without having - to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). Interface has to be presented in a file. - - Read information about interfaces from interfaces-styled files + - Manage (add, remove, change) individual interface options in an interfaces-style file without having + to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). Interface has to be presented in a file. + - Read information about interfaces from interfaces-styled files +attributes: + check_mode: + support: full + diff_mode: + support: none options: dest: type: path diff --git a/plugins/modules/java_cert.py b/plugins/modules/java_cert.py index 461f365a72..a188b16c38 100644 --- a/plugins/modules/java_cert.py +++ b/plugins/modules/java_cert.py @@ -16,6 +16,13 @@ short_description: Uses keytool to import/remove certificate to/from java keysto description: - This is a wrapper module around keytool, which can be used to import certificates and optionally private keys to a given java keystore, or remove them from it. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: cert_url: description: diff --git a/plugins/modules/java_keystore.py b/plugins/modules/java_keystore.py index 2383c8cc48..7c2c4884dc 100644 --- a/plugins/modules/java_keystore.py +++ b/plugins/modules/java_keystore.py @@ -16,6 +16,11 @@ module: java_keystore short_description: Create a Java keystore in JKS format description: - Bundle a x509 certificate and its private key into a Java Keystore in JKS format. +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: @@ -124,7 +129,8 @@ author: - Guillaume Grossetie (@Mogztter) - quidame (@quidame) extends_documentation_fragment: - - files + - ansible.builtin.files + - community.general.attributes seealso: - module: community.crypto.openssl_pkcs12 - module: community.general.java_cert diff --git a/plugins/modules/kernel_blacklist.py b/plugins/modules/kernel_blacklist.py index c4352ac08a..1b40999cae 100644 --- a/plugins/modules/kernel_blacklist.py +++ b/plugins/modules/kernel_blacklist.py @@ -13,10 +13,17 @@ DOCUMENTATION = ''' --- module: kernel_blacklist author: -- Matthias Vogelgesang (@matze) + - Matthias Vogelgesang (@matze) short_description: Blacklist kernel modules description: - Add or remove kernel modules from blacklist. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: name: type: str diff --git a/plugins/modules/keyring.py b/plugins/modules/keyring.py index 43dfb8c5dc..ada22ed581 100644 --- a/plugins/modules/keyring.py +++ b/plugins/modules/keyring.py @@ -26,6 +26,13 @@ requirements: - keyring (Python library) - gnome-keyring (application - required for headless Gnome keyring access) - dbus-run-session (application - required for headless Gnome keyring access) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: service: description: The name of the service. diff --git a/plugins/modules/launchd.py b/plugins/modules/launchd.py index 250bbffb9e..13a8ce0862 100644 --- a/plugins/modules/launchd.py +++ b/plugins/modules/launchd.py @@ -12,11 +12,18 @@ DOCUMENTATION = r''' --- module: launchd author: -- Martin Migasiewicz (@martinm82) + - Martin Migasiewicz (@martinm82) short_description: Manage macOS services version_added: 1.0.0 description: -- Manage launchd services on target macOS hosts. + - Manage launchd services on target macOS hosts. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/locale_gen.py b/plugins/modules/locale_gen.py index 743570b7ab..fccdf977a4 100644 --- a/plugins/modules/locale_gen.py +++ b/plugins/modules/locale_gen.py @@ -13,21 +13,28 @@ DOCUMENTATION = ''' module: locale_gen short_description: Creates or removes locales description: - - Manages locales by editing /etc/locale.gen and invoking locale-gen. + - Manages locales by editing /etc/locale.gen and invoking locale-gen. author: -- Augustus Kling (@AugustusKling) + - Augustus Kling (@AugustusKling) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str description: - - Name and encoding of the locale, such as "en_GB.UTF-8". + - Name and encoding of the locale, such as "en_GB.UTF-8". required: true state: - type: str - description: - - Whether the locale shall be present. - choices: [ absent, present ] - default: present + type: str + description: + - Whether the locale shall be present. + choices: [ absent, present ] + default: present ''' EXAMPLES = ''' diff --git a/plugins/modules/make.py b/plugins/modules/make.py index 31da07c579..be2a32bd45 100644 --- a/plugins/modules/make.py +++ b/plugins/modules/make.py @@ -13,10 +13,17 @@ DOCUMENTATION = r''' module: make short_description: Run targets in a Makefile requirements: -- make + - make author: Linus Unnebäck (@LinusU) description: - Run targets in a Makefile. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: target: description: diff --git a/plugins/modules/mksysb.py b/plugins/modules/mksysb.py index 39f3e6a1c4..c43a268f33 100644 --- a/plugins/modules/mksysb.py +++ b/plugins/modules/mksysb.py @@ -17,6 +17,13 @@ module: mksysb short_description: Generates AIX mksysb rootvg backups description: - This module manages a basic AIX mksysb (image) of rootvg. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: backup_crypt_files: description: diff --git a/plugins/modules/modprobe.py b/plugins/modules/modprobe.py index df460e7161..e386117945 100644 --- a/plugins/modules/modprobe.py +++ b/plugins/modules/modprobe.py @@ -18,6 +18,13 @@ author: - Matt Jeffery (@mattjeffery) description: - Load or unload kernel modules. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index aa2ddafe1d..461bcc58f9 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -13,16 +13,23 @@ DOCUMENTATION = r''' --- module: nmcli author: -- Chris Long (@alcamie101) + - Chris Long (@alcamie101) short_description: Manage Networking requirements: -- nmcli + - nmcli +extends_documentation_fragment: + - community.general.attributes description: - 'Manage the network devices. Create, modify and manage various connection and device type e.g., ethernet, teams, bonds, vlans etc.' - 'On CentOS 8 and Fedora >=29 like systems, the requirements can be met by installing the following packages: NetworkManager.' - 'On CentOS 7 and Fedora <=28 like systems, the requirements can be met by installing the following packages: NetworkManager-tui.' - 'On Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager' - 'On openSUSE, the requirements can be met by installing the following packages: NetworkManager.' +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: description: diff --git a/plugins/modules/osx_defaults.py b/plugins/modules/osx_defaults.py index f905493a31..480f40af56 100644 --- a/plugins/modules/osx_defaults.py +++ b/plugins/modules/osx_defaults.py @@ -22,6 +22,13 @@ description: - macOS applications and other programs use the defaults system to record user preferences and other information that must be maintained when the applications are not running (such as default font for new documents, or the position of an Info panel). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: domain: description: diff --git a/plugins/modules/pam_limits.py b/plugins/modules/pam_limits.py index d80ba5ffbf..dbb70045df 100644 --- a/plugins/modules/pam_limits.py +++ b/plugins/modules/pam_limits.py @@ -18,6 +18,15 @@ description: - The C(pam_limits) module modifies PAM limits. - The default file is C(/etc/security/limits.conf). - For the full documentation, see C(man 5 limits.conf). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + version_added: 2.0.0 + diff_mode: + support: full + version_added: 2.0.0 options: domain: type: str diff --git a/plugins/modules/pamd.py b/plugins/modules/pamd.py index 9b7ac77857..6ffc8624e9 100644 --- a/plugins/modules/pamd.py +++ b/plugins/modules/pamd.py @@ -20,6 +20,13 @@ description: module_path must match an existing rule. See man(5) pam.d for details. notes: - This module does not handle authselect profiles. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/read_csv.py b/plugins/modules/read_csv.py index 38c91ded07..f2a359fa7d 100644 --- a/plugins/modules/read_csv.py +++ b/plugins/modules/read_csv.py @@ -16,6 +16,13 @@ description: - Read a CSV file and return a list or a dictionary, containing one dictionary per row. author: - Dag Wieers (@dagwieers) +extends_documentation_fragment: +- community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: path: description: diff --git a/plugins/modules/sefcontext.py b/plugins/modules/sefcontext.py index 8183ed7d71..c2fee45ee2 100644 --- a/plugins/modules/sefcontext.py +++ b/plugins/modules/sefcontext.py @@ -13,8 +13,15 @@ DOCUMENTATION = r''' module: sefcontext short_description: Manages SELinux file context mapping definitions description: -- Manages SELinux file context mapping definitions. -- Similar to the C(semanage fcontext) command. + - Manages SELinux file context mapping definitions. + - Similar to the C(semanage fcontext) command. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: target: description: diff --git a/plugins/modules/selinux_permissive.py b/plugins/modules/selinux_permissive.py index 3563775d14..7249a01b82 100644 --- a/plugins/modules/selinux_permissive.py +++ b/plugins/modules/selinux_permissive.py @@ -15,6 +15,13 @@ module: selinux_permissive short_description: Change permissive domain in SELinux policy description: - Add and remove a domain from the list of permissive domains. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: domain: description: diff --git a/plugins/modules/selogin.py b/plugins/modules/selogin.py index 59222e073a..57482b0908 100644 --- a/plugins/modules/selogin.py +++ b/plugins/modules/selogin.py @@ -13,7 +13,14 @@ DOCUMENTATION = ''' module: selogin short_description: Manages linux user to SELinux user mapping description: - - Manages linux user to SELinux user mapping + - Manages linux user to SELinux user mapping +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: login: type: str diff --git a/plugins/modules/seport.py b/plugins/modules/seport.py index b43b501058..964e8f0eda 100644 --- a/plugins/modules/seport.py +++ b/plugins/modules/seport.py @@ -14,6 +14,13 @@ module: seport short_description: Manages SELinux network port type definitions description: - Manages SELinux network port type definitions. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: ports: description: diff --git a/plugins/modules/ssh_config.py b/plugins/modules/ssh_config.py index f2fa8aa457..c69f95d22b 100644 --- a/plugins/modules/ssh_config.py +++ b/plugins/modules/ssh_config.py @@ -20,6 +20,13 @@ description: author: - Björn Andersson (@gaqzi) - Abhijeet Kasurde (@Akasurde) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -95,8 +102,6 @@ options: version_added: 6.1.0 requirements: - StormSSH -notes: -- Supports check mode. ''' EXAMPLES = r''' diff --git a/plugins/modules/sudoers.py b/plugins/modules/sudoers.py index fd29b189f0..fd8289b1ca 100644 --- a/plugins/modules/sudoers.py +++ b/plugins/modules/sudoers.py @@ -19,6 +19,13 @@ description: - This module allows for the manipulation of sudoers files. author: - "Jon Ellis (@JonEllis) " +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: commands: description: diff --git a/plugins/modules/sysrc.py b/plugins/modules/sysrc.py index ccd5c2c545..9652b629ab 100644 --- a/plugins/modules/sysrc.py +++ b/plugins/modules/sysrc.py @@ -18,6 +18,13 @@ short_description: Manage FreeBSD using sysrc version_added: '2.0.0' description: - Manages C(/etc/rc.conf) for FreeBSD. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/timezone.py b/plugins/modules/timezone.py index 20404d3a79..05849e4bb1 100644 --- a/plugins/modules/timezone.py +++ b/plugins/modules/timezone.py @@ -26,6 +26,13 @@ description: - As of Ansible 2.4 support was added for macOS. - As of Ansible 2.9 support was added for AIX 6.1+ - Windows and HPUX are not supported, please let us know if you find any other OS/distro in which this fails. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: name: description: diff --git a/plugins/modules/ufw.py b/plugins/modules/ufw.py index 6d18f3f781..45c98fd639 100644 --- a/plugins/modules/ufw.py +++ b/plugins/modules/ufw.py @@ -25,6 +25,13 @@ notes: - See C(man ufw) for more examples. requirements: - C(ufw) package +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/xattr.py b/plugins/modules/xattr.py index 9cc74a1382..0b44fdaadf 100644 --- a/plugins/modules/xattr.py +++ b/plugins/modules/xattr.py @@ -16,6 +16,13 @@ description: - Manages filesystem user defined extended attributes. - Requires that extended attributes are enabled on the target filesystem and that the setfattr/getfattr utilities are present. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: path: description: diff --git a/plugins/modules/xfconf.py b/plugins/modules/xfconf.py index 0fff6f0d14..680c814e16 100644 --- a/plugins/modules/xfconf.py +++ b/plugins/modules/xfconf.py @@ -26,6 +26,15 @@ seealso: description: XFCE documentation for the Xfconf configuration system. link: 'https://docs.xfce.org/xfce/xfconf/start' +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: full + options: channel: description: diff --git a/plugins/modules/xml.py b/plugins/modules/xml.py index 9f16ee1344..5b9bba355c 100644 --- a/plugins/modules/xml.py +++ b/plugins/modules/xml.py @@ -16,7 +16,14 @@ DOCUMENTATION = r''' module: xml short_description: Manage bits and pieces of XML files or strings description: -- A CRUD-like interface to managing bits of XML files. + - A CRUD-like interface to managing bits of XML files. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: path: description: From 0ef805699d6830a644ef207bf6c966edd7ad6878 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:29:14 +0100 Subject: [PATCH 0466/2104] Add attributes to more modules (1/4) (#5965) * Add attributes to more modules. * Apply suggestions from code review. Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com> --------- Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com> --- plugins/doc_fragments/hpe3par.py | 3 +- plugins/modules/ali_instance.py | 6 +++ plugins/modules/deploy_helper.py | 10 +++- plugins/modules/heroku_collaborator.py | 7 +++ plugins/modules/honeybadger_deployment.py | 9 +++- plugins/modules/hponcfg.py | 9 +++- plugins/modules/imc_rest.py | 21 ++++++--- plugins/modules/imgadm.py | 7 +++ plugins/modules/infinity.py | 7 +++ plugins/modules/ip_netns.py | 7 +++ plugins/modules/ipwcli_dns.py | 9 ++++ plugins/modules/linode.py | 9 +++- plugins/modules/linode_v4.py | 7 +++ plugins/modules/lxc_container.py | 7 +++ plugins/modules/netcup_dns.py | 7 +++ plugins/modules/ohai.py | 19 +++++--- plugins/modules/omapi_host.py | 9 +++- plugins/modules/open_iscsi.py | 9 +++- plugins/modules/opendj_backendprop.py | 11 ++++- plugins/modules/openwrt_init.py | 7 +++ plugins/modules/pacemaker_cluster.py | 13 ++++-- plugins/modules/pmem.py | 7 +++ plugins/modules/pubnub_blocks.py | 56 +++++++++++++---------- plugins/modules/pulp_repo.py | 8 +++- plugins/modules/puppet.py | 7 +++ plugins/modules/pushbullet.py | 9 +++- plugins/modules/pushover.py | 15 ++++-- plugins/modules/serverless.py | 9 +++- plugins/modules/sl_vm.py | 7 +++ plugins/modules/ss_3par_cpg.py | 6 +++ plugins/modules/vdo.py | 9 ++++ plugins/modules/vexata_eg.py | 6 +++ plugins/modules/vexata_volume.py | 6 +++ plugins/modules/wakeonlan.py | 9 +++- plugins/modules/znode.py | 7 +++ 35 files changed, 296 insertions(+), 58 deletions(-) diff --git a/plugins/doc_fragments/hpe3par.py b/plugins/doc_fragments/hpe3par.py index 96e53846e1..606a2502a6 100644 --- a/plugins/doc_fragments/hpe3par.py +++ b/plugins/doc_fragments/hpe3par.py @@ -29,8 +29,7 @@ options: required: true requirements: - - hpe3par_sdk >= 1.0.2. Install using 'pip install hpe3par_sdk' + - hpe3par_sdk >= 1.0.2. Install using C(pip install hpe3par_sdk). - WSAPI service should be enabled on the 3PAR storage array. notes: - - check_mode not supported ''' diff --git a/plugins/modules/ali_instance.py b/plugins/modules/ali_instance.py index 96a042f5ca..232c21ee0f 100644 --- a/plugins/modules/ali_instance.py +++ b/plugins/modules/ali_instance.py @@ -31,6 +31,11 @@ short_description: Create, Start, Stop, Restart or Terminate an Instance in ECS; description: - Create, start, stop, restart, modify or terminate ecs instances. - Add or remove ecs instances to/from security group. +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: @@ -252,6 +257,7 @@ requirements: - "footmark >= 1.19.0" extends_documentation_fragment: - community.general.alicloud + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/deploy_helper.py b/plugins/modules/deploy_helper.py index afa63cba19..f0246cae63 100644 --- a/plugins/modules/deploy_helper.py +++ b/plugins/modules/deploy_helper.py @@ -31,6 +31,12 @@ description: C(new_release), either the 'release' parameter or a generated timestamp, C(new_release_path), the path to the new release folder (not created by the module)." +attributes: + check_mode: + support: full + diff_mode: + support: none + options: path: type: path @@ -111,7 +117,9 @@ notes: - Because of the default behaviour of generating the I(new_release) fact, this module will not be idempotent unless you pass your own release name with I(release). Due to the nature of deploying software, this should not be much of a problem. -extends_documentation_fragment: files +extends_documentation_fragment: + - ansible.builtin.files + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/heroku_collaborator.py b/plugins/modules/heroku_collaborator.py index d76b2b6507..e7b0de3f99 100644 --- a/plugins/modules/heroku_collaborator.py +++ b/plugins/modules/heroku_collaborator.py @@ -21,6 +21,13 @@ author: - Marcel Arns (@marns93) requirements: - heroku3 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_key: type: str diff --git a/plugins/modules/honeybadger_deployment.py b/plugins/modules/honeybadger_deployment.py index be8412f9af..820e4538e8 100644 --- a/plugins/modules/honeybadger_deployment.py +++ b/plugins/modules/honeybadger_deployment.py @@ -14,7 +14,14 @@ module: honeybadger_deployment author: "Benjamin Curtis (@stympy)" short_description: Notify Honeybadger.io about app deployments description: - - Notify Honeybadger.io about app deployments (see http://docs.honeybadger.io/article/188-deployment-tracking) + - Notify Honeybadger.io about app deployments (see U(http://docs.honeybadger.io/article/188-deployment-tracking)). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: type: str diff --git a/plugins/modules/hponcfg.py b/plugins/modules/hponcfg.py index 65e40c46ed..612a20d923 100644 --- a/plugins/modules/hponcfg.py +++ b/plugins/modules/hponcfg.py @@ -15,7 +15,14 @@ module: hponcfg author: Dag Wieers (@dagwieers) short_description: Configure HP iLO interface using hponcfg description: - - This modules configures the HP iLO interface using hponcfg. + - This modules configures the HP iLO interface using hponcfg. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: path: description: diff --git a/plugins/modules/imc_rest.py b/plugins/modules/imc_rest.py index 4d90bcc54d..4bbaad23af 100644 --- a/plugins/modules/imc_rest.py +++ b/plugins/modules/imc_rest.py @@ -13,15 +13,22 @@ DOCUMENTATION = r''' module: imc_rest short_description: Manage Cisco IMC hardware through its REST API description: -- Provides direct access to the Cisco IMC REST API. -- Perform any configuration changes and actions that the Cisco IMC supports. -- More information about the IMC REST API is available from - U(http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html) + - Provides direct access to the Cisco IMC REST API. + - Perform any configuration changes and actions that the Cisco IMC supports. + - More information about the IMC REST API is available from + U(http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html). author: -- Dag Wieers (@dagwieers) + - Dag Wieers (@dagwieers) requirements: -- lxml -- xmljson >= 0.1.8 + - lxml + - xmljson >= 0.1.8 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: hostname: description: diff --git a/plugins/modules/imgadm.py b/plugins/modules/imgadm.py index 2357fffa30..6e4b810982 100644 --- a/plugins/modules/imgadm.py +++ b/plugins/modules/imgadm.py @@ -16,6 +16,13 @@ short_description: Manage SmartOS images description: - Manage SmartOS virtual machine images through imgadm(1M) author: Jasper Lievisse Adriaanse (@jasperla) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: force: required: false diff --git a/plugins/modules/infinity.py b/plugins/modules/infinity.py index 4b0e835209..65aa591f4c 100644 --- a/plugins/modules/infinity.py +++ b/plugins/modules/infinity.py @@ -15,6 +15,13 @@ description: - Manage Infinity IPAM using REST API. author: - Meirong Liu (@MeganLiu) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: server_ip: description: diff --git a/plugins/modules/ip_netns.py b/plugins/modules/ip_netns.py index e719874f7d..69534c810d 100644 --- a/plugins/modules/ip_netns.py +++ b/plugins/modules/ip_netns.py @@ -15,6 +15,13 @@ short_description: Manage network namespaces requirements: [ ip ] description: - Create or delete network namespaces using the ip command. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: required: false diff --git a/plugins/modules/ipwcli_dns.py b/plugins/modules/ipwcli_dns.py index 9436decc8c..7b05aefb77 100644 --- a/plugins/modules/ipwcli_dns.py +++ b/plugins/modules/ipwcli_dns.py @@ -25,6 +25,15 @@ requirements: notes: - To make the DNS record changes effective, you need to run C(update dnsserver) on the ipwcli. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: dnsname: description: diff --git a/plugins/modules/linode.py b/plugins/modules/linode.py index 5304ed3d89..404e7a393f 100644 --- a/plugins/modules/linode.py +++ b/plugins/modules/linode.py @@ -13,7 +13,14 @@ DOCUMENTATION = ''' module: linode short_description: Manage instances on the Linode Public Cloud description: - - Manage Linode Public Cloud instances and optionally wait for it to be 'running'. + - Manage Linode Public Cloud instances and optionally wait for it to be 'running'. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/linode_v4.py b/plugins/modules/linode_v4.py index 3613fc7b50..f213af125e 100644 --- a/plugins/modules/linode_v4.py +++ b/plugins/modules/linode_v4.py @@ -22,6 +22,13 @@ notes: - No Linode resizing is currently implemented. This module will, in time, replace the current Linode module which uses deprecated API bindings on the Linode side. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: region: description: diff --git a/plugins/modules/lxc_container.py b/plugins/modules/lxc_container.py index 4e7f43419a..aec8f12dc4 100644 --- a/plugins/modules/lxc_container.py +++ b/plugins/modules/lxc_container.py @@ -16,6 +16,13 @@ short_description: Manage LXC Containers description: - Management of LXC containers. author: "Kevin Carter (@cloudnull)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/netcup_dns.py b/plugins/modules/netcup_dns.py index 4c3c015ebd..77be50b2c6 100644 --- a/plugins/modules/netcup_dns.py +++ b/plugins/modules/netcup_dns.py @@ -16,6 +16,13 @@ notes: [] short_description: Manage Netcup DNS records description: - "Manages DNS records via the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php)." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_key: description: diff --git a/plugins/modules/ohai.py b/plugins/modules/ohai.py index c7322c0962..7fdab3bb75 100644 --- a/plugins/modules/ohai.py +++ b/plugins/modules/ohai.py @@ -14,16 +14,23 @@ DOCUMENTATION = ''' module: ohai short_description: Returns inventory data from I(Ohai) description: - - Similar to the M(community.general.facter) module, this runs the I(Ohai) discovery program - (U(https://docs.chef.io/ohai.html)) on the remote host and - returns JSON inventory data. - I(Ohai) data is a bit more verbose and nested than I(facter). + - Similar to the M(community.general.facter) module, this runs the I(Ohai) discovery program + (U(https://docs.chef.io/ohai.html)) on the remote host and + returns JSON inventory data. + I(Ohai) data is a bit more verbose and nested than I(facter). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: {} notes: [] requirements: [ "ohai" ] author: - - "Ansible Core Team" - - "Michael DeHaan (@mpdehaan)" + - "Ansible Core Team" + - "Michael DeHaan (@mpdehaan)" ''' EXAMPLES = ''' diff --git a/plugins/modules/omapi_host.py b/plugins/modules/omapi_host.py index 4e3a6247d6..c93c578535 100644 --- a/plugins/modules/omapi_host.py +++ b/plugins/modules/omapi_host.py @@ -18,7 +18,14 @@ description: Manage OMAPI hosts into compatible DHCPd servers requirements: - pypureomapi author: -- Loic Blot (@nerzhul) + - Loic Blot (@nerzhul) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/open_iscsi.py b/plugins/modules/open_iscsi.py index 7704fd8b7f..af08d1c54f 100644 --- a/plugins/modules/open_iscsi.py +++ b/plugins/modules/open_iscsi.py @@ -12,13 +12,20 @@ DOCUMENTATION = r''' --- module: open_iscsi author: -- Serge van Ginderachter (@srvg) + - Serge van Ginderachter (@srvg) short_description: Manage iSCSI targets with Open-iSCSI description: - Discover targets on given portal, (dis)connect targets, mark targets to manually or auto start, return device nodes of connected targets. requirements: - open_iscsi library and tools (iscsiadm) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: portal: description: diff --git a/plugins/modules/opendj_backendprop.py b/plugins/modules/opendj_backendprop.py index 7e620c4305..fed53532d9 100644 --- a/plugins/modules/opendj_backendprop.py +++ b/plugins/modules/opendj_backendprop.py @@ -13,10 +13,17 @@ DOCUMENTATION = ''' module: opendj_backendprop short_description: Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command description: - - This module will update settings for OpenDJ with the command set-backend-prop. - - It will check first via de get-backend-prop if configuration needs to be applied. + - This module will update settings for OpenDJ with the command set-backend-prop. + - It will check first via de get-backend-prop if configuration needs to be applied. author: - Werner Dijkerman (@dj-wasabi) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: opendj_bindir: description: diff --git a/plugins/modules/openwrt_init.py b/plugins/modules/openwrt_init.py index 978a6bec35..a0e156b33a 100644 --- a/plugins/modules/openwrt_init.py +++ b/plugins/modules/openwrt_init.py @@ -15,6 +15,13 @@ author: short_description: Manage services on OpenWrt description: - Controls OpenWrt services on remote hosts. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/pacemaker_cluster.py b/plugins/modules/pacemaker_cluster.py index a71c1b0044..47b827908f 100644 --- a/plugins/modules/pacemaker_cluster.py +++ b/plugins/modules/pacemaker_cluster.py @@ -13,10 +13,17 @@ DOCUMENTATION = ''' module: pacemaker_cluster short_description: Manage pacemaker clusters author: -- Mathieu Bultel (@matbu) + - Mathieu Bultel (@matbu) description: - - This module can manage a pacemaker cluster and nodes from Ansible using - the pacemaker cli. + - This module can manage a pacemaker cluster and nodes from Ansible using + the pacemaker cli. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/pmem.py b/plugins/modules/pmem.py index 8cc14c4693..d7fcb8e010 100644 --- a/plugins/modules/pmem.py +++ b/plugins/modules/pmem.py @@ -20,6 +20,13 @@ description: requirements: - ipmctl and ndctl command line tools - xmltodict +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: appdirect: description: diff --git a/plugins/modules/pubnub_blocks.py b/plugins/modules/pubnub_blocks.py index 7d15b0d9eb..a03553c5c7 100644 --- a/plugins/modules/pubnub_blocks.py +++ b/plugins/modules/pubnub_blocks.py @@ -20,21 +20,28 @@ module: pubnub_blocks short_description: PubNub blocks management module description: - "This module allows Ansible to interface with the PubNub BLOCKS - infrastructure by providing the following operations: create / remove, - start / stop and rename for blocks and create / modify / remove for event - handlers" + infrastructure by providing the following operations: create / remove, + start / stop and rename for blocks and create / modify / remove for event + handlers." author: - PubNub (@pubnub) - Sergey Mamontov (@parfeon) requirements: - "python >= 2.7" - "pubnub_blocks_client >= 1.0" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: email: description: - Email from account for which new session should be started. - "Not required if C(cache) contains result of previous module call (in - same play)." + same play)." required: false type: str default: '' @@ -42,7 +49,7 @@ options: description: - Password which match to account to which specified C(email) belong. - "Not required if C(cache) contains result of previous module call (in - same play)." + same play)." required: false type: str default: '' @@ -57,14 +64,14 @@ options: account: description: - "Name of PubNub account for from which C(application) will be used to - manage blocks." + manage blocks." - "User's account will be used if value not set or empty." type: str default: '' application: description: - "Name of target PubNub application for which blocks configuration on - specific C(keyset) will be done." + specific C(keyset) will be done." type: str required: true keyset: @@ -75,7 +82,7 @@ options: state: description: - "Intended block state after event handlers creation / update process - will be completed." + will be completed." required: false default: 'present' choices: ['started', 'stopped', 'present', 'absent'] @@ -95,23 +102,23 @@ options: event_handlers: description: - "List of event handlers which should be updated for specified block - C(name)." + C(name)." - "Each entry for new event handler should contain: C(name), C(src), - C(channels), C(event). C(name) used as event handler name which can be - used later to make changes to it." + C(channels), C(event). C(name) used as event handler name which can be + used later to make changes to it." - C(src) is full path to file with event handler code. - "C(channels) is name of channel from which event handler is waiting - for events." + for events." - "C(event) is type of event which is able to trigger event handler: - I(js-before-publish), I(js-after-publish), I(js-after-presence)." + I(js-before-publish), I(js-after-publish), I(js-after-presence)." - "Each entry for existing handlers should contain C(name) (so target - handler can be identified). Rest parameters (C(src), C(channels) and - C(event)) can be added if changes required for them." + handler can be identified). Rest parameters (C(src), C(channels) and + C(event)) can be added if changes required for them." - "It is possible to rename event handler by adding C(changes) key to - event handler payload and pass dictionary, which will contain single key - C(name), where new name should be passed." + event handler payload and pass dictionary, which will contain single key + C(name), where new name should be passed." - "To remove particular event handler it is possible to set C(state) for - it to C(absent) and it will be removed." + it to C(absent) and it will be removed." required: false default: [] type: list @@ -119,7 +126,7 @@ options: changes: description: - "List of fields which should be changed by block itself (doesn't - affect any event handlers)." + affect any event handlers)." - "Possible options for change is: C(name)." required: false default: {} @@ -127,8 +134,8 @@ options: validate_certs: description: - "This key allow to try skip certificates check when performing REST API - calls. Sometimes host may have issues with certificates on it and this - will cause problems to call PubNub REST API." + calls. Sometimes host may have issues with certificates on it and this + will cause problems to call PubNub REST API." - If check should be ignored C(False) should be passed to this parameter. required: false default: true @@ -224,9 +231,10 @@ EXAMPLES = ''' RETURN = ''' module_cache: - description: "Cached account information. In case if with single play module - used few times it is better to pass cached data to next module calls to speed - up process." + description: + - Cached account information. In case if with single play module + used few times it is better to pass cached data to next module calls to speed + up process. type: dict returned: always ''' diff --git a/plugins/modules/pulp_repo.py b/plugins/modules/pulp_repo.py index 9e100ba93e..d7333f89ec 100644 --- a/plugins/modules/pulp_repo.py +++ b/plugins/modules/pulp_repo.py @@ -18,6 +18,11 @@ short_description: Add or remove Pulp repos from a remote host description: - Add or remove Pulp repos from a remote host. - Note, this is for Pulp 2 only. +attributes: + check_mode: + support: full + diff_mode: + support: none options: add_export_distributor: description: @@ -165,7 +170,8 @@ notes: - This module can currently only create distributors and importers on rpm repositories. Contributions to support other repo types are welcome. extends_documentation_fragment: - - url + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/puppet.py b/plugins/modules/puppet.py index 8454bb60fd..a93dddc63e 100644 --- a/plugins/modules/puppet.py +++ b/plugins/modules/puppet.py @@ -14,6 +14,13 @@ module: puppet short_description: Runs puppet description: - Runs I(puppet) agent or apply in a reliable manner. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: timeout: description: diff --git a/plugins/modules/pushbullet.py b/plugins/modules/pushbullet.py index a3e4104554..c7e20c3733 100644 --- a/plugins/modules/pushbullet.py +++ b/plugins/modules/pushbullet.py @@ -16,7 +16,14 @@ requirements: [ pushbullet.py ] module: pushbullet short_description: Sends notifications to Pushbullet description: - - This module sends push notifications via Pushbullet to channels or devices. + - This module sends push notifications via Pushbullet to channels or devices. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_key: type: str diff --git a/plugins/modules/pushover.py b/plugins/modules/pushover.py index c4c12a4670..f5493731fa 100644 --- a/plugins/modules/pushover.py +++ b/plugins/modules/pushover.py @@ -14,11 +14,18 @@ DOCUMENTATION = ''' module: pushover short_description: Send notifications via U(https://pushover.net) description: - - Send notifications via pushover, to subscriber list of devices, and email - addresses. Requires pushover app on devices. + - Send notifications via pushover, to subscriber list of devices, and email + addresses. Requires pushover app on devices. notes: - - You will require a pushover.net account to use this module. But no account - is required to receive messages. + - You will require a pushover.net account to use this module. But no account + is required to receive messages. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: msg: type: str diff --git a/plugins/modules/serverless.py b/plugins/modules/serverless.py index 4d36ba679a..67d673d4d7 100644 --- a/plugins/modules/serverless.py +++ b/plugins/modules/serverless.py @@ -13,7 +13,14 @@ DOCUMENTATION = r''' module: serverless short_description: Manages a Serverless Framework project description: - - Provides support for managing Serverless Framework (https://serverless.com/) project deployments and stacks. + - Provides support for managing Serverless Framework (U(https://serverless.com/)) project deployments and stacks. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/sl_vm.py b/plugins/modules/sl_vm.py index ca925c345f..94055d1d22 100644 --- a/plugins/modules/sl_vm.py +++ b/plugins/modules/sl_vm.py @@ -15,6 +15,13 @@ short_description: Create or cancel a virtual instance in SoftLayer description: - Creates or cancels SoftLayer instances. - When created, optionally waits for it to be 'running'. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: instance_id: description: diff --git a/plugins/modules/ss_3par_cpg.py b/plugins/modules/ss_3par_cpg.py index f692ff3ecb..32c1cd443f 100644 --- a/plugins/modules/ss_3par_cpg.py +++ b/plugins/modules/ss_3par_cpg.py @@ -18,6 +18,11 @@ author: description: - Create and delete CPG on HPE 3PAR. module: ss_3par_cpg +attributes: + check_mode: + support: none + diff_mode: + support: none options: cpg_name: description: @@ -88,6 +93,7 @@ options: default: false extends_documentation_fragment: - community.general.hpe3par +- community.general.attributes ''' diff --git a/plugins/modules/vdo.py b/plugins/modules/vdo.py index d2d4afe944..f1ea40e2e4 100644 --- a/plugins/modules/vdo.py +++ b/plugins/modules/vdo.py @@ -24,6 +24,15 @@ description: provides inline block-level deduplication, compression, and thin provisioning capabilities to primary storage. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: none + diff_mode: + support: none + options: name: description: diff --git a/plugins/modules/vexata_eg.py b/plugins/modules/vexata_eg.py index f1d3960406..457d1fa9ed 100644 --- a/plugins/modules/vexata_eg.py +++ b/plugins/modules/vexata_eg.py @@ -20,6 +20,11 @@ description: through specific array ports. author: - Sandeep Kasargod (@vexata) +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: @@ -46,6 +51,7 @@ options: type: str extends_documentation_fragment: - community.general.vexata.vx100 +- community.general.attributes ''' diff --git a/plugins/modules/vexata_volume.py b/plugins/modules/vexata_volume.py index e443e5f6c4..7fdfc7e5fa 100644 --- a/plugins/modules/vexata_volume.py +++ b/plugins/modules/vexata_volume.py @@ -17,6 +17,11 @@ description: - Create, deletes or extend volumes on a Vexata VX100 array. author: - Sandeep Kasargod (@vexata) +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: @@ -35,6 +40,7 @@ options: type: str extends_documentation_fragment: - community.general.vexata.vx100 +- community.general.attributes ''' diff --git a/plugins/modules/wakeonlan.py b/plugins/modules/wakeonlan.py index bbdbcfdeff..6d7e094527 100644 --- a/plugins/modules/wakeonlan.py +++ b/plugins/modules/wakeonlan.py @@ -14,7 +14,14 @@ DOCUMENTATION = r''' module: wakeonlan short_description: Send a magic Wake-on-LAN (WoL) broadcast packet description: -- The C(wakeonlan) module sends magic Wake-on-LAN (WoL) broadcast packets. + - The C(wakeonlan) module sends magic Wake-on-LAN (WoL) broadcast packets. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: mac: description: diff --git a/plugins/modules/znode.py b/plugins/modules/znode.py index d9d05c3170..66f11465d6 100644 --- a/plugins/modules/znode.py +++ b/plugins/modules/znode.py @@ -14,6 +14,13 @@ module: znode short_description: Create, delete, retrieve, and update znodes using ZooKeeper description: - Create, delete, retrieve, and update znodes using ZooKeeper. +attributes: + check_mode: + support: none + diff_mode: + support: none +extends_documentation_fragment: + - community.general.attributes options: hosts: description: From b4a500103a4f617cfa0e92da6faf9d3d726b2f41 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:29:41 +0100 Subject: [PATCH 0467/2104] Add attributes to more modules (2/4) (#5966) Add attributes to more modules. --- plugins/modules/aerospike_migrations.py | 7 ++++++ plugins/modules/airbrake_deployment.py | 7 ++++++ plugins/modules/alerta_customer.py | 7 ++++++ plugins/modules/awall.py | 7 ++++++ plugins/modules/bearychat.py | 7 ++++++ plugins/modules/bigpanda.py | 7 ++++++ plugins/modules/capabilities.py | 7 ++++++ plugins/modules/catapult.py | 9 ++++++- plugins/modules/circonus_annotation.py | 7 ++++++ plugins/modules/cloudflare_dns.py | 7 ++++++ plugins/modules/django_manage.py | 7 ++++++ plugins/modules/dnsimple.py | 7 ++++++ plugins/modules/dnsmadeeasy.py | 7 ++++++ plugins/modules/ejabberd_user.py | 7 ++++++ plugins/modules/elasticsearch_plugin.py | 7 ++++++ plugins/modules/emc_vnx_sg_member.py | 8 ++++++- plugins/modules/facter.py | 7 ++++++ plugins/modules/flowdock.py | 9 ++++++- plugins/modules/gandi_livedns.py | 13 +++++++---- plugins/modules/grove.py | 7 ++++++ plugins/modules/gunicorn.py | 17 ++++++++++---- plugins/modules/haproxy.py | 9 ++++++- plugins/modules/htpasswd.py | 9 ++++++- plugins/modules/iso_create.py | 17 ++++++++++---- plugins/modules/iso_customize.py | 9 +++++++ plugins/modules/iso_extract.py | 31 +++++++++++++++---------- plugins/modules/jboss.py | 7 ++++++ plugins/modules/jira.py | 9 +++++++ plugins/modules/kibana_plugin.py | 7 ++++++ plugins/modules/lbu.py | 13 +++++++++-- plugins/modules/lldp.py | 7 ++++++ plugins/modules/logstash_plugin.py | 7 ++++++ 32 files changed, 261 insertions(+), 32 deletions(-) diff --git a/plugins/modules/aerospike_migrations.py b/plugins/modules/aerospike_migrations.py index 32ab06a853..1eee5b1a2f 100644 --- a/plugins/modules/aerospike_migrations.py +++ b/plugins/modules/aerospike_migrations.py @@ -19,6 +19,13 @@ description: - If waiting for migrations is not desired, simply just poll until port 3000 if available or asinfo -v status returns ok author: "Albert Autin (@Alb0t)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: host: description: diff --git a/plugins/modules/airbrake_deployment.py b/plugins/modules/airbrake_deployment.py index 2fb5b58737..42ac037e1e 100644 --- a/plugins/modules/airbrake_deployment.py +++ b/plugins/modules/airbrake_deployment.py @@ -18,6 +18,13 @@ author: short_description: Notify airbrake about app deployments description: - Notify airbrake about app deployments (see U(https://airbrake.io/docs/api/#deploys-v4)). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: project_id: description: diff --git a/plugins/modules/alerta_customer.py b/plugins/modules/alerta_customer.py index b9bfd4b265..120d989328 100644 --- a/plugins/modules/alerta_customer.py +++ b/plugins/modules/alerta_customer.py @@ -20,6 +20,13 @@ seealso: - name: API documentation description: Documentation for Alerta API link: https://docs.alerta.io/api/reference.html#customers +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: customer: description: diff --git a/plugins/modules/awall.py b/plugins/modules/awall.py index dc13d46789..856cf782d4 100644 --- a/plugins/modules/awall.py +++ b/plugins/modules/awall.py @@ -18,6 +18,13 @@ description: - This modules allows for enable/disable/activate of I(awall) policies. - Alpine Wall (I(awall)) generates a firewall configuration from the enabled policy files and activates the configuration on the system. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/bearychat.py b/plugins/modules/bearychat.py index 48d5c994fc..28f1f8fcd9 100644 --- a/plugins/modules/bearychat.py +++ b/plugins/modules/bearychat.py @@ -14,6 +14,13 @@ description: - The M(community.general.bearychat) module sends notifications to U(https://bearychat.com) via the Incoming Robot integration. author: "Jiangge Zhang (@tonyseek)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: url: type: str diff --git a/plugins/modules/bigpanda.py b/plugins/modules/bigpanda.py index 4e653aadb7..bab200bc44 100644 --- a/plugins/modules/bigpanda.py +++ b/plugins/modules/bigpanda.py @@ -15,6 +15,13 @@ author: "Hagai Kariti (@hkariti)" short_description: Notify BigPanda about deployments description: - Notify BigPanda when deployments start and end (successfully or not). Returns a deployment object containing all the parameters for future module calls. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: component: type: str diff --git a/plugins/modules/capabilities.py b/plugins/modules/capabilities.py index 9309958eca..9b72ac6ea1 100644 --- a/plugins/modules/capabilities.py +++ b/plugins/modules/capabilities.py @@ -14,6 +14,13 @@ module: capabilities short_description: Manage Linux capabilities description: - This module manipulates files privileges using the Linux capabilities(7) system. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: path: description: diff --git a/plugins/modules/catapult.py b/plugins/modules/catapult.py index 8b8c72974d..a3bbef6c42 100644 --- a/plugins/modules/catapult.py +++ b/plugins/modules/catapult.py @@ -16,7 +16,14 @@ DOCUMENTATION = ''' module: catapult short_description: Send a sms / mms using the catapult bandwidth api description: - - Allows notifications to be sent using sms / mms via the catapult bandwidth api. + - Allows notifications to be sent using sms / mms via the catapult bandwidth api. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: src: type: str diff --git a/plugins/modules/circonus_annotation.py b/plugins/modules/circonus_annotation.py index 661c854e6d..9376107761 100644 --- a/plugins/modules/circonus_annotation.py +++ b/plugins/modules/circonus_annotation.py @@ -20,6 +20,13 @@ requirements: - requests (either >= 2.0.0 for Python 3, or >= 1.0.0 for Python 2) notes: - Check mode isn't supported. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: type: str diff --git a/plugins/modules/cloudflare_dns.py b/plugins/modules/cloudflare_dns.py index 92132c0f6f..a0fa8a38b2 100644 --- a/plugins/modules/cloudflare_dns.py +++ b/plugins/modules/cloudflare_dns.py @@ -18,6 +18,13 @@ requirements: short_description: Manage Cloudflare DNS records description: - "Manages dns records via the Cloudflare API, see the docs: U(https://api.cloudflare.com/)." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_token: description: diff --git a/plugins/modules/django_manage.py b/plugins/modules/django_manage.py index 188ff2d3df..537cf0fa74 100644 --- a/plugins/modules/django_manage.py +++ b/plugins/modules/django_manage.py @@ -17,6 +17,13 @@ short_description: Manages a Django application description: - Manages a Django application using the C(manage.py) application frontend to C(django-admin). With the I(virtualenv) parameter, all management commands will be executed by the given C(virtualenv) installation. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: command: description: diff --git a/plugins/modules/dnsimple.py b/plugins/modules/dnsimple.py index ddd3ba0bab..df41f73a69 100644 --- a/plugins/modules/dnsimple.py +++ b/plugins/modules/dnsimple.py @@ -16,6 +16,13 @@ module: dnsimple short_description: Interface with dnsimple.com (a DNS hosting service) description: - "Manages domains and records via the DNSimple API, see the docs: U(http://developer.dnsimple.com/)." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: account_email: description: diff --git a/plugins/modules/dnsmadeeasy.py b/plugins/modules/dnsmadeeasy.py index b775f24ab0..44587ca39c 100644 --- a/plugins/modules/dnsmadeeasy.py +++ b/plugins/modules/dnsmadeeasy.py @@ -17,6 +17,13 @@ description: - > Manages DNS records via the v2 REST API of the DNS Made Easy service. It handles records only; there is no manipulation of domains or monitor/account support yet. See: U(https://www.dnsmadeeasy.com/integration/restapi/) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: account_key: description: diff --git a/plugins/modules/ejabberd_user.py b/plugins/modules/ejabberd_user.py index f7189fa08e..397207ae61 100644 --- a/plugins/modules/ejabberd_user.py +++ b/plugins/modules/ejabberd_user.py @@ -18,6 +18,13 @@ requirements: - ejabberd with mod_admin_extra description: - This module provides user management for ejabberd servers +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: username: type: str diff --git a/plugins/modules/elasticsearch_plugin.py b/plugins/modules/elasticsearch_plugin.py index a68ff086c3..cd4bb45de7 100644 --- a/plugins/modules/elasticsearch_plugin.py +++ b/plugins/modules/elasticsearch_plugin.py @@ -18,6 +18,13 @@ description: author: - Mathew Davies (@ThePixelDeveloper) - Sam Doran (@samdoran) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/emc_vnx_sg_member.py b/plugins/modules/emc_vnx_sg_member.py index 39c0ab3a99..487b6feefa 100644 --- a/plugins/modules/emc_vnx_sg_member.py +++ b/plugins/modules/emc_vnx_sg_member.py @@ -23,8 +23,14 @@ description: - "This module manages the members of an existing storage group." extends_documentation_fragment: -- community.general.emc.emc_vnx + - community.general.emc.emc_vnx + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: diff --git a/plugins/modules/facter.py b/plugins/modules/facter.py index be45e3ce14..e7cf52e203 100644 --- a/plugins/modules/facter.py +++ b/plugins/modules/facter.py @@ -16,6 +16,13 @@ description: - Runs the C(facter) discovery program (U(https://github.com/puppetlabs/facter)) on the remote system, returning JSON data that can be useful for inventory purposes. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: arguments: description: diff --git a/plugins/modules/flowdock.py b/plugins/modules/flowdock.py index 965ae62d7a..c78716ba40 100644 --- a/plugins/modules/flowdock.py +++ b/plugins/modules/flowdock.py @@ -15,7 +15,14 @@ module: flowdock author: "Matt Coddington (@mcodd)" short_description: Send a message to a flowdock description: - - Send a message to a flowdock team inbox or chat using the push API (see https://www.flowdock.com/api/team-inbox and https://www.flowdock.com/api/chat) + - Send a message to a flowdock team inbox or chat using the push API (see https://www.flowdock.com/api/team-inbox and https://www.flowdock.com/api/chat) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: type: str diff --git a/plugins/modules/gandi_livedns.py b/plugins/modules/gandi_livedns.py index 9566661f41..cc9dd630b4 100644 --- a/plugins/modules/gandi_livedns.py +++ b/plugins/modules/gandi_livedns.py @@ -12,11 +12,18 @@ DOCUMENTATION = r''' --- module: gandi_livedns author: -- Gregory Thiemonge (@gthiemonge) + - Gregory Thiemonge (@gthiemonge) version_added: "2.3.0" short_description: Manage Gandi LiveDNS records description: -- "Manages DNS records by the Gandi LiveDNS API, see the docs: U(https://doc.livedns.gandi.net/)." + - "Manages DNS records by the Gandi LiveDNS API, see the docs: U(https://doc.livedns.gandi.net/)." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: api_key: description: @@ -55,8 +62,6 @@ options: - The name of the Domain to work with (for example, "example.com"). required: true type: str -notes: -- Supports C(check_mode). ''' EXAMPLES = r''' diff --git a/plugins/modules/grove.py b/plugins/modules/grove.py index d3ad6bb019..b3e0508ffa 100644 --- a/plugins/modules/grove.py +++ b/plugins/modules/grove.py @@ -16,6 +16,13 @@ short_description: Sends a notification to a grove.io channel description: - The C(grove) module sends a message for a service to a Grove.io channel. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: channel_token: type: str diff --git a/plugins/modules/gunicorn.py b/plugins/modules/gunicorn.py index ff88cead7c..2b2abcf8e6 100644 --- a/plugins/modules/gunicorn.py +++ b/plugins/modules/gunicorn.py @@ -14,14 +14,21 @@ DOCUMENTATION = ''' module: gunicorn short_description: Run gunicorn with various settings description: - - Starts gunicorn with the parameters specified. Common settings for gunicorn - configuration are supported. For additional configuration use a config file - See U(https://gunicorn-docs.readthedocs.io/en/latest/settings.html) for more - options. It's recommended to always use the chdir option to avoid problems - with the location of the app. + - Starts gunicorn with the parameters specified. Common settings for gunicorn + configuration are supported. For additional configuration use a config file + See U(https://gunicorn-docs.readthedocs.io/en/latest/settings.html) for more + options. It's recommended to always use the chdir option to avoid problems + with the location of the app. requirements: [gunicorn] author: - "Alejandro Gomez (@agmezr)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: app: type: str diff --git a/plugins/modules/haproxy.py b/plugins/modules/haproxy.py index 38033bc81a..56f987d80f 100644 --- a/plugins/modules/haproxy.py +++ b/plugins/modules/haproxy.py @@ -13,7 +13,7 @@ DOCUMENTATION = r''' module: haproxy short_description: Enable, disable, and set weights for HAProxy backend servers using socket commands author: -- Ravi Bhure (@ravibhure) + - Ravi Bhure (@ravibhure) description: - Enable, disable, drain and set weights for HAProxy backend servers using socket commands. notes: @@ -23,6 +23,13 @@ notes: haproxy.cfg. See U(http://haproxy.1wt.eu/download/1.5/doc/configuration.txt). - Depends on netcat (C(nc)) being available; you need to install the appropriate package for your operating system before this module can be used. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: backend: description: diff --git a/plugins/modules/htpasswd.py b/plugins/modules/htpasswd.py index 231506984a..180b020733 100644 --- a/plugins/modules/htpasswd.py +++ b/plugins/modules/htpasswd.py @@ -15,6 +15,11 @@ short_description: Manage user files for basic authentication description: - Add and remove username/password entries in a password file using htpasswd. - This is used by web servers such as Apache and Nginx for basic authentication. +attributes: + check_mode: + support: full + diff_mode: + support: none options: path: type: path @@ -68,7 +73,9 @@ notes: - "On RHEL or CentOS: Enable EPEL, then install I(python-passlib)." requirements: [ passlib>=1.6 ] author: "Ansible Core Team" -extends_documentation_fragment: files +extends_documentation_fragment: + - files + - community.general.attributes ''' EXAMPLES = """ diff --git a/plugins/modules/iso_create.py b/plugins/modules/iso_create.py index c457f5a412..4b51be96d2 100644 --- a/plugins/modules/iso_create.py +++ b/plugins/modules/iso_create.py @@ -14,14 +14,23 @@ DOCUMENTATION = r''' module: iso_create short_description: Generate ISO file with specified files or folders description: - - This module is used to generate ISO file with specified path of files. + - This module is used to generate ISO file with specified path of files. author: - - Diane Wang (@Tomorrow9) + - Diane Wang (@Tomorrow9) requirements: -- "pycdlib" -- "python >= 2.7" + - "pycdlib" + - "python >= 2.7" version_added: '0.2.0' +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: src_files: description: diff --git a/plugins/modules/iso_customize.py b/plugins/modules/iso_customize.py index 4f902f47e4..9add080b11 100644 --- a/plugins/modules/iso_customize.py +++ b/plugins/modules/iso_customize.py @@ -23,6 +23,15 @@ requirements: - "python >= 2.7" version_added: '5.8.0' +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: src_iso: description: diff --git a/plugins/modules/iso_extract.py b/plugins/modules/iso_extract.py index 6693fc3884..599cbe4de5 100644 --- a/plugins/modules/iso_extract.py +++ b/plugins/modules/iso_extract.py @@ -14,22 +14,29 @@ __metaclass__ = type DOCUMENTATION = r''' --- author: -- Jeroen Hoekx (@jhoekx) -- Matt Robinson (@ribbons) -- Dag Wieers (@dagwieers) + - Jeroen Hoekx (@jhoekx) + - Matt Robinson (@ribbons) + - Dag Wieers (@dagwieers) module: iso_extract short_description: Extract files from an ISO image description: -- This module has two possible ways of operation. -- If 7zip is installed on the system, this module extracts files from an ISO - into a temporary directory and copies files to a given destination, - if needed. -- If the user has mount-capabilities (CAP_SYS_ADMIN on Linux) this module - mounts the ISO image to a temporary location, and copies files to a given - destination, if needed. + - This module has two possible ways of operation. + - If 7zip is installed on the system, this module extracts files from an ISO + into a temporary directory and copies files to a given destination, + if needed. + - If the user has mount-capabilities (CAP_SYS_ADMIN on Linux) this module + mounts the ISO image to a temporary location, and copies files to a given + destination, if needed. requirements: -- Either 7z (from C(7zip) or C(p7zip) package) -- Or mount capabilities (root-access, or CAP_SYS_ADMIN capability on Linux) + - Either 7z (from C(7zip) or C(p7zip) package) + - Or mount capabilities (root-access, or CAP_SYS_ADMIN capability on Linux) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: image: description: diff --git a/plugins/modules/jboss.py b/plugins/modules/jboss.py index 2dc82f5594..b389e7e662 100644 --- a/plugins/modules/jboss.py +++ b/plugins/modules/jboss.py @@ -14,6 +14,13 @@ module: jboss short_description: Deploy applications to JBoss description: - Deploy applications to JBoss standalone using the filesystem. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: deployment: required: true diff --git a/plugins/modules/jira.py b/plugins/modules/jira.py index 5e0a55119c..91aeb67037 100644 --- a/plugins/modules/jira.py +++ b/plugins/modules/jira.py @@ -20,6 +20,15 @@ short_description: Create and modify issues in a JIRA instance description: - Create and modify issues in a JIRA instance. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: none + diff_mode: + support: none + options: uri: type: str diff --git a/plugins/modules/kibana_plugin.py b/plugins/modules/kibana_plugin.py index 94838e22b6..a52eda2fdd 100644 --- a/plugins/modules/kibana_plugin.py +++ b/plugins/modules/kibana_plugin.py @@ -18,6 +18,13 @@ short_description: Manage Kibana plugins description: - This module can be used to manage Kibana plugins. author: Thierno IB. BARRY (@barryib) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/lbu.py b/plugins/modules/lbu.py index 86f01f62af..c961b6060d 100644 --- a/plugins/modules/lbu.py +++ b/plugins/modules/lbu.py @@ -17,7 +17,16 @@ short_description: Local Backup Utility for Alpine Linux version_added: '0.2.0' description: -- Manage Local Backup Utility of Alpine Linux in run-from-RAM mode + - Manage Local Backup Utility of Alpine Linux in run-from-RAM mode + +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none options: commit: @@ -36,7 +45,7 @@ options: elements: str author: -- Kaarle Ritvanen (@kunkku) + - Kaarle Ritvanen (@kunkku) ''' EXAMPLES = ''' diff --git a/plugins/modules/lldp.py b/plugins/modules/lldp.py index 3a050ae29e..fb608ff138 100644 --- a/plugins/modules/lldp.py +++ b/plugins/modules/lldp.py @@ -16,6 +16,13 @@ requirements: [ lldpctl ] short_description: Get details reported by lldp description: - Reads data out of lldpctl +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: {} author: "Andy Hill (@andyhky)" notes: diff --git a/plugins/modules/logstash_plugin.py b/plugins/modules/logstash_plugin.py index a4979646dd..7ee118ff28 100644 --- a/plugins/modules/logstash_plugin.py +++ b/plugins/modules/logstash_plugin.py @@ -15,6 +15,13 @@ short_description: Manage Logstash plugins description: - Manages Logstash plugins. author: Loic Blot (@nerzhul) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str From d03ae532edfd25dd8d7748323d08207a1d4b23c6 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:30:26 +0100 Subject: [PATCH 0468/2104] Add attributes to more modules (3/4) (#5967) Add attributes to more modules. --- plugins/modules/mas.py | 9 +++++++-- plugins/modules/maven_artifact.py | 8 +++++++- plugins/modules/monit.py | 7 +++++++ plugins/modules/mqtt.py | 9 ++++++++- plugins/modules/nagios.py | 7 +++++++ plugins/modules/newrelic_deployment.py | 7 +++++++ plugins/modules/nexmo.py | 8 +++++++- plugins/modules/nictagadm.py | 9 ++++++++- plugins/modules/nomad_job.py | 14 +++++++++----- plugins/modules/nosh.py | 7 +++++++ plugins/modules/nsupdate.py | 7 +++++++ plugins/modules/oci_vcn.py | 14 ++++++++++---- plugins/modules/office_365_connector_card.py | 7 +++++++ plugins/modules/pids.py | 7 +++++++ plugins/modules/pingdom.py | 7 +++++++ plugins/modules/redhat_subscription.py | 7 +++++++ plugins/modules/rhevm.py | 9 ++++++++- plugins/modules/rhn_channel.py | 10 ++++++++-- plugins/modules/rhn_register.py | 9 ++++++++- plugins/modules/rhsm_release.py | 7 +++++++ plugins/modules/rhsm_repository.py | 7 +++++++ plugins/modules/rollbar_deployment.py | 7 +++++++ plugins/modules/runit.py | 9 ++++++++- 23 files changed, 172 insertions(+), 20 deletions(-) diff --git a/plugins/modules/mas.py b/plugins/modules/mas.py index af77110da7..5b8958beb0 100644 --- a/plugins/modules/mas.py +++ b/plugins/modules/mas.py @@ -19,6 +19,13 @@ version_added: '0.2.0' author: - Michael Heap (@mheap) - Lukas Bestle (@lukasbestle) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: id: description: @@ -46,8 +53,6 @@ requirements: - macOS 10.11+ - "mas-cli (U(https://github.com/mas-cli/mas)) 1.5.0+ available as C(mas) in the bin path" - The Apple ID to use already needs to be signed in to the Mac App Store (check with C(mas account)). -notes: - - This module supports C(check_mode). ''' EXAMPLES = ''' diff --git a/plugins/modules/maven_artifact.py b/plugins/modules/maven_artifact.py index 754c2392ba..3f9defa529 100644 --- a/plugins/modules/maven_artifact.py +++ b/plugins/modules/maven_artifact.py @@ -23,6 +23,11 @@ author: "Chris Schmidt (@chrisisbeef)" requirements: - lxml - boto if using a S3 repository (s3://...) +attributes: + check_mode: + support: none + diff_mode: + support: none options: group_id: type: str @@ -166,7 +171,8 @@ options: description: - Filesystem permission mode applied recursively to I(dest) when it is a directory. extends_documentation_fragment: - - files + - ansible.builtin.files + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/monit.py b/plugins/modules/monit.py index 729b05b5d1..d2a1606789 100644 --- a/plugins/modules/monit.py +++ b/plugins/modules/monit.py @@ -15,6 +15,13 @@ module: monit short_description: Manage the state of a program monitored via Monit description: - Manage the state of a program monitored via I(Monit). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/mqtt.py b/plugins/modules/mqtt.py index fe6e7347fc..3893826491 100644 --- a/plugins/modules/mqtt.py +++ b/plugins/modules/mqtt.py @@ -14,7 +14,14 @@ DOCUMENTATION = ''' module: mqtt short_description: Publish a message on an MQTT topic for the IoT description: - - Publish a message on an MQTT topic. + - Publish a message on an MQTT topic. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server: type: str diff --git a/plugins/modules/nagios.py b/plugins/modules/nagios.py index ec526a3959..1831d04961 100644 --- a/plugins/modules/nagios.py +++ b/plugins/modules/nagios.py @@ -28,6 +28,13 @@ description: e.g., I(service=host). This keyword may not be given with other services at the same time. I(Setting alerts/downtime/acknowledge for a host does not affect alerts/downtime/acknowledge for any of the services running on it.) To schedule downtime for all services on particular host use keyword "all", e.g., I(service=all). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: action: description: diff --git a/plugins/modules/newrelic_deployment.py b/plugins/modules/newrelic_deployment.py index 91f49fbe65..ac9903b576 100644 --- a/plugins/modules/newrelic_deployment.py +++ b/plugins/modules/newrelic_deployment.py @@ -16,6 +16,13 @@ author: "Matt Coddington (@mcodd)" short_description: Notify New Relic about app deployments description: - Notify New Relic about app deployments (see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments/) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: type: str diff --git a/plugins/modules/nexmo.py b/plugins/modules/nexmo.py index d1e6b8d35c..7461c1cb97 100644 --- a/plugins/modules/nexmo.py +++ b/plugins/modules/nexmo.py @@ -15,6 +15,11 @@ short_description: Send a SMS via nexmo description: - Send a SMS message via nexmo author: "Matt Martz (@sivel)" +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: type: str @@ -50,7 +55,8 @@ options: type: bool default: true extends_documentation_fragment: - - url + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = """ diff --git a/plugins/modules/nictagadm.py b/plugins/modules/nictagadm.py index e70d93c8a1..074e09b4ac 100644 --- a/plugins/modules/nictagadm.py +++ b/plugins/modules/nictagadm.py @@ -15,7 +15,14 @@ short_description: Manage nic tags on SmartOS systems description: - Create or delete nic tags on SmartOS systems. author: -- Bruce Smith (@SmithX10) + - Bruce Smith (@SmithX10) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/nomad_job.py b/plugins/modules/nomad_job.py index 05e2556c1b..ca76536b46 100644 --- a/plugins/modules/nomad_job.py +++ b/plugins/modules/nomad_job.py @@ -15,13 +15,19 @@ author: FERREIRA Christophe (@chris93111) version_added: "1.3.0" short_description: Launch a Nomad Job description: - - Launch a Nomad job. - - Stop a Nomad job. - - Force start a Nomad job + - Launch a Nomad job. + - Stop a Nomad job. + - Force start a Nomad job requirements: - python-nomad extends_documentation_fragment: - community.general.nomad + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: @@ -51,8 +57,6 @@ options: choices: ["hcl", "json"] default: hcl type: str -notes: - - C(check_mode) is supported. seealso: - name: Nomad jobs documentation description: Complete documentation for Nomad API jobs. diff --git a/plugins/modules/nosh.py b/plugins/modules/nosh.py index 432990a4d2..2dfb8d5901 100644 --- a/plugins/modules/nosh.py +++ b/plugins/modules/nosh.py @@ -18,6 +18,13 @@ short_description: Manage services with nosh description: - Control running and enabled state for system-wide or user services. - BSD and Linux systems are supported. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/nsupdate.py b/plugins/modules/nsupdate.py index bc31521cdb..b2a84f76ba 100644 --- a/plugins/modules/nsupdate.py +++ b/plugins/modules/nsupdate.py @@ -24,6 +24,13 @@ description: requirements: - dnspython author: "Loic Blot (@nerzhul)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/oci_vcn.py b/plugins/modules/oci_vcn.py index 87568e1893..4e6487b8f6 100644 --- a/plugins/modules/oci_vcn.py +++ b/plugins/modules/oci_vcn.py @@ -16,6 +16,11 @@ description: - This module allows the user to create, delete and update virtual cloud networks(VCNs) in OCI. The complete Oracle Cloud Infrastructure Ansible Modules can be downloaded from U(https://github.com/oracle/oci-ansible-modules/releases). +attributes: + check_mode: + support: none + diff_mode: + support: none options: cidr_block: description: The CIDR IP address block of the VCN. Required when creating a VCN with I(state=present). @@ -48,10 +53,11 @@ options: aliases: [ 'id' ] author: "Rohit Chaware (@rohitChaware)" extends_documentation_fragment: -- community.general.oracle -- community.general.oracle_creatable_resource -- community.general.oracle_wait_options -- community.general.oracle_tags + - community.general.oracle + - community.general.oracle_creatable_resource + - community.general.oracle_wait_options + - community.general.oracle_tags + - community.general.attributes ''' diff --git a/plugins/modules/office_365_connector_card.py b/plugins/modules/office_365_connector_card.py index fc9a24aa57..eb774fded9 100644 --- a/plugins/modules/office_365_connector_card.py +++ b/plugins/modules/office_365_connector_card.py @@ -18,6 +18,13 @@ author: "Marc Sensenich (@marc-sensenich)" notes: - This module is not idempotent, therefore if the same task is run twice there will be two Connector Cards created +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: webhook: type: str diff --git a/plugins/modules/pids.py b/plugins/modules/pids.py index 2fe2a6b8ac..665adb1424 100644 --- a/plugins/modules/pids.py +++ b/plugins/modules/pids.py @@ -15,6 +15,13 @@ author: - Saranya Sridharan (@saranyasridharan) requirements: - psutil(python module) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: The name of the process(es) you want to get PID(s) for. diff --git a/plugins/modules/pingdom.py b/plugins/modules/pingdom.py index e9ee40eb96..bd4826a780 100644 --- a/plugins/modules/pingdom.py +++ b/plugins/modules/pingdom.py @@ -19,6 +19,13 @@ author: - "Justin Johns (!UNKNOWN)" requirements: - "This pingdom python library: https://github.com/mbabineau/pingdom-python" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index 2649092e8a..569b12d14d 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -25,6 +25,13 @@ notes: config file and default to None. requirements: - subscription-manager +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/rhevm.py b/plugins/modules/rhevm.py index 994f737093..c129a2df52 100644 --- a/plugins/modules/rhevm.py +++ b/plugins/modules/rhevm.py @@ -19,7 +19,14 @@ description: requirements: - ovirtsdk author: -- Timothy Vandenbrande (@TimothyVandenbrande) + - Timothy Vandenbrande (@TimothyVandenbrande) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: user: description: diff --git a/plugins/modules/rhn_channel.py b/plugins/modules/rhn_channel.py index 02fc30dad0..e544af51ea 100644 --- a/plugins/modules/rhn_channel.py +++ b/plugins/modules/rhn_channel.py @@ -15,10 +15,16 @@ short_description: Adds or removes Red Hat software channels description: - Adds or removes Red Hat software channels. author: -- Vincent Van der Kussen (@vincentvdk) + - Vincent Van der Kussen (@vincentvdk) notes: - This module fetches the system id from RHN. - - This module doesn't support I(check_mode). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/rhn_register.py b/plugins/modules/rhn_register.py index ba58c3345f..1fe9297d2b 100644 --- a/plugins/modules/rhn_register.py +++ b/plugins/modules/rhn_register.py @@ -15,13 +15,20 @@ short_description: Manage Red Hat Network registration using the C(rhnreg_ks) co description: - Manage registration to the Red Hat Network. author: -- James Laska (@jlaska) + - James Laska (@jlaska) notes: - This is for older Red Hat products. You probably want the M(community.general.redhat_subscription) module instead. - In order to register a system, C(rhnreg_ks) requires either a username and password, or an activationkey. requirements: - rhnreg_ks - either libxml2 or lxml +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/rhsm_release.py b/plugins/modules/rhsm_release.py index 698e64f995..8ad763a778 100644 --- a/plugins/modules/rhsm_release.py +++ b/plugins/modules/rhsm_release.py @@ -20,6 +20,13 @@ notes: prior to setting the RHSM release. requirements: - Red Hat Enterprise Linux 6+ with subscription-manager installed +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: release: description: diff --git a/plugins/modules/rhsm_repository.py b/plugins/modules/rhsm_repository.py index 2ff0cd4c96..0517582403 100644 --- a/plugins/modules/rhsm_repository.py +++ b/plugins/modules/rhsm_repository.py @@ -22,6 +22,13 @@ notes: requirements: - subscription-manager +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: description: diff --git a/plugins/modules/rollbar_deployment.py b/plugins/modules/rollbar_deployment.py index c899d60163..314e65bc6c 100644 --- a/plugins/modules/rollbar_deployment.py +++ b/plugins/modules/rollbar_deployment.py @@ -17,6 +17,13 @@ short_description: Notify Rollbar about app deployments description: - Notify Rollbar about app deployments (see https://rollbar.com/docs/deploys_other/) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: type: str diff --git a/plugins/modules/runit.py b/plugins/modules/runit.py index 7b60215300..7c5882af88 100644 --- a/plugins/modules/runit.py +++ b/plugins/modules/runit.py @@ -12,10 +12,17 @@ DOCUMENTATION = r''' --- module: runit author: -- James Sumners (@jsumners) + - James Sumners (@jsumners) short_description: Manage runit services description: - Controls runit services on remote hosts using the sv utility. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: From 4b262e39f0bc6c4bdce394b355dd72d33b352478 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:30:53 +0100 Subject: [PATCH 0469/2104] Add attributes to more modules (4/4) (#5968) * Add attributes to more modules. * Adjust indentation. Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com> --------- Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com> --- plugins/modules/solaris_zone.py | 9 ++++++++- plugins/modules/sorcery.py | 7 +++++++ plugins/modules/spotinst_aws_elastigroup.py | 7 +++++++ plugins/modules/stackdriver.py | 7 +++++++ plugins/modules/stacki_host.py | 7 +++++++ plugins/modules/statsd.py | 7 +++++++ plugins/modules/statusio_maintenance.py | 7 +++++++ plugins/modules/supervisorctl.py | 9 ++++++++- plugins/modules/svc.py | 7 +++++++ plugins/modules/swdepot.py | 7 +++++++ plugins/modules/swupd.py | 7 +++++++ plugins/modules/terraform.py | 11 +++++++++-- plugins/modules/uptimerobot.py | 7 +++++++ plugins/modules/urpmi.py | 7 +++++++ plugins/modules/vmadm.py | 7 +++++++ 15 files changed, 109 insertions(+), 4 deletions(-) diff --git a/plugins/modules/solaris_zone.py b/plugins/modules/solaris_zone.py index 5d07dbfc60..0f970704ef 100644 --- a/plugins/modules/solaris_zone.py +++ b/plugins/modules/solaris_zone.py @@ -16,9 +16,16 @@ description: - Create, start, stop and delete Solaris zones. - This module does not currently allow changing of options for a zone that is already been created. author: -- Paul Markham (@pmarkham) + - Paul Markham (@pmarkham) requirements: - Solaris 10 or 11 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/sorcery.py b/plugins/modules/sorcery.py index bd16da1f52..3278ce0abd 100644 --- a/plugins/modules/sorcery.py +++ b/plugins/modules/sorcery.py @@ -24,6 +24,13 @@ notes: yet supported. requirements: - bash +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/spotinst_aws_elastigroup.py b/plugins/modules/spotinst_aws_elastigroup.py index 481ba70cb9..02f2d3c5c2 100644 --- a/plugins/modules/spotinst_aws_elastigroup.py +++ b/plugins/modules/spotinst_aws_elastigroup.py @@ -21,6 +21,13 @@ description: requirements: - python >= 2.7 - spotinst_sdk >= 1.0.38 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: credentials_path: diff --git a/plugins/modules/stackdriver.py b/plugins/modules/stackdriver.py index 6fe2a7caa9..cf7cb2f475 100644 --- a/plugins/modules/stackdriver.py +++ b/plugins/modules/stackdriver.py @@ -15,6 +15,13 @@ short_description: Send code deploy and annotation events to stackdriver description: - Send code deploy and annotation events to Stackdriver author: "Ben Whaley (@bwhaley)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: key: type: str diff --git a/plugins/modules/stacki_host.py b/plugins/modules/stacki_host.py index d5f968c909..e286bc9617 100644 --- a/plugins/modules/stacki_host.py +++ b/plugins/modules/stacki_host.py @@ -15,6 +15,13 @@ short_description: Add or remove host to stacki front-end description: - Use this module to add or remove hosts to a stacki front-end via API. - Information on stacki can be found at U(https://github.com/StackIQ/stacki). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/statsd.py b/plugins/modules/statsd.py index aed1c08397..65d33b7099 100644 --- a/plugins/modules/statsd.py +++ b/plugins/modules/statsd.py @@ -19,6 +19,13 @@ description: author: "Mark Mercado (@mamercad)" requirements: - statsd +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/statusio_maintenance.py b/plugins/modules/statusio_maintenance.py index b884a943aa..31b422453e 100644 --- a/plugins/modules/statusio_maintenance.py +++ b/plugins/modules/statusio_maintenance.py @@ -21,6 +21,13 @@ notes: capture API traffic - Use start_date and start_time with minutes to set future maintenance window author: Benjamin Copeland (@bhcopeland) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: title: type: str diff --git a/plugins/modules/supervisorctl.py b/plugins/modules/supervisorctl.py index e108ebb81d..e9df16108a 100644 --- a/plugins/modules/supervisorctl.py +++ b/plugins/modules/supervisorctl.py @@ -14,7 +14,14 @@ DOCUMENTATION = ''' module: supervisorctl short_description: Manage the state of a program or group of programs running via supervisord description: - - Manage the state of a program or group of programs running via supervisord + - Manage the state of a program or group of programs running via supervisord +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/svc.py b/plugins/modules/svc.py index 4d92892ce3..bd2eaeb22e 100644 --- a/plugins/modules/svc.py +++ b/plugins/modules/svc.py @@ -16,6 +16,13 @@ author: short_description: Manage daemontools services description: - Controls daemontools services on remote hosts using the svc utility. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/swdepot.py b/plugins/modules/swdepot.py index 17d0157bb5..c4660c70d5 100644 --- a/plugins/modules/swdepot.py +++ b/plugins/modules/swdepot.py @@ -20,6 +20,13 @@ description: - Will install, upgrade and remove packages with swdepot package manager (HP-UX) notes: [] author: "Raul Melo (@melodous)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/swupd.py b/plugins/modules/swupd.py index a47dd667ae..efd7ca7c1f 100644 --- a/plugins/modules/swupd.py +++ b/plugins/modules/swupd.py @@ -18,6 +18,13 @@ description: - Manages updates and bundles with the swupd bundle manager, which is used by the Clear Linux Project for Intel Architecture. author: Alberto Murillo (@albertomurillo) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: contenturl: description: diff --git a/plugins/modules/terraform.py b/plugins/modules/terraform.py index 9d1cc2ed02..0247da68cf 100644 --- a/plugins/modules/terraform.py +++ b/plugins/modules/terraform.py @@ -13,8 +13,15 @@ DOCUMENTATION = r''' module: terraform short_description: Manages a Terraform deployment (and plans) description: - - Provides support for deploying resources with Terraform and pulling - resource information back into Ansible. + - Provides support for deploying resources with Terraform and pulling + resource information back into Ansible. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: choices: ['planned', 'present', 'absent'] diff --git a/plugins/modules/uptimerobot.py b/plugins/modules/uptimerobot.py index 527e59ac1f..c1894e90a0 100644 --- a/plugins/modules/uptimerobot.py +++ b/plugins/modules/uptimerobot.py @@ -17,6 +17,13 @@ description: author: "Nate Kingsley (@nate-kingsley)" requirements: - Valid Uptime Robot API Key +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/urpmi.py b/plugins/modules/urpmi.py index 7b1db9c415..34e099e4d5 100644 --- a/plugins/modules/urpmi.py +++ b/plugins/modules/urpmi.py @@ -17,6 +17,13 @@ module: urpmi short_description: Urpmi manager description: - Manages packages with I(urpmi) (such as for Mageia or Mandriva) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/vmadm.py b/plugins/modules/vmadm.py index d6110726f4..56ade17e49 100644 --- a/plugins/modules/vmadm.py +++ b/plugins/modules/vmadm.py @@ -16,6 +16,13 @@ short_description: Manage SmartOS virtual machines and zones description: - Manage SmartOS virtual machines through vmadm(1M). author: Jasper Lievisse Adriaanse (@jasperla) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: archive_on_delete: required: false From 867aee606e42ad52e8ea653d890397b033c8bf7d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 Feb 2023 17:49:31 +0100 Subject: [PATCH 0470/2104] Check mode has only been added for some _info and _facts modules in a bugfix (#5969) Check mode has only been added for some _info and _facts modules in a bugfix. --- plugins/modules/ali_instance_info.py | 5 +++++ plugins/modules/idrac_redfish_info.py | 4 ++++ plugins/modules/memset_memstore_info.py | 4 ++++ plugins/modules/memset_server_info.py | 4 ++++ plugins/modules/oneview_datacenter_info.py | 4 ++++ plugins/modules/oneview_enclosure_info.py | 4 ++++ plugins/modules/oneview_ethernet_network_info.py | 4 ++++ plugins/modules/oneview_fc_network_info.py | 4 ++++ plugins/modules/oneview_fcoe_network_info.py | 4 ++++ plugins/modules/oneview_logical_interconnect_group_info.py | 4 ++++ plugins/modules/oneview_network_set_info.py | 4 ++++ plugins/modules/oneview_san_manager_info.py | 4 ++++ plugins/modules/rax_facts.py | 4 ++++ plugins/modules/redfish_info.py | 4 ++++ plugins/modules/smartos_image_info.py | 4 ++++ plugins/modules/snmp_facts.py | 4 ++++ plugins/modules/utm_aaa_group_info.py | 4 ++++ plugins/modules/utm_ca_host_key_cert_info.py | 4 ++++ plugins/modules/utm_network_interface_address_info.py | 4 ++++ plugins/modules/utm_proxy_frontend_info.py | 4 ++++ plugins/modules/utm_proxy_location_info.py | 4 ++++ plugins/modules/xenserver_facts.py | 4 ++++ plugins/modules/xfconf_info.py | 4 ++++ 23 files changed, 93 insertions(+) diff --git a/plugins/modules/ali_instance_info.py b/plugins/modules/ali_instance_info.py index f489f96372..e7ec7f3956 100644 --- a/plugins/modules/ali_instance_info.py +++ b/plugins/modules/ali_instance_info.py @@ -33,6 +33,11 @@ description: The module must be called from within the ECS instance itself. - This module was called C(ali_instance_facts) before Ansible 2.9. The usage did not change. +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix + options: name_prefix: description: diff --git a/plugins/modules/idrac_redfish_info.py b/plugins/modules/idrac_redfish_info.py index cb44a75961..aece616641 100644 --- a/plugins/modules/idrac_redfish_info.py +++ b/plugins/modules/idrac_redfish_info.py @@ -21,6 +21,10 @@ description: extends_documentation_fragment: - community.general.attributes - community.general.attributes.info_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: category: required: true diff --git a/plugins/modules/memset_memstore_info.py b/plugins/modules/memset_memstore_info.py index 8ce3d5b05a..4ee7cfc2a5 100644 --- a/plugins/modules/memset_memstore_info.py +++ b/plugins/modules/memset_memstore_info.py @@ -22,6 +22,10 @@ description: extends_documentation_fragment: - community.general.attributes - community.general.attributes.info_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: api_key: required: true diff --git a/plugins/modules/memset_server_info.py b/plugins/modules/memset_server_info.py index 0c78f2bd1d..9023c0f8f0 100644 --- a/plugins/modules/memset_server_info.py +++ b/plugins/modules/memset_server_info.py @@ -22,6 +22,10 @@ description: extends_documentation_fragment: - community.general.attributes - community.general.attributes.info_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: api_key: required: true diff --git a/plugins/modules/oneview_datacenter_info.py b/plugins/modules/oneview_datacenter_info.py index 76e752f399..541f3d6694 100644 --- a/plugins/modules/oneview_datacenter_info.py +++ b/plugins/modules/oneview_datacenter_info.py @@ -22,6 +22,10 @@ author: - Madhav Bharadwaj (@madhav-bharadwaj) - Priyanka Sood (@soodpr) - Ricardo Galeno (@ricardogpsf) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: description: diff --git a/plugins/modules/oneview_enclosure_info.py b/plugins/modules/oneview_enclosure_info.py index dfef893542..3e593b7ae8 100644 --- a/plugins/modules/oneview_enclosure_info.py +++ b/plugins/modules/oneview_enclosure_info.py @@ -22,6 +22,10 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: description: diff --git a/plugins/modules/oneview_ethernet_network_info.py b/plugins/modules/oneview_ethernet_network_info.py index cb58575a3b..e107f3b479 100644 --- a/plugins/modules/oneview_ethernet_network_info.py +++ b/plugins/modules/oneview_ethernet_network_info.py @@ -21,6 +21,10 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: description: diff --git a/plugins/modules/oneview_fc_network_info.py b/plugins/modules/oneview_fc_network_info.py index 6927ba438c..d4044b08b7 100644 --- a/plugins/modules/oneview_fc_network_info.py +++ b/plugins/modules/oneview_fc_network_info.py @@ -21,6 +21,10 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: description: diff --git a/plugins/modules/oneview_fcoe_network_info.py b/plugins/modules/oneview_fcoe_network_info.py index 52bcb12c89..d9ee1b3798 100644 --- a/plugins/modules/oneview_fcoe_network_info.py +++ b/plugins/modules/oneview_fcoe_network_info.py @@ -21,6 +21,10 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: description: diff --git a/plugins/modules/oneview_logical_interconnect_group_info.py b/plugins/modules/oneview_logical_interconnect_group_info.py index 8d355cdaa0..0111bf2c11 100644 --- a/plugins/modules/oneview_logical_interconnect_group_info.py +++ b/plugins/modules/oneview_logical_interconnect_group_info.py @@ -22,6 +22,10 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: description: diff --git a/plugins/modules/oneview_network_set_info.py b/plugins/modules/oneview_network_set_info.py index 1c793dbfb5..d1a1f2913f 100644 --- a/plugins/modules/oneview_network_set_info.py +++ b/plugins/modules/oneview_network_set_info.py @@ -21,6 +21,10 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: description: diff --git a/plugins/modules/oneview_san_manager_info.py b/plugins/modules/oneview_san_manager_info.py index 87b3c0534f..9b00a6bb5d 100644 --- a/plugins/modules/oneview_san_manager_info.py +++ b/plugins/modules/oneview_san_manager_info.py @@ -21,6 +21,10 @@ author: - Felipe Bulsoni (@fgbulsoni) - Thiago Miotto (@tmiotto) - Adriane Cardozo (@adriane-cardozo) +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: provider_display_name: description: diff --git a/plugins/modules/rax_facts.py b/plugins/modules/rax_facts.py index 53657f3c9a..f8bb0e0506 100644 --- a/plugins/modules/rax_facts.py +++ b/plugins/modules/rax_facts.py @@ -14,6 +14,10 @@ module: rax_facts short_description: Gather facts for Rackspace Cloud Servers description: - Gather facts for Rackspace Cloud Servers. +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: address: type: str diff --git a/plugins/modules/redfish_info.py b/plugins/modules/redfish_info.py index e6df4813ad..32e8766481 100644 --- a/plugins/modules/redfish_info.py +++ b/plugins/modules/redfish_info.py @@ -21,6 +21,10 @@ description: extends_documentation_fragment: - community.general.attributes - community.general.attributes.info_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: category: required: false diff --git a/plugins/modules/smartos_image_info.py b/plugins/modules/smartos_image_info.py index 37267d115a..e93ffb9ac1 100644 --- a/plugins/modules/smartos_image_info.py +++ b/plugins/modules/smartos_image_info.py @@ -21,6 +21,10 @@ author: Adam Števko (@xen0l) extends_documentation_fragment: - community.general.attributes - community.general.attributes.info_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: filters: description: diff --git a/plugins/modules/snmp_facts.py b/plugins/modules/snmp_facts.py index 0242bc6dde..e54473ffaf 100644 --- a/plugins/modules/snmp_facts.py +++ b/plugins/modules/snmp_facts.py @@ -24,6 +24,10 @@ extends_documentation_fragment: - community.general.attributes - community.general.attributes.facts - community.general.attributes.facts_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: host: description: diff --git a/plugins/modules/utm_aaa_group_info.py b/plugins/modules/utm_aaa_group_info.py index 8798fda7f3..37e01c736c 100644 --- a/plugins/modules/utm_aaa_group_info.py +++ b/plugins/modules/utm_aaa_group_info.py @@ -22,6 +22,10 @@ short_description: Get info for reverse_proxy frontend entry in Sophos UTM description: - get info for a reverse_proxy frontend entry in SOPHOS UTM. +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: diff --git a/plugins/modules/utm_ca_host_key_cert_info.py b/plugins/modules/utm_ca_host_key_cert_info.py index e5de74cd4c..d81eede69f 100644 --- a/plugins/modules/utm_ca_host_key_cert_info.py +++ b/plugins/modules/utm_ca_host_key_cert_info.py @@ -21,6 +21,10 @@ short_description: Get info for a ca host_key_cert entry in Sophos UTM description: - Get info for a ca host_key_cert entry in SOPHOS UTM. +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: diff --git a/plugins/modules/utm_network_interface_address_info.py b/plugins/modules/utm_network_interface_address_info.py index 736ea501ef..9dc08ad094 100644 --- a/plugins/modules/utm_network_interface_address_info.py +++ b/plugins/modules/utm_network_interface_address_info.py @@ -20,6 +20,10 @@ short_description: Get info for a network/interface_address object description: - Get info for a network/interface_address object in SOPHOS UTM. +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: diff --git a/plugins/modules/utm_proxy_frontend_info.py b/plugins/modules/utm_proxy_frontend_info.py index 65faecfbc8..0435ef9494 100644 --- a/plugins/modules/utm_proxy_frontend_info.py +++ b/plugins/modules/utm_proxy_frontend_info.py @@ -22,6 +22,10 @@ description: - Create, update or destroy a reverse_proxy frontend entry in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: diff --git a/plugins/modules/utm_proxy_location_info.py b/plugins/modules/utm_proxy_location_info.py index 4b502df296..58a32107bd 100644 --- a/plugins/modules/utm_proxy_location_info.py +++ b/plugins/modules/utm_proxy_location_info.py @@ -22,6 +22,10 @@ description: - Create, update or destroy a reverse_proxy location entry in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: name: diff --git a/plugins/modules/xenserver_facts.py b/plugins/modules/xenserver_facts.py index 59c457c7f7..9924c4a9e8 100644 --- a/plugins/modules/xenserver_facts.py +++ b/plugins/modules/xenserver_facts.py @@ -23,6 +23,10 @@ extends_documentation_fragment: - community.general.attributes - community.general.attributes.facts - community.general.attributes.facts_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: {} ''' diff --git a/plugins/modules/xfconf_info.py b/plugins/modules/xfconf_info.py index 149325ebac..0a99201ef9 100644 --- a/plugins/modules/xfconf_info.py +++ b/plugins/modules/xfconf_info.py @@ -18,6 +18,10 @@ description: extends_documentation_fragment: - community.general.attributes - community.general.attributes.info_module +attributes: + check_mode: + version_added: 3.3.0 + # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix options: channel: description: From 7e3c73ceb274ab8c0682a302423781e6b2cbb4de Mon Sep 17 00:00:00 2001 From: Prawn Date: Wed, 22 Feb 2023 14:41:46 +0100 Subject: [PATCH 0471/2104] `lxd_container`: add check- and diff-mode support (#5866) * lxd_container module: Automate CONFIG_PARAM handling. Signed-off-by: InsanePrawn * lxd_container: check- and diff mode Signed-off-by: InsanePrawn * Make JSON lookups safer and fix crashes in check mode when instance is absent * lxd_profile: fix docstring typos * lxd_container: simplify _needs_to_change_instance_config() * lxd_container: add docstring for check- and diff-mode and changelog fragment * style fixes * lxd_container: fix typo in actions: "unfreez" lacks an "e" --------- Signed-off-by: InsanePrawn --- ...5866-lxd_container-diff-and-check-mode.yml | 2 + plugins/modules/lxd_container.py | 145 ++++++++++-------- plugins/modules/lxd_profile.py | 4 +- 3 files changed, 87 insertions(+), 64 deletions(-) create mode 100644 changelogs/fragments/5866-lxd_container-diff-and-check-mode.yml diff --git a/changelogs/fragments/5866-lxd_container-diff-and-check-mode.yml b/changelogs/fragments/5866-lxd_container-diff-and-check-mode.yml new file mode 100644 index 0000000000..eb337cd42a --- /dev/null +++ b/changelogs/fragments/5866-lxd_container-diff-and-check-mode.yml @@ -0,0 +1,2 @@ +minor_changes: + - lxd_container - add diff and check mode (https://github.com/ansible-collections/community.general/pull/5866). diff --git a/plugins/modules/lxd_container.py b/plugins/modules/lxd_container.py index 30dc855617..00649a076f 100644 --- a/plugins/modules/lxd_container.py +++ b/plugins/modules/lxd_container.py @@ -16,6 +16,15 @@ short_description: Manage LXD instances description: - Management of LXD containers and virtual machines. author: "Hiroaki Nakamura (@hnakamur)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + version_added: 6.4.0 + diff_mode: + support: full + version_added: 6.4.0 options: name: description: @@ -396,6 +405,7 @@ actions: type: list sample: ["create", "start"] ''' +import copy import datetime import os import time @@ -411,7 +421,7 @@ LXD_ANSIBLE_STATES = { 'stopped': '_stopped', 'restarted': '_restarted', 'absent': '_destroyed', - 'frozen': '_frozen' + 'frozen': '_frozen', } # ANSIBLE_LXD_STATES is a map of states of lxd containers to the Ansible @@ -430,6 +440,10 @@ CONFIG_PARAMS = [ 'architecture', 'config', 'devices', 'ephemeral', 'profiles', 'source' ] +# CONFIG_CREATION_PARAMS is a list of attribute names that are only applied +# on instance creation. +CONFIG_CREATION_PARAMS = ['source'] + class LXDContainerManagement(object): def __init__(self, module): @@ -488,6 +502,9 @@ class LXDContainerManagement(object): self.module.fail_json(msg=e.msg) self.trust_password = self.module.params.get('trust_password', None) self.actions = [] + self.diff = {'before': {}, 'after': {}} + self.old_instance_json = {} + self.old_sections = {} def _build_config(self): self.config = {} @@ -521,7 +538,8 @@ class LXDContainerManagement(object): body_json = {'action': action, 'timeout': self.timeout} if force_stop: body_json['force'] = True - return self.client.do('PUT', url, body_json=body_json) + if not self.module.check_mode: + return self.client.do('PUT', url, body_json=body_json) def _create_instance(self): url = self.api_endpoint @@ -534,7 +552,8 @@ class LXDContainerManagement(object): url = '{0}?{1}'.format(url, urlencode(url_params)) config = self.config.copy() config['name'] = self.name - self.client.do('POST', url, config, wait_for_container=self.wait_for_container) + if not self.module.check_mode: + self.client.do('POST', url, config, wait_for_container=self.wait_for_container) self.actions.append('create') def _start_instance(self): @@ -553,7 +572,8 @@ class LXDContainerManagement(object): url = '{0}/{1}'.format(self.api_endpoint, self.name) if self.project: url = '{0}?{1}'.format(url, urlencode(dict(project=self.project))) - self.client.do('DELETE', url) + if not self.module.check_mode: + self.client.do('DELETE', url) self.actions.append('delete') def _freeze_instance(self): @@ -562,15 +582,13 @@ class LXDContainerManagement(object): def _unfreeze_instance(self): self._change_state('unfreeze') - self.actions.append('unfreez') + self.actions.append('unfreeze') def _instance_ipv4_addresses(self, ignore_devices=None): ignore_devices = ['lo'] if ignore_devices is None else ignore_devices - - resp_json = self._get_instance_state_json() - network = resp_json['metadata']['network'] or {} - network = dict((k, v) for k, v in network.items() if k not in ignore_devices) or {} - addresses = dict((k, [a['address'] for a in v['addresses'] if a['family'] == 'inet']) for k, v in network.items()) or {} + data = (self._get_instance_state_json() or {}).get('metadata', None) or {} + network = dict((k, v) for k, v in (data.get('network', None) or {}).items() if k not in ignore_devices) + addresses = dict((k, [a['address'] for a in v['addresses'] if a['family'] == 'inet']) for k, v in network.items()) return addresses @staticmethod @@ -583,7 +601,7 @@ class LXDContainerManagement(object): while datetime.datetime.now() < due: time.sleep(1) addresses = self._instance_ipv4_addresses() - if self._has_all_ipv4_addresses(addresses): + if self._has_all_ipv4_addresses(addresses) or self.module.check_mode: self.addresses = addresses return except LXDClientException as e: @@ -656,16 +674,10 @@ class LXDContainerManagement(object): def _needs_to_change_instance_config(self, key): if key not in self.config: return False - if key == 'config' and self.ignore_volatile_options: # the old behavior is to ignore configurations by keyword "volatile" - old_configs = dict((k, v) for k, v in self.old_instance_json['metadata'][key].items() if not k.startswith('volatile.')) - for k, v in self.config['config'].items(): - if k not in old_configs: - return True - if old_configs[k] != v: - return True - return False - elif key == 'config': # next default behavior - old_configs = dict((k, v) for k, v in self.old_instance_json['metadata'][key].items()) + + if key == 'config': + # self.old_sections is already filtered for volatile keys if necessary + old_configs = dict(self.old_sections.get(key, None) or {}) for k, v in self.config['config'].items(): if k not in old_configs: return True @@ -673,43 +685,35 @@ class LXDContainerManagement(object): return True return False else: - old_configs = self.old_instance_json['metadata'][key] + old_configs = self.old_sections.get(key, {}) return self.config[key] != old_configs def _needs_to_apply_instance_configs(self): - return ( - self._needs_to_change_instance_config('architecture') or - self._needs_to_change_instance_config('config') or - self._needs_to_change_instance_config('ephemeral') or - self._needs_to_change_instance_config('devices') or - self._needs_to_change_instance_config('profiles') - ) + for param in set(CONFIG_PARAMS) - set(CONFIG_CREATION_PARAMS): + if self._needs_to_change_instance_config(param): + return True + return False def _apply_instance_configs(self): - old_metadata = self.old_instance_json['metadata'] - body_json = { - 'architecture': old_metadata['architecture'], - 'config': old_metadata['config'], - 'devices': old_metadata['devices'], - 'profiles': old_metadata['profiles'] - } - - if self._needs_to_change_instance_config('architecture'): - body_json['architecture'] = self.config['architecture'] - if self._needs_to_change_instance_config('config'): - for k, v in self.config['config'].items(): - body_json['config'][k] = v - if self._needs_to_change_instance_config('ephemeral'): - body_json['ephemeral'] = self.config['ephemeral'] - if self._needs_to_change_instance_config('devices'): - body_json['devices'] = self.config['devices'] - if self._needs_to_change_instance_config('profiles'): - body_json['profiles'] = self.config['profiles'] + old_metadata = copy.deepcopy(self.old_instance_json).get('metadata', None) or {} + body_json = {} + for param in set(CONFIG_PARAMS) - set(CONFIG_CREATION_PARAMS): + if param in old_metadata: + body_json[param] = old_metadata[param] + if self._needs_to_change_instance_config(param): + if param == 'config': + body_json['config'] = body_json.get('config', None) or {} + for k, v in self.config['config'].items(): + body_json['config'][k] = v + else: + body_json[param] = self.config[param] + self.diff['after']['instance'] = body_json url = '{0}/{1}'.format(self.api_endpoint, self.name) if self.project: url = '{0}?{1}'.format(url, urlencode(dict(project=self.project))) - self.client.do('PUT', url, body_json=body_json) + if not self.module.check_mode: + self.client.do('PUT', url, body_json=body_json) self.actions.append('apply_instance_configs') def run(self): @@ -721,7 +725,22 @@ class LXDContainerManagement(object): self.ignore_volatile_options = self.module.params.get('ignore_volatile_options') self.old_instance_json = self._get_instance_json() + self.old_sections = dict( + (section, content) if not isinstance(content, dict) + else (section, dict((k, v) for k, v in content.items() + if not (self.ignore_volatile_options and k.startswith('volatile.')))) + for section, content in (self.old_instance_json.get('metadata', None) or {}).items() + if section in set(CONFIG_PARAMS) - set(CONFIG_CREATION_PARAMS) + ) + + self.diff['before']['instance'] = self.old_sections + # preliminary, will be overwritten in _apply_instance_configs() if called + self.diff['after']['instance'] = self.config + self.old_state = self._instance_json_to_module_state(self.old_instance_json) + self.diff['before']['state'] = self.old_state + self.diff['after']['state'] = self.state + action = getattr(self, LXD_ANSIBLE_STATES[self.state]) action() @@ -730,7 +749,8 @@ class LXDContainerManagement(object): 'log_verbosity': self.module._verbosity, 'changed': state_changed, 'old_state': self.old_state, - 'actions': self.actions + 'actions': self.actions, + 'diff': self.diff, } if self.client.debug: result_json['logs'] = self.client.logs @@ -742,7 +762,8 @@ class LXDContainerManagement(object): fail_params = { 'msg': e.msg, 'changed': state_changed, - 'actions': self.actions + 'actions': self.actions, + 'diff': self.diff, } if self.client.debug: fail_params['logs'] = e.kwargs['logs'] @@ -756,7 +777,7 @@ def main(): argument_spec=dict( name=dict( type='str', - required=True + required=True, ), project=dict( type='str', @@ -786,7 +807,7 @@ def main(): ), state=dict( choices=list(LXD_ANSIBLE_STATES.keys()), - default='started' + default='started', ), target=dict( type='str', @@ -802,35 +823,35 @@ def main(): ), wait_for_container=dict( type='bool', - default=False + default=False, ), wait_for_ipv4_addresses=dict( type='bool', - default=False + default=False, ), force_stop=dict( type='bool', - default=False + default=False, ), url=dict( type='str', - default=ANSIBLE_LXD_DEFAULT_URL + default=ANSIBLE_LXD_DEFAULT_URL, ), snap_url=dict( type='str', - default='unix:/var/snap/lxd/common/lxd/unix.socket' + default='unix:/var/snap/lxd/common/lxd/unix.socket', ), client_key=dict( type='path', - aliases=['key_file'] + aliases=['key_file'], ), client_cert=dict( type='path', - aliases=['cert_file'] + aliases=['cert_file'], ), - trust_password=dict(type='str', no_log=True) + trust_password=dict(type='str', no_log=True), ), - supports_check_mode=False, + supports_check_mode=True, ) lxd_manage = LXDContainerManagement(module=module) diff --git a/plugins/modules/lxd_profile.py b/plugins/modules/lxd_profile.py index 3d1b28b8fc..1410d16e02 100644 --- a/plugins/modules/lxd_profile.py +++ b/plugins/modules/lxd_profile.py @@ -35,7 +35,7 @@ options: type: str config: description: - - 'The config for the container (e.g. {"limits.memory": "4GB"}). + - 'The config for the instance (e.g. {"limits.memory": "4GB"}). See U(https://github.com/lxc/lxd/blob/master/doc/rest-api.md#patch-3)' - If the profile already exists and its "config" value in metadata obtained from @@ -247,7 +247,7 @@ CONFIG_PARAMS = [ class LXDProfileManagement(object): def __init__(self, module): - """Management of LXC containers via Ansible. + """Management of LXC profiles via Ansible. :param module: Processed Ansible Module. :type module: ``object`` From cb7a970f6f3cdd77f867f54a135140399f206467 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Feb 2023 14:46:01 +0100 Subject: [PATCH 0472/2104] Add attributes for modules with action plugin (#5951) Add attributes for modules with action plugin. --- plugins/modules/iptables_state.py | 13 ++++++++++++- plugins/modules/shutdown.py | 14 +++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/plugins/modules/iptables_state.py b/plugins/modules/iptables_state.py index 17f8d9eb70..d0ea7ad798 100644 --- a/plugins/modules/iptables_state.py +++ b/plugins/modules/iptables_state.py @@ -15,6 +15,9 @@ module: iptables_state short_description: Save iptables state into a file or restore it from a file version_added: '1.1.0' author: quidame (@quidame) +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.flow description: - C(iptables) is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. @@ -36,7 +39,15 @@ notes: still happen if it shall happen, but you will experience a connection timeout instead of more relevant info returned by the module after its failure. - - This module supports I(check_mode). +attributes: + check_mode: + support: full + diff_mode: + support: none + action: + support: full + async: + support: full options: counters: description: diff --git a/plugins/modules/shutdown.py b/plugins/modules/shutdown.py index cc4108c8a7..5d66fad16b 100644 --- a/plugins/modules/shutdown.py +++ b/plugins/modules/shutdown.py @@ -15,8 +15,20 @@ notes: - C(PATH) is ignored on the remote node when searching for the C(shutdown) command. Use I(search_paths) to specify locations to search if the default paths do not work. description: - - Shut downs a machine. + - Shut downs a machine. version_added: "1.1.0" +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.flow +attributes: + check_mode: + support: full + diff_mode: + support: none + action: + support: full + async: + support: full options: delay: description: From 78297e44b74992c2108b6ffbb9b0b37e0d708c79 Mon Sep 17 00:00:00 2001 From: Claude Dioudonnat Date: Wed, 22 Feb 2023 15:14:33 +0100 Subject: [PATCH 0473/2104] Fix keycloak sanitize_cr (#5934) * Fix keycloak sanitize_cr * Update changelogs/fragments/5934-fix-keycloak-sanitize_cr.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Claude Dioudonnat Co-authored-by: Felix Fontein --- changelogs/fragments/5934-fix-keycloak-sanitize_cr.yml | 2 ++ plugins/modules/keycloak_client.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5934-fix-keycloak-sanitize_cr.yml diff --git a/changelogs/fragments/5934-fix-keycloak-sanitize_cr.yml b/changelogs/fragments/5934-fix-keycloak-sanitize_cr.yml new file mode 100644 index 0000000000..1c3163023c --- /dev/null +++ b/changelogs/fragments/5934-fix-keycloak-sanitize_cr.yml @@ -0,0 +1,2 @@ +bugfixes: + - "keycloak_client - fix accidental replacement of value for attribute ``saml.signing.private.key`` with ``no_log`` in wrong contexts (https://github.com/ansible-collections/community.general/pull/5934)." \ No newline at end of file diff --git a/plugins/modules/keycloak_client.py b/plugins/modules/keycloak_client.py index 22ba6a810a..51e516221b 100644 --- a/plugins/modules/keycloak_client.py +++ b/plugins/modules/keycloak_client.py @@ -712,6 +712,7 @@ end_state: from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ keycloak_argument_spec, get_token, KeycloakError from ansible.module_utils.basic import AnsibleModule +import copy def normalise_cr(clientrep, remove_ids=False): @@ -750,7 +751,7 @@ def sanitize_cr(clientrep): :param clientrep: the clientrep dict to be sanitized :return: sanitized clientrep dict """ - result = clientrep.copy() + result = copy.deepcopy(clientrep) if 'secret' in result: result['secret'] = 'no_log' if 'attributes' in result: From 5648e0e2aff5ac1c677dc9047c332498d595dc45 Mon Sep 17 00:00:00 2001 From: Glenn Marcy Date: Wed, 22 Feb 2023 09:23:50 -0500 Subject: [PATCH 0474/2104] onepassword: ignore errors from "op account get" (#5942) * ignore errors from "op account get" * add changelog fragment * Update changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- .../5942-onepassword-ignore-errors-from-op-account-get.yml | 2 ++ plugins/lookup/onepassword.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml diff --git a/changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml b/changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml new file mode 100644 index 0000000000..e6b774dd35 --- /dev/null +++ b/changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml @@ -0,0 +1,2 @@ +bugfixes: +- onepassword lookup plugin - Changed to ignore errors from "op account get" calls. Previously, errors would prevent auto-signin code from executing (https://github.com/ansible-collections/community.general/pull/5942). diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index 5e9549c2b7..0e78e4b1a0 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -488,7 +488,7 @@ class OnePassCLIv2(OnePassCLIBase): account = "{subdomain}.{domain}".format(subdomain=self.subdomain, domain=self.domain) args.extend(["--account", account]) - rc, out, err = self._run(args) + rc, out, err = self._run(args, ignore_errors=True) return not bool(rc) From e348d28559449adbb69f8008b8d4c8447f471fb1 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Feb 2023 17:18:58 +0100 Subject: [PATCH 0475/2104] Re-enable Arch Linux tests (#6031) Revert "Disable Arch Linux tests for now (#6013)" This reverts commit 1b2c2af9a87b7cf364529108e95696c4d966058f. --- .azure-pipelines/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index ddf43bf9b0..3816369497 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -401,8 +401,8 @@ stages: targets: - name: Debian Bullseye test: debian-bullseye/3.9 - #- name: ArchLinux - # test: archlinux/3.10 + - name: ArchLinux + test: archlinux/3.10 - name: CentOS Stream 8 test: centos-stream8/3.9 groups: From a7e8e95b506c2b0beac404781080687fc4369ef6 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 22 Feb 2023 23:01:01 +0100 Subject: [PATCH 0476/2104] onepassword lookup: fix unit tests (#6041) Fix unit tests. --- .../lookup/onepassword/test_onepassword_cli_v2.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py index d1a5eac5d3..f9c3e48ab6 100644 --- a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py +++ b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py @@ -12,19 +12,19 @@ from ansible_collections.community.general.plugins.lookup.onepassword import One @pytest.mark.parametrize( - ("args", "out", "expected_call_args", "expected"), + ("args", "out", "expected_call_args", "expected_call_kwargs", "expected"), ( - ([], "list of accounts", ["account", "get"], True,), - (["acme"], "list of accounts", ["account", "get", "--account", "acme.1password.com"], True,), - ([], "", ["account", "list"], False,), + ([], "list of accounts", ["account", "get"], {"ignore_errors": True}, True,), + (["acme"], "list of accounts", ["account", "get", "--account", "acme.1password.com"], {"ignore_errors": True}, True,), + ([], "", ["account", "list"], {}, False,), ) ) -def test_assert_logged_in(mocker, args, out, expected_call_args, expected): +def test_assert_logged_in(mocker, args, out, expected_call_args, expected_call_kwargs, expected): mocker.patch.object(OnePassCLIv2, "_run", return_value=[0, out, ""]) op_cli = OnePassCLIv2(*args) result = op_cli.assert_logged_in() - op_cli._run.assert_called_with(expected_call_args) + op_cli._run.assert_called_with(expected_call_args, **expected_call_kwargs) assert result == expected From c168f9c3bee5153a6a09e30b2462c85a166f6a90 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 23 Feb 2023 07:54:38 -0800 Subject: [PATCH 0477/2104] JC: Add plugin parser functionality to JC Filter Plugin (#6043) * Add plugin parser functionality to JC Filter Plugin The parse function was added in jc v1.18.0 which allows plugin parsers to be used. This change will try the new API if available, else fallback to the old API so there is no change in behavior. * remove whitespace from blank line * Add changelog fragment for JC plugin parser support * add .yml extension to file name * Formatting * add period at end --- changelogs/fragments/6043-jc_plugin_parser_support.yml | 2 ++ plugins/filter/jc.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/6043-jc_plugin_parser_support.yml diff --git a/changelogs/fragments/6043-jc_plugin_parser_support.yml b/changelogs/fragments/6043-jc_plugin_parser_support.yml new file mode 100644 index 0000000000..3684f32fe4 --- /dev/null +++ b/changelogs/fragments/6043-jc_plugin_parser_support.yml @@ -0,0 +1,2 @@ +minor_changes: + - jc filter plugin - added the ability to use parser plugins (https://github.com/ansible-collections/community.general/pull/6043). diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index 742d4147a1..3aa8d20a5f 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -138,8 +138,14 @@ def jc_filter(data, parser, quiet=True, raw=False): raise AnsibleError('You need to install "jc" as a Python library on the Ansible controller prior to running jc filter') try: - jc_parser = importlib.import_module('jc.parsers.' + parser) - return jc_parser.parse(data, quiet=quiet, raw=raw) + # new API (jc v1.18.0 and higher) allows use of plugin parsers + if hasattr(jc, 'parse'): + return jc.parse(parser, data, quiet=quiet, raw=raw) + + # old API (jc v1.17.7 and lower) + else: + jc_parser = importlib.import_module('jc.parsers.' + parser) + return jc_parser.parse(data, quiet=quiet, raw=raw) except Exception as e: raise AnsibleFilterError('Error in jc filter plugin: %s' % e) From 490899f87faee52e3f300533f6ae9a2c150103e6 Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Fri, 24 Feb 2023 03:10:41 -0500 Subject: [PATCH 0478/2104] nmcli: two fixes needed to make wifi.wake-on-wlan settings work properly (#5431) * nmcli: Convert current value of wifi.wake-on-wlan before comparing The new value of wifi.wake-on-wlan is specified as an integer, but in the nmcli output it's specified as a hex string followed by a textual description of it. Therefore, to determine properly whether it's being changed we need to pull the hex string out of the current value, convert it into an integer, and finally convert the integer back to a string so that we can compare it to the new specified value. Without this change, whenever wifi.wake-on-wlan is specified in the module arguments the module will think the value is being changed even when it isn't. * nmcli: Handle wifi options correctly when connection type not specified When an nmcli task does not specify the connection type and the module ask nmcli for it, the module needs to convert nmcli's `802-11-wireless` to `wifi`, the term for this connection type used by the module. * nmcli: Correctly detect values changed to the integer 0 If the user specifies a value of 0 (without quotes) in a task, we should interpret that as an actual value, not empty, when comparing the new value to the old one. Otherwise we incorrectly conclude that there was no change. * Changelog fragment for #5431 --- changelogs/fragments/5431-nmcli-wifi.yml | 4 ++++ plugins/modules/nmcli.py | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5431-nmcli-wifi.yml diff --git a/changelogs/fragments/5431-nmcli-wifi.yml b/changelogs/fragments/5431-nmcli-wifi.yml new file mode 100644 index 0000000000..0f6f4edde5 --- /dev/null +++ b/changelogs/fragments/5431-nmcli-wifi.yml @@ -0,0 +1,4 @@ +bugfixes: + - nmcli - fix failure to handle WIFI settings when connection type not specified (https://github.com/ansible-collections/community.general/pull/5431). + - nmcli - fix improper detection of changes to ``wifi.wake-on-wlan`` (https://github.com/ansible-collections/community.general/pull/5431). + - nmcli - fix change handling of values specified as an integer 0 (https://github.com/ansible-collections/community.general/pull/5431). diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index 461bcc58f9..999e06cc12 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -2107,11 +2107,18 @@ class Nmcli(object): diff_after = dict() for key, value in options.items(): - if not value: + # We can't just do `if not value` because then if there's a value + # of 0 specified as an integer it'll be interpreted as empty when + # it actually isn't. + if value != 0 and not value: continue if key in conn_info: current_value = conn_info[key] + if key == '802-11-wireless.wake-on-wlan' and current_value is not None: + match = re.match('0x([0-9A-Fa-f]+)', current_value) + if match: + current_value = str(int(match.group(1), 16)) if key in ('ipv4.routes', 'ipv6.routes') and current_value is not None: current_value = self.get_route_params(current_value) if key == self.mac_setting: @@ -2167,6 +2174,8 @@ class Nmcli(object): if not self.type: current_con_type = self.show_connection().get('connection.type') if current_con_type: + if current_con_type == '802-11-wireless': + current_con_type = 'wifi' self.type = current_con_type options.update(self.connection_options(detect_change=True)) From 6bd131f2fbd6da7ee1226b4e048613c63d6fd2ef Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:21:43 +0100 Subject: [PATCH 0479/2104] Add attributes to oneandone, ovh, and rackspace modules (#5948) Add attributes to oneandone, ovh, and rackspace modules. --- plugins/modules/oneandone_firewall_policy.py | 11 +++++++++-- plugins/modules/oneandone_load_balancer.py | 11 +++++++++-- plugins/modules/oneandone_monitoring_policy.py | 13 ++++++++++--- plugins/modules/oneandone_private_network.py | 11 +++++++++-- plugins/modules/oneandone_public_ip.py | 11 +++++++++-- plugins/modules/oneandone_server.py | 11 +++++++++-- plugins/modules/ovh_ip_failover.py | 7 +++++++ plugins/modules/ovh_ip_loadbalancing_backend.py | 7 +++++++ plugins/modules/ovh_monthly_billing.py | 7 +++++++ plugins/modules/rax.py | 8 +++++++- plugins/modules/rax_cbs.py | 8 +++++++- plugins/modules/rax_cbs_attachments.py | 8 +++++++- plugins/modules/rax_cdb.py | 10 ++++++++-- plugins/modules/rax_cdb_database.py | 10 ++++++++-- plugins/modules/rax_cdb_user.py | 10 ++++++++-- plugins/modules/rax_clb.py | 10 ++++++++-- plugins/modules/rax_clb_nodes.py | 10 ++++++++-- plugins/modules/rax_clb_ssl.py | 10 ++++++++-- plugins/modules/rax_dns.py | 10 ++++++++-- plugins/modules/rax_dns_record.py | 10 ++++++++-- plugins/modules/rax_files.py | 10 ++++++++-- plugins/modules/rax_files_objects.py | 10 ++++++++-- plugins/modules/rax_identity.py | 8 +++++++- plugins/modules/rax_keypair.py | 8 +++++++- plugins/modules/rax_meta.py | 8 +++++++- plugins/modules/rax_mon_alarm.py | 8 +++++++- plugins/modules/rax_mon_check.py | 8 +++++++- plugins/modules/rax_mon_entity.py | 8 +++++++- plugins/modules/rax_mon_notification.py | 8 +++++++- plugins/modules/rax_mon_notification_plan.py | 8 +++++++- plugins/modules/rax_network.py | 8 +++++++- plugins/modules/rax_queue.py | 10 ++++++++-- plugins/modules/rax_scaling_group.py | 10 ++++++++-- plugins/modules/rax_scaling_policy.py | 10 ++++++++-- 34 files changed, 264 insertions(+), 51 deletions(-) diff --git a/plugins/modules/oneandone_firewall_policy.py b/plugins/modules/oneandone_firewall_policy.py index 5cceffa812..37dca74f28 100644 --- a/plugins/modules/oneandone_firewall_policy.py +++ b/plugins/modules/oneandone_firewall_policy.py @@ -12,8 +12,15 @@ DOCUMENTATION = ''' module: oneandone_firewall_policy short_description: Configure 1&1 firewall policy description: - - Create, remove, reconfigure, update firewall policies. - This module has a dependency on 1and1 >= 1.0 + - Create, remove, reconfigure, update firewall policies. + This module has a dependency on 1and1 >= 1.0. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/oneandone_load_balancer.py b/plugins/modules/oneandone_load_balancer.py index 432fc456b1..7f7af9c4fc 100644 --- a/plugins/modules/oneandone_load_balancer.py +++ b/plugins/modules/oneandone_load_balancer.py @@ -12,8 +12,15 @@ DOCUMENTATION = ''' module: oneandone_load_balancer short_description: Configure 1&1 load balancer description: - - Create, remove, update load balancers. - This module has a dependency on 1and1 >= 1.0 + - Create, remove, update load balancers. + This module has a dependency on 1and1 >= 1.0. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/oneandone_monitoring_policy.py b/plugins/modules/oneandone_monitoring_policy.py index 04e9c67570..6118645bfe 100644 --- a/plugins/modules/oneandone_monitoring_policy.py +++ b/plugins/modules/oneandone_monitoring_policy.py @@ -12,9 +12,16 @@ DOCUMENTATION = ''' module: oneandone_monitoring_policy short_description: Configure 1&1 monitoring policy description: - - Create, remove, update monitoring policies - (and add/remove ports, processes, and servers). - This module has a dependency on 1and1 >= 1.0 + - Create, remove, update monitoring policies + (and add/remove ports, processes, and servers). + This module has a dependency on 1and1 >= 1.0. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/oneandone_private_network.py b/plugins/modules/oneandone_private_network.py index 4a912a0f35..114bf2f223 100644 --- a/plugins/modules/oneandone_private_network.py +++ b/plugins/modules/oneandone_private_network.py @@ -12,8 +12,15 @@ DOCUMENTATION = ''' module: oneandone_private_network short_description: Configure 1&1 private networking description: - - Create, remove, reconfigure, update a private network. - This module has a dependency on 1and1 >= 1.0 + - Create, remove, reconfigure, update a private network. + This module has a dependency on 1and1 >= 1.0. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/oneandone_public_ip.py b/plugins/modules/oneandone_public_ip.py index 31ed082c74..df5476feb1 100644 --- a/plugins/modules/oneandone_public_ip.py +++ b/plugins/modules/oneandone_public_ip.py @@ -12,8 +12,15 @@ DOCUMENTATION = ''' module: oneandone_public_ip short_description: Configure 1&1 public IPs description: - - Create, update, and remove public IPs. - This module has a dependency on 1and1 >= 1.0 + - Create, update, and remove public IPs. + This module has a dependency on 1and1 >= 1.0. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/oneandone_server.py b/plugins/modules/oneandone_server.py index e0f1b0eb03..59f5041785 100644 --- a/plugins/modules/oneandone_server.py +++ b/plugins/modules/oneandone_server.py @@ -12,8 +12,15 @@ DOCUMENTATION = ''' module: oneandone_server short_description: Create, destroy, start, stop, and reboot a 1&1 Host server description: - - Create, destroy, update, start, stop, and reboot a 1&1 Host server. - When the server is created it can optionally wait for it to be 'running' before returning. + - Create, destroy, update, start, stop, and reboot a 1&1 Host server. + When the server is created it can optionally wait for it to be 'running' before returning. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/ovh_ip_failover.py b/plugins/modules/ovh_ip_failover.py index 4a5c8e5346..cd3639a4cd 100644 --- a/plugins/modules/ovh_ip_failover.py +++ b/plugins/modules/ovh_ip_failover.py @@ -23,6 +23,13 @@ notes: key as described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/) requirements: - ovh >= 0.4.8 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: required: true diff --git a/plugins/modules/ovh_ip_loadbalancing_backend.py b/plugins/modules/ovh_ip_loadbalancing_backend.py index fe1e722507..f70b5804a7 100644 --- a/plugins/modules/ovh_ip_loadbalancing_backend.py +++ b/plugins/modules/ovh_ip_loadbalancing_backend.py @@ -22,6 +22,13 @@ notes: key as described into U(https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/) requirements: - ovh > 0.3.5 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: required: true diff --git a/plugins/modules/ovh_monthly_billing.py b/plugins/modules/ovh_monthly_billing.py index 445041a23b..43d64e6185 100644 --- a/plugins/modules/ovh_monthly_billing.py +++ b/plugins/modules/ovh_monthly_billing.py @@ -18,6 +18,13 @@ short_description: Manage OVH monthly billing description: - Enable monthly billing on OVH cloud intances (be aware OVH does not allow to disable it). requirements: [ "ovh" ] +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: project_id: required: true diff --git a/plugins/modules/rax.py b/plugins/modules/rax.py index fa929f7971..47c0a6d1bb 100644 --- a/plugins/modules/rax.py +++ b/plugins/modules/rax.py @@ -15,6 +15,11 @@ short_description: Create / delete an instance in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud instance and optionally waits for it to be 'running'. +attributes: + check_mode: + support: none + diff_mode: + support: none options: auto_increment: description: @@ -177,7 +182,8 @@ notes: In the case of deletion, the returned data structure will have C(action) set to C(delete), and the oldest servers in the group will be deleted. extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_cbs.py b/plugins/modules/rax_cbs.py index dd8bcefa35..77e7cebad4 100644 --- a/plugins/modules/rax_cbs.py +++ b/plugins/modules/rax_cbs.py @@ -14,6 +14,11 @@ module: rax_cbs short_description: Manipulate Rackspace Cloud Block Storage Volumes description: - Manipulate Rackspace Cloud Block Storage Volumes +attributes: + check_mode: + support: none + diff_mode: + support: none options: description: type: str @@ -73,7 +78,8 @@ author: - "Christopher H. Laco (@claco)" - "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_cbs_attachments.py b/plugins/modules/rax_cbs_attachments.py index 82a1f30cfb..00b860a90f 100644 --- a/plugins/modules/rax_cbs_attachments.py +++ b/plugins/modules/rax_cbs_attachments.py @@ -14,6 +14,11 @@ module: rax_cbs_attachments short_description: Manipulate Rackspace Cloud Block Storage Volume Attachments description: - Manipulate Rackspace Cloud Block Storage Volume Attachments +attributes: + check_mode: + support: none + diff_mode: + support: none options: device: type: str @@ -52,7 +57,8 @@ author: - "Christopher H. Laco (@claco)" - "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_cdb.py b/plugins/modules/rax_cdb.py index 3fb6194d9d..687b6ff249 100644 --- a/plugins/modules/rax_cdb.py +++ b/plugins/modules/rax_cdb.py @@ -16,6 +16,11 @@ description: - creates / deletes or resize a Rackspace Cloud Databases instance and optionally waits for it to be 'running'. The name option needs to be unique since it's used to identify the instance. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: type: str @@ -63,8 +68,9 @@ options: default: 300 author: "Simon JAILLET (@jails)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_cdb_database.py b/plugins/modules/rax_cdb_database.py index 6e0e8411c2..b0db11814d 100644 --- a/plugins/modules/rax_cdb_database.py +++ b/plugins/modules/rax_cdb_database.py @@ -13,6 +13,11 @@ module: rax_cdb_database short_description: Create / delete a database in the Cloud Databases description: - create / delete a database in the Cloud Databases. +attributes: + check_mode: + support: none + diff_mode: + support: none options: cdb_id: type: str @@ -42,8 +47,9 @@ options: default: present author: "Simon JAILLET (@jails)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_cdb_user.py b/plugins/modules/rax_cdb_user.py index 63cb00b608..6ee86c4fe2 100644 --- a/plugins/modules/rax_cdb_user.py +++ b/plugins/modules/rax_cdb_user.py @@ -14,6 +14,11 @@ module: rax_cdb_user short_description: Create / delete a Rackspace Cloud Database description: - create / delete a database in the Cloud Databases. +attributes: + check_mode: + support: none + diff_mode: + support: none options: cdb_id: type: str @@ -51,8 +56,9 @@ options: default: present author: "Simon JAILLET (@jails)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_clb.py b/plugins/modules/rax_clb.py index 8355a42921..23c795f395 100644 --- a/plugins/modules/rax_clb.py +++ b/plugins/modules/rax_clb.py @@ -14,6 +14,11 @@ module: rax_clb short_description: Create / delete a load balancer in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud load balancer. +attributes: + check_mode: + support: none + diff_mode: + support: none options: algorithm: type: str @@ -105,8 +110,9 @@ author: - "Christopher H. Laco (@claco)" - "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_clb_nodes.py b/plugins/modules/rax_clb_nodes.py index e6d050de46..c076dced74 100644 --- a/plugins/modules/rax_clb_nodes.py +++ b/plugins/modules/rax_clb_nodes.py @@ -14,6 +14,11 @@ module: rax_clb_nodes short_description: Add, modify and remove nodes from a Rackspace Cloud Load Balancer description: - Adds, modifies and removes nodes from a Rackspace Cloud Load Balancer +attributes: + check_mode: + support: none + diff_mode: + support: none options: address: type: str @@ -85,8 +90,9 @@ options: - Virtualenv to execute this module in author: "Lukasz Kawczynski (@neuroid)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_clb_ssl.py b/plugins/modules/rax_clb_ssl.py index 85110d3390..b794130cfa 100644 --- a/plugins/modules/rax_clb_ssl.py +++ b/plugins/modules/rax_clb_ssl.py @@ -13,6 +13,11 @@ module: rax_clb_ssl short_description: Manage SSL termination for a Rackspace Cloud Load Balancer description: - Set up, reconfigure, or remove SSL termination for an existing load balancer. +attributes: + check_mode: + support: none + diff_mode: + support: none options: loadbalancer: type: str @@ -75,8 +80,9 @@ options: default: 300 author: Ash Wilson (@smashwilson) extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_dns.py b/plugins/modules/rax_dns.py index a97a4bb175..31782cd882 100644 --- a/plugins/modules/rax_dns.py +++ b/plugins/modules/rax_dns.py @@ -14,6 +14,11 @@ module: rax_dns short_description: Manage domains on Rackspace Cloud DNS description: - Manage domains on Rackspace Cloud DNS +attributes: + check_mode: + support: none + diff_mode: + support: none options: comment: type: str @@ -46,8 +51,9 @@ notes: the Rackspace CloudDNS API" author: "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_dns_record.py b/plugins/modules/rax_dns_record.py index e51424dc04..d4a0eeae22 100644 --- a/plugins/modules/rax_dns_record.py +++ b/plugins/modules/rax_dns_record.py @@ -14,6 +14,11 @@ module: rax_dns_record short_description: Manage DNS records on Rackspace Cloud DNS description: - Manage DNS records on Rackspace Cloud DNS +attributes: + check_mode: + support: none + diff_mode: + support: none options: comment: type: str @@ -92,8 +97,9 @@ notes: - C(PTR) record support was added in version 1.7 author: "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_files.py b/plugins/modules/rax_files.py index 1c549827cc..a63e107eb4 100644 --- a/plugins/modules/rax_files.py +++ b/plugins/modules/rax_files.py @@ -14,6 +14,11 @@ module: rax_files short_description: Manipulate Rackspace Cloud Files Containers description: - Manipulate Rackspace Cloud Files Containers +attributes: + check_mode: + support: none + diff_mode: + support: none options: clear_meta: description: @@ -75,8 +80,9 @@ options: - Sets an object to be presented as the HTTP index page when accessed by the CDN URL author: "Paul Durivage (@angstwad)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_files_objects.py b/plugins/modules/rax_files_objects.py index 82bedffddb..49ac40daf0 100644 --- a/plugins/modules/rax_files_objects.py +++ b/plugins/modules/rax_files_objects.py @@ -14,6 +14,11 @@ module: rax_files_objects short_description: Upload, download, and delete objects in Rackspace Cloud Files description: - Upload, download, and delete objects in Rackspace Cloud Files. +attributes: + check_mode: + support: none + diff_mode: + support: none options: clear_meta: description: @@ -76,8 +81,9 @@ options: default: file author: "Paul Durivage (@angstwad)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_identity.py b/plugins/modules/rax_identity.py index 6f7472bcf4..b2eb156273 100644 --- a/plugins/modules/rax_identity.py +++ b/plugins/modules/rax_identity.py @@ -14,6 +14,11 @@ module: rax_identity short_description: Load Rackspace Cloud Identity description: - Verifies Rackspace Cloud credentials and returns identity information +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str @@ -26,7 +31,8 @@ author: - "Christopher H. Laco (@claco)" - "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_keypair.py b/plugins/modules/rax_keypair.py index 6664ac8bd0..d7d7a2cc34 100644 --- a/plugins/modules/rax_keypair.py +++ b/plugins/modules/rax_keypair.py @@ -14,6 +14,11 @@ module: rax_keypair short_description: Create a keypair for use with Rackspace Cloud Servers description: - Create a keypair for use with Rackspace Cloud Servers +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: type: str @@ -38,7 +43,8 @@ notes: keypair you must first delete and then recreate. - The ability to specify a file path for the public key was added in 1.7 extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_meta.py b/plugins/modules/rax_meta.py index 33acad365c..7b52e906fe 100644 --- a/plugins/modules/rax_meta.py +++ b/plugins/modules/rax_meta.py @@ -14,6 +14,11 @@ module: rax_meta short_description: Manipulate metadata for Rackspace Cloud Servers description: - Manipulate metadata for Rackspace Cloud Servers +attributes: + check_mode: + support: none + diff_mode: + support: none options: address: type: str @@ -35,7 +40,8 @@ options: - A hash of metadata to associate with the instance author: "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_mon_alarm.py b/plugins/modules/rax_mon_alarm.py index d167420341..72b67a91eb 100644 --- a/plugins/modules/rax_mon_alarm.py +++ b/plugins/modules/rax_mon_alarm.py @@ -19,6 +19,11 @@ description: notifications. Rackspace monitoring module flow | rax_mon_entity -> rax_mon_check -> rax_mon_notification -> rax_mon_notification_plan -> *rax_mon_alarm* +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str @@ -71,7 +76,8 @@ options: keys and values between 1 and 255 characters long. author: Ash Wilson (@smashwilson) extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_mon_check.py b/plugins/modules/rax_mon_check.py index c6259dab47..878ae14e8e 100644 --- a/plugins/modules/rax_mon_check.py +++ b/plugins/modules/rax_mon_check.py @@ -20,6 +20,11 @@ description: monitor. Rackspace monitoring module flow | rax_mon_entity -> *rax_mon_check* -> rax_mon_notification -> rax_mon_notification_plan -> rax_mon_alarm +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str @@ -115,7 +120,8 @@ options: results. Must be less than the period. author: Ash Wilson (@smashwilson) extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_mon_entity.py b/plugins/modules/rax_mon_entity.py index cc502496dc..fbad9f98fc 100644 --- a/plugins/modules/rax_mon_entity.py +++ b/plugins/modules/rax_mon_entity.py @@ -18,6 +18,11 @@ description: provide a convenient, centralized place to store IP addresses. Rackspace monitoring module flow | *rax_mon_entity* -> rax_mon_check -> rax_mon_notification -> rax_mon_notification_plan -> rax_mon_alarm +attributes: + check_mode: + support: none + diff_mode: + support: none options: label: type: str @@ -53,7 +58,8 @@ options: long. author: Ash Wilson (@smashwilson) extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_mon_notification.py b/plugins/modules/rax_mon_notification.py index 73bfd1a78f..91d0793593 100644 --- a/plugins/modules/rax_mon_notification.py +++ b/plugins/modules/rax_mon_notification.py @@ -17,6 +17,11 @@ description: channel that can be used to communicate alarms, such as email, webhooks, or PagerDuty. Rackspace monitoring module flow | rax_mon_entity -> rax_mon_check -> *rax_mon_notification* -> rax_mon_notification_plan -> rax_mon_alarm +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str @@ -46,7 +51,8 @@ options: required: true author: Ash Wilson (@smashwilson) extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_mon_notification_plan.py b/plugins/modules/rax_mon_notification_plan.py index 7800ea0fe9..d64dee7736 100644 --- a/plugins/modules/rax_mon_notification_plan.py +++ b/plugins/modules/rax_mon_notification_plan.py @@ -18,6 +18,11 @@ description: associating existing rax_mon_notifications with severity levels. Rackspace monitoring module flow | rax_mon_entity -> rax_mon_check -> rax_mon_notification -> *rax_mon_notification_plan* -> rax_mon_alarm +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str @@ -52,7 +57,8 @@ options: valid rax_mon_notification ids. author: Ash Wilson (@smashwilson) extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_network.py b/plugins/modules/rax_network.py index edb7773b72..22f148366e 100644 --- a/plugins/modules/rax_network.py +++ b/plugins/modules/rax_network.py @@ -14,6 +14,11 @@ module: rax_network short_description: Create / delete an isolated network in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud isolated network. +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str @@ -36,7 +41,8 @@ author: - "Christopher H. Laco (@claco)" - "Jesse Keating (@omgjlk)" extends_documentation_fragment: -- community.general.rackspace.openstack + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_queue.py b/plugins/modules/rax_queue.py index e053f3266d..00f730b279 100644 --- a/plugins/modules/rax_queue.py +++ b/plugins/modules/rax_queue.py @@ -14,6 +14,11 @@ module: rax_queue short_description: Create / delete a queue in Rackspace Public Cloud description: - creates / deletes a Rackspace Public Cloud queue. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: type: str @@ -31,8 +36,9 @@ author: - "Christopher H. Laco (@claco)" - "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_scaling_group.py b/plugins/modules/rax_scaling_group.py index ed974ef0f9..677a75b336 100644 --- a/plugins/modules/rax_scaling_group.py +++ b/plugins/modules/rax_scaling_group.py @@ -14,6 +14,11 @@ module: rax_scaling_group short_description: Manipulate Rackspace Cloud Autoscale Groups description: - Manipulate Rackspace Cloud Autoscale Groups +attributes: + check_mode: + support: none + diff_mode: + support: none options: config_drive: description: @@ -122,8 +127,9 @@ options: default: 300 author: "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' diff --git a/plugins/modules/rax_scaling_policy.py b/plugins/modules/rax_scaling_policy.py index 3596575187..60b48bb2a9 100644 --- a/plugins/modules/rax_scaling_policy.py +++ b/plugins/modules/rax_scaling_policy.py @@ -14,6 +14,11 @@ module: rax_scaling_policy short_description: Manipulate Rackspace Cloud Autoscale Scaling Policy description: - Manipulate Rackspace Cloud Autoscale Scaling Policy +attributes: + check_mode: + support: none + diff_mode: + support: none options: at: type: str @@ -77,8 +82,9 @@ options: default: present author: "Matt Martz (@sivel)" extends_documentation_fragment: -- community.general.rackspace -- community.general.rackspace.openstack + - community.general.rackspace + - community.general.rackspace.openstack + - community.general.attributes ''' From 50d7597ddc243b32ac09f367305f95a213565d80 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:21:52 +0100 Subject: [PATCH 0480/2104] Add attributes to scaleway and profitbricks modules (#5949) Add attributes to scaleway and profitbricks modules. --- plugins/modules/profitbricks.py | 7 +++++++ plugins/modules/profitbricks_datacenter.py | 7 +++++++ plugins/modules/profitbricks_nic.py | 9 ++++++++- plugins/modules/profitbricks_volume.py | 9 ++++++++- plugins/modules/profitbricks_volume_attachments.py | 9 ++++++++- plugins/modules/scaleway_compute.py | 8 +++++++- plugins/modules/scaleway_compute_private_network.py | 8 +++++++- plugins/modules/scaleway_container.py | 6 ++++++ plugins/modules/scaleway_container_info.py | 3 ++- plugins/modules/scaleway_container_namespace.py | 7 +++++++ plugins/modules/scaleway_container_registry.py | 6 ++++++ plugins/modules/scaleway_database_backup.py | 6 ++++++ plugins/modules/scaleway_function.py | 7 +++++++ plugins/modules/scaleway_function_namespace.py | 7 +++++++ plugins/modules/scaleway_ip.py | 8 +++++++- plugins/modules/scaleway_lb.py | 8 +++++++- plugins/modules/scaleway_private_network.py | 8 +++++++- plugins/modules/scaleway_security_group.py | 8 +++++++- plugins/modules/scaleway_security_group_rule.py | 7 +++++++ plugins/modules/scaleway_sshkey.py | 6 ++++++ plugins/modules/scaleway_user_data.py | 6 ++++++ plugins/modules/scaleway_volume.py | 6 ++++++ 22 files changed, 146 insertions(+), 10 deletions(-) diff --git a/plugins/modules/profitbricks.py b/plugins/modules/profitbricks.py index 6b0134cb99..c8bcceb936 100644 --- a/plugins/modules/profitbricks.py +++ b/plugins/modules/profitbricks.py @@ -15,6 +15,13 @@ short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtu description: - Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait for it to be 'running' before returning. This module has a dependency on profitbricks >= 1.0.0 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: auto_increment: description: diff --git a/plugins/modules/profitbricks_datacenter.py b/plugins/modules/profitbricks_datacenter.py index a11d12bfd9..a096db752d 100644 --- a/plugins/modules/profitbricks_datacenter.py +++ b/plugins/modules/profitbricks_datacenter.py @@ -15,6 +15,13 @@ short_description: Create or destroy a ProfitBricks Virtual Datacenter description: - This is a simple module that supports creating or removing vDCs. A vDC is required before you can create servers. This module has a dependency on profitbricks >= 1.0.0 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/profitbricks_nic.py b/plugins/modules/profitbricks_nic.py index c6239f5ef5..17a30b052c 100644 --- a/plugins/modules/profitbricks_nic.py +++ b/plugins/modules/profitbricks_nic.py @@ -13,7 +13,14 @@ DOCUMENTATION = ''' module: profitbricks_nic short_description: Create or Remove a NIC description: - - This module allows you to create or restore a volume snapshot. This module has a dependency on profitbricks >= 1.0.0 + - This module allows you to create or restore a volume snapshot. This module has a dependency on profitbricks >= 1.0.0 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: datacenter: description: diff --git a/plugins/modules/profitbricks_volume.py b/plugins/modules/profitbricks_volume.py index 1d21897715..f9d257b682 100644 --- a/plugins/modules/profitbricks_volume.py +++ b/plugins/modules/profitbricks_volume.py @@ -13,7 +13,14 @@ DOCUMENTATION = ''' module: profitbricks_volume short_description: Create or destroy a volume description: - - Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0 + - Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: datacenter: description: diff --git a/plugins/modules/profitbricks_volume_attachments.py b/plugins/modules/profitbricks_volume_attachments.py index 49b418362b..75cd73df3c 100644 --- a/plugins/modules/profitbricks_volume_attachments.py +++ b/plugins/modules/profitbricks_volume_attachments.py @@ -13,7 +13,14 @@ DOCUMENTATION = ''' module: profitbricks_volume_attachments short_description: Attach or detach a volume description: - - Allows you to attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0 + - Allows you to attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: datacenter: description: diff --git a/plugins/modules/scaleway_compute.py b/plugins/modules/scaleway_compute.py index 0da3f0ff24..9bd8218071 100644 --- a/plugins/modules/scaleway_compute.py +++ b/plugins/modules/scaleway_compute.py @@ -21,8 +21,14 @@ author: Remy Leone (@remyleone) description: - "This module manages compute instances on Scaleway." extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: diff --git a/plugins/modules/scaleway_compute_private_network.py b/plugins/modules/scaleway_compute_private_network.py index 201ec257f7..9a9d9adde8 100644 --- a/plugins/modules/scaleway_compute_private_network.py +++ b/plugins/modules/scaleway_compute_private_network.py @@ -21,8 +21,14 @@ description: - This module add or remove a private network to a compute instance (U(https://developer.scaleway.com)). extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/scaleway_container.py b/plugins/modules/scaleway_container.py index 85e746e1f5..19ffae4197 100644 --- a/plugins/modules/scaleway_container.py +++ b/plugins/modules/scaleway_container.py @@ -22,9 +22,15 @@ description: extends_documentation_fragment: - community.general.scaleway - community.general.scaleway_waitable_resource + - community.general.attributes requirements: - passlib[argon2] >= 1.7.4 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/scaleway_container_info.py b/plugins/modules/scaleway_container_info.py index 670c63a0bc..20ebece212 100644 --- a/plugins/modules/scaleway_container_info.py +++ b/plugins/modules/scaleway_container_info.py @@ -21,7 +21,8 @@ description: - This module return information about a container on Scaleway account. extends_documentation_fragment: - community.general.scaleway - + - community.general.attributes + - community.general.attributes.info_module options: namespace_id: diff --git a/plugins/modules/scaleway_container_namespace.py b/plugins/modules/scaleway_container_namespace.py index e7bf7c71f1..fb01b86728 100644 --- a/plugins/modules/scaleway_container_namespace.py +++ b/plugins/modules/scaleway_container_namespace.py @@ -22,9 +22,16 @@ description: extends_documentation_fragment: - community.general.scaleway - community.general.scaleway_waitable_resource + - community.general.attributes requirements: - passlib[argon2] >= 1.7.4 +attributes: + check_mode: + support: full + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/scaleway_container_registry.py b/plugins/modules/scaleway_container_registry.py index f49b19917a..5eee571ec7 100644 --- a/plugins/modules/scaleway_container_registry.py +++ b/plugins/modules/scaleway_container_registry.py @@ -22,7 +22,13 @@ description: extends_documentation_fragment: - community.general.scaleway - community.general.scaleway_waitable_resource + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/scaleway_database_backup.py b/plugins/modules/scaleway_database_backup.py index 9daa7921c0..edc9f6cab4 100644 --- a/plugins/modules/scaleway_database_backup.py +++ b/plugins/modules/scaleway_database_backup.py @@ -22,6 +22,12 @@ description: - "This module manages database backups on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/scaleway_function.py b/plugins/modules/scaleway_function.py index 5e7ac2a3d1..3785458660 100644 --- a/plugins/modules/scaleway_function.py +++ b/plugins/modules/scaleway_function.py @@ -22,9 +22,16 @@ description: extends_documentation_fragment: - community.general.scaleway - community.general.scaleway_waitable_resource + - community.general.attributes requirements: - passlib[argon2] >= 1.7.4 +attributes: + check_mode: + support: full + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/scaleway_function_namespace.py b/plugins/modules/scaleway_function_namespace.py index 243bb7124c..f6310b35be 100644 --- a/plugins/modules/scaleway_function_namespace.py +++ b/plugins/modules/scaleway_function_namespace.py @@ -22,9 +22,16 @@ description: extends_documentation_fragment: - community.general.scaleway - community.general.scaleway_waitable_resource + - community.general.attributes requirements: - passlib[argon2] >= 1.7.4 +attributes: + check_mode: + support: full + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/scaleway_ip.py b/plugins/modules/scaleway_ip.py index a49e9c9f31..cf8e2e6015 100644 --- a/plugins/modules/scaleway_ip.py +++ b/plugins/modules/scaleway_ip.py @@ -20,8 +20,14 @@ description: - This module manages IP on Scaleway account U(https://developer.scaleway.com) extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/scaleway_lb.py b/plugins/modules/scaleway_lb.py index 578f4ae894..3e43a8ae2b 100644 --- a/plugins/modules/scaleway_lb.py +++ b/plugins/modules/scaleway_lb.py @@ -21,8 +21,14 @@ author: Remy Leone (@remyleone) description: - "This module manages load-balancers on Scaleway." extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: diff --git a/plugins/modules/scaleway_private_network.py b/plugins/modules/scaleway_private_network.py index 57cf67ec1f..33fb7381ca 100644 --- a/plugins/modules/scaleway_private_network.py +++ b/plugins/modules/scaleway_private_network.py @@ -20,8 +20,14 @@ author: Pascal MANGIN (@pastral) description: - "This module manages private network on Scaleway account (U(https://developer.scaleway.com))." extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/scaleway_security_group.py b/plugins/modules/scaleway_security_group.py index d863156fa3..5523da41ce 100644 --- a/plugins/modules/scaleway_security_group.py +++ b/plugins/modules/scaleway_security_group.py @@ -20,8 +20,14 @@ author: Antoine Barbare (@abarbare) description: - "This module manages Security Group on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: -- community.general.scaleway + - community.general.scaleway + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/scaleway_security_group_rule.py b/plugins/modules/scaleway_security_group_rule.py index 52e69868cc..136631d03d 100644 --- a/plugins/modules/scaleway_security_group_rule.py +++ b/plugins/modules/scaleway_security_group_rule.py @@ -21,9 +21,16 @@ description: - "This module manages Security Group Rule on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway + - community.general.attributes requirements: - ipaddress +attributes: + check_mode: + support: full + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/scaleway_sshkey.py b/plugins/modules/scaleway_sshkey.py index 8bb804165a..a39e57aa39 100644 --- a/plugins/modules/scaleway_sshkey.py +++ b/plugins/modules/scaleway_sshkey.py @@ -22,7 +22,13 @@ description: - "This module manages SSH keys on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway +- community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: diff --git a/plugins/modules/scaleway_user_data.py b/plugins/modules/scaleway_user_data.py index 509ae44cc0..08ff86a55e 100644 --- a/plugins/modules/scaleway_user_data.py +++ b/plugins/modules/scaleway_user_data.py @@ -23,7 +23,13 @@ description: - It can be used to configure cloud-init for instance. extends_documentation_fragment: - community.general.scaleway +- community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: diff --git a/plugins/modules/scaleway_volume.py b/plugins/modules/scaleway_volume.py index e633b4a1a7..2ff09da544 100644 --- a/plugins/modules/scaleway_volume.py +++ b/plugins/modules/scaleway_volume.py @@ -21,7 +21,13 @@ description: - "This module manages volumes on Scaleway account U(https://developer.scaleway.com)." extends_documentation_fragment: - community.general.scaleway +- community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: From cc29b16536662c76d6a35dc28bf47d8c1b950922 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:22:26 +0100 Subject: [PATCH 0481/2104] Add attributes to clc, hwc, and lxd modules (#5952) Add attributes to clc, hwc, and lxd modules. --- plugins/modules/clc_aa_policy.py | 7 ++++++ plugins/modules/clc_alert_policy.py | 7 ++++++ plugins/modules/clc_blueprint_package.py | 7 ++++++ plugins/modules/clc_firewall_policy.py | 7 ++++++ plugins/modules/clc_group.py | 7 ++++++ plugins/modules/clc_loadbalancer.py | 7 ++++++ plugins/modules/clc_modify_server.py | 7 ++++++ plugins/modules/clc_publicip.py | 7 ++++++ plugins/modules/clc_server.py | 7 ++++++ plugins/modules/clc_server_snapshot.py | 7 ++++++ plugins/modules/hwc_ecs_instance.py | 8 ++++++- plugins/modules/hwc_evs_disk.py | 8 ++++++- plugins/modules/hwc_network_vpc.py | 8 ++++++- plugins/modules/hwc_smn_topic.py | 8 ++++++- plugins/modules/hwc_vpc_eip.py | 8 ++++++- plugins/modules/hwc_vpc_peering_connect.py | 8 ++++++- plugins/modules/hwc_vpc_port.py | 8 ++++++- plugins/modules/hwc_vpc_private_ip.py | 14 ++++++++---- plugins/modules/hwc_vpc_route.py | 14 ++++++++---- plugins/modules/hwc_vpc_security_group.py | 22 ++++++++++++------- .../modules/hwc_vpc_security_group_rule.py | 22 ++++++++++++------- plugins/modules/hwc_vpc_subnet.py | 8 ++++++- plugins/modules/lxd_container.py | 12 +++++----- plugins/modules/lxd_profile.py | 7 ++++++ plugins/modules/lxd_project.py | 7 ++++++ 25 files changed, 194 insertions(+), 38 deletions(-) diff --git a/plugins/modules/clc_aa_policy.py b/plugins/modules/clc_aa_policy.py index d1fba2429a..05135bd957 100644 --- a/plugins/modules/clc_aa_policy.py +++ b/plugins/modules/clc_aa_policy.py @@ -14,6 +14,13 @@ module: clc_aa_policy short_description: Create or Delete Anti Affinity Policies at CenturyLink Cloud description: - An Ansible module to Create or Delete Anti Affinity Policies at CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/clc_alert_policy.py b/plugins/modules/clc_alert_policy.py index 1d733013d2..b77c83e3b7 100644 --- a/plugins/modules/clc_alert_policy.py +++ b/plugins/modules/clc_alert_policy.py @@ -15,6 +15,13 @@ module: clc_alert_policy short_description: Create or Delete Alert Policies at CenturyLink Cloud description: - An Ansible module to Create or Delete Alert Policies at CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: alias: description: diff --git a/plugins/modules/clc_blueprint_package.py b/plugins/modules/clc_blueprint_package.py index cb23df852b..672e06780f 100644 --- a/plugins/modules/clc_blueprint_package.py +++ b/plugins/modules/clc_blueprint_package.py @@ -14,6 +14,13 @@ module: clc_blueprint_package short_description: Deploys a blue print package on a set of servers in CenturyLink Cloud description: - An Ansible module to deploy blue print package on a set of servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server_ids: description: diff --git a/plugins/modules/clc_firewall_policy.py b/plugins/modules/clc_firewall_policy.py index cc77238db9..c832571d33 100644 --- a/plugins/modules/clc_firewall_policy.py +++ b/plugins/modules/clc_firewall_policy.py @@ -14,6 +14,13 @@ module: clc_firewall_policy short_description: Create/delete/update firewall policies description: - Create or delete or update firewall policies on Centurylink Cloud +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: location: description: diff --git a/plugins/modules/clc_group.py b/plugins/modules/clc_group.py index 21e6d93d28..88aef2d63d 100644 --- a/plugins/modules/clc_group.py +++ b/plugins/modules/clc_group.py @@ -15,6 +15,13 @@ module: clc_group short_description: Create/delete Server Groups at Centurylink Cloud description: - Create or delete Server Groups at Centurylink Centurylink Cloud +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/clc_loadbalancer.py b/plugins/modules/clc_loadbalancer.py index ab6d866fb6..675cc1100e 100644 --- a/plugins/modules/clc_loadbalancer.py +++ b/plugins/modules/clc_loadbalancer.py @@ -15,6 +15,13 @@ module: clc_loadbalancer short_description: Create, Delete shared loadbalancers in CenturyLink Cloud description: - An Ansible module to Create, Delete shared loadbalancers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/clc_modify_server.py b/plugins/modules/clc_modify_server.py index 786cdf2ae4..b375d9d47a 100644 --- a/plugins/modules/clc_modify_server.py +++ b/plugins/modules/clc_modify_server.py @@ -14,6 +14,13 @@ module: clc_modify_server short_description: Modify servers in CenturyLink Cloud description: - An Ansible module to modify servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server_ids: description: diff --git a/plugins/modules/clc_publicip.py b/plugins/modules/clc_publicip.py index 5111b3cf19..c1bffcea04 100644 --- a/plugins/modules/clc_publicip.py +++ b/plugins/modules/clc_publicip.py @@ -14,6 +14,13 @@ module: clc_publicip short_description: Add and Delete public ips on servers in CenturyLink Cloud description: - An Ansible module to add or delete public ip addresses on an existing server or servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: protocol: description: diff --git a/plugins/modules/clc_server.py b/plugins/modules/clc_server.py index d8e4f16217..d2d019ff0d 100644 --- a/plugins/modules/clc_server.py +++ b/plugins/modules/clc_server.py @@ -14,6 +14,13 @@ module: clc_server short_description: Create, Delete, Start and Stop servers in CenturyLink Cloud description: - An Ansible module to Create, Delete, Start and Stop servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: additional_disks: description: diff --git a/plugins/modules/clc_server_snapshot.py b/plugins/modules/clc_server_snapshot.py index 096abfe29b..82b2a99568 100644 --- a/plugins/modules/clc_server_snapshot.py +++ b/plugins/modules/clc_server_snapshot.py @@ -14,6 +14,13 @@ module: clc_server_snapshot short_description: Create, Delete and Restore server snapshots in CenturyLink Cloud description: - An Ansible module to Create, Delete and Restore server snapshots in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server_ids: description: diff --git a/plugins/modules/hwc_ecs_instance.py b/plugins/modules/hwc_ecs_instance.py index 10d913f9b5..434db242f2 100644 --- a/plugins/modules/hwc_ecs_instance.py +++ b/plugins/modules/hwc_ecs_instance.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -225,7 +230,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_evs_disk.py b/plugins/modules/hwc_evs_disk.py index 7b5a99fb7f..7d445ddd21 100644 --- a/plugins/modules/hwc_evs_disk.py +++ b/plugins/modules/hwc_evs_disk.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -150,7 +155,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_network_vpc.py b/plugins/modules/hwc_network_vpc.py index 78f5925e0c..357fd55204 100644 --- a/plugins/modules/hwc_network_vpc.py +++ b/plugins/modules/hwc_network_vpc.py @@ -22,6 +22,11 @@ author: Huawei Inc. (@huaweicloud) requirements: - requests >= 2.18.4 - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -61,7 +66,8 @@ options: type: str required: true extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_smn_topic.py b/plugins/modules/hwc_smn_topic.py index 3752e1f18f..88207d3f93 100644 --- a/plugins/modules/hwc_smn_topic.py +++ b/plugins/modules/hwc_smn_topic.py @@ -22,6 +22,11 @@ author: Huawei Inc. (@huaweicloud) requirements: - requests >= 2.18.4 - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -45,7 +50,8 @@ options: type: str required: true extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_eip.py b/plugins/modules/hwc_vpc_eip.py index e14fb0e502..9fc0361b30 100644 --- a/plugins/modules/hwc_vpc_eip.py +++ b/plugins/modules/hwc_vpc_eip.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -121,7 +126,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_peering_connect.py b/plugins/modules/hwc_vpc_peering_connect.py index 01c52932ba..2d6832ce5d 100644 --- a/plugins/modules/hwc_vpc_peering_connect.py +++ b/plugins/modules/hwc_vpc_peering_connect.py @@ -23,6 +23,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -75,7 +80,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_port.py b/plugins/modules/hwc_vpc_port.py index aac9636f88..2d830493d4 100644 --- a/plugins/modules/hwc_vpc_port.py +++ b/plugins/modules/hwc_vpc_port.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -105,7 +110,8 @@ options: elements: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_private_ip.py b/plugins/modules/hwc_vpc_private_ip.py index e05c14f74d..c57ddc6708 100644 --- a/plugins/modules/hwc_vpc_private_ip.py +++ b/plugins/modules/hwc_vpc_private_ip.py @@ -19,13 +19,18 @@ description: - vpc private ip management. short_description: Creates a resource of Vpc/PrivateIP in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over I(subnet_id), I(ip_address) for private ip selection. - - I(subnet_id), I(ip_address) are used for private ip selection. If more than one private ip with this options exists, execution is aborted. - - No parameter support updating. If one of option is changed, the module will create a new resource. + - If I(id) option is provided, it takes precedence over I(subnet_id), I(ip_address) for private ip selection. + - I(subnet_id), I(ip_address) are used for private ip selection. If more than one private ip with this options exists, execution is aborted. + - No parameter support updating. If one of option is changed, the module will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -48,7 +53,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_route.py b/plugins/modules/hwc_vpc_route.py index e08a9ebf38..1612cac50d 100644 --- a/plugins/modules/hwc_vpc_route.py +++ b/plugins/modules/hwc_vpc_route.py @@ -19,13 +19,18 @@ description: - vpc route management. short_description: Creates a resource of Vpc/Route in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over I(destination), I(vpc_id), I(type) and I(next_hop) for route selection. - - I(destination), I(vpc_id), I(type) and I(next_hop) are used for route selection. If more than one route with this options exists, execution is aborted. - - No parameter support updating. If one of option is changed, the module will create a new resource. + - If I(id) option is provided, it takes precedence over I(destination), I(vpc_id), I(type) and I(next_hop) for route selection. + - I(destination), I(vpc_id), I(type) and I(next_hop) are used for route selection. If more than one route with this options exists, execution is aborted. + - No parameter support updating. If one of option is changed, the module will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -55,7 +60,8 @@ options: required: false default: 'peering' extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_security_group.py b/plugins/modules/hwc_vpc_security_group.py index 2338623890..c210b912d4 100644 --- a/plugins/modules/hwc_vpc_security_group.py +++ b/plugins/modules/hwc_vpc_security_group.py @@ -19,17 +19,22 @@ description: - vpc security group management. short_description: Creates a resource of Vpc/SecurityGroup in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over I(name), - I(enterprise_project_id) and I(vpc_id) for security group selection. - - I(name), I(enterprise_project_id) and I(vpc_id) are used for security - group selection. If more than one security group with this options exists, - execution is aborted. - - No parameter support updating. If one of option is changed, the module - will create a new resource. + - If I(id) option is provided, it takes precedence over I(name), + I(enterprise_project_id) and I(vpc_id) for security group selection. + - I(name), I(enterprise_project_id) and I(vpc_id) are used for security + group selection. If more than one security group with this options exists, + execution is aborted. + - No parameter support updating. If one of option is changed, the module + will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -58,7 +63,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_security_group_rule.py b/plugins/modules/hwc_vpc_security_group_rule.py index ca6e2e9de8..bfb5d6a615 100644 --- a/plugins/modules/hwc_vpc_security_group_rule.py +++ b/plugins/modules/hwc_vpc_security_group_rule.py @@ -19,17 +19,22 @@ description: - vpc security group management. short_description: Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over - I(enterprise_project_id) for security group rule selection. - - I(security_group_id) is used for security group rule selection. If more - than one security group rule with this options exists, execution is - aborted. - - No parameter support updating. If one of option is changed, the module - will create a new resource. + - If I(id) option is provided, it takes precedence over + I(enterprise_project_id) for security group rule selection. + - I(security_group_id) is used for security group rule selection. If more + than one security group rule with this options exists, execution is + aborted. + - No parameter support updating. If one of option is changed, the module + will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -100,7 +105,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_subnet.py b/plugins/modules/hwc_vpc_subnet.py index 4b192a5682..7fb107f534 100644 --- a/plugins/modules/hwc_vpc_subnet.py +++ b/plugins/modules/hwc_vpc_subnet.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -94,7 +99,8 @@ options: elements: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/lxd_container.py b/plugins/modules/lxd_container.py index 00649a076f..f10fc4872f 100644 --- a/plugins/modules/lxd_container.py +++ b/plugins/modules/lxd_container.py @@ -19,12 +19,12 @@ author: "Hiroaki Nakamura (@hnakamur)" extends_documentation_fragment: - community.general.attributes attributes: - check_mode: - support: full - version_added: 6.4.0 - diff_mode: - support: full - version_added: 6.4.0 + check_mode: + support: full + version_added: 6.4.0 + diff_mode: + support: full + version_added: 6.4.0 options: name: description: diff --git a/plugins/modules/lxd_profile.py b/plugins/modules/lxd_profile.py index 1410d16e02..45f499b784 100644 --- a/plugins/modules/lxd_profile.py +++ b/plugins/modules/lxd_profile.py @@ -16,6 +16,13 @@ short_description: Manage LXD profiles description: - Management of LXD profiles author: "Hiroaki Nakamura (@hnakamur)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/lxd_project.py b/plugins/modules/lxd_project.py index ad6019c2ec..983531fa08 100644 --- a/plugins/modules/lxd_project.py +++ b/plugins/modules/lxd_project.py @@ -15,6 +15,13 @@ version_added: 4.8.0 description: - Management of LXD projects. author: "Raymond Chang (@we10710aa)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: From cc3a79bc48be212c843a1599851c04835f8f113d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:23:04 +0100 Subject: [PATCH 0482/2104] Add attributes to some database modules (#5953) Add attributes to some database modules. --- plugins/modules/etcd3.py | 11 +++++++++-- plugins/modules/influxdb_database.py | 8 +++++++- plugins/modules/influxdb_query.py | 8 +++++++- plugins/modules/influxdb_retention_policy.py | 8 +++++++- plugins/modules/influxdb_user.py | 8 +++++++- plugins/modules/influxdb_write.py | 8 +++++++- plugins/modules/ldap_attrs.py | 8 +++++++- plugins/modules/ldap_entry.py | 8 +++++++- plugins/modules/ldap_passwd.py | 8 +++++++- plugins/modules/ldap_search.py | 8 +++++++- plugins/modules/mssql_db.py | 9 ++++++++- plugins/modules/mssql_script.py | 11 +++++++++++ plugins/modules/odbc.py | 7 +++++++ plugins/modules/redis.py | 6 ++++++ plugins/modules/redis_data.py | 6 ++++++ plugins/modules/redis_data_incr.py | 17 +++++++++++------ plugins/modules/riak.py | 11 +++++++++-- plugins/modules/vertica_configuration.py | 7 +++++++ plugins/modules/vertica_role.py | 7 +++++++ plugins/modules/vertica_schema.py | 7 +++++++ plugins/modules/vertica_user.py | 7 +++++++ 21 files changed, 158 insertions(+), 20 deletions(-) diff --git a/plugins/modules/etcd3.py b/plugins/modules/etcd3.py index 2a89c71968..9cd0274068 100644 --- a/plugins/modules/etcd3.py +++ b/plugins/modules/etcd3.py @@ -16,8 +16,15 @@ short_description: Set or delete key value pairs from an etcd3 cluster requirements: - etcd3 description: - - Sets or deletes values in etcd3 cluster using its v3 api. - - Needs python etcd3 lib to work + - Sets or deletes values in etcd3 cluster using its v3 api. + - Needs python etcd3 lib to work +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: key: type: str diff --git a/plugins/modules/influxdb_database.py b/plugins/modules/influxdb_database.py index 8ffbece606..046b16e18c 100644 --- a/plugins/modules/influxdb_database.py +++ b/plugins/modules/influxdb_database.py @@ -20,6 +20,11 @@ requirements: - "python >= 2.6" - "influxdb >= 0.9" - requests +attributes: + check_mode: + support: full + diff_mode: + support: none options: database_name: description: @@ -33,7 +38,8 @@ options: default: present type: str extends_documentation_fragment: -- community.general.influxdb + - community.general.influxdb + - community.general.attributes ''' diff --git a/plugins/modules/influxdb_query.py b/plugins/modules/influxdb_query.py index 14a65a60dc..c2e3d8acc4 100644 --- a/plugins/modules/influxdb_query.py +++ b/plugins/modules/influxdb_query.py @@ -18,6 +18,11 @@ author: "René Moser (@resmo)" requirements: - "python >= 2.6" - "influxdb >= 0.9" +attributes: + check_mode: + support: full + diff_mode: + support: none options: query: description: @@ -30,7 +35,8 @@ options: required: true type: str extends_documentation_fragment: -- community.general.influxdb + - community.general.influxdb + - community.general.attributes ''' diff --git a/plugins/modules/influxdb_retention_policy.py b/plugins/modules/influxdb_retention_policy.py index 1b7d7eec9a..28d5450ff0 100644 --- a/plugins/modules/influxdb_retention_policy.py +++ b/plugins/modules/influxdb_retention_policy.py @@ -20,6 +20,11 @@ requirements: - "python >= 2.6" - "influxdb >= 0.9" - requests +attributes: + check_mode: + support: full + diff_mode: + support: none options: database_name: description: @@ -64,7 +69,8 @@ options: type: str version_added: '2.0.0' extends_documentation_fragment: -- community.general.influxdb + - community.general.influxdb + - community.general.attributes ''' diff --git a/plugins/modules/influxdb_user.py b/plugins/modules/influxdb_user.py index 25bc2a95ce..e893fc0759 100644 --- a/plugins/modules/influxdb_user.py +++ b/plugins/modules/influxdb_user.py @@ -20,6 +20,11 @@ author: "Vitaliy Zhhuta (@zhhuta)" requirements: - "python >= 2.6" - "influxdb >= 0.9" +attributes: + check_mode: + support: full + diff_mode: + support: none options: user_name: description: @@ -52,7 +57,8 @@ options: type: list elements: dict extends_documentation_fragment: -- community.general.influxdb + - community.general.influxdb + - community.general.attributes ''' diff --git a/plugins/modules/influxdb_write.py b/plugins/modules/influxdb_write.py index 68e722ae1c..f95b6dae8c 100644 --- a/plugins/modules/influxdb_write.py +++ b/plugins/modules/influxdb_write.py @@ -18,6 +18,11 @@ author: "René Moser (@resmo)" requirements: - "python >= 2.6" - "influxdb >= 0.9" +attributes: + check_mode: + support: none + diff_mode: + support: none options: data_points: description: @@ -31,7 +36,8 @@ options: required: true type: str extends_documentation_fragment: -- community.general.influxdb + - community.general.influxdb + - community.general.attributes ''' diff --git a/plugins/modules/ldap_attrs.py b/plugins/modules/ldap_attrs.py index 61ae291956..01e8c0b9e1 100644 --- a/plugins/modules/ldap_attrs.py +++ b/plugins/modules/ldap_attrs.py @@ -40,6 +40,11 @@ author: - Maciej Delmanowski (@drybjed) requirements: - python-ldap +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: required: false @@ -68,7 +73,8 @@ options: attributes specified in the current task. This is useful mostly with I(olcAccess) attribute to easily manage LDAP Access Control Lists. extends_documentation_fragment: -- community.general.ldap.documentation + - community.general.ldap.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ldap_entry.py b/plugins/modules/ldap_entry.py index 8cacbc42c1..9179b5238b 100644 --- a/plugins/modules/ldap_entry.py +++ b/plugins/modules/ldap_entry.py @@ -30,6 +30,11 @@ author: - Jiri Tyr (@jtyr) requirements: - python-ldap +attributes: + check_mode: + support: full + diff_mode: + support: none options: attributes: description: @@ -59,7 +64,8 @@ options: default: false version_added: 4.6.0 extends_documentation_fragment: -- community.general.ldap.documentation + - community.general.ldap.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ldap_passwd.py b/plugins/modules/ldap_passwd.py index 029b5df252..f47fa330e3 100644 --- a/plugins/modules/ldap_passwd.py +++ b/plugins/modules/ldap_passwd.py @@ -28,13 +28,19 @@ author: - Keller Fuchs (@KellerFuchs) requirements: - python-ldap +attributes: + check_mode: + support: full + diff_mode: + support: none options: passwd: description: - The (plaintext) password to be set for I(dn). type: str extends_documentation_fragment: -- community.general.ldap.documentation + - community.general.ldap.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ldap_search.py b/plugins/modules/ldap_search.py index 02ba4d3529..32efd4edd6 100644 --- a/plugins/modules/ldap_search.py +++ b/plugins/modules/ldap_search.py @@ -27,6 +27,11 @@ author: - Sebastian Pfahl (@eryx12o45) requirements: - python-ldap +attributes: + check_mode: + support: full + diff_mode: + support: none options: dn: required: true @@ -57,7 +62,8 @@ options: - Set to C(true) to return the full attribute schema of entries, not their attribute values. Overrides I(attrs) when provided. extends_documentation_fragment: - - community.general.ldap.documentation + - community.general.ldap.documentation + - community.general.attributes """ EXAMPLES = r""" diff --git a/plugins/modules/mssql_db.py b/plugins/modules/mssql_db.py index 58a8c4dea9..4006033cf2 100644 --- a/plugins/modules/mssql_db.py +++ b/plugins/modules/mssql_db.py @@ -15,7 +15,14 @@ DOCUMENTATION = ''' module: mssql_db short_description: Add or remove MSSQL databases from a remote host description: - - Add or remove MSSQL databases from a remote host. + - Add or remove MSSQL databases from a remote host. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/mssql_script.py b/plugins/modules/mssql_script.py index 1a5f45736f..1696000db2 100644 --- a/plugins/modules/mssql_script.py +++ b/plugins/modules/mssql_script.py @@ -18,6 +18,17 @@ version_added: "4.0.0" description: - Execute SQL scripts on a MSSQL database. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: partial + details: + - The script will not be executed in check mode. + diff_mode: + support: none + options: name: description: Database to run script against. diff --git a/plugins/modules/odbc.py b/plugins/modules/odbc.py index 3b6e8ad226..fbc4b63ae5 100644 --- a/plugins/modules/odbc.py +++ b/plugins/modules/odbc.py @@ -16,6 +16,13 @@ version_added: "1.0.0" short_description: Execute SQL via ODBC description: - Read/Write info via ODBC drivers. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: dsn: description: diff --git a/plugins/modules/redis.py b/plugins/modules/redis.py index 298b3aaf8c..1778a067e4 100644 --- a/plugins/modules/redis.py +++ b/plugins/modules/redis.py @@ -16,6 +16,12 @@ description: - Unified utility to interact with redis instances. extends_documentation_fragment: - community.general.redis + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: command: description: diff --git a/plugins/modules/redis_data.py b/plugins/modules/redis_data.py index 633afbff54..c0c8dcc9a6 100644 --- a/plugins/modules/redis_data.py +++ b/plugins/modules/redis_data.py @@ -16,6 +16,11 @@ version_added: 3.7.0 description: - Set key value pairs in Redis database. author: "Andreas Botzner (@paginabianca)" +attributes: + check_mode: + support: full + diff_mode: + support: none options: key: description: @@ -59,6 +64,7 @@ options: extends_documentation_fragment: - community.general.redis.documentation + - community.general.attributes seealso: - module: community.general.redis_data_incr diff --git a/plugins/modules/redis_data_incr.py b/plugins/modules/redis_data_incr.py index 4d1c119349..f927fb11f0 100644 --- a/plugins/modules/redis_data_incr.py +++ b/plugins/modules/redis_data_incr.py @@ -17,9 +17,17 @@ description: - Increment integers or float keys in Redis database and get new value. - Default increment for all keys is 1. For specific increments use the I(increment_int) and I(increment_float) options. - - When using I(check_mode) the module will try to calculate the value that - Redis would return. If the key is not present, 0.0 is used as value. author: "Andreas Botzner (@paginabianca)" +attributes: + check_mode: + support: partial + details: + - For C(check_mode) to work, the specified I(redis_user) needs permission to + run the C(GET) command on the key, otherwise the module will fail. + - When using I(check_mode) the module will try to calculate the value that + Redis would return. If the key is not present, 0.0 is used as value. + diff_mode: + support: none options: key: description: @@ -42,10 +50,7 @@ options: extends_documentation_fragment: - community.general.redis.documentation - -notes: - - For C(check_mode) to work, the specified I(redis_user) needs permission to - run the C(GET) command on the key, otherwise the module will fail. + - community.general.attributes seealso: - module: community.general.redis_data diff --git a/plugins/modules/riak.py b/plugins/modules/riak.py index 38f1c33c78..024e5424d2 100644 --- a/plugins/modules/riak.py +++ b/plugins/modules/riak.py @@ -14,11 +14,18 @@ DOCUMENTATION = ''' module: riak short_description: This module handles some common Riak operations description: - - This module can be used to join nodes to a cluster, check - the status of the cluster. + - This module can be used to join nodes to a cluster, check + the status of the cluster. author: - "James Martin (@jsmartin)" - "Drew Kerrigan (@drewkerrigan)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: command: description: diff --git a/plugins/modules/vertica_configuration.py b/plugins/modules/vertica_configuration.py index 553630da39..09b80df3d7 100644 --- a/plugins/modules/vertica_configuration.py +++ b/plugins/modules/vertica_configuration.py @@ -14,6 +14,13 @@ module: vertica_configuration short_description: Updates Vertica configuration parameters description: - Updates Vertica configuration parameters. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: parameter: description: diff --git a/plugins/modules/vertica_role.py b/plugins/modules/vertica_role.py index dde9919511..704594a128 100644 --- a/plugins/modules/vertica_role.py +++ b/plugins/modules/vertica_role.py @@ -15,6 +15,13 @@ module: vertica_role short_description: Adds or removes Vertica database roles and assigns roles to them description: - Adds or removes Vertica database role and, optionally, assign other roles. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: role: description: diff --git a/plugins/modules/vertica_schema.py b/plugins/modules/vertica_schema.py index 3c4071473a..01f8f721e7 100644 --- a/plugins/modules/vertica_schema.py +++ b/plugins/modules/vertica_schema.py @@ -20,6 +20,13 @@ description: - In such a situation, if the module tries to remove the schema it will fail and only remove roles created for the schema if they have no dependencies. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: schema: description: diff --git a/plugins/modules/vertica_user.py b/plugins/modules/vertica_user.py index 89f1cb92a3..a6a5b59516 100644 --- a/plugins/modules/vertica_user.py +++ b/plugins/modules/vertica_user.py @@ -17,6 +17,13 @@ description: - A user will not be removed until all the dependencies have been dropped. - In such a situation, if the module tries to remove the user it will fail and only remove roles granted to the user. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: user: description: From e944a67c182df970f407e272741d46ea0724912f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:23:28 +0100 Subject: [PATCH 0483/2104] Add attributes to manageiq, udm, utm, and webfaction modules (#5955) Add attributes to manageiq, udm, utm, and webfaction modules. --- plugins/modules/manageiq_alert_profiles.py | 9 ++++++++- plugins/modules/manageiq_alerts.py | 9 ++++++++- plugins/modules/manageiq_group.py | 11 +++++++++-- plugins/modules/manageiq_policies.py | 9 ++++++++- plugins/modules/manageiq_provider.py | 9 ++++++++- plugins/modules/manageiq_tags.py | 9 ++++++++- plugins/modules/manageiq_tenant.py | 10 ++++++++-- plugins/modules/manageiq_user.py | 9 ++++++++- plugins/modules/udm_dns_record.py | 10 ++++++++-- plugins/modules/udm_dns_zone.py | 11 ++++++++--- plugins/modules/udm_group.py | 11 ++++++++--- plugins/modules/udm_share.py | 11 ++++++++--- plugins/modules/udm_user.py | 11 ++++++++--- plugins/modules/utm_aaa_group.py | 6 ++++++ plugins/modules/utm_ca_host_key_cert.py | 6 ++++++ plugins/modules/utm_dns_host.py | 6 ++++++ plugins/modules/utm_network_interface_address.py | 6 ++++++ plugins/modules/utm_proxy_auth_profile.py | 6 ++++++ plugins/modules/utm_proxy_exception.py | 6 ++++++ plugins/modules/utm_proxy_frontend.py | 6 ++++++ plugins/modules/utm_proxy_location.py | 6 ++++++ plugins/modules/webfaction_app.py | 9 +++++++++ plugins/modules/webfaction_db.py | 7 +++++++ plugins/modules/webfaction_domain.py | 9 +++++++++ plugins/modules/webfaction_mailbox.py | 10 ++++++++++ plugins/modules/webfaction_site.py | 9 +++++++++ 26 files changed, 197 insertions(+), 24 deletions(-) diff --git a/plugins/modules/manageiq_alert_profiles.py b/plugins/modules/manageiq_alert_profiles.py index 1ea5c57b09..c6cefad6a8 100644 --- a/plugins/modules/manageiq_alert_profiles.py +++ b/plugins/modules/manageiq_alert_profiles.py @@ -14,12 +14,19 @@ module: manageiq_alert_profiles short_description: Configuration of alert profiles for ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Elad Alfassa (@elad661) description: - The manageiq_alert_profiles module supports adding, updating and deleting alert profiles in ManageIQ. +attributes: + check_mode: + support: none + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/manageiq_alerts.py b/plugins/modules/manageiq_alerts.py index d12ebd6ea6..518b29f1f3 100644 --- a/plugins/modules/manageiq_alerts.py +++ b/plugins/modules/manageiq_alerts.py @@ -14,12 +14,19 @@ module: manageiq_alerts short_description: Configuration of alerts in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Elad Alfassa (@elad661) description: - The manageiq_alerts module supports adding, updating and deleting alerts in ManageIQ. +attributes: + check_mode: + support: none + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/manageiq_group.py b/plugins/modules/manageiq_group.py index 5772c19a7e..a142a939fe 100644 --- a/plugins/modules/manageiq_group.py +++ b/plugins/modules/manageiq_group.py @@ -14,13 +14,20 @@ module: manageiq_group short_description: Management of groups in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Evert Mulder (@evertmulder) description: - The manageiq_group module supports adding, updating and deleting groups in ManageIQ. requirements: -- manageiq-client + - manageiq-client + +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: diff --git a/plugins/modules/manageiq_policies.py b/plugins/modules/manageiq_policies.py index fa96fc950f..7d05f2dfad 100644 --- a/plugins/modules/manageiq_policies.py +++ b/plugins/modules/manageiq_policies.py @@ -15,12 +15,19 @@ module: manageiq_policies short_description: Management of resource policy_profiles in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Daniel Korn (@dkorn) description: - The manageiq_policies module supports adding and deleting policy_profiles in ManageIQ. +attributes: + check_mode: + support: none + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/manageiq_provider.py b/plugins/modules/manageiq_provider.py index 5eb6d779ac..bbc27214b7 100644 --- a/plugins/modules/manageiq_provider.py +++ b/plugins/modules/manageiq_provider.py @@ -13,12 +13,19 @@ DOCUMENTATION = ''' module: manageiq_provider short_description: Management of provider in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Daniel Korn (@dkorn) description: - The manageiq_provider module supports adding, updating, and deleting provider in ManageIQ. +attributes: + check_mode: + support: none + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/manageiq_tags.py b/plugins/modules/manageiq_tags.py index 5e6b944533..8631ac46a4 100644 --- a/plugins/modules/manageiq_tags.py +++ b/plugins/modules/manageiq_tags.py @@ -15,12 +15,19 @@ module: manageiq_tags short_description: Management of resource tags in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Daniel Korn (@dkorn) description: - The manageiq_tags module supports adding, updating and deleting tags in ManageIQ. +attributes: + check_mode: + support: none + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/manageiq_tenant.py b/plugins/modules/manageiq_tenant.py index f3700d2492..d68e26a735 100644 --- a/plugins/modules/manageiq_tenant.py +++ b/plugins/modules/manageiq_tenant.py @@ -14,13 +14,19 @@ module: manageiq_tenant short_description: Management of tenants in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Evert Mulder (@evertmulder) description: - The manageiq_tenant module supports adding, updating and deleting tenants in ManageIQ. requirements: -- manageiq-client + - manageiq-client +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/manageiq_user.py b/plugins/modules/manageiq_user.py index 9910e092e0..0d3d8718b4 100644 --- a/plugins/modules/manageiq_user.py +++ b/plugins/modules/manageiq_user.py @@ -14,12 +14,19 @@ module: manageiq_user short_description: Management of users in ManageIQ extends_documentation_fragment: -- community.general.manageiq + - community.general.manageiq + - community.general.attributes author: Daniel Korn (@dkorn) description: - The manageiq_user module supports adding, updating and deleting users in ManageIQ. +attributes: + check_mode: + support: none + diff_mode: + support: none + options: state: type: str diff --git a/plugins/modules/udm_dns_record.py b/plugins/modules/udm_dns_record.py index 13eb4feed4..458a8e4ba5 100644 --- a/plugins/modules/udm_dns_record.py +++ b/plugins/modules/udm_dns_record.py @@ -14,15 +14,21 @@ DOCUMENTATION = ''' --- module: udm_dns_record author: -- Tobias Rüetschi (@keachi) + - Tobias Rüetschi (@keachi) short_description: Manage dns entries on a univention corporate server description: - "This module allows to manage dns records on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it." requirements: - - Python >= 2.6 - Univention - ipaddress (for I(type=ptr_record)) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: partial options: state: type: str diff --git a/plugins/modules/udm_dns_zone.py b/plugins/modules/udm_dns_zone.py index b75cbe95ac..19f24fa1c2 100644 --- a/plugins/modules/udm_dns_zone.py +++ b/plugins/modules/udm_dns_zone.py @@ -14,13 +14,18 @@ DOCUMENTATION = ''' --- module: udm_dns_zone author: -- Tobias Rüetschi (@keachi) + - Tobias Rüetschi (@keachi) short_description: Manage dns zones on a univention corporate server description: - "This module allows to manage dns zones on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it." -requirements: - - Python >= 2.6 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: partial options: state: type: str diff --git a/plugins/modules/udm_group.py b/plugins/modules/udm_group.py index 74916cfee2..5fe2422f8b 100644 --- a/plugins/modules/udm_group.py +++ b/plugins/modules/udm_group.py @@ -14,13 +14,18 @@ DOCUMENTATION = ''' --- module: udm_group author: -- Tobias Rüetschi (@keachi) + - Tobias Rüetschi (@keachi) short_description: Manage of the posix group description: - "This module allows to manage user groups on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it." -requirements: - - Python >= 2.6 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: partial options: state: required: false diff --git a/plugins/modules/udm_share.py b/plugins/modules/udm_share.py index 8120df1b00..2743913351 100644 --- a/plugins/modules/udm_share.py +++ b/plugins/modules/udm_share.py @@ -14,14 +14,19 @@ DOCUMENTATION = ''' --- module: udm_share author: -- Tobias Rüetschi (@keachi) + - Tobias Rüetschi (@keachi) short_description: Manage samba shares on a univention corporate server description: - "This module allows to manage samba shares on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it." -requirements: - - Python >= 2.6 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: partial options: state: default: "present" diff --git a/plugins/modules/udm_user.py b/plugins/modules/udm_user.py index 96bbdfbc10..05c5ad359d 100644 --- a/plugins/modules/udm_user.py +++ b/plugins/modules/udm_user.py @@ -14,14 +14,19 @@ DOCUMENTATION = r''' --- module: udm_user author: -- Tobias Rüetschi (@keachi) + - Tobias Rüetschi (@keachi) short_description: Manage posix users on a univention corporate server description: - "This module allows to manage posix users on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it." -requirements: - - Python >= 2.6 +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: partial options: state: default: "present" diff --git a/plugins/modules/utm_aaa_group.py b/plugins/modules/utm_aaa_group.py index 3d5cbc2007..9c595284da 100644 --- a/plugins/modules/utm_aaa_group.py +++ b/plugins/modules/utm_aaa_group.py @@ -21,6 +21,11 @@ description: - Create, update or destroy an aaa group object in Sophos UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -112,6 +117,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/utm_ca_host_key_cert.py b/plugins/modules/utm_ca_host_key_cert.py index 318bc1fd31..b944e83124 100644 --- a/plugins/modules/utm_ca_host_key_cert.py +++ b/plugins/modules/utm_ca_host_key_cert.py @@ -22,6 +22,11 @@ description: - Create, update or destroy a ca host_key_cert entry in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -60,6 +65,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/utm_dns_host.py b/plugins/modules/utm_dns_host.py index 3a1744651a..6b3725557b 100644 --- a/plugins/modules/utm_dns_host.py +++ b/plugins/modules/utm_dns_host.py @@ -21,6 +21,11 @@ description: - Create, update or destroy a dns entry in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -70,6 +75,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/utm_network_interface_address.py b/plugins/modules/utm_network_interface_address.py index e980a0221b..a85a46aeab 100644 --- a/plugins/modules/utm_network_interface_address.py +++ b/plugins/modules/utm_network_interface_address.py @@ -21,6 +21,11 @@ description: - Create, update or destroy a network/interface_address object in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -54,6 +59,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/utm_proxy_auth_profile.py b/plugins/modules/utm_proxy_auth_profile.py index 0c53a92380..ef3fc341a3 100644 --- a/plugins/modules/utm_proxy_auth_profile.py +++ b/plugins/modules/utm_proxy_auth_profile.py @@ -22,6 +22,11 @@ description: - Create, update or destroy a reverse_proxy auth_profile entry in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -185,6 +190,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/utm_proxy_exception.py b/plugins/modules/utm_proxy_exception.py index f322bc8216..a0a3f85b5b 100644 --- a/plugins/modules/utm_proxy_exception.py +++ b/plugins/modules/utm_proxy_exception.py @@ -22,6 +22,11 @@ description: - Create, update or destroy a reverse_proxy exception entry in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -123,6 +128,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/utm_proxy_frontend.py b/plugins/modules/utm_proxy_frontend.py index 127c7d4d43..22a773fef8 100644 --- a/plugins/modules/utm_proxy_frontend.py +++ b/plugins/modules/utm_proxy_frontend.py @@ -22,6 +22,11 @@ description: - Create, update or destroy a reverse_proxy frontend entry in Sophos UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -138,6 +143,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/utm_proxy_location.py b/plugins/modules/utm_proxy_location.py index 0efeea5a27..c22de7b927 100644 --- a/plugins/modules/utm_proxy_location.py +++ b/plugins/modules/utm_proxy_location.py @@ -22,6 +22,11 @@ description: - Create, update or destroy a reverse_proxy location entry in SOPHOS UTM. - This module needs to have the REST Ability of the UTM to be activated. +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: @@ -104,6 +109,7 @@ options: extends_documentation_fragment: - community.general.utm +- community.general.attributes ''' diff --git a/plugins/modules/webfaction_app.py b/plugins/modules/webfaction_app.py index b2fe7f892d..7a47026755 100644 --- a/plugins/modules/webfaction_app.py +++ b/plugins/modules/webfaction_app.py @@ -31,6 +31,15 @@ notes: your host, you may want to add C(serial: 1) to the plays. - See `the webfaction API `_ for more info. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: name: description: diff --git a/plugins/modules/webfaction_db.py b/plugins/modules/webfaction_db.py index 868f1f66a2..c4742cb217 100644 --- a/plugins/modules/webfaction_db.py +++ b/plugins/modules/webfaction_db.py @@ -27,6 +27,13 @@ notes: The location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays. - See `the webfaction API `_ for more info. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: diff --git a/plugins/modules/webfaction_domain.py b/plugins/modules/webfaction_domain.py index 79485d629c..9bffec3cd1 100644 --- a/plugins/modules/webfaction_domain.py +++ b/plugins/modules/webfaction_domain.py @@ -27,6 +27,15 @@ notes: your host, you may want to add C(serial: 1) to the plays. - See `the webfaction API `_ for more info. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: name: diff --git a/plugins/modules/webfaction_mailbox.py b/plugins/modules/webfaction_mailbox.py index 0df4e8ced0..2b543c5b1d 100644 --- a/plugins/modules/webfaction_mailbox.py +++ b/plugins/modules/webfaction_mailbox.py @@ -24,6 +24,16 @@ notes: The location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays. - See `the webfaction API `_ for more info. + +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: mailbox_name: diff --git a/plugins/modules/webfaction_site.py b/plugins/modules/webfaction_site.py index 4e6f317e87..385f552115 100644 --- a/plugins/modules/webfaction_site.py +++ b/plugins/modules/webfaction_site.py @@ -28,6 +28,15 @@ notes: your host, you may want to add C(serial: 1) to the plays. - See `the webfaction API `_ for more info. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: name: From bad4b4b086e4a092658830d65c3c1a83d0b274cd Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:23:43 +0100 Subject: [PATCH 0484/2104] Add attributes to source control modules (#5956) Add attributes to source control modules. --- plugins/modules/bitbucket_access_key.py | 6 ++++++ plugins/modules/bitbucket_pipeline_key_pair.py | 6 ++++++ plugins/modules/bitbucket_pipeline_known_host.py | 8 +++++++- plugins/modules/bitbucket_pipeline_variable.py | 6 ++++++ plugins/modules/bzr.py | 7 +++++++ plugins/modules/hg.py | 7 +++++++ 6 files changed, 39 insertions(+), 1 deletion(-) diff --git a/plugins/modules/bitbucket_access_key.py b/plugins/modules/bitbucket_access_key.py index 0708777a0a..5ef199f7a4 100644 --- a/plugins/modules/bitbucket_access_key.py +++ b/plugins/modules/bitbucket_access_key.py @@ -18,6 +18,12 @@ author: - Evgeniy Krysanov (@catcombo) extends_documentation_fragment: - community.general.bitbucket + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: repository: description: diff --git a/plugins/modules/bitbucket_pipeline_key_pair.py b/plugins/modules/bitbucket_pipeline_key_pair.py index db4453d45c..d39c054b11 100644 --- a/plugins/modules/bitbucket_pipeline_key_pair.py +++ b/plugins/modules/bitbucket_pipeline_key_pair.py @@ -18,6 +18,12 @@ author: - Evgeniy Krysanov (@catcombo) extends_documentation_fragment: - community.general.bitbucket + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: repository: description: diff --git a/plugins/modules/bitbucket_pipeline_known_host.py b/plugins/modules/bitbucket_pipeline_known_host.py index e573719362..28ff487398 100644 --- a/plugins/modules/bitbucket_pipeline_known_host.py +++ b/plugins/modules/bitbucket_pipeline_known_host.py @@ -19,8 +19,14 @@ author: - Evgeniy Krysanov (@catcombo) extends_documentation_fragment: - community.general.bitbucket + - community.general.attributes requirements: - - paramiko + - paramiko +attributes: + check_mode: + support: full + diff_mode: + support: none options: repository: description: diff --git a/plugins/modules/bitbucket_pipeline_variable.py b/plugins/modules/bitbucket_pipeline_variable.py index 45661d8dee..eac0d18dda 100644 --- a/plugins/modules/bitbucket_pipeline_variable.py +++ b/plugins/modules/bitbucket_pipeline_variable.py @@ -18,6 +18,12 @@ author: - Evgeniy Krysanov (@catcombo) extends_documentation_fragment: - community.general.bitbucket + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: repository: description: diff --git a/plugins/modules/bzr.py b/plugins/modules/bzr.py index 7832183806..e7aca7c6bb 100644 --- a/plugins/modules/bzr.py +++ b/plugins/modules/bzr.py @@ -17,6 +17,13 @@ author: short_description: Deploy software (or files) from bzr branches description: - Manage I(bzr) branches to deploy files or software. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/hg.py b/plugins/modules/hg.py index 777feaa059..dbbd504b4e 100644 --- a/plugins/modules/hg.py +++ b/plugins/modules/hg.py @@ -16,6 +16,13 @@ short_description: Manages Mercurial (hg) repositories description: - Manages Mercurial (hg) repositories. Supports SSH, HTTP/S and local address. author: "Yeukhon Wong (@yeukhon)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: repo: description: From 1f1ae558f9cee4b2984660d70987e1afb3fb8a8d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:23:56 +0100 Subject: [PATCH 0485/2104] Add attributes to consul, datadog, jenkins, pagerduty, rundeck, and sensu modules (#5957) * Add attributes to consul, datadog, jenkins, pagerduty, rundeck, and sensu modules. * Fix error. --- plugins/modules/consul.py | 7 +++++++ plugins/modules/consul_acl.py | 7 +++++++ plugins/modules/consul_kv.py | 7 +++++++ plugins/modules/consul_session.py | 9 ++++++++- plugins/modules/datadog_downtime.py | 7 +++++++ plugins/modules/datadog_event.py | 15 +++++++++++---- plugins/modules/datadog_monitor.py | 7 +++++++ plugins/modules/jenkins_build.py | 7 +++++++ plugins/modules/jenkins_job.py | 7 +++++++ plugins/modules/jenkins_plugin.py | 11 +++++++++-- plugins/modules/jenkins_script.py | 9 +++++++++ plugins/modules/pagerduty.py | 7 +++++++ plugins/modules/pagerduty_alert.py | 7 +++++++ plugins/modules/pagerduty_change.py | 11 +++++++++-- plugins/modules/pagerduty_user.py | 9 +++++++-- plugins/modules/rundeck_acl_policy.py | 9 ++++++++- plugins/modules/rundeck_job_run.py | 8 +++++++- plugins/modules/rundeck_project.py | 9 ++++++++- plugins/modules/sensu_check.py | 7 +++++++ plugins/modules/sensu_client.py | 7 +++++++ plugins/modules/sensu_handler.py | 7 +++++++ plugins/modules/sensu_silence.py | 7 +++++++ plugins/modules/sensu_subscription.py | 7 +++++++ 23 files changed, 174 insertions(+), 14 deletions(-) diff --git a/plugins/modules/consul.py b/plugins/modules/consul.py index dea853b98e..cc599be36d 100644 --- a/plugins/modules/consul.py +++ b/plugins/modules/consul.py @@ -33,6 +33,13 @@ requirements: - python-consul - requests author: "Steve Gargan (@sgargan)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/consul_acl.py b/plugins/modules/consul_acl.py index b9f14db164..91f955228a 100644 --- a/plugins/modules/consul_acl.py +++ b/plugins/modules/consul_acl.py @@ -19,6 +19,13 @@ description: author: - Steve Gargan (@sgargan) - Colin Nolan (@colin-nolan) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: mgmt_token: description: diff --git a/plugins/modules/consul_kv.py b/plugins/modules/consul_kv.py index 3419e3322b..a4457f2445 100644 --- a/plugins/modules/consul_kv.py +++ b/plugins/modules/consul_kv.py @@ -26,6 +26,13 @@ requirements: author: - Steve Gargan (@sgargan) - Colin Nolan (@colin-nolan) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/consul_session.py b/plugins/modules/consul_session.py index 062eb3befe..246d13846f 100644 --- a/plugins/modules/consul_session.py +++ b/plugins/modules/consul_session.py @@ -20,7 +20,14 @@ requirements: - python-consul - requests author: -- Steve Gargan (@sgargan) + - Steve Gargan (@sgargan) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: id: description: diff --git a/plugins/modules/datadog_downtime.py b/plugins/modules/datadog_downtime.py index 8a1acf7e83..fd8421431d 100644 --- a/plugins/modules/datadog_downtime.py +++ b/plugins/modules/datadog_downtime.py @@ -22,6 +22,13 @@ author: requirements: - datadog-api-client - Python 3.6+ +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: description: diff --git a/plugins/modules/datadog_event.py b/plugins/modules/datadog_event.py index 0a669c4a81..b8161eca64 100644 --- a/plugins/modules/datadog_event.py +++ b/plugins/modules/datadog_event.py @@ -19,11 +19,18 @@ DOCUMENTATION = ''' module: datadog_event short_description: Posts events to Datadog service description: -- "Allows to post events to Datadog (www.datadoghq.com) service." -- "Uses http://docs.datadoghq.com/api/#events API." + - "Allows to post events to Datadog (www.datadoghq.com) service." + - "Uses http://docs.datadoghq.com/api/#events API." author: -- "Artūras 'arturaz' Šlajus (@arturaz)" -- "Naoya Nakazawa (@n0ts)" + - "Artūras 'arturaz' Šlajus (@arturaz)" + - "Naoya Nakazawa (@n0ts)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: type: str diff --git a/plugins/modules/datadog_monitor.py b/plugins/modules/datadog_monitor.py index ef6aa84255..f58df358b7 100644 --- a/plugins/modules/datadog_monitor.py +++ b/plugins/modules/datadog_monitor.py @@ -19,6 +19,13 @@ description: - The type C(event-v2) was added in community.general 4.8.0. author: Sebastian Kornehl (@skornehl) requirements: [datadog] +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: description: diff --git a/plugins/modules/jenkins_build.py b/plugins/modules/jenkins_build.py index b02027f229..4f95202244 100644 --- a/plugins/modules/jenkins_build.py +++ b/plugins/modules/jenkins_build.py @@ -20,6 +20,13 @@ requirements: author: - Brett Milford (@brettmilford) - Tong He (@unnecessary-username) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: args: description: diff --git a/plugins/modules/jenkins_job.py b/plugins/modules/jenkins_job.py index 0ea52ab36b..09b006448e 100644 --- a/plugins/modules/jenkins_job.py +++ b/plugins/modules/jenkins_job.py @@ -17,6 +17,13 @@ description: requirements: - "python-jenkins >= 0.4.12" author: "Sergio Millan Rodriguez (@sermilrod)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: config: type: str diff --git a/plugins/modules/jenkins_plugin.py b/plugins/modules/jenkins_plugin.py index 9c4c42e675..b3ebf3f93c 100644 --- a/plugins/modules/jenkins_plugin.py +++ b/plugins/modules/jenkins_plugin.py @@ -17,6 +17,12 @@ short_description: Add or remove Jenkins plugin description: - Ansible module which helps to manage Jenkins plugins. +attributes: + check_mode: + support: full + diff_mode: + support: none + options: group: type: str @@ -129,8 +135,9 @@ notes: parameter to point to the Jenkins server. The module must be used on the host where Jenkins runs as it needs direct access to the plugin files. extends_documentation_fragment: - - url - - files + - ansible.builtin.url + - ansible.builtin.files + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/jenkins_script.py b/plugins/modules/jenkins_script.py index 58d8e2c642..7f83ebcdbd 100644 --- a/plugins/modules/jenkins_script.py +++ b/plugins/modules/jenkins_script.py @@ -18,6 +18,15 @@ description: - The C(jenkins_script) module takes a script plus a dict of values to use within the script and returns the result of the script being run. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: none + diff_mode: + support: none + options: script: type: str diff --git a/plugins/modules/pagerduty.py b/plugins/modules/pagerduty.py index 7df9cc1d16..bed3629bef 100644 --- a/plugins/modules/pagerduty.py +++ b/plugins/modules/pagerduty.py @@ -22,6 +22,13 @@ author: - "Bruce Pennypacker (@bpennypacker)" requirements: - PagerDuty API access +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/pagerduty_alert.py b/plugins/modules/pagerduty_alert.py index e6bd7a3c0c..45bec92c6d 100644 --- a/plugins/modules/pagerduty_alert.py +++ b/plugins/modules/pagerduty_alert.py @@ -18,6 +18,13 @@ author: - "Amanpreet Singh (@ApsOps)" requirements: - PagerDuty API access +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/pagerduty_change.py b/plugins/modules/pagerduty_change.py index 104e76e66a..6af5d58eae 100644 --- a/plugins/modules/pagerduty_change.py +++ b/plugins/modules/pagerduty_change.py @@ -19,6 +19,15 @@ author: - Adam Vaughan (@adamvaughan) requirements: - PagerDuty integration key +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + details: + - Check mode simply does nothing except returning C(changed=true) in case the I(url) seems to be correct. + diff_mode: + support: none options: integration_key: description: @@ -78,8 +87,6 @@ options: required: false default: true type: bool -notes: - - Supports C(check_mode). Note that check mode simply does nothing except returning C(changed=true) in case the I(url) seems to be correct. ''' EXAMPLES = ''' diff --git a/plugins/modules/pagerduty_user.py b/plugins/modules/pagerduty_user.py index e16fe59e76..9c9805bff3 100644 --- a/plugins/modules/pagerduty_user.py +++ b/plugins/modules/pagerduty_user.py @@ -19,6 +19,13 @@ author: Zainab Alsaffar (@zanssa) requirements: - pdpyras python module = 4.1.1 - PagerDuty API Access +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: access_token: description: @@ -56,8 +63,6 @@ options: - Required if I(state=present). type: list elements: str -notes: - - Supports C(check_mode). ''' EXAMPLES = r''' diff --git a/plugins/modules/rundeck_acl_policy.py b/plugins/modules/rundeck_acl_policy.py index 4830c44784..4f7e3ab8dc 100644 --- a/plugins/modules/rundeck_acl_policy.py +++ b/plugins/modules/rundeck_acl_policy.py @@ -19,6 +19,11 @@ short_description: Manage Rundeck ACL policies description: - Create, update and remove Rundeck ACL policies through HTTP API. author: "Loic Blot (@nerzhul)" +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str @@ -76,7 +81,9 @@ options: version_added: '0.2.0' validate_certs: version_added: '0.2.0' -extends_documentation_fragment: url +extends_documentation_fragment: + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/rundeck_job_run.py b/plugins/modules/rundeck_job_run.py index 0416d86fa7..894f1bb6f9 100644 --- a/plugins/modules/rundeck_job_run.py +++ b/plugins/modules/rundeck_job_run.py @@ -17,6 +17,11 @@ description: - This module runs a Rundeck job specified by ID. author: "Phillipe Smith (@phsmith)" version_added: 3.8.0 +attributes: + check_mode: + support: none + diff_mode: + support: none options: job_id: type: str @@ -68,7 +73,8 @@ options: default: false extends_documentation_fragment: - community.general.rundeck - - url + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/rundeck_project.py b/plugins/modules/rundeck_project.py index 2039a00a02..2065a7d936 100644 --- a/plugins/modules/rundeck_project.py +++ b/plugins/modules/rundeck_project.py @@ -21,6 +21,11 @@ short_description: Manage Rundeck projects description: - Create and remove Rundeck projects through HTTP API. author: "Loic Blot (@nerzhul)" +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str @@ -67,7 +72,9 @@ options: version_added: '0.2.0' validate_certs: version_added: '0.2.0' -extends_documentation_fragment: url +extends_documentation_fragment: + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/sensu_check.py b/plugins/modules/sensu_check.py index 07b7a060e1..1ac2316a84 100644 --- a/plugins/modules/sensu_check.py +++ b/plugins/modules/sensu_check.py @@ -18,6 +18,13 @@ description: - Most options do not have a default and will not be added to the check definition unless specified. - All defaults except I(path), I(state), I(backup) and I(metric) are not managed by this module, - they are simply specified for your convenience. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/sensu_client.py b/plugins/modules/sensu_client.py index ffd1fe9fbd..2e0bd12eec 100644 --- a/plugins/modules/sensu_client.py +++ b/plugins/modules/sensu_client.py @@ -16,6 +16,13 @@ short_description: Manages Sensu client configuration description: - Manages Sensu client configuration. - 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/clients.html)' +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/sensu_handler.py b/plugins/modules/sensu_handler.py index 15e63e57d3..bbb8dc6129 100644 --- a/plugins/modules/sensu_handler.py +++ b/plugins/modules/sensu_handler.py @@ -16,6 +16,13 @@ short_description: Manages Sensu handler configuration description: - Manages Sensu handler configuration - 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/handlers.html)' +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/sensu_silence.py b/plugins/modules/sensu_silence.py index c5ed10e36d..14c664755d 100644 --- a/plugins/modules/sensu_silence.py +++ b/plugins/modules/sensu_silence.py @@ -17,6 +17,13 @@ short_description: Manage Sensu silence entries description: - Create and clear (delete) a silence entries via the Sensu API for subscriptions and checks. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: check: type: str diff --git a/plugins/modules/sensu_subscription.py b/plugins/modules/sensu_subscription.py index a84d805221..0077e2ffa6 100644 --- a/plugins/modules/sensu_subscription.py +++ b/plugins/modules/sensu_subscription.py @@ -15,6 +15,13 @@ module: sensu_subscription short_description: Manage Sensu subscriptions description: - Manage which I(sensu channels) a machine should subscribe to +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str From 5b9ee78610bceef072131cd35e990ca3f09dd62e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:24:13 +0100 Subject: [PATCH 0486/2104] Add attributes to aix and ibm modules (#5959) Add attributes to aix and ibm modules. --- plugins/modules/aix_devices.py | 7 +++++++ plugins/modules/aix_filesystem.py | 7 +++++++ plugins/modules/aix_inittab.py | 9 ++++++++- plugins/modules/aix_lvg.py | 11 +++++++++-- plugins/modules/aix_lvol.py | 7 +++++++ plugins/modules/ibm_sa_domain.py | 10 ++++++++-- plugins/modules/ibm_sa_host.py | 10 ++++++++-- plugins/modules/ibm_sa_host_ports.py | 9 ++++++++- plugins/modules/ibm_sa_pool.py | 10 ++++++++-- plugins/modules/ibm_sa_vol.py | 10 ++++++++-- plugins/modules/ibm_sa_vol_map.py | 10 ++++++++-- 11 files changed, 86 insertions(+), 14 deletions(-) diff --git a/plugins/modules/aix_devices.py b/plugins/modules/aix_devices.py index be23937baa..721c36d6aa 100644 --- a/plugins/modules/aix_devices.py +++ b/plugins/modules/aix_devices.py @@ -16,6 +16,13 @@ module: aix_devices short_description: Manages AIX devices description: - This module discovers, defines, removes and modifies attributes of AIX devices. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: attributes: description: diff --git a/plugins/modules/aix_filesystem.py b/plugins/modules/aix_filesystem.py index 77d065a59a..b1f363a937 100644 --- a/plugins/modules/aix_filesystem.py +++ b/plugins/modules/aix_filesystem.py @@ -19,6 +19,13 @@ description: - This module creates, removes, mount and unmount LVM and NFS file system for AIX using C(/etc/filesystems). - For LVM file systems is possible to resize a file system. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: account_subsystem: description: diff --git a/plugins/modules/aix_inittab.py b/plugins/modules/aix_inittab.py index 57ef4758cb..c2c9681895 100644 --- a/plugins/modules/aix_inittab.py +++ b/plugins/modules/aix_inittab.py @@ -11,11 +11,18 @@ __metaclass__ = type DOCUMENTATION = r''' --- author: -- Joris Weijters (@molekuul) + - Joris Weijters (@molekuul) module: aix_inittab short_description: Manages the inittab on AIX description: - Manages the inittab on AIX. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/aix_lvg.py b/plugins/modules/aix_lvg.py index 44ad631236..d89c43de4b 100644 --- a/plugins/modules/aix_lvg.py +++ b/plugins/modules/aix_lvg.py @@ -11,11 +11,18 @@ __metaclass__ = type DOCUMENTATION = r''' --- author: -- Kairo Araujo (@kairoaraujo) + - Kairo Araujo (@kairoaraujo) module: aix_lvg short_description: Manage LVM volume groups on AIX description: -- This module creates, removes or resize volume groups on AIX LVM. + - This module creates, removes or resize volume groups on AIX LVM. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: force: description: diff --git a/plugins/modules/aix_lvol.py b/plugins/modules/aix_lvol.py index 6219bdb8e3..0a4a6eff53 100644 --- a/plugins/modules/aix_lvol.py +++ b/plugins/modules/aix_lvol.py @@ -17,6 +17,13 @@ module: aix_lvol short_description: Configure AIX LVM logical volumes description: - This module creates, removes or resizes AIX logical volumes. Inspired by lvol module. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: vg: description: diff --git a/plugins/modules/ibm_sa_domain.py b/plugins/modules/ibm_sa_domain.py index 26e4b7e47c..774f29134c 100644 --- a/plugins/modules/ibm_sa_domain.py +++ b/plugins/modules/ibm_sa_domain.py @@ -18,6 +18,12 @@ short_description: Manages domains on IBM Spectrum Accelerate Family storage sys description: - "This module can be used to add domains to or removes them from IBM Spectrum Accelerate Family storage systems." +attributes: + check_mode: + support: none + diff_mode: + support: none + options: domain: description: @@ -82,8 +88,8 @@ options: type: str extends_documentation_fragment: -- community.general.ibm_storage - + - community.general.ibm_storage + - community.general.attributes author: - Tzur Eliyahu (@tzure) diff --git a/plugins/modules/ibm_sa_host.py b/plugins/modules/ibm_sa_host.py index 961e1bba19..614865ae01 100644 --- a/plugins/modules/ibm_sa_host.py +++ b/plugins/modules/ibm_sa_host.py @@ -18,6 +18,12 @@ short_description: Adds hosts to or removes them from IBM Spectrum Accelerate Fa description: - "This module adds hosts to or removes them from IBM Spectrum Accelerate Family storage systems." +attributes: + check_mode: + support: none + diff_mode: + support: none + options: host: description: @@ -56,8 +62,8 @@ options: type: str extends_documentation_fragment: -- community.general.ibm_storage - + - community.general.ibm_storage + - community.general.attributes author: - Tzur Eliyahu (@tzure) diff --git a/plugins/modules/ibm_sa_host_ports.py b/plugins/modules/ibm_sa_host_ports.py index fc543053a7..fdb27f85a2 100644 --- a/plugins/modules/ibm_sa_host_ports.py +++ b/plugins/modules/ibm_sa_host_ports.py @@ -19,6 +19,12 @@ description: - "This module adds ports to or removes them from the hosts on IBM Spectrum Accelerate Family storage systems." +attributes: + check_mode: + support: none + diff_mode: + support: none + options: host: description: @@ -48,7 +54,8 @@ options: type: str extends_documentation_fragment: -- community.general.ibm_storage + - community.general.ibm_storage + - community.general.attributes author: - Tzur Eliyahu (@tzure) diff --git a/plugins/modules/ibm_sa_pool.py b/plugins/modules/ibm_sa_pool.py index 998f3f74be..88065aa4ec 100644 --- a/plugins/modules/ibm_sa_pool.py +++ b/plugins/modules/ibm_sa_pool.py @@ -18,6 +18,12 @@ short_description: Handles pools on IBM Spectrum Accelerate Family storage syste description: - "This module creates or deletes pools to be used on IBM Spectrum Accelerate Family storage systems" +attributes: + check_mode: + support: none + diff_mode: + support: none + options: pool: description: @@ -52,8 +58,8 @@ options: type: str extends_documentation_fragment: -- community.general.ibm_storage - + - community.general.ibm_storage + - community.general.attributes author: - Tzur Eliyahu (@tzure) diff --git a/plugins/modules/ibm_sa_vol.py b/plugins/modules/ibm_sa_vol.py index 115ac9169f..bc5f81b32f 100644 --- a/plugins/modules/ibm_sa_vol.py +++ b/plugins/modules/ibm_sa_vol.py @@ -18,6 +18,12 @@ short_description: Handle volumes on IBM Spectrum Accelerate Family storage syst description: - "This module creates or deletes volumes to be used on IBM Spectrum Accelerate Family storage systems." +attributes: + check_mode: + support: none + diff_mode: + support: none + options: vol: description: @@ -42,8 +48,8 @@ options: type: str extends_documentation_fragment: -- community.general.ibm_storage - + - community.general.ibm_storage + - community.general.attributes author: - Tzur Eliyahu (@tzure) diff --git a/plugins/modules/ibm_sa_vol_map.py b/plugins/modules/ibm_sa_vol_map.py index f493a2d979..ea8b485ef1 100644 --- a/plugins/modules/ibm_sa_vol_map.py +++ b/plugins/modules/ibm_sa_vol_map.py @@ -19,6 +19,12 @@ description: - "This module maps volumes to or unmaps them from the hosts on IBM Spectrum Accelerate Family storage systems." +attributes: + check_mode: + support: none + diff_mode: + support: none + options: vol: description: @@ -55,8 +61,8 @@ options: type: str extends_documentation_fragment: -- community.general.ibm_storage - + - community.general.ibm_storage + - community.general.attributes author: - Tzur Eliyahu (@tzure) From 673c79f6d9744595ddbef21c2754ab88603ab456 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:24:37 +0100 Subject: [PATCH 0487/2104] Add attributes to apache2, cobbler, dimensiondata, icinga2, lxca, pritunl, and spectrum modules (#5963) Add attributes to apache2, cobbler, dimensiondata, icinga2, lxca, pritunl, and spectrum modules. --- plugins/modules/apache2_mod_proxy.py | 7 +++++++ plugins/modules/apache2_module.py | 7 +++++++ plugins/modules/cobbler_sync.py | 9 ++++++++- plugins/modules/cobbler_system.py | 9 ++++++++- plugins/modules/dimensiondata_network.py | 10 ++++++++-- plugins/modules/dimensiondata_vlan.py | 10 ++++++++-- plugins/modules/icinga2_feature.py | 7 +++++++ plugins/modules/icinga2_host.py | 8 +++++++- plugins/modules/lxca_cmms.py | 9 ++++++++- plugins/modules/lxca_nodes.py | 9 ++++++++- plugins/modules/pritunl_org.py | 6 ++++++ plugins/modules/pritunl_user.py | 6 ++++++ plugins/modules/spectrum_device.py | 11 +++++++++-- plugins/modules/spectrum_model_attrs.py | 7 +++++++ 14 files changed, 104 insertions(+), 11 deletions(-) diff --git a/plugins/modules/apache2_mod_proxy.py b/plugins/modules/apache2_mod_proxy.py index 70ab5a42ed..8f561e8ae0 100644 --- a/plugins/modules/apache2_mod_proxy.py +++ b/plugins/modules/apache2_mod_proxy.py @@ -20,6 +20,13 @@ description: status page has to be enabled and accessible, as this module relies on parsing this page. This module supports ansible check_mode, and requires BeautifulSoup python module. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: balancer_url_suffix: type: str diff --git a/plugins/modules/apache2_module.py b/plugins/modules/apache2_module.py index e6998ad3f5..2e2456d741 100644 --- a/plugins/modules/apache2_module.py +++ b/plugins/modules/apache2_module.py @@ -19,6 +19,13 @@ author: short_description: Enables/disables a module of the Apache2 webserver description: - Enables or disables a specified module of the Apache2 webserver. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/cobbler_sync.py b/plugins/modules/cobbler_sync.py index 5e7082ddf5..d7acf4be6a 100644 --- a/plugins/modules/cobbler_sync.py +++ b/plugins/modules/cobbler_sync.py @@ -13,7 +13,14 @@ DOCUMENTATION = r''' module: cobbler_sync short_description: Sync Cobbler description: -- Sync Cobbler to commit changes. + - Sync Cobbler to commit changes. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: host: description: diff --git a/plugins/modules/cobbler_system.py b/plugins/modules/cobbler_system.py index 973478b627..c30b4f1c12 100644 --- a/plugins/modules/cobbler_system.py +++ b/plugins/modules/cobbler_system.py @@ -13,7 +13,14 @@ DOCUMENTATION = r''' module: cobbler_system short_description: Manage system objects in Cobbler description: -- Add, modify or remove systems in Cobbler + - Add, modify or remove systems in Cobbler +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: host: description: diff --git a/plugins/modules/dimensiondata_network.py b/plugins/modules/dimensiondata_network.py index d88b4a9339..8c1469063c 100644 --- a/plugins/modules/dimensiondata_network.py +++ b/plugins/modules/dimensiondata_network.py @@ -19,12 +19,18 @@ DOCUMENTATION = ''' module: dimensiondata_network short_description: Create, update, and delete MCP 1.0 & 2.0 networks extends_documentation_fragment: -- community.general.dimensiondata -- community.general.dimensiondata_wait + - community.general.dimensiondata + - community.general.dimensiondata_wait + - community.general.attributes description: - Create, update, and delete MCP 1.0 & 2.0 networks author: 'Aimon Bustardo (@aimonb)' +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/dimensiondata_vlan.py b/plugins/modules/dimensiondata_vlan.py index 86db5e5057..7d83ddc696 100644 --- a/plugins/modules/dimensiondata_vlan.py +++ b/plugins/modules/dimensiondata_vlan.py @@ -15,12 +15,18 @@ DOCUMENTATION = ''' module: dimensiondata_vlan short_description: Manage a VLAN in a Cloud Control network domain extends_documentation_fragment: -- community.general.dimensiondata -- community.general.dimensiondata_wait + - community.general.dimensiondata + - community.general.dimensiondata_wait + - community.general.attributes description: - Manage VLANs in Cloud Control network domains. author: 'Adam Friedman (@tintoy)' +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/icinga2_feature.py b/plugins/modules/icinga2_feature.py index 2f1d5629d5..6e6bc54161 100644 --- a/plugins/modules/icinga2_feature.py +++ b/plugins/modules/icinga2_feature.py @@ -21,6 +21,13 @@ short_description: Manage Icinga2 feature description: - This module can be used to enable or disable an Icinga2 feature. author: "Loic Blot (@nerzhul)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/icinga2_host.py b/plugins/modules/icinga2_host.py index 0f4e2b26a0..a740e68754 100644 --- a/plugins/modules/icinga2_host.py +++ b/plugins/modules/icinga2_host.py @@ -19,6 +19,11 @@ description: - "Add or remove a host to Icinga2 through the API." - "See U(https://www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/)" author: "Jurgen Brand (@t794104)" +attributes: + check_mode: + support: full + diff_mode: + support: none options: url: type: str @@ -107,7 +112,8 @@ options: description: - Dictionary of variables. extends_documentation_fragment: - - url + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/lxca_cmms.py b/plugins/modules/lxca_cmms.py index 0941b4521e..1f811a7efa 100644 --- a/plugins/modules/lxca_cmms.py +++ b/plugins/modules/lxca_cmms.py @@ -18,6 +18,12 @@ short_description: Custom module for lxca cmms inventory utility description: - This module returns/displays a inventory details of cmms +attributes: + check_mode: + support: none + diff_mode: + support: none + options: uuid: description: @@ -40,7 +46,8 @@ options: type: str extends_documentation_fragment: -- community.general.lxca_common + - community.general.lxca_common + - community.general.attributes ''' diff --git a/plugins/modules/lxca_nodes.py b/plugins/modules/lxca_nodes.py index b3445b1c0b..3b37322edb 100644 --- a/plugins/modules/lxca_nodes.py +++ b/plugins/modules/lxca_nodes.py @@ -18,6 +18,12 @@ short_description: Custom module for lxca nodes inventory utility description: - This module returns/displays a inventory details of nodes +attributes: + check_mode: + support: none + diff_mode: + support: none + options: uuid: description: @@ -42,7 +48,8 @@ options: type: str extends_documentation_fragment: -- community.general.lxca_common + - community.general.lxca_common + - community.general.attributes ''' diff --git a/plugins/modules/pritunl_org.py b/plugins/modules/pritunl_org.py index 4a6a8a3444..df2df4494d 100644 --- a/plugins/modules/pritunl_org.py +++ b/plugins/modules/pritunl_org.py @@ -18,6 +18,12 @@ description: - A module to manage Pritunl organizations using the Pritunl API. extends_documentation_fragment: - community.general.pritunl + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/pritunl_user.py b/plugins/modules/pritunl_user.py index f3feb94eed..5aac233930 100644 --- a/plugins/modules/pritunl_user.py +++ b/plugins/modules/pritunl_user.py @@ -18,6 +18,12 @@ description: - A module to manage Pritunl users using the Pritunl API. extends_documentation_fragment: - community.general.pritunl + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: organization: type: str diff --git a/plugins/modules/spectrum_device.py b/plugins/modules/spectrum_device.py index 40093aa3a9..5cfc076641 100644 --- a/plugins/modules/spectrum_device.py +++ b/plugins/modules/spectrum_device.py @@ -14,9 +14,16 @@ DOCUMENTATION = ''' module: spectrum_device short_description: Creates/deletes devices in CA Spectrum description: - - This module allows you to create and delete devices in CA Spectrum U(https://www.ca.com/us/products/ca-spectrum.html). - - Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1 + - This module allows you to create and delete devices in CA Spectrum U(https://www.ca.com/us/products/ca-spectrum.html). + - Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1 author: "Renato Orgito (@orgito)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: device: type: str diff --git a/plugins/modules/spectrum_model_attrs.py b/plugins/modules/spectrum_model_attrs.py index de771b0ad3..028ad7f9f3 100644 --- a/plugins/modules/spectrum_model_attrs.py +++ b/plugins/modules/spectrum_model_attrs.py @@ -23,6 +23,13 @@ notes: - Model creation and deletion are not possible with this module. For that use M(community.general.spectrum_device) instead. requirements: - 'python >= 2.7' +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: url: description: From 51394b55a06a15144b370270afd0f5119b8c1168 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:24:50 +0100 Subject: [PATCH 0488/2104] Add attributes to some messaging modules (#5962) Add attributes to some messaging modules. --- plugins/modules/campfire.py | 7 +++++++ plugins/modules/cisco_webex.py | 8 ++++++++ plugins/modules/discord.py | 7 +++++++ plugins/modules/hipchat.py | 7 +++++++ plugins/modules/irc.py | 9 ++++++++- plugins/modules/jabber.py | 9 ++++++++- plugins/modules/librato_annotation.py | 7 +++++++ plugins/modules/logentries.py | 7 +++++++ plugins/modules/logentries_msg.py | 11 ++++++++--- plugins/modules/mail.py | 7 +++++++ plugins/modules/matrix.py | 7 +++++++ plugins/modules/mattermost.py | 7 +++++++ plugins/modules/rocketchat.py | 7 +++++++ plugins/modules/say.py | 19 +++++++++++++------ plugins/modules/sendgrid.py | 27 +++++++++++++++++---------- plugins/modules/slack.py | 9 ++++++++- plugins/modules/syslogger.py | 7 +++++++ plugins/modules/taiga_issue.py | 7 +++++++ plugins/modules/telegram.py | 7 +++++++ plugins/modules/twilio.py | 23 +++++++++++++++-------- plugins/modules/typetalk.py | 7 +++++++ 21 files changed, 176 insertions(+), 30 deletions(-) diff --git a/plugins/modules/campfire.py b/plugins/modules/campfire.py index dfc9af1ce1..1e0f1ecea4 100644 --- a/plugins/modules/campfire.py +++ b/plugins/modules/campfire.py @@ -16,6 +16,13 @@ short_description: Send a message to Campfire description: - Send a message to Campfire. - Messages with newlines will result in a "Paste" message being sent. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: subscription: type: str diff --git a/plugins/modules/cisco_webex.py b/plugins/modules/cisco_webex.py index 95fcccb7d6..2e5cb50ea0 100644 --- a/plugins/modules/cisco_webex.py +++ b/plugins/modules/cisco_webex.py @@ -20,6 +20,14 @@ notes: - The C(recipient_id) type must be valid for the supplied C(recipient_id). - Full API documentation can be found at U(https://developer.webex.com/docs/api/basics). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none + options: recipient_type: diff --git a/plugins/modules/discord.py b/plugins/modules/discord.py index 9df00ad7dd..8b5391d44b 100644 --- a/plugins/modules/discord.py +++ b/plugins/modules/discord.py @@ -20,6 +20,13 @@ seealso: - name: API documentation description: Documentation for Discord API link: https://discord.com/developers/docs/resources/webhook#execute-webhook +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: webhook_id: description: diff --git a/plugins/modules/hipchat.py b/plugins/modules/hipchat.py index a5aa150f32..11b5fb7358 100644 --- a/plugins/modules/hipchat.py +++ b/plugins/modules/hipchat.py @@ -15,6 +15,13 @@ module: hipchat short_description: Send a message to Hipchat description: - Send a message to a Hipchat room, with options to control the formatting. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: type: str diff --git a/plugins/modules/irc.py b/plugins/modules/irc.py index f45d610da7..6cd7bc1203 100644 --- a/plugins/modules/irc.py +++ b/plugins/modules/irc.py @@ -14,7 +14,14 @@ DOCUMENTATION = ''' module: irc short_description: Send a message to an IRC channel or a nick description: - - Send a message to an IRC channel or a nick. This is a very simplistic implementation. + - Send a message to an IRC channel or a nick. This is a very simplistic implementation. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server: type: str diff --git a/plugins/modules/jabber.py b/plugins/modules/jabber.py index 110b618d77..650b29957d 100644 --- a/plugins/modules/jabber.py +++ b/plugins/modules/jabber.py @@ -14,7 +14,14 @@ DOCUMENTATION = ''' module: jabber short_description: Send a message to jabber user or chat room description: - - Send a message to jabber + - Send a message to jabber +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: user: type: str diff --git a/plugins/modules/librato_annotation.py b/plugins/modules/librato_annotation.py index 70e17cfef4..ebfb751546 100644 --- a/plugins/modules/librato_annotation.py +++ b/plugins/modules/librato_annotation.py @@ -17,6 +17,13 @@ description: - Create an annotation event on the given annotation stream :name. If the annotation stream does not exist, it will be created automatically author: "Seth Edwards (@Sedward)" requirements: [] +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: user: type: str diff --git a/plugins/modules/logentries.py b/plugins/modules/logentries.py index a605c41316..f177cf4546 100644 --- a/plugins/modules/logentries.py +++ b/plugins/modules/logentries.py @@ -16,6 +16,13 @@ author: "Ivan Vanderbyl (@ivanvanderbyl)" short_description: Module for tracking logs via logentries.com description: - Sends logs to LogEntries in realtime +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: path: type: str diff --git a/plugins/modules/logentries_msg.py b/plugins/modules/logentries_msg.py index 723273165f..03851ad1f4 100644 --- a/plugins/modules/logentries_msg.py +++ b/plugins/modules/logentries_msg.py @@ -14,9 +14,14 @@ DOCUMENTATION = ''' module: logentries_msg short_description: Send a message to logentries description: - - Send a message to logentries -requirements: - - "python >= 2.6" + - Send a message to logentries +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: type: str diff --git a/plugins/modules/mail.py b/plugins/modules/mail.py index 9d01fc59a7..feaac69233 100644 --- a/plugins/modules/mail.py +++ b/plugins/modules/mail.py @@ -28,6 +28,13 @@ description: - Of course sending out a mail can be equally useful as a way to notify one or more people in a team that a specific action has been (successfully) taken. +extends_documentation_fragment: +- community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: sender: description: diff --git a/plugins/modules/matrix.py b/plugins/modules/matrix.py index f339e76593..0b419c8d93 100644 --- a/plugins/modules/matrix.py +++ b/plugins/modules/matrix.py @@ -15,6 +15,13 @@ module: matrix short_description: Send notifications to matrix description: - This module sends html formatted notifications to matrix rooms. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: msg_plain: type: str diff --git a/plugins/modules/mattermost.py b/plugins/modules/mattermost.py index b3fe6b5680..29894c3a7c 100644 --- a/plugins/modules/mattermost.py +++ b/plugins/modules/mattermost.py @@ -21,6 +21,13 @@ short_description: Send Mattermost notifications description: - Sends notifications to U(http://your.mattermost.url) via the Incoming WebHook integration. author: "Benjamin Jolivot (@bjolivot)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: url: type: str diff --git a/plugins/modules/rocketchat.py b/plugins/modules/rocketchat.py index 02458ed232..23d6d529e7 100644 --- a/plugins/modules/rocketchat.py +++ b/plugins/modules/rocketchat.py @@ -18,6 +18,13 @@ short_description: Send notifications to Rocket Chat description: - The C(rocketchat) module sends notifications to Rocket Chat via the Incoming WebHook integration author: "Ramon de la Fuente (@ramondelafuente)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: domain: type: str diff --git a/plugins/modules/say.py b/plugins/modules/say.py index 04b5027cae..175e5feb0b 100644 --- a/plugins/modules/say.py +++ b/plugins/modules/say.py @@ -14,21 +14,28 @@ DOCUMENTATION = ''' module: say short_description: Makes a computer to speak description: - - makes a computer speak! Amuse your friends, annoy your coworkers! + - makes a computer speak! Amuse your friends, annoy your coworkers! notes: - - In 2.5, this module has been renamed from C(osx_say) to M(community.general.say). - - If you like this module, you may also be interested in the osx_say callback plugin. - - A list of available voices, with language, can be found by running C(say -v ?) on a OSX host and C(espeak --voices) on a Linux host. + - In 2.5, this module has been renamed from C(osx_say) to M(community.general.say). + - If you like this module, you may also be interested in the osx_say callback plugin. + - A list of available voices, with language, can be found by running C(say -v ?) on a OSX host and C(espeak --voices) on a Linux host. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: msg: type: str description: - What to say + - What to say. required: true voice: type: str description: - What voice to use + - What voice to use. required: false requirements: [ say or espeak or espeak-ng ] author: diff --git a/plugins/modules/sendgrid.py b/plugins/modules/sendgrid.py index d2a52e5f0e..2c0cc9a5b2 100644 --- a/plugins/modules/sendgrid.py +++ b/plugins/modules/sendgrid.py @@ -14,19 +14,26 @@ DOCUMENTATION = r''' module: sendgrid short_description: Sends an email with the SendGrid API description: - - "Sends an email with a SendGrid account through their API, not through - the SMTP service." + - "Sends an email with a SendGrid account through their API, not through + the SMTP service." notes: - - "This module is non-idempotent because it sends an email through the - external API. It is idempotent only in the case that the module fails." - - "Like the other notification modules, this one requires an external - dependency to work. In this case, you'll need an active SendGrid - account." - - "In order to use api_key, cc, bcc, attachments, from_name, html_body, headers - you must pip install sendgrid" - - "since 2.2 I(username) and I(password) are not required if you supply an I(api_key)" + - "This module is non-idempotent because it sends an email through the + external API. It is idempotent only in the case that the module fails." + - "Like the other notification modules, this one requires an external + dependency to work. In this case, you'll need an active SendGrid + account." + - "In order to use api_key, cc, bcc, attachments, from_name, html_body, headers + you must pip install sendgrid" + - "since 2.2 I(username) and I(password) are not required if you supply an I(api_key)" requirements: - sendgrid Python library 1.6.22 or lower (Sendgrid API V2 supported) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: username: type: str diff --git a/plugins/modules/slack.py b/plugins/modules/slack.py index c1ae865cde..4e26f1973c 100644 --- a/plugins/modules/slack.py +++ b/plugins/modules/slack.py @@ -19,8 +19,15 @@ DOCUMENTATION = """ module: slack short_description: Send Slack notifications description: - - The C(slack) module sends notifications to U(http://slack.com) via the Incoming WebHook integration + - The C(slack) module sends notifications to U(http://slack.com) via the Incoming WebHook integration author: "Ramon de la Fuente (@ramondelafuente)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: domain: type: str diff --git a/plugins/modules/syslogger.py b/plugins/modules/syslogger.py index 5fc21a9dc1..3a7abf4fbe 100644 --- a/plugins/modules/syslogger.py +++ b/plugins/modules/syslogger.py @@ -13,6 +13,13 @@ module: syslogger short_description: Log messages in the syslog description: - Uses syslog to add log entries to the host. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: msg: type: str diff --git a/plugins/modules/taiga_issue.py b/plugins/modules/taiga_issue.py index 25f6557ea2..e80ff43b89 100644 --- a/plugins/modules/taiga_issue.py +++ b/plugins/modules/taiga_issue.py @@ -17,6 +17,13 @@ description: - Creates/deletes an issue in a Taiga Project Management Platform (U(https://taiga.io)). - An issue is identified by the combination of project, issue subject and issue type. - This module implements the creation or deletion of issues (not the update). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: taiga_host: type: str diff --git a/plugins/modules/telegram.py b/plugins/modules/telegram.py index 4e89825120..d13e90fd5c 100644 --- a/plugins/modules/telegram.py +++ b/plugins/modules/telegram.py @@ -23,6 +23,13 @@ description: - Also, the user may try to use any other telegram bot API method, if you specify I(api_method) argument. notes: - You will require a telegram account and create telegram bot to use this module. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: token: type: str diff --git a/plugins/modules/twilio.py b/plugins/modules/twilio.py index 6d22563d1c..270320c465 100644 --- a/plugins/modules/twilio.py +++ b/plugins/modules/twilio.py @@ -21,39 +21,46 @@ notes: - Like the other notification modules, this one requires an external dependency to work. In this case, you'll need a Twilio account with a purchased or verified phone number to send the text message. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: account_sid: type: str description: - user's Twilio account token found on the account page + - User's Twilio account token found on the account page. required: true auth_token: type: str - description: user's Twilio authentication token + description: + - User's Twilio authentication token. required: true msg: type: str description: - the body of the text message + - The body of the text message. required: true to_numbers: type: list elements: str description: - one or more phone numbers to send the text message to, - format +15551112222 + - One or more phone numbers to send the text message to, format C(+15551112222). required: true aliases: [ to_number ] from_number: type: str description: - the Twilio number to send the text message from, format +15551112222 + - The Twilio number to send the text message from, format C(+15551112222). required: true media_url: type: str description: - a URL with a picture, video or sound clip to send with an MMS - (multimedia message) instead of a plain SMS + - A URL with a picture, video or sound clip to send with an MMS + (multimedia message) instead of a plain SMS. required: false author: "Matt Makai (@makaimc)" diff --git a/plugins/modules/typetalk.py b/plugins/modules/typetalk.py index 5fe2baa916..ddf9f35605 100644 --- a/plugins/modules/typetalk.py +++ b/plugins/modules/typetalk.py @@ -15,6 +15,13 @@ module: typetalk short_description: Send a message to typetalk description: - Send a message to typetalk using typetalk API +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: client_id: type: str From 3b97fad577cd3aede773b6c7032e32ea5ea2ca69 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:25:15 +0100 Subject: [PATCH 0489/2104] Add attributes to some filesystem modules (#5960) Add attributes to some filesystem modules. --- plugins/modules/beadm.py | 7 +++++++ plugins/modules/filesize.py | 10 +++++++--- plugins/modules/filesystem.py | 8 +++++++- plugins/modules/lvg.py | 7 +++++++ plugins/modules/lvol.py | 7 +++++++ plugins/modules/parted.py | 7 +++++++ plugins/modules/xfs_quota.py | 9 ++++++++- plugins/modules/zfs.py | 19 +++++++++++++------ plugins/modules/zfs_delegate_admin.py | 7 +++++++ 9 files changed, 70 insertions(+), 11 deletions(-) diff --git a/plugins/modules/beadm.py b/plugins/modules/beadm.py index 7a84997089..8857fd8464 100644 --- a/plugins/modules/beadm.py +++ b/plugins/modules/beadm.py @@ -17,6 +17,13 @@ description: - Create, delete or activate ZFS boot environments. - Mount and unmount ZFS boot environments. author: Adam Števko (@xen0l) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/filesize.py b/plugins/modules/filesize.py index a8c47d70fd..b3eb90d611 100644 --- a/plugins/modules/filesize.py +++ b/plugins/modules/filesize.py @@ -25,6 +25,12 @@ author: version_added: "3.0.0" +attributes: + check_mode: + support: full + diff_mode: + support: full + options: path: description: @@ -93,14 +99,12 @@ options: - This option is silently ignored. This module always modifies file size in-place. -notes: - - This module supports C(check_mode) and C(diff). - requirements: - dd (Data Duplicator) in PATH extends_documentation_fragment: - ansible.builtin.files + - community.general.attributes seealso: - name: dd(1) manpage for Linux diff --git a/plugins/modules/filesystem.py b/plugins/modules/filesystem.py index 4dcfddee23..0e6b815b4e 100644 --- a/plugins/modules/filesystem.py +++ b/plugins/modules/filesystem.py @@ -19,6 +19,13 @@ module: filesystem short_description: Makes a filesystem description: - This module creates a filesystem. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -87,7 +94,6 @@ notes: a C(blkid) command that is compatible with this module. However, these packages conflict with each other, and only the C(util-linux) package provides the command required to not fail when I(state=absent). - - This module supports I(check_mode). seealso: - module: community.general.filesize - module: ansible.posix.mount diff --git a/plugins/modules/lvg.py b/plugins/modules/lvg.py index ca38565f4a..60eaaa42b2 100644 --- a/plugins/modules/lvg.py +++ b/plugins/modules/lvg.py @@ -17,6 +17,13 @@ module: lvg short_description: Configure LVM volume groups description: - This module creates, removes or resizes volume groups. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: vg: description: diff --git a/plugins/modules/lvol.py b/plugins/modules/lvol.py index 4489258da5..d193a4e837 100644 --- a/plugins/modules/lvol.py +++ b/plugins/modules/lvol.py @@ -19,6 +19,13 @@ module: lvol short_description: Configure LVM logical volumes description: - This module creates, removes or resizes logical volumes. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: vg: type: str diff --git a/plugins/modules/parted.py b/plugins/modules/parted.py index ae5e7584d1..ec72bd6f00 100644 --- a/plugins/modules/parted.py +++ b/plugins/modules/parted.py @@ -24,6 +24,13 @@ requirements: - align option (except 'undefined') requires parted 2.1 and above - If the version of parted is below 3.1, it requires a Linux version running the sysfs file system C(/sys/). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: device: description: The block device (disk) where to operate. diff --git a/plugins/modules/xfs_quota.py b/plugins/modules/xfs_quota.py index 5f71334c01..d01f3dc0e6 100644 --- a/plugins/modules/xfs_quota.py +++ b/plugins/modules/xfs_quota.py @@ -19,7 +19,14 @@ description: - Configure quotas on XFS filesystems. - Before using this module /etc/projects and /etc/projid need to be configured. author: -- William Leemans (@bushvin) + - William Leemans (@bushvin) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: type: description: diff --git a/plugins/modules/zfs.py b/plugins/modules/zfs.py index 84e5c05b1f..83b2a6edf8 100644 --- a/plugins/modules/zfs.py +++ b/plugins/modules/zfs.py @@ -15,6 +15,19 @@ module: zfs short_description: Manage zfs description: - Manages ZFS file systems, volumes, clones and snapshots +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: partial + details: + - In certain situations it may report a task as changed that will not be reported + as changed when C(check_mode) is disabled. + - For example, this might occur when the zpool C(altroot) option is set or when + a size is written using human-readable notation, such as C(1M) or C(1024K), + instead of as an unqualified byte count, such as C(1048576). + diff_mode: + support: full options: name: description: @@ -39,12 +52,6 @@ options: - See the zfs(8) man page for more information. type: dict default: {} -notes: - - C(check_mode) is supported, but in certain situations it may report a task - as changed that will not be reported as changed when C(check_mode) is disabled. - For example, this might occur when the zpool C(altroot) option is set or when - a size is written using human-readable notation, such as C(1M) or C(1024K), - instead of as an unqualified byte count, such as C(1048576). author: - Johan Wiren (@johanwiren) ''' diff --git a/plugins/modules/zfs_delegate_admin.py b/plugins/modules/zfs_delegate_admin.py index 36a213a0fe..7891c32672 100644 --- a/plugins/modules/zfs_delegate_admin.py +++ b/plugins/modules/zfs_delegate_admin.py @@ -20,6 +20,13 @@ description: requirements: - "A ZFS/OpenZFS implementation that supports delegation with C(zfs allow), including: Solaris >= 10, illumos (all versions), FreeBSD >= 8.0R, ZFS on Linux >= 0.7.0." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: From 3ec2fde2c6e7d03a2a50f6a004a31e6c532930b1 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:25:20 +0100 Subject: [PATCH 0490/2104] Add attributes to package manager modules (#5954) Add attributes to package manager modules. --- plugins/modules/ansible_galaxy_install.py | 7 ++++++ plugins/modules/apk.py | 7 ++++++ plugins/modules/apt_repo.py | 7 ++++++ plugins/modules/apt_rpm.py | 7 ++++++ plugins/modules/bower.py | 7 ++++++ plugins/modules/bundler.py | 7 ++++++ plugins/modules/cargo.py | 7 ++++++ plugins/modules/composer.py | 7 ++++++ plugins/modules/copr.py | 7 ++++++ plugins/modules/cpanm.py | 7 ++++++ plugins/modules/dnf_versionlock.py | 23 +++++++++++++------- plugins/modules/dpkg_divert.py | 9 ++++++-- plugins/modules/easy_install.py | 9 +++++++- plugins/modules/flatpak.py | 17 ++++++++++----- plugins/modules/flatpak_remote.py | 25 ++++++++++++++-------- plugins/modules/gem.py | 7 ++++++ plugins/modules/homebrew.py | 10 +++++++-- plugins/modules/homebrew_cask.py | 17 +++++++++------ plugins/modules/homebrew_tap.py | 7 ++++++ plugins/modules/installp.py | 9 +++++++- plugins/modules/layman.py | 7 ++++++ plugins/modules/macports.py | 7 ++++++ plugins/modules/npm.py | 7 ++++++ plugins/modules/openbsd_pkg.py | 13 ++++++++---- plugins/modules/opkg.py | 7 ++++++ plugins/modules/pacman.py | 7 ++++++ plugins/modules/pacman_key.py | 26 ++++++++++++++--------- plugins/modules/pear.py | 7 ++++++ plugins/modules/pipx.py | 7 ++++++ plugins/modules/pkg5.py | 7 ++++++ plugins/modules/pkg5_publisher.py | 7 ++++++ plugins/modules/pkgin.py | 7 ++++++ plugins/modules/pkgng.py | 7 ++++++ plugins/modules/pkgutil.py | 11 ++++++++-- plugins/modules/portage.py | 9 ++++++++ plugins/modules/portinstall.py | 7 ++++++ plugins/modules/rpm_ostree_pkg.py | 13 ++++++++---- plugins/modules/slackpkg.py | 7 ++++++ plugins/modules/snap.py | 7 ++++++ plugins/modules/snap_alias.py | 7 ++++++ plugins/modules/svr4pkg.py | 7 ++++++ plugins/modules/syspatch.py | 9 ++++++++ plugins/modules/sysupgrade.py | 7 ++++++ plugins/modules/xbps.py | 7 ++++++ plugins/modules/yarn.py | 7 ++++++ plugins/modules/yum_versionlock.py | 10 +++++++-- plugins/modules/zypper.py | 8 +++++++ plugins/modules/zypper_repository.py | 7 ++++++ 48 files changed, 386 insertions(+), 56 deletions(-) diff --git a/plugins/modules/ansible_galaxy_install.py b/plugins/modules/ansible_galaxy_install.py index 694591d8cb..0f38eabdf6 100644 --- a/plugins/modules/ansible_galaxy_install.py +++ b/plugins/modules/ansible_galaxy_install.py @@ -26,6 +26,13 @@ notes: If that one also fails, the module will fail. requirements: - Ansible 2.9, ansible-base 2.10, or ansible-core 2.11 or newer +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: type: description: diff --git a/plugins/modules/apk.py b/plugins/modules/apk.py index 831ab60749..e56b2165dd 100644 --- a/plugins/modules/apk.py +++ b/plugins/modules/apk.py @@ -19,6 +19,13 @@ short_description: Manages apk packages description: - Manages I(apk) packages for Alpine Linux. author: "Kevin Brebanov (@kbrebanov)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: available: description: diff --git a/plugins/modules/apt_repo.py b/plugins/modules/apt_repo.py index 2e9c9b109c..5560390271 100644 --- a/plugins/modules/apt_repo.py +++ b/plugins/modules/apt_repo.py @@ -19,6 +19,13 @@ description: notes: - This module works on ALT based distros. - Does NOT support checkmode, due to a limitation in apt-repo tool. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: repo: description: diff --git a/plugins/modules/apt_rpm.py b/plugins/modules/apt_rpm.py index d949a61e68..24d6fb13d4 100644 --- a/plugins/modules/apt_rpm.py +++ b/plugins/modules/apt_rpm.py @@ -17,6 +17,13 @@ module: apt_rpm short_description: APT-RPM package manager description: - Manages packages with I(apt-rpm). Both low-level (I(rpm)) and high-level (I(apt-get)) package manager binaries required. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: package: description: diff --git a/plugins/modules/bower.py b/plugins/modules/bower.py index 8964bd0434..1824e68bb8 100644 --- a/plugins/modules/bower.py +++ b/plugins/modules/bower.py @@ -16,6 +16,13 @@ short_description: Manage bower packages with bower description: - Manage bower packages with bower author: "Michael Warkentin (@mwarkentin)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/bundler.py b/plugins/modules/bundler.py index 5811fa720c..682dd334ac 100644 --- a/plugins/modules/bundler.py +++ b/plugins/modules/bundler.py @@ -15,6 +15,13 @@ module: bundler short_description: Manage Ruby Gem dependencies with Bundler description: - Manage installation and Gem version dependencies for Ruby using the Bundler gem +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: executable: type: str diff --git a/plugins/modules/cargo.py b/plugins/modules/cargo.py index 787edbd256..24be43741b 100644 --- a/plugins/modules/cargo.py +++ b/plugins/modules/cargo.py @@ -17,6 +17,13 @@ version_added: 4.3.0 description: - Manage Rust packages with cargo. author: "Radek Sprta (@radek-sprta)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/composer.py b/plugins/modules/composer.py index 34a15edda5..793abcda18 100644 --- a/plugins/modules/composer.py +++ b/plugins/modules/composer.py @@ -21,6 +21,13 @@ description: Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: command: type: str diff --git a/plugins/modules/copr.py b/plugins/modules/copr.py index 68738a6c98..965c2a935d 100644 --- a/plugins/modules/copr.py +++ b/plugins/modules/copr.py @@ -20,6 +20,13 @@ requirements: - dnf-plugins-core notes: - Supports C(check_mode). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: host: description: The Copr host to work with. diff --git a/plugins/modules/cpanm.py b/plugins/modules/cpanm.py index 98f37d573e..b3d63e1fb1 100644 --- a/plugins/modules/cpanm.py +++ b/plugins/modules/cpanm.py @@ -16,6 +16,13 @@ module: cpanm short_description: Manages Perl library dependencies description: - Manage Perl library dependencies using cpanminus. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/dnf_versionlock.py b/plugins/modules/dnf_versionlock.py index a0a440b620..fac3ad78d4 100644 --- a/plugins/modules/dnf_versionlock.py +++ b/plugins/modules/dnf_versionlock.py @@ -18,6 +18,21 @@ description: excludes all other versions of those packages. This allows you to for example protect packages from being updated by newer versions. The state of the plugin that reflects locking of packages is the C(locklist). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: partial + details: + - The logics of the C(versionlock) plugin for corner cases could be + confusing, so please take in account that this module will do its best to + give a C(check_mode) prediction on what is going to happen. In case of + doubt, check the documentation of the plugin. + - Sometimes the module could predict changes in C(check_mode) that will not + be such because C(versionlock) concludes that there is already a entry in + C(locklist) that already matches. + diff_mode: + support: none options: name: description: @@ -54,19 +69,11 @@ options: type: str default: present notes: - - The logics of the C(versionlock) plugin for corner cases could be - confusing, so please take in account that this module will do its best to - give a C(check_mode) prediction on what is going to happen. In case of - doubt, check the documentation of the plugin. - - Sometimes the module could predict changes in C(check_mode) that will not - be such because C(versionlock) concludes that there is already a entry in - C(locklist) that already matches. - In an ideal world, the C(versionlock) plugin would have a dry-run option to know for sure what is going to happen. So far we have to work with a best guess as close as possible to the behaviour inferred from its code. - For most of cases where you want to lock and unlock specific versions of a package, this works fairly well. - - Supports C(check_mode). requirements: - dnf - dnf-plugin-versionlock diff --git a/plugins/modules/dpkg_divert.py b/plugins/modules/dpkg_divert.py index 52e6c33d0d..4a1651f517 100644 --- a/plugins/modules/dpkg_divert.py +++ b/plugins/modules/dpkg_divert.py @@ -27,6 +27,13 @@ description: C(dpkg-divert) commandline tool. It can either create or remove a diversion for a given file, but also update an existing diversion to modify its I(holder) and/or its I(divert) location. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: path: description: @@ -79,8 +86,6 @@ options: - This parameter is ignored when I(rename=false). type: bool default: false -notes: - - This module supports I(check_mode) and I(diff). requirements: - dpkg-divert >= 1.15.0 (Debian family) ''' diff --git a/plugins/modules/easy_install.py b/plugins/modules/easy_install.py index 0a3158c926..564493180a 100644 --- a/plugins/modules/easy_install.py +++ b/plugins/modules/easy_install.py @@ -14,7 +14,14 @@ DOCUMENTATION = ''' module: easy_install short_description: Installs Python libraries description: - - Installs Python libraries, optionally in a I(virtualenv) + - Installs Python libraries, optionally in a I(virtualenv) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/flatpak.py b/plugins/modules/flatpak.py index d6264a50d3..feda6ed5b4 100644 --- a/plugins/modules/flatpak.py +++ b/plugins/modules/flatpak.py @@ -15,13 +15,20 @@ DOCUMENTATION = r''' module: flatpak short_description: Manage flatpaks description: -- Allows users to add or remove flatpaks. -- See the M(community.general.flatpak_remote) module for managing flatpak remotes. + - Allows users to add or remove flatpaks. + - See the M(community.general.flatpak_remote) module for managing flatpak remotes. author: -- John Kwiatkoski (@JayKayy) -- Alexander Bethke (@oolongbrothers) + - John Kwiatkoski (@JayKayy) + - Alexander Bethke (@oolongbrothers) requirements: -- flatpak + - flatpak +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: executable: description: diff --git a/plugins/modules/flatpak_remote.py b/plugins/modules/flatpak_remote.py index bc52d5461a..2032e38b9c 100644 --- a/plugins/modules/flatpak_remote.py +++ b/plugins/modules/flatpak_remote.py @@ -15,17 +15,24 @@ DOCUMENTATION = r''' module: flatpak_remote short_description: Manage flatpak repository remotes description: -- Allows users to add or remove flatpak remotes. -- The flatpak remotes concept is comparable to what is called repositories in other packaging - formats. -- Currently, remote addition is only supported via I(flatpakrepo) file URLs. -- Existing remotes will not be updated. -- See the M(community.general.flatpak) module for managing flatpaks. + - Allows users to add or remove flatpak remotes. + - The flatpak remotes concept is comparable to what is called repositories in other packaging + formats. + - Currently, remote addition is only supported via I(flatpakrepo) file URLs. + - Existing remotes will not be updated. + - See the M(community.general.flatpak) module for managing flatpaks. author: -- John Kwiatkoski (@JayKayy) -- Alexander Bethke (@oolongbrothers) + - John Kwiatkoski (@JayKayy) + - Alexander Bethke (@oolongbrothers) requirements: -- flatpak + - flatpak +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: executable: description: diff --git a/plugins/modules/gem.py b/plugins/modules/gem.py index a44683c786..4bc99d39ef 100644 --- a/plugins/modules/gem.py +++ b/plugins/modules/gem.py @@ -15,6 +15,13 @@ module: gem short_description: Manage Ruby gems description: - Manage installation and uninstallation of Ruby gems. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/homebrew.py b/plugins/modules/homebrew.py index a72d929a81..7592f95a41 100644 --- a/plugins/modules/homebrew.py +++ b/plugins/modules/homebrew.py @@ -22,11 +22,17 @@ author: - "Daniel Jaouen (@danieljaouen)" - "Andrew Dunham (@andrew-d)" requirements: - - "python >= 2.6" - - homebrew must already be installed on the target system + - homebrew must already be installed on the target system short_description: Package manager for Homebrew description: - Manages Homebrew packages +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/homebrew_cask.py b/plugins/modules/homebrew_cask.py index 5937831962..162c184612 100644 --- a/plugins/modules/homebrew_cask.py +++ b/plugins/modules/homebrew_cask.py @@ -15,14 +15,19 @@ DOCUMENTATION = ''' --- module: homebrew_cask author: -- "Indrajit Raychaudhuri (@indrajitr)" -- "Daniel Jaouen (@danieljaouen)" -- "Enric Lluelles (@enriclluelles)" -requirements: -- "python >= 2.6" + - "Indrajit Raychaudhuri (@indrajitr)" + - "Daniel Jaouen (@danieljaouen)" + - "Enric Lluelles (@enriclluelles)" short_description: Install and uninstall homebrew casks description: -- Manages Homebrew casks. + - Manages Homebrew casks. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/homebrew_tap.py b/plugins/modules/homebrew_tap.py index 7099773b21..b230dbb34c 100644 --- a/plugins/modules/homebrew_tap.py +++ b/plugins/modules/homebrew_tap.py @@ -22,6 +22,13 @@ author: short_description: Tap a Homebrew repository description: - Tap external Homebrew repositories. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/installp.py b/plugins/modules/installp.py index f1421bc390..41064363db 100644 --- a/plugins/modules/installp.py +++ b/plugins/modules/installp.py @@ -12,10 +12,17 @@ DOCUMENTATION = r''' --- module: installp author: -- Kairo Araujo (@kairoaraujo) + - Kairo Araujo (@kairoaraujo) short_description: Manage packages on AIX description: - Manage packages using 'installp' on AIX +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: accept_license: description: diff --git a/plugins/modules/layman.py b/plugins/modules/layman.py index b860385969..940ac30d1b 100644 --- a/plugins/modules/layman.py +++ b/plugins/modules/layman.py @@ -21,6 +21,13 @@ description: requirements: - "python >= 2.6" - layman python module +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/macports.py b/plugins/modules/macports.py index 7bf5c4f532..6f40d0938e 100644 --- a/plugins/modules/macports.py +++ b/plugins/modules/macports.py @@ -19,6 +19,13 @@ author: "Jimmy Tang (@jcftang)" short_description: Package manager for MacPorts description: - Manages MacPorts packages (ports) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/npm.py b/plugins/modules/npm.py index 02d97de766..013fd6e570 100644 --- a/plugins/modules/npm.py +++ b/plugins/modules/npm.py @@ -15,6 +15,13 @@ short_description: Manage node.js packages with npm description: - Manage node.js packages with Node Package Manager (npm). author: "Chris Hoffman (@chrishoffman)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/openbsd_pkg.py b/plugins/modules/openbsd_pkg.py index f99c5a24d0..62a662c3c4 100644 --- a/plugins/modules/openbsd_pkg.py +++ b/plugins/modules/openbsd_pkg.py @@ -14,12 +14,17 @@ DOCUMENTATION = ''' --- module: openbsd_pkg author: -- Patrik Lundin (@eest) + - Patrik Lundin (@eest) short_description: Manage packages on OpenBSD description: - - Manage packages on OpenBSD using the pkg tools. -requirements: -- python >= 2.5 + - Manage packages on OpenBSD using the pkg tools. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index 73c2597de2..360bf453b7 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -18,6 +18,13 @@ author: "Patrick Pelletier (@skinp)" short_description: Package manager for OpenWrt and Openembedded/Yocto based Linux distributions description: - Manages ipk packages for OpenWrt and Openembedded/Yocto based Linux distributions +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/pacman.py b/plugins/modules/pacman.py index 1066f10e88..66f58155d3 100644 --- a/plugins/modules/pacman.py +++ b/plugins/modules/pacman.py @@ -23,6 +23,13 @@ author: - Aaron Bull Schaefer (@elasticdog) - Maxime de Roucy (@tchernomax) - Jean Raby (@jraby) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: name: description: diff --git a/plugins/modules/pacman_key.py b/plugins/modules/pacman_key.py index 7fa173ac3b..4d4c4afaca 100644 --- a/plugins/modules/pacman_key.py +++ b/plugins/modules/pacman_key.py @@ -12,21 +12,27 @@ DOCUMENTATION = ''' --- module: pacman_key author: -- George Rawlinson (@grawlinson) + - George Rawlinson (@grawlinson) version_added: "3.2.0" short_description: Manage pacman's list of trusted keys description: -- Add or remove gpg keys from the pacman keyring. + - Add or remove gpg keys from the pacman keyring. notes: -- Use full-length key ID (40 characters). -- Keys will be verified when using I(data), I(file), or I(url) unless I(verify) is overridden. -- Keys will be locally signed after being imported into the keyring. -- If the key ID exists in the keyring, the key will not be added unless I(force_update) is specified. -- I(data), I(file), I(url), and I(keyserver) are mutually exclusive. -- Supports C(check_mode). + - Use full-length key ID (40 characters). + - Keys will be verified when using I(data), I(file), or I(url) unless I(verify) is overridden. + - Keys will be locally signed after being imported into the keyring. + - If the key ID exists in the keyring, the key will not be added unless I(force_update) is specified. + - I(data), I(file), I(url), and I(keyserver) are mutually exclusive. requirements: -- gpg -- pacman-key + - gpg + - pacman-key +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: id: description: diff --git a/plugins/modules/pear.py b/plugins/modules/pear.py index 4e10ca0414..d7cb01b920 100644 --- a/plugins/modules/pear.py +++ b/plugins/modules/pear.py @@ -20,6 +20,13 @@ description: - Manage PHP packages with the pear package manager. author: - Jonathan Lestrelin (@jle64) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/pipx.py b/plugins/modules/pipx.py index 773fbef8ea..f3bddef459 100644 --- a/plugins/modules/pipx.py +++ b/plugins/modules/pipx.py @@ -16,6 +16,13 @@ short_description: Manages applications installed with pipx version_added: 3.8.0 description: - Manage Python applications installed in isolated virtualenvs using pipx. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: type: str diff --git a/plugins/modules/pkg5.py b/plugins/modules/pkg5.py index f8f6be24b9..f6bc77a713 100644 --- a/plugins/modules/pkg5.py +++ b/plugins/modules/pkg5.py @@ -18,6 +18,13 @@ description: - IPS packages are the native packages in Solaris 11 and higher. notes: - The naming of IPS packages is explained at U(http://www.oracle.com/technetwork/articles/servers-storage-admin/ips-package-versioning-2232906.html). +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/pkg5_publisher.py b/plugins/modules/pkg5_publisher.py index 3ccf3d8ca1..9d1b381385 100644 --- a/plugins/modules/pkg5_publisher.py +++ b/plugins/modules/pkg5_publisher.py @@ -19,6 +19,13 @@ description: - IPS packages are the native packages in Solaris 11 and higher. - This modules will configure which publishers a client will download IPS packages from. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/pkgin.py b/plugins/modules/pkgin.py index 0da06e0502..c08b252187 100644 --- a/plugins/modules/pkgin.py +++ b/plugins/modules/pkgin.py @@ -31,6 +31,13 @@ notes: - "Known bug with pkgin < 0.8.0: if a package is removed and another package depends on it, the other package will be silently removed as well. New to Ansible 1.9: check-mode support." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/pkgng.py b/plugins/modules/pkgng.py index 6e94dcaee5..b9d4422c06 100644 --- a/plugins/modules/pkgng.py +++ b/plugins/modules/pkgng.py @@ -20,6 +20,13 @@ module: pkgng short_description: Package manager for FreeBSD >= 9.0 description: - Manage binary packages for FreeBSD using 'pkgng' which is available in versions after 9.0. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/pkgutil.py b/plugins/modules/pkgutil.py index d15c9d2726..5af74c1f31 100644 --- a/plugins/modules/pkgutil.py +++ b/plugins/modules/pkgutil.py @@ -23,6 +23,15 @@ description: author: - Alexander Winkler (@dermute) - David Ponessa (@scathatheworm) +extends_documentation_fragment: +- community.general.attributes +attributes: + check_mode: + support: full + details: + - In order to check the availability of packages, the catalog cache under C(/var/opt/csw/pkgutil) may be refreshed even in check mode. + diff_mode: + support: none options: name: description: @@ -57,8 +66,6 @@ options: type: bool default: false version_added: 1.2.0 -notes: -- In order to check the availability of packages, the catalog cache under C(/var/opt/csw/pkgutil) may be refreshed even in check mode. ''' EXAMPLES = r''' diff --git a/plugins/modules/portage.py b/plugins/modules/portage.py index 98791f8477..d33f44d578 100644 --- a/plugins/modules/portage.py +++ b/plugins/modules/portage.py @@ -21,6 +21,15 @@ short_description: Package manager for Gentoo description: - Manages Gentoo packages +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: package: description: diff --git a/plugins/modules/portinstall.py b/plugins/modules/portinstall.py index d044756d9e..e263b71813 100644 --- a/plugins/modules/portinstall.py +++ b/plugins/modules/portinstall.py @@ -18,6 +18,13 @@ module: portinstall short_description: Installing packages from FreeBSD's ports system description: - Manage packages for FreeBSD using 'portinstall'. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/rpm_ostree_pkg.py b/plugins/modules/rpm_ostree_pkg.py index 5f7632b1e1..52219cd1ba 100644 --- a/plugins/modules/rpm_ostree_pkg.py +++ b/plugins/modules/rpm_ostree_pkg.py @@ -17,6 +17,13 @@ short_description: Install or uninstall overlay additional packages version_added: "2.0.0" description: - Install or uninstall overlay additional packages using C(rpm-ostree) command. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: @@ -34,10 +41,8 @@ options: default: 'present' type: str author: -- Dusty Mabe (@dustymabe) -- Abhijeet Kasurde (@Akasurde) -notes: -- Does not support C(check_mode). + - Dusty Mabe (@dustymabe) + - Abhijeet Kasurde (@Akasurde) ''' EXAMPLES = r''' diff --git a/plugins/modules/slackpkg.py b/plugins/modules/slackpkg.py index 1a6cdf7705..208061a4cb 100644 --- a/plugins/modules/slackpkg.py +++ b/plugins/modules/slackpkg.py @@ -22,6 +22,13 @@ short_description: Package manager for Slackware >= 12.2 description: - Manage binary packages for Slackware using 'slackpkg' which is available in versions after 12.2. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/snap.py b/plugins/modules/snap.py index 1b5e27071a..4b798d6e2c 100644 --- a/plugins/modules/snap.py +++ b/plugins/modules/snap.py @@ -18,6 +18,13 @@ module: snap short_description: Manages snaps description: - "Manages snaps packages." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/snap_alias.py b/plugins/modules/snap_alias.py index 1611c06719..71869b6ee0 100644 --- a/plugins/modules/snap_alias.py +++ b/plugins/modules/snap_alias.py @@ -16,6 +16,13 @@ short_description: Manages snap aliases version_added: 4.0.0 description: - "Manages snaps aliases." +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: description: diff --git a/plugins/modules/svr4pkg.py b/plugins/modules/svr4pkg.py index 51e43b079f..e8c410482b 100644 --- a/plugins/modules/svr4pkg.py +++ b/plugins/modules/svr4pkg.py @@ -21,6 +21,13 @@ description: - Note that this is a very basic packaging system. It will not enforce dependencies on install or remove. author: "Boyd Adamson (@brontitall)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/syspatch.py b/plugins/modules/syspatch.py index 36b934f299..c90ef0d227 100644 --- a/plugins/modules/syspatch.py +++ b/plugins/modules/syspatch.py @@ -18,6 +18,15 @@ short_description: Manage OpenBSD system patches description: - "Manage OpenBSD system patches using syspatch." +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: full + diff_mode: + support: none + options: revert: description: diff --git a/plugins/modules/sysupgrade.py b/plugins/modules/sysupgrade.py index e597db975b..ac80e01965 100644 --- a/plugins/modules/sysupgrade.py +++ b/plugins/modules/sysupgrade.py @@ -15,6 +15,13 @@ short_description: Manage OpenBSD system upgrades version_added: 1.1.0 description: - Manage OpenBSD system upgrades using sysupgrade. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: snapshot: description: diff --git a/plugins/modules/xbps.py b/plugins/modules/xbps.py index aad496238b..1fea5b384a 100644 --- a/plugins/modules/xbps.py +++ b/plugins/modules/xbps.py @@ -19,6 +19,13 @@ description: author: - "Dino Occhialini (@dinoocch)" - "Michael Aldridge (@the-maldridge)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/yarn.py b/plugins/modules/yarn.py index df55925dba..da9f9c79c3 100644 --- a/plugins/modules/yarn.py +++ b/plugins/modules/yarn.py @@ -20,6 +20,13 @@ description: author: - "David Gunter (@verkaufer)" - "Chris Hoffman (@chrishoffman), creator of NPM Ansible module)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/yum_versionlock.py b/plugins/modules/yum_versionlock.py index 4835f6116c..95fd4dd7cf 100644 --- a/plugins/modules/yum_versionlock.py +++ b/plugins/modules/yum_versionlock.py @@ -14,7 +14,14 @@ module: yum_versionlock version_added: 2.0.0 short_description: Locks / unlocks a installed package(s) from being updated by yum package manager description: - - This module adds installed packages to yum versionlock to prevent the package(s) from being updated. + - This module adds installed packages to yum versionlock to prevent the package(s) from being updated. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: @@ -31,7 +38,6 @@ options: default: present notes: - Requires yum-plugin-versionlock package on the remote node. - - Supports C(check_mode). requirements: - yum - yum-versionlock diff --git a/plugins/modules/zypper.py b/plugins/modules/zypper.py index c5404975e8..775ff0fd6e 100644 --- a/plugins/modules/zypper.py +++ b/plugins/modules/zypper.py @@ -31,6 +31,14 @@ short_description: Manage packages on SUSE and openSUSE description: - Manage packages on SUSE and openSUSE using the zypper and rpm tools. - Also supports transactional updates, by running zypper inside C(/sbin/transactional-update --continue --drop-if-no-change --quiet run). +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: name: description: diff --git a/plugins/modules/zypper_repository.py b/plugins/modules/zypper_repository.py index 9a947254c5..cccd9c5795 100644 --- a/plugins/modules/zypper_repository.py +++ b/plugins/modules/zypper_repository.py @@ -18,6 +18,13 @@ author: "Matthias Vogelgesang (@matze)" short_description: Add and remove Zypper repositories description: - Add or remove Zypper repositories on SUSE and openSUSE +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: From 18a6bdd6aa09d0b67a9aa562c50402970f6d8c00 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:25:31 +0100 Subject: [PATCH 0491/2104] Add attributes to ipa and keycloak modules (#5950) Add attributes to ipa and keycloak modules. --- plugins/modules/ipa_config.py | 10 ++++++++-- plugins/modules/ipa_dnsrecord.py | 10 ++++++++-- plugins/modules/ipa_dnszone.py | 10 ++++++++-- plugins/modules/ipa_group.py | 10 ++++++++-- plugins/modules/ipa_hbacrule.py | 10 ++++++++-- plugins/modules/ipa_host.py | 10 ++++++++-- plugins/modules/ipa_hostgroup.py | 10 ++++++++-- plugins/modules/ipa_otpconfig.py | 10 ++++++++-- plugins/modules/ipa_otptoken.py | 10 ++++++++-- plugins/modules/ipa_pwpolicy.py | 10 +++++++--- plugins/modules/ipa_role.py | 8 +++++++- plugins/modules/ipa_service.py | 8 +++++++- plugins/modules/ipa_subca.py | 8 +++++++- plugins/modules/ipa_sudocmd.py | 8 +++++++- plugins/modules/ipa_sudocmdgroup.py | 8 +++++++- plugins/modules/ipa_sudorule.py | 8 +++++++- plugins/modules/ipa_user.py | 8 +++++++- plugins/modules/ipa_vault.py | 8 +++++++- plugins/modules/keycloak_authentication.py | 9 ++++++++- plugins/modules/keycloak_client.py | 9 ++++++++- .../modules/keycloak_client_rolemapping.py | 9 +++++++-- plugins/modules/keycloak_clientscope.py | 9 +++++++-- .../keycloak_clientsecret_regenerate.py | 7 +++++++ plugins/modules/keycloak_clienttemplate.py | 20 ++++++++++++------- plugins/modules/keycloak_group.py | 9 +++++++-- plugins/modules/keycloak_identity_provider.py | 8 +++++++- plugins/modules/keycloak_realm.py | 11 +++++++--- plugins/modules/keycloak_role.py | 9 +++++++-- plugins/modules/keycloak_user_federation.py | 8 +++++++- plugins/modules/keycloak_user_rolemapping.py | 9 +++++++-- 30 files changed, 228 insertions(+), 53 deletions(-) diff --git a/plugins/modules/ipa_config.py b/plugins/modules/ipa_config.py index 5847db077a..ec94b58d41 100644 --- a/plugins/modules/ipa_config.py +++ b/plugins/modules/ipa_config.py @@ -13,7 +13,12 @@ module: ipa_config author: Fran Fitzpatrick (@fxfitz) short_description: Manage Global FreeIPA Configuration Settings description: -- Modify global configuration settings of a FreeIPA Server. + - Modify global configuration settings of a FreeIPA Server. +attributes: + check_mode: + support: full + diff_mode: + support: none options: ipaconfigstring: description: Extra hashes to generate in password plug-in. @@ -93,7 +98,8 @@ options: elements: str version_added: '2.5.0' extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_dnsrecord.py b/plugins/modules/ipa_dnsrecord.py index d070e1c69f..398f63f8e4 100644 --- a/plugins/modules/ipa_dnsrecord.py +++ b/plugins/modules/ipa_dnsrecord.py @@ -14,7 +14,12 @@ module: ipa_dnsrecord author: Abhijeet Kasurde (@Akasurde) short_description: Manage FreeIPA DNS records description: -- Add, modify and delete an IPA DNS Record using IPA API. + - Add, modify and delete an IPA DNS Record using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: zone_name: description: @@ -78,7 +83,8 @@ options: choices: ["absent", "present"] type: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_dnszone.py b/plugins/modules/ipa_dnszone.py index 167c49dc80..06c93841ea 100644 --- a/plugins/modules/ipa_dnszone.py +++ b/plugins/modules/ipa_dnszone.py @@ -14,7 +14,12 @@ module: ipa_dnszone author: Fran Fitzpatrick (@fxfitz) short_description: Manage FreeIPA DNS Zones description: -- Add and delete an IPA DNS Zones using IPA API + - Add and delete an IPA DNS Zones using IPA API +attributes: + check_mode: + support: full + diff_mode: + support: none options: zone_name: description: @@ -37,7 +42,8 @@ options: type: bool version_added: 4.3.0 extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_group.py b/plugins/modules/ipa_group.py index 89cc806d2d..87e7f0e66b 100644 --- a/plugins/modules/ipa_group.py +++ b/plugins/modules/ipa_group.py @@ -13,7 +13,12 @@ module: ipa_group author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA group description: -- Add, modify and delete group within IPA server + - Add, modify and delete group within IPA server +attributes: + check_mode: + support: full + diff_mode: + support: none options: append: description: @@ -82,7 +87,8 @@ options: choices: ["absent", "present"] type: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_hbacrule.py b/plugins/modules/ipa_hbacrule.py index 37f0de8bc1..b7633262b6 100644 --- a/plugins/modules/ipa_hbacrule.py +++ b/plugins/modules/ipa_hbacrule.py @@ -13,7 +13,12 @@ module: ipa_hbacrule author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA HBAC rule description: -- Add, modify or delete an IPA HBAC rule using IPA API. + - Add, modify or delete an IPA HBAC rule using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: cn: description: @@ -104,7 +109,8 @@ options: type: list elements: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_host.py b/plugins/modules/ipa_host.py index ad3c37877c..d561401d4d 100644 --- a/plugins/modules/ipa_host.py +++ b/plugins/modules/ipa_host.py @@ -13,7 +13,12 @@ module: ipa_host author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA host description: -- Add, modify and delete an IPA host using IPA API. + - Add, modify and delete an IPA host using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: fqdn: description: @@ -82,7 +87,8 @@ options: description: Generate a random password to be used in bulk enrollment. type: bool extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_hostgroup.py b/plugins/modules/ipa_hostgroup.py index 37a09f7fa2..dcada0380c 100644 --- a/plugins/modules/ipa_hostgroup.py +++ b/plugins/modules/ipa_hostgroup.py @@ -13,7 +13,12 @@ module: ipa_hostgroup author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA host-group description: -- Add, modify and delete an IPA host-group using IPA API. + - Add, modify and delete an IPA host-group using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: cn: description: @@ -49,7 +54,8 @@ options: choices: ["absent", "disabled", "enabled", "present"] type: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_otpconfig.py b/plugins/modules/ipa_otpconfig.py index e9bef94a85..e2d8f0cd52 100644 --- a/plugins/modules/ipa_otpconfig.py +++ b/plugins/modules/ipa_otpconfig.py @@ -15,7 +15,12 @@ author: justchris1 (@justchris1) short_description: Manage FreeIPA OTP Configuration Settings version_added: 2.5.0 description: -- Modify global configuration settings of a FreeIPA Server with respect to OTP (One Time Passwords). + - Modify global configuration settings of a FreeIPA Server with respect to OTP (One Time Passwords). +attributes: + check_mode: + support: full + diff_mode: + support: none options: ipatokentotpauthwindow: description: TOTP authentication window in seconds. @@ -34,7 +39,8 @@ options: aliases: ["hotpsyncwindow"] type: int extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_otptoken.py b/plugins/modules/ipa_otptoken.py index 0cc06d7163..f25ab6023f 100644 --- a/plugins/modules/ipa_otptoken.py +++ b/plugins/modules/ipa_otptoken.py @@ -14,7 +14,12 @@ author: justchris1 (@justchris1) short_description: Manage FreeIPA OTPs version_added: 2.5.0 description: -- Add, modify, and delete One Time Passwords in IPA. + - Add, modify, and delete One Time Passwords in IPA. +attributes: + check_mode: + support: full + diff_mode: + support: none options: uniqueid: description: Unique ID of the token in IPA. @@ -100,7 +105,8 @@ options: - "B(Note:) Cannot be modified after OTP is created." type: int extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' EXAMPLES = r''' diff --git a/plugins/modules/ipa_pwpolicy.py b/plugins/modules/ipa_pwpolicy.py index db75b121c7..6a6c4318ba 100644 --- a/plugins/modules/ipa_pwpolicy.py +++ b/plugins/modules/ipa_pwpolicy.py @@ -15,6 +15,11 @@ short_description: Manage FreeIPA password policies description: - Add, modify, or delete a password policy using the IPA API. version_added: 2.0.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: group: description: @@ -60,9 +65,8 @@ options: description: Period (in seconds) for which users are locked out. type: str extends_documentation_fragment: -- community.general.ipa.documentation -notes: -- Supports C(check_mode). + - community.general.ipa.documentation + - community.general.attributes ''' EXAMPLES = r''' diff --git a/plugins/modules/ipa_role.py b/plugins/modules/ipa_role.py index 0168343839..fce315b662 100644 --- a/plugins/modules/ipa_role.py +++ b/plugins/modules/ipa_role.py @@ -14,6 +14,11 @@ author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA role description: - Add, modify and delete a role within FreeIPA server using FreeIPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: cn: description: @@ -79,7 +84,8 @@ options: type: list elements: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_service.py b/plugins/modules/ipa_service.py index f0a7daf151..d9541674f2 100644 --- a/plugins/modules/ipa_service.py +++ b/plugins/modules/ipa_service.py @@ -14,6 +14,11 @@ author: Cédric Parent (@cprh) short_description: Manage FreeIPA service description: - Add and delete an IPA service using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: krbcanonicalname: description: @@ -48,7 +53,8 @@ options: choices: ["absent", "present"] type: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_subca.py b/plugins/modules/ipa_subca.py index b470be6aef..882b1ac396 100644 --- a/plugins/modules/ipa_subca.py +++ b/plugins/modules/ipa_subca.py @@ -14,6 +14,11 @@ author: Abhijeet Kasurde (@Akasurde) short_description: Manage FreeIPA Lightweight Sub Certificate Authorities description: - Add, modify, enable, disable and delete an IPA Lightweight Sub Certificate Authorities using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: subca_name: description: @@ -39,7 +44,8 @@ options: choices: ["absent", "disabled", "enabled", "present"] type: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_sudocmd.py b/plugins/modules/ipa_sudocmd.py index 18991ccfd4..d3139ba1c3 100644 --- a/plugins/modules/ipa_sudocmd.py +++ b/plugins/modules/ipa_sudocmd.py @@ -14,6 +14,11 @@ author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA sudo command description: - Add, modify or delete sudo command within FreeIPA server using FreeIPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: sudocmd: description: @@ -31,7 +36,8 @@ options: choices: ['absent', 'disabled', 'enabled', 'present'] type: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_sudocmdgroup.py b/plugins/modules/ipa_sudocmdgroup.py index d9c39a4a3c..a768e74a1a 100644 --- a/plugins/modules/ipa_sudocmdgroup.py +++ b/plugins/modules/ipa_sudocmdgroup.py @@ -14,6 +14,11 @@ author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA sudo command group description: - Add, modify or delete sudo command group within IPA server using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: cn: description: @@ -38,7 +43,8 @@ options: type: list elements: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_sudorule.py b/plugins/modules/ipa_sudorule.py index bc5419adba..59b4eb19e2 100644 --- a/plugins/modules/ipa_sudorule.py +++ b/plugins/modules/ipa_sudorule.py @@ -14,6 +14,11 @@ author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA sudo rule description: - Add, modify or delete sudo rule within IPA server using IPA API. +attributes: + check_mode: + support: full + diff_mode: + support: none options: cn: description: @@ -115,7 +120,8 @@ options: choices: ['absent', 'disabled', 'enabled', 'present'] type: str extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/ipa_user.py b/plugins/modules/ipa_user.py index 4fd96425cf..17b72176ea 100644 --- a/plugins/modules/ipa_user.py +++ b/plugins/modules/ipa_user.py @@ -14,6 +14,11 @@ author: Thomas Krahn (@Nosmoht) short_description: Manage FreeIPA users description: - Add, modify and delete user within IPA server. +attributes: + check_mode: + support: full + diff_mode: + support: none options: displayname: description: Display name. @@ -99,7 +104,8 @@ options: elements: str version_added: '1.2.0' extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes requirements: - base64 diff --git a/plugins/modules/ipa_vault.py b/plugins/modules/ipa_vault.py index 40f5844cd9..84b72c1abb 100644 --- a/plugins/modules/ipa_vault.py +++ b/plugins/modules/ipa_vault.py @@ -15,6 +15,11 @@ short_description: Manage FreeIPA vaults description: - Add, modify and delete vaults and secret vaults. - KRA service should be enabled to use this module. +attributes: + check_mode: + support: full + diff_mode: + support: none options: cn: description: @@ -74,7 +79,8 @@ options: type: bool default: true extends_documentation_fragment: -- community.general.ipa.documentation + - community.general.ipa.documentation + - community.general.attributes ''' diff --git a/plugins/modules/keycloak_authentication.py b/plugins/modules/keycloak_authentication.py index 5ec53f9d8c..5db9bc9318 100644 --- a/plugins/modules/keycloak_authentication.py +++ b/plugins/modules/keycloak_authentication.py @@ -19,6 +19,12 @@ description: version_added: "3.3.0" +attributes: + check_mode: + support: full + diff_mode: + support: full + options: realm: description: @@ -86,7 +92,8 @@ options: - If C(true), allows to remove the authentication flow and recreate it. extends_documentation_fragment: -- community.general.keycloak + - community.general.keycloak + - community.general.attributes author: - Philippe Gauthier (@elfelip) diff --git a/plugins/modules/keycloak_client.py b/plugins/modules/keycloak_client.py index 51e516221b..ee687fcb43 100644 --- a/plugins/modules/keycloak_client.py +++ b/plugins/modules/keycloak_client.py @@ -30,6 +30,12 @@ description: SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful. If you do not specify a setting, usually a sensible default is chosen. +attributes: + check_mode: + support: full + diff_mode: + support: full + options: state: description: @@ -539,7 +545,8 @@ options: client and signed by its key, base64-encoded. extends_documentation_fragment: -- community.general.keycloak + - community.general.keycloak + - community.general.attributes author: - Eike Frost (@eikef) diff --git a/plugins/modules/keycloak_client_rolemapping.py b/plugins/modules/keycloak_client_rolemapping.py index efb9e77cf7..57dcac48de 100644 --- a/plugins/modules/keycloak_client_rolemapping.py +++ b/plugins/modules/keycloak_client_rolemapping.py @@ -33,6 +33,11 @@ description: - When updating a client_rolemapping, where possible provide the role ID to the module. This removes a lookup to the API to translate the name into the role ID. +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: @@ -97,8 +102,8 @@ options: providing it will reduce the number of API calls required. extends_documentation_fragment: -- community.general.keycloak - + - community.general.keycloak + - community.general.attributes author: - Gaëtan Daubresse (@Gaetan2907) diff --git a/plugins/modules/keycloak_clientscope.py b/plugins/modules/keycloak_clientscope.py index 1bba8ba77d..a23d92867a 100644 --- a/plugins/modules/keycloak_clientscope.py +++ b/plugins/modules/keycloak_clientscope.py @@ -33,6 +33,11 @@ description: - When updating a client_scope, where possible provide the client_scope ID to the module. This removes a lookup to the API to translate the name into the client_scope ID. +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: @@ -151,8 +156,8 @@ options: - Values may be single values (for example a string) or a list of strings. extends_documentation_fragment: -- community.general.keycloak - + - community.general.keycloak + - community.general.attributes author: - Gaëtan Daubresse (@Gaetan2907) diff --git a/plugins/modules/keycloak_clientsecret_regenerate.py b/plugins/modules/keycloak_clientsecret_regenerate.py index 7a48a25d25..7e8b295433 100644 --- a/plugins/modules/keycloak_clientsecret_regenerate.py +++ b/plugins/modules/keycloak_clientsecret_regenerate.py @@ -32,6 +32,12 @@ description: - "Note that this module returns the client secret. To avoid this showing up in the logs, please add C(no_log: true) to the task." +attributes: + check_mode: + support: full + diff_mode: + support: none + options: realm: type: str @@ -57,6 +63,7 @@ options: extends_documentation_fragment: - community.general.keycloak + - community.general.attributes author: - Fynn Chen (@fynncfchen) diff --git a/plugins/modules/keycloak_clienttemplate.py b/plugins/modules/keycloak_clienttemplate.py index 4b75bad919..d2555afc5b 100644 --- a/plugins/modules/keycloak_clienttemplate.py +++ b/plugins/modules/keycloak_clienttemplate.py @@ -14,7 +14,6 @@ module: keycloak_clienttemplate short_description: Allows administration of Keycloak client templates via Keycloak API - description: - This module allows the administration of Keycloak client templates via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being @@ -29,6 +28,12 @@ description: SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful. If you do not specify a setting, usually a sensible default is chosen. +attributes: + check_mode: + support: full + diff_mode: + support: full + options: state: description: @@ -155,14 +160,15 @@ options: type: dict notes: -- The Keycloak REST API defines further fields (namely I(bearerOnly), I(consentRequired), I(standardFlowEnabled), - I(implicitFlowEnabled), I(directAccessGrantsEnabled), I(serviceAccountsEnabled), I(publicClient), and - I(frontchannelLogout)) which, while available with keycloak_client, do not have any effect on - Keycloak client-templates and are discarded if supplied with an API request changing client-templates. As such, - they are not available through this module. + - The Keycloak REST API defines further fields (namely I(bearerOnly), I(consentRequired), I(standardFlowEnabled), + I(implicitFlowEnabled), I(directAccessGrantsEnabled), I(serviceAccountsEnabled), I(publicClient), and + I(frontchannelLogout)) which, while available with keycloak_client, do not have any effect on + Keycloak client-templates and are discarded if supplied with an API request changing client-templates. As such, + they are not available through this module. extends_documentation_fragment: -- community.general.keycloak + - community.general.keycloak + - community.general.attributes author: - Eike Frost (@eikef) diff --git a/plugins/modules/keycloak_group.py b/plugins/modules/keycloak_group.py index 3df87c8fe5..94d96543c8 100644 --- a/plugins/modules/keycloak_group.py +++ b/plugins/modules/keycloak_group.py @@ -31,6 +31,11 @@ description: - When updating a group, where possible provide the group ID to the module. This removes a lookup to the API to translate the name into the group ID. +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: @@ -74,8 +79,8 @@ notes: are read-only for groups. This limitation will be removed in a later version of this module. extends_documentation_fragment: -- community.general.keycloak - + - community.general.keycloak + - community.general.attributes author: - Adam Goossens (@adamgoossens) diff --git a/plugins/modules/keycloak_identity_provider.py b/plugins/modules/keycloak_identity_provider.py index 5915006d6b..0d12ae03a4 100644 --- a/plugins/modules/keycloak_identity_provider.py +++ b/plugins/modules/keycloak_identity_provider.py @@ -26,6 +26,11 @@ description: - The names of module options are snake_cased versions of the camelCase ones found in the Keycloak API and its documentation at U(https://www.keycloak.org/docs-api/15.0/rest-api/index.html). +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: @@ -270,7 +275,8 @@ options: type: dict extends_documentation_fragment: -- community.general.keycloak + - community.general.keycloak + - community.general.attributes author: - Laurent Paumier (@laurpaum) diff --git a/plugins/modules/keycloak_realm.py b/plugins/modules/keycloak_realm.py index 73a17cf10b..53f81be489 100644 --- a/plugins/modules/keycloak_realm.py +++ b/plugins/modules/keycloak_realm.py @@ -17,7 +17,6 @@ short_description: Allows administration of Keycloak realm via Keycloak API version_added: 3.0.0 - description: - This module allows the administration of Keycloak realm via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the realm being @@ -33,6 +32,12 @@ description: SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful. If you do not specify a setting, usually a sensible default is chosen. +attributes: + check_mode: + support: full + diff_mode: + support: full + options: state: description: @@ -503,8 +508,8 @@ options: type: int extends_documentation_fragment: -- community.general.keycloak - + - community.general.keycloak + - community.general.attributes author: - Christophe Gilles (@kris2kris) diff --git a/plugins/modules/keycloak_role.py b/plugins/modules/keycloak_role.py index ea6828b38e..bbec5f5919 100644 --- a/plugins/modules/keycloak_role.py +++ b/plugins/modules/keycloak_role.py @@ -30,6 +30,11 @@ description: be returned that way by this module. You may pass single values for attributes when calling the module, and this will be translated into a list suitable for the API. +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: @@ -74,8 +79,8 @@ options: - Values may be single values (e.g. a string) or a list of strings. extends_documentation_fragment: -- community.general.keycloak - + - community.general.keycloak + - community.general.attributes author: - Laurent Paumier (@laurpaum) diff --git a/plugins/modules/keycloak_user_federation.py b/plugins/modules/keycloak_user_federation.py index fbb31e695d..8e1ddb12d9 100644 --- a/plugins/modules/keycloak_user_federation.py +++ b/plugins/modules/keycloak_user_federation.py @@ -26,6 +26,11 @@ description: - The names of module options are snake_cased versions of the camelCase ones found in the Keycloak API and its documentation at U(https://www.keycloak.org/docs-api/20.0.2/rest-api/index.html). +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: @@ -461,7 +466,8 @@ options: type: dict extends_documentation_fragment: -- community.general.keycloak + - community.general.keycloak + - community.general.attributes author: - Laurent Paumier (@laurpaum) diff --git a/plugins/modules/keycloak_user_rolemapping.py b/plugins/modules/keycloak_user_rolemapping.py index 9e909716ac..d754e313a5 100644 --- a/plugins/modules/keycloak_user_rolemapping.py +++ b/plugins/modules/keycloak_user_rolemapping.py @@ -32,6 +32,11 @@ description: - When updating a user_rolemapping, where possible provide the role ID to the module. This removes a lookup to the API to translate the name into the role ID. +attributes: + check_mode: + support: full + diff_mode: + support: full options: state: @@ -104,8 +109,8 @@ options: providing it will reduce the number of API calls required. extends_documentation_fragment: -- community.general.keycloak - + - community.general.keycloak + - community.general.attributes author: - Dušan Marković (@bratwurzt) From 0307fd12eb3c1c2b30255235a69bac64fede8705 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 11:13:27 +0100 Subject: [PATCH 0492/2104] Add attributes to ocapi_info (#6066) Add attributes to ocapi_info. --- plugins/modules/ocapi_info.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/modules/ocapi_info.py b/plugins/modules/ocapi_info.py index 2cb7a3afca..d7dfdccc7c 100644 --- a/plugins/modules/ocapi_info.py +++ b/plugins/modules/ocapi_info.py @@ -18,6 +18,9 @@ short_description: Manages Out-Of-Band controllers using Open Composable API (OC description: - Builds OCAPI URIs locally and sends them to remote OOB controllers to get information back. +extends_documentation_fragment: + - community.general.attributes + - community.general.attributes.info_module options: category: required: true From b72b7d49363aba4fb3ec44fcbb6032de9e7084ad Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 11:32:20 +0100 Subject: [PATCH 0493/2104] Run tests with EOL ansible-core versions in GHA (#6044) Run tests with EOL ansible-core versions in GHA. --- .azure-pipelines/azure-pipelines.yml | 74 ---------- .github/workflows/ansible-test.yml | 193 +++++++++++++++++++++++++++ README.md | 1 + tests/utils/shippable/shippable.sh | 6 +- 4 files changed, 195 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/ansible-test.yml diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 3816369497..e3b0e8bdc4 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -112,19 +112,6 @@ stages: - test: 2 - test: 3 - test: 4 - - stage: Sanity_2_11 - displayName: Sanity 2.11 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - nameFormat: Test {0} - testFormat: 2.11/sanity/{0} - targets: - - test: 1 - - test: 2 - - test: 3 - - test: 4 ### Units - stage: Units_devel displayName: Units devel @@ -176,17 +163,6 @@ stages: targets: - test: 2.6 - test: 3.8 - - stage: Units_2_11 - displayName: Units 2.11 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - nameFormat: Python {0} - testFormat: 2.11/units/{0}/1 - targets: - - test: 2.7 - - test: 3.5 ## Remote - stage: Remote_devel_extra_vms @@ -279,22 +255,6 @@ stages: - 1 - 2 - 3 - - stage: Remote_2_11 - displayName: Remote 2.11 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - testFormat: 2.11/{0} - targets: - - name: RHEL 7.9 - test: rhel/7.9 - - name: RHEL 8.3 - test: rhel/8.3 - groups: - - 1 - - 2 - - 3 ### Docker - stage: Docker_devel @@ -371,24 +331,6 @@ stages: - 1 - 2 - 3 - - stage: Docker_2_11 - displayName: Docker 2.11 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - testFormat: 2.11/linux/{0} - targets: - - name: Fedora 32 - test: fedora32 - - name: Fedora 33 - test: fedora33 - - name: Alpine 3 - test: alpine3 - groups: - - 1 - - 2 - - 3 ### Community Docker - stage: Docker_community_devel @@ -452,46 +394,30 @@ stages: testFormat: 2.12/generic/{0}/1 targets: - test: 3.8 - - stage: Generic_2_11 - displayName: Generic 2.11 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - nameFormat: Python {0} - testFormat: 2.11/generic/{0}/1 - targets: - - test: 2.7 - - test: 3.5 - stage: Summary condition: succeededOrFailed() dependsOn: - Sanity_devel - - Sanity_2_11 - Sanity_2_12 - Sanity_2_13 - Sanity_2_14 - Units_devel - - Units_2_11 - Units_2_12 - Units_2_13 - Units_2_14 - Remote_devel_extra_vms - Remote_devel - - Remote_2_11 - Remote_2_12 - Remote_2_13 - Remote_2_14 - Docker_devel - - Docker_2_11 - Docker_2_12 - Docker_2_13 - Docker_2_14 - Docker_community_devel # Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled. # - Generic_devel -# - Generic_2_11 # - Generic_2_12 # - Generic_2_13 # - Generic_2_14 diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml new file mode 100644 index 0000000000..ef170347c3 --- /dev/null +++ b/.github/workflows/ansible-test.yml @@ -0,0 +1,193 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +# For the comprehensive list of the inputs supported by the ansible-community/ansible-test-gh-action GitHub Action, see +# https://github.com/marketplace/actions/ansible-test + +name: EOL CI +on: + # Run EOL CI against all pushes (direct commits, also merged PRs), Pull Requests + push: + branches: + - main + - stable-* + pull_request: + # Run EOL CI once per day (at 08:00 UTC) + schedule: + - cron: '0 8 * * *' + +concurrency: + # Make sure there is at most one active run per PR, but do not cancel any non-PR runs + group: ${{ github.workflow }}-${{ (github.head_ref && github.event.number) || github.run_id }} + cancel-in-progress: true + +jobs: + sanity: + name: EOL Sanity (Ⓐ${{ matrix.ansible }}) + strategy: + matrix: + ansible: + - '2.11' + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["2.9", "2.10", "2.11"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} + steps: + - name: Perform sanity testing + uses: felixfontein/ansible-test-gh-action@main + with: + ansible-core-github-repository-slug: felixfontein/ansible + ansible-core-version: stable-${{ matrix.ansible }} + coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }} + pull-request-change-detection: 'true' + testing-type: sanity + + units: + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["2.9", "2.10", "2.11"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} + name: EOL Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}) + strategy: + # As soon as the first unit test fails, cancel the others to free up the CI queue + fail-fast: true + matrix: + ansible: + - '' + python: + - '' + exclude: + - ansible: '' + include: + - ansible: '2.11' + python: '2.7' + - ansible: '2.11' + python: '3.5' + + steps: + - name: >- + Perform unit testing against + Ansible version ${{ matrix.ansible }} + uses: felixfontein/ansible-test-gh-action@main + with: + ansible-core-github-repository-slug: felixfontein/ansible + ansible-core-version: stable-${{ matrix.ansible }} + coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }} + pre-test-cmd: >- + mkdir -p ../../ansible + ; + git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools + pull-request-change-detection: 'true' + target-python-version: ${{ matrix.python }} + testing-type: units + + integration: + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["2.9", "2.10", "2.11"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} + name: EOL I (Ⓐ${{ matrix.ansible }}+${{ matrix.docker }}+py${{ matrix.python }}:${{ matrix.target }}) + strategy: + fail-fast: false + matrix: + ansible: + - '' + docker: + - '' + python: + - '' + target: + - '' + exclude: + - ansible: '' + include: + # 2.11 + - ansible: '2.11' + docker: fedora32 + python: '' + target: azp/posix/1/ + - ansible: '2.11' + docker: fedora32 + python: '' + target: azp/posix/2/ + - ansible: '2.11' + docker: fedora32 + python: '' + target: azp/posix/3/ + - ansible: '2.11' + docker: fedora33 + python: '' + target: azp/posix/1/ + - ansible: '2.11' + docker: fedora33 + python: '' + target: azp/posix/2/ + - ansible: '2.11' + docker: fedora33 + python: '' + target: azp/posix/3/ + - ansible: '2.11' + docker: alpine3 + python: '' + target: azp/posix/1/ + - ansible: '2.11' + docker: alpine3 + python: '' + target: azp/posix/2/ + - ansible: '2.11' + docker: alpine3 + python: '' + target: azp/posix/3/ + # Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled. + # - ansible: '2.11' + # docker: default + # python: '2.7' + # target: azp/generic/1/ + # - ansible: '2.11' + # docker: default + # python: '3.5' + # target: azp/generic/2/ + + steps: + - name: >- + Perform integration testing against + Ansible version ${{ matrix.ansible }} + under Python ${{ matrix.python }} + uses: felixfontein/ansible-test-gh-action@main + with: + ansible-core-github-repository-slug: felixfontein/ansible + ansible-core-version: stable-${{ matrix.ansible }} + coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }} + docker-image: ${{ matrix.docker }} + integration-continue-on-error: 'false' + integration-diff: 'false' + integration-retry-on-error: 'true' + pre-test-cmd: >- + mkdir -p ../../ansible + ; + git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git ../../ansible/posix + ; + git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git ../../community/crypto + ; + git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools + pull-request-change-detection: 'true' + target: ${{ matrix.target }} + target-python-version: ${{ matrix.python }} + testing-type: integration diff --git a/README.md b/README.md index 94d5b506ba..163a7f4ccb 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ SPDX-License-Identifier: GPL-3.0-or-later # Community General Collection [![Build Status](https://dev.azure.com/ansible/community.general/_apis/build/status/CI?branchName=main)](https://dev.azure.com/ansible/community.general/_build?definitionId=31) +[![EOL CI](https://github.com/ansible-collections/community.general/workflows/EOL%20CI/badge.svg?event=push)](https://github.com/ansible-collections/community.general/actions) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.general)](https://codecov.io/gh/ansible-collections/community.general) This repository contains the `community.general` Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections. diff --git a/tests/utils/shippable/shippable.sh b/tests/utils/shippable/shippable.sh index ba8842d97b..4f97771c28 100755 --- a/tests/utils/shippable/shippable.sh +++ b/tests/utils/shippable/shippable.sh @@ -90,13 +90,9 @@ if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then fi if [ "${script}" != "sanity" ] && [ "${script}" != "units" ] && [ "${test}" != "sanity/extra" ]; then - CRYPTO_BRANCH=main - if [ "${script}" == "linux" ] && [[ "${test}" =~ "ubuntu1604/" ]]; then - CRYPTO_BRANCH=stable-1 - fi # To prevent Python dependencies on other collections only install other collections for integration tests retry git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix" - retry git clone --depth=1 --branch "${CRYPTO_BRANCH}" --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto" + retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto" # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429) # retry ansible-galaxy -vvv collection install ansible.posix # retry ansible-galaxy -vvv collection install community.crypto From de1f0ff419a2f2bb86a020cc498f94069524a0a4 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 25 Feb 2023 10:57:48 +0100 Subject: [PATCH 0494/2104] Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified (#6075) Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified. --- .../plugins/lookup/onepassword/__init__.py | 0 .../onepassword/test_onepassword_cli_v1.py | 50 ---------- .../onepassword/test_onepassword_cli_v2.py | 52 ----------- .../common.py => onepassword_common.py} | 2 +- .../conftest.py => onepassword_conftest.py} | 0 .../v1_out_01.json | 0 .../v1_out_01.json.license | 0 .../v1_out_02.json | 0 .../v1_out_02.json.license | 0 .../v1_out_03.json | 0 .../v1_out_03.json.license | 0 .../v2_out_01.json | 0 .../v2_out_01.json.license | 0 .../v2_out_02.json | 0 .../v2_out_02.json.license | 0 .../v2_out_03.json | 0 .../v2_out_03.json.license | 0 .../{onepassword => }/test_onepassword.py | 91 ++++++++++++++++++- 18 files changed, 89 insertions(+), 106 deletions(-) delete mode 100644 tests/unit/plugins/lookup/onepassword/__init__.py delete mode 100644 tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py delete mode 100644 tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py rename tests/unit/plugins/lookup/{onepassword/common.py => onepassword_common.py} (96%) rename tests/unit/plugins/lookup/{onepassword/conftest.py => onepassword_conftest.py} (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v1_out_01.json (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v1_out_01.json.license (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v1_out_02.json (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v1_out_02.json.license (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v1_out_03.json (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v1_out_03.json.license (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v2_out_01.json (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v2_out_01.json.license (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v2_out_02.json (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v2_out_02.json.license (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v2_out_03.json (100%) rename tests/unit/plugins/lookup/{onepassword/fixtures => onepassword_fixtures}/v2_out_03.json.license (100%) rename tests/unit/plugins/lookup/{onepassword => }/test_onepassword.py (68%) diff --git a/tests/unit/plugins/lookup/onepassword/__init__.py b/tests/unit/plugins/lookup/onepassword/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py deleted file mode 100644 index dc9b44af66..0000000000 --- a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v1.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2022 Ansible Project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import pytest - - -from ansible_collections.community.general.plugins.lookup.onepassword import OnePassCLIv1 - - -@pytest.mark.parametrize( - ("args", "rc", "expected_call_args", "expected_call_kwargs", "expected"), - ( - ([], 0, ["get", "account"], {"ignore_errors": True}, True,), - ([], 1, ["get", "account"], {"ignore_errors": True}, False,), - (["acme"], 1, ["get", "account", "--account", "acme.1password.com"], {"ignore_errors": True}, False,), - ) -) -def test_assert_logged_in(mocker, args, rc, expected_call_args, expected_call_kwargs, expected): - mocker.patch.object(OnePassCLIv1, "_run", return_value=[rc, "", ""]) - - op_cli = OnePassCLIv1(*args) - result = op_cli.assert_logged_in() - - op_cli._run.assert_called_with(expected_call_args, **expected_call_kwargs) - assert result == expected - - -def test_full_signin(mocker): - mocker.patch.object(OnePassCLIv1, "_run", return_value=[0, "", ""]) - - op_cli = OnePassCLIv1( - subdomain="acme", - username="bob@acme.com", - secret_key="SECRET", - master_password="ONEKEYTORULETHEMALL", - ) - result = op_cli.full_signin() - - op_cli._run.assert_called_with([ - "signin", - "acme.1password.com", - b"bob@acme.com", - b"SECRET", - "--raw", - ], command_input=b"ONEKEYTORULETHEMALL") - assert result == [0, "", ""] diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py b/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py deleted file mode 100644 index f9c3e48ab6..0000000000 --- a/tests/unit/plugins/lookup/onepassword/test_onepassword_cli_v2.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) 2022 Ansible Project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import pytest - - -from ansible_collections.community.general.plugins.lookup.onepassword import OnePassCLIv2 - - -@pytest.mark.parametrize( - ("args", "out", "expected_call_args", "expected_call_kwargs", "expected"), - ( - ([], "list of accounts", ["account", "get"], {"ignore_errors": True}, True,), - (["acme"], "list of accounts", ["account", "get", "--account", "acme.1password.com"], {"ignore_errors": True}, True,), - ([], "", ["account", "list"], {}, False,), - ) -) -def test_assert_logged_in(mocker, args, out, expected_call_args, expected_call_kwargs, expected): - mocker.patch.object(OnePassCLIv2, "_run", return_value=[0, out, ""]) - op_cli = OnePassCLIv2(*args) - result = op_cli.assert_logged_in() - - op_cli._run.assert_called_with(expected_call_args, **expected_call_kwargs) - assert result == expected - - -def test_full_signin(mocker): - mocker.patch.object(OnePassCLIv2, "_run", return_value=[0, "", ""]) - - op_cli = OnePassCLIv2( - subdomain="acme", - username="bob@acme.com", - secret_key="SECRET", - master_password="ONEKEYTORULETHEMALL", - ) - result = op_cli.full_signin() - - op_cli._run.assert_called_with( - [ - "account", "add", "--raw", - "--address", "acme.1password.com", - "--email", b"bob@acme.com", - "--signin", - ], - command_input=b"ONEKEYTORULETHEMALL", - environment_update={'OP_SECRET_KEY': 'SECRET'}, - ) - assert result == [0, "", ""] diff --git a/tests/unit/plugins/lookup/onepassword/common.py b/tests/unit/plugins/lookup/onepassword_common.py similarity index 96% rename from tests/unit/plugins/lookup/onepassword/common.py rename to tests/unit/plugins/lookup/onepassword_common.py index 141aea91a3..0929792251 100644 --- a/tests/unit/plugins/lookup/onepassword/common.py +++ b/tests/unit/plugins/lookup/onepassword_common.py @@ -15,7 +15,7 @@ from ansible_collections.community.general.plugins.lookup.onepassword import ( def load_file(file): - with open((os.path.join(os.path.dirname(__file__), "fixtures", file)), "r") as f: + with open((os.path.join(os.path.dirname(__file__), "onepassword_fixtures", file)), "r") as f: return json.loads(f.read()) diff --git a/tests/unit/plugins/lookup/onepassword/conftest.py b/tests/unit/plugins/lookup/onepassword_conftest.py similarity index 100% rename from tests/unit/plugins/lookup/onepassword/conftest.py rename to tests/unit/plugins/lookup/onepassword_conftest.py diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json b/tests/unit/plugins/lookup/onepassword_fixtures/v1_out_01.json similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json rename to tests/unit/plugins/lookup/onepassword_fixtures/v1_out_01.json diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json.license b/tests/unit/plugins/lookup/onepassword_fixtures/v1_out_01.json.license similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v1_out_01.json.license rename to tests/unit/plugins/lookup/onepassword_fixtures/v1_out_01.json.license diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json b/tests/unit/plugins/lookup/onepassword_fixtures/v1_out_02.json similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json rename to tests/unit/plugins/lookup/onepassword_fixtures/v1_out_02.json diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json.license b/tests/unit/plugins/lookup/onepassword_fixtures/v1_out_02.json.license similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v1_out_02.json.license rename to tests/unit/plugins/lookup/onepassword_fixtures/v1_out_02.json.license diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json b/tests/unit/plugins/lookup/onepassword_fixtures/v1_out_03.json similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json rename to tests/unit/plugins/lookup/onepassword_fixtures/v1_out_03.json diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json.license b/tests/unit/plugins/lookup/onepassword_fixtures/v1_out_03.json.license similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v1_out_03.json.license rename to tests/unit/plugins/lookup/onepassword_fixtures/v1_out_03.json.license diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json b/tests/unit/plugins/lookup/onepassword_fixtures/v2_out_01.json similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json rename to tests/unit/plugins/lookup/onepassword_fixtures/v2_out_01.json diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json.license b/tests/unit/plugins/lookup/onepassword_fixtures/v2_out_01.json.license similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v2_out_01.json.license rename to tests/unit/plugins/lookup/onepassword_fixtures/v2_out_01.json.license diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json b/tests/unit/plugins/lookup/onepassword_fixtures/v2_out_02.json similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json rename to tests/unit/plugins/lookup/onepassword_fixtures/v2_out_02.json diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json.license b/tests/unit/plugins/lookup/onepassword_fixtures/v2_out_02.json.license similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v2_out_02.json.license rename to tests/unit/plugins/lookup/onepassword_fixtures/v2_out_02.json.license diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json b/tests/unit/plugins/lookup/onepassword_fixtures/v2_out_03.json similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json rename to tests/unit/plugins/lookup/onepassword_fixtures/v2_out_03.json diff --git a/tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json.license b/tests/unit/plugins/lookup/onepassword_fixtures/v2_out_03.json.license similarity index 100% rename from tests/unit/plugins/lookup/onepassword/fixtures/v2_out_03.json.license rename to tests/unit/plugins/lookup/onepassword_fixtures/v2_out_03.json.license diff --git a/tests/unit/plugins/lookup/onepassword/test_onepassword.py b/tests/unit/plugins/lookup/test_onepassword.py similarity index 68% rename from tests/unit/plugins/lookup/onepassword/test_onepassword.py rename to tests/unit/plugins/lookup/test_onepassword.py index e9f8f42c96..ab7f3def29 100644 --- a/tests/unit/plugins/lookup/onepassword/test_onepassword.py +++ b/tests/unit/plugins/lookup/test_onepassword.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Ansible Project +# Copyright (c) 2022 Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -10,8 +10,13 @@ import itertools import json import pytest -from .conftest import OP_VERSION_FIXTURES -from .common import MOCK_ENTRIES +from .onepassword_conftest import ( # noqa: F401, pylint: disable=unused-import + OP_VERSION_FIXTURES, + fake_op, + opv1, + opv2, +) +from .onepassword_common import MOCK_ENTRIES from ansible.errors import AnsibleLookupError from ansible.plugins.loader import lookup_loader @@ -21,6 +26,86 @@ from ansible_collections.community.general.plugins.lookup.onepassword import ( ) +@pytest.mark.parametrize( + ("args", "rc", "expected_call_args", "expected_call_kwargs", "expected"), + ( + ([], 0, ["get", "account"], {"ignore_errors": True}, True,), + ([], 1, ["get", "account"], {"ignore_errors": True}, False,), + (["acme"], 1, ["get", "account", "--account", "acme.1password.com"], {"ignore_errors": True}, False,), + ) +) +def test_assert_logged_in_v1(mocker, args, rc, expected_call_args, expected_call_kwargs, expected): + mocker.patch.object(OnePassCLIv1, "_run", return_value=[rc, "", ""]) + + op_cli = OnePassCLIv1(*args) + result = op_cli.assert_logged_in() + + op_cli._run.assert_called_with(expected_call_args, **expected_call_kwargs) + assert result == expected + + +def test_full_signin_v1(mocker): + mocker.patch.object(OnePassCLIv1, "_run", return_value=[0, "", ""]) + + op_cli = OnePassCLIv1( + subdomain="acme", + username="bob@acme.com", + secret_key="SECRET", + master_password="ONEKEYTORULETHEMALL", + ) + result = op_cli.full_signin() + + op_cli._run.assert_called_with([ + "signin", + "acme.1password.com", + b"bob@acme.com", + b"SECRET", + "--raw", + ], command_input=b"ONEKEYTORULETHEMALL") + assert result == [0, "", ""] + + +@pytest.mark.parametrize( + ("args", "out", "expected_call_args", "expected_call_kwargs", "expected"), + ( + ([], "list of accounts", ["account", "get"], {"ignore_errors": True}, True,), + (["acme"], "list of accounts", ["account", "get", "--account", "acme.1password.com"], {"ignore_errors": True}, True,), + ([], "", ["account", "list"], {}, False,), + ) +) +def test_assert_logged_in_v2(mocker, args, out, expected_call_args, expected_call_kwargs, expected): + mocker.patch.object(OnePassCLIv2, "_run", return_value=[0, out, ""]) + op_cli = OnePassCLIv2(*args) + result = op_cli.assert_logged_in() + + op_cli._run.assert_called_with(expected_call_args, **expected_call_kwargs) + assert result == expected + + +def test_full_signin_v2(mocker): + mocker.patch.object(OnePassCLIv2, "_run", return_value=[0, "", ""]) + + op_cli = OnePassCLIv2( + subdomain="acme", + username="bob@acme.com", + secret_key="SECRET", + master_password="ONEKEYTORULETHEMALL", + ) + result = op_cli.full_signin() + + op_cli._run.assert_called_with( + [ + "account", "add", "--raw", + "--address", "acme.1password.com", + "--email", b"bob@acme.com", + "--signin", + ], + command_input=b"ONEKEYTORULETHEMALL", + environment_update={'OP_SECRET_KEY': 'SECRET'}, + ) + assert result == [0, "", ""] + + @pytest.mark.parametrize( ("version", "version_class"), ( From 2c762c475386b0eb322e685716219750e3dc3dd4 Mon Sep 17 00:00:00 2001 From: andre161292 Date: Sat, 25 Feb 2023 10:58:04 +0100 Subject: [PATCH 0495/2104] Added support for openSUSE MicroOS (#5998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(zypper): Added condition to check for transactional-update binary to support microos closes #5615 * style(changelog): Made zypper-change uppercase Co-authored-by: Felix Fontein * fix(zypper): Removed check for /var/lib/misc/transactional-update.state * feat(zypper): Aligned transactional-update checks with zypper's * refactor(zypper): Removed dependency to psutil and made use of parsing /proc/mount * refactor(zypper): Removed need for regex, plus small refactoring --------- Co-authored-by: André Dörscheln Co-authored-by: Felix Fontein --- .../5615-zypper-transactional-update.yml | 2 ++ plugins/modules/zypper.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5615-zypper-transactional-update.yml diff --git a/changelogs/fragments/5615-zypper-transactional-update.yml b/changelogs/fragments/5615-zypper-transactional-update.yml new file mode 100644 index 0000000000..5eb6bb8405 --- /dev/null +++ b/changelogs/fragments/5615-zypper-transactional-update.yml @@ -0,0 +1,2 @@ +bugfixes: + - "zypper - make package managing work on readonly filesystem of openSUSE MicroOS (https://github.com/ansible-collections/community.general/pull/5615)." diff --git a/plugins/modules/zypper.py b/plugins/modules/zypper.py index 775ff0fd6e..9ba5555e20 100644 --- a/plugins/modules/zypper.py +++ b/plugins/modules/zypper.py @@ -519,8 +519,21 @@ def repo_refresh(m): return retvals +def get_fs_type_and_readonly_state(mount_point): + with open('/proc/mounts', 'r') as file: + for line in file.readlines(): + fields = line.split() + path = fields[1] + if path == mount_point: + fs = fields[2] + opts = fields[3] + return fs, 'ro' in opts.split(',') + return None + + def transactional_updates(): - return os.path.exists('/var/lib/misc/transactional-update.state') + return os.path.exists('/usr/sbin/transactional-update') and get_fs_type_and_readonly_state('/') == ('btrfs', True) + # =========================================== # Main control flow From 95b8afdea3dd76a045ef00e86fbeb64bc8279c10 Mon Sep 17 00:00:00 2001 From: morco Date: Sat, 25 Feb 2023 10:59:18 +0100 Subject: [PATCH 0496/2104] providerType should be defaulted for keycloak_user_federation mappers (#5863) * feat(modules/keycloak_user_federation): mapper ... ... provider type should have a default value * add changelog fragment --------- Co-authored-by: Mirko Wilhelmi --- .../5863-providerType-defaulted-keycloak_userfed-mappers.yml | 2 ++ plugins/modules/keycloak_user_federation.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5863-providerType-defaulted-keycloak_userfed-mappers.yml diff --git a/changelogs/fragments/5863-providerType-defaulted-keycloak_userfed-mappers.yml b/changelogs/fragments/5863-providerType-defaulted-keycloak_userfed-mappers.yml new file mode 100644 index 0000000000..6532ea92d9 --- /dev/null +++ b/changelogs/fragments/5863-providerType-defaulted-keycloak_userfed-mappers.yml @@ -0,0 +1,2 @@ +minor_changes: + - keycloak_user_federation - make ``org.keycloak.storage.ldap.mappers.LDAPStorageMapper`` the default value for mappers ``providerType`` (https://github.com/ansible-collections/community.general/pull/5863). diff --git a/plugins/modules/keycloak_user_federation.py b/plugins/modules/keycloak_user_federation.py index 8e1ddb12d9..c0dc5d271b 100644 --- a/plugins/modules/keycloak_user_federation.py +++ b/plugins/modules/keycloak_user_federation.py @@ -456,8 +456,9 @@ options: providerType: description: - - Component type for this mapper (only supported value is C(org.keycloak.storage.ldap.mappers.LDAPStorageMapper)). + - Component type for this mapper. type: str + default: org.keycloak.storage.ldap.mappers.LDAPStorageMapper config: description: @@ -782,7 +783,7 @@ def main(): name=dict(type='str'), parentId=dict(type='str'), providerId=dict(type='str'), - providerType=dict(type='str'), + providerType=dict(type='str', default='org.keycloak.storage.ldap.mappers.LDAPStorageMapper'), config=dict(type='dict'), ) From 92544993c0b60229e05d69da32e1e687684ceed6 Mon Sep 17 00:00:00 2001 From: Joseph Shanak Date: Sat, 25 Feb 2023 04:00:07 -0600 Subject: [PATCH 0497/2104] community.general.osx_defaults: Include stderr in error messages (#6011) * Update osx_defaults documentation examples * Include stderr in errors from osx_defaults * Add Changelog Fragment * Update changelogs/fragments/6011-osx-defaults-errors.yml Co-authored-by: Felix Fontein * Change format of examples * Update plugins/modules/osx_defaults.py Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- .../fragments/6011-osx-defaults-errors.yml | 2 ++ plugins/modules/osx_defaults.py | 33 +++++++++++-------- 2 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 changelogs/fragments/6011-osx-defaults-errors.yml diff --git a/changelogs/fragments/6011-osx-defaults-errors.yml b/changelogs/fragments/6011-osx-defaults-errors.yml new file mode 100644 index 0000000000..49915d51a7 --- /dev/null +++ b/changelogs/fragments/6011-osx-defaults-errors.yml @@ -0,0 +1,2 @@ +minor_changes: + - "osx_defaults - include stderr in error messages (https://github.com/ansible-collections/community.general/pull/6011)." diff --git a/plugins/modules/osx_defaults.py b/plugins/modules/osx_defaults.py index 480f40af56..1615843732 100644 --- a/plugins/modules/osx_defaults.py +++ b/plugins/modules/osx_defaults.py @@ -78,49 +78,54 @@ notes: ''' EXAMPLES = r''' -# TODO: Describe what happens in each example - -- community.general.osx_defaults: +- name: Set boolean valued key for application domain + community.general.osx_defaults: domain: com.apple.Safari key: IncludeInternalDebugMenu type: bool value: true state: present -- community.general.osx_defaults: +- name: Set string valued key for global domain + community.general.osx_defaults: domain: NSGlobalDomain key: AppleMeasurementUnits type: string value: Centimeters state: present -- community.general.osx_defaults: +- name: Set int valued key for arbitrary plist + community.general.osx_defaults: domain: /Library/Preferences/com.apple.SoftwareUpdate key: AutomaticCheckEnabled type: int value: 1 become: true -- community.general.osx_defaults: +- name: Set int valued key only for the current host + community.general.osx_defaults: domain: com.apple.screensaver host: currentHost key: showClock type: int value: 1 -- community.general.osx_defaults: +- name: Defaults to global domain and setting value + community.general.osx_defaults: key: AppleMeasurementUnits type: string value: Centimeters -- community.general.osx_defaults: +- name: Setting an array valued key + community.general.osx_defaults: key: AppleLanguages type: array value: - en - nl -- community.general.osx_defaults: +- name: Removing a key + community.general.osx_defaults: domain: com.geekchimp.macable key: ExampleKeyToRemove state: absent @@ -264,7 +269,7 @@ class OSXDefaults(object): # If the RC is not 0, then terrible happened! Ooooh nooo! if rc != 0: - raise OSXDefaultsException("An error occurred while reading key type from defaults: %s" % out) + raise OSXDefaultsException("An error occurred while reading key type from defaults: %s" % err) # Ok, lets parse the type from output data_type = out.strip().replace('Type is ', '') @@ -275,9 +280,9 @@ class OSXDefaults(object): # Strip output out = out.strip() - # An non zero RC at this point is kinda strange... + # A non zero RC at this point is kinda strange... if rc != 0: - raise OSXDefaultsException("An error occurred while reading key value from defaults: %s" % out) + raise OSXDefaultsException("An error occurred while reading key value from defaults: %s" % err) # Convert string to list when type is array if data_type == "array": @@ -315,13 +320,13 @@ class OSXDefaults(object): expand_user_and_vars=False) if rc != 0: - raise OSXDefaultsException('An error occurred while writing value to defaults: %s' % out) + raise OSXDefaultsException('An error occurred while writing value to defaults: %s' % err) def delete(self): """ Deletes defaults key from domain """ rc, out, err = self.module.run_command(self._base_command() + ['delete', self.domain, self.key]) if rc != 0: - raise OSXDefaultsException("An error occurred while deleting key from defaults: %s" % out) + raise OSXDefaultsException("An error occurred while deleting key from defaults: %s" % err) # /commands ----------------------------------------------------------- }}} From 682c6fc967ffde3c11151972f31083423e3d008c Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Sat, 25 Feb 2023 05:00:43 -0500 Subject: [PATCH 0498/2104] nmcli: Treat order as significant when comparing address lists (#6048) * nmcli: Treat order as significant when comparing address lists Don't sort the old and new values for ipv4.addresses and ipv6.addresses before comparing them, because order matters in these parameters: the first address specified is the default source address for outbound connections. * Changelog fragment for #6048 * Update changelogs/fragments/6048-nmcli-addres-order.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- changelogs/fragments/6048-nmcli-addres-order.yml | 2 ++ plugins/modules/nmcli.py | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/6048-nmcli-addres-order.yml diff --git a/changelogs/fragments/6048-nmcli-addres-order.yml b/changelogs/fragments/6048-nmcli-addres-order.yml new file mode 100644 index 0000000000..4de15cf084 --- /dev/null +++ b/changelogs/fragments/6048-nmcli-addres-order.yml @@ -0,0 +1,2 @@ +bugfixes: + - nmcli - order is significant for lists of addresses (https://github.com/ansible-collections/community.general/pull/6048). diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index 999e06cc12..61b0325fe9 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -2144,8 +2144,12 @@ class Nmcli(object): if isinstance(current_value, list) and isinstance(value, list): # compare values between two lists - if sorted(current_value) != sorted(value): - changed = True + if key in ('ipv4.addresses', 'ipv6.addresses'): + # The order of IP addresses matters because the first one + # is the default source address for outbound connections. + changed |= current_value != value + else: + changed |= sorted(current_value) != sorted(value) elif all([key == self.mtu_setting, self.type == 'dummy', current_value is None, value == 'auto', self.mtu is None]): value = None else: From f0529dcb0e8cdc009b349da185d0238a97bfce4b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 25 Feb 2023 11:01:32 +0100 Subject: [PATCH 0499/2104] lxd plugins and modules: fix TLS/SSL context creation (#6034) Use correct purpose. --- changelogs/fragments/6034-lxd-tls.yml | 2 ++ plugins/module_utils/lxd.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/6034-lxd-tls.yml diff --git a/changelogs/fragments/6034-lxd-tls.yml b/changelogs/fragments/6034-lxd-tls.yml new file mode 100644 index 0000000000..975215f3e5 --- /dev/null +++ b/changelogs/fragments/6034-lxd-tls.yml @@ -0,0 +1,2 @@ +bugfixes: + - "lxd_* modules, lxd inventory plugin - fix TLS/SSL certificate validation problems by using the correct purpose when creating the TLS context (https://github.com/ansible-collections/community.general/issues/5616, https://github.com/ansible-collections/community.general/pull/6034)." diff --git a/plugins/module_utils/lxd.py b/plugins/module_utils/lxd.py index 007de4d8db..7f5362532a 100644 --- a/plugins/module_utils/lxd.py +++ b/plugins/module_utils/lxd.py @@ -60,7 +60,7 @@ class LXDClient(object): self.cert_file = cert_file self.key_file = key_file parts = generic_urlparse(urlparse(self.url)) - ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) + ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH) ctx.load_cert_chain(cert_file, keyfile=key_file) self.connection = HTTPSConnection(parts.get('netloc'), context=ctx) elif url.startswith('unix:'): From 53f729730bcc95c75354b11d6ad5f999f883fe9d Mon Sep 17 00:00:00 2001 From: Phil Kauffman Date: Sat, 25 Feb 2023 03:02:28 -0700 Subject: [PATCH 0500/2104] zfs_delegate_admin: fix: zfs allow cannot parse unknown uid/gid (#5943) When setting allow permissions for particular users or groups there will be circumstances when that user is not known to the host system. In that case the output of `zfs allow ` looks similar to this: $ sudo zfs allow tank/test ---- Permissions on tank/test --------------------------------------- Local+Descendent permissions: user (unknown: 1002) hold user zfsuser receive The fix in this commit removes ' (unknown: '+')' from the output leaving only the uid/gid. This allows the current parser to continue even if the uid/gid is not known. This situation occurs most often when moving a zpool from one system to another that may not have the same users/groups. Simply adding permissions to a user/group and then deleting the user/group from the system will cause this situation to occur. --- ...legate_admin-fix-zfs-allow-cannot-parse-unknown-uid-gid.yml | 2 ++ plugins/modules/zfs_delegate_admin.py | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/fragments/5943-zfs_delegate_admin-fix-zfs-allow-cannot-parse-unknown-uid-gid.yml diff --git a/changelogs/fragments/5943-zfs_delegate_admin-fix-zfs-allow-cannot-parse-unknown-uid-gid.yml b/changelogs/fragments/5943-zfs_delegate_admin-fix-zfs-allow-cannot-parse-unknown-uid-gid.yml new file mode 100644 index 0000000000..f07ca8a9a5 --- /dev/null +++ b/changelogs/fragments/5943-zfs_delegate_admin-fix-zfs-allow-cannot-parse-unknown-uid-gid.yml @@ -0,0 +1,2 @@ +bugfixes: + - zfs_delegate_admin - zfs allow output can now be parsed when uids/gids are not known to the host system (https://github.com/ansible-collections/community.general/pull/5943). diff --git a/plugins/modules/zfs_delegate_admin.py b/plugins/modules/zfs_delegate_admin.py index 7891c32672..0536f1a283 100644 --- a/plugins/modules/zfs_delegate_admin.py +++ b/plugins/modules/zfs_delegate_admin.py @@ -184,6 +184,9 @@ class ZfsDelegateAdmin(object): scope = linemap.get(line, scope) if not scope: continue + if ' (unknown: ' in line: + line = line.replace('(unknown: ', '', 1) + line = line.replace(')', '', 1) try: if line.startswith('\tuser ') or line.startswith('\tgroup '): ent_type, ent, cur_perms = line.split() From 1877ef1510175566c5ce08129929c0fe253d67ff Mon Sep 17 00:00:00 2001 From: dima1206 <32818228+dima1206@users.noreply.github.com> Date: Sat, 25 Feb 2023 12:03:13 +0200 Subject: [PATCH 0501/2104] github_webhook: Don't include secret in the config if it's absent (#5994) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * github_webhook: Don't include secret in the config if it's absent * Add changelogs * Fix indentation * Apply suggestion to simplify the check Co-authored-by: Felix Fontein --------- Co-authored-by: dima1206 <–32818228+dima1206@users.noreply.github.com> Co-authored-by: Felix Fontein --- changelogs/fragments/5994-github-webhook-secret.yml | 2 ++ plugins/modules/github_webhook.py | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5994-github-webhook-secret.yml diff --git a/changelogs/fragments/5994-github-webhook-secret.yml b/changelogs/fragments/5994-github-webhook-secret.yml new file mode 100644 index 0000000000..700703840c --- /dev/null +++ b/changelogs/fragments/5994-github-webhook-secret.yml @@ -0,0 +1,2 @@ +bugfixes: + - github_webhook - fix always changed state when no secret is provided (https://github.com/ansible-collections/community.general/pull/5994). \ No newline at end of file diff --git a/plugins/modules/github_webhook.py b/plugins/modules/github_webhook.py index 71e199adbe..d47b7a82fa 100644 --- a/plugins/modules/github_webhook.py +++ b/plugins/modules/github_webhook.py @@ -161,13 +161,18 @@ from ansible.module_utils.common.text.converters import to_native def _create_hook_config(module): - return { + hook_config = { "url": module.params["url"], "content_type": module.params["content_type"], - "secret": module.params.get("secret"), "insecure_ssl": "1" if module.params["insecure_ssl"] else "0" } + secret = module.params.get("secret") + if secret: + hook_config["secret"] = secret + + return hook_config + def create_hook(repo, module): config = _create_hook_config(module) From 7d3e6d1bb712cb15e62b9e20d16fdfe7e31cb59f Mon Sep 17 00:00:00 2001 From: morco Date: Sat, 25 Feb 2023 11:12:35 +0100 Subject: [PATCH 0502/2104] keycloak_group: support keycloak subgroups (#5814) * feat(module/keycloak_group): add support for ... ... handling subgroups * added changelog fragment and fixing sanity ... ... test issues * more sanity fixes * fix missing version and review issues * added missing licence header * fix docu * fix line beeing too long * replaced suboptimal string type prefixing ... ... with better subdict based approach * fix sanity issues * more sanity fixing * fixed more review issues * fix argument list too long * why is it failing? something wrong with the docu? * is it this line then? * undid group attribute removing, it does not ... ... belong into this PR * fix version_added for parents parameter --------- Co-authored-by: Mirko Wilhelmi --- .../5814-support-keycloak-subgroups.yml | 2 + .../identity/keycloak/keycloak.py | 138 ++++- plugins/modules/keycloak_group.py | 122 ++++- .../targets/keycloak_group/aliases | 5 + .../targets/keycloak_group/readme.adoc | 27 + .../targets/keycloak_group/tasks/main.yml | 501 ++++++++++++++++++ .../targets/keycloak_group/vars/main.yml | 10 + 7 files changed, 796 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/5814-support-keycloak-subgroups.yml create mode 100644 tests/integration/targets/keycloak_group/aliases create mode 100644 tests/integration/targets/keycloak_group/readme.adoc create mode 100644 tests/integration/targets/keycloak_group/tasks/main.yml create mode 100644 tests/integration/targets/keycloak_group/vars/main.yml diff --git a/changelogs/fragments/5814-support-keycloak-subgroups.yml b/changelogs/fragments/5814-support-keycloak-subgroups.yml new file mode 100644 index 0000000000..a369db4422 --- /dev/null +++ b/changelogs/fragments/5814-support-keycloak-subgroups.yml @@ -0,0 +1,2 @@ +minor_changes: + - keycloak_group - add new optional module parameter ``parents`` to properly handle keycloak subgroups (https://github.com/ansible-collections/community.general/pull/5814). diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index 09b22b7561..15b665752d 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -42,6 +42,7 @@ URL_CLIENTTEMPLATE = "{url}/admin/realms/{realm}/client-templates/{id}" URL_CLIENTTEMPLATES = "{url}/admin/realms/{realm}/client-templates" URL_GROUPS = "{url}/admin/realms/{realm}/groups" URL_GROUP = "{url}/admin/realms/{realm}/groups/{groupid}" +URL_GROUP_CHILDREN = "{url}/admin/realms/{realm}/groups/{groupid}/children" URL_CLIENTSCOPES = "{url}/admin/realms/{realm}/client-scopes" URL_CLIENTSCOPE = "{url}/admin/realms/{realm}/client-scopes/{id}" @@ -1249,7 +1250,7 @@ class KeycloakAPI(object): self.module.fail_json(msg="Could not fetch group %s in realm %s: %s" % (gid, realm, str(e))) - def get_group_by_name(self, name, realm="master"): + def get_group_by_name(self, name, realm="master", parents=None): """ Fetch a keycloak group within a realm based on its name. The Keycloak API does not allow filtering of the Groups resource by name. @@ -1259,10 +1260,19 @@ class KeycloakAPI(object): If the group does not exist, None is returned. :param name: Name of the group to fetch. :param realm: Realm in which the group resides; default 'master' + :param parents: Optional list of parents when group to look for is a subgroup """ groups_url = URL_GROUPS.format(url=self.baseurl, realm=realm) try: - all_groups = self.get_groups(realm=realm) + if parents: + parent = self.get_subgroup_direct_parent(parents, realm) + + if not parent: + return None + + all_groups = parent['subGroups'] + else: + all_groups = self.get_groups(realm=realm) for group in all_groups: if group['name'] == name: @@ -1274,6 +1284,102 @@ class KeycloakAPI(object): self.module.fail_json(msg="Could not fetch group %s in realm %s: %s" % (name, realm, str(e))) + def _get_normed_group_parent(self, parent): + """ Converts parent dict information into a more easy to use form. + + :param parent: parent describing dict + """ + if parent['id']: + return (parent['id'], True) + + return (parent['name'], False) + + def get_subgroup_by_chain(self, name_chain, realm="master"): + """ Access a subgroup API object by walking down a given name/id chain. + + Groups can be given either as by name or by ID, the first element + must either be a toplvl group or given as ID, all parents must exist. + + If the group cannot be found, None is returned. + :param name_chain: Topdown ordered list of subgroup parent (ids or names) + its own name at the end + :param realm: Realm in which the group resides; default 'master' + """ + cp = name_chain[0] + + # for 1st parent in chain we must query the server + cp, is_id = self._get_normed_group_parent(cp) + + if is_id: + tmp = self.get_group_by_groupid(cp, realm=realm) + else: + # given as name, assume toplvl group + tmp = self.get_group_by_name(cp, realm=realm) + + if not tmp: + return None + + for p in name_chain[1:]: + for sg in tmp['subGroups']: + pv, is_id = self._get_normed_group_parent(p) + + if is_id: + cmpkey = "id" + else: + cmpkey = "name" + + if pv == sg[cmpkey]: + tmp = sg + break + + if not tmp: + return None + + return tmp + + def get_subgroup_direct_parent(self, parents, realm="master", children_to_resolve=None): + """ Get keycloak direct parent group API object for a given chain of parents. + + To succesfully work the API for subgroups we actually dont need + to "walk the whole tree" for nested groups but only need to know + the ID for the direct predecessor of current subgroup. This + method will guarantee us this information getting there with + as minimal work as possible. + + Note that given parent list can and might be incomplete at the + upper levels as long as it starts with an ID instead of a name + + If the group does not exist, None is returned. + :param parents: Topdown ordered list of subgroup parents + :param realm: Realm in which the group resides; default 'master' + """ + if children_to_resolve is None: + # start recursion by reversing parents (in optimal cases + # we dont need to walk the whole tree upwarts) + parents = list(reversed(parents)) + children_to_resolve = [] + + if not parents: + # walk complete parents list to the top, all names, no id's, + # try to resolve it assuming list is complete and 1st + # element is a toplvl group + return self.get_subgroup_by_chain(list(reversed(children_to_resolve)), realm=realm) + + cp = parents[0] + unused, is_id = self._get_normed_group_parent(cp) + + if is_id: + # current parent is given as ID, we can stop walking + # upwards searching for an entry point + return self.get_subgroup_by_chain([cp] + list(reversed(children_to_resolve)), realm=realm) + else: + # current parent is given as name, it must be resolved + # later, try next parent (recurse) + children_to_resolve.append(cp) + return self.get_subgroup_direct_parent( + parents[1:], + realm=realm, children_to_resolve=children_to_resolve + ) + def create_group(self, grouprep, realm="master"): """ Create a Keycloak group. @@ -1288,6 +1394,34 @@ class KeycloakAPI(object): self.module.fail_json(msg="Could not create group %s in realm %s: %s" % (grouprep['name'], realm, str(e))) + def create_subgroup(self, parents, grouprep, realm="master"): + """ Create a Keycloak subgroup. + + :param parents: list of one or more parent groups + :param grouprep: a GroupRepresentation of the group to be created. Must contain at minimum the field name. + :return: HTTPResponse object on success + """ + parent_id = "---UNDETERMINED---" + try: + parent_id = self.get_subgroup_direct_parent(parents, realm) + + if not parent_id: + raise Exception( + "Could not determine subgroup parent ID for given" + " parent chain {0}. Assure that all parents exist" + " already and the list is complete and properly" + " ordered, starts with an ID or starts at the" + " top level".format(parents) + ) + + parent_id = parent_id["id"] + url = URL_GROUP_CHILDREN.format(url=self.baseurl, realm=realm, groupid=parent_id) + return open_url(url, method='POST', http_agent=self.http_agent, headers=self.restheaders, timeout=self.connection_timeout, + data=json.dumps(grouprep), validate_certs=self.validate_certs) + except Exception as e: + self.module.fail_json(msg="Could not create subgroup %s for parent group %s in realm %s: %s" + % (grouprep['name'], parent_id, realm, str(e))) + def update_group(self, grouprep, realm="master"): """ Update an existing group. diff --git a/plugins/modules/keycloak_group.py b/plugins/modules/keycloak_group.py index 94d96543c8..399bc5b4fa 100644 --- a/plugins/modules/keycloak_group.py +++ b/plugins/modules/keycloak_group.py @@ -22,7 +22,7 @@ description: to your needs and a user having the expected roles. - The names of module options are snake_cased versions of the camelCase ones found in the - Keycloak API and its documentation at U(https://www.keycloak.org/docs-api/8.0/rest-api/index.html). + Keycloak API and its documentation at U(https://www.keycloak.org/docs-api/20.0.2/rest-api/index.html). - Attributes are multi-valued in the Keycloak API. All attributes are lists of individual values and will be returned that way by this module. You may pass single values for attributes when calling the module, @@ -42,7 +42,9 @@ options: description: - State of the group. - On C(present), the group will be created if it does not yet exist, or updated with the parameters you provide. - - On C(absent), the group will be removed if it exists. + - >- + On C(absent), the group will be removed if it exists. Be aware that absenting + a group with subgroups will automatically delete all its subgroups too. default: 'present' type: str choices: @@ -74,6 +76,38 @@ options: - A dict of key/value pairs to set as custom attributes for the group. - Values may be single values (e.g. a string) or a list of strings. + parents: + version_added: "6.4.0" + type: list + description: + - List of parent groups for the group to handle sorted top to bottom. + - >- + Set this to create a group as a subgroup of another group or groups (parents) or + when accessing an existing subgroup by name. + - >- + Not necessary to set when accessing an existing subgroup by its C(ID) because in + that case the group can be directly queried without necessarily knowing its parent(s). + elements: dict + suboptions: + id: + type: str + description: + - Identify parent by ID. + - Needs less API calls than using I(name). + - A deep parent chain can be started at any point when first given parent is given as ID. + - Note that in principle both ID and name can be specified at the same time + but current implementation only always use just one of them, with ID + being preferred. + name: + type: str + description: + - Identify parent by name. + - Needs more internal API calls than using I(id) to map names to ID's under the hood. + - When giving a parent chain with only names it must be complete up to the top. + - Note that in principle both ID and name can be specified at the same time + but current implementation only always use just one of them, with ID + being preferred. + notes: - Presently, the I(realmRoles), I(clientRoles) and I(access) attributes returned by the Keycloak API are read-only for groups. This limitation will be removed in a later version of this module. @@ -97,6 +131,7 @@ EXAMPLES = ''' auth_realm: master auth_username: USERNAME auth_password: PASSWORD + register: result_new_kcgrp delegate_to: localhost - name: Create a Keycloak group, authentication with token @@ -162,6 +197,64 @@ EXAMPLES = ''' - list - items delegate_to: localhost + +- name: Create a Keycloak subgroup of a base group (using parent name) + community.general.keycloak_group: + name: my-new-kc-group-sub + realm: MyCustomRealm + state: present + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + parents: + - name: my-new-kc-group + register: result_new_kcgrp_sub + delegate_to: localhost + +- name: Create a Keycloak subgroup of a base group (using parent id) + community.general.keycloak_group: + name: my-new-kc-group-sub2 + realm: MyCustomRealm + state: present + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + parents: + - id: "{{ result_new_kcgrp.end_state.id }}" + delegate_to: localhost + +- name: Create a Keycloak subgroup of a subgroup (using parent names) + community.general.keycloak_group: + name: my-new-kc-group-sub-sub + realm: MyCustomRealm + state: present + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + parents: + - name: my-new-kc-group + - name: my-new-kc-group-sub + delegate_to: localhost + +- name: Create a Keycloak subgroup of a subgroup (using direct parent id) + community.general.keycloak_group: + name: my-new-kc-group-sub-sub + realm: MyCustomRealm + state: present + auth_client_id: admin-cli + auth_keycloak_url: https://auth.example.com/auth + auth_realm: master + auth_username: USERNAME + auth_password: PASSWORD + parents: + - id: "{{ result_new_kcgrp_sub.end_state.id }}" + delegate_to: localhost ''' RETURN = ''' @@ -240,6 +333,13 @@ def main(): id=dict(type='str'), name=dict(type='str'), attributes=dict(type='dict'), + parents=dict( + type='list', elements='dict', + options=dict( + id=dict(type='str'), + name=dict(type='str') + ), + ), ) argument_spec.update(meta_args) @@ -266,6 +366,8 @@ def main(): name = module.params.get('name') attributes = module.params.get('attributes') + parents = module.params.get('parents') + # attributes in Keycloak have their values returned as lists # via the API. attributes is a dict, so we'll transparently convert # the values to lists. @@ -275,12 +377,12 @@ def main(): # Filter and map the parameters names that apply to the group group_params = [x for x in module.params - if x not in list(keycloak_argument_spec().keys()) + ['state', 'realm'] and + if x not in list(keycloak_argument_spec().keys()) + ['state', 'realm', 'parents'] and module.params.get(x) is not None] # See if it already exists in Keycloak if gid is None: - before_group = kc.get_group_by_name(name, realm=realm) + before_group = kc.get_group_by_name(name, realm=realm, parents=parents) else: before_group = kc.get_group_by_groupid(gid, realm=realm) @@ -323,9 +425,15 @@ def main(): if module.check_mode: module.exit_json(**result) - # create it - kc.create_group(desired_group, realm=realm) - after_group = kc.get_group_by_name(name, realm) + # create it ... + if parents: + # ... as subgroup of another parent group + kc.create_subgroup(parents, desired_group, realm=realm) + else: + # ... as toplvl base group + kc.create_group(desired_group, realm=realm) + + after_group = kc.get_group_by_name(name, realm, parents=parents) result['end_state'] = after_group diff --git a/tests/integration/targets/keycloak_group/aliases b/tests/integration/targets/keycloak_group/aliases new file mode 100644 index 0000000000..bd1f024441 --- /dev/null +++ b/tests/integration/targets/keycloak_group/aliases @@ -0,0 +1,5 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +unsupported diff --git a/tests/integration/targets/keycloak_group/readme.adoc b/tests/integration/targets/keycloak_group/readme.adoc new file mode 100644 index 0000000000..1941e54efd --- /dev/null +++ b/tests/integration/targets/keycloak_group/readme.adoc @@ -0,0 +1,27 @@ +// Copyright (c) Ansible Project +// GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +// SPDX-License-Identifier: GPL-3.0-or-later + +To be able to run these integration tests a keycloak server must be +reachable under a specific url with a specific admin user and password. +The exact values expected for these parameters can be found in +'vars/main.yml' file. A simple way to do this is to use the official +keycloak docker images like this: + +---- +docker run --name mykeycloak -p 8080:8080 -e KC_HTTP_RELATIVE_PATH= -e KEYCLOAK_ADMIN= -e KEYCLOAK_ADMIN_PASSWORD= quay.io/keycloak/keycloak:20.0.2 start-dev +---- + +Example with concrete values inserted: + +---- +docker run --name mykeycloak -p 8080:8080 -e KC_HTTP_RELATIVE_PATH=/auth -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=password quay.io/keycloak/keycloak:20.0.2 start-dev +---- + +This test suite can run against a fresh unconfigured server instance +(no preconfiguration required) and cleans up after itself (undoes all +its config changes) as long as it runs through completly. While its active +it changes the server configuration in the following ways: + + * creating, modifying and deleting some keycloak groups + diff --git a/tests/integration/targets/keycloak_group/tasks/main.yml b/tests/integration/targets/keycloak_group/tasks/main.yml new file mode 100644 index 0000000000..50e61bab0f --- /dev/null +++ b/tests/integration/targets/keycloak_group/tasks/main.yml @@ -0,0 +1,501 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Create a keycloak group + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: test-group + state: present + register: result + +- name: Assert group was created + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "test-group" + - result.end_state.path == "/test-group" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- set_fact: + test_group_id: "{{ result.end_state.id }}" + +- name: Group creation rerun (test for idempotency) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: test-group + state: present + register: result + +- name: Assert that nothing has changed + assert: + that: + - result is not changed + - result.end_state != {} + - result.end_state.name == "test-group" + - result.end_state.path == "/test-group" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: Update the name of a keycloak group + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + id: "{{ test_group_id }}" + name: new-test-group + state: present + register: result + +- name: Assert that group name was updated + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "new-test-group" + - result.end_state.path == "/new-test-group" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: Delete a keycloak group by id + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + id: "{{ test_group_id }}" + state: absent + register: result + +- name: Assert that group was deleted + assert: + that: + - result is changed + - result.end_state == {} + +- name: Redo group deletion (check for idempotency) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + id: "{{ test_group_id }}" + state: absent + register: result + +- name: Assert that nothing has changed + assert: + that: + - result is not changed + - result.end_state == {} + +- name: Create a keycloak group with some custom attributes + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: my-new_group + attributes: + attrib1: value1 + attrib2: value2 + attrib3: + - item1 + - item2 + register: result + +- name: Assert that group was correctly created + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "my-new_group" + - result.end_state.path == "/my-new_group" + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + - result.end_state.attributes != {} + - result.end_state.attributes.attrib1 == ["value1"] + - result.end_state.attributes.attrib2 == ["value2"] + - result.end_state.attributes.attrib3 == ["item1", "item2"] + +- name: Delete a keycloak group based on name + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: my-new_group + state: absent + register: result + +- name: Assert that group was deleted + assert: + that: + - result is changed + - result.end_state == {} + +## subgroup tests +## we already testet this so no asserts for this +- name: Create a new base group for subgroup testing (test setup) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: rootgrp + register: subgrp_basegrp_result + +- name: Create a subgroup using parent id + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subgrp1 + parents: + - id: "{{ subgrp_basegrp_result.end_state.id }}" + register: result + +- name: Assert that subgroup was correctly created + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "subgrp1" + - result.end_state.path == "/rootgrp/subgrp1" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: Recreate a subgroup using parent id (test idempotency) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subgrp1 + parents: + - id: "{{ subgrp_basegrp_result.end_state.id }}" + register: result + +- name: Assert that nothing has changed + assert: + that: + - result is not changed + - result.end_state != {} + - result.end_state.name == "subgrp1" + - result.end_state.path == "/rootgrp/subgrp1" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: Changing name of existing group + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + id: "{{ result.end_state.id }}" + name: new-subgrp1 + parents: + - id: "{{ subgrp_basegrp_result.end_state.id }}" + register: result + +- name: Assert that subgroup name has changed correctly + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "new-subgrp1" + - result.end_state.path == "/rootgrp/new-subgrp1" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: Create a subgroup using parent name + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subgrp2 + parents: + - name: rootgrp + register: result + +- name: Assert that subgroup was correctly created + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "subgrp2" + - result.end_state.path == "/rootgrp/subgrp2" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: Recreate a subgroup using parent name (test idempotency) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subgrp2 + parents: + - name: rootgrp + register: result + +- name: Assert that nothing has changed + assert: + that: + - result is not changed + - result.end_state != {} + - result.end_state.name == "subgrp2" + - result.end_state.path == "/rootgrp/subgrp2" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +## subgroup of subgroup tests +- name: Create a subgroup of a subgroup using parent names (complete parent chain) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subsubgrp + parents: + - name: rootgrp + - name: subgrp2 + register: result + +- name: Assert subgroup of subgroup was created + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "subsubgrp" + - result.end_state.path == "/rootgrp/subgrp2/subsubgrp" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: ReCreate a subgroup of a subgroup using parent names (test idempotency) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subsubgrp + parents: + - name: rootgrp + - name: subgrp2 + register: result_subsubgrp + +- name: Assert that nothing has changed + assert: + that: + - result_subsubgrp is not changed + - result_subsubgrp.end_state != {} + - result_subsubgrp.end_state.name == "subsubgrp" + - result_subsubgrp.end_state.path == "/rootgrp/subgrp2/subsubgrp" + - result_subsubgrp.end_state.attributes == {} + - result_subsubgrp.end_state.clientRoles == {} + - result_subsubgrp.end_state.realmRoles == [] + - result_subsubgrp.end_state.subGroups == [] + +- name: Create a subgroup of a subgroup using direct parent id (incomplete parent chain) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subsubsubgrp + parents: + - id: "{{ result_subsubgrp.end_state.id }}" + register: result + +- name: Assert subgroup of subgroup was created + assert: + that: + - result is changed + - result.end_state != {} + - result.end_state.name == "subsubsubgrp" + - result.end_state.path == "/rootgrp/subgrp2/subsubgrp/subsubsubgrp" + - result.end_state.attributes == {} + - result.end_state.clientRoles == {} + - result.end_state.realmRoles == [] + - result.end_state.subGroups == [] + +- name: ReCreate a subgroup of a subgroup using direct parent id (test idempotency) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: subsubsubgrp + parents: + - id: "{{ result_subsubgrp.end_state.id }}" + register: result_subsubsubgrp + +- name: Assert that nothing changed + assert: + that: + - result_subsubsubgrp is not changed + - result_subsubsubgrp.end_state != {} + - result_subsubsubgrp.end_state.name == "subsubsubgrp" + - result_subsubsubgrp.end_state.path == "/rootgrp/subgrp2/subsubgrp/subsubsubgrp" + - result_subsubsubgrp.end_state.attributes == {} + - result_subsubsubgrp.end_state.clientRoles == {} + - result_subsubsubgrp.end_state.realmRoles == [] + - result_subsubsubgrp.end_state.subGroups == [] + +## subgroup deletion tests +## note: in principle we already have tested group deletion in general +## enough already, but what makes it interesting here again is to +## see it works also properly for subgroups and groups with subgroups +- name: Deleting a subgroup by id (no parents needed) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + id: "{{ result_subsubsubgrp.end_state.id }}" + state: absent + register: result + +- name: Assert that subgroup was deleted + assert: + that: + - result is changed + - result.end_state == {} + +- name: Redo subgroup deletion (idempotency test) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + id: "{{ result_subsubsubgrp.end_state.id }}" + state: absent + register: result + +- name: Assert that nothing changed + assert: + that: + - result is not changed + - result.end_state == {} + +- name: Deleting a subgroup by name + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: new-subgrp1 + parents: + - name: rootgrp + state: absent + register: result + +- name: Assert that subgroup was deleted + assert: + that: + - result is changed + - result.end_state == {} + +- name: Redo deleting a subgroup by name (idempotency test) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: new-subgrp1 + parents: + - name: rootgrp + state: absent + register: result + +- name: Assert that nothing has changed + assert: + that: + - result is not changed + - result.end_state == {} + +- name: Delete keycloak group which has subgroups + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: rootgrp + state: absent + register: result + +- name: Assert that group was deleted + assert: + that: + - result is changed + - result.end_state == {} + +- name: Redo delete keycloak group which has subgroups (idempotency test) + community.general.keycloak_group: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + name: rootgrp + state: absent + register: result + +- name: Assert that group was deleted + assert: + that: + - result is not changed + - result.end_state == {} diff --git a/tests/integration/targets/keycloak_group/vars/main.yml b/tests/integration/targets/keycloak_group/vars/main.yml new file mode 100644 index 0000000000..e8aeb4f3fd --- /dev/null +++ b/tests/integration/targets/keycloak_group/vars/main.yml @@ -0,0 +1,10 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +url: http://localhost:8080/auth +admin_realm: master +admin_user: admin +admin_password: password +realm: master From b64929118ebf276169bd26c81e650579b3c3d207 Mon Sep 17 00:00:00 2001 From: schurzi Date: Sat, 25 Feb 2023 15:29:27 +0100 Subject: [PATCH 0503/2104] stop passing loader/dataloader since it has been deprecated by ansible (#6074) * stop passing loader/dataloader since it has been deprecated by ansible Signed-off-by: Martin Schurz * add changelog fragment Signed-off-by: Martin Schurz * explicitly pass None to keep compatibility to older Ansible versions Signed-off-by: Martin Schurz * use try/except to keep things compatible Signed-off-by: Martin Schurz * Update plugins/lookup/cartesian.py Co-authored-by: Felix Fontein * Update plugins/lookup/flattened.py Co-authored-by: Felix Fontein * Update plugins/lookup/flattened.py Co-authored-by: Felix Fontein * Update plugins/lookup/cartesian.py Co-authored-by: Felix Fontein * Update changelogs/fragments/6074-loader_in_listify.yml.yml Co-authored-by: Felix Fontein --------- Signed-off-by: Martin Schurz Co-authored-by: Felix Fontein --- changelogs/fragments/6074-loader_in_listify.yml.yml | 2 ++ plugins/lookup/cartesian.py | 7 ++++++- plugins/lookup/flattened.py | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/6074-loader_in_listify.yml.yml diff --git a/changelogs/fragments/6074-loader_in_listify.yml.yml b/changelogs/fragments/6074-loader_in_listify.yml.yml new file mode 100644 index 0000000000..3c01cde754 --- /dev/null +++ b/changelogs/fragments/6074-loader_in_listify.yml.yml @@ -0,0 +1,2 @@ +minor_changes: + - cartesian and flattened lookup plugins - adjust to parameter deprecation in ansible-core 2.14's ``listify_lookup_plugin_terms`` helper function (https://github.com/ansible-collections/community.general/pull/6074). diff --git a/plugins/lookup/cartesian.py b/plugins/lookup/cartesian.py index d76e8f532a..d63f3943b0 100644 --- a/plugins/lookup/cartesian.py +++ b/plugins/lookup/cartesian.py @@ -66,7 +66,12 @@ class LookupModule(LookupBase): """ results = [] for x in terms: - intermediate = listify_lookup_plugin_terms(x, templar=self._templar, loader=self._loader) + try: + intermediate = listify_lookup_plugin_terms(x, templar=self._templar) + except TypeError: + # The loader argument is deprecated in ansible-core 2.14+. Fall back to + # pre-2.14 behavior for older ansible-core versions. + intermediate = listify_lookup_plugin_terms(x, templar=self._templar, loader=self._loader) results.append(intermediate) return results diff --git a/plugins/lookup/flattened.py b/plugins/lookup/flattened.py index 0f290e559d..e955b6478e 100644 --- a/plugins/lookup/flattened.py +++ b/plugins/lookup/flattened.py @@ -67,7 +67,12 @@ class LookupModule(LookupBase): if isinstance(term, string_types): # convert a variable to a list - term2 = listify_lookup_plugin_terms(term, templar=self._templar, loader=self._loader) + try: + term2 = listify_lookup_plugin_terms(term, templar=self._templar) + except TypeError: + # The loader argument is deprecated in ansible-core 2.14+. Fall back to + # pre-2.14 behavior for older ansible-core versions. + term2 = listify_lookup_plugin_terms(term, templar=self._templar, loader=self._loader) # but avoid converting a plain string to a list of one string if term2 != [term]: term = term2 From 3db0fcf1bd7ca635711c57ac71395c8c28cedd9e Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Sat, 25 Feb 2023 09:39:21 -0500 Subject: [PATCH 0504/2104] Adding jyundt to Redfish maintainers (#6072) --- .github/BOTMETA.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 7a6a1c1eea..41e2e76ccc 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1388,7 +1388,7 @@ macros: team_opennebula: ilicmilan meerkampdvv rsmontero xorel nilsding team_oracle: manojmeda mross22 nalsaber team_purestorage: bannaych dnix101 genegr lionmax opslounge raekins sdodsley sile16 - team_redfish: mraineri tomasg2012 xmadsen renxulei rajeevkallur bhavya06 + team_redfish: mraineri tomasg2012 xmadsen renxulei rajeevkallur bhavya06 jyundt team_rhn: FlossWare alikins barnabycourt vritant team_scaleway: remyleone abarbare team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l From 810f3b50fc288869e5643446e3fbfe97815efa64 Mon Sep 17 00:00:00 2001 From: Yannick Ihmels Date: Sat, 25 Feb 2023 22:40:17 +0100 Subject: [PATCH 0505/2104] Add `enabled` parameter to `flatpak_remote` (#5926) --- .../fragments/5926-flatpak-remote-enabled.yml | 2 + plugins/modules/flatpak_remote.py | 54 +++++++++- .../flatpak_remote/tasks/check_mode.yml | 100 ++++++++++++++++++ .../targets/flatpak_remote/tasks/setup.yml | 13 +++ .../targets/flatpak_remote/tasks/test.yml | 58 ++++++++++ 5 files changed, 226 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5926-flatpak-remote-enabled.yml diff --git a/changelogs/fragments/5926-flatpak-remote-enabled.yml b/changelogs/fragments/5926-flatpak-remote-enabled.yml new file mode 100644 index 0000000000..95185e613e --- /dev/null +++ b/changelogs/fragments/5926-flatpak-remote-enabled.yml @@ -0,0 +1,2 @@ +minor_changes: + - flatpak_remote - add new boolean option ``enabled``. It controls, whether the remote is enabled or not (https://github.com/ansible-collections/community.general/pull/5926). diff --git a/plugins/modules/flatpak_remote.py b/plugins/modules/flatpak_remote.py index 2032e38b9c..9c097c411f 100644 --- a/plugins/modules/flatpak_remote.py +++ b/plugins/modules/flatpak_remote.py @@ -70,6 +70,12 @@ options: type: str choices: [ absent, present ] default: present + enabled: + description: + - Indicates whether this remote is enabled. + type: bool + default: true + version_added: 6.4.0 ''' EXAMPLES = r''' @@ -96,6 +102,12 @@ EXAMPLES = r''' community.general.flatpak_remote: name: flathub state: absent + +- name: Disable the flathub remote in the system installation + community.general.flatpak_remote: + name: flathub + state: present + enabled: false ''' RETURN = r''' @@ -148,7 +160,7 @@ def remove_remote(module, binary, name, method): def remote_exists(module, binary, name, method): """Check if the remote exists.""" - command = [binary, "remote-list", "-d", "--{0}".format(method)] + command = [binary, "remote-list", "--show-disabled", "--{0}".format(method)] # The query operation for the remote needs to be run even in check mode output = _flatpak_command(module, False, command) for line in output.splitlines(): @@ -160,6 +172,36 @@ def remote_exists(module, binary, name, method): return False +def enable_remote(module, binary, name, method): + """Enable a remote.""" + global result # pylint: disable=global-variable-not-assigned + command = [binary, "remote-modify", "--enable", "--{0}".format(method), name] + _flatpak_command(module, module.check_mode, command) + result['changed'] = True + + +def disable_remote(module, binary, name, method): + """Disable a remote.""" + global result # pylint: disable=global-variable-not-assigned + command = [binary, "remote-modify", "--disable", "--{0}".format(method), name] + _flatpak_command(module, module.check_mode, command) + result['changed'] = True + + +def remote_enabled(module, binary, name, method): + """Check if the remote is enabled.""" + command = [binary, "remote-list", "--show-disabled", "--{0}".format(method)] + # The query operation for the remote needs to be run even in check mode + output = _flatpak_command(module, False, command) + for line in output.splitlines(): + listed_remote = line.split() + if len(listed_remote) == 0: + continue + if listed_remote[0] == to_native(name): + return len(listed_remote) == 1 or "disabled" not in listed_remote[1].split(",") + return False + + def _flatpak_command(module, noop, command): global result # pylint: disable=global-variable-not-assigned result['command'] = ' '.join(command) @@ -182,6 +224,7 @@ def main(): choices=['user', 'system']), state=dict(type='str', default="present", choices=['absent', 'present']), + enabled=dict(type='bool', default=True), executable=dict(type='str', default="flatpak") ), # This module supports check mode @@ -192,6 +235,7 @@ def main(): flatpakrepo_url = module.params['flatpakrepo_url'] method = module.params['method'] state = module.params['state'] + enabled = module.params['enabled'] executable = module.params['executable'] binary = module.get_bin_path(executable, None) @@ -214,6 +258,14 @@ def main(): elif state == 'absent' and remote_already_exists: remove_remote(module, binary, name, method) + if state == 'present': + remote_already_enabled = remote_enabled(module, binary, to_bytes(name), method) + + if enabled and not remote_already_enabled: + enable_remote(module, binary, name, method) + if not enabled and remote_already_enabled: + disable_remote(module, binary, name, method) + module.exit_json(**result) diff --git a/tests/integration/targets/flatpak_remote/tasks/check_mode.yml b/tests/integration/targets/flatpak_remote/tasks/check_mode.yml index 9331531503..86db5bf56c 100644 --- a/tests/integration/targets/flatpak_remote/tasks/check_mode.yml +++ b/tests/integration/targets/flatpak_remote/tasks/check_mode.yml @@ -104,3 +104,103 @@ msg: | Removing a present flatpak remote a second time shall still mark module execution as changed in check mode + + +# - Tests with disabled flatpak remote ------------------------------------------ + +# enabled=true + +- name: Test activation of disabled flatpak remote (check mode) + flatpak_remote: + name: check-mode-disabled-test-remote + enabled: true + register: activation_result + check_mode: true + +- name: Verify activation of disabled flatpak remote test result (check mode) + assert: + that: + - activation_result is changed + msg: "Enabling an disabled flatpak remote shall mark module execution as changed" + +- name: Test non-existent idempotency of activation of disabled flatpak remote (check mode) + flatpak_remote: + name: check-mode-disabled-test-remote + enabled: true + register: double_activation_result + check_mode: true + +- name: > + Verify non-existent idempotency of activation of disabled flatpak remote + test result (check mode) + assert: + that: + - double_activation_result is changed + msg: | + Enabling an disabled flatpak remote a second time shall still mark module execution + as changed in check mode + +# enabled=false + +- name: Test deactivation of disabled flatpak remote not doing anything in check mode + flatpak_remote: + name: check-mode-disabled-test-remote + enabled: false + register: deactivation_result + check_mode: true + +- name: Verify deactivation of disabled flatpak remote test result (check mode) + assert: + that: + - deactivation_result is not changed + msg: "Disabling an disabled flatpak remote shall mark module execution as not changed" + + +# - Tests with enabled flatpak remote ------------------------------------------ + +# enabled=true + +- name: Test activation of enabled flatpak remote (check mode) + flatpak_remote: + name: check-mode-enabled-test-remote + enabled: true + register: activation_result + check_mode: true + +- name: Verify activation of enabled flatpak remote test result (check mode) + assert: + that: + - activation_result is not changed + msg: "Enabling a enabled flatpak remote shall mark module execution as not changed" + +# enabled=false + +- name: Test deactivation of enabled flatpak remote not doing anything in check mode + flatpak_remote: + name: check-mode-enabled-test-remote + enabled: false + register: deactivation_result + check_mode: true + +- name: Verify deactivation of enabled flatpak remote test result (check mode) + assert: + that: + - deactivation_result is changed + msg: "Disabling a enabled flatpak remote shall mark module execution as changed" + +- name: Test non-existent idempotency of deactivation of enabled flatpak remote (check mode) + flatpak_remote: + name: check-mode-enabled-test-remote + enabled: false + register: double_deactivation_result + check_mode: true + +- name: > + Verify non-existent idempotency of deactivation of enabled flatpak remote + test result (check mode) + assert: + that: + - double_deactivation_result is changed + msg: | + "Disabling a enabled flatpak remote a second time shall still mark module execution + as changed in check mode diff --git a/tests/integration/targets/flatpak_remote/tasks/setup.yml b/tests/integration/targets/flatpak_remote/tasks/setup.yml index 83f344cc40..55a14c9724 100644 --- a/tests/integration/targets/flatpak_remote/tasks/setup.yml +++ b/tests/integration/targets/flatpak_remote/tasks/setup.yml @@ -25,3 +25,16 @@ name: check-mode-test-remote flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo state: present + enabled: true +- name: Install disabled flatpak remote for testing check mode + flatpak_remote: + name: check-mode-disabled-test-remote + flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo + state: present + enabled: false +- name: Install enabled flatpak remote for testing check mode + flatpak_remote: + name: check-mode-enabled-test-remote + flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo + state: present + enabled: true diff --git a/tests/integration/targets/flatpak_remote/tasks/test.yml b/tests/integration/targets/flatpak_remote/tasks/test.yml index 134eead173..e847205ff1 100644 --- a/tests/integration/targets/flatpak_remote/tasks/test.yml +++ b/tests/integration/targets/flatpak_remote/tasks/test.yml @@ -48,6 +48,64 @@ msg: "Trying to update the URL of an existing flatpak remote shall not do anything" +# enabled=false + +- name: Test deactivation - {{ method }} + flatpak_remote: + name: flatpak-test + enabled: false + method: "{{ method }}" + register: deactivation_result + +- name: Verify deactivation test result - {{ method }} + assert: + that: + - deactivation_result is changed + msg: "enable=false shall disable flatpak remote when enabled" + +- name: Test idempotency of deactivation - {{ method }} + flatpak_remote: + name: flatpak-test + enabled: false + method: "{{ method }}" + register: double_deactivation_result + +- name: Verify idempotency of deactivation test result - {{ method }} + assert: + that: + - double_deactivation_result is not changed + msg: "enabled=false shall not do anything when flatpak remote is already disabled" + + +# enabled=false + +- name: Test activation - {{ method }} + flatpak_remote: + name: flatpak-test + enabled: true + method: "{{ method }}" + register: activation_result + +- name: Verify activation test result - {{ method }} + assert: + that: + - activation_result is changed + msg: "enable=true shall enable flatpak remote when disabled" + +- name: Test idempotency of activation - {{ method }} + flatpak_remote: + name: flatpak-test + enabled: true + method: "{{ method }}" + register: double_activation_result + +- name: Verify idempotency of activation test result - {{ method }} + assert: + that: + - double_activation_result is not changed + msg: "enabled=true shall not do anything when flatpak remote is already enabled" + + # state=absent - name: Test removal - {{ method }} From 094dc6b69c6ca4f54a261581962cdbf2956c0233 Mon Sep 17 00:00:00 2001 From: Roy Lenferink Date: Sun, 26 Feb 2023 14:03:30 +0100 Subject: [PATCH 0506/2104] cloudflare_dns: Fix setting SRV records with a root level entry (#5972) * cloudflare_dns: Fix setting SRV records with a root level entry * cloudflare_dns: Remove the part which deletes the zone from the SRV record name The cloudflare API accepts the record name + zone name to be sent. Removing that, will guarantee the module to be idempotent even though that line was added ~7 years ago for that specific reason: https://github.com/ansible/ansible-modules-extras/commit/7477fe51418dbb890faba8966282ab83e597e6af It seems the most logical explanition is that Cloudflare changed their API response somewhere over the last 7 years. * cloudflare_dns: Update the changelog fragment --- changelogs/fragments/5972-cloudflare-dns-srv-record.yml | 3 +++ plugins/modules/cloudflare_dns.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5972-cloudflare-dns-srv-record.yml diff --git a/changelogs/fragments/5972-cloudflare-dns-srv-record.yml b/changelogs/fragments/5972-cloudflare-dns-srv-record.yml new file mode 100644 index 0000000000..a331b49d23 --- /dev/null +++ b/changelogs/fragments/5972-cloudflare-dns-srv-record.yml @@ -0,0 +1,3 @@ +bugfixes: + - "cloudflare_dns - fixed the possiblity of setting a root-level SRV DNS record (https://github.com/ansible-collections/community.general/pull/5972)." + - "cloudflare_dns - fixed the idempotency for SRV DNS records (https://github.com/ansible-collections/community.general/pull/5972)." diff --git a/plugins/modules/cloudflare_dns.py b/plugins/modules/cloudflare_dns.py index a0fa8a38b2..8f45fcef3b 100644 --- a/plugins/modules/cloudflare_dns.py +++ b/plugins/modules/cloudflare_dns.py @@ -694,10 +694,11 @@ class CloudflareAPI(object): "port": params['port'], "weight": params['weight'], "priority": params['priority'], - "name": params['record'][:-len('.' + params['zone'])], + "name": params['record'], "proto": params['proto'], "service": params['service'] } + new_record = {"type": params['type'], "ttl": params['ttl'], 'data': srv_data} search_value = str(params['weight']) + '\t' + str(params['port']) + '\t' + params['value'] search_record = params['service'] + '.' + params['proto'] + '.' + params['record'] From c8a2ac3a475ab490ad00f1db1a6197b108c66413 Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Sun, 26 Feb 2023 20:04:57 +0700 Subject: [PATCH 0507/2104] sefcontext: add support for path substitutions (#5830) * sefcontext: add path substitution support (#1193) First commit for feedback, missing docs and tests. * sefcontext: add documentation * Add changelog fragment * Documentation formatting * Delete extra newline * pep8 fixes Fix indentation * Add version_added to arg docs * Add examples * Don't delete non-matching path substitutions * Add integration tests * Delete only substitutions if such arg passed Don't delete existing regular file context mappings if deletion of a path substitution was requested with the presence of the `equal` arg - delete only path substitutions in such case. Path substitutions and regular mappings may overlap. * Can only add args in minor releases :( * Cleanup before tests * Fix deletion using substitution Was comparing wrong var. * Fix test checking wrong var * Improve args documentation and examples List the default values for selevel, seuser. Add example for deleting path substitutions only. * Add attributes documentation block Not sure if should add become/delegate/async, shouldn't those work just like that without any specific code added for them? * and fix indentation on attribute block * Consistent indentation for attributes Confusing, most plugins indent with 4 spaces. But some use 2 like the rest of the code, so use 2. * Add missing ref for attribute block * Use correct c.g version in doc block Co-authored-by: Felix Fontein * Add full stop to changelog fragment Co-authored-by: Felix Fontein * Streamline documentation Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Support limiting deletion to setype Deleting file context mappings may be limited by passing setype or equal, if neither arg is passed then delete either setype/equal mappings that match. * Change arg name, diff mode output fix Change arg name from equal to substitute. Print target = subsitute in diff mode same way as semanage does. Also put back platform attribute, try to improve clumsy language in the substitute arg docs. * Delete even if arg setype not match existing Test 5 indicates that deletion is supposed to not check that the arg setype passed when deleting matches the setype of the mapping to delete. Delete any mapping that matches target, regardless of setype arg value. * Update arg name in tests * Too eager replacing Accidentally replaced seobject function names so fix them back * 4564: Fix invalid setype in doc example Change from httpd_git_rw_content_t which does not exist to httpd_sys_rw_content_t Fixes #4564 * Fix documentation attributes Additional fragment Co-authored-by: Felix Fontein * Update version_added in docs Bumping minor to 6.4.0 since it didn't make 6.3.0. * Add more description to the new arg docs Try to improve discoverability of the new feature and make it easier to understand without deep SELinux understanding. * Update platform to Linux in documentation * Add equal as alias for the new argument Improve discoverability of the new feature by adding an alias to the new module argument. The argument name "equal" will be easy to find for users who are not familiar with SELinux and who just try to match to the CLI tool `semanage`. * And add alias argument properly Previous commit missed actually adding the alias (added to docs only). --------- Co-authored-by: Felix Fontein Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .../fragments/5830-sefcontext-path-subs.yml | 2 + plugins/modules/sefcontext.py | 157 ++++++++++++++---- .../targets/sefcontext/tasks/sefcontext.yml | 131 +++++++++++++++ 3 files changed, 254 insertions(+), 36 deletions(-) create mode 100644 changelogs/fragments/5830-sefcontext-path-subs.yml diff --git a/changelogs/fragments/5830-sefcontext-path-subs.yml b/changelogs/fragments/5830-sefcontext-path-subs.yml new file mode 100644 index 0000000000..51fb554fab --- /dev/null +++ b/changelogs/fragments/5830-sefcontext-path-subs.yml @@ -0,0 +1,2 @@ +minor_changes: + - sefcontext - add support for path substitutions (https://github.com/ansible-collections/community.general/issues/1193). diff --git a/plugins/modules/sefcontext.py b/plugins/modules/sefcontext.py index c2fee45ee2..b2fb367673 100644 --- a/plugins/modules/sefcontext.py +++ b/plugins/modules/sefcontext.py @@ -17,11 +17,14 @@ description: - Similar to the C(semanage fcontext) command. extends_documentation_fragment: - community.general.attributes + - community.general.attributes.platform attributes: check_mode: support: full diff_mode: support: full + platform: + platforms: linux options: target: description: @@ -46,21 +49,30 @@ options: default: a setype: description: - - SELinux type for the specified target. + - SELinux type for the specified I(target). type: str - required: true + substitute: + description: + - Path to use to substitute file context(s) for the specified I(target). The context labeling for the I(target) subtree is made equivalent to this path. + - This is also referred to as SELinux file context equivalence and it implements the C(equal) functionality of the SELinux management tools. + version_added: 6.4.0 + type: str + aliases: [ equal ] seuser: description: - - SELinux user for the specified target. + - SELinux user for the specified I(target). + - Defaults to C(system_u) for new file contexts and to existing value when modifying file contexts. type: str selevel: description: - - SELinux range for the specified target. + - SELinux range for the specified I(target). + - Defaults to C(s0) for new file contexts and to existing value when modifying file contexts. type: str aliases: [ serange ] state: description: - Whether the SELinux file context must be C(absent) or C(present). + - Specifying C(absent) without either I(setype) or I(substitute) deletes both SELinux type or path substitution mappings that match I(target). type: str choices: [ absent, present ] default: present @@ -77,6 +89,8 @@ options: default: false notes: - The changes are persistent across reboots. +- I(setype) and I(substitute) are mutually exclusive. +- If I(state=present) then one of I(setype) or I(substitute) is mandatory. - The M(community.general.sefcontext) module does not modify existing files to the new SELinux context(s), so it is advisable to first create the SELinux file contexts before creating files, or run C(restorecon) manually @@ -96,9 +110,26 @@ EXAMPLES = r''' - name: Allow apache to modify files in /srv/git_repos community.general.sefcontext: target: '/srv/git_repos(/.*)?' - setype: httpd_git_rw_content_t + setype: httpd_sys_rw_content_t state: present +- name: Substitute file contexts for path /srv/containers with /var/lib/containers + community.general.sefcontext: + target: /srv/containers + substitute: /var/lib/containers + state: present + +- name: Delete file context path substitution for /srv/containers + community.general.sefcontext: + target: /srv/containers + substitute: /var/lib/containers + state: absent + +- name: Delete any file context mappings for path /srv/git + community.general.sefcontext: + target: /srv/git + state: absent + - name: Apply new SELinux file context to filesystem ansible.builtin.command: restorecon -irv /srv/git_repos ''' @@ -170,7 +201,13 @@ def semanage_fcontext_exists(sefcontext, target, ftype): return None -def semanage_fcontext_modify(module, result, target, ftype, setype, do_reload, serange, seuser, sestore=''): +def semanage_fcontext_substitute_exists(sefcontext, target): + ''' Get the SELinux file context path substitution definition from policy. Return None if it does not exist. ''' + + return sefcontext.equiv_dist.get(target, sefcontext.equiv.get(target)) + + +def semanage_fcontext_modify(module, result, target, ftype, setype, substitute, do_reload, serange, seuser, sestore=''): ''' Add or modify SELinux file context mapping definition to the policy. ''' changed = False @@ -179,39 +216,63 @@ def semanage_fcontext_modify(module, result, target, ftype, setype, do_reload, s try: sefcontext = seobject.fcontextRecords(sestore) sefcontext.set_reload(do_reload) - exists = semanage_fcontext_exists(sefcontext, target, ftype) - if exists: - # Modify existing entry - orig_seuser, orig_serole, orig_setype, orig_serange = exists + if substitute is None: + exists = semanage_fcontext_exists(sefcontext, target, ftype) + if exists: + # Modify existing entry + orig_seuser, orig_serole, orig_setype, orig_serange = exists - if seuser is None: - seuser = orig_seuser - if serange is None: - serange = orig_serange + if seuser is None: + seuser = orig_seuser + if serange is None: + serange = orig_serange + + if setype != orig_setype or seuser != orig_seuser or serange != orig_serange: + if not module.check_mode: + sefcontext.modify(target, setype, ftype, serange, seuser) + changed = True + + if module._diff: + prepared_diff += '# Change to semanage file context mappings\n' + prepared_diff += '-%s %s %s:%s:%s:%s\n' % (target, ftype, orig_seuser, orig_serole, orig_setype, orig_serange) + prepared_diff += '+%s %s %s:%s:%s:%s\n' % (target, ftype, seuser, orig_serole, setype, serange) + else: + # Add missing entry + if seuser is None: + seuser = 'system_u' + if serange is None: + serange = 's0' - if setype != orig_setype or seuser != orig_seuser or serange != orig_serange: if not module.check_mode: - sefcontext.modify(target, setype, ftype, serange, seuser) + sefcontext.add(target, setype, ftype, serange, seuser) changed = True if module._diff: - prepared_diff += '# Change to semanage file context mappings\n' - prepared_diff += '-%s %s %s:%s:%s:%s\n' % (target, ftype, orig_seuser, orig_serole, orig_setype, orig_serange) - prepared_diff += '+%s %s %s:%s:%s:%s\n' % (target, ftype, seuser, orig_serole, setype, serange) + prepared_diff += '# Addition to semanage file context mappings\n' + prepared_diff += '+%s %s %s:%s:%s:%s\n' % (target, ftype, seuser, 'object_r', setype, serange) else: - # Add missing entry - if seuser is None: - seuser = 'system_u' - if serange is None: - serange = 's0' + exists = semanage_fcontext_substitute_exists(sefcontext, target) + if exists: + # Modify existing path substitution entry + orig_substitute = exists - if not module.check_mode: - sefcontext.add(target, setype, ftype, serange, seuser) - changed = True + if substitute != orig_substitute: + if not module.check_mode: + sefcontext.modify_equal(target, substitute) + changed = True - if module._diff: - prepared_diff += '# Addition to semanage file context mappings\n' - prepared_diff += '+%s %s %s:%s:%s:%s\n' % (target, ftype, seuser, 'object_r', setype, serange) + if module._diff: + prepared_diff += '# Change to semanage file context path substitutions\n' + prepared_diff += '-%s = %s\n' % (target, orig_substitute) + prepared_diff += '+%s = %s\n' % (target, substitute) + else: + # Add missing path substitution entry + if not module.check_mode: + sefcontext.add_equal(target, substitute) + changed = True + if module._diff: + prepared_diff += '# Addition to semanage file context path substitutions\n' + prepared_diff += '+%s = %s\n' % (target, substitute) except Exception as e: module.fail_json(msg="%s: %s\n" % (e.__class__.__name__, to_native(e))) @@ -222,7 +283,7 @@ def semanage_fcontext_modify(module, result, target, ftype, setype, do_reload, s module.exit_json(changed=changed, seuser=seuser, serange=serange, **result) -def semanage_fcontext_delete(module, result, target, ftype, do_reload, sestore=''): +def semanage_fcontext_delete(module, result, target, ftype, setype, substitute, do_reload, sestore=''): ''' Delete SELinux file context mapping definition from the policy. ''' changed = False @@ -232,7 +293,8 @@ def semanage_fcontext_delete(module, result, target, ftype, do_reload, sestore=' sefcontext = seobject.fcontextRecords(sestore) sefcontext.set_reload(do_reload) exists = semanage_fcontext_exists(sefcontext, target, ftype) - if exists: + substitute_exists = semanage_fcontext_substitute_exists(sefcontext, target) + if exists and substitute is None: # Remove existing entry orig_seuser, orig_serole, orig_setype, orig_serange = exists @@ -243,6 +305,17 @@ def semanage_fcontext_delete(module, result, target, ftype, do_reload, sestore=' if module._diff: prepared_diff += '# Deletion to semanage file context mappings\n' prepared_diff += '-%s %s %s:%s:%s:%s\n' % (target, ftype, exists[0], exists[1], exists[2], exists[3]) + if substitute_exists and setype is None and ((substitute is not None and substitute_exists == substitute) or substitute is None): + # Remove existing path substitution entry + orig_substitute = substitute_exists + + if not module.check_mode: + sefcontext.delete(target, orig_substitute) + changed = True + + if module._diff: + prepared_diff += '# Deletion to semanage file context path substitutions\n' + prepared_diff += '-%s = %s\n' % (target, orig_substitute) except Exception as e: module.fail_json(msg="%s: %s\n" % (e.__class__.__name__, to_native(e))) @@ -259,12 +332,23 @@ def main(): ignore_selinux_state=dict(type='bool', default=False), target=dict(type='str', required=True, aliases=['path']), ftype=dict(type='str', default='a', choices=list(option_to_file_type_str.keys())), - setype=dict(type='str', required=True), + setype=dict(type='str'), + substitute=dict(type='str', aliases=['equal']), seuser=dict(type='str'), selevel=dict(type='str', aliases=['serange']), state=dict(type='str', default='present', choices=['absent', 'present']), reload=dict(type='bool', default=True), ), + mutually_exclusive=[ + ('setype', 'substitute'), + ('substitute', 'ftype'), + ('substitute', 'seuser'), + ('substitute', 'selevel'), + ], + required_if=[ + ('state', 'present', ('setype', 'substitute'), True), + ], + supports_check_mode=True, ) if not HAVE_SELINUX: @@ -281,17 +365,18 @@ def main(): target = module.params['target'] ftype = module.params['ftype'] setype = module.params['setype'] + substitute = module.params['substitute'] seuser = module.params['seuser'] serange = module.params['selevel'] state = module.params['state'] do_reload = module.params['reload'] - result = dict(target=target, ftype=ftype, setype=setype, state=state) + result = dict(target=target, ftype=ftype, setype=setype, substitute=substitute, state=state) if state == 'present': - semanage_fcontext_modify(module, result, target, ftype, setype, do_reload, serange, seuser) + semanage_fcontext_modify(module, result, target, ftype, setype, substitute, do_reload, serange, seuser) elif state == 'absent': - semanage_fcontext_delete(module, result, target, ftype, do_reload) + semanage_fcontext_delete(module, result, target, ftype, setype, substitute, do_reload) else: module.fail_json(msg='Invalid value of argument "state": {0}'.format(state)) diff --git a/tests/integration/targets/sefcontext/tasks/sefcontext.yml b/tests/integration/targets/sefcontext/tasks/sefcontext.yml index 8f5039b85a..9d6e7d1f70 100644 --- a/tests/integration/targets/sefcontext/tasks/sefcontext.yml +++ b/tests/integration/targets/sefcontext/tasks/sefcontext.yml @@ -23,6 +23,11 @@ setype: httpd_sys_content_t state: absent +- name: Ensure we start with a clean state + sefcontext: + path: /tmp/foo + state: absent + - name: Set SELinux file context of foo/bar sefcontext: path: '/tmp/foo/bar(/.*)?' @@ -100,3 +105,129 @@ that: - sixth is not changed - sixth.setype == 'unlabeled_t' + +- name: Set SELinux file context path substitution of foo + sefcontext: + path: /tmp/foo + substitute: /home + state: present + reload: no + register: subst_first + +- assert: + that: + - subst_first is changed + - subst_first.substitute == '/home' + +- name: Set SELinux file context path substitution of foo (again) + sefcontext: + path: /tmp/foo + substitute: /home + state: present + reload: no + register: subst_second + +- assert: + that: + - subst_second is not changed + - subst_second.substitute == '/home' + +- name: Change SELinux file context path substitution of foo + sefcontext: + path: /tmp/foo + substitute: /boot + state: present + reload: no + register: subst_third + +- assert: + that: + - subst_third is changed + - subst_third.substitute == '/boot' + +- name: Change SELinux file context path substitution of foo (again) + sefcontext: + path: /tmp/foo + substitute: /boot + state: present + reload: no + register: subst_fourth + +- assert: + that: + - subst_fourth is not changed + - subst_fourth.substitute == '/boot' + +- name: Try to delete non-existing SELinux file context path substitution of foo + sefcontext: + path: /tmp/foo + substitute: /dev + state: absent + reload: no + register: subst_fifth + +- assert: + that: + - subst_fifth is not changed + - subst_fifth.substitute == '/dev' + +- name: Delete SELinux file context path substitution of foo + sefcontext: + path: /tmp/foo + substitute: /boot + state: absent + reload: no + register: subst_sixth + +- assert: + that: + - subst_sixth is changed + - subst_sixth.substitute == '/boot' + +- name: Delete SELinux file context path substitution of foo (again) + sefcontext: + path: /tmp/foo + substitute: /boot + state: absent + reload: no + register: subst_seventh + +- assert: + that: + - subst_seventh is not changed + - subst_seventh.substitute == '/boot' + +- name: Set SELinux file context path substitution of foo + sefcontext: + path: /tmp/foo + substitute: /home + state: present + reload: no + register: subst_eighth + +- assert: + that: + - subst_eighth is changed + - subst_eighth.substitute == '/home' + +- name: Delete SELinux file context path substitution of foo + sefcontext: + path: /tmp/foo + state: absent + reload: no + register: subst_ninth + +- assert: + that: + - subst_ninth is changed + +- name: Delete SELinux file context path substitution of foo (again) + sefcontext: + path: /tmp/foo + state: absent + reload: no + register: subst_tenth + +- assert: + that: + - subst_tenth is not changed From 617be6e124caeb97d27352b199a816bb72afea67 Mon Sep 17 00:00:00 2001 From: Hemant Zope <42613258+zhemant@users.noreply.github.com> Date: Sun, 26 Feb 2023 14:13:22 +0100 Subject: [PATCH 0508/2104] Add new project features to API (#5986) * Add new project features to API * add changelog fragment * remove extra line from changelog * Update changelog formatting Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- .../5985-add-new-gitlab-api-features.yml | 2 + plugins/modules/gitlab_project.py | 72 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 changelogs/fragments/5985-add-new-gitlab-api-features.yml diff --git a/changelogs/fragments/5985-add-new-gitlab-api-features.yml b/changelogs/fragments/5985-add-new-gitlab-api-features.yml new file mode 100644 index 0000000000..7033a80bec --- /dev/null +++ b/changelogs/fragments/5985-add-new-gitlab-api-features.yml @@ -0,0 +1,2 @@ +minor_changes: + - gitlab_project - add ``releases_access_level``, ``environments_access_level``, ``feature_flags_access_level``, ``infrastructure_access_level``, ``monitor_access_level``, and ``security_and_compliance_access_level`` options (https://github.com/ansible-collections/community.general/pull/5986). diff --git a/plugins/modules/gitlab_project.py b/plugins/modules/gitlab_project.py index cd34db4431..d58ba35975 100644 --- a/plugins/modules/gitlab_project.py +++ b/plugins/modules/gitlab_project.py @@ -203,6 +203,54 @@ options: type: str choices: ["private", "disabled", "enabled"] version_added: "6.2.0" + releases_access_level: + description: + - C(private) means that accessing release is allowed only to project members. + - C(disabled) means that accessing release is disabled. + - C(enabled) means that accessing release is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.4.0" + environments_access_level: + description: + - C(private) means that deployment to environment is allowed only to project members. + - C(disabled) means that deployment to environment is disabled. + - C(enabled) means that deployment to environment is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.4.0" + feature_flags_access_level: + description: + - C(private) means that feature rollout is allowed only to project members. + - C(disabled) means that feature rollout is disabled. + - C(enabled) means that feature rollout is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.4.0" + infrastructure_access_level: + description: + - C(private) means that configuring infrastructure is allowed only to project members. + - C(disabled) means that configuring infrastructure is disabled. + - C(enabled) means that configuring infrastructure is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.4.0" + monitor_access_level: + description: + - C(private) means that monitoring health is allowed only to project members. + - C(disabled) means that monitoring health is disabled. + - C(enabled) means that monitoring health is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.4.0" + security_and_compliance_access_level: + description: + - C(private) means that accessing security and complicance tab is allowed only to project members. + - C(disabled) means that accessing security and complicance tab is disabled. + - C(enabled) means that accessing security and complicance tab is enabled. + type: str + choices: ["private", "disabled", "enabled"] + version_added: "6.4.0" ''' EXAMPLES = r''' @@ -321,6 +369,12 @@ class GitLabProject(object): 'builds_access_level': options['builds_access_level'], 'forking_access_level': options['forking_access_level'], 'container_registry_access_level': options['container_registry_access_level'], + 'releases_access_level': options['releases_access_level'], + 'environments_access_level': options['environments_access_level'], + 'feature_flags_access_level': options['feature_flags_access_level'], + 'infrastructure_access_level': options['infrastructure_access_level'], + 'monitor_access_level': options['monitor_access_level'], + 'security_and_compliance_access_level': options['security_and_compliance_access_level'], } # Because we have already call userExists in main() if self.project_object is None: @@ -454,6 +508,12 @@ def main(): builds_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), forking_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), container_registry_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + releases_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + environments_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + feature_flags_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + infrastructure_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + monitor_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), + security_and_compliance_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']), )) module = AnsibleModule( @@ -504,6 +564,12 @@ def main(): builds_access_level = module.params['builds_access_level'] forking_access_level = module.params['forking_access_level'] container_registry_access_level = module.params['container_registry_access_level'] + releases_access_level = module.params['releases_access_level'] + environments_access_level = module.params['environments_access_level'] + feature_flags_access_level = module.params['feature_flags_access_level'] + infrastructure_access_level = module.params['infrastructure_access_level'] + monitor_access_level = module.params['monitor_access_level'] + security_and_compliance_access_level = module.params['security_and_compliance_access_level'] if default_branch and not initialize_with_readme: module.fail_json(msg="Param default_branch need param initialize_with_readme set to true") @@ -576,6 +642,12 @@ def main(): "builds_access_level": builds_access_level, "forking_access_level": forking_access_level, "container_registry_access_level": container_registry_access_level, + "releases_access_level": releases_access_level, + "environments_access_level": environments_access_level, + "feature_flags_access_level": feature_flags_access_level, + "infrastructure_access_level": infrastructure_access_level, + "monitor_access_level": monitor_access_level, + "security_and_compliance_access_level": security_and_compliance_access_level, }): module.exit_json(changed=True, msg="Successfully created or updated the project %s" % project_name, project=gitlab_project.project_object._attrs) From 29f5033737a7fd86349ff3daab7d7ee7db66ad00 Mon Sep 17 00:00:00 2001 From: Alex Groshev <38885591+haddystuff@users.noreply.github.com> Date: Sun, 26 Feb 2023 14:58:58 +0100 Subject: [PATCH 0509/2104] add persistent option for modprobe (#5424) * add persistent option for modprobe * add suggested changes + fix broken test * change modprobe module path in tests due to rebase * change persistent option type from bool to str with choices * fix unused import * add example with persistent option * fix some minor issues after review - move regexps compiling to __init__ - move AnsibleModule to build_module function and use this function in tests instead of AnsibleModule - fix terminlogy issue in documentation * fix unused-import --- .../4028-modprobe-persistent-option.yml | 3 + plugins/modules/modprobe.py | 156 +++++++- tests/unit/plugins/modules/test_modprobe.py | 377 ++++++++++++++++-- 3 files changed, 500 insertions(+), 36 deletions(-) create mode 100644 changelogs/fragments/4028-modprobe-persistent-option.yml diff --git a/changelogs/fragments/4028-modprobe-persistent-option.yml b/changelogs/fragments/4028-modprobe-persistent-option.yml new file mode 100644 index 0000000000..78c812bcbd --- /dev/null +++ b/changelogs/fragments/4028-modprobe-persistent-option.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - modprobe - add ``persistent`` option (https://github.com/ansible-collections/community.general/issues/4028, https://github.com/ansible-collections/community.general/pull/542). diff --git a/plugins/modules/modprobe.py b/plugins/modules/modprobe.py index e386117945..1cfdc3700b 100644 --- a/plugins/modules/modprobe.py +++ b/plugins/modules/modprobe.py @@ -42,6 +42,21 @@ options: description: - Modules parameters. default: '' + persistent: + type: str + choices: [ disabled, absent, present ] + default: disabled + description: + - Persistency between reboots for configured module. + - This option creates files in C(/etc/modules-load.d/) and C(/etc/modprobe.d/) that make your module configuration persistent during reboots. + - If C(present), adds module name to C(/etc/modules-load.d/) and params to C(/etc/modprobe.d/) so the module will be loaded on next reboot. + - If C(absent), will comment out module name from C(/etc/modules-load.d/) and comment out params from C(/etc/modprobe.d/) so the module will not be + loaded on next reboot. + - If C(disabled), will not toch anything and leave C(/etc/modules-load.d/) and C(/etc/modprobe.d/) as it is. + - Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded in the + kernel modules themselves instead of configuration like this. + - In fact, most modern kernel modules are prepared for automatic loading already. + - "B(Note:) This option works only with distributions that use C(systemd) when set to values other than C(disabled)." ''' EXAMPLES = ''' @@ -55,20 +70,31 @@ EXAMPLES = ''' name: dummy state: present params: 'numdummies=2' + +- name: Add the dummy module and make sure it is loaded after reboots + community.general.modprobe: + name: dummy + state: present + params: 'numdummies=2' + persistent: present ''' import os.path import platform import shlex import traceback +import re from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native RELEASE_VER = platform.release() +MODULES_LOAD_LOCATION = '/etc/modules-load.d' +PARAMETERS_FILES_LOCATION = '/etc/modprobe.d' class Modprobe(object): + def __init__(self, module): self.module = module self.modprobe_bin = module.get_bin_path('modprobe', True) @@ -77,9 +103,14 @@ class Modprobe(object): self.desired_state = module.params['state'] self.name = module.params['name'] self.params = module.params['params'] + self.persistent = module.params['persistent'] self.changed = False + self.re_find_module = re.compile(r'^ *{0} *(?:[#;].*)?\n?\Z'.format(self.name)) + self.re_find_params = re.compile(r'^options {0} \w+=\S+ *(?:[#;].*)?\n?\Z'.format(self.name)) + self.re_get_params_and_values = re.compile(r'^options {0} (\w+=\S+) *(?:[#;].*)?\n?\Z'.format(self.name)) + def load_module(self): command = [self.modprobe_bin] if self.check_mode: @@ -100,6 +131,117 @@ class Modprobe(object): if rc != 0: self.module.warn(stderr) + @property + def module_is_loaded_persistently(self): + for module_file in self.modules_files: + with open(module_file) as file: + for line in file: + if self.re_find_module.match(line): + return True + + return False + + @property + def params_is_set(self): + desired_params = set(self.params.split()) + + return desired_params == self.permanent_params + + @property + def permanent_params(self): + params = set() + + for modprobe_file in self.modprobe_files: + with open(modprobe_file) as file: + for line in file: + match = self.re_get_params_and_values.match(line) + if match: + params.add(match.group(1)) + + return params + + def create_module_file(self): + file_path = os.path.join(MODULES_LOAD_LOCATION, + self.name + '.conf') + with open(file_path, 'w') as file: + file.write(self.name + '\n') + + @property + def module_options_file_content(self): + file_content = ['options {0} {1}'.format(self.name, param) + for param in self.params.split()] + return '\n'.join(file_content) + '\n' + + def create_module_options_file(self): + new_file_path = os.path.join(PARAMETERS_FILES_LOCATION, + self.name + '.conf') + with open(new_file_path, 'w') as file: + file.write(self.module_options_file_content) + + def disable_old_params(self): + + for modprobe_file in self.modprobe_files: + with open(modprobe_file) as file: + file_content = file.readlines() + + content_changed = False + for index, line in enumerate(file_content): + if self.re_find_params.match(line): + file_content[index] = '#' + line + content_changed = True + + if content_changed: + with open(modprobe_file, 'w') as file: + file.write('\n'.join(file_content)) + + def disable_module_permanent(self): + + for module_file in self.modules_files: + with open(module_file) as file: + file_content = file.readlines() + + content_changed = False + for index, line in enumerate(file_content): + if self.re_find_module.match(line): + file_content[index] = '#' + line + content_changed = True + + if content_changed: + with open(module_file, 'w') as file: + file.write('\n'.join(file_content)) + + def load_module_permanent(self): + + if not self.module_is_loaded_persistently: + self.create_module_file() + self.changed = True + + if not self.params_is_set: + self.disable_old_params() + self.create_module_options_file() + self.changed = True + + def unload_module_permanent(self): + if self.module_is_loaded_persistently: + self.disable_module_permanent() + self.changed = True + + if self.permanent_params: + self.disable_old_params() + self.changed = True + + @property + def modules_files(self): + modules_paths = [os.path.join(MODULES_LOAD_LOCATION, path) + for path in os.listdir(MODULES_LOAD_LOCATION)] + return [path for path in modules_paths if os.path.isfile(path)] + + @property + def modprobe_files(self): + modules_paths = [os.path.join(PARAMETERS_FILES_LOCATION, path) + for path in os.listdir(PARAMETERS_FILES_LOCATION)] + return [path for path in modules_paths if os.path.isfile(path)] + def module_loaded(self): is_loaded = False try: @@ -144,16 +286,21 @@ class Modprobe(object): } -def main(): - module = AnsibleModule( +def build_module(): + return AnsibleModule( argument_spec=dict( name=dict(type='str', required=True), state=dict(type='str', default='present', choices=['absent', 'present']), params=dict(type='str', default=''), + persistent=dict(type='str', default='disabled', choices=['disabled', 'present', 'absent']), ), supports_check_mode=True, ) + +def main(): + module = build_module() + modprobe = Modprobe(module) if modprobe.desired_state == 'present' and not modprobe.module_loaded(): @@ -161,6 +308,11 @@ def main(): elif modprobe.desired_state == 'absent' and modprobe.module_loaded(): modprobe.unload_module() + if modprobe.persistent == 'present' and not (modprobe.module_is_loaded_persistently and modprobe.params_is_set): + modprobe.load_module_permanent() + elif modprobe.persistent == 'absent' and (modprobe.module_is_loaded_persistently or modprobe.permanent_params): + modprobe.unload_module_permanent() + module.exit_json(**modprobe.result) diff --git a/tests/unit/plugins/modules/test_modprobe.py b/tests/unit/plugins/modules/test_modprobe.py index cddbb1b5da..18695695a4 100644 --- a/tests/unit/plugins/modules/test_modprobe.py +++ b/tests/unit/plugins/modules/test_modprobe.py @@ -6,11 +6,12 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +import sys from ansible_collections.community.general.tests.unit.plugins.modules.utils import ModuleTestCase, set_module_args from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat.mock import Mock -from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.plugins.modules.modprobe import Modprobe +from ansible_collections.community.general.tests.unit.compat.mock import mock_open +from ansible_collections.community.general.plugins.modules.modprobe import Modprobe, build_module class TestLoadModule(ModuleTestCase): @@ -40,14 +41,7 @@ class TestLoadModule(ModuleTestCase): state='present', )) - module = AnsibleModule( - argument_spec=dict( - name=dict(type='str', required=True), - state=dict(type='str', default='present', choices=['absent', 'present']), - params=dict(type='str', default=''), - ), - supports_check_mode=True, - ) + module = build_module() self.get_bin_path.side_effect = ['modprobe'] self.module_loaded.side_effect = [True] @@ -69,14 +63,7 @@ class TestLoadModule(ModuleTestCase): state='present', )) - module = AnsibleModule( - argument_spec=dict( - name=dict(type='str', required=True), - state=dict(type='str', default='present', choices=['absent', 'present']), - params=dict(type='str', default=''), - ), - supports_check_mode=True, - ) + module = build_module() module.warn = Mock() @@ -117,14 +104,7 @@ class TestUnloadModule(ModuleTestCase): state='absent', )) - module = AnsibleModule( - argument_spec=dict( - name=dict(type='str', required=True), - state=dict(type='str', default='present', choices=['absent', 'present']), - params=dict(type='str', default=''), - ), - supports_check_mode=True, - ) + module = build_module() self.get_bin_path.side_effect = ['modprobe'] self.module_loaded.side_effect = [False] @@ -146,14 +126,7 @@ class TestUnloadModule(ModuleTestCase): state='absent', )) - module = AnsibleModule( - argument_spec=dict( - name=dict(type='str', required=True), - state=dict(type='str', default='present', choices=['absent', 'present']), - params=dict(type='str', default=''), - ), - supports_check_mode=True, - ) + module = build_module() module.fail_json = Mock() @@ -174,3 +147,339 @@ class TestUnloadModule(ModuleTestCase): module.fail_json.assert_called_once_with( msg='', rc=1, stdout='', stderr='', **dummy_result ) + + +class TestModuleIsLoadedPersistently(ModuleTestCase): + def setUp(self): + if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7): + self.skipTest('open_mock doesnt support readline in earlier python versions') + + super(TestModuleIsLoadedPersistently, self).setUp() + + self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') + + self.get_bin_path = self.mock_get_bin_path.start() + + def tearDown(self): + """Teardown.""" + super(TestModuleIsLoadedPersistently, self).tearDown() + + self.mock_get_bin_path.stop() + + def test_module_is_loaded(self): + + set_module_args(dict( + name='dummy', + state='present', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open(read_data='dummy')) as mocked_file: + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modules_files'): + modprobe.modules_files = ['/etc/modules-load.d/dummy.conf'] + + assert modprobe.module_is_loaded_persistently + + mocked_file.assert_called_once_with('/etc/modules-load.d/dummy.conf') + + def test_module_is_not_loaded_empty_file(self): + + set_module_args(dict( + name='dummy', + state='present', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open(read_data='')) as mocked_file: + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modules_files'): + modprobe.modules_files = ['/etc/modules-load.d/dummy.conf'] + + assert not modprobe.module_is_loaded_persistently + + mocked_file.assert_called_once_with('/etc/modules-load.d/dummy.conf') + + def test_module_is_not_loaded_no_files(self): + + set_module_args(dict( + name='dummy', + state='present', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modules_files'): + modprobe.modules_files = [] + + assert not modprobe.module_is_loaded_persistently + + +class TestPermanentParams(ModuleTestCase): + def setUp(self): + if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7): + self.skipTest('open_mock doesnt support readline in earlier python versions') + super(TestPermanentParams, self).setUp() + + self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') + + self.get_bin_path = self.mock_get_bin_path.start() + + def tearDown(self): + """Teardown.""" + super(TestPermanentParams, self).tearDown() + + self.mock_get_bin_path.stop() + + def test_module_permanent_params_exist(self): + + files_content = [ + 'options dummy numdummies=4\noptions dummy dummy_parameter1=6', + 'options dummy dummy_parameter2=5 #Comment\noptions notdummy notdummy_param=5' + ] + mock_files_content = [mock_open(read_data=content).return_value for content in files_content] + + set_module_args(dict( + name='dummy', + state='present', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open()) as mocked_file: + mocked_file.side_effect = mock_files_content + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modprobe_files'): + modprobe.modprobe_files = ['/etc/modprobe.d/dummy1.conf', '/etc/modprobe.d/dummy2.conf'] + + assert modprobe.permanent_params == set(['numdummies=4', 'dummy_parameter1=6', 'dummy_parameter2=5']) + + def test_module_permanent_params_empty(self): + + files_content = [ + '', + '' + ] + mock_files_content = [mock_open(read_data=content).return_value for content in files_content] + + set_module_args(dict( + name='dummy', + state='present', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open(read_data='')) as mocked_file: + mocked_file.side_effect = mock_files_content + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modprobe_files'): + modprobe.modprobe_files = ['/etc/modprobe.d/dummy1.conf', '/etc/modprobe.d/dummy2.conf'] + + assert modprobe.permanent_params == set() + + +class TestCreateModuleFIle(ModuleTestCase): + def setUp(self): + super(TestCreateModuleFIle, self).setUp() + + self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') + + self.get_bin_path = self.mock_get_bin_path.start() + + def tearDown(self): + """Teardown.""" + super(TestCreateModuleFIle, self).tearDown() + + self.mock_get_bin_path.stop() + + def test_create_file(self): + + set_module_args(dict( + name='dummy', + state='present', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open()) as mocked_file: + modprobe.create_module_file() + mocked_file.assert_called_once_with('/etc/modules-load.d/dummy.conf', 'w') + mocked_file().write.assert_called_once_with('dummy\n') + + +class TestCreateModuleOptionsFIle(ModuleTestCase): + def setUp(self): + super(TestCreateModuleOptionsFIle, self).setUp() + + self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') + + self.get_bin_path = self.mock_get_bin_path.start() + + def tearDown(self): + """Teardown.""" + super(TestCreateModuleOptionsFIle, self).tearDown() + + self.mock_get_bin_path.stop() + + def test_create_file(self): + + set_module_args(dict( + name='dummy', + state='present', + params='numdummies=4', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open()) as mocked_file: + modprobe.create_module_options_file() + mocked_file.assert_called_once_with('/etc/modprobe.d/dummy.conf', 'w') + mocked_file().write.assert_called_once_with('options dummy numdummies=4\n') + + +class TestDisableOldParams(ModuleTestCase): + def setUp(self): + super(TestDisableOldParams, self).setUp() + + self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') + + self.get_bin_path = self.mock_get_bin_path.start() + + def tearDown(self): + """Teardown.""" + super(TestDisableOldParams, self).tearDown() + + self.mock_get_bin_path.stop() + + def test_disable_old_params_file_changed(self): + mock_data = 'options dummy numdummies=4' + + set_module_args(dict( + name='dummy', + state='present', + params='numdummies=4', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open(read_data=mock_data)) as mocked_file: + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modprobe_files'): + modprobe.modprobe_files = ['/etc/modprobe.d/dummy1.conf'] + modprobe.disable_old_params() + mocked_file.assert_called_with('/etc/modprobe.d/dummy1.conf', 'w') + mocked_file().write.assert_called_once_with('#options dummy numdummies=4') + + def test_disable_old_params_file_unchanged(self): + mock_data = 'options notdummy numdummies=4' + + set_module_args(dict( + name='dummy', + state='present', + params='numdummies=4', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open(read_data=mock_data)) as mocked_file: + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modprobe_files'): + modprobe.modprobe_files = ['/etc/modprobe.d/dummy1.conf'] + modprobe.disable_old_params() + mocked_file.assert_called_once_with('/etc/modprobe.d/dummy1.conf') + + +class TestDisableModulePermanent(ModuleTestCase): + def setUp(self): + super(TestDisableModulePermanent, self).setUp() + + self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') + + self.get_bin_path = self.mock_get_bin_path.start() + + def tearDown(self): + """Teardown.""" + super(TestDisableModulePermanent, self).tearDown() + + self.mock_get_bin_path.stop() + + def test_disable_module_permanent_file_changed(self): + + set_module_args(dict( + name='dummy', + state='present', + params='numdummies=4', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open(read_data='dummy')) as mocked_file: + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modules_files'): + modprobe.modules_files = ['/etc/modules-load.d/dummy.conf'] + modprobe.disable_module_permanent() + mocked_file.assert_called_with('/etc/modules-load.d/dummy.conf', 'w') + mocked_file().write.assert_called_once_with('#dummy') + + def test_disable_module_permanent_file_unchanged(self): + + set_module_args(dict( + name='dummy', + state='present', + params='numdummies=4', + persistent='present' + )) + + module = build_module() + + self.get_bin_path.side_effect = ['modprobe'] + + modprobe = Modprobe(module) + + with patch('ansible_collections.community.general.plugins.modules.modprobe.open', mock_open(read_data='notdummy')) as mocked_file: + with patch('ansible_collections.community.general.plugins.modules.modprobe.Modprobe.modules_files'): + modprobe.modules_files = ['/etc/modules-load.d/dummy.conf'] + modprobe.disable_module_permanent() + mocked_file.assert_called_once_with('/etc/modules-load.d/dummy.conf') From e8bdec27336d8d532b2224233c429d028f502211 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 26 Feb 2023 15:37:16 +0100 Subject: [PATCH 0510/2104] jenkins_plugin: avoid undefined variable when updates file is not downloaded (#6100) Avoid undefined variable when updates file is not downloaded. --- changelogs/fragments/6100-jenkins_plugin.yml | 2 ++ plugins/modules/jenkins_plugin.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/6100-jenkins_plugin.yml diff --git a/changelogs/fragments/6100-jenkins_plugin.yml b/changelogs/fragments/6100-jenkins_plugin.yml new file mode 100644 index 0000000000..1f01d26083 --- /dev/null +++ b/changelogs/fragments/6100-jenkins_plugin.yml @@ -0,0 +1,2 @@ +bugfixes: + - "jenkins_plugin - fix error due to undefined variable when updates file is not downloaded (https://github.com/ansible-collections/community.general/pull/6100)." diff --git a/plugins/modules/jenkins_plugin.py b/plugins/modules/jenkins_plugin.py index b3ebf3f93c..2fbc83e03f 100644 --- a/plugins/modules/jenkins_plugin.py +++ b/plugins/modules/jenkins_plugin.py @@ -641,6 +641,8 @@ class JenkinsPlugin(object): self.module.fail_json( msg="Cannot close the tmp updates file %s." % tmp_updates_file, details=to_native(e)) + else: + tmp_updates_file = updates_file # Open the updates file try: @@ -651,15 +653,15 @@ class JenkinsPlugin(object): data = json.loads(f.readline()) except IOError as e: self.module.fail_json( - msg="Cannot open temporal updates file.", + msg="Cannot open%s updates file." % (" temporary" if tmp_updates_file != updates_file else ""), details=to_native(e)) except Exception as e: self.module.fail_json( - msg="Cannot load JSON data from the tmp updates file.", + msg="Cannot load JSON data from the%s updates file." % (" temporary" if tmp_updates_file != updates_file else ""), details=to_native(e)) # Move the updates file to the right place if we could read it - if download_updates: + if tmp_updates_file != updates_file: self.module.atomic_move(tmp_updates_file, updates_file) # Check if we have the plugin data available From 681fad92c2e6a65125b61d1719b0af5211975082 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 26 Feb 2023 16:19:59 +0100 Subject: [PATCH 0511/2104] Fix changelog fragment type. --- changelogs/fragments/6074-loader_in_listify.yml.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/6074-loader_in_listify.yml.yml b/changelogs/fragments/6074-loader_in_listify.yml.yml index 3c01cde754..9a0852a88e 100644 --- a/changelogs/fragments/6074-loader_in_listify.yml.yml +++ b/changelogs/fragments/6074-loader_in_listify.yml.yml @@ -1,2 +1,2 @@ -minor_changes: +bugfixes: - cartesian and flattened lookup plugins - adjust to parameter deprecation in ansible-core 2.14's ``listify_lookup_plugin_terms`` helper function (https://github.com/ansible-collections/community.general/pull/6074). From 38adbec4837de72d08fb57fd7a6bec332eaa1245 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 27 Feb 2023 20:05:36 +0100 Subject: [PATCH 0512/2104] Next expected release is 6.5.0. --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index b44b59bf5a..11a63851a6 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: community name: general -version: 6.4.0 +version: 6.5.0 readme: README.md authors: - Ansible (https://github.com/ansible) From d2094669859fe4b48aa20f1b3ae868b61023b51d Mon Sep 17 00:00:00 2001 From: Reto Kupferschmid Date: Mon, 27 Feb 2023 20:26:01 +0100 Subject: [PATCH 0513/2104] add xorder_discovery parameter (#6109) * add xorder_discovery parameter * fix regex raw string * use dn logic from LdapGeneric * Update documentation. * Update changelog fragment. * Improve if. --------- Co-authored-by: Felix Fontein --- changelogs/fragments/6045-xorder-discovery.yml | 2 ++ plugins/doc_fragments/ldap.py | 11 +++++++++++ plugins/module_utils/ldap.py | 15 +++++++++++++-- plugins/modules/ldap_search.py | 1 - 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/6045-xorder-discovery.yml diff --git a/changelogs/fragments/6045-xorder-discovery.yml b/changelogs/fragments/6045-xorder-discovery.yml new file mode 100644 index 0000000000..5e7fb5a031 --- /dev/null +++ b/changelogs/fragments/6045-xorder-discovery.yml @@ -0,0 +1,2 @@ +minor_changes: + - ldap modules - add ``xorder_discovery`` option (https://github.com/ansible-collections/community.general/issues/6045, https://github.com/ansible-collections/community.general/pull/6109). diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py index 1f04c0f600..8cbe276945 100644 --- a/plugins/doc_fragments/ldap.py +++ b/plugins/doc_fragments/ldap.py @@ -65,4 +65,15 @@ options: choices: ['external', 'gssapi'] default: external version_added: "2.0.0" + xorder_discovery: + description: + - Set the behavior on how to process Xordered DNs. + - C(enable) will perform a C(ONELEVEL) search below the superior RDN to find the matching DN. + - C(disable) will always use the DN unmodified (as passed by the I(dn) parameter). + - C(auto) will only perform a search if the first RDN does not contain an index number (C({x})). + - Possible choices are C(enable), C(auto), C(disable). + type: str + choices: ['enable', 'auto', 'disable'] + default: auto + version_added: "6.4.0" ''' diff --git a/plugins/module_utils/ldap.py b/plugins/module_utils/ldap.py index 03acaa58c5..cc6a37199b 100644 --- a/plugins/module_utils/ldap.py +++ b/plugins/module_utils/ldap.py @@ -10,6 +10,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +import re import traceback from ansible.module_utils.common.text.converters import to_native @@ -39,6 +40,7 @@ def gen_specs(**specs): 'start_tls': dict(default=False, type='bool'), 'validate_certs': dict(default=True, type='bool'), 'sasl_class': dict(choices=['external', 'gssapi'], default='external', type='str'), + 'xorder_discovery': dict(choices=['enable', 'auto', 'disable'], default='auto', type='str'), }) return specs @@ -55,12 +57,16 @@ class LdapGeneric(object): self.start_tls = self.module.params['start_tls'] self.verify_cert = self.module.params['validate_certs'] self.sasl_class = self.module.params['sasl_class'] + self.xorder_discovery = self.module.params['xorder_discovery'] # Establish connection self.connection = self._connect_to_ldap() - # Try to find the X_ORDERed version of the DN - self.dn = self._find_dn() + if self.xorder_discovery == "enable" or (self.xorder_discovery == "auto" and not self._xorder_dn()): + # Try to find the X_ORDERed version of the DN + self.dn = self._find_dn() + else: + self.dn = self.module.params['dn'] def fail(self, msg, exn): self.module.fail_json( @@ -113,3 +119,8 @@ class LdapGeneric(object): self.fail("Cannot bind to the server.", e) return connection + + def _xorder_dn(self): + # match X_ORDERed DNs + regex = r"\w+=\{\d+\}.+" + return re.match(regex, self.module.params['dn']) is not None diff --git a/plugins/modules/ldap_search.py b/plugins/modules/ldap_search.py index 32efd4edd6..ad79a2d73a 100644 --- a/plugins/modules/ldap_search.py +++ b/plugins/modules/ldap_search.py @@ -135,7 +135,6 @@ class LdapSearch(LdapGeneric): def __init__(self, module): LdapGeneric.__init__(self, module) - self.dn = self.module.params['dn'] self.filterstr = self.module.params['filter'] self.attrlist = [] self._load_scope() From 03084d1133d5cddd2bcc4b234e92f2b0ddee6ac3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 1 Mar 2023 21:28:29 +0100 Subject: [PATCH 0514/2104] Remove glitchcrab as maintainer for memset modules and module utils (#6116) Remove glitchcrab as maintainer for memset modules and module utils. --- .github/BOTMETA.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 41e2e76ccc..ee427f21ac 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -294,7 +294,6 @@ files: maintainers: $team_manageiq $module_utils/memset.py: labels: cloud memset - maintainers: glitchcrab $module_utils/mh/: labels: module_helper maintainers: russoz @@ -783,7 +782,7 @@ files: labels: maven_artifact maintainers: tumbl3w33d turb $modules/memset_: - maintainers: glitchcrab + ignore: glitchcrab $modules/mksysb.py: labels: aix mksysb maintainers: $team_aix From 345a69304adb56fd0fdd961583b03e2c3d7ecc30 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:01:15 +1300 Subject: [PATCH 0515/2104] opkg: fix bug when update_cache=true (#6119) * opkg: fix bug when update_cache=true * add changelog fragment --- changelogs/fragments/6119-opkg-update.yaml | 2 + plugins/modules/opkg.py | 17 ++++---- tests/unit/plugins/modules/test_opkg.py | 48 ++++++++++++++++++++++ 3 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/6119-opkg-update.yaml diff --git a/changelogs/fragments/6119-opkg-update.yaml b/changelogs/fragments/6119-opkg-update.yaml new file mode 100644 index 0000000000..b7450074d1 --- /dev/null +++ b/changelogs/fragments/6119-opkg-update.yaml @@ -0,0 +1,2 @@ +bugfixes: + - opkg - fixes bug when using ``update_cache=true`` (https://github.com/ansible-collections/community.general/issues/6004). diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index 360bf453b7..d2ac314d03 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -148,6 +148,11 @@ class Opkg(StateModuleHelper): ), ) + if self.vars.update_cache: + rc, dummy, dummy = self.runner("update_cache").run() + if rc != 0: + self.do_raise("could not update package db") + @staticmethod def split_name_and_version(package): """ Split the name and the version when using the NAME=VERSION syntax """ @@ -164,10 +169,6 @@ class Opkg(StateModuleHelper): return want_installed == has_package def state_present(self): - if self.vars.update_cache: - dummy, rc, dummy = self.runner("update_cache").run() - if rc != 0: - self.do_raise("could not update package db") with self.runner("state force package") as ctx: for package in self.vars.name: pkg_name, pkg_version = self.split_name_and_version(package) @@ -176,16 +177,14 @@ class Opkg(StateModuleHelper): if not self._package_in_desired_state(pkg_name, want_installed=True, version=pkg_version): self.do_raise("failed to install %s" % package) self.vars.install_c += 1 + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info if self.vars.install_c > 0: self.vars.msg = "installed %s package(s)" % (self.vars.install_c) else: self.vars.msg = "package(s) already present" def state_absent(self): - if self.vars.update_cache: - dummy, rc, dummy = self.runner("update_cache").run() - if rc != 0: - self.do_raise("could not update package db") with self.runner("state force package") as ctx: for package in self.vars.name: package, dummy = self.split_name_and_version(package) @@ -194,6 +193,8 @@ class Opkg(StateModuleHelper): if not self._package_in_desired_state(package, want_installed=False): self.do_raise("failed to remove %s" % package) self.vars.remove_c += 1 + if self.verbosity >= 4: + self.vars.run_info = ctx.run_info if self.vars.remove_c > 0: self.vars.msg = "removed %s package(s)" % (self.vars.remove_c) else: diff --git a/tests/unit/plugins/modules/test_opkg.py b/tests/unit/plugins/modules/test_opkg.py index f11347facc..8e52368ff9 100644 --- a/tests/unit/plugins/modules/test_opkg.py +++ b/tests/unit/plugins/modules/test_opkg.py @@ -150,6 +150,54 @@ TEST_CASES = [ ), ], ), + ModuleTestCase( + id="install_vim_updatecache", + input={"name": "vim-fuller", "state": "present", "update_cache": True}, + output={ + "msg": "installed 1 package(s)" + }, + run_command_calls=[ + RunCmdCall( + command=["/testbin/opkg", "update"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="", + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "list-installed", "vim-fuller"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="", + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "install", "vim-fuller"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out=( + "Multiple packages (libgcc1 and libgcc1) providing same name marked HOLD or PREFER. Using latest.\n" + "Installing vim-fuller (9.0-1) to root...\n" + "Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/packages/vim-fuller_9.0-1_x86_64.ipk\n" + "Installing terminfo (6.4-2) to root...\n" + "Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/terminfo_6.4-2_x86_64.ipk\n" + "Installing libncurses6 (6.4-2) to root...\n" + "Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/libncurses6_6.4-2_x86_64.ipk\n" + "Configuring terminfo.\n" + "Configuring libncurses6.\n" + "Configuring vim-fuller.\n" + ), + err="", + ), + RunCmdCall( + command=["/testbin/opkg", "list-installed", "vim-fuller"], + environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False}, + rc=0, + out="vim-fuller - 9.0-1 \n", # This output has the extra space at the end, to satisfy the behaviour of Yocto/OpenEmbedded's opkg + err="", + ), + ], + ), ] TEST_CASES_IDS = [item.id for item in TEST_CASES] From c0cb7958cb510610684088167b8c2e71987a6a17 Mon Sep 17 00:00:00 2001 From: AnatomicJC Date: Thu, 2 Mar 2023 07:14:58 +0100 Subject: [PATCH 0516/2104] Documentation: yum_versionlock typo fix (#6121) ##### SUMMARY Fixing typo in documentation, we need to use name parameter instead of package. ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr --- plugins/modules/yum_versionlock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/yum_versionlock.py b/plugins/modules/yum_versionlock.py index 95fd4dd7cf..e5d32dc77e 100644 --- a/plugins/modules/yum_versionlock.py +++ b/plugins/modules/yum_versionlock.py @@ -64,7 +64,7 @@ EXAMPLES = r''' - name: Remove lock from Apache / httpd to be updated again community.general.yum_versionlock: state: absent - package: httpd + name: httpd ''' RETURN = r''' From 9a97bc7c1146f612e02268a8b6df92490ad10ec2 Mon Sep 17 00:00:00 2001 From: Giacomo Olgeni Date: Fri, 3 Mar 2023 22:56:24 +0100 Subject: [PATCH 0517/2104] Add 'inventory_hostname' to the jail plugin documentation (#6118) This fixes the following warning on FreeBSD: [WARNING]: The "jail" connection plugin has an improperly configured remote target value, forcing "inventory_hostname" templated value instead of the string --- .../6118-jail-plugin-fix-default-inventory_hostname.yml | 2 ++ plugins/connection/jail.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/6118-jail-plugin-fix-default-inventory_hostname.yml diff --git a/changelogs/fragments/6118-jail-plugin-fix-default-inventory_hostname.yml b/changelogs/fragments/6118-jail-plugin-fix-default-inventory_hostname.yml new file mode 100644 index 0000000000..ac2cb5cf43 --- /dev/null +++ b/changelogs/fragments/6118-jail-plugin-fix-default-inventory_hostname.yml @@ -0,0 +1,2 @@ +bugfixes: + - "jail connection plugin - add ``inventory_hostname`` to vars under ``remote_addr``. This is needed for compatibility with ansible-core 2.13 (https://github.com/ansible-collections/community.general/pull/6118)." diff --git a/plugins/connection/jail.py b/plugins/connection/jail.py index d813780136..3a3edd4b18 100644 --- a/plugins/connection/jail.py +++ b/plugins/connection/jail.py @@ -22,6 +22,7 @@ DOCUMENTATION = ''' - Path to the jail default: inventory_hostname vars: + - name: inventory_hostname - name: ansible_host - name: ansible_jail_host remote_user: From 2dee3464dda014cbd3a5db4a924131c0b3663aaa Mon Sep 17 00:00:00 2001 From: Sam Potekhin <24751685+heaveaxy@users.noreply.github.com> Date: Sat, 4 Mar 2023 16:01:52 +0700 Subject: [PATCH 0518/2104] nmcli: fixed inability to change mtu on vlan connection (#6104) * tests updated Co-authored-by: Sam Potekhin --- changelogs/fragments/4387-nmcli-mtu-for-vlan-connection-fix.yml | 2 ++ plugins/modules/nmcli.py | 1 + tests/unit/plugins/modules/test_nmcli.py | 1 + 3 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/4387-nmcli-mtu-for-vlan-connection-fix.yml diff --git a/changelogs/fragments/4387-nmcli-mtu-for-vlan-connection-fix.yml b/changelogs/fragments/4387-nmcli-mtu-for-vlan-connection-fix.yml new file mode 100644 index 0000000000..e867135b2a --- /dev/null +++ b/changelogs/fragments/4387-nmcli-mtu-for-vlan-connection-fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - nmcli - implemented changing mtu value on vlan interfaces (https://github.com/ansible-collections/community.general/issues/4387). diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index 61b0325fe9..383e51a2c2 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -1772,6 +1772,7 @@ class Nmcli(object): 'dummy', 'ethernet', 'team-slave', + 'vlan', ) @property diff --git a/tests/unit/plugins/modules/test_nmcli.py b/tests/unit/plugins/modules/test_nmcli.py index c7e0baf7e5..86c34df443 100644 --- a/tests/unit/plugins/modules/test_nmcli.py +++ b/tests/unit/plugins/modules/test_nmcli.py @@ -663,6 +663,7 @@ ipv6.method: auto ipv6.ignore-auto-dns: no ipv6.ignore-auto-routes: no vlan.id: 10 +802-3-ethernet.mtu: auto """ TESTCASE_VXLAN = [ From 3d67f51824c65035083e995206738166bb3a0de0 Mon Sep 17 00:00:00 2001 From: Sargun Vohra Date: Sat, 4 Mar 2023 01:09:14 -0800 Subject: [PATCH 0519/2104] Fix Yarn global not working without explicit executable path (#6138) * Fix Yarn global not working without explicit executable path * changelog fragment * fix formatting and add test * oops --- changelogs/fragments/6138-fix-yarn-global.yml | 2 ++ plugins/modules/yarn.py | 14 +++++++------- tests/integration/targets/yarn/tasks/run.yml | 9 +++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/6138-fix-yarn-global.yml diff --git a/changelogs/fragments/6138-fix-yarn-global.yml b/changelogs/fragments/6138-fix-yarn-global.yml new file mode 100644 index 0000000000..30203ead6c --- /dev/null +++ b/changelogs/fragments/6138-fix-yarn-global.yml @@ -0,0 +1,2 @@ +bugfixes: + - yarn - fix ``global=true`` to not fail when `executable` wasn't specified (https://github.com/ansible-collections/community.general/pull/6132) diff --git a/plugins/modules/yarn.py b/plugins/modules/yarn.py index da9f9c79c3..02cfc4f8be 100644 --- a/plugins/modules/yarn.py +++ b/plugins/modules/yarn.py @@ -179,15 +179,11 @@ class Yarn(object): self.registry = kwargs['registry'] self.production = kwargs['production'] self.ignore_scripts = kwargs['ignore_scripts'] + self.executable = kwargs['executable'] # Specify a version of package if version arg passed in self.name_version = None - if kwargs['executable']: - self.executable = kwargs['executable'].split(' ') - else: - self.executable = [module.get_bin_path('yarn', True)] - if kwargs['version'] and self.name is not None: self.name_version = self.name + '@' + str(self.version) elif self.name is not None: @@ -328,7 +324,6 @@ def main(): version = module.params['version'] globally = module.params['global'] production = module.params['production'] - executable = module.params['executable'] registry = module.params['registry'] state = module.params['state'] ignore_scripts = module.params['ignore_scripts'] @@ -345,9 +340,14 @@ def main(): if state == 'latest': version = 'latest' + if module.params['executable']: + executable = module.params['executable'].split(' ') + else: + executable = [module.get_bin_path('yarn', True)] + # When installing globally, use the defined path for global node_modules if globally: - _rc, out, _err = module.run_command([executable, 'global', 'dir'], check_rc=True) + _rc, out, _err = module.run_command(executable + ['global', 'dir'], check_rc=True) path = out.strip() yarn = Yarn(module, diff --git a/tests/integration/targets/yarn/tasks/run.yml b/tests/integration/targets/yarn/tasks/run.yml index 93a3d5bb55..0d7d6fb421 100644 --- a/tests/integration/targets/yarn/tasks/run.yml +++ b/tests/integration/targets/yarn/tasks/run.yml @@ -108,6 +108,15 @@ that: - yarn_install_old_package is changed + - name: 'Again but without explicit executable path' + yarn: + path: '{{ remote_tmp_dir }}' + name: left-pad + version: 1.1.0 + state: present + environment: + PATH: '{{ yarn_bin_path }}:{{ node_bin_path }}:{{ ansible_env.PATH }}' + - name: 'Upgrade old package' yarn: path: '{{ remote_tmp_dir }}' From c077818c5dfd70ccda3b9d09fa5a8c9bf62f2938 Mon Sep 17 00:00:00 2001 From: cfiehe Date: Sat, 4 Mar 2023 10:14:58 +0100 Subject: [PATCH 0520/2104] Fixes #6112: community.general.gitlab_runner KeyError: 'access_level' (#6130) The fix ensures that no 'KeyError' is raised, when 'access_level' is not provided as module parameter or when 'access_level_on_creation' is false. Signed-off-by: Christoph Fiehe Co-authored-by: Christoph Fiehe --- .../6112-fix_key_error_in_gitlab_runner_creation_update.yml | 2 ++ plugins/modules/gitlab_runner.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/6112-fix_key_error_in_gitlab_runner_creation_update.yml diff --git a/changelogs/fragments/6112-fix_key_error_in_gitlab_runner_creation_update.yml b/changelogs/fragments/6112-fix_key_error_in_gitlab_runner_creation_update.yml new file mode 100644 index 0000000000..d752aed347 --- /dev/null +++ b/changelogs/fragments/6112-fix_key_error_in_gitlab_runner_creation_update.yml @@ -0,0 +1,2 @@ +bugfixes: + - gitlab_runner - fix ``KeyError`` on runner creation and update (https://github.com/ansible-collections/community.general/issues/6112). diff --git a/plugins/modules/gitlab_runner.py b/plugins/modules/gitlab_runner.py index f0da30e8f2..22d210b6c2 100644 --- a/plugins/modules/gitlab_runner.py +++ b/plugins/modules/gitlab_runner.py @@ -234,9 +234,8 @@ class GitLabRunner(object): 'maximum_timeout': options['maximum_timeout'], 'tag_list': options['tag_list'], } - if arguments['access_level'] is not None: + if options.get('access_level') is not None: arguments['access_level'] = options['access_level'] - # Because we have already call userExists in main() if self.runner_object is None: arguments['description'] = description @@ -251,7 +250,7 @@ class GitLabRunner(object): access_level_on_creation = False if not access_level_on_creation: - del arguments['access_level'] + arguments.pop('access_level', None) runner = self.create_runner(arguments) changed = True From 733e31c85f1015852e9ea44b35f1b16f35cd549d Mon Sep 17 00:00:00 2001 From: Chris Hoffman <99742+chrishoffman@users.noreply.github.com> Date: Sat, 4 Mar 2023 14:47:13 -0500 Subject: [PATCH 0521/2104] Remove chrishoffman as maintainer for yarn (#6143) Ignore chrishoffman from yarn --- .github/BOTMETA.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index ee427f21ac..c8de2cd2b0 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1313,7 +1313,8 @@ files: labels: m:xml xml maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0 $modules/yarn.py: - maintainers: chrishoffman verkaufer + maintainers: verkaufer + ignore: chrishoffman $modules/yum_versionlock.py: maintainers: gyptazy aminvakil $modules/zfs: From 627371e2d8cfdd9be43a00e697a0d631036bcb10 Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Sat, 4 Mar 2023 14:51:50 -0500 Subject: [PATCH 0522/2104] dconf: Check for changes properly despite style of quotes used by user (#6049) dconf: parse GVariant values to check for equality whenever possible Direct string comparisons are an inaccurate way to compare two GVariant representations. For example, 'foo' and "foo" (including the quote marks, which are part of the representation) are equal GVariants but if you just do a string compare (remember, including the quotes) they'll be interpreted. We therefore want to use the `gi.repository` Python library to parse GVariant representations before comparing them whenever possible. However, we don't want to assume that this library will always be available or require it for Ansible to function, so we use a straight string comparison as a fallback when the library isn't available. This may result in some false positives, i.e., Ansible thinking a value is changing when it actually isn't, but will not result in incorrect values being written into `dconf`. Co-authored-by: Jonathan Kamens --- changelogs/fragments/6049-dconf-strings.yml | 2 + plugins/modules/dconf.py | 45 ++++++++++++++++++++- tests/unit/plugins/modules/test_dconf.py | 44 ++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/6049-dconf-strings.yml create mode 100644 tests/unit/plugins/modules/test_dconf.py diff --git a/changelogs/fragments/6049-dconf-strings.yml b/changelogs/fragments/6049-dconf-strings.yml new file mode 100644 index 0000000000..1d194b3389 --- /dev/null +++ b/changelogs/fragments/6049-dconf-strings.yml @@ -0,0 +1,2 @@ +minor_changes: + - dconf - parse GVariants for equality comparison when the Python module ``gi.repository`` is available (https://github.com/ansible-collections/community.general/pull/6049). diff --git a/plugins/modules/dconf.py b/plugins/modules/dconf.py index 4d7ed34bf9..b5ece96ec1 100644 --- a/plugins/modules/dconf.py +++ b/plugins/modules/dconf.py @@ -21,11 +21,23 @@ description: - Since C(dconf) requires a running D-Bus session to change values, the module will try to detect an existing session and reuse it, or run the tool via C(dbus-run-session). +requirements: + - Optionally the C(gi.repository) Python library (usually included in the OS + on hosts which have C(dconf)); this will become a non-optional requirement + in a future major release of community.general. notes: - This module depends on C(psutil) Python library (version 4.0.0 and upwards), C(dconf), C(dbus-send), and C(dbus-run-session) binaries. Depending on distribution you are using, you may need to install additional packages to have these available. + - This module uses the C(gi.repository) Python library when available for + accurate comparison of values in C(dconf) to values specified in Ansible + code. C(gi.repository) is likely to be present on most systems which have + C(dconf) but may not be present everywhere. When it is missing, a simple + string comparison between values is used, and there may be false positives, + that is, Ansible may think that a value is being changed when it is not. + This fallback will be removed in a future version of this module, at which + point the module will stop working on hosts without C(gi.repository). - Detection of existing, running D-Bus session, required to change settings via C(dconf), is not 100% reliable due to implementation details of D-Bus daemon itself. This might lead to running applications not picking-up @@ -128,6 +140,12 @@ EXAMPLES = r""" import os import traceback +try: + from gi.repository.GLib import Variant, GError +except ImportError: + Variant = None + GError = AttributeError + PSUTIL_IMP_ERR = None try: import psutil @@ -258,6 +276,25 @@ class DconfPreference(object): # Check if dconf binary exists self.dconf_bin = self.module.get_bin_path('dconf', required=True) + @staticmethod + def variants_are_equal(canonical_value, user_value): + """Compare two string GVariant representations for equality. + + Assumes `canonical_value` is "canonical" in the sense that the type of + the variant is specified explicitly if it cannot be inferred; this is + true for textual representations of variants generated by the `dconf` + command. The type of `canonical_value` is used to parse `user_value`, + so the latter does not need to be explicitly typed. + + Returns True if the two values are equal. + """ + try: + variant1 = Variant.parse(None, canonical_value) + variant2 = Variant.parse(variant1.get_type(), user_value) + return variant1 == variant2 + except GError: + return canonical_value == user_value + def read(self, key): """ Retrieves current value associated with the dconf key. @@ -298,7 +335,7 @@ class DconfPreference(object): """ # If no change is needed (or won't be done due to check_mode), notify # caller straight away. - if value == self.read(key): + if self.variants_are_equal(self.read(key), value): return False elif self.check_mode: return True @@ -369,6 +406,12 @@ def main(): supports_check_mode=True ) + if Variant is None: + module.warn( + 'WARNING: The gi.repository Python library is not available; ' + 'using string comparison to check value equality. This fallback ' + 'will be deprecated in a future version of community.general.') + if not HAS_PSUTIL: module.fail_json(msg=missing_required_lib("psutil"), exception=PSUTIL_IMP_ERR) diff --git a/tests/unit/plugins/modules/test_dconf.py b/tests/unit/plugins/modules/test_dconf.py new file mode 100644 index 0000000000..e0ea8195a1 --- /dev/null +++ b/tests/unit/plugins/modules/test_dconf.py @@ -0,0 +1,44 @@ +# Copyright (c) 2023 Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or +# https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest + +from ansible_collections.community.general.plugins.modules import dconf + +try: + from gi.repository.GLib import Variant +except ImportError: + Variant = None + +DconfPreference = dconf.DconfPreference + + +@pytest.mark.parametrize( + "v1,v2,expected,fallback_expected", + (("'foo'", "'foo'", True, True), + ('"foo"', "'foo'", True, False), + ("'foo'", '"foo"', True, False), + ("'foo'", '"bar"', False, False), + ("[1, 2, 3]", "[1, 2, 3]", True, True), + ("[1, 2, 3]", "[3, 2, 1]", False, False), + ('1234', '1234', True, True), + ('1234', '1235', False, False), + ('1.0', '1.0', True, True), + ('1.000', '1.0', True, False), + ('2.0', '4.0', False, False), + # GVariants with different types aren't equal! + ('1', '1.0', False, False), + # Explicit types + ('@as []', '[]', True, False), + )) +def test_gvariant_equality(mocker, v1, v2, expected, fallback_expected): + assert DconfPreference.variants_are_equal(v1, v2) is \ + (expected if Variant else fallback_expected) + mocker.patch.object(dconf, 'Variant', None) + mocker.patch.object(dconf, "GError", AttributeError) + assert DconfPreference.variants_are_equal(v1, v2) is fallback_expected From 11c7611ced8f9398a0fbd76a3bb93dc35f0cb909 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 6 Mar 2023 23:02:24 +0100 Subject: [PATCH 0523/2104] More true/false normalization (#6152) * More true/false normalization. * Boolean do not need explicit choices. * One more. * Fix type argument. --- plugins/modules/aix_devices.py | 2 +- plugins/modules/ipmi_power.py | 10 ++--- plugins/modules/nmcli.py | 1 - plugins/modules/utm_proxy_auth_profile.py | 25 +++-------- plugins/modules/zfs.py | 2 +- .../targets/aix_devices/tasks/main.yml | 2 +- .../targets/alternatives/tasks/main.yml | 8 ++-- .../alternatives/tasks/path_is_checked.yml | 2 +- .../alternatives/tasks/subcommands.yml | 4 +- .../apache2_module/tasks/actualtest.yml | 14 +++--- .../targets/archive/tasks/main.yml | 2 +- .../targets/consul/tasks/consul_session.yml | 10 ++--- .../targets/filesystem/defaults/main.yml | 26 +++++------ .../filesystem/tasks/overwrite_another_fs.yml | 2 +- .../targets/filter_from_csv/tasks/main.yml | 2 +- tests/integration/targets/gem/tasks/main.yml | 4 +- .../targets/github_issue/tasks/main.yml | 2 +- .../targets/gitlab_branch/tasks/main.yml | 6 +-- .../targets/gitlab_deploy_key/tasks/main.yml | 2 +- .../gitlab_group_variable/tasks/main.yml | 44 +++++++++---------- .../targets/gitlab_hook/tasks/main.yml | 2 +- .../targets/gitlab_project/tasks/main.yml | 8 ++-- .../gitlab_project_badge/tasks/main.yml | 24 +++++----- .../gitlab_project_variable/tasks/main.yml | 44 +++++++++---------- .../targets/gitlab_runner/tasks/main.yml | 2 +- .../targets/gitlab_user/tasks/main.yml | 26 +++++------ .../targets/hwc_vpc_eip/tasks/main.yml | 4 +- .../targets/hwc_vpc_port/tasks/main.yml | 4 +- .../targets/hwc_vpc_private_ip/tasks/main.yml | 4 +- .../targets/hwc_vpc_subnet/tasks/main.yml | 18 ++++---- .../targets/iso_create/tasks/main.yml | 2 +- .../targets/iso_customize/tasks/main.yml | 2 +- .../targets/iso_extract/tasks/7zip.yml | 2 +- .../keycloak_user_rolemapping/tasks/main.yml | 2 +- .../targets/locale_gen/tasks/locale_gen.yml | 12 ++--- .../lookup_passwordstore/tasks/package.yml | 2 +- tests/integration/targets/odbc/tasks/main.yml | 10 ++--- .../targets/odbc/tasks/negative_tests.yml | 2 +- .../targets/odbc/tasks/no_pyodbc.yml | 2 +- .../targets/osx_defaults/tasks/main.yml | 4 +- .../targets/pacman/tasks/package_urls.yml | 8 ++-- .../targets/pacman/tasks/reason.yml | 2 +- .../targets/proxmox/tasks/main.yml | 2 +- .../targets/rundeck/tasks/main.yml | 2 +- .../targets/sefcontext/tasks/sefcontext.yml | 20 ++++----- .../targets/setup_openldap/tasks/main.yml | 16 +++---- .../targets/setup_openssl/tasks/main.yml | 6 +-- .../targets/zypper/tasks/zypper.yml | 20 ++++----- 48 files changed, 203 insertions(+), 219 deletions(-) diff --git a/plugins/modules/aix_devices.py b/plugins/modules/aix_devices.py index 721c36d6aa..ef4ed49612 100644 --- a/plugins/modules/aix_devices.py +++ b/plugins/modules/aix_devices.py @@ -108,7 +108,7 @@ EXAMPLES = r''' device: en1 attributes: mtu: 900 - arp: off + arp: 'off' state: available - name: Configure IP, netmask and set en1 up. diff --git a/plugins/modules/ipmi_power.py b/plugins/modules/ipmi_power.py index c5ec27a480..e152f35eb4 100644 --- a/plugins/modules/ipmi_power.py +++ b/plugins/modules/ipmi_power.py @@ -100,7 +100,7 @@ powerstate: description: The current power state of the machine. returned: success and I(machine) is not provided type: str - sample: on + sample: 'on' status: description: The current power state of the machine when the machine option is set. returned: success and I(machine) is provided @@ -132,14 +132,14 @@ EXAMPLES = ''' name: test.testdomain.com user: admin password: password - state: on + state: 'on' - name: Ensure machines of which remote target address is 48 and 50 are powered off community.general.ipmi_power: name: test.testdomain.com user: admin password: password - state: off + state: 'off' machine: - targetAddress: 48 - targetAddress: 50 @@ -151,9 +151,9 @@ EXAMPLES = ''' password: password machine: - targetAddress: 48 - state: on + state: 'on' - targetAddress: 50 - state: off + state: 'off' ''' import traceback diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index 383e51a2c2..cc4c527608 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -968,7 +968,6 @@ options: - Enable or disable IPSec tunnel to L2TP host. - This option is need when C(service-type) is C(org.freedesktop.NetworkManager.l2tp). type: bool - choices: [ yes, no ] ipsec-psk: description: - The pre-shared key in base64 encoding. diff --git a/plugins/modules/utm_proxy_auth_profile.py b/plugins/modules/utm_proxy_auth_profile.py index ef3fc341a3..3b482483bf 100644 --- a/plugins/modules/utm_proxy_auth_profile.py +++ b/plugins/modules/utm_proxy_auth_profile.py @@ -58,9 +58,6 @@ options: - Should the login data be stripped when proxying the request to the backend host type: bool default: true - choices: - - True - - False backend_user_prefix: type: str description: @@ -118,9 +115,6 @@ options: - Allow session persistency type: bool default: false - choices: - - True - - False frontend_session_lifetime: type: int description: @@ -131,9 +125,6 @@ options: - Specifies if limitation of session lifetime is active type: bool default: true - choices: - - True - - False frontend_session_lifetime_scope: type: str description: @@ -153,9 +144,6 @@ options: - Specifies if session timeout is active type: bool default: true - choices: - - True - - False frontend_session_timeout_scope: type: str description: @@ -184,9 +172,6 @@ options: - Should a redirect to the requested URL be made type: bool default: false - choices: - - True - - False extends_documentation_fragment: - community.general.utm @@ -336,7 +321,7 @@ def main(): aaa=dict(type='list', elements='str', required=True), basic_prompt=dict(type='str', required=True), backend_mode=dict(type='str', required=False, default="None", choices=['Basic', 'None']), - backend_strip_basic_auth=dict(type='bool', required=False, default=True, choices=[True, False]), + backend_strip_basic_auth=dict(type='bool', required=False, default=True), backend_user_prefix=dict(type='str', required=False, default=""), backend_user_suffix=dict(type='str', required=False, default=""), comment=dict(type='str', required=False, default=""), @@ -348,16 +333,16 @@ def main(): frontend_logout=dict(type='str', required=False), frontend_mode=dict(type='str', required=False, default="Basic", choices=['Basic', 'Form']), frontend_realm=dict(type='str', required=False), - frontend_session_allow_persistency=dict(type='bool', required=False, default=False, choices=[True, False]), + frontend_session_allow_persistency=dict(type='bool', required=False, default=False), frontend_session_lifetime=dict(type='int', required=True), - frontend_session_lifetime_limited=dict(type='bool', required=False, default=True, choices=[True, False]), + frontend_session_lifetime_limited=dict(type='bool', required=False, default=True), frontend_session_lifetime_scope=dict(type='str', required=False, default="hours", choices=['days', 'hours', 'minutes']), frontend_session_timeout=dict(type='int', required=True), - frontend_session_timeout_enabled=dict(type='bool', required=False, default=True, choices=[True, False]), + frontend_session_timeout_enabled=dict(type='bool', required=False, default=True), frontend_session_timeout_scope=dict(type='str', required=False, default="minutes", choices=['days', 'hours', 'minutes']), logout_delegation_urls=dict(type='list', elements='str', required=False, default=[]), logout_mode=dict(type='str', required=False, default="None", choices=['None', 'Delegation']), - redirect_to_requested_url=dict(type='bool', required=False, default=False, choices=[True, False]) + redirect_to_requested_url=dict(type='bool', required=False, default=False) ) ) try: diff --git a/plugins/modules/zfs.py b/plugins/modules/zfs.py index 83b2a6edf8..4cd79c36e2 100644 --- a/plugins/modules/zfs.py +++ b/plugins/modules/zfs.py @@ -62,7 +62,7 @@ EXAMPLES = ''' name: rpool/myfs state: present extra_zfs_properties: - setuid: off + setuid: 'off' - name: Create a new volume called myvol in pool rpool. community.general.zfs: diff --git a/tests/integration/targets/aix_devices/tasks/main.yml b/tests/integration/targets/aix_devices/tasks/main.yml index c2b829d42f..284f46c33b 100644 --- a/tests/integration/targets/aix_devices/tasks/main.yml +++ b/tests/integration/targets/aix_devices/tasks/main.yml @@ -61,7 +61,7 @@ device: en1 attributes: mtu: 900 - arp: off + arp: 'off' state: present - name: Configure IP, netmask and set en1 up. diff --git a/tests/integration/targets/alternatives/tasks/main.yml b/tests/integration/targets/alternatives/tasks/main.yml index eac512aa45..81d6a7b0df 100644 --- a/tests/integration/targets/alternatives/tasks/main.yml +++ b/tests/integration/targets/alternatives/tasks/main.yml @@ -19,8 +19,8 @@ - include_tasks: tests.yml with_nested: - - [ True, False ] # with_link - - [ True, False ] # with_alternatives + - [ true, false ] # with_link + - [ true, false ] # with_alternatives - [ 'auto', 'manual' ] # mode loop_control: loop_var: test_conf @@ -34,7 +34,7 @@ - include_tasks: tests_set_priority.yml with_sequence: start=3 end=4 vars: - with_alternatives: True + with_alternatives: true mode: auto - block: @@ -44,7 +44,7 @@ - include_tasks: tests_set_priority.yml with_sequence: start=3 end=4 vars: - with_alternatives: False + with_alternatives: false mode: auto # Test that path is checked: alternatives must fail when path is nonexistent diff --git a/tests/integration/targets/alternatives/tasks/path_is_checked.yml b/tests/integration/targets/alternatives/tasks/path_is_checked.yml index 47ce1a54ef..0bc435889e 100644 --- a/tests/integration/targets/alternatives/tasks/path_is_checked.yml +++ b/tests/integration/targets/alternatives/tasks/path_is_checked.yml @@ -8,7 +8,7 @@ name: dummy path: '/non/existent/path/there' link: '/usr/bin/dummy' - ignore_errors: True + ignore_errors: true register: alternative - name: Check previous task failed diff --git a/tests/integration/targets/alternatives/tasks/subcommands.yml b/tests/integration/targets/alternatives/tasks/subcommands.yml index e83fd6db3c..678bbe68f4 100644 --- a/tests/integration/targets/alternatives/tasks/subcommands.yml +++ b/tests/integration/targets/alternatives/tasks/subcommands.yml @@ -83,7 +83,7 @@ - name: Execute the current dummysubcmd command command: dummysubcmd register: cmd - ignore_errors: True + ignore_errors: true - name: Ensure that the subcommand is gone assert: @@ -166,7 +166,7 @@ - name: Execute the current dummysubcmd command command: dummysubcmd register: cmd - ignore_errors: True + ignore_errors: true - name: Ensure that the subcommand is gone assert: diff --git a/tests/integration/targets/apache2_module/tasks/actualtest.yml b/tests/integration/targets/apache2_module/tasks/actualtest.yml index 1902cac5ee..3301a16b15 100644 --- a/tests/integration/targets/apache2_module/tasks/actualtest.yml +++ b/tests/integration/targets/apache2_module/tasks/actualtest.yml @@ -71,7 +71,7 @@ community.general.apache2_module: name: autoindex state: absent - force: True + force: true - name: reenable autoindex community.general.apache2_module: @@ -93,7 +93,7 @@ community.general.apache2_module: name: dump_io state: present - ignore_errors: True + ignore_errors: true register: enable_dumpio_wrong - name: disable dump_io @@ -132,7 +132,7 @@ community.general.apache2_module: name: "{{ item }}" state: absent - ignore_configcheck: True + ignore_configcheck: true with_items: - mpm_worker - mpm_event @@ -142,7 +142,7 @@ community.general.apache2_module: name: mpm_event state: present - ignore_configcheck: True + ignore_configcheck: true register: enabledmpmevent - name: ensure changed mpm_event @@ -154,7 +154,7 @@ community.general.apache2_module: name: "{{ item.name }}" state: "{{ item.state }}" - ignore_configcheck: True + ignore_configcheck: true with_items: - name: mpm_event state: absent @@ -193,7 +193,7 @@ community.general.apache2_module: name: "{{item}}" state: absent - ignore_configcheck: True + ignore_configcheck: true with_items: - mpm_worker - mpm_event @@ -203,5 +203,5 @@ community.general.apache2_module: name: mpm_event state: present - ignore_configcheck: True + ignore_configcheck: true register: enabledmpmevent diff --git a/tests/integration/targets/archive/tasks/main.yml b/tests/integration/targets/archive/tasks/main.yml index afe278bcf4..4ca41e254e 100644 --- a/tests/integration/targets/archive/tasks/main.yml +++ b/tests/integration/targets/archive/tasks/main.yml @@ -84,7 +84,7 @@ # Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a # proper solution can be found environment: - HOMEBREW_NO_AUTO_UPDATE: True + HOMEBREW_NO_AUTO_UPDATE: "True" when: - ansible_python_version.split('.')[0] == '2' - ansible_os_family == 'Darwin' diff --git a/tests/integration/targets/consul/tasks/consul_session.yml b/tests/integration/targets/consul/tasks/consul_session.yml index 059e0a584a..5436689646 100644 --- a/tests/integration/targets/consul/tasks/consul_session.yml +++ b/tests/integration/targets/consul/tasks/consul_session.yml @@ -45,7 +45,7 @@ - name: search created session set_fact: - test_session_found: True + test_session_found: true loop: "{{ result['sessions'] }}" when: "item.get('ID') == session_id and item.get('Name') == 'testsession'" @@ -69,7 +69,7 @@ state: info name: test register: result - ignore_errors: True + ignore_errors: true - assert: that: @@ -81,7 +81,7 @@ id: '{{ session_id }}' scheme: non_existent register: result - ignore_errors: True + ignore_errors: true - assert: that: @@ -94,7 +94,7 @@ port: 8501 scheme: https register: result - ignore_errors: True + ignore_errors: true - name: previous task should fail since certificate is not known assert: @@ -108,7 +108,7 @@ id: '{{ session_id }}' port: 8501 scheme: https - validate_certs: False + validate_certs: false register: result - name: previous task should succeed since certificate isn't checked diff --git a/tests/integration/targets/filesystem/defaults/main.yml b/tests/integration/targets/filesystem/defaults/main.yml index 947d4a1648..0448d8602b 100644 --- a/tests/integration/targets/filesystem/defaults/main.yml +++ b/tests/integration/targets/filesystem/defaults/main.yml @@ -6,7 +6,7 @@ tested_filesystems: # key: fstype # fssize: size (Mo) - # grow: True if resizefs is supported + # grow: true if resizefs is supported # Other minimal sizes: # - XFS: 20Mo # - Btrfs: 150Mo (50Mo when "--metadata single" is used and 100Mb when on newer Fedora versions) @@ -15,19 +15,19 @@ tested_filesystems: # - 1.7.0 requires at least 30Mo # - 1.10.0 requires at least 38Mo # - resizefs asserts when initial fs is smaller than 60Mo and seems to require 1.10.0 - ext4: {fssize: 10, grow: True} - ext4dev: {fssize: 10, grow: True} - ext3: {fssize: 10, grow: True} - ext2: {fssize: 10, grow: True} - xfs: {fssize: 300, grow: False} # grow requires a mounted filesystem - btrfs: {fssize: 150, grow: False} # grow requires a mounted filesystem - reiserfs: {fssize: 33, grow: False} # grow not implemented - vfat: {fssize: 20, grow: True} - ocfs2: {fssize: '{{ ocfs2_fssize }}', grow: False} # grow not implemented + ext4: {fssize: 10, grow: true} + ext4dev: {fssize: 10, grow: true} + ext3: {fssize: 10, grow: true} + ext2: {fssize: 10, grow: true} + xfs: {fssize: 300, grow: false} # grow requires a mounted filesystem + btrfs: {fssize: 150, grow: false} # grow requires a mounted filesystem + reiserfs: {fssize: 33, grow: false} # grow not implemented + vfat: {fssize: 20, grow: true} + ocfs2: {fssize: '{{ ocfs2_fssize }}', grow: false} # grow not implemented f2fs: {fssize: '{{ f2fs_fssize|default(60) }}', grow: 'f2fs_version is version("1.10.0", ">=")'} - lvm: {fssize: 20, grow: True} - swap: {fssize: 10, grow: False} # grow not implemented - ufs: {fssize: 10, grow: True} + lvm: {fssize: 20, grow: true} + swap: {fssize: 10, grow: false} # grow not implemented + ufs: {fssize: 10, grow: true} get_uuid_any: "blkid -c /dev/null -o value -s UUID {{ dev }}" diff --git a/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml b/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml index de0ad4d66b..69418b22f8 100644 --- a/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml +++ b/tests/integration/targets/filesystem/tasks/overwrite_another_fs.yml @@ -24,7 +24,7 @@ dev: '{{ dev }}' fstype: '{{ fstype }}' register: fs_result - ignore_errors: True + ignore_errors: true - name: 'Get UUID of the filesystem' ansible.builtin.shell: diff --git a/tests/integration/targets/filter_from_csv/tasks/main.yml b/tests/integration/targets/filter_from_csv/tasks/main.yml index f82e7d6069..5c58f85d47 100644 --- a/tests/integration/targets/filter_from_csv/tasks/main.yml +++ b/tests/integration/targets/filter_from_csv/tasks/main.yml @@ -45,7 +45,7 @@ debug: var: "invalid_comma_separated | community.general.from_csv(strict=True)" register: _invalid_csv_strict_true - ignore_errors: True + ignore_errors: true - name: Test invalid csv input when strict=True is failed assert: diff --git a/tests/integration/targets/gem/tasks/main.yml b/tests/integration/targets/gem/tasks/main.yml index 7b975f0351..362c126bfd 100644 --- a/tests/integration/targets/gem/tasks/main.yml +++ b/tests/integration/targets/gem/tasks/main.yml @@ -178,7 +178,7 @@ state: present bindir: "{{ remote_tmp_dir }}/custom_bindir" norc: true - user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL + user_install: false # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL register: install_gem_result - name: Get stats of gem executable @@ -198,7 +198,7 @@ state: absent bindir: "{{ remote_tmp_dir }}/custom_bindir" norc: true - user_install: no # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL + user_install: false # Avoid conflicts between --install-dir and --user-install when running as root on CentOS / Fedora / RHEL register: install_gem_result - name: Get stats of gem executable diff --git a/tests/integration/targets/github_issue/tasks/main.yml b/tests/integration/targets/github_issue/tasks/main.yml index bb315bf9fb..a7e43c171e 100644 --- a/tests/integration/targets/github_issue/tasks/main.yml +++ b/tests/integration/targets/github_issue/tasks/main.yml @@ -29,7 +29,7 @@ issue: "{{ non_existent_issue }}" action: get_status register: get_status_0003 - ignore_errors: True + ignore_errors: true - assert: that: diff --git a/tests/integration/targets/gitlab_branch/tasks/main.yml b/tests/integration/targets/gitlab_branch/tasks/main.yml index e9b64fc3a3..19d90e15cf 100644 --- a/tests/integration/targets/gitlab_branch/tasks/main.yml +++ b/tests/integration/targets/gitlab_branch/tasks/main.yml @@ -16,10 +16,10 @@ - name: Create {{ gitlab_project_name }} gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" - initialize_with_readme: True + initialize_with_readme: true state: present - name: Create branch {{ gitlab_branch }} @@ -63,7 +63,7 @@ - name: Clean up {{ gitlab_project_name }} gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" state: absent diff --git a/tests/integration/targets/gitlab_deploy_key/tasks/main.yml b/tests/integration/targets/gitlab_deploy_key/tasks/main.yml index 4330eb674c..c345c24678 100644 --- a/tests/integration/targets/gitlab_deploy_key/tasks/main.yml +++ b/tests/integration/targets/gitlab_deploy_key/tasks/main.yml @@ -16,7 +16,7 @@ - name: Create {{ gitlab_project_name }} gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" state: present diff --git a/tests/integration/targets/gitlab_group_variable/tasks/main.yml b/tests/integration/targets/gitlab_group_variable/tasks/main.yml index 3ba0a176cd..39a3a5df8d 100644 --- a/tests/integration/targets/gitlab_group_variable/tasks/main.yml +++ b/tests/integration/targets/gitlab_group_variable/tasks/main.yml @@ -18,7 +18,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" group: "{{ gitlab_group_name }}" - purge: True + purge: true - name: add a variable value in check_mode gitlab_group_variable: @@ -73,7 +73,7 @@ vars: ACCESS_KEY_ID: value: checkmode - protected: True + protected: true register: gitlab_group_variable_state - name: state must be changed @@ -89,7 +89,7 @@ vars: ACCESS_KEY_ID: value: checkmode - protected: False + protected: false register: gitlab_group_variable_state - name: state must be changed @@ -105,7 +105,7 @@ vars: ACCESS_KEY_ID: value: checkmode - masked: True + masked: true register: gitlab_group_variable_state - name: state must be changed @@ -151,8 +151,8 @@ vars: ACCESS_KEY_ID: value: checkmode - masked: True - protected: True + masked: true + protected: true variable_type: env_var register: gitlab_group_variable_state @@ -169,8 +169,8 @@ vars: ACCESS_KEY_ID: value: checkmode - masked: True - protected: True + masked: true + protected: true variable_type: env_var register: gitlab_group_variable_state @@ -187,7 +187,7 @@ vars: ACCESS_KEY_ID: value: checkmode - protected: False + protected: false register: gitlab_group_variable_state - name: state must be changed @@ -265,7 +265,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" group: "{{ gitlab_group_name }}" - purge: True + purge: true - name: set two test variables gitlab_group_variable: @@ -312,7 +312,7 @@ group: "{{ gitlab_group_name }}" vars: ACCESS_KEY_ID: changed - purge: False + purge: false register: gitlab_group_variable_state - name: edit one variable state must be changed @@ -332,7 +332,7 @@ group: "{{ gitlab_group_name }}" vars: some: value - purge: False + purge: false register: gitlab_group_variable_state - name: append one variable state must be changed @@ -372,7 +372,7 @@ group: "{{ gitlab_group_name }}" vars: some: value - purge: True + purge: true register: gitlab_group_variable_state - name: set one variables and purge all others state must be changed @@ -391,7 +391,7 @@ group: "{{ gitlab_group_name }}" vars: some: value - purge: False + purge: false register: gitlab_group_variable_state - name: only one variable is left state must not be changed @@ -411,7 +411,7 @@ group: "{{ gitlab_group_name }}" vars: some: 42 - purge: False + purge: false register: gitlab_group_variable_state - name: only one variable is left state must be changed @@ -430,7 +430,7 @@ group: "{{ gitlab_group_name }}" vars: some: 42.23 - purge: False + purge: false register: gitlab_group_variable_state - name: only one variable is left state must be changed @@ -471,7 +471,7 @@ - name: my_test_var value: my_test_value variable_type: file - purge: False + purge: false register: gitlab_group_variable_state - name: append one variable state must be changed @@ -562,7 +562,7 @@ page1_var18: value page1_var19: value page1_var20: value - purge: True + purge: true register: gitlab_group_variable_state - name: complete page added state must be changed @@ -598,7 +598,7 @@ page2_var18: value page2_var19: value page2_var20: value - purge: False + purge: false register: gitlab_group_variable_state - name: existing page untouched state must be changed @@ -613,7 +613,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" group: "{{ gitlab_group_name }}" - purge: True + purge: true register: gitlab_group_variable_state - name: check that no variables are untouched state must be changed @@ -630,7 +630,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" group: "{{ gitlab_group_name }}" - purge: True + purge: true variables: - name: SECRET_ACCESS_KEY value: 3214cbad @@ -678,7 +678,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" group: "{{ gitlab_group_name }}" - purge: True + purge: true variables: - name: delete_me value: ansible diff --git a/tests/integration/targets/gitlab_hook/tasks/main.yml b/tests/integration/targets/gitlab_hook/tasks/main.yml index 410af63e9f..aa06f6c815 100644 --- a/tests/integration/targets/gitlab_hook/tasks/main.yml +++ b/tests/integration/targets/gitlab_hook/tasks/main.yml @@ -16,7 +16,7 @@ - name: Create {{ gitlab_project_name }} gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" state: present diff --git a/tests/integration/targets/gitlab_project/tasks/main.yml b/tests/integration/targets/gitlab_project/tasks/main.yml index 611d6548f6..0a9e47188b 100644 --- a/tests/integration/targets/gitlab_project/tasks/main.yml +++ b/tests/integration/targets/gitlab_project/tasks/main.yml @@ -16,7 +16,7 @@ - name: Clean up {{ gitlab_project_name }} gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" state: absent @@ -24,10 +24,10 @@ - name: Create {{ gitlab_project_name }} gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" - initialize_with_readme: True + initialize_with_readme: true state: present register: gitlab_project_state @@ -38,7 +38,7 @@ - name: Create {{ gitlab_project_name }} (Test idempotency) gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" state: present diff --git a/tests/integration/targets/gitlab_project_badge/tasks/main.yml b/tests/integration/targets/gitlab_project_badge/tasks/main.yml index dfd0bee75b..efc090ef7d 100644 --- a/tests/integration/targets/gitlab_project_badge/tasks/main.yml +++ b/tests/integration/targets/gitlab_project_badge/tasks/main.yml @@ -16,17 +16,17 @@ - name: Create {{ gitlab_project_name }} gitlab_project: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" name: "{{ gitlab_project_name }}" - initialize_with_readme: True + initialize_with_readme: true state: present - name: Create Badge (check) check_mode: true gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: present @@ -46,7 +46,7 @@ - name: Create Badge gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: present @@ -66,7 +66,7 @@ - name: Create Badge (confirmation) gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: present @@ -87,7 +87,7 @@ check_mode: true gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: present @@ -107,7 +107,7 @@ - name: Update Badge gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: present @@ -127,7 +127,7 @@ - name: Update Badge (confirmation) gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: present @@ -148,7 +148,7 @@ check_mode: true gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: absent @@ -168,7 +168,7 @@ - name: Delete Badge gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: absent @@ -188,7 +188,7 @@ - name: Delete Badge (confirmation) gitlab_project_badge: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" project: "{{ gitlab_project_name }}" state: absent @@ -208,7 +208,7 @@ - name: Clean up {{ gitlab_project_name }} gitlab_project: api_url: "{{ gitlab_api_url }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_api_token }}" name: "{{ gitlab_project_name }}" state: absent diff --git a/tests/integration/targets/gitlab_project_variable/tasks/main.yml b/tests/integration/targets/gitlab_project_variable/tasks/main.yml index c82671aeae..0645da0fd1 100644 --- a/tests/integration/targets/gitlab_project_variable/tasks/main.yml +++ b/tests/integration/targets/gitlab_project_variable/tasks/main.yml @@ -18,7 +18,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" project: "{{ gitlab_project_name }}" - purge: True + purge: true - name: add a variable value in check_mode gitlab_project_variable: @@ -73,7 +73,7 @@ vars: ACCESS_KEY_ID: value: checkmode - protected: True + protected: true register: gitlab_project_variable_state - name: state must be changed @@ -89,7 +89,7 @@ vars: ACCESS_KEY_ID: value: checkmode - protected: False + protected: false register: gitlab_project_variable_state - name: state must be changed @@ -105,7 +105,7 @@ vars: ACCESS_KEY_ID: value: checkmode - masked: True + masked: true register: gitlab_project_variable_state - name: state must be changed @@ -151,8 +151,8 @@ vars: ACCESS_KEY_ID: value: checkmode - masked: True - protected: True + masked: true + protected: true variable_type: env_var register: gitlab_project_variable_state @@ -169,8 +169,8 @@ vars: ACCESS_KEY_ID: value: checkmode - masked: True - protected: True + masked: true + protected: true variable_type: env_var register: gitlab_project_variable_state @@ -187,7 +187,7 @@ vars: ACCESS_KEY_ID: value: checkmode - protected: False + protected: false register: gitlab_project_variable_state - name: state must be changed @@ -261,7 +261,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" project: "{{ gitlab_project_name }}" - purge: True + purge: true - name: set two test variables gitlab_project_variable: @@ -308,7 +308,7 @@ project: "{{ gitlab_project_name }}" vars: ACCESS_KEY_ID: changed - purge: False + purge: false register: gitlab_project_variable_state - name: edit one variable state must be changed @@ -328,7 +328,7 @@ project: "{{ gitlab_project_name }}" vars: some: value - purge: False + purge: false register: gitlab_project_variable_state - name: append one variable state must be changed @@ -368,7 +368,7 @@ project: "{{ gitlab_project_name }}" vars: some: value - purge: True + purge: true register: gitlab_project_variable_state - name: set one variables and purge all others state must be changed @@ -387,7 +387,7 @@ project: "{{ gitlab_project_name }}" vars: some: value - purge: False + purge: false register: gitlab_project_variable_state - name: only one variable is left state must not be changed @@ -407,7 +407,7 @@ project: "{{ gitlab_project_name }}" vars: some: 42 - purge: False + purge: false register: gitlab_project_variable_state - name: only one variable is left state must be changed @@ -426,7 +426,7 @@ project: "{{ gitlab_project_name }}" vars: some: 42.23 - purge: False + purge: false register: gitlab_project_variable_state - name: only one variable is left state must be changed @@ -467,7 +467,7 @@ - name: my_test_var value: my_test_value variable_type: file - purge: False + purge: false register: gitlab_project_variable_state - name: append one variable state must be changed @@ -559,7 +559,7 @@ page1_var18: value page1_var19: value page1_var20: value - purge: True + purge: true register: gitlab_project_variable_state - name: complete page added state must be changed @@ -595,7 +595,7 @@ page2_var18: value page2_var19: value page2_var20: value - purge: False + purge: false register: gitlab_project_variable_state - name: existing page untouched state must be changed @@ -610,7 +610,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" project: "{{ gitlab_project_name }}" - purge: True + purge: true register: gitlab_project_variable_state - name: check that no variables are untouched state must be changed @@ -627,7 +627,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" project: "{{ gitlab_project_name }}" - purge: True + purge: true variables: - name: SECRET_ACCESS_KEY value: 3214cbad @@ -673,7 +673,7 @@ api_url: "{{ gitlab_host }}" api_token: "{{ gitlab_login_token }}" project: "{{ gitlab_project_name }}" - purge: True + purge: true variables: - name: delete_me value: ansible diff --git a/tests/integration/targets/gitlab_runner/tasks/main.yml b/tests/integration/targets/gitlab_runner/tasks/main.yml index e4529f8ffc..467e918c24 100644 --- a/tests/integration/targets/gitlab_runner/tasks/main.yml +++ b/tests/integration/targets/gitlab_runner/tasks/main.yml @@ -16,7 +16,7 @@ - name: Create {{ gitlab_project_name }} gitlab_project: server_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false login_token: "{{ gitlab_login_token }}" name: "{{ gitlab_project_name }}" state: present diff --git a/tests/integration/targets/gitlab_user/tasks/main.yml b/tests/integration/targets/gitlab_user/tasks/main.yml index 1f16074f70..e8c1ec360a 100644 --- a/tests/integration/targets/gitlab_user/tasks/main.yml +++ b/tests/integration/targets/gitlab_user/tasks/main.yml @@ -32,7 +32,7 @@ name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" password: "{{ gitlab_user_pass }}" - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -49,7 +49,7 @@ name: ansible_test_user username: ansible_test_user password: Secr3tPassw00rd - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state_again @@ -68,7 +68,7 @@ name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" isadmin: true - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -86,7 +86,7 @@ name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" isadmin: true - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -104,7 +104,7 @@ name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" isadmin: false - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -122,8 +122,8 @@ email: foo@bar.baz name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" - confirm: True - validate_certs: False + confirm: true + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -141,7 +141,7 @@ name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" confirm: false - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -159,7 +159,7 @@ name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" confirm: false - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -177,7 +177,7 @@ name: "{{ gitlab_user }}" username: "{{ gitlab_user }}" confirm: false - validate_certs: False + validate_certs: false api_token: "{{ gitlab_login_token }}" state: present register: gitlab_user_state @@ -192,7 +192,7 @@ - name: Update User Test => Change User Password gitlab_user: api_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false # note: the only way to check if a password really is what it is expected # to be is to use it for login, so we use it here instead of the @@ -218,7 +218,7 @@ - name: Update User Test => Reset User Password gitlab_user: api_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false api_username: "{{ gitlab_user }}" api_password: new-super-password @@ -238,7 +238,7 @@ - name: Update User Test => Check that password was reset gitlab_user: api_url: "{{ gitlab_host }}" - validate_certs: False + validate_certs: false api_username: "{{ gitlab_user }}" api_password: "{{ gitlab_user_pass }}" diff --git a/tests/integration/targets/hwc_vpc_eip/tasks/main.yml b/tests/integration/targets/hwc_vpc_eip/tasks/main.yml index bbcefcaa62..f830f951f8 100644 --- a/tests/integration/targets/hwc_vpc_eip/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_eip/tasks/main.yml @@ -19,7 +19,7 @@ hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" state: present @@ -177,7 +177,7 @@ hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" state: absent diff --git a/tests/integration/targets/hwc_vpc_port/tasks/main.yml b/tests/integration/targets/hwc_vpc_port/tasks/main.yml index bb8cf81b0b..93b17398f5 100644 --- a/tests/integration/targets/hwc_vpc_port/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_port/tasks/main.yml @@ -19,7 +19,7 @@ hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" state: present @@ -128,7 +128,7 @@ hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" state: absent diff --git a/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml b/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml index 25972d7e9f..6accdb8550 100644 --- a/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_private_ip/tasks/main.yml @@ -19,7 +19,7 @@ hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" state: present @@ -129,7 +129,7 @@ hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" state: absent diff --git a/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml b/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml index 2eb7980b34..522ffb6011 100644 --- a/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml +++ b/tests/integration/targets/hwc_vpc_subnet/tasks/main.yml @@ -21,7 +21,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: absent #---------------------------------------------------------- - name: create a subnet (check mode) @@ -30,7 +30,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: present check_mode: true register: result @@ -46,7 +46,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: present register: result - name: assert changed is true @@ -60,7 +60,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: present check_mode: true register: result @@ -75,7 +75,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: present register: result - name: assert changed is false @@ -90,7 +90,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: absent check_mode: true register: result @@ -105,7 +105,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: absent register: result - name: assert changed is true @@ -119,7 +119,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: absent check_mode: true register: result @@ -134,7 +134,7 @@ cidr: "192.168.100.0/26" gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" - dhcp_enable: True + dhcp_enable: true state: absent register: result - name: assert changed is false diff --git a/tests/integration/targets/iso_create/tasks/main.yml b/tests/integration/targets/iso_create/tasks/main.yml index a719e91d8e..b6bd930354 100644 --- a/tests/integration/targets/iso_create/tasks/main.yml +++ b/tests/integration/targets/iso_create/tasks/main.yml @@ -149,7 +149,7 @@ src_files: - "{{ remote_tmp_dir }}/test1.cfg" dest_iso: "{{ output_test_dir }}/test5.iso" - udf: True + udf: true register: iso_result - debug: var=iso_result diff --git a/tests/integration/targets/iso_customize/tasks/main.yml b/tests/integration/targets/iso_customize/tasks/main.yml index 5745b1a8ad..dafd84dd54 100644 --- a/tests/integration/targets/iso_customize/tasks/main.yml +++ b/tests/integration/targets/iso_customize/tasks/main.yml @@ -61,7 +61,7 @@ - "{{ test_dir }}/test01.cfg" - "{{ test_dir }}/test02.cfg" dest_iso: "{{ test_dir }}/test.iso" - udf: True + udf: true - include_tasks: iso_customize.yml vars: diff --git a/tests/integration/targets/iso_extract/tasks/7zip.yml b/tests/integration/targets/iso_extract/tasks/7zip.yml index b16f202398..e0f1586ce1 100644 --- a/tests/integration/targets/iso_extract/tasks/7zip.yml +++ b/tests/integration/targets/iso_extract/tasks/7zip.yml @@ -51,4 +51,4 @@ # Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a # proper solution can be found environment: - HOMEBREW_NO_AUTO_UPDATE: True + HOMEBREW_NO_AUTO_UPDATE: "True" diff --git a/tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml b/tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml index e4625cb06e..1a897ad9af 100644 --- a/tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml +++ b/tests/integration/targets/keycloak_user_rolemapping/tasks/main.yml @@ -20,7 +20,7 @@ auth_password: "{{ admin_password }}" realm: "{{ realm }}" client_id: "{{ client_id }}" - service_accounts_enabled: True + service_accounts_enabled: true state: present register: client diff --git a/tests/integration/targets/locale_gen/tasks/locale_gen.yml b/tests/integration/targets/locale_gen/tasks/locale_gen.yml index ea042796f7..c6bdcc046b 100644 --- a/tests/integration/targets/locale_gen/tasks/locale_gen.yml +++ b/tests/integration/targets/locale_gen/tasks/locale_gen.yml @@ -6,7 +6,7 @@ - name: Is the locale we're going to test against installed? shell: locale -a | grep pt_BR register: initial_state - ignore_errors: True + ignore_errors: true - name: Make sure the locale is not installed locale_gen: @@ -16,7 +16,7 @@ - name: Is the locale present? shell: locale -a | grep pt_BR register: cleaned - ignore_errors: True + ignore_errors: true - name: Make sure the locale is not present assert: @@ -32,7 +32,7 @@ - name: Is the locale present? shell: locale -a | grep pt_BR register: post_check_output - ignore_errors: True + ignore_errors: true - name: Make sure the locale is present and we say we installed it assert: @@ -49,7 +49,7 @@ - name: Is the locale present? shell: locale -a | grep pt_BR register: post_check_output - ignore_errors: True + ignore_errors: true - name: Make sure the locale is present and we reported no change assert: @@ -66,7 +66,7 @@ - name: Is the locale present? shell: locale -a | grep pt_BR register: post_check_output - ignore_errors: True + ignore_errors: true - name: Make sure the locale is absent and we reported a change assert: @@ -83,7 +83,7 @@ - name: Is the locale present? shell: locale -a | grep pt_BR register: post_check_output - ignore_errors: True + ignore_errors: true - name: Make sure the locale is absent and we reported no change assert: diff --git a/tests/integration/targets/lookup_passwordstore/tasks/package.yml b/tests/integration/targets/lookup_passwordstore/tasks/package.yml index 3623101c86..e5ccd5677d 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/package.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/package.yml @@ -81,4 +81,4 @@ # Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a # proper solution can be found environment: - HOMEBREW_NO_AUTO_UPDATE: True + HOMEBREW_NO_AUTO_UPDATE: "True" diff --git a/tests/integration/targets/odbc/tasks/main.yml b/tests/integration/targets/odbc/tasks/main.yml index cdc925df69..ce55ea8aa2 100644 --- a/tests/integration/targets/odbc/tasks/main.yml +++ b/tests/integration/targets/odbc/tasks/main.yml @@ -53,7 +53,7 @@ - name: Create a user to run the tests with shell: echo "CREATE USER {{ my_user }} SUPERUSER PASSWORD '{{ my_pass }}'" | psql postgres become_user: "{{ pg_user }}" - become: True + become: true - name: Create a table odbc: @@ -68,7 +68,7 @@ len interval hour to minute ); become_user: "{{ pg_user }}" - become: True + become: true register: results - assert: @@ -83,7 +83,7 @@ dsn: "{{ dsn }}" query: "INSERT INTO films (code, title, did, date_prod, kind, len) VALUES ('asdfg', 'My First Movie', 1, '2019-01-12', 'SyFi', '02:00')" become_user: "{{ pg_user }}" - become: True + become: true register: results - assert: @@ -102,7 +102,7 @@ - 'Comedy' - '01:30' become_user: "{{ pg_user }}" - become: True + become: true register: results - assert: @@ -135,7 +135,7 @@ - 'asdfg' - 'qwert' register: results - changed_when: False + changed_when: false - assert: that: diff --git a/tests/integration/targets/odbc/tasks/negative_tests.yml b/tests/integration/targets/odbc/tasks/negative_tests.yml index 56b7a9b824..f779e6a53a 100644 --- a/tests/integration/targets/odbc/tasks/negative_tests.yml +++ b/tests/integration/targets/odbc/tasks/negative_tests.yml @@ -16,7 +16,7 @@ dsn: "t1" query: "SELECT * FROM nothing" register: results - ignore_errors: True + ignore_errors: true - assert: that: diff --git a/tests/integration/targets/odbc/tasks/no_pyodbc.yml b/tests/integration/targets/odbc/tasks/no_pyodbc.yml index 417549b63f..3a52d85a10 100644 --- a/tests/integration/targets/odbc/tasks/no_pyodbc.yml +++ b/tests/integration/targets/odbc/tasks/no_pyodbc.yml @@ -7,7 +7,7 @@ odbc: dsn: "Test" query: "SELECT * FROM nothing" - ignore_errors: True + ignore_errors: true register: results - assert: diff --git a/tests/integration/targets/osx_defaults/tasks/main.yml b/tests/integration/targets/osx_defaults/tasks/main.yml index c3cb09d394..f7bcb89446 100644 --- a/tests/integration/targets/osx_defaults/tasks/main.yml +++ b/tests/integration/targets/osx_defaults/tasks/main.yml @@ -185,8 +185,8 @@ - { type: 'int', value: 1, key: 'sample_int'} - { type: 'integer', value: 1, key: 'sample_int_2'} - { type: 'integer', value: -1, key: 'negative_int'} - - { type: 'bool', value: True, key: 'sample_bool'} - - { type: 'boolean', value: True, key: 'sample_bool_2'} + - { type: 'bool', value: true, key: 'sample_bool'} + - { type: 'boolean', value: true, key: 'sample_bool_2'} - { type: 'date', value: "2019-02-19 10:10:10", key: 'sample_date'} - { type: 'float', value: 1.2, key: 'sample_float'} - { type: 'string', value: 'sample', key: 'sample_string'} diff --git a/tests/integration/targets/pacman/tasks/package_urls.yml b/tests/integration/targets/pacman/tasks/package_urls.yml index 8cd4ddc01d..4df5312855 100644 --- a/tests/integration/targets/pacman/tasks/package_urls.yml +++ b/tests/integration/targets/pacman/tasks/package_urls.yml @@ -66,14 +66,14 @@ - '{{reg_pkg}}' - '{{url_pkg_url}}' - '{{file_pkg_path}}' - check_mode: True + check_mode: true register: install_1 - name: Install packages from url (check mode, cached) pacman: name: - '{{url_pkg_url}}' - check_mode: True + check_mode: true register: install_1c - name: Delete cached {{url_pkg}} file: @@ -141,14 +141,14 @@ - '{{reg_pkg}}' - '{{url_pkg_url}}' - '{{file_pkg_path}}' - check_mode: True + check_mode: true register: uninstall_1 - name: Uninstall packages - url (check mode, cached) pacman: state: absent name: - '{{url_pkg_url}}' - check_mode: True + check_mode: true register: uninstall_1c - name: Delete cached {{url_pkg}} file: diff --git a/tests/integration/targets/pacman/tasks/reason.yml b/tests/integration/targets/pacman/tasks/reason.yml index 3e7f2e11e4..5a26e3e100 100644 --- a/tests/integration/targets/pacman/tasks/reason.yml +++ b/tests/integration/targets/pacman/tasks/reason.yml @@ -41,7 +41,7 @@ - '{{url_pkg_url.stdout}}' - '{{file_pkg_path}}' reason: dependency - check_mode: True + check_mode: true register: install_1 - name: Install packages from mixed sources as explicit diff --git a/tests/integration/targets/proxmox/tasks/main.yml b/tests/integration/targets/proxmox/tasks/main.yml index 437ccad60e..22d7fcd294 100644 --- a/tests/integration/targets/proxmox/tasks/main.yml +++ b/tests/integration/targets/proxmox/tasks/main.yml @@ -285,7 +285,7 @@ interface: net5 bridge: vmbr0 tag: 24 - firewall: True + firewall: true register: results - assert: diff --git a/tests/integration/targets/rundeck/tasks/main.yml b/tests/integration/targets/rundeck/tasks/main.yml index 0c7e5bd09d..e42780b9b7 100644 --- a/tests/integration/targets/rundeck/tasks/main.yml +++ b/tests/integration/targets/rundeck/tasks/main.yml @@ -105,7 +105,7 @@ job_id: "{{ rundeck_job_id }}" job_options: sleep: "5" - wait_execution: False + wait_execution: false register: rundeck_job_run_forget - name: Assert that Rundeck job test_job is running diff --git a/tests/integration/targets/sefcontext/tasks/sefcontext.yml b/tests/integration/targets/sefcontext/tasks/sefcontext.yml index 9d6e7d1f70..258f1ace91 100644 --- a/tests/integration/targets/sefcontext/tasks/sefcontext.yml +++ b/tests/integration/targets/sefcontext/tasks/sefcontext.yml @@ -111,7 +111,7 @@ path: /tmp/foo substitute: /home state: present - reload: no + reload: false register: subst_first - assert: @@ -124,7 +124,7 @@ path: /tmp/foo substitute: /home state: present - reload: no + reload: false register: subst_second - assert: @@ -137,7 +137,7 @@ path: /tmp/foo substitute: /boot state: present - reload: no + reload: false register: subst_third - assert: @@ -150,7 +150,7 @@ path: /tmp/foo substitute: /boot state: present - reload: no + reload: false register: subst_fourth - assert: @@ -163,7 +163,7 @@ path: /tmp/foo substitute: /dev state: absent - reload: no + reload: false register: subst_fifth - assert: @@ -176,7 +176,7 @@ path: /tmp/foo substitute: /boot state: absent - reload: no + reload: false register: subst_sixth - assert: @@ -189,7 +189,7 @@ path: /tmp/foo substitute: /boot state: absent - reload: no + reload: false register: subst_seventh - assert: @@ -202,7 +202,7 @@ path: /tmp/foo substitute: /home state: present - reload: no + reload: false register: subst_eighth - assert: @@ -214,7 +214,7 @@ sefcontext: path: /tmp/foo state: absent - reload: no + reload: false register: subst_ninth - assert: @@ -225,7 +225,7 @@ sefcontext: path: /tmp/foo state: absent - reload: no + reload: false register: subst_tenth - assert: diff --git a/tests/integration/targets/setup_openldap/tasks/main.yml b/tests/integration/targets/setup_openldap/tasks/main.yml index 67f6d5c9c2..25077de166 100644 --- a/tests/integration/targets/setup_openldap/tasks/main.yml +++ b/tests/integration/targets/setup_openldap/tasks/main.yml @@ -14,25 +14,25 @@ include_vars: '{{ ansible_os_family }}.yml' - name: Install OpenLDAP server and tools - become: True + become: true package: name: '{{ item }}' loop: '{{ openldap_packages_name }}' - name: Install python-ldap (Python 3) - become: True + become: true package: name: '{{ python_ldap_package_name_python3 }}' when: ansible_python_version is version('3.0', '>=') - name: Install python-ldap (Python 2) - become: True + become: true package: name: '{{ python_ldap_package_name }}' when: ansible_python_version is version('3.0', '<') - name: Make sure OpenLDAP service is stopped - become: True + become: true shell: 'cat /var/run/slapd/slapd.pid | xargs -r kill -9 ' - name: Debconf @@ -45,14 +45,14 @@ creates: "/root/slapd_configured" - name: Start OpenLDAP service - become: True + become: true service: name: '{{ openldap_service_name }}' - enabled: True + enabled: true state: started - name: Copy initial config ldif file - become: True + become: true copy: src: 'files/{{ item }}' dest: '/tmp/{{ item }}' @@ -67,6 +67,6 @@ shell: "ldapmodify -Y EXTERNAL -H ldapi:/// -f /tmp/rootpw_cnconfig.ldif" - name: Add initial config - become: True + become: true shell: 'ldapadd -H ldapi:/// -x -D "cn=admin,dc=example,dc=com" -w Test1234! -f /tmp/initial_config.ldif' when: ansible_os_family in ['Ubuntu', 'Debian'] diff --git a/tests/integration/targets/setup_openssl/tasks/main.yml b/tests/integration/targets/setup_openssl/tasks/main.yml index 2ce926ba54..b8e003710a 100644 --- a/tests/integration/targets/setup_openssl/tasks/main.yml +++ b/tests/integration/targets/setup_openssl/tasks/main.yml @@ -22,7 +22,7 @@ - vars - name: Install OpenSSL - become: True + become: true package: name: '{{ openssl_package_name }}' when: not ansible_os_family == 'Darwin' @@ -49,13 +49,13 @@ when: cryptography_from_pip - name: Install pyOpenSSL (Python 3) - become: True + become: true package: name: '{{ pyopenssl_package_name_python3 }}' when: pyopenssl_package_name_python3 is defined and ansible_python_version is version('3.0', '>=') - name: Install pyOpenSSL (Python 2) - become: True + become: true package: name: '{{ pyopenssl_package_name }}' when: pyopenssl_package_name is defined and ansible_python_version is version('3.0', '<') diff --git a/tests/integration/targets/zypper/tasks/zypper.yml b/tests/integration/targets/zypper/tasks/zypper.yml index 9e840676e9..3eefddbdfc 100644 --- a/tests/integration/targets/zypper/tasks/zypper.yml +++ b/tests/integration/targets/zypper/tasks/zypper.yml @@ -22,7 +22,7 @@ - name: check hello with rpm shell: rpm -q hello - failed_when: False + failed_when: false register: rpm_result - debug: var=zypper_result @@ -55,7 +55,7 @@ - name: check hello with rpm shell: rpm -q hello - failed_when: False + failed_when: false register: rpm_result - debug: var=zypper_result @@ -91,12 +91,12 @@ - name: check hello with rpm shell: rpm -q hello - failed_when: False + failed_when: false register: rpm_hello_result - name: check metamail with rpm shell: rpm -q metamail - failed_when: False + failed_when: false register: rpm_metamail_result - name: verify packages uninstalled @@ -115,12 +115,12 @@ - name: check hello with rpm shell: rpm -q hello - failed_when: False + failed_when: false register: rpm_hello_result - name: check metamail with rpm shell: rpm -q metamail - failed_when: False + failed_when: false register: rpm_metamail_result - name: verify packages installed @@ -224,7 +224,7 @@ - name: check empty with rpm shell: rpm -q empty - failed_when: False + failed_when: false register: rpm_result - name: verify installation of empty @@ -406,15 +406,15 @@ zypper: name: hello state: present - update_cache: True + update_cache: true register: zypper_result_update_cache - name: run updatecache in check mode zypper: name: hello state: present - update_cache: True - check_mode: True + update_cache: true + check_mode: true register: zypper_result_update_cache_check From 6cf674485ff85c46ce7fd1464ac4f71a22e93aa0 Mon Sep 17 00:00:00 2001 From: Daniel Patrick Date: Wed, 8 Mar 2023 07:54:36 +0100 Subject: [PATCH 0524/2104] memset*.py: Fixed URLError handling (#6114) * memset.py: Added URLError exception and stderr to Response() object * memset_*.py: Check response.status_code and response.stderr * Added changelog fragment * memset.py: Fixed pep8 * Renamed changelog fragment with .yml file extension --- changelogs/fragments/6114-memset-add-url-error-handling.yml | 2 ++ plugins/module_utils/memset.py | 5 +++++ plugins/modules/memset_dns_reload.py | 5 ++++- plugins/modules/memset_memstore_info.py | 5 ++++- plugins/modules/memset_server_info.py | 5 ++++- plugins/modules/memset_zone.py | 3 +++ plugins/modules/memset_zone_domain.py | 5 ++++- plugins/modules/memset_zone_record.py | 5 ++++- 8 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/6114-memset-add-url-error-handling.yml diff --git a/changelogs/fragments/6114-memset-add-url-error-handling.yml b/changelogs/fragments/6114-memset-add-url-error-handling.yml new file mode 100644 index 0000000000..25dd869d19 --- /dev/null +++ b/changelogs/fragments/6114-memset-add-url-error-handling.yml @@ -0,0 +1,2 @@ +bugfixes: + - "memset - fix memset urlerror handling (https://github.com/ansible-collections/community.general/pull/6114)." diff --git a/plugins/module_utils/memset.py b/plugins/module_utils/memset.py index 671a8de308..374b40ff44 100644 --- a/plugins/module_utils/memset.py +++ b/plugins/module_utils/memset.py @@ -26,6 +26,7 @@ class Response(object): def __init__(self): self.content = None self.status_code = None + self.stderr = None def json(self): return json.loads(self.content) @@ -75,6 +76,10 @@ def memset_api_call(api_key, api_method, payload=None): msg = "Memset API returned a {0} response ({1}, {2})." . format(response.status_code, response.json()['error_type'], response.json()['error']) else: msg = "Memset API returned an error ({0}, {1})." . format(response.json()['error_type'], response.json()['error']) + except urllib_error.URLError as e: + has_failed = True + msg = "An URLError occured ({0})." . format(type(e)) + response.stderr = "{0}" . format(e) if msg is None: msg = response.json() diff --git a/plugins/modules/memset_dns_reload.py b/plugins/modules/memset_dns_reload.py index c69df6d783..a1168724f5 100644 --- a/plugins/modules/memset_dns_reload.py +++ b/plugins/modules/memset_dns_reload.py @@ -139,7 +139,10 @@ def reload_dns(args=None): # manifest themselves at this point so we need to ensure the user is # informed of the reason. retvals['failed'] = has_failed - retvals['memset_api'] = response.json() + if response.status_code is not None: + retvals['memset_api'] = response.json() + else: + retvals['stderr'] = response.stderr retvals['msg'] = msg return retvals diff --git a/plugins/modules/memset_memstore_info.py b/plugins/modules/memset_memstore_info.py index 4ee7cfc2a5..5fc9d79e1f 100644 --- a/plugins/modules/memset_memstore_info.py +++ b/plugins/modules/memset_memstore_info.py @@ -134,7 +134,10 @@ def get_facts(args=None): # informed of the reason. retvals['failed'] = has_failed retvals['msg'] = msg - retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + if response.status_code is not None: + retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + else: + retvals['stderr'] = "{0}" . format(response.stderr) return retvals # we don't want to return the same thing twice diff --git a/plugins/modules/memset_server_info.py b/plugins/modules/memset_server_info.py index 9023c0f8f0..ecc0375eb1 100644 --- a/plugins/modules/memset_server_info.py +++ b/plugins/modules/memset_server_info.py @@ -259,7 +259,10 @@ def get_facts(args=None): # informed of the reason. retvals['failed'] = has_failed retvals['msg'] = msg - retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + if response.status_code is not None: + retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + else: + retvals['stderr'] = "{0}" . format(response.stderr) return retvals # we don't want to return the same thing twice diff --git a/plugins/modules/memset_zone.py b/plugins/modules/memset_zone.py index 738d9e16ba..e17472e395 100644 --- a/plugins/modules/memset_zone.py +++ b/plugins/modules/memset_zone.py @@ -264,6 +264,9 @@ def create_or_delete(args=None): retvals['failed'] = _has_failed retvals['msg'] = _msg + if response.stderr is not None: + retvals['stderr'] = response.stderr + return retvals zone_exists, _msg, counter, _zone_id = get_zone_id(zone_name=args['name'], current_zones=response.json()) diff --git a/plugins/modules/memset_zone_domain.py b/plugins/modules/memset_zone_domain.py index 26276f68a5..172a48be25 100644 --- a/plugins/modules/memset_zone_domain.py +++ b/plugins/modules/memset_zone_domain.py @@ -195,7 +195,10 @@ def create_or_delete_domain(args=None): # informed of the reason. retvals['failed'] = has_failed retvals['msg'] = msg - retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + if response.status_code is not None: + retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + else: + retvals['stderr'] = response.stderr return retvals zone_exists, msg, counter, zone_id = get_zone_id(zone_name=args['zone'], current_zones=response.json()) diff --git a/plugins/modules/memset_zone_record.py b/plugins/modules/memset_zone_record.py index 021ad461d2..4e56a11caf 100644 --- a/plugins/modules/memset_zone_record.py +++ b/plugins/modules/memset_zone_record.py @@ -313,7 +313,10 @@ def create_or_delete(args=None): # informed of the reason. retvals['failed'] = _has_failed retvals['msg'] = msg - retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + if response.status_code is not None: + retvals['stderr'] = "API returned an error: {0}" . format(response.status_code) + else: + retvals['stderr'] = response.stderr return retvals zone_exists, _msg, counter, zone_id = get_zone_id(zone_name=args['zone'], current_zones=response.json()) From 6d003ca7fcb0bca3cddb93d80de9cced26452803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= <39397510+cjeanner@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:16:45 +0100 Subject: [PATCH 0525/2104] [make] Improve module doc (#6161) This change reorder the parameters so that we get the mandatory one at the top, then alphabetically order the other bellow. It also adds the returned values. --- plugins/modules/make.py | 56 ++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/plugins/modules/make.py b/plugins/modules/make.py index be2a32bd45..ec19b367c3 100644 --- a/plugins/modules/make.py +++ b/plugins/modules/make.py @@ -25,15 +25,6 @@ attributes: diff_mode: support: none options: - target: - description: - - The target to run. - - Typically this would be something like C(install),C(test) or C(all)." - type: str - params: - description: - - Any extra parameters to pass to make. - type: dict chdir: description: - Change to this directory before running make. @@ -43,11 +34,6 @@ options: description: - Use a custom Makefile. type: path - make: - description: - - Use a specific make binary. - type: path - version_added: '0.2.0' jobs: description: - Set the number of make jobs to run concurrently. @@ -55,6 +41,20 @@ options: - This is not supported by all make implementations. type: int version_added: 2.0.0 + make: + description: + - Use a specific make binary. + type: path + version_added: '0.2.0' + params: + description: + - Any extra parameters to pass to make. + type: dict + target: + description: + - The target to run. + - Typically this would be something like C(install), C(test), or C(all). + type: str ''' EXAMPLES = r''' @@ -83,7 +83,33 @@ EXAMPLES = r''' file: /some-project/Makefile ''' -RETURN = r'''# ''' +RETURN = r''' +chdir: + description: + - The value of the module parameter I(chdir). + type: str + returned: success +file: + description: + - The value of the module parameter I(file). + type: str + returned: success +jobs: + description: + - The value of the module parameter I(jobs) + type: int + returned: success +params: + description: + - The value of the module parameter I(params) + type: dict + returned: success +target: + description: + - The value of the module parameter I(target) + type: str + returned: success +''' from ansible.module_utils.six import iteritems from ansible.module_utils.basic import AnsibleModule From 6b8a1cd8e68ea3571f973eed6f87a968d8217420 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 8 Mar 2023 22:46:09 +0100 Subject: [PATCH 0526/2104] Add macOS 13.2 to CI (#6166) Add macOS 13.2 to CI. --- .azure-pipelines/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index e3b0e8bdc4..fe31f4d650 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -191,8 +191,8 @@ stages: parameters: testFormat: devel/{0} targets: - - name: macOS 12.0 - test: macos/12.0 + - name: macOS 13.2 + test: macos/13.2 - name: RHEL 7.9 test: rhel/7.9 - name: RHEL 9.1 From abcba9dbbec79374dc0cdb9978f0622e74a60e48 Mon Sep 17 00:00:00 2001 From: Roman Belyakovsky Date: Thu, 9 Mar 2023 21:09:13 +0200 Subject: [PATCH 0527/2104] Interfaces file spaces fix (#6131) * interfaces_file: added test case for #6120 * interfaces_file: reverted code to #fafabed * interfaces_file: added changelog fragment * interfaces_file: added missing licenses * interfaces_file: improved test coverage * interfaces_file: fixed retrieving option values * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py Co-authored-by: Felix Fontein * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update plugins/modules/interfaces_file.py Co-authored-by: Felix Fontein * Update tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py Co-authored-by: Felix Fontein * interfaces_file: spacing fix --------- Co-authored-by: Felix Fontein --- ...-interfaces_file-for-no-leading-spaces.yml | 2 + plugins/modules/interfaces_file.py | 154 ++++++++----- .../no_leading_spaces.test_no_changes | 8 + .../no_leading_spaces.test_no_changes.json | 21 ++ ...eading_spaces.test_no_changes.json.license | 3 + .../no_leading_spaces.test_no_changes.license | 3 + .../no_leading_spaces_add_aggi_up | 8 + ..._leading_spaces_add_aggi_up.exceptions.txt | 8 + ..._spaces_add_aggi_up.exceptions.txt.license | 3 + .../no_leading_spaces_add_aggi_up.json | 21 ++ ...no_leading_spaces_add_aggi_up.json.license | 3 + .../no_leading_spaces_add_aggi_up.license | 3 + .../no_leading_spaces_add_aggi_up_twice | 8 + ...ng_spaces_add_aggi_up_twice.exceptions.txt | 17 ++ ...s_add_aggi_up_twice.exceptions.txt.license | 3 + .../no_leading_spaces_add_aggi_up_twice.json | 21 ++ ...ding_spaces_add_aggi_up_twice.json.license | 3 + ...o_leading_spaces_add_aggi_up_twice.license | 3 + .../no_leading_spaces_add_and_delete_aggi_up | 8 + ...aces_add_and_delete_aggi_up.exceptions.txt | 17 ++ ..._and_delete_aggi_up.exceptions.txt.license | 3 + ...leading_spaces_add_and_delete_aggi_up.json | 21 ++ ...spaces_add_and_delete_aggi_up.json.license | 3 + ...ding_spaces_add_and_delete_aggi_up.license | 3 + .../no_leading_spaces_aggi_remove_dup | 8 + ...ding_spaces_aggi_remove_dup.exceptions.txt | 17 ++ ...ces_aggi_remove_dup.exceptions.txt.license | 3 + .../no_leading_spaces_aggi_remove_dup.json | 21 ++ ...eading_spaces_aggi_remove_dup.json.license | 3 + .../no_leading_spaces_aggi_remove_dup.license | 3 + .../no_leading_spaces_change_ipv4 | 8 + ..._leading_spaces_change_ipv4.exceptions.txt | 0 ..._spaces_change_ipv4.exceptions.txt.license | 3 + .../no_leading_spaces_change_ipv4.json | 21 ++ ...no_leading_spaces_change_ipv4.json.license | 3 + .../no_leading_spaces_change_ipv4.license | 3 + .../no_leading_spaces_change_ipv4_post_up | 9 + ..._spaces_change_ipv4_post_up.exceptions.txt | 0 ...change_ipv4_post_up.exceptions.txt.license | 3 + ...no_leading_spaces_change_ipv4_post_up.json | 21 ++ ...ng_spaces_change_ipv4_post_up.json.license | 3 + ...leading_spaces_change_ipv4_post_up.license | 3 + .../no_leading_spaces_change_ipv4_pre_up | 9 + ...g_spaces_change_ipv4_pre_up.exceptions.txt | 0 ..._change_ipv4_pre_up.exceptions.txt.license | 3 + .../no_leading_spaces_change_ipv4_pre_up.json | 21 ++ ...ing_spaces_change_ipv4_pre_up.json.license | 3 + ..._leading_spaces_change_ipv4_pre_up.license | 3 + .../no_leading_spaces_change_ipv6 | 8 + ..._leading_spaces_change_ipv6.exceptions.txt | 9 + ..._spaces_change_ipv6.exceptions.txt.license | 3 + .../no_leading_spaces_change_ipv6.json | 21 ++ ...no_leading_spaces_change_ipv6.json.license | 3 + .../no_leading_spaces_change_ipv6.license | 3 + .../no_leading_spaces_change_ipv6_post_up | 8 + ..._spaces_change_ipv6_post_up.exceptions.txt | 9 + ...change_ipv6_post_up.exceptions.txt.license | 3 + ...no_leading_spaces_change_ipv6_post_up.json | 21 ++ ...ng_spaces_change_ipv6_post_up.json.license | 3 + ...leading_spaces_change_ipv6_post_up.license | 3 + .../no_leading_spaces_change_ipv6_pre_up | 8 + ...g_spaces_change_ipv6_pre_up.exceptions.txt | 9 + ..._change_ipv6_pre_up.exceptions.txt.license | 3 + .../no_leading_spaces_change_ipv6_pre_up.json | 21 ++ ...ing_spaces_change_ipv6_pre_up.json.license | 3 + ..._leading_spaces_change_ipv6_pre_up.license | 3 + .../no_leading_spaces_change_method | 8 + ...eading_spaces_change_method.exceptions.txt | 8 + ...paces_change_method.exceptions.txt.license | 3 + .../no_leading_spaces_change_method.json | 21 ++ ..._leading_spaces_change_method.json.license | 3 + .../no_leading_spaces_change_method.license | 3 + .../golden_output/no_leading_spaces_revert | 7 + .../no_leading_spaces_revert.exceptions.txt | 0 ...ading_spaces_revert.exceptions.txt.license | 3 + .../no_leading_spaces_revert.json | 21 ++ .../no_leading_spaces_revert.json.license | 3 + .../no_leading_spaces_revert.license | 3 + .../no_leading_spaces_set_aggi_and_eth0_mtu | 8 + ...paces_set_aggi_and_eth0_mtu.exceptions.txt | 8 + ...t_aggi_and_eth0_mtu.exceptions.txt.license | 3 + ..._leading_spaces_set_aggi_and_eth0_mtu.json | 21 ++ ..._spaces_set_aggi_and_eth0_mtu.json.license | 3 + ...ading_spaces_set_aggi_and_eth0_mtu.license | 3 + .../no_leading_spaces_set_aggi_slaves | 8 + ...ding_spaces_set_aggi_slaves.exceptions.txt | 8 + ...ces_set_aggi_slaves.exceptions.txt.license | 3 + .../no_leading_spaces_set_aggi_slaves.json | 21 ++ ...eading_spaces_set_aggi_slaves.json.license | 3 + .../no_leading_spaces_set_aggi_slaves.license | 3 + .../input/no_leading_spaces | 8 + .../input/no_leading_spaces.license | 3 + .../interfaces_file/test_interfaces_file.py | 213 +++++++++++++++++- 93 files changed, 995 insertions(+), 63 deletions(-) create mode 100644 changelogs/fragments/6131-fix-interfaces_file-for-no-leading-spaces.yml create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces.test_no_changes create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces.test_no_changes.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces.test_no_changes.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces.test_no_changes.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up_twice create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up_twice.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up_twice.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up_twice.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up_twice.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_aggi_up_twice.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_and_delete_aggi_up create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_and_delete_aggi_up.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_and_delete_aggi_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_and_delete_aggi_up.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_and_delete_aggi_up.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_add_and_delete_aggi_up.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_aggi_remove_dup create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_aggi_remove_dup.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_aggi_remove_dup.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_aggi_remove_dup.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_aggi_remove_dup.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_aggi_remove_dup.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4 create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_post_up create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_post_up.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_post_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_post_up.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_post_up.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_post_up.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_pre_up create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_pre_up.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_pre_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_pre_up.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_pre_up.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv4_pre_up.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6 create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_post_up create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_post_up.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_post_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_post_up.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_post_up.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_post_up.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_pre_up create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_pre_up.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_pre_up.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_pre_up.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_pre_up.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_ipv6_pre_up.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_method create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_method.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_method.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_method.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_method.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_change_method.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_revert create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_revert.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_revert.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_revert.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_revert.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_revert.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_and_eth0_mtu create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_and_eth0_mtu.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_and_eth0_mtu.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_and_eth0_mtu.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_and_eth0_mtu.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_and_eth0_mtu.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_slaves create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_slaves.exceptions.txt create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_slaves.exceptions.txt.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_slaves.json create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_slaves.json.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/no_leading_spaces_set_aggi_slaves.license create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/no_leading_spaces create mode 100644 tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/no_leading_spaces.license diff --git a/changelogs/fragments/6131-fix-interfaces_file-for-no-leading-spaces.yml b/changelogs/fragments/6131-fix-interfaces_file-for-no-leading-spaces.yml new file mode 100644 index 0000000000..c975d4e624 --- /dev/null +++ b/changelogs/fragments/6131-fix-interfaces_file-for-no-leading-spaces.yml @@ -0,0 +1,2 @@ +bugfixes: + - interfaces_file - fix reading options in lines not starting with a space (https://github.com/ansible-collections/community.general/issues/6120). diff --git a/plugins/modules/interfaces_file.py b/plugins/modules/interfaces_file.py index 8e643fb797..f19c019f4e 100644 --- a/plugins/modules/interfaces_file.py +++ b/plugins/modules/interfaces_file.py @@ -156,20 +156,22 @@ from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_bytes -def line_dict(line): +def lineDict(line): return {'line': line, 'line_type': 'unknown'} -def make_option_dict(line, iface, option, value, address_family): +def optionDict(line, iface, option, value, address_family): return {'line': line, 'iface': iface, 'option': option, 'value': value, 'line_type': 'option', 'address_family': address_family} -def get_option_value(line): - patt = re.compile(r'^\s+(?P