mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-29 18:06:53 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87880da6da | ||
|
|
7acc0b897a | ||
|
|
5174fc98d2 | ||
|
|
d9ad386a13 | ||
|
|
739719a3b1 | ||
|
|
311b618016 | ||
|
|
70820cab5d | ||
|
|
a75a12227f | ||
|
|
6959847701 | ||
|
|
ad93c40d40 | ||
|
|
5bfbd65115 | ||
|
|
71de1ee1d5 | ||
|
|
ad4efaeb31 | ||
|
|
786ea68016 | ||
|
|
dd878f931f | ||
|
|
8f03511d9c | ||
|
|
004e6d06c3 | ||
|
|
25f46caefb | ||
|
|
0a733c60ca | ||
|
|
f006aa4cf6 | ||
|
|
72e0d8c310 | ||
|
|
b96aaffeae |
@@ -297,8 +297,6 @@ stages:
|
||||
targets:
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: Fedora 34
|
||||
@@ -325,8 +323,8 @@ stages:
|
||||
targets:
|
||||
- name: CentOS 6
|
||||
test: centos6
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 34
|
||||
test: fedora34
|
||||
- name: openSUSE 15 py3
|
||||
@@ -345,8 +343,8 @@ stages:
|
||||
parameters:
|
||||
testFormat: 2.11/linux/{0}
|
||||
targets:
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: openSUSE 15 py2
|
||||
|
||||
@@ -6,6 +6,30 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 2.0.0.
|
||||
|
||||
v3.8.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- gitlab_deploy_key - fix the SSH Deploy Key being deleted accidentally while running task in check mode (https://github.com/ansible-collections/community.general/issues/3621, https://github.com/ansible-collections/community.general/pull/3622).
|
||||
- gitlab_project_members - ``get_project_id`` return the project id by matching ``full_path`` or ``name`` (https://github.com/ansible-collections/community.general/pull/3602).
|
||||
- ipa_* modules - fix environment fallback for ``ipa_host`` option (https://github.com/ansible-collections/community.general/issues/3560).
|
||||
- nmcli - fixed ``dns6`` option handling so that it is treated as a list internally (https://github.com/ansible-collections/community.general/pull/3563).
|
||||
- nmcli - fixed ``ipv4.route-metric`` being in properties of type list (https://github.com/ansible-collections/community.general/pull/3563).
|
||||
- one_image - fix error message when renaming an image (https://github.com/ansible-collections/community.general/pull/3626).
|
||||
- pipx - ``state=inject`` was failing to parse the list of injected packages (https://github.com/ansible-collections/community.general/pull/3611).
|
||||
- pipx - set environment variable ``USE_EMOJI=0`` to prevent errors in platforms that do not support ``UTF-8`` (https://github.com/ansible-collections/community.general/pull/3611).
|
||||
- pkgin - Fix exception encountered when all packages are already installed (https://github.com/ansible-collections/community.general/pull/3583).
|
||||
- proxmox_group_info - fix module crash if a ``group`` parameter is used (https://github.com/ansible-collections/community.general/pull/3649).
|
||||
- redfish_utils module utils - do not attempt to change the boot source override mode if not specified by the user (https://github.com/ansible-collections/community.general/issues/3509/).
|
||||
- redfish_utils module utils - if a manager network property is not specified in the service, attempt to change the requested settings (https://github.com/ansible-collections/community.general/issues/3404/).
|
||||
|
||||
v3.8.0
|
||||
======
|
||||
|
||||
|
||||
@@ -1940,3 +1940,41 @@ releases:
|
||||
name: opennebula
|
||||
namespace: null
|
||||
release_date: '2021-10-12'
|
||||
3.8.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- gitlab_deploy_key - fix the SSH Deploy Key being deleted accidentally while
|
||||
running task in check mode (https://github.com/ansible-collections/community.general/issues/3621,
|
||||
https://github.com/ansible-collections/community.general/pull/3622).
|
||||
- gitlab_project_members - ``get_project_id`` return the project id by matching
|
||||
``full_path`` or ``name`` (https://github.com/ansible-collections/community.general/pull/3602).
|
||||
- ipa_* modules - fix environment fallback for ``ipa_host`` option (https://github.com/ansible-collections/community.general/issues/3560).
|
||||
- nmcli - fixed ``dns6`` option handling so that it is treated as a list internally
|
||||
(https://github.com/ansible-collections/community.general/pull/3563).
|
||||
- nmcli - fixed ``ipv4.route-metric`` being in properties of type list (https://github.com/ansible-collections/community.general/pull/3563).
|
||||
- one_image - fix error message when renaming an image (https://github.com/ansible-collections/community.general/pull/3626).
|
||||
- pipx - ``state=inject`` was failing to parse the list of injected packages
|
||||
(https://github.com/ansible-collections/community.general/pull/3611).
|
||||
- pipx - set environment variable ``USE_EMOJI=0`` to prevent errors in platforms
|
||||
that do not support ``UTF-8`` (https://github.com/ansible-collections/community.general/pull/3611).
|
||||
- pkgin - Fix exception encountered when all packages are already installed
|
||||
(https://github.com/ansible-collections/community.general/pull/3583).
|
||||
- proxmox_group_info - fix module crash if a ``group`` parameter is used (https://github.com/ansible-collections/community.general/pull/3649).
|
||||
- redfish_utils module utils - do not attempt to change the boot source override
|
||||
mode if not specified by the user (https://github.com/ansible-collections/community.general/issues/3509/).
|
||||
- redfish_utils module utils - if a manager network property is not specified
|
||||
in the service, attempt to change the requested settings (https://github.com/ansible-collections/community.general/issues/3404/).
|
||||
release_summary: Regular bugfix release.
|
||||
fragments:
|
||||
- 3.8.1.yml
|
||||
- 3404-redfish_utils-skip-manager-network-check.yml
|
||||
- 3509-redfish_utils-SetOneTimeBoot-mode-fix.yml
|
||||
- 3561-fix-ipa-host-var-detection.yml
|
||||
- 3563-nmcli-ipv6_dns.yaml
|
||||
- 3583-fix-pkgin-exception.yml
|
||||
- 3602-fix-gitlab_project_members-improve-search-method.yml
|
||||
- 3611-pipx-fix-inject.yml
|
||||
- 3622-fix-gitlab-deploy-key-check-mode.yml
|
||||
- 3626-fix-one_image-error.yml
|
||||
- 3649-proxmox_group_info_TypeError.yml
|
||||
release_date: '2021-11-02'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 3.8.0
|
||||
version: 3.8.1
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -31,6 +31,7 @@ def _env_then_dns_fallback(*args, **kwargs):
|
||||
result = env_fallback(*args, **kwargs)
|
||||
if result == '':
|
||||
raise AnsibleFallbackNotFound
|
||||
return result
|
||||
except AnsibleFallbackNotFound:
|
||||
# If no host was given, we try to guess it from IPA.
|
||||
# The ipa-ca entry is a standard entry that IPA will have set for
|
||||
|
||||
@@ -1605,9 +1605,6 @@ class RedfishUtils(object):
|
||||
cur_boot_next = boot.get('BootNext')
|
||||
cur_override_mode = boot.get('BootSourceOverrideMode')
|
||||
|
||||
if not boot_override_mode:
|
||||
boot_override_mode = cur_override_mode
|
||||
|
||||
if override_enabled == 'Disabled':
|
||||
payload = {
|
||||
'Boot': {
|
||||
@@ -1643,16 +1640,18 @@ class RedfishUtils(object):
|
||||
}
|
||||
}
|
||||
else:
|
||||
if cur_enabled == override_enabled and target == bootdevice and cur_override_mode == boot_override_mode:
|
||||
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,
|
||||
'BootSourceOverrideMode': boot_override_mode,
|
||||
'BootSourceOverrideTarget': bootdevice
|
||||
}
|
||||
}
|
||||
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:
|
||||
@@ -2762,7 +2761,9 @@ class RedfishUtils(object):
|
||||
if isinstance(set_value, dict):
|
||||
for subprop in payload[property].keys():
|
||||
if subprop not in target_ethernet_current_setting[property]:
|
||||
return {'ret': False, 'msg': "Sub-property %s in nic_config is invalid" % subprop}
|
||||
# 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:
|
||||
@@ -2776,7 +2777,9 @@ class RedfishUtils(object):
|
||||
for i in range(len(set_value)):
|
||||
for subprop in payload[property][i].keys():
|
||||
if subprop not in target_ethernet_current_setting[property][i]:
|
||||
return {'ret': False, 'msg': "Sub-property %s in nic_config is invalid" % subprop}
|
||||
# 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:
|
||||
|
||||
@@ -131,7 +131,7 @@ def main():
|
||||
group = module.params['group']
|
||||
|
||||
if group:
|
||||
groups = [proxmox.get_group(group=group)]
|
||||
groups = [proxmox.get_group(groupid=group)]
|
||||
else:
|
||||
groups = proxmox.get_groups()
|
||||
result['proxmox_groups'] = [group.group for group in groups]
|
||||
|
||||
@@ -306,7 +306,7 @@ def rename_image(module, client, image, new_name):
|
||||
|
||||
tmp_image = get_image_by_name(module, client, new_name)
|
||||
if tmp_image:
|
||||
module.fail_json(msg="Name '" + new_name + "' is already taken by IMAGE with id=" + str(tmp_image.id))
|
||||
module.fail_json(msg="Name '" + new_name + "' is already taken by IMAGE with id=" + str(tmp_image.ID))
|
||||
|
||||
if not module.check_mode:
|
||||
client.image.rename(image.ID, new_name)
|
||||
|
||||
@@ -92,13 +92,6 @@ EXAMPLES = '''
|
||||
account_api_token: dummyapitoken
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Fetch my.com domain records
|
||||
community.general.dnsimple:
|
||||
domain: my.com
|
||||
state: present
|
||||
delegate_to: localhost
|
||||
register: records
|
||||
|
||||
- name: Delete a domain
|
||||
community.general.dnsimple:
|
||||
domain: my.com
|
||||
|
||||
@@ -1472,7 +1472,6 @@ class Nmcli(object):
|
||||
'ipv4.dns-search',
|
||||
'ipv4.routes',
|
||||
'ipv4.routing-rules',
|
||||
'ipv4.route-metric'
|
||||
'ipv6.dns',
|
||||
'ipv6.dns-search',
|
||||
'802-11-wireless-security.group',
|
||||
|
||||
@@ -176,6 +176,9 @@ class PipX(CmdStateModuleHelper):
|
||||
_list=dict(fmt=('list', '--include-injected', '--json'), style=ArgFormat.BOOLEAN),
|
||||
)
|
||||
check_rc = True
|
||||
run_command_fixed_options = dict(
|
||||
environ_update={'USE_EMOJI': '0'}
|
||||
)
|
||||
|
||||
def _retrieve_installed(self):
|
||||
def process_list(rc, out, err):
|
||||
@@ -188,7 +191,7 @@ class PipX(CmdStateModuleHelper):
|
||||
results[venv_name] = {
|
||||
'version': venv['metadata']['main_package']['package_version'],
|
||||
'injected': dict(
|
||||
(k, v['package_version']) for k, v in venv['metadata']['injected_packages']
|
||||
(k, v['package_version']) for k, v in venv['metadata']['injected_packages'].items()
|
||||
),
|
||||
}
|
||||
return results
|
||||
|
||||
@@ -132,10 +132,10 @@ EXAMPLES = '''
|
||||
name: homebrew/cask/foo
|
||||
state: present
|
||||
|
||||
- name: Use ignored-pinned option while upgrading all
|
||||
- name: Use ignore-pinned option while upgrading all
|
||||
community.general.homebrew:
|
||||
upgrade_all: yes
|
||||
upgrade_options: ignored-pinned
|
||||
upgrade_options: ignore-pinned
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
||||
@@ -281,9 +281,9 @@ def install_packages(module, packages):
|
||||
install_c += 1
|
||||
|
||||
if install_c > 0:
|
||||
module.exit_json(changed=True, msg=format_action_message(module, "installed", install_c))
|
||||
module.exit_json(changed=True, msg=format_action_message(module, "installed", install_c), stdout=out, stderr=err)
|
||||
|
||||
module.exit_json(changed=False, msg="package(s) already present", stdout=out, stderr=err)
|
||||
module.exit_json(changed=False, msg="package(s) already present")
|
||||
|
||||
|
||||
def update_package_db(module):
|
||||
|
||||
@@ -47,7 +47,9 @@ EXAMPLES = '''
|
||||
api_version: 500
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Data Centers
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Data Centers
|
||||
@@ -62,7 +64,9 @@ EXAMPLES = '''
|
||||
sort: 'name:descending'
|
||||
filter: 'state=Unmanaged'
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about paginated, filtered and sorted list of Data Centers
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
|
||||
- name: Gather information about a Data Center by name
|
||||
@@ -74,7 +78,9 @@ EXAMPLES = '''
|
||||
name: "My Data Center"
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Data Center found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
|
||||
- name: Gather information about the Data Center Visual Content
|
||||
@@ -88,9 +94,13 @@ EXAMPLES = '''
|
||||
- visualContent
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Data Center found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Data Center Visual Content
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.datacenter_visual_content }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -50,7 +50,9 @@ EXAMPLES = '''
|
||||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosures
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Enclosures
|
||||
@@ -67,7 +69,9 @@ EXAMPLES = '''
|
||||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about paginated, filtered ans sorted list of Enclosures
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
|
||||
- name: Gather information about an Enclosure by name
|
||||
@@ -80,7 +84,9 @@ EXAMPLES = '''
|
||||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosure found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
|
||||
- name: Gather information about an Enclosure by name with options
|
||||
@@ -97,13 +103,21 @@ EXAMPLES = '''
|
||||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosure found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosure Script
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_script }}"
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosure Environmental Configuration
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_environmental_configuration }}"
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosure Utilization
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_utilization }}"
|
||||
|
||||
- name: "Gather information about an Enclosure with temperature data at a resolution of one sample per day, between two
|
||||
@@ -125,9 +139,13 @@ EXAMPLES = '''
|
||||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosure found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Enclosure Utilization
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_utilization }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Ethernet Networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.ethernet_networks }}"
|
||||
|
||||
- name: Gather paginated and filtered information about Ethernet Networks
|
||||
@@ -58,7 +59,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about paginated and filtered list of Ethernet Networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.ethernet_networks }}"
|
||||
|
||||
- name: Gather information about an Ethernet Network by name
|
||||
@@ -68,7 +70,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Ethernet Network found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.ethernet_networks }}"
|
||||
|
||||
- name: Gather information about an Ethernet Network by name with options
|
||||
@@ -81,9 +84,12 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Ethernet Network Associated Profiles
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enet_associated_profiles }}"
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about Ethernet Network Associated Uplink Groups
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.enet_associated_uplink_groups }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Fibre Channel Networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.fc_networks }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Fibre Channel Networks
|
||||
@@ -52,7 +53,9 @@ EXAMPLES = '''
|
||||
filter: 'fabricType=FabricAttach'
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information about paginated, filtered and sorted list of Fibre Channel Networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.fc_networks }}"
|
||||
|
||||
- name: Gather information about a Fibre Channel Network by name
|
||||
@@ -62,7 +65,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Fibre Channel Network found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.fc_networks }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about FCoE Networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.fcoe_networks }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about FCoE Networks
|
||||
@@ -52,7 +53,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about paginated, filtered and sorted list of FCoE Networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.fcoe_networks }}"
|
||||
|
||||
- name: Gather information about a FCoE Network by name
|
||||
@@ -62,7 +64,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about FCoE Network found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.fcoe_networks }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -43,7 +43,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Logical Interconnect Groups
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.logical_interconnect_groups }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Logical Interconnect Groups
|
||||
@@ -61,7 +62,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about paginated, filtered and sorted list of Logical Interconnect Groups
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.logical_interconnect_groups }}"
|
||||
|
||||
- name: Gather information about a Logical Interconnect Group by name
|
||||
@@ -75,7 +77,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Logical Interconnect Group found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.logical_interconnect_groups }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -51,10 +51,11 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Network Sets
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather paginated, filtered, and sorted information about Network Sets
|
||||
- name: Gather paginated, filtered and sorted information about Network Sets
|
||||
community.general.oneview_network_set_info:
|
||||
hostname: 172.16.101.48
|
||||
username: administrator
|
||||
@@ -69,7 +70,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about paginated, filtered and sorted list of Network Sets
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather information about all Network Sets, excluding Ethernet networks
|
||||
@@ -84,7 +86,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Network Sets, excluding Ethernet networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather information about a Network Set by name
|
||||
@@ -98,7 +101,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Network Set found by name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather information about a Network Set by name, excluding Ethernet networks
|
||||
@@ -114,7 +118,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about Network Set found by name, excluding Ethernet networks
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about SAN Managers
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.san_managers }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about SAN Managers
|
||||
@@ -60,7 +61,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about paginated, filtered and sorted list of SAN Managers
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.san_managers }}"
|
||||
|
||||
- name: Gather information about a SAN Manager by provider display name
|
||||
@@ -70,7 +72,8 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information about SAN Manager found by provider display name
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.san_managers }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ author:
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: create a new webhook that triggers on push (password auth)
|
||||
- name: Create a new webhook that triggers on push (password auth)
|
||||
community.general.github_webhook:
|
||||
repository: ansible/ansible
|
||||
url: https://www.example.com/hooks/
|
||||
|
||||
@@ -149,7 +149,8 @@ class GitLabDeployKey(object):
|
||||
# GitLab REST API, so for that case we need to delete and
|
||||
# than recreate the key
|
||||
if self.deployKeyObject and self.deployKeyObject.key != key_key:
|
||||
self.deployKeyObject.delete()
|
||||
if not self._module.check_mode:
|
||||
self.deployKeyObject.delete()
|
||||
self.deployKeyObject = None
|
||||
|
||||
# Because we have already call existsDeployKey in main()
|
||||
|
||||
@@ -48,7 +48,7 @@ options:
|
||||
type: str
|
||||
project:
|
||||
description:
|
||||
- The name of the GitLab project the member is added to/removed from.
|
||||
- The name (or full path) of the GitLab project the member is added to/removed from.
|
||||
required: true
|
||||
type: str
|
||||
gitlab_user:
|
||||
@@ -194,9 +194,13 @@ class GitLabProjectMembers(object):
|
||||
self._gitlab = gl
|
||||
|
||||
def get_project(self, project_name):
|
||||
project_exists = self._gitlab.projects.list(search=project_name)
|
||||
if project_exists:
|
||||
return project_exists[0].id
|
||||
try:
|
||||
project_exists = self._gitlab.projects.get(project_name)
|
||||
return project_exists.id
|
||||
except gitlab.exceptions.GitlabGetError as e:
|
||||
project_exists = self._gitlab.projects.list(search=project_name)
|
||||
if project_exists:
|
||||
return project_exists[0].id
|
||||
|
||||
def get_user_id(self, gitlab_user):
|
||||
user_exists = self._gitlab.users.list(username=gitlab_user)
|
||||
|
||||
@@ -92,7 +92,7 @@ options:
|
||||
type: str
|
||||
maximum_timeout:
|
||||
description:
|
||||
- The maximum timeout that a runner has to pick up a specific job.
|
||||
- The maximum time that a runner has to complete a specific job.
|
||||
required: False
|
||||
default: 3600
|
||||
type: int
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
commonName: localhost
|
||||
- name: Generate selfsigned certificate
|
||||
register: selfsigned_certificate
|
||||
community.crypto.openssl_certificate:
|
||||
community.crypto.x509_certificate:
|
||||
path: '{{ remote_tmp_dir }}/cert.pem'
|
||||
csr_path: '{{ remote_tmp_dir }}/csr.csr'
|
||||
privatekey_path: '{{ remote_tmp_dir }}/privatekey.pem'
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
- name: Generate selfsigned certificate
|
||||
register: selfsigned_certificate
|
||||
community.crypto.openssl_certificate:
|
||||
community.crypto.x509_certificate:
|
||||
path: '{{ remote_tmp_dir }}/cert.pem'
|
||||
csr_path: '{{ remote_tmp_dir }}/csr.csr'
|
||||
privatekey_path: '{{ remote_tmp_dir }}/privatekey.pem'
|
||||
|
||||
@@ -90,3 +90,37 @@
|
||||
- downgrade_tox_324.application.tox.version == '3.24.0'
|
||||
- uninstall_tox_324 is changed
|
||||
- "'tox' not in uninstall_tox_324.application"
|
||||
|
||||
##############################################################################
|
||||
- name: ensure application ansible-lint is uninstalled
|
||||
community.general.pipx:
|
||||
name: ansible-lint
|
||||
state: absent
|
||||
|
||||
- name: install application ansible-lint
|
||||
community.general.pipx:
|
||||
name: ansible-lint
|
||||
register: install_ansible_lint
|
||||
|
||||
- name: inject packages
|
||||
community.general.pipx:
|
||||
state: inject
|
||||
name: ansible-lint
|
||||
inject_packages:
|
||||
- licenses
|
||||
register: inject_pkgs_ansible_lint
|
||||
|
||||
- name: cleanup ansible-lint
|
||||
community.general.pipx:
|
||||
state: absent
|
||||
name: ansible-lint
|
||||
register: uninstall_ansible_lint
|
||||
|
||||
- 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
|
||||
|
||||
@@ -38,7 +38,7 @@ class OneViewBaseTest(object):
|
||||
testing_module = getattr(oneview_module, testing_module)
|
||||
try:
|
||||
# Load scenarios from module examples (Also checks if it is a valid yaml)
|
||||
EXAMPLES = yaml.load(testing_module.EXAMPLES, yaml.SafeLoader)
|
||||
EXAMPLES = yaml.safe_load(testing_module.EXAMPLES)
|
||||
|
||||
except yaml.scanner.ScannerError:
|
||||
message = "Something went wrong while parsing yaml from {0}.EXAMPLES".format(self.testing_class.__module__)
|
||||
@@ -140,7 +140,7 @@ class OneViewBaseTestCase(object):
|
||||
|
||||
try:
|
||||
# Load scenarios from module examples (Also checks if it is a valid yaml)
|
||||
self.EXAMPLES = yaml.load(self.testing_module.EXAMPLES, yaml.SafeLoader)
|
||||
self.EXAMPLES = yaml.safe_load(self.testing_module.EXAMPLES)
|
||||
|
||||
except yaml.scanner.ScannerError:
|
||||
message = "Something went wrong while parsing yaml from {0}.EXAMPLES".format(self.testing_class.__module__)
|
||||
|
||||
@@ -132,7 +132,7 @@ class EthernetNetworkModuleSpec(unittest.TestCase,
|
||||
self.resource.update.return_value = data_merged
|
||||
self.mock_ov_client.connection_templates.get.return_value = {"uri": "uri"}
|
||||
|
||||
self.mock_ansible_module.params = yaml.load(YAML_PARAMS_WITH_CHANGES)
|
||||
self.mock_ansible_module.params = yaml.safe_load(YAML_PARAMS_WITH_CHANGES)
|
||||
|
||||
EthernetNetworkModule().run()
|
||||
|
||||
@@ -146,7 +146,7 @@ class EthernetNetworkModuleSpec(unittest.TestCase,
|
||||
self.resource.get_by.return_value = [DICT_PARAMS_WITH_CHANGES]
|
||||
self.mock_ov_client.connection_templates.get.return_value = {"uri": "uri"}
|
||||
|
||||
self.mock_ansible_module.params = yaml.load(YAML_PARAMS_WITH_CHANGES)
|
||||
self.mock_ansible_module.params = yaml.safe_load(YAML_PARAMS_WITH_CHANGES)
|
||||
|
||||
EthernetNetworkModule().run()
|
||||
|
||||
@@ -165,7 +165,7 @@ class EthernetNetworkModuleSpec(unittest.TestCase,
|
||||
self.mock_ov_client.connection_templates.get.return_value = {
|
||||
"bandwidth": DICT_PARAMS_WITH_CHANGES['bandwidth']}
|
||||
|
||||
self.mock_ansible_module.params = yaml.load(YAML_PARAMS_WITH_CHANGES)
|
||||
self.mock_ansible_module.params = yaml.safe_load(YAML_PARAMS_WITH_CHANGES)
|
||||
|
||||
EthernetNetworkModule().run()
|
||||
|
||||
@@ -182,7 +182,7 @@ class EthernetNetworkModuleSpec(unittest.TestCase,
|
||||
self.resource.get_by.return_value = [DEFAULT_ENET_TEMPLATE]
|
||||
self.resource.update.return_value = data_merged
|
||||
|
||||
self.mock_ansible_module.params = yaml.load(YAML_PARAMS_WITH_CHANGES)
|
||||
self.mock_ansible_module.params = yaml.safe_load(YAML_PARAMS_WITH_CHANGES)
|
||||
|
||||
EthernetNetworkModule().run()
|
||||
|
||||
@@ -320,7 +320,7 @@ class EthernetNetworkModuleSpec(unittest.TestCase,
|
||||
"max": 1
|
||||
}}
|
||||
|
||||
self.mock_ansible_module.params = yaml.load(YAML_RESET_CONNECTION_TEMPLATE)
|
||||
self.mock_ansible_module.params = yaml.safe_load(YAML_RESET_CONNECTION_TEMPLATE)
|
||||
|
||||
EthernetNetworkModule().run()
|
||||
|
||||
@@ -331,7 +331,7 @@ class EthernetNetworkModuleSpec(unittest.TestCase,
|
||||
def test_should_fail_when_reset_not_existing_ethernet_network(self):
|
||||
self.resource.get_by.return_value = [None]
|
||||
|
||||
self.mock_ansible_module.params = yaml.load(YAML_RESET_CONNECTION_TEMPLATE)
|
||||
self.mock_ansible_module.params = yaml.safe_load(YAML_RESET_CONNECTION_TEMPLATE)
|
||||
|
||||
EthernetNetworkModule().run()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user