mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 02:16:50 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a87aa9e360 | ||
|
|
744c92ae0d | ||
|
|
5392e0f1cc | ||
|
|
d64e1e8e64 | ||
|
|
7d3f6be2a2 | ||
|
|
624c5f7b68 | ||
|
|
3db3608335 | ||
|
|
af4ac4813e | ||
|
|
5dc60cbc9e | ||
|
|
8f6ea3de8e | ||
|
|
e4765f2e2b | ||
|
|
a91255824e | ||
|
|
e60daa8509 | ||
|
|
fd2528dc3c | ||
|
|
72b282fe85 | ||
|
|
cb49b96b4d | ||
|
|
2aca1a910c | ||
|
|
c44f07a405 | ||
|
|
e113c8cf11 | ||
|
|
552e1e826c | ||
|
|
516107aaf6 |
@@ -72,6 +72,19 @@ stages:
|
||||
- test: 3
|
||||
- test: 4
|
||||
- test: extra
|
||||
- stage: Sanity_2_15
|
||||
displayName: Sanity 2.15
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Test {0}
|
||||
testFormat: 2.15/sanity/{0}
|
||||
targets:
|
||||
- test: 1
|
||||
- test: 2
|
||||
- test: 3
|
||||
- test: 4
|
||||
- stage: Sanity_2_14
|
||||
displayName: Sanity 2.14
|
||||
dependsOn: []
|
||||
@@ -129,6 +142,16 @@ stages:
|
||||
- test: 3.9
|
||||
- test: '3.10'
|
||||
- test: '3.11'
|
||||
- stage: Units_2_15
|
||||
displayName: Units 2.15
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.14/units/{0}/1
|
||||
targets:
|
||||
- test: "3.10"
|
||||
- stage: Units_2_14
|
||||
displayName: Units 2.14
|
||||
dependsOn: []
|
||||
@@ -138,7 +161,6 @@ stages:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.14/units/{0}/1
|
||||
targets:
|
||||
- test: 2.7
|
||||
- test: 3.9
|
||||
- stage: Units_2_13
|
||||
displayName: Units 2.13
|
||||
@@ -174,8 +196,6 @@ stages:
|
||||
targets:
|
||||
- name: macOS 13.2
|
||||
test: macos/13.2
|
||||
- name: RHEL 7.9
|
||||
test: rhel/7.9
|
||||
- name: RHEL 9.1
|
||||
test: rhel/9.1
|
||||
- name: FreeBSD 13.1
|
||||
@@ -186,6 +206,20 @@ stages:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- stage: Remote_2_15
|
||||
displayName: Remote 2.15
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.15/{0}
|
||||
targets:
|
||||
- name: RHEL 7.9
|
||||
test: rhel/7.9
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- stage: Remote_2_14
|
||||
displayName: Remote 2.14
|
||||
dependsOn: []
|
||||
@@ -246,8 +280,6 @@ stages:
|
||||
parameters:
|
||||
testFormat: devel/linux/{0}
|
||||
targets:
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: Fedora 37
|
||||
test: fedora37
|
||||
- name: openSUSE 15
|
||||
@@ -262,6 +294,20 @@ stages:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- stage: Docker_2_15
|
||||
displayName: Docker 2.15
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.15/linux/{0}
|
||||
targets:
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- stage: Docker_2_14
|
||||
displayName: Docker 2.14
|
||||
dependsOn: []
|
||||
@@ -345,6 +391,16 @@ stages:
|
||||
targets:
|
||||
- test: 2.7
|
||||
- test: '3.11'
|
||||
- stage: Generic_2_15
|
||||
displayName: Generic 2.14
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.14/generic/{0}/1
|
||||
targets:
|
||||
- test: 3.9
|
||||
- stage: Generic_2_14
|
||||
displayName: Generic 2.14
|
||||
dependsOn: []
|
||||
@@ -383,23 +439,28 @@ stages:
|
||||
- Sanity_2_12
|
||||
- Sanity_2_13
|
||||
- Sanity_2_14
|
||||
- Sanity_2_15
|
||||
- Units_devel
|
||||
- Units_2_12
|
||||
- Units_2_13
|
||||
- Units_2_14
|
||||
- Units_2_15
|
||||
- Remote_devel
|
||||
- Remote_2_12
|
||||
- Remote_2_13
|
||||
- Remote_2_14
|
||||
- Remote_2_15
|
||||
- Docker_devel
|
||||
- Docker_2_12
|
||||
- Docker_2_13
|
||||
- Docker_2_14
|
||||
- Docker_2_15
|
||||
- Docker_community_devel
|
||||
# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
|
||||
# - Generic_devel
|
||||
# - Generic_2_12
|
||||
# - Generic_2_13
|
||||
# - Generic_2_14
|
||||
# - Generic_2_15
|
||||
jobs:
|
||||
- template: templates/coverage.yml
|
||||
|
||||
@@ -6,6 +6,24 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 4.0.0.
|
||||
|
||||
v5.8.8
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- archive - reduce RAM usage by generating CRC32 checksum over chunks (https://github.com/ansible-collections/community.general/pull/6274).
|
||||
- flatpak - fixes idempotency detection issues. In some cases the module could fail to properly detect already existing Flatpaks because of a parameter witch only checks the installed apps (https://github.com/ansible-collections/community.general/pull/6289).
|
||||
- icinga2_host - fix the data structure sent to Icinga to make use of host templates and template vars (https://github.com/ansible-collections/community.general/pull/6286).
|
||||
- idrac_redfish_command - allow user to specify ``resource_id`` for ``CreateBiosConfigJob`` to specify an exact manager (https://github.com/ansible-collections/community.general/issues/2090).
|
||||
- ini_file - make ``section`` parameter not required so it is possible to pass ``null`` as a value. This only was possible in the past due to a bug in ansible-core that now has been fixed (https://github.com/ansible-collections/community.general/pull/6404).
|
||||
- rhsm_release - make ``release`` parameter not required so it is possible to pass ``null`` as a value. This only was possible in the past due to a bug in ansible-core that now has been fixed (https://github.com/ansible-collections/community.general/pull/6401).
|
||||
|
||||
v5.8.7
|
||||
======
|
||||
|
||||
|
||||
@@ -1561,3 +1561,30 @@ releases:
|
||||
- 6180-replace-deprecated-badzipfile.yml
|
||||
- 6227-xen-orchestra-check-response-id.yml
|
||||
release_date: '2023-03-27'
|
||||
5.8.8:
|
||||
changes:
|
||||
bugfixes:
|
||||
- archive - reduce RAM usage by generating CRC32 checksum over chunks (https://github.com/ansible-collections/community.general/pull/6274).
|
||||
- flatpak - fixes idempotency detection issues. In some cases the module could
|
||||
fail to properly detect already existing Flatpaks because of a parameter witch
|
||||
only checks the installed apps (https://github.com/ansible-collections/community.general/pull/6289).
|
||||
- icinga2_host - fix the data structure sent to Icinga to make use of host templates
|
||||
and template vars (https://github.com/ansible-collections/community.general/pull/6286).
|
||||
- idrac_redfish_command - allow user to specify ``resource_id`` for ``CreateBiosConfigJob``
|
||||
to specify an exact manager (https://github.com/ansible-collections/community.general/issues/2090).
|
||||
- ini_file - make ``section`` parameter not required so it is possible to pass
|
||||
``null`` as a value. This only was possible in the past due to a bug in ansible-core
|
||||
that now has been fixed (https://github.com/ansible-collections/community.general/pull/6404).
|
||||
- rhsm_release - make ``release`` parameter not required so it is possible to
|
||||
pass ``null`` as a value. This only was possible in the past due to a bug
|
||||
in ansible-core that now has been fixed (https://github.com/ansible-collections/community.general/pull/6401).
|
||||
release_summary: Regular bugfix release.
|
||||
fragments:
|
||||
- 2090-idrac-redfish-resource-id-fix.yml
|
||||
- 5.8.8.yml
|
||||
- 6199-archive-generate-checksum-in-chunks.yml
|
||||
- 6286-icinga2_host-template-and-template-vars.yml
|
||||
- 6289-bugfix-flatpak-check-if-already-installed.yml
|
||||
- 6401-rhsm_release-required.yml
|
||||
- 6404-ini_file-section.yml
|
||||
release_date: '2023-04-24'
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace: community
|
||||
name: general
|
||||
version: 5.8.7
|
||||
version: 5.8.8
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -601,7 +601,13 @@ class TarArchive(Archive):
|
||||
# The python implementations of gzip, bz2, and lzma do not support restoring compressed files
|
||||
# to their original names so only file checksum is returned
|
||||
f = self._open_compressed_file(_to_native_ascii(path), 'r')
|
||||
checksums = set([(b'', crc32(f.read()))])
|
||||
checksum = 0
|
||||
while True:
|
||||
chunk = f.read(16 * 1024 * 1024)
|
||||
if not chunk:
|
||||
break
|
||||
checksum = crc32(chunk, checksum)
|
||||
checksums = set([(b'', checksum)])
|
||||
f.close()
|
||||
except Exception:
|
||||
checksums = set()
|
||||
|
||||
@@ -35,10 +35,9 @@ options:
|
||||
description:
|
||||
- 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).
|
||||
- If left empty, being omitted, or being 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.
|
||||
type: str
|
||||
required: true
|
||||
option:
|
||||
description:
|
||||
- If set (required for changing a I(value)), this is the name of the option.
|
||||
@@ -423,7 +422,7 @@ def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
path=dict(type='path', required=True, aliases=['dest']),
|
||||
section=dict(type='str', required=True),
|
||||
section=dict(type='str'),
|
||||
option=dict(type='str'),
|
||||
value=dict(type='str'),
|
||||
values=dict(type='list', elements='str'),
|
||||
|
||||
@@ -250,9 +250,9 @@ def main():
|
||||
state = module.params["state"]
|
||||
name = module.params["name"]
|
||||
zone = module.params["zone"]
|
||||
template = [name]
|
||||
template = []
|
||||
if module.params["template"]:
|
||||
template.append(module.params["template"])
|
||||
template = [module.params["template"]]
|
||||
check_command = module.params["check_command"]
|
||||
ip = module.params["ip"]
|
||||
display_name = module.params["display_name"]
|
||||
@@ -267,20 +267,18 @@ def main():
|
||||
module.fail_json(msg="unable to connect to Icinga. Exception message: %s" % (e))
|
||||
|
||||
data = {
|
||||
'templates': template,
|
||||
'attrs': {
|
||||
'address': ip,
|
||||
'display_name': display_name,
|
||||
'check_command': check_command,
|
||||
'zone': zone,
|
||||
'vars': {
|
||||
'made_by': "ansible",
|
||||
},
|
||||
'templates': template,
|
||||
'vars.made_by': "ansible"
|
||||
}
|
||||
}
|
||||
|
||||
if variables:
|
||||
data['attrs']['vars'].update(variables)
|
||||
for key, value in variables.items():
|
||||
data['attrs']['vars.' + key] = value
|
||||
|
||||
changed = False
|
||||
if icinga.exists(name):
|
||||
|
||||
@@ -13,7 +13,8 @@ module: office_365_connector_card
|
||||
short_description: Use webhooks to create Connector Card messages within an Office 365 group
|
||||
description:
|
||||
- Creates Connector Card messages through
|
||||
- Office 365 Connectors U(https://dev.outlook.com/Connectors)
|
||||
Office 365 Connectors
|
||||
U(https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#connector-card-for-microsoft-365-groups).
|
||||
author: "Marc Sensenich (@marc-sensenich)"
|
||||
notes:
|
||||
- This module is not idempotent, therefore if the same task is run twice
|
||||
@@ -55,7 +56,7 @@ options:
|
||||
elements: dict
|
||||
description:
|
||||
- Contains a list of sections to display in the card.
|
||||
- For more information see https://dev.outlook.com/Connectors/reference.
|
||||
- For more information see U(https://learn.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#section-fields).
|
||||
'''
|
||||
|
||||
EXAMPLES = """
|
||||
|
||||
@@ -208,7 +208,7 @@ def uninstall_flat(module, binary, names, method):
|
||||
|
||||
def flatpak_exists(module, binary, names, method):
|
||||
"""Check if the flatpaks are installed."""
|
||||
command = [binary, "list", "--{0}".format(method), "--app"]
|
||||
command = [binary, "list", "--{0}".format(method)]
|
||||
output = _flatpak_command(module, False, command)
|
||||
installed = []
|
||||
not_installed = []
|
||||
|
||||
@@ -23,8 +23,8 @@ requirements:
|
||||
options:
|
||||
release:
|
||||
description:
|
||||
- RHSM release version to use (use null to unset)
|
||||
required: true
|
||||
- RHSM release version to use.
|
||||
- To unset either pass C(null) for this option, or omit this option.
|
||||
type: str
|
||||
author:
|
||||
- Sean Myers (@seandst)
|
||||
@@ -34,17 +34,17 @@ EXAMPLES = '''
|
||||
# Set release version to 7.1
|
||||
- name: Set RHSM release version
|
||||
community.general.rhsm_release:
|
||||
release: "7.1"
|
||||
release: "7.1"
|
||||
|
||||
# Set release version to 6Server
|
||||
- name: Set RHSM release version
|
||||
community.general.rhsm_release:
|
||||
release: "6Server"
|
||||
release: "6Server"
|
||||
|
||||
# Unset release version
|
||||
- name: Unset RHSM release release
|
||||
community.general.rhsm_release:
|
||||
release: null
|
||||
release: null
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
@@ -97,7 +97,7 @@ def set_release(module, release):
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
release=dict(type='str', required=True),
|
||||
release=dict(type='str'),
|
||||
),
|
||||
supports_check_mode=True
|
||||
)
|
||||
|
||||
@@ -192,7 +192,20 @@ def main():
|
||||
|
||||
if category == "Systems":
|
||||
# execute only if we find a System resource
|
||||
# NOTE: Currently overriding the usage of 'data_modification' due to
|
||||
# how 'resource_id' is processed. In the case of CreateBiosConfigJob,
|
||||
# we interact with BOTH systems and managers, so you currently cannot
|
||||
# specify a single 'resource_id' to make both '_find_systems_resource'
|
||||
# and '_find_managers_resource' return success. Since
|
||||
# CreateBiosConfigJob doesn't use the matched 'resource_id' for a
|
||||
# system regardless of what's specified, disabling the 'resource_id'
|
||||
# inspection for the next call allows a specific manager to be
|
||||
# specified with 'resource_id'. If we ever need to expand the input
|
||||
# to inspect a specific system and manager in parallel, this will need
|
||||
# updates.
|
||||
rf_utils.data_modification = False
|
||||
result = rf_utils._find_systems_resource()
|
||||
rf_utils.data_modification = True
|
||||
if result['ret'] is False:
|
||||
module.fail_json(msg=to_native(result['msg']))
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- name: install pycdlib
|
||||
pip:
|
||||
name: pycdlib
|
||||
# state: latest
|
||||
extra_args: "-c {{ remote_constraints }}"
|
||||
register: install_pycdlib
|
||||
- debug: var=install_pycdlib
|
||||
|
||||
@@ -17,16 +17,6 @@
|
||||
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'"
|
||||
|
||||
12
tests/integration/targets/parted/aliases
Normal file
12
tests/integration/targets/parted/aliases
Normal file
@@ -0,0 +1,12 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/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
|
||||
skip/aix
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/docker
|
||||
needs/root
|
||||
destructive
|
||||
14
tests/integration/targets/parted/handlers/main.yml
Normal file
14
tests/integration/targets/parted/handlers/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-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 loopback device
|
||||
command:
|
||||
cmd: losetup -d {{ losetup_name.stdout }}
|
||||
changed_when: true
|
||||
|
||||
- name: Remove file
|
||||
file:
|
||||
path: /bigfile
|
||||
state: absent
|
||||
86
tests/integration/targets/parted/tasks/main.yml
Normal file
86
tests/integration/targets/parted/tasks/main.yml
Normal file
@@ -0,0 +1,86 @@
|
||||
# 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
|
||||
|
||||
- name: Install parted
|
||||
package:
|
||||
name: parted
|
||||
state: present
|
||||
when: ansible_os_family == 'Alpine'
|
||||
|
||||
- name: Create empty file
|
||||
community.general.filesize:
|
||||
path: /bigfile
|
||||
size: 1GiB
|
||||
notify: Remove file
|
||||
|
||||
- name: Obtain loop device name
|
||||
command:
|
||||
cmd: losetup -f
|
||||
changed_when: false
|
||||
register: losetup_name
|
||||
|
||||
- name: Create loopback device
|
||||
command:
|
||||
cmd: losetup -f /bigfile
|
||||
changed_when: true
|
||||
register: losetup_cmd
|
||||
notify: Remove loopback device
|
||||
|
||||
- name: Create first partition
|
||||
community.general.parted:
|
||||
device: "{{ losetup_name.stdout }}"
|
||||
number: 1
|
||||
state: present
|
||||
fs_type: ext4
|
||||
part_end: "50%"
|
||||
register: partition1
|
||||
|
||||
- name: Make filesystem
|
||||
community.general.filesystem:
|
||||
device: "{{ losetup_name.stdout }}p1"
|
||||
fstype: ext4
|
||||
register: fs1_succ
|
||||
|
||||
- name: Make filesystem (fail)
|
||||
community.general.filesystem:
|
||||
device: "{{ losetup_name.stdout }}p2"
|
||||
fstype: ext4
|
||||
ignore_errors: true
|
||||
register: fs_fail
|
||||
|
||||
- name: Create second partition
|
||||
community.general.parted:
|
||||
device: "{{ losetup_name.stdout }}"
|
||||
number: 2
|
||||
state: present
|
||||
fs_type: ext4
|
||||
part_start: "{{ partition1.partitions[0].end + 1 }}KiB"
|
||||
part_end: "100%"
|
||||
register: partition2
|
||||
|
||||
- name: Make filesystem
|
||||
community.general.filesystem:
|
||||
device: "{{ losetup_name.stdout }}p2"
|
||||
fstype: ext4
|
||||
register: fs2_succ
|
||||
|
||||
- name: Remove first partition
|
||||
community.general.parted:
|
||||
device: "{{ losetup_name.stdout }}"
|
||||
number: 1
|
||||
state: absent
|
||||
register: partition_rem1
|
||||
|
||||
- name: Assert results
|
||||
assert:
|
||||
that:
|
||||
- partition1 is changed
|
||||
- fs1_succ is changed
|
||||
- fs_fail is failed
|
||||
- fs_fail is not changed
|
||||
- partition2 is changed
|
||||
- partition2.partitions | length == 2
|
||||
- fs2_succ is changed
|
||||
- partition_rem1 is changed
|
||||
- partition_rem1.partitions | length == 1
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
- name: "Picking a random process name"
|
||||
set_fact:
|
||||
random_name: some-random-long-name-{{ 99999999 | random }}
|
||||
random_name: some-random-long-name-{{ 10000000000 + (9999999999 | random) }}
|
||||
|
||||
- name: Copy the fake 'sleep' source code
|
||||
copy:
|
||||
@@ -43,15 +43,14 @@
|
||||
- name: Compile fake 'sleep' binary
|
||||
command: cc {{ remote_tmp_dir }}/sleeper.c -o {{ remote_tmp_dir }}/{{ random_name }}
|
||||
|
||||
- name: Copy helper script
|
||||
copy:
|
||||
- name: Copy templated helper script
|
||||
template:
|
||||
src: obtainpid.sh
|
||||
dest: "{{ remote_tmp_dir }}/obtainpid.sh"
|
||||
mode: 0755
|
||||
|
||||
- name: "Run the fake 'sleep' binary"
|
||||
command: "sh {{ remote_tmp_dir }}/obtainpid.sh '{{ remote_tmp_dir }}/{{ random_name }}' '{{ remote_tmp_dir }}/obtainpid.txt'"
|
||||
|
||||
command: sh {{ remote_tmp_dir }}/obtainpid.sh
|
||||
async: 100
|
||||
poll: 0
|
||||
|
||||
@@ -66,17 +65,17 @@
|
||||
|
||||
- name: "Checking that exact non-substring matches are required"
|
||||
pids:
|
||||
name: "{{ random_name[0:5] }}"
|
||||
name: "{{ random_name[0:25] }}"
|
||||
register: exactpidmatch
|
||||
|
||||
- name: "Checking that patterns can be used with the pattern option"
|
||||
pids:
|
||||
pattern: "{{ random_name[0:5] }}"
|
||||
pattern: "{{ random_name[0:25] }}"
|
||||
register: pattern_pid_match
|
||||
|
||||
- name: "Checking that case-insensitive patterns can be used with the pattern option"
|
||||
pids:
|
||||
pattern: "{{ random_name[0:5] | upper }}"
|
||||
pattern: "{{ random_name[0:25] | upper }}"
|
||||
ignore_case: true
|
||||
register: caseinsensitive_pattern_pid_match
|
||||
|
||||
@@ -90,6 +89,15 @@
|
||||
src: "{{ remote_tmp_dir }}/obtainpid.txt"
|
||||
register: newpid
|
||||
|
||||
- name: Gather all processes to make debugging easier
|
||||
command: ps aux
|
||||
register: result
|
||||
no_log: true
|
||||
|
||||
- name: List all processes to make debugging easier
|
||||
debug:
|
||||
var: result.stdout_lines
|
||||
|
||||
- name: "Verify that the Process IDs (PIDs) returned is not empty and also equal to the PIDs obtained in console"
|
||||
assert:
|
||||
that:
|
||||
|
||||
@@ -3,5 +3,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
|
||||
|
||||
"$1" 100 &
|
||||
echo "$!" > "$2"
|
||||
"{{ remote_tmp_dir }}/{{ random_name }}" 100 &
|
||||
echo "$!" > "{{ remote_tmp_dir }}/obtainpid.txt"
|
||||
@@ -501,8 +501,11 @@
|
||||
# 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.3 fails with some kernel mismatch for packages
|
||||
# (someone with FreeBSD knowledge has to take a look)
|
||||
#
|
||||
# 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)
|
||||
# (someone with FreeBSD 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)
|
||||
@@ -513,7 +516,7 @@
|
||||
# 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('12.4', '<'))
|
||||
(ansible_distribution_version is version('12.01', '>=') and ansible_distribution_version is version('12.3', '<'))
|
||||
or ansible_distribution_version is version('13.2', '>=')
|
||||
block:
|
||||
- name: Setup testjail
|
||||
|
||||
19
tests/integration/targets/setup_snap/tasks/D-Ubuntu.yml
Normal file
19
tests/integration/targets/setup_snap/tasks/D-Ubuntu.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-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 (ubuntu)
|
||||
package:
|
||||
name: "{{ snap_packages }}"
|
||||
state: present
|
||||
notify: Remove snapd
|
||||
|
||||
- name: Make sure that snapd is running
|
||||
service:
|
||||
name: snapd
|
||||
state: started
|
||||
|
||||
- name: Inform that snap is installed
|
||||
set_fact:
|
||||
has_snap: true
|
||||
@@ -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
|
||||
|
||||
- name: Install snapd
|
||||
- name: Install snapd (default)
|
||||
package:
|
||||
name: "{{ snap_packages }}"
|
||||
state: present
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
- name: Check package has been installed correctly (hello-world)
|
||||
command: hello-world
|
||||
environment:
|
||||
PATH: /var/lib/snapd/snap/bin/
|
||||
PATH: /snap/bin/
|
||||
|
||||
- name: Remove package (hello-world) (check mode)
|
||||
community.general.snap:
|
||||
|
||||
@@ -139,10 +139,12 @@
|
||||
##
|
||||
- name: Test within jail
|
||||
#
|
||||
# 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: currently fails with FreeBSD 12 with minor version less than 4
|
||||
# NOTE: currently fails with FreeBSD 13 with minor version less than 1
|
||||
#
|
||||
when: ansible_distribution_version is version('12.01', '>=')
|
||||
when: >-
|
||||
ansible_distribution_version is version('12.4', '>=') and ansible_distribution_version is version('13', '<')
|
||||
or ansible_distribution_version is version('13.1', '>=')
|
||||
block:
|
||||
- name: Setup testjail
|
||||
include: setup-testjail.yml
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 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
|
||||
command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-gquota bs=1M count=400
|
||||
|
||||
'
|
||||
- name: Create XFS filesystem
|
||||
|
||||
@@ -8,7 +8,17 @@
|
||||
# GNU General Public License v3.0+ (see LICENSES/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: setup Alpine
|
||||
when: ansible_distribution == 'Alpine'
|
||||
package:
|
||||
name:
|
||||
- xfsprogs
|
||||
- xfsprogs-extra
|
||||
- mount
|
||||
- umount
|
||||
state: latest
|
||||
|
||||
- block:
|
||||
- name: Create test user
|
||||
user:
|
||||
name: xfsquotauser
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 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
|
||||
command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-pquota bs=1M count=400
|
||||
|
||||
'
|
||||
- name: Create XFS filesystem
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 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
|
||||
command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-uquota bs=1M count=400
|
||||
|
||||
'
|
||||
- name: Create XFS filesystem
|
||||
|
||||
@@ -132,13 +132,14 @@
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_{{ ansible_distribution_version }}/
|
||||
state: absent
|
||||
|
||||
- name: "Test adding a repo with custom GPG key"
|
||||
community.general.zypper_repository:
|
||||
name: "Apache_PHP_Modules"
|
||||
repo: "http://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Tumbleweed/"
|
||||
priority: 100
|
||||
auto_import_keys: true
|
||||
state: "present"
|
||||
# FIXME: this currently fails with `Repository 'Apache_PHP_Modules' is invalid.`
|
||||
# - name: "Test adding a repo with custom GPG key"
|
||||
# community.general.zypper_repository:
|
||||
# name: "Apache_PHP_Modules"
|
||||
# repo: "http://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Tumbleweed/"
|
||||
# priority: 100
|
||||
# auto_import_keys: true
|
||||
# state: "present"
|
||||
|
||||
- name: add a repo by releasever
|
||||
community.general.zypper_repository:
|
||||
@@ -213,6 +214,8 @@
|
||||
- remove_repo is changed
|
||||
|
||||
# For now, the URL does not work for 15.4
|
||||
# FIXME: Try to get this working with newer versions
|
||||
# (Maybe 'Uyuni' needs to be replaced with something else?)
|
||||
- when: ansible_distribution_version is version('15.4', '<')
|
||||
block:
|
||||
- name: add new repository via url to .repo file
|
||||
@@ -260,24 +263,27 @@
|
||||
- "removed_by_repo_file"
|
||||
- "'/systemsmanagement:/Uyuni:/Stable/' not in etc_zypp_reposd.stdout"
|
||||
|
||||
- name: Copy test .repo file
|
||||
copy:
|
||||
src: 'files/systemsmanagement_Uyuni_Utils.repo'
|
||||
dest: '{{ remote_tmp_dir }}'
|
||||
# FIXME: THIS DOESN'T SEEM TO WORK ANYMORE WITH ANY OPENSUSE VERSION IN CI!
|
||||
- when: false
|
||||
block:
|
||||
- name: Copy test .repo file
|
||||
copy:
|
||||
src: 'files/systemsmanagement_Uyuni_Utils.repo'
|
||||
dest: '{{ remote_tmp_dir }}'
|
||||
|
||||
- name: add new repository via local path to .repo file
|
||||
community.general.zypper_repository:
|
||||
repo: "{{ remote_tmp_dir }}/systemsmanagement_Uyuni_Utils.repo"
|
||||
state: present
|
||||
register: added_by_repo_local_file
|
||||
- name: add new repository via local path to .repo file
|
||||
community.general.zypper_repository:
|
||||
repo: "{{ remote_tmp_dir }}/systemsmanagement_Uyuni_Utils.repo"
|
||||
state: present
|
||||
register: added_by_repo_local_file
|
||||
|
||||
- name: get repository details for systemsmanagement_Uyuni_Utils from zypper
|
||||
command: zypper lr systemsmanagement_Uyuni_Utils
|
||||
register: get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils
|
||||
- name: get repository details for systemsmanagement_Uyuni_Utils from zypper
|
||||
command: zypper lr systemsmanagement_Uyuni_Utils
|
||||
register: get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils
|
||||
|
||||
- name: verify adding repository via local .repo file was successful
|
||||
assert:
|
||||
that:
|
||||
- "added_by_repo_local_file is changed"
|
||||
- "get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.rc == 0"
|
||||
- "'/systemsmanagement:/Uyuni:/Utils/' in get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.stdout"
|
||||
- name: verify adding repository via local .repo file was successful
|
||||
assert:
|
||||
that:
|
||||
- "added_by_repo_local_file is changed"
|
||||
- "get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.rc == 0"
|
||||
- "'/systemsmanagement:/Uyuni:/Utils/' in get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.stdout"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
{
|
||||
"include_symlinks": false,
|
||||
"prefixes": [
|
||||
"docs/docsite/"
|
||||
"docs/docsite/",
|
||||
"plugins/",
|
||||
"roles/"
|
||||
],
|
||||
"output": "path-line-column-message",
|
||||
"requirements": [
|
||||
"ansible-core",
|
||||
"antsibull-docs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -13,9 +13,14 @@ import subprocess
|
||||
|
||||
def main():
|
||||
"""Main entry point."""
|
||||
if not os.path.isdir(os.path.join('docs', 'docsite')):
|
||||
return
|
||||
p = subprocess.run(['antsibull-docs', 'lint-collection-docs', '.'], check=False)
|
||||
env = os.environ.copy()
|
||||
suffix = ':{env}'.format(env=env["ANSIBLE_COLLECTIONS_PATH"]) if 'ANSIBLE_COLLECTIONS_PATH' in env else ''
|
||||
env['ANSIBLE_COLLECTIONS_PATH'] = '{root}{suffix}'.format(root=os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd()))), suffix=suffix)
|
||||
p = subprocess.run(
|
||||
['antsibull-docs', 'lint-collection-docs', '--plugin-docs', '--disallow-semantic-markup', '--skip-rstcheck', '.'],
|
||||
env=env,
|
||||
check=False,
|
||||
)
|
||||
if p.returncode not in (0, 3):
|
||||
print('{0}:0:0: unexpected return code {1}'.format(sys.argv[0], p.returncode))
|
||||
|
||||
|
||||
37
tests/sanity/ignore-2.16.txt
Normal file
37
tests/sanity/ignore-2.16.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
.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/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/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
|
||||
3
tests/sanity/ignore-2.16.txt.license
Normal file
3
tests/sanity/ignore-2.16.txt.license
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user