mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-28 17:36:49 +00:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d71b90be07 | ||
|
|
1293b0ac91 | ||
|
|
d4330a3e54 | ||
|
|
7c3bf118ca | ||
|
|
742b438b32 | ||
|
|
c59ebc82cd | ||
|
|
36a4fbfe60 | ||
|
|
ad3e7bc21d | ||
|
|
66a7fdfeba | ||
|
|
77e25a7503 | ||
|
|
05ac79cee6 | ||
|
|
22b4fc8d8b | ||
|
|
6252f3bded | ||
|
|
15c4e08295 | ||
|
|
a77bb090b3 | ||
|
|
99958cea49 | ||
|
|
b2802dc8eb | ||
|
|
8617568146 | ||
|
|
7569d6315c | ||
|
|
ab5143b15d | ||
|
|
a71ff614f0 | ||
|
|
bfd3e15074 | ||
|
|
90b815de50 | ||
|
|
056e16baa5 | ||
|
|
890cf636a0 |
@@ -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
|
||||
@@ -251,16 +251,16 @@ 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
|
||||
test: alpine3
|
||||
groups:
|
||||
@@ -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
|
||||
|
||||
4
.github/BOTMETA.yml
vendored
4
.github/BOTMETA.yml
vendored
@@ -615,7 +615,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
|
||||
@@ -707,7 +707,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:
|
||||
|
||||
@@ -6,6 +6,47 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 4.0.0.
|
||||
|
||||
v5.0.2
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Maintenance and bugfix release for Ansible 6.0.0.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Include ``simplified_bsd.txt`` license file for various module utils, the ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests.
|
||||
|
||||
v5.0.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release for inclusion in Ansible 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).
|
||||
- mksysb - 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).
|
||||
- xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived modules (https://github.com/ansible-collections/community.general/pull/4674).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680).
|
||||
- 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).
|
||||
- keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241).
|
||||
- redis* modules - fix call to ``module.fail_json`` when failing because of missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733).
|
||||
- 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).
|
||||
- zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, https://github.com/ansible-collections/community.general/pull/4726).
|
||||
|
||||
v5.0.0
|
||||
======
|
||||
|
||||
|
||||
@@ -755,3 +755,49 @@ releases:
|
||||
name: counter
|
||||
namespace: null
|
||||
release_date: '2022-04-29'
|
||||
5.0.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- consul - fixed bug introduced in PR 4590 (https://github.com/ansible-collections/community.general/issues/4680).
|
||||
- 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).
|
||||
- keycloak_realm - fix default groups and roles (https://github.com/ansible-collections/community.general/issues/4241).
|
||||
- redis* modules - fix call to ``module.fail_json`` when failing because of
|
||||
missing Python libraries (https://github.com/ansible-collections/community.general/pull/4733).
|
||||
- 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).
|
||||
- zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707,
|
||||
https://github.com/ansible-collections/community.general/pull/4726).
|
||||
minor_changes:
|
||||
- cpanm - 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).
|
||||
- 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).
|
||||
- xfconf - using ``do_raise()`` to raise exceptions in ``ModuleHelper`` derived
|
||||
modules (https://github.com/ansible-collections/community.general/pull/4674).
|
||||
release_summary: Regular bugfix release for inclusion in Ansible 6.0.0.
|
||||
fragments:
|
||||
- 4674-use-mh-raise.yaml
|
||||
- 4682-compatibility-virtualmedia-resource-location.yaml
|
||||
- 4700-code-changes.yml
|
||||
- 4712-consul-bugfix.yaml
|
||||
- 4719-fix-keycloak-realm.yaml
|
||||
- 4726-zfs.yml
|
||||
- 4733-redis-fail.yml
|
||||
- 5.0.1.yml
|
||||
release_date: '2022-05-30'
|
||||
5.0.2:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Include ``simplified_bsd.txt`` license file for various module utils, the
|
||||
``lxca_common`` docs fragment, and the ``utm_utils`` unit tests.
|
||||
release_summary: Maintenance and bugfix release for Ansible 6.0.0.
|
||||
fragments:
|
||||
- 5.0.2.yml
|
||||
- simplified-bsd-license.yml
|
||||
release_date: '2022-06-06'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 5.0.0
|
||||
version: 5.0.2
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin <heguimin36@163.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Copyright (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright: (c) 2019 Gregory Thiemonge <gregory.thiemonge@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2018 IBM CORPORATION
|
||||
# Author(s): Tzur Eliyahu <tzure@il.ibm.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Copyright (c) 2018, Simon Weald <ansible@simonweald.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2020, Alexei Znamensky <russoz@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# to the complete work.
|
||||
#
|
||||
# Copyright (c), Simon Dodsley <simon@purestorage.com>,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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# Copyright: (c) 2020, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Copyright (c) 2016, Adfinis SyGroup AG
|
||||
# Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Copyright: (c) 2018, Johannes Brunswicker <johannes.brunswicker@gmail.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright: (c) 2019, Sandeep Kasargod <sandeep@vexata.com>
|
||||
# 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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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']),
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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']))
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
@@ -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 = '''
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 od the image the 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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ RETURN = '''
|
||||
'''
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.module_helper import (
|
||||
CmdStateModuleHelper, ArgFormat, ModuleHelperException
|
||||
CmdStateModuleHelper, ArgFormat
|
||||
)
|
||||
|
||||
|
||||
@@ -212,7 +212,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:
|
||||
|
||||
8
simplified_bsd.txt
Normal file
8
simplified_bsd.txt
Normal file
@@ -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.
|
||||
|
||||
@@ -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', '>')
|
||||
|
||||
@@ -3,3 +3,4 @@ dependencies:
|
||||
- setup_pkg_mgr
|
||||
- setup_openssl
|
||||
- setup_remote_tmp_dir
|
||||
- setup_remote_constraints
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,3 +7,4 @@ skip/rhel8.2
|
||||
skip/rhel8.3
|
||||
skip/rhel8.4
|
||||
skip/rhel8.5
|
||||
skip/rhel9.0
|
||||
|
||||
@@ -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!
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@ shippable/posix/group1
|
||||
skip/aix
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/macos
|
||||
skip/rhel9.0 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
shippable/posix/group1
|
||||
needs/target/setup_epel
|
||||
destructive
|
||||
skip/aix
|
||||
skip/osx # FIXME
|
||||
skip/rhel9.0 # FIXME
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
dependencies:
|
||||
- setup_pkg_mgr
|
||||
- setup_epel
|
||||
- setup_remote_tmp_dir
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -3,4 +3,5 @@ shippable/posix/group1
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel8.0
|
||||
skip/rhel9.0
|
||||
skip/freebsd
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
cloud/opennebula
|
||||
shippable/cloud/group1
|
||||
disabled # FIXME
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
cloud/opennebula
|
||||
shippable/cloud/group1
|
||||
disabled # FIXME
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
cryptography_package_name: python-cryptography
|
||||
cryptography_package_name_python3: python3-cryptography
|
||||
openssl_package_name: openssl
|
||||
cryptography_from_pip: false
|
||||
@@ -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
|
||||
1
tests/integration/targets/setup_snap/aliases
Normal file
1
tests/integration/targets/setup_snap/aliases
Normal file
@@ -0,0 +1 @@
|
||||
needs/target/setup_epel
|
||||
@@ -1,3 +1,2 @@
|
||||
dependencies:
|
||||
- setup_pkg_mgr
|
||||
- setup_epel
|
||||
|
||||
1
tests/integration/targets/setup_snap/tasks/D-RedHat-9.0.yml
Symbolic link
1
tests/integration/targets/setup_snap/tasks/D-RedHat-9.0.yml
Symbolic link
@@ -0,0 +1 @@
|
||||
nothing.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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# Copyright: (c) 2018, Johannes Brunswicker <johannes.brunswicker@gmail.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user